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 248b018..ed9f89e 100644 (file)
        status = "okay";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 12d5e33..d853981 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "otg";
 };
index 4d59494..2cfea30 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index a1119cf..867e30f 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index b5667f1..9ef210f 100644 (file)
@@ -29,3 +29,7 @@
 &cvbs_vdac_port {
        status = "disabled";
 };
+
+&usb {
+       dr_mode = "host";
+};
index 6509c49..ecc9df7 100644 (file)
@@ -20,3 +20,7 @@
                reg = <0x0 0x0 0x0 0x40000000>;
        };
 };
+
+&usb {
+       dr_mode = "host";
+};
index dd729ac..6705c20 100644 (file)
@@ -24,3 +24,7 @@
 &ir {
        linux,rc-map-name = "rc-tanix-tx3mini";
 };
+
+&usb {
+       dr_mode = "host";
+};
index 440bc23..8bcdffd 100644 (file)
        pinctrl-0 = <&uart_ao_b_pins>;
        pinctrl-names = "default";
 };
+
+&usb {
+       dr_mode = "peripheral";
+};
index e8348b2..e493831 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 62dd878..f1acca5 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index 6ac678f..05cb2f5 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
 
 &usb2_phy0 {
index 259d863..95b301a 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 27eeab7..bff8ec2 100644 (file)
        vref-supply = <&vddio_ao18>;
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "peripheral";
 };
index c2bd4db..83eca3a 100644 (file)
        pinctrl-names = "default";
 };
 
-&usb0 {
+&usb {
        status = "okay";
+       dr_mode = "host";
 };
index 0bdf51d..d3fdba4 100644 (file)
@@ -39,3 +39,7 @@
 &ir {
        linux,rc-map-name = "rc-vega-s9x";
 };
+
+&usb {
+       dr_mode = "host";
+};
index b6f89f1..40e3e12 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 {