Device tree configuration for I2C eeprom

Ayman El-Khashab AymanE at tanisys.com
Fri Sep 19 05:44:44 EST 2008


I am eluded by how exactly to configure the device tree for my external
I2C eeprom AND once that happens, how do I use the eeprom driver for
linux to read/write the device.

I am using the newest kernel 2.6.27-rc6 since it has apparently the best
support for the 28C128 EEPROM devices.  My design is based on the
canyonlands PPC460EX board.
 
The RTC in the device tree shows up as expected in the
/proc/device-tree, but I am not sure what the configuration of the
eeprom should look like.  

Here is a snippet from the dts file, and I assume I need something like
what I've added:
 
                        IIC0: i2c at ef600700 {
                                compatible = "ibm,iic-460ex", "ibm,iic";
                                reg = <ef600700 14>;
                                interrupt-parent = <&UIC0>;
                                interrupts = <2 4>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                rtc at 68 {
                                        compatible = "stm,m41t80";
                                        reg = <68>;
                                };
                                eeprom at 50 {
                                        compatible = "?????";
 						    something
                                        something;
                                };
    
Once I do all that, how does one use the eeprom driver to read and write
this part?

Thanks


More information about the Linuxppc-embedded mailing list