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
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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.
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.
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.
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.
29 Tested on Linksys Panamera (EA9500)
31 Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
32 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
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(-)
70 --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
71 +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
80 --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
81 +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
90 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
91 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
100 --- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
101 +++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
110 --- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
111 +++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
120 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
121 +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
130 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
131 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
140 --- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
141 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
150 --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
151 +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
160 --- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
161 +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
170 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
171 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
180 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
181 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
190 --- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
191 +++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
200 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
201 +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
210 --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
211 +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
214 vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
220 --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
221 +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
230 --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
231 +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
240 --- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
241 +++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
250 --- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
251 +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts
254 vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
260 --- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
261 +++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
264 vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
270 --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
271 +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
280 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
281 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
290 --- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
291 +++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
300 --- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
301 +++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
310 --- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
311 +++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
320 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
321 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
330 --- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
331 +++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts
340 --- a/arch/arm/boot/dts/bcm47094.dtsi
341 +++ b/arch/arm/boot/dts/bcm47094.dtsi
343 #include "bcm4708.dtsi"
346 - usb3_phy: usb3-phy {
347 - compatible = "brcm,ns-bx-usb3-phy";
352 + compatible = "brcm,ns-bx-usb3-phy";
356 --- a/arch/arm/boot/dts/bcm5301x.dtsi
357 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
359 clock-names = "phy-ref-clk";
362 - usb3_phy: usb3-phy {
363 - compatible = "brcm,ns-ax-usb3-phy";
364 - reg = <0x18105000 0x1000>, <0x18003000 0x1000>;
365 - reg-names = "dmp", "ccb-mii";
370 compatible = "brcm,bus-axi";
371 reg = <0x18000000 0x1000>;
373 reg = <0x18003000 0x8>;
375 #address-cells = <0>;
376 - status = "disabled";
380 + compatible = "mdio-mux-mmioreg";
381 + mdio-parent-bus = <&mdio>;
382 + #address-cells = <1>;
384 + reg = <0x18003000 0x4>;
385 + mux-mask = <0x200>;
389 + #address-cells = <1>;
392 + usb3_phy: usb3-phy@10 {
393 + compatible = "brcm,ns-ax-usb3-phy";
395 + usb3-dmp-syscon = <&usb3_dmp>;
397 + status = "disabled";
402 + usb3_dmp: syscon@18105000 {
403 + reg = <0x18105000 0x1000>;
407 --- a/arch/arm/boot/dts/bcm94708.dts
408 +++ b/arch/arm/boot/dts/bcm94708.dts
410 reg = <0x00000000 0x08000000>;
417 --- a/arch/arm/boot/dts/bcm94709.dts
418 +++ b/arch/arm/boot/dts/bcm94709.dts
420 reg = <0x00000000 0x08000000>;
427 --- a/arch/arm/boot/dts/bcm953012er.dts
428 +++ b/arch/arm/boot/dts/bcm953012er.dts
437 --- a/arch/arm/boot/dts/bcm953012hr.dts
438 +++ b/arch/arm/boot/dts/bcm953012hr.dts
440 reg = <0x00700000 0x00900000>;
447 --- a/arch/arm/boot/dts/bcm953012k.dts
448 +++ b/arch/arm/boot/dts/bcm953012k.dts