i2c-mux.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/i2c/i2c-mux.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Common i2c bus multiplexer/switch properties.
  7. maintainers:
  8. - Peter Rosin <peda@axentia.se>
  9. description: |+
  10. An i2c bus multiplexer/switch will have several child busses that are numbered
  11. uniquely in a device dependent manner. The nodes for an i2c bus
  12. multiplexer/switch will have one child node for each child bus.
  13. For i2c multiplexers/switches that have child nodes that are a mixture of both
  14. i2c child busses and other child nodes, the 'i2c-mux' subnode can be used for
  15. populating the i2c child busses. If an 'i2c-mux' subnode is present, only
  16. subnodes of this will be considered as i2c child busses.
  17. properties:
  18. $nodename:
  19. pattern: '^(i2c-?)?mux'
  20. '#address-cells':
  21. const: 1
  22. '#size-cells':
  23. const: 0
  24. patternProperties:
  25. '^i2c@[0-9a-f]+$':
  26. $ref: /schemas/i2c/i2c-controller.yaml
  27. unevaluatedProperties: false
  28. properties:
  29. reg:
  30. description: The mux selector sub-bus number for the child I2C bus.
  31. maxItems: 1
  32. additionalProperties: true
  33. examples:
  34. - |
  35. /*
  36. * An NXP pca9548 8 channel I2C multiplexer at address 0x70
  37. * with two NXP pca8574 GPIO expanders attached, one each to
  38. * ports 3 and 4.
  39. */
  40. i2c {
  41. #address-cells = <1>;
  42. #size-cells = <0>;
  43. i2c-mux@70 {
  44. compatible = "nxp,pca9548";
  45. reg = <0x70>;
  46. #address-cells = <1>;
  47. #size-cells = <0>;
  48. i2c@3 {
  49. #address-cells = <1>;
  50. #size-cells = <0>;
  51. reg = <3>;
  52. gpio@20 {
  53. compatible = "nxp,pca9555";
  54. gpio-controller;
  55. #gpio-cells = <2>;
  56. reg = <0x20>;
  57. };
  58. };
  59. i2c@4 {
  60. #address-cells = <1>;
  61. #size-cells = <0>;
  62. reg = <4>;
  63. gpio@20 {
  64. compatible = "nxp,pca9555";
  65. gpio-controller;
  66. #gpio-cells = <2>;
  67. reg = <0x20>;
  68. };
  69. };
  70. };
  71. };
  72. ...