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
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.
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].
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/
26 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
27 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
29 arch/arm/boot/dts/bcm-nsp.dtsi | 38 +++++++++++++++++++++++++++-------
30 1 file changed, 31 insertions(+), 7 deletions(-)
32 --- a/arch/arm/boot/dts/bcm-nsp.dtsi
33 +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
39 + compatible = "mdio-mux-mmioreg";
40 + reg = <0x32000 0x4>;
42 + #address-cells = <1>;
44 + mdio-parent-bus = <&mdio>;
48 + #address-cells = <1>;
51 + usb3_phy: usb3-phy@10 {
52 + compatible = "brcm,ns-bx-usb3-phy";
54 + usb3-dmp-syscon = <&usb3_dmp>;
56 + status = "disabled";
60 + mdio_ext: mdio@200 {
62 + #address-cells = <1>;
68 compatible = "brcm,bcm-nsp-rng";
74 - usb3_phy: usb3-phy@104000 {
75 - compatible = "brcm,ns-bx-usb3-phy";
76 - reg = <0x104000 0x1000>,
78 - reg-names = "dmp", "ccb-mii";
80 - status = "disabled";
81 + usb3_dmp: syscon@104000 {
82 + reg = <0x104000 0x1000>;