1 From 504188183408fac0f61b59f5ed8ea1773fe43669 Mon Sep 17 00:00:00 2001
2 From: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
3 Date: Wed, 15 Jun 2022 16:59:30 +0200
4 Subject: [PATCH 2/2] ARM: dts: qcom: add MDIO dedicated controller node for
7 Add MDIO dedicated controller attached to gmac0 and fix rb3011 dts to
8 correctly use the new tag.
10 Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
12 arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts | 134 +++++++++++-----------
13 arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 14 +++
14 2 files changed, 81 insertions(+), 67 deletions(-)
16 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts
17 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts
19 device_type = "memory";
24 - compatible = "virtual,mdio-gpio";
25 - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
26 - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
27 - #address-cells = <1>;
30 - pinctrl-0 = <&mdio0_pins>;
31 - pinctrl-names = "default";
33 - switch0: switch@10 {
34 - compatible = "qca,qca8337";
38 - pinctrl-0 = <&sw0_reset_pin>;
39 - pinctrl-names = "default";
41 - reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
45 - #address-cells = <1>;
48 - switch0cpu: port@0 {
51 - ethernet = <&gmac0>;
52 - phy-mode = "rgmii-id";
64 - #address-cells = <1>;
69 - color = <LED_COLOR_ID_GREEN>;
70 - function = LED_FUNCTION_LAN;
71 - default-state = "keep";
81 - #address-cells = <1>;
86 - color = <LED_COLOR_ID_GREEN>;
87 - function = LED_FUNCTION_LAN;
88 - default-state = "keep";
98 - #address-cells = <1>;
103 - color = <LED_COLOR_ID_GREEN>;
104 - function = LED_FUNCTION_LAN;
105 - default-state = "keep";
115 - #address-cells = <1>;
120 - color = <LED_COLOR_ID_GREEN>;
121 - function = LED_FUNCTION_LAN;
122 - default-state = "keep";
132 - #address-cells = <1>;
137 - color = <LED_COLOR_ID_GREEN>;
138 - function = LED_FUNCTION_LAN;
139 - default-state = "keep";
149 compatible = "virtual,mdio-gpio";
150 @@ -222,6 +155,131 @@
156 + compatible = "virtual,mdio-gpio";
157 + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
158 + <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
159 + #address-cells = <1>;
162 + pinctrl-0 = <&mdio0_pins>;
163 + pinctrl-names = "default";
165 + switch0: switch@10 {
166 + compatible = "qca,qca8337";
168 + dsa,member = <0 0>;
170 + pinctrl-0 = <&sw0_reset_pin>;
171 + pinctrl-names = "default";
173 + reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
177 + #address-cells = <1>;
180 + switch0cpu: port@0 {
183 + ethernet = <&gmac0>;
184 + phy-mode = "rgmii-id";
196 + #address-cells = <1>;
201 + color = <LED_COLOR_ID_GREEN>;
202 + function = LED_FUNCTION_LAN;
203 + default-state = "keep";
213 + #address-cells = <1>;
218 + color = <LED_COLOR_ID_GREEN>;
219 + function = LED_FUNCTION_LAN;
220 + default-state = "keep";
230 + #address-cells = <1>;
235 + color = <LED_COLOR_ID_GREEN>;
236 + function = LED_FUNCTION_LAN;
237 + default-state = "keep";
247 + #address-cells = <1>;
252 + color = <LED_COLOR_ID_GREEN>;
253 + function = LED_FUNCTION_LAN;
254 + default-state = "keep";
264 + #address-cells = <1>;
269 + color = <LED_COLOR_ID_GREEN>;
270 + function = LED_FUNCTION_LAN;
271 + default-state = "keep";
282 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
283 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
288 + mdio0: mdio@37000000 {
289 + #address-cells = <1>;
292 + compatible = "qcom,ipq8064-mdio", "syscon";
293 + reg = <0x37000000 0x200000>;
294 + resets = <&gcc GMAC_CORE1_RESET>;
295 + reset-names = "stmmaceth";
296 + clocks = <&gcc GMAC_CORE1_CLK>;
297 + clock-names = "stmmaceth";
299 + status = "disabled";
302 gmac0: ethernet@37000000 {
303 device_type = "network";
304 compatible = "qcom,ipq806x-gmac", "snps,dwmac";