i2c-mux.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Common i2c bus multiplexer/switch properties.
  2. An i2c bus multiplexer/switch will have several child busses that are
  3. numbered uniquely in a device dependent manner. The nodes for an i2c bus
  4. multiplexer/switch will have one child node for each child bus.
  5. Optional properties:
  6. - #address-cells = <1>;
  7. This property is required is the i2c-mux child node does not exist.
  8. - #size-cells = <0>;
  9. This property is required is the i2c-mux child node does not exist.
  10. - i2c-mux
  11. For i2c multiplexers/switches that have child nodes that are a mixture
  12. of both i2c child busses and other child nodes, the 'i2c-mux' subnode
  13. can be used for populating the i2c child busses. If an 'i2c-mux'
  14. subnode is present, only subnodes of this will be considered as i2c
  15. child busses.
  16. Required properties for the i2c-mux child node:
  17. - #address-cells = <1>;
  18. - #size-cells = <0>;
  19. Required properties for i2c child bus nodes:
  20. - #address-cells = <1>;
  21. - #size-cells = <0>;
  22. - reg : The sub-bus number.
  23. Optional properties for i2c child bus nodes:
  24. - Other properties specific to the multiplexer/switch hardware.
  25. - Child nodes conforming to i2c bus binding
  26. Example :
  27. /*
  28. An NXP pca9548 8 channel I2C multiplexer at address 0x70
  29. with two NXP pca8574 GPIO expanders attached, one each to
  30. ports 3 and 4.
  31. */
  32. mux@70 {
  33. compatible = "nxp,pca9548";
  34. reg = <0x70>;
  35. #address-cells = <1>;
  36. #size-cells = <0>;
  37. i2c@3 {
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. reg = <3>;
  41. gpio1: gpio@38 {
  42. compatible = "nxp,pca8574";
  43. reg = <0x38>;
  44. #gpio-cells = <2>;
  45. gpio-controller;
  46. };
  47. };
  48. i2c@4 {
  49. #address-cells = <1>;
  50. #size-cells = <0>;
  51. reg = <4>;
  52. gpio2: gpio@38 {
  53. compatible = "nxp,pca8574";
  54. reg = <0x38>;
  55. #gpio-cells = <2>;
  56. gpio-controller;
  57. };
  58. };
  59. };