b760e0fcf2c82ee120a851a7f342c421d9052a4f
[openwrt/staging/xback.git] /
1 From 1c615401bddb1be21e1d375aaa071680f40f1ae2 Mon Sep 17 00:00:00 2001
2 From: Matthew Hagan <mnhagan88@gmail.com>
3 Date: Sun, 13 Jun 2021 10:46:37 +0100
4 Subject: [PATCH] ARM: dts: NSP: Move USB3 PHY to internal MDIO bus
5
6 This patch largely replicates Vivek Unune's patch "ARM: dts:
7 BCM5301X:Make usb3 phy use mdio phy driver"[1] for the NSP platform,
8 whereby we need to create an mdio-mux to facilitate switches
9 configured via external MDIO, in this case on the Meraki MX65.
10
11 However in doing so, we are creating an overlap with usb3_phy's
12 ccb-mii range. To resolve this, usb3_phy should be moved to a child
13 node of the internal MDIO bus. The result is heavily based upon Vivek's
14 patch. This has also been cross-referenced with Yendapally Reddy's
15 earlier work which utilised the subsequently dropped brcm,nsp-usb3-phy
16 driver: "[PATCH v2 4/4] arm: dts: nsp: Add USB nodes to device tree"
17 [2]. Finally, this change provides conformance to the bcm-ns-usb3-phy
18 documentation, utilising the required usb3-dmp-syscon property. Note
19 that support for the deprecated ccb-mii bindings has been dropped as of
20 "phy: phy-bcm-ns-usb3: drop support for deprecated DT binding"[3].
21
22 [1] https://lore.kernel.org/patchwork/patch/933971/
23 [2] https://www.spinics.net/lists/arm-kernel/msg555132.html
24 [3] https://lore.kernel.org/linux-devicetree/20201113113423.9466-1-zajec5@gmail.com/
25
26 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
27 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
28 ---
29 arch/arm/boot/dts/bcm-nsp.dtsi | 38 +++++++++++++++++++++++++++-------
30 1 file changed, 31 insertions(+), 7 deletions(-)
31
32 --- a/arch/arm/boot/dts/bcm-nsp.dtsi
33 +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
34 @@ -370,6 +370,35 @@
35 #address-cells = <1>;
36 };
37
38 + mdio-mux@32000 {
39 + compatible = "mdio-mux-mmioreg";
40 + reg = <0x32000 0x4>;
41 + mux-mask = <0x200>;
42 + #address-cells = <1>;
43 + #size-cells = <0>;
44 + mdio-parent-bus = <&mdio>;
45 +
46 + mdio_int: mdio@0 {
47 + reg = <0x0>;
48 + #address-cells = <1>;
49 + #size-cells = <0>;
50 +
51 + usb3_phy: usb3-phy@10 {
52 + compatible = "brcm,ns-bx-usb3-phy";
53 + reg = <0x10>;
54 + usb3-dmp-syscon = <&usb3_dmp>;
55 + #phy-cells = <0>;
56 + status = "disabled";
57 + };
58 + };
59 +
60 + mdio_ext: mdio@200 {
61 + reg = <0x200>;
62 + #address-cells = <1>;
63 + #size-cells = <0>;
64 + };
65 + };
66 +
67 rng: rng@33000 {
68 compatible = "brcm,bcm-nsp-rng";
69 reg = <0x33000 0x14>;
70 @@ -528,13 +557,8 @@
71 };
72 };
73
74 - usb3_phy: usb3-phy@104000 {
75 - compatible = "brcm,ns-bx-usb3-phy";
76 - reg = <0x104000 0x1000>,
77 - <0x032000 0x1000>;
78 - reg-names = "dmp", "ccb-mii";
79 - #phy-cells = <0>;
80 - status = "disabled";
81 + usb3_dmp: syscon@104000 {
82 + reg = <0x104000 0x1000>;
83 };
84 };
85