Multiple ic2 muxes in a device tree

James Baldwin James.Baldwin at enablence.com
Wed May 11 05:24:04 EST 2011


I have tried many different combinations based on what I've been able to
find on

the internet over the last week and have reached a dead end.

 

I have the following i2c topology and specify the devices as follows:
Linux 2.6.38.5

only seems to recognize the devices connected directly to the i2c
controller when it boots.

 

I can add the muxes and lm73/m41st85 manually using the echo command
from the console:

"echo pca9547 0x70 > /sys/bus/12c/devices/i2c-2/new_device"

 

This tells me I have three prime candidates for potential issues.

1)  The device tree specification is incorrect

2)  The device tree processing is incorrect (It is 'appears'
correct in the /proc/devicetree hierarchy)

3)  The probing code for i2c devices doesn't currently traverse muxes
properly.

 

As validating the device tree should be the simplest to eliminate (and
is the part I'm

Directly involved with), I'd appreciate any Constructive comments on
solving this problem.

 

             |

i2c ctrl ----|

             |---lm73 at 0x49

             |

             |---24c02 at 0x54

             |

             |---pca9547 at 0x77---|

             |                  |-Chan 0---|---pca9547 at 0x70

             |                  |          |

             |                  |

             |                  |-Chan 1---|---pca9547 at 0x71

             |                  |          |

             |                  |

             |                  |-Chan 2---|---pca9547 at 0x72

             |                  |          |

             |                  |

             |                  |-Chan 3---|---pca9547 at 0x73

             |                  |          |

             |                  |

             |                  |-Chan 4---|---pca9547 at 0x74

             |                  |          |

             |                  |

             |                  |-Chan 5---|---pca9547 at 0x75

             |                  |          |

             |                  |

             |                  |-Chan 6---|---m41st85 at 0x68

             |                  |

             |                  |-Chan 7---|---lm73 at 0x48

             |                  |

 

i2c at 3100 {

        #address-cells = <1>;

        #size-cells = <0>;

        cell-index = <1>;

        compatible = "fsl-i2c";

        reg = <0x3100 0x100>;

        interrupts = <15 0x8>;

        interrupt-parent = <&ipic>;

        dfsrr;

 

        temp-sensor at 49 {

                compatible = "national,lm73";

                reg = <0x49>;

        };

 

        eeprom at 54 {

                compatible = "at24,24c02";

                reg = <0x54>;

                pagesize = <4>;

        };

 

        mux at 77 {

                #address-cells = <2>;

                #size-cells = <0>;

                compatible = "philips,pca9547";

                reg = <0x77>;

 

                mux at 0,70 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <0 0x70>;

                };

 

                mux at 0,71 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <1 0x71>;

                };

 

                mux at 0,72 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <2 0x72>;

                };

 

                mux at 0,73 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <3 0x73>;

                };

 

                mux at 0,74 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <4 0x74>;

                };

 

                mux at 0,75 {

                        #address-cells = <2>;

                        #size-cells = <0>;

                        compatible = "philips,pca9547";

                        reg = <0 0x75>;

                };

 

                temp-sensor at 7,48 {

                        compatible = "national,lm73";

                        reg = <7 0x48 >;

                };

 

                rtc at 6,68 {

                        compatible = "stm,m41st85";

                        reg = <6 0x68>;

                };

        };

 

};

 

 

Thanks,

Jim Baldwin



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20110510/3e7c39c6/attachment-0001.html>


More information about the devicetree-discuss mailing list