arm64: dts: amlogic: use the new USB control driver for GXL and GXM
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 16 Apr 2020 12:19:06 +0000 (14:19 +0200)
committerFelipe Balbi <balbi@kernel.org>
Mon, 25 May 2020 08:09:38 +0000 (11:09 +0300)
Add the correcly architectured USB Glue node and adapt all the Amlogic
GXL and GXM board to the new organization.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
16 files changed:
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-phicomm-n1.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905w-p281.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts
arch/arm64/boot/dts/amlogic/meson-gxm.dtsi

index 248b018c83d575e85a1f6318492ea50850220e55..ed9f89ee86a82760763c5247bd2e12090fad7ce7 100644 (file)
        status = "okay";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 12d5e333e5f2c2f94143badb65ab00022dfdfb82..d853981f1ab5c8ef34f2f891aca30dbb9bfa79c1 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "otg";
 };
index 4d5949496596697a5d2aa1d21b8aa4106d866b88..2cfea3094f6c942ca737fc8690f3030eaa04370a 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index a1119cfb0280c3e1f38eebd885cb3ae3e61a2713..867e30f1d62b8d6d8ac3501e579750d0c8465e94 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index b5667f1fb2c8f8fd7f551576ce4115d52f1065d6..9ef210f17b4aae71be8b29fb206b00a4658538d5 100644 (file)
@@ -29,3 +29,7 @@
 &cvbs_vdac_port {
        status = "disabled";
 };
+
+&usb {
+       dr_mode = "host";
+};
index 6509c4950950ba1c5dc36fbd45b9e0e817c300dc..ecc9df7ca023147f779e07763368748f78d22c3e 100644 (file)
@@ -20,3 +20,7 @@
                reg = <0x0 0x0 0x0 0x40000000>;
        };
 };
+
+&usb {
+       dr_mode = "host";
+};
index dd729ac2300dac36404a7e31ed2f3b3b406ca85e..6705c2082a7845302e07053a41ea1fb2d99b8489 100644 (file)
@@ -24,3 +24,7 @@
 &ir {
        linux,rc-map-name = "rc-tanix-tx3mini";
 };
+
+&usb {
+       dr_mode = "host";
+};
index 440bc23c734268cd4638fb33ee063c748f51c487..8bcdffdf55d084d1e7bb7c86b60995e167f79e59 100644 (file)
        pinctrl-0 = <&uart_ao_b_pins>;
        pinctrl-names = "default";
 };
+
+&usb {
+       dr_mode = "peripheral";
+};
index e8348b2728db576cf8260b9fcc1c171d6f48f409..e493831a80f067d7c8122634bf7f6ada894c4f0b 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 62dd87821ce51408285f545a8ec95b8a498776bf..f1acca5c443426544cff268c0fddb4a82c426aea 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index 6ac678f88bd89c1b349424146f1d9efd4830a231..05cb2f5e5c36280dda87cd79f2757c0c311f9276 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 259d8639939059fd1e6bd3ca1e7563caec4c0c21..95b301a7c7252639d0469387471e89f53ef61456 100644 (file)
        compatible = "amlogic,meson-gxl";
 
        soc {
-               usb0: usb@c9000000 {
-                       status = "disabled";
-                       compatible = "amlogic,meson-gxl-dwc3";
+               usb: usb@d0078080 {
+                       compatible = "amlogic,meson-gxl-usb-ctrl";
+                       reg = <0x0 0xd0078080 0x0 0x20>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <2>;
                        #size-cells = <2>;
                        ranges;
 
-                       clocks = <&clkc CLKID_USB>;
-                       clock-names = "usb_general";
+                       clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1_DDR_BRIDGE>;
+                       clock-names = "usb_ctrl", "ddr";
                        resets = <&reset RESET_USB_OTG>;
-                       reset-names = "usb_otg";
 
-                       dwc3: dwc3@c9000000 {
+                       dr_mode = "otg";
+
+                       phys = <&usb2_phy0>, <&usb2_phy1>;
+                       phy-names = "usb2-phy0", "usb2-phy1";
+
+                       dwc2: usb@c9100000 {
+                               compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
+                               reg = <0x0 0xc9100000 0x0 0x40000>;
+                               interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clkc CLKID_USB1>;
+                               clock-names = "otg";
+                               phys = <&usb2_phy1>;
+                               dr_mode = "peripheral";
+                               g-rx-fifo-size = <192>;
+                               g-np-tx-fifo-size = <128>;
+                               g-tx-fifo-size = <128 128 16 16 16>;
+                       };
+
+                       dwc3: usb@c9000000 {
                                compatible = "snps,dwc3";
                                reg = <0x0 0xc9000000 0x0 0x100000>;
                                interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
                                dr_mode = "host";
                                maximum-speed = "high-speed";
                                snps,dis_u2_susphy_quirk;
-                               phys = <&usb3_phy>, <&usb2_phy0>, <&usb2_phy1>;
                        };
                };
 
                reset-names = "phy";
                status = "okay";
        };
-
-       usb3_phy: phy@78080 {
-               compatible = "amlogic,meson-gxl-usb3-phy";
-               #phy-cells = <0>;
-               reg = <0x0 0x78080 0x0 0x20>;
-               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&clkc CLKID_USB>, <&clkc_AO CLKID_AO_CEC_32K>;
-               clock-names = "phy", "peripheral";
-               resets = <&reset RESET_USB_OTG>, <&reset RESET_USB_OTG>;
-               reset-names = "phy", "peripheral";
-               status = "okay";
-       };
 };
 
 &efuse {
index 27eeab71ec772e74f47d499b4762d1bdb9292028..bff8ec2c1c70ce1d13367533c8390ed3c13c99c3 100644 (file)
        vref-supply = <&vddio_ao18>;
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "peripheral";
 };
index c2bd4dbbf38c5408a2fbe3b34de0c4e8224d81cb..83eca3af44ce7be077408b409c684c49bdb69098 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index 0bdf51d041ae2dcc844e492bf77c5595d41464fa..d3fdba4da9a61ab3eea640c118214c50504670e7 100644 (file)
@@ -39,3 +39,7 @@
 &ir {
        linux,rc-map-name = "rc-vega-s9x";
 };
+
+&usb {
+       dr_mode = "host";
+};
index b6f89f108e2829ec94e734eff0f130c74f2d2d68..40e3e123e05b5dd7b01fe61930401e7e490e21ed 100644 (file)
        compatible = "amlogic,meson-gxm-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
 };
 
-&dwc3 {
-       phys = <&usb3_phy>, <&usb2_phy0>, <&usb2_phy1>, <&usb2_phy2>;
+&usb {
+       compatible = "amlogic,meson-gxm-usb-ctrl";
+
+       phy-names = "usb2-phy0", "usb2-phy1", "usb2-phy2";
+       phys = <&usb2_phy0>, <&usb2_phy1>, <&usb2_phy2>;
 };
 
 &vdec {