ARM: dts: BCM5301X: Make USB 3.0 PHY use MDIO PHY driver
authorVivek Unune <npcomplete13@gmail.com>
Mon, 9 Apr 2018 22:31:53 +0000 (18:31 -0400)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 9 Jul 2018 15:12:11 +0000 (08:12 -0700)
Currently, the USB 3.0 PHY in bcm5301x.dtsi uses platform driver which
requires register range "ccb-mii" <0x18003000 0x1000>. This range
overlaps with MDIO cmd and param registers (<0x18003000 0x8>).
Essentially, the platform driver partly acts like a MDIO bus driver,
hence to use of this register range.

In some Northstar devices like Linksys EA9500, secondary switch is
connected via external MDIO. The only way to access and configure the
external switch is via MDIO bus. When we enable the MDIO bus in it's
current state, the MDIO bus and any child buses fail to register because
of the register range overlap.

On Northstar, the USB 3.0 PHY is connected at address 0x10 on the
internal MDIO bus. This change moves the usb3_phy node and makes it a
child node of internal MDIO bus.

Thanks to Rafał Miłecki's commit af850e14a7ae ("phy: bcm-ns-usb3: add
MDIO driver using proper bus layer") the same USB 3.0 platform driver
can now act as USB 3.0 PHY MDIO driver.

Tested on Linksys Panamera (EA9500)

Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
34 files changed:
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
arch/arm/boot/dts/bcm4708-netgear-r6250.dts
arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
arch/arm/boot/dts/bcm4709-netgear-r7000.dts
arch/arm/boot/dts/bcm4709-netgear-r8000.dts
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
arch/arm/boot/dts/bcm47094-linksys-panamera.dts
arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
arch/arm/boot/dts/bcm47094-netgear-r8500.dts
arch/arm/boot/dts/bcm47094.dtsi
arch/arm/boot/dts/bcm5301x.dtsi
arch/arm/boot/dts/bcm94708.dts
arch/arm/boot/dts/bcm94709.dts
arch/arm/boot/dts/bcm953012er.dts
arch/arm/boot/dts/bcm953012hr.dts
arch/arm/boot/dts/bcm953012k.dts

index ff2e551b9058448e4fd889ee11e5f12f88914666..79d454ff3be4205f9cb816f7c5a819f91c6e140f 100644 (file)
@@ -90,3 +90,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 3bcc03788f38f8f89e135712e5e7c2cc272e8005..99365bb8c41ed39cce31583a2e7a3ae78113bfa7 100644 (file)
@@ -80,3 +80,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index a587384f8e401ecea027400f35acda26defedc8f..bc330b1f6de094f0cd4bd94623f5ee929a337188 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 6c8f0ad823326c56250cfa06fa95e3c00d5ae633..258d2b251900cd4b6ade3a6198b24a71655f6d23 100644 (file)
@@ -38,3 +38,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index ebda45fe9ea4d4905467c4ea7892926bc8dda5eb..e7fdaed99bd0acd0607b5caf8cbbebb4aab0528f 100644 (file)
@@ -57,3 +57,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 9dd0e22c906afb4b6740a7e99c1fbcfc34a5a691..42bafc6440130be6f729b1f69f1228b7cc72659e 100644 (file)
@@ -64,3 +64,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index d7c34fa72b4b7525303ba5e06b93e0c9c00b4b82..dce35eb79dbe55c3a14e4e8993b2c58a368c544c 100644 (file)
@@ -91,3 +91,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 2642494c97a1bf99238c40ff0bd877b37c57b96b..b7a024b7951bcada9c3eae17087048f0b2609020 100644 (file)
@@ -83,3 +83,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index e7b09b7b7d25700d841841e56c3de720b0ceabde..f7f834cd3448d0b4f7ea54869285a50f9455d409 100644 (file)
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 16314fcc6e568cdfa580bd0f235297aa60817d3e..76a2bab3bc6f519644389da2b84147955fe4e4ba 100644 (file)
@@ -74,3 +74,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 328aa90240ce7346079695a3b8bf8d5425d1626d..69e3570e03dd2c207cc6ad4b4f27d9c2420415d4 100644 (file)
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 8ea46eed26e231e803f8b085523f5f53b853ebeb..0f6f0fe13bfb461f12cb9d9abfb9edfd00c71be1 100644 (file)
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 5eeac7302329605fadff558c0fc8fdc2b7ab9301..f7708974499671bc989ef1003f7e9dc7d3ebc151 100644 (file)
@@ -57,3 +57,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index da4d9ec62fc65e9fa72dc798453d78a1828938c5..4d427863756fefcfafa1bfba5efd35f19bce477a 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index c94c732188fbe05c51cd331c1f89bb118b8812c2..5f663f848db1fabb66c0fd8eb376f9601481296a 100644 (file)
@@ -99,3 +99,7 @@
 &usb2 {
        vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 22271818f901f428d99418fc7dfd40f00e684221..2033411240c78ce9ffdf0c70d36a7b9b3dbfb703 100644 (file)
@@ -62,3 +62,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 79a9633ec4174c78e23ca3b3ca63b670b676290e..77d1687b4228b60950628de95a4f7d14c0b81325 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index db744a5e122da7ddf7a921c086e91d810ba9ab32..983149b55269c3be51227a4b645f9a8c9a9e843f 100644 (file)
@@ -39,3 +39,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 9e267d38df4c4d2e4631de4b1297826226f74c46..ca41481b44bd1ff296b0de84dec67868a053225e 100644 (file)
 &usb3 {
        vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
 };
+
+&usb3_phy {
+       status = "okay";
+};
index d266131652addd105eb8750255a2f825a6c724a6..aa69e656d395367fad0fc3beeb1633463ac9bd46 100644 (file)
 &usb3 {
        vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
 };
+
+&usb3_phy {
+       status = "okay";
+};
index f5bf6586ae07e9e73d6b442f36c2decf33d54073..c7143a9daa1a961c1c013ec688c5c15c9dd4d127 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index d173bcd93b918bc37d4d280b934487109c13c03b..03c1ab188576fd84862da334dac560d533f23bbc 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index f47afe36d8579f378ca09a9d3d9838505359d08d..cbe8ffef72307ca23403e19e34bfd1b7e7be706d 100644 (file)
@@ -33,3 +33,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index a5cef51cfe4f31b601eedb218043c74c9505aa64..3e5e9972cd976b061e3a9a97a381683aa3bf120f 100644 (file)
@@ -60,3 +60,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 7496aabf8f77ca591d5ae94e85481e5a472b6e43..7acbecd429502cc6b336279fab55ac3e4435e3fd 100644 (file)
@@ -60,3 +60,7 @@
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 53aaa5212610fb6efe8b42a50fa00c7ec6c24078..f4558d9d276956128abc7a936ea763187455002c 100644 (file)
 &spi_nor {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 0e718edc065afb001f8c5b6b30b5cf3d8f94adbe..30719380b6c0e1af3b3a7d1468c2e4a1444a2b88 100644 (file)
@@ -91,3 +91,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 4840a782fc053266257438c44529bc432b22a9c5..f7c3e274b354b8c3ff5946fe36164953aa7a408e 100644 (file)
@@ -7,9 +7,10 @@
 #include "bcm4708.dtsi"
 
 / {
-       usb3_phy: usb3-phy {
-               compatible = "brcm,ns-bx-usb3-phy";
-       };
+};
+
+&usb3_phy {
+       compatible = "brcm,ns-bx-usb3-phy";
 };
 
 &uart0 {
index 9a076c409f4ed35fcf5fbe79807ede6e7e8466d5..096fb7681fa21d4a7f65935030835a684b93ba2f 100644 (file)
                clock-names = "phy-ref-clk";
        };
 
-       usb3_phy: usb3-phy {
-               compatible = "brcm,ns-ax-usb3-phy";
-               reg = <0x18105000 0x1000>, <0x18003000 0x1000>;
-               reg-names = "dmp", "ccb-mii";
-               #phy-cells = <0>;
-       };
-
        axi@18000000 {
                compatible = "brcm,bus-axi";
                reg = <0x18000000 0x1000>;
                reg = <0x18003000 0x8>;
                #size-cells = <1>;
                #address-cells = <0>;
-               status = "disabled";
+       };
+
+       mdio-bus-mux {
+               compatible = "mdio-mux-mmioreg";
+               mdio-parent-bus = <&mdio>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x18003000 0x4>;
+               mux-mask = <0x200>;
+
+               mdio@0 {
+                       reg = <0x0>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       usb3_phy: usb3-phy@10 {
+                               compatible = "brcm,ns-ax-usb3-phy";
+                               reg = <0x10>;
+                               usb3-dmp-syscon = <&usb3_dmp>;
+                               #phy-cells = <0>;
+                               status = "disabled";
+                       };
+               };
+       };
+
+       usb3_dmp: syscon@18105000 {
+               reg = <0x18105000 0x1000>;
        };
 
        i2c0: i2c@18009000 {
index 2e08c895f2818cefbb799a5011190bfd724c0225..934f07adfe3c00b025097cfc4cb911ddfa061645 100644 (file)
@@ -42,3 +42,7 @@
                reg = <0x00000000 0x08000000>;
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index c37616c67edcc0810d46c93bfcb78eacdf05c5ed..31e4dd098776a490e0f0578f94e4c12697e0776f 100644 (file)
@@ -42,3 +42,7 @@
                reg = <0x00000000 0x08000000>;
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 40e694bfe5cabedfbda67e6632fc388214ccad2e..17f63c7a04374ab1f23909c318cb01f56a16966f 100644 (file)
@@ -90,3 +90,7 @@
                };
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 3076e81699cf86d01b19b5206036392fe1234e67..11b0f5ed99e6fc977c23dd38e6db1c61323467d6 100644 (file)
@@ -95,3 +95,7 @@
                reg = <0x00700000 0x00900000>;
        };
 };
+
+&usb3_phy {
+       status = "okay";
+};
index 79c168e2714b7e6c3c4490f180d1c44ebd38f0ea..e798055d6989d374609fd3cc49da44b0ea01ccb4 100644 (file)
 &uart1 {
        status = "okay";
 };
+
+&usb3_phy {
+       status = "okay";
+};