mdio-mux-gpio.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/mdio-mux-gpio.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Properties for an MDIO bus multiplexer/switch controlled by GPIO pins.
  7. maintainers:
  8. - Andrew Lunn <andrew@lunn.ch>
  9. description:
  10. This is a special case of a MDIO bus multiplexer. One or more GPIO
  11. lines are used to control which child bus is connected.
  12. allOf:
  13. - $ref: /schemas/net/mdio-mux.yaml#
  14. properties:
  15. compatible:
  16. const: mdio-mux-gpio
  17. gpios:
  18. description:
  19. List of GPIOs used to control the multiplexer, least significant bit first.
  20. minItems: 1
  21. maxItems: 32
  22. required:
  23. - compatible
  24. - gpios
  25. unevaluatedProperties: false
  26. examples:
  27. - |
  28. /*
  29. An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
  30. pair of GPIO lines. Child busses 2 and 3 populated with 4
  31. PHYs each.
  32. */
  33. mdio-mux {
  34. compatible = "mdio-mux-gpio";
  35. gpios = <&gpio1 3 0>, <&gpio1 4 0>;
  36. mdio-parent-bus = <&smi1>;
  37. #address-cells = <1>;
  38. #size-cells = <0>;
  39. mdio@2 {
  40. reg = <2>;
  41. #address-cells = <1>;
  42. #size-cells = <0>;
  43. ethernet-phy@1 {
  44. reg = <1>;
  45. interrupt-parent = <&gpio>;
  46. interrupts = <10 8>; /* Pin 10, active low */
  47. };
  48. ethernet-phy@2 {
  49. reg = <2>;
  50. interrupt-parent = <&gpio>;
  51. interrupts = <10 8>; /* Pin 10, active low */
  52. };
  53. ethernet-phy@3 {
  54. reg = <3>;
  55. interrupt-parent = <&gpio>;
  56. interrupts = <10 8>; /* Pin 10, active low */
  57. };
  58. ethernet-phy@4 {
  59. reg = <4>;
  60. interrupt-parent = <&gpio>;
  61. interrupts = <10 8>; /* Pin 10, active low */
  62. };
  63. };
  64. mdio@3 {
  65. reg = <3>;
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. ethernet-phy@1 {
  69. reg = <1>;
  70. interrupt-parent = <&gpio>;
  71. interrupts = <12 8>; /* Pin 12, active low */
  72. };
  73. ethernet-phy@2 {
  74. reg = <2>;
  75. interrupt-parent = <&gpio>;
  76. interrupts = <12 8>; /* Pin 12, active low */
  77. };
  78. ethernet-phy@3 {
  79. reg = <3>;
  80. interrupt-parent = <&gpio>;
  81. interrupts = <12 8>; /* Pin 12, active low */
  82. };
  83. ethernet-phy@4 {
  84. reg = <4>;
  85. interrupt-parent = <&gpio>;
  86. interrupts = <12 8>; /* Pin 12, active low */
  87. };
  88. };
  89. };
  90. ...