2
0

108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. From 504188183408fac0f61b59f5ed8ea1773fe43669 Mon Sep 17 00:00:00 2001
  2. From: Christian 'Ansuel' Marangi <[email protected]>
  3. Date: Wed, 15 Jun 2022 16:59:30 +0200
  4. Subject: [PATCH 2/2] ARM: dts: qcom: add MDIO dedicated controller node for
  5. ipq806x
  6. Add MDIO dedicated controller attached to gmac0 and fix rb3011 dts to
  7. correctly use the new tag.
  8. Signed-off-by: Christian 'Ansuel' Marangi <[email protected]>
  9. ---
  10. arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 134 +++++++++++-----------
  11. arch/arm/boot/dts/qcom-ipq8064.dtsi | 14 +++
  12. 2 files changed, 81 insertions(+), 67 deletions(-)
  13. --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
  14. +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
  15. @@ -25,73 +25,6 @@
  16. device_type = "memory";
  17. };
  18. - mdio0: mdio-0 {
  19. - status = "okay";
  20. - compatible = "virtual,mdio-gpio";
  21. - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
  22. - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  23. - #address-cells = <1>;
  24. - #size-cells = <0>;
  25. -
  26. - pinctrl-0 = <&mdio0_pins>;
  27. - pinctrl-names = "default";
  28. -
  29. - switch0: switch@10 {
  30. - compatible = "qca,qca8337";
  31. - #address-cells = <1>;
  32. - #size-cells = <0>;
  33. -
  34. - dsa,member = <0 0>;
  35. -
  36. - pinctrl-0 = <&sw0_reset_pin>;
  37. - pinctrl-names = "default";
  38. -
  39. - reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
  40. - reg = <0x10>;
  41. -
  42. - ports {
  43. - #address-cells = <1>;
  44. - #size-cells = <0>;
  45. -
  46. - switch0cpu: port@0 {
  47. - reg = <0>;
  48. - label = "cpu";
  49. - ethernet = <&gmac0>;
  50. - phy-mode = "rgmii-id";
  51. - fixed-link {
  52. - speed = <1000>;
  53. - full-duplex;
  54. - };
  55. - };
  56. -
  57. - port@1 {
  58. - reg = <1>;
  59. - label = "sw1";
  60. - };
  61. -
  62. - port@2 {
  63. - reg = <2>;
  64. - label = "sw2";
  65. - };
  66. -
  67. - port@3 {
  68. - reg = <3>;
  69. - label = "sw3";
  70. - };
  71. -
  72. - port@4 {
  73. - reg = <4>;
  74. - label = "sw4";
  75. - };
  76. -
  77. - port@5 {
  78. - reg = <5>;
  79. - label = "sw5";
  80. - };
  81. - };
  82. - };
  83. - };
  84. -
  85. mdio1: mdio-1 {
  86. status = "okay";
  87. compatible = "virtual,mdio-gpio";
  88. @@ -222,6 +155,73 @@
  89. status = "okay";
  90. };
  91. +&mdio0 {
  92. + status = "okay";
  93. + compatible = "virtual,mdio-gpio";
  94. + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
  95. + <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  96. + #address-cells = <1>;
  97. + #size-cells = <0>;
  98. +
  99. + pinctrl-0 = <&mdio0_pins>;
  100. + pinctrl-names = "default";
  101. +
  102. + switch0: switch@10 {
  103. + compatible = "qca,qca8337";
  104. + #address-cells = <1>;
  105. + #size-cells = <0>;
  106. +
  107. + dsa,member = <0 0>;
  108. +
  109. + pinctrl-0 = <&sw0_reset_pin>;
  110. + pinctrl-names = "default";
  111. +
  112. + reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
  113. + reg = <0x10>;
  114. +
  115. + ports {
  116. + #address-cells = <1>;
  117. + #size-cells = <0>;
  118. +
  119. + switch0cpu: port@0 {
  120. + reg = <0>;
  121. + label = "cpu";
  122. + ethernet = <&gmac0>;
  123. + phy-mode = "rgmii-id";
  124. + fixed-link {
  125. + speed = <1000>;
  126. + full-duplex;
  127. + };
  128. + };
  129. +
  130. + port@1 {
  131. + reg = <1>;
  132. + label = "sw1";
  133. + };
  134. +
  135. + port@2 {
  136. + reg = <2>;
  137. + label = "sw2";
  138. + };
  139. +
  140. + port@3 {
  141. + reg = <3>;
  142. + label = "sw3";
  143. + };
  144. +
  145. + port@4 {
  146. + reg = <4>;
  147. + label = "sw4";
  148. + };
  149. +
  150. + port@5 {
  151. + reg = <5>;
  152. + label = "sw5";
  153. + };
  154. + };
  155. + };
  156. +};
  157. +
  158. &gmac0 {
  159. status = "okay";
  160. --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
  161. +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
  162. @@ -476,6 +476,20 @@
  163. snps,blen = <16 0 0 0 0 0 0>;
  164. };
  165. + mdio0: mdio@37000000 {
  166. + #address-cells = <1>;
  167. + #size-cells = <0>;
  168. +
  169. + compatible = "qcom,ipq8064-mdio", "syscon";
  170. + reg = <0x37000000 0x200000>;
  171. + resets = <&gcc GMAC_CORE1_RESET>;
  172. + reset-names = "stmmaceth";
  173. + clocks = <&gcc GMAC_CORE1_CLK>;
  174. + clock-names = "stmmaceth";
  175. +
  176. + status = "disabled";
  177. + };
  178. +
  179. vsdcc_fixed: vsdcc-regulator {
  180. compatible = "regulator-fixed";
  181. regulator-name = "SDCC Power";