How do I define an i2c device that has multiple addresses.

I have a 2 Mbit EEPROM, normally I would configure the overlay as follows:

	m24m02: m24m02@50 {
		compatible = "atmel,at24";
		reg = <0x50>;
		size = <262144>;
		pagesize = <256>;
		address-width = <16>;  // Max address length = 16 we need 18!
		timeout = <5>;
		//label = "M24M02E";    // Label depricated.
		//wp-gpios = <&gpio0 22 (GPIO_PULL_DOWN | GPIO_ACTIVE_LOW)>;
		//supply-gpios = <&gpio0 7 GPIO_PULL_DOWN>;
		status = "okay";
	};

But the M24M02 eeprom uses 4 addresses to access 4 blocks of memory within the device, 50, 51, 52, 53.

So my question is how do I configure the overlay so that the driver can access 4 addresses depenedent of the memory address to be accessed?

Do I have to define 4 different devices?

Many thanks

Chris

Parents Reply Children
No Data
Related