226109c09c5c654c1ee60400b453f5656a0166f9
[openwrt/staging/ynezz.git] /
1 From 37f6130ec39fe14e923d472746a51e6f06f761b7 Mon Sep 17 00:00:00 2001
2 From: Vivek Unune <npcomplete13@gmail.com>
3 Date: Mon, 9 Apr 2018 18:31:53 -0400
4 Subject: [PATCH] ARM: dts: BCM5301X: Make USB 3.0 PHY use MDIO PHY driver
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Currently, the USB 3.0 PHY in bcm5301x.dtsi uses platform driver which
10 requires register range "ccb-mii" <0x18003000 0x1000>. This range
11 overlaps with MDIO cmd and param registers (<0x18003000 0x8>).
12 Essentially, the platform driver partly acts like a MDIO bus driver,
13 hence to use of this register range.
14
15 In some Northstar devices like Linksys EA9500, secondary switch is
16 connected via external MDIO. The only way to access and configure the
17 external switch is via MDIO bus. When we enable the MDIO bus in it's
18 current state, the MDIO bus and any child buses fail to register because
19 of the register range overlap.
20
21 On Northstar, the USB 3.0 PHY is connected at address 0x10 on the
22 internal MDIO bus. This change moves the usb3_phy node and makes it a
23 child node of internal MDIO bus.
24
25 Thanks to Rafał Miłecki's commit af850e14a7ae ("phy: bcm-ns-usb3: add
26 MDIO driver using proper bus layer") the same USB 3.0 platform driver
27 can now act as USB 3.0 PHY MDIO driver.
28
29 Tested on Linksys Panamera (EA9500)
30
31 Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
32 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
33 ---
34 arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 4 +++
35 arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 4 +++
36 arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 4 +++
37 arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 +++
38 arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 4 +++
39 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 4 +++
40 arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 4 +++
41 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 4 +++
42 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 +++
43 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 +++
44 arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 +++
45 arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 4 +++
46 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 4 +++
47 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 4 +++
48 arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 +++
49 arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 4 +++
50 arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 4 +++
51 arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 4 +++
52 arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 4 +++
53 arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 4 +++
54 arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 4 +++
55 arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 4 +++
56 arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 4 +++
57 arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 4 +++
58 arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 4 +++
59 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 4 +++
60 arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 4 +++
61 arch/arm/boot/dts/bcm47094.dtsi | 7 +++--
62 arch/arm/boot/dts/bcm5301x.dtsi | 35 +++++++++++++++++-----
63 arch/arm/boot/dts/bcm94708.dts | 4 +++
64 arch/arm/boot/dts/bcm94709.dts | 4 +++
65 arch/arm/boot/dts/bcm953012er.dts | 4 +++
66 arch/arm/boot/dts/bcm953012hr.dts | 4 +++
67 arch/arm/boot/dts/bcm953012k.dts | 4 +++
68 34 files changed, 159 insertions(+), 11 deletions(-)
69
70 --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
71 +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
72 @@ -90,3 +90,7 @@
73 };
74 };
75 };
76 +
77 +&usb3_phy {
78 + status = "okay";
79 +};
80 --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
81 +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
82 @@ -80,3 +80,7 @@
83 };
84 };
85 };
86 +
87 +&usb3_phy {
88 + status = "okay";
89 +};
90 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
91 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
92 @@ -146,3 +146,7 @@
93 &spi_nor {
94 status = "okay";
95 };
96 +
97 +&usb3_phy {
98 + status = "okay";
99 +};
100 --- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
101 +++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
102 @@ -38,3 +38,7 @@
103 };
104 };
105 };
106 +
107 +&usb3_phy {
108 + status = "okay";
109 +};
110 --- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
111 +++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
112 @@ -57,3 +57,7 @@
113 &spi_nor {
114 status = "okay";
115 };
116 +
117 +&usb3_phy {
118 + status = "okay";
119 +};
120 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
121 +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
122 @@ -64,3 +64,7 @@
123 &spi_nor {
124 status = "okay";
125 };
126 +
127 +&usb3_phy {
128 + status = "okay";
129 +};
130 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
131 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
132 @@ -91,3 +91,7 @@
133 &spi_nor {
134 status = "okay";
135 };
136 +
137 +&usb3_phy {
138 + status = "okay";
139 +};
140 --- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
141 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
142 @@ -83,3 +83,7 @@
143 &spi_nor {
144 status = "okay";
145 };
146 +
147 +&usb3_phy {
148 + status = "okay";
149 +};
150 --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
151 +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
152 @@ -158,3 +158,7 @@
153 };
154 };
155 };
156 +
157 +&usb3_phy {
158 + status = "okay";
159 +};
160 --- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
161 +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
162 @@ -74,3 +74,7 @@
163 };
164 };
165 };
166 +
167 +&usb3_phy {
168 + status = "okay";
169 +};
170 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
171 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
172 @@ -118,3 +118,7 @@
173 };
174 };
175 };
176 +
177 +&usb3_phy {
178 + status = "okay";
179 +};
180 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
181 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
182 @@ -104,3 +104,7 @@
183 };
184 };
185 };
186 +
187 +&usb3_phy {
188 + status = "okay";
189 +};
190 --- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
191 +++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
192 @@ -57,3 +57,7 @@
193 &spi_nor {
194 status = "okay";
195 };
196 +
197 +&usb3_phy {
198 + status = "okay";
199 +};
200 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
201 +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
202 @@ -105,3 +105,7 @@
203 &spi_nor {
204 status = "okay";
205 };
206 +
207 +&usb3_phy {
208 + status = "okay";
209 +};
210 --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
211 +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
212 @@ -99,3 +99,7 @@
213 &usb2 {
214 vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
215 };
216 +
217 +&usb3_phy {
218 + status = "okay";
219 +};
220 --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
221 +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
222 @@ -62,3 +62,7 @@
223 };
224 };
225 };
226 +
227 +&usb3_phy {
228 + status = "okay";
229 +};
230 --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
231 +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
232 @@ -127,3 +127,7 @@
233 &spi_nor {
234 status = "okay";
235 };
236 +
237 +&usb3_phy {
238 + status = "okay";
239 +};
240 --- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
241 +++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
242 @@ -39,3 +39,7 @@
243 };
244 };
245 };
246 +
247 +&usb3_phy {
248 + status = "okay";
249 +};
250 --- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
251 +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
252 @@ -101,3 +101,7 @@
253 &usb3 {
254 vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
255 };
256 +
257 +&usb3_phy {
258 + status = "okay";
259 +};
260 --- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
261 +++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
262 @@ -182,3 +182,7 @@
263 &usb3 {
264 vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
265 };
266 +
267 +&usb3_phy {
268 + status = "okay";
269 +};
270 --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
271 +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
272 @@ -104,3 +104,7 @@
273 &spi_nor {
274 status = "okay";
275 };
276 +
277 +&usb3_phy {
278 + status = "okay";
279 +};
280 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
281 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
282 @@ -115,3 +115,7 @@
283 &spi_nor {
284 status = "okay";
285 };
286 +
287 +&usb3_phy {
288 + status = "okay";
289 +};
290 --- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
291 +++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
292 @@ -33,3 +33,7 @@
293 };
294 };
295 };
296 +
297 +&usb3_phy {
298 + status = "okay";
299 +};
300 --- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
301 +++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
302 @@ -60,3 +60,7 @@
303 &spi_nor {
304 status = "okay";
305 };
306 +
307 +&usb3_phy {
308 + status = "okay";
309 +};
310 --- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
311 +++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
312 @@ -60,3 +60,7 @@
313 &spi_nor {
314 status = "okay";
315 };
316 +
317 +&usb3_phy {
318 + status = "okay";
319 +};
320 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
321 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
322 @@ -100,3 +100,7 @@
323 &spi_nor {
324 status = "okay";
325 };
326 +
327 +&usb3_phy {
328 + status = "okay";
329 +};
330 --- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
331 +++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
332 @@ -91,3 +91,7 @@
333 };
334 };
335 };
336 +
337 +&usb3_phy {
338 + status = "okay";
339 +};
340 --- a/arch/arm/boot/dts/bcm47094.dtsi
341 +++ b/arch/arm/boot/dts/bcm47094.dtsi
342 @@ -7,9 +7,10 @@
343 #include "bcm4708.dtsi"
344
345 / {
346 - usb3_phy: usb3-phy {
347 - compatible = "brcm,ns-bx-usb3-phy";
348 - };
349 +};
350 +
351 +&usb3_phy {
352 + compatible = "brcm,ns-bx-usb3-phy";
353 };
354
355 &uart0 {
356 --- a/arch/arm/boot/dts/bcm5301x.dtsi
357 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
358 @@ -154,13 +154,6 @@
359 clock-names = "phy-ref-clk";
360 };
361
362 - usb3_phy: usb3-phy {
363 - compatible = "brcm,ns-ax-usb3-phy";
364 - reg = <0x18105000 0x1000>, <0x18003000 0x1000>;
365 - reg-names = "dmp", "ccb-mii";
366 - #phy-cells = <0>;
367 - };
368 -
369 axi@18000000 {
370 compatible = "brcm,bus-axi";
371 reg = <0x18000000 0x1000>;
372 @@ -359,7 +352,33 @@
373 reg = <0x18003000 0x8>;
374 #size-cells = <1>;
375 #address-cells = <0>;
376 - status = "disabled";
377 + };
378 +
379 + mdio-bus-mux {
380 + compatible = "mdio-mux-mmioreg";
381 + mdio-parent-bus = <&mdio>;
382 + #address-cells = <1>;
383 + #size-cells = <0>;
384 + reg = <0x18003000 0x4>;
385 + mux-mask = <0x200>;
386 +
387 + mdio@0 {
388 + reg = <0x0>;
389 + #address-cells = <1>;
390 + #size-cells = <0>;
391 +
392 + usb3_phy: usb3-phy@10 {
393 + compatible = "brcm,ns-ax-usb3-phy";
394 + reg = <0x10>;
395 + usb3-dmp-syscon = <&usb3_dmp>;
396 + #phy-cells = <0>;
397 + status = "disabled";
398 + };
399 + };
400 + };
401 +
402 + usb3_dmp: syscon@18105000 {
403 + reg = <0x18105000 0x1000>;
404 };
405
406 i2c0: i2c@18009000 {
407 --- a/arch/arm/boot/dts/bcm94708.dts
408 +++ b/arch/arm/boot/dts/bcm94708.dts
409 @@ -42,3 +42,7 @@
410 reg = <0x00000000 0x08000000>;
411 };
412 };
413 +
414 +&usb3_phy {
415 + status = "okay";
416 +};
417 --- a/arch/arm/boot/dts/bcm94709.dts
418 +++ b/arch/arm/boot/dts/bcm94709.dts
419 @@ -42,3 +42,7 @@
420 reg = <0x00000000 0x08000000>;
421 };
422 };
423 +
424 +&usb3_phy {
425 + status = "okay";
426 +};
427 --- a/arch/arm/boot/dts/bcm953012er.dts
428 +++ b/arch/arm/boot/dts/bcm953012er.dts
429 @@ -90,3 +90,7 @@
430 };
431 };
432 };
433 +
434 +&usb3_phy {
435 + status = "okay";
436 +};
437 --- a/arch/arm/boot/dts/bcm953012hr.dts
438 +++ b/arch/arm/boot/dts/bcm953012hr.dts
439 @@ -95,3 +95,7 @@
440 reg = <0x00700000 0x00900000>;
441 };
442 };
443 +
444 +&usb3_phy {
445 + status = "okay";
446 +};
447 --- a/arch/arm/boot/dts/bcm953012k.dts
448 +++ b/arch/arm/boot/dts/bcm953012k.dts
449 @@ -113,3 +113,7 @@
450 &uart1 {
451 status = "okay";
452 };
453 +
454 +&usb3_phy {
455 + status = "okay";
456 +};