gpio-mux.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. GPIO-based multiplexer controller bindings
  2. Define what GPIO pins are used to control a multiplexer. Or several
  3. multiplexers, if the same pins control more than one multiplexer.
  4. Required properties:
  5. - compatible : "gpio-mux"
  6. - mux-gpios : list of gpios used to control the multiplexer, least
  7. significant bit first.
  8. - #mux-control-cells : <0>
  9. * Standard mux-controller bindings as decribed in mux-controller.txt
  10. Optional properties:
  11. - idle-state : if present, the state the mux will have when idle. The
  12. special state MUX_IDLE_AS_IS is the default.
  13. The multiplexer state is defined as the number represented by the
  14. multiplexer GPIO pins, where the first pin is the least significant
  15. bit. An active pin is a binary 1, an inactive pin is a binary 0.
  16. Example:
  17. mux: mux-controller {
  18. compatible = "gpio-mux";
  19. #mux-control-cells = <0>;
  20. mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
  21. <&pioA 1 GPIO_ACTIVE_HIGH>;
  22. };
  23. adc-mux {
  24. compatible = "io-channel-mux";
  25. io-channels = <&adc 0>;
  26. io-channel-names = "parent";
  27. mux-controls = <&mux>;
  28. channels = "sync-1", "in", "out", "sync-2";
  29. };
  30. i2c-mux {
  31. compatible = "i2c-mux";
  32. i2c-parent = <&i2c1>;
  33. mux-controls = <&mux>;
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. i2c@0 {
  37. reg = <0>;
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. ssd1307: oled@3c {
  41. /* ... */
  42. };
  43. };
  44. i2c@3 {
  45. reg = <3>;
  46. #address-cells = <1>;
  47. #size-cells = <0>;
  48. pca9555: pca9555@20 {
  49. /* ... */
  50. };
  51. };
  52. };