mdio-mux-gpio.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Properties for an MDIO bus multiplexer/switch controlled by GPIO pins.
  2. This is a special case of a MDIO bus multiplexer. One or more GPIO
  3. lines are used to control which child bus is connected.
  4. Required properties in addition to the generic multiplexer properties:
  5. - compatible : mdio-mux-gpio.
  6. - gpios : GPIO specifiers for each GPIO line. One or more must be specified.
  7. Example :
  8. /* The parent MDIO bus. */
  9. smi1: mdio@1180000001900 {
  10. compatible = "cavium,octeon-3860-mdio";
  11. #address-cells = <1>;
  12. #size-cells = <0>;
  13. reg = <0x11800 0x00001900 0x0 0x40>;
  14. };
  15. /*
  16. An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
  17. pair of GPIO lines. Child busses 2 and 3 populated with 4
  18. PHYs each.
  19. */
  20. mdio-mux {
  21. compatible = "mdio-mux-gpio";
  22. gpios = <&gpio1 3 0>, <&gpio1 4 0>;
  23. mdio-parent-bus = <&smi1>;
  24. #address-cells = <1>;
  25. #size-cells = <0>;
  26. mdio@2 {
  27. reg = <2>;
  28. #address-cells = <1>;
  29. #size-cells = <0>;
  30. phy11: ethernet-phy@1 {
  31. reg = <1>;
  32. marvell,reg-init = <3 0x10 0 0x5777>,
  33. <3 0x11 0 0x00aa>,
  34. <3 0x12 0 0x4105>,
  35. <3 0x13 0 0x0a60>;
  36. interrupt-parent = <&gpio>;
  37. interrupts = <10 8>; /* Pin 10, active low */
  38. };
  39. phy12: ethernet-phy@2 {
  40. reg = <2>;
  41. marvell,reg-init = <3 0x10 0 0x5777>,
  42. <3 0x11 0 0x00aa>,
  43. <3 0x12 0 0x4105>,
  44. <3 0x13 0 0x0a60>;
  45. interrupt-parent = <&gpio>;
  46. interrupts = <10 8>; /* Pin 10, active low */
  47. };
  48. phy13: ethernet-phy@3 {
  49. reg = <3>;
  50. marvell,reg-init = <3 0x10 0 0x5777>,
  51. <3 0x11 0 0x00aa>,
  52. <3 0x12 0 0x4105>,
  53. <3 0x13 0 0x0a60>;
  54. interrupt-parent = <&gpio>;
  55. interrupts = <10 8>; /* Pin 10, active low */
  56. };
  57. phy14: ethernet-phy@4 {
  58. reg = <4>;
  59. marvell,reg-init = <3 0x10 0 0x5777>,
  60. <3 0x11 0 0x00aa>,
  61. <3 0x12 0 0x4105>,
  62. <3 0x13 0 0x0a60>;
  63. interrupt-parent = <&gpio>;
  64. interrupts = <10 8>; /* Pin 10, active low */
  65. };
  66. };
  67. mdio@3 {
  68. reg = <3>;
  69. #address-cells = <1>;
  70. #size-cells = <0>;
  71. phy21: ethernet-phy@1 {
  72. reg = <1>;
  73. marvell,reg-init = <3 0x10 0 0x5777>,
  74. <3 0x11 0 0x00aa>,
  75. <3 0x12 0 0x4105>,
  76. <3 0x13 0 0x0a60>;
  77. interrupt-parent = <&gpio>;
  78. interrupts = <12 8>; /* Pin 12, active low */
  79. };
  80. phy22: ethernet-phy@2 {
  81. reg = <2>;
  82. marvell,reg-init = <3 0x10 0 0x5777>,
  83. <3 0x11 0 0x00aa>,
  84. <3 0x12 0 0x4105>,
  85. <3 0x13 0 0x0a60>;
  86. interrupt-parent = <&gpio>;
  87. interrupts = <12 8>; /* Pin 12, active low */
  88. };
  89. phy23: ethernet-phy@3 {
  90. reg = <3>;
  91. marvell,reg-init = <3 0x10 0 0x5777>,
  92. <3 0x11 0 0x00aa>,
  93. <3 0x12 0 0x4105>,
  94. <3 0x13 0 0x0a60>;
  95. interrupt-parent = <&gpio>;
  96. interrupts = <12 8>; /* Pin 12, active low */
  97. };
  98. phy24: ethernet-phy@4 {
  99. reg = <4>;
  100. marvell,reg-init = <3 0x10 0 0x5777>,
  101. <3 0x11 0 0x00aa>,
  102. <3 0x12 0 0x4105>,
  103. <3 0x13 0 0x0a60>;
  104. interrupt-parent = <&gpio>;
  105. interrupts = <12 8>; /* Pin 12, active low */
  106. };
  107. };
  108. };