mdio-mux-gpio.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. compatible = "marvell,88e1149r";
  33. marvell,reg-init = <3 0x10 0 0x5777>,
  34. <3 0x11 0 0x00aa>,
  35. <3 0x12 0 0x4105>,
  36. <3 0x13 0 0x0a60>;
  37. interrupt-parent = <&gpio>;
  38. interrupts = <10 8>; /* Pin 10, active low */
  39. };
  40. phy12: ethernet-phy@2 {
  41. reg = <2>;
  42. compatible = "marvell,88e1149r";
  43. marvell,reg-init = <3 0x10 0 0x5777>,
  44. <3 0x11 0 0x00aa>,
  45. <3 0x12 0 0x4105>,
  46. <3 0x13 0 0x0a60>;
  47. interrupt-parent = <&gpio>;
  48. interrupts = <10 8>; /* Pin 10, active low */
  49. };
  50. phy13: ethernet-phy@3 {
  51. reg = <3>;
  52. compatible = "marvell,88e1149r";
  53. marvell,reg-init = <3 0x10 0 0x5777>,
  54. <3 0x11 0 0x00aa>,
  55. <3 0x12 0 0x4105>,
  56. <3 0x13 0 0x0a60>;
  57. interrupt-parent = <&gpio>;
  58. interrupts = <10 8>; /* Pin 10, active low */
  59. };
  60. phy14: ethernet-phy@4 {
  61. reg = <4>;
  62. compatible = "marvell,88e1149r";
  63. marvell,reg-init = <3 0x10 0 0x5777>,
  64. <3 0x11 0 0x00aa>,
  65. <3 0x12 0 0x4105>,
  66. <3 0x13 0 0x0a60>;
  67. interrupt-parent = <&gpio>;
  68. interrupts = <10 8>; /* Pin 10, active low */
  69. };
  70. };
  71. mdio@3 {
  72. reg = <3>;
  73. #address-cells = <1>;
  74. #size-cells = <0>;
  75. phy21: ethernet-phy@1 {
  76. reg = <1>;
  77. compatible = "marvell,88e1149r";
  78. marvell,reg-init = <3 0x10 0 0x5777>,
  79. <3 0x11 0 0x00aa>,
  80. <3 0x12 0 0x4105>,
  81. <3 0x13 0 0x0a60>;
  82. interrupt-parent = <&gpio>;
  83. interrupts = <12 8>; /* Pin 12, active low */
  84. };
  85. phy22: ethernet-phy@2 {
  86. reg = <2>;
  87. compatible = "marvell,88e1149r";
  88. marvell,reg-init = <3 0x10 0 0x5777>,
  89. <3 0x11 0 0x00aa>,
  90. <3 0x12 0 0x4105>,
  91. <3 0x13 0 0x0a60>;
  92. interrupt-parent = <&gpio>;
  93. interrupts = <12 8>; /* Pin 12, active low */
  94. };
  95. phy23: ethernet-phy@3 {
  96. reg = <3>;
  97. compatible = "marvell,88e1149r";
  98. marvell,reg-init = <3 0x10 0 0x5777>,
  99. <3 0x11 0 0x00aa>,
  100. <3 0x12 0 0x4105>,
  101. <3 0x13 0 0x0a60>;
  102. interrupt-parent = <&gpio>;
  103. interrupts = <12 8>; /* Pin 12, active low */
  104. };
  105. phy24: ethernet-phy@4 {
  106. reg = <4>;
  107. compatible = "marvell,88e1149r";
  108. marvell,reg-init = <3 0x10 0 0x5777>,
  109. <3 0x11 0 0x00aa>,
  110. <3 0x12 0 0x4105>,
  111. <3 0x13 0 0x0a60>;
  112. interrupt-parent = <&gpio>;
  113. interrupts = <12 8>; /* Pin 12, active low */
  114. };
  115. };
  116. };