MLK-22336-2 dts: Add a new usb gadget node on imx6/7/7ulp/8/8mm
authorSherry Sun <sherry.sun@nxp.com>
Thu, 25 Jul 2019 21:20:26 +0000 (17:20 -0400)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:29 +0000 (00:56 -0700)
Since one dts node can only bind to one DM driver in uboot, for usbotg
node, we can not use it for both DM usb host driver and DM usb gadget
driver. So a new usb gadget node is added to each usbotg node, the
original usbotg node is bind to usb host driver as default, and the
new usb gadget node is bind to usb gadet driver as default.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 342adc8948def972dbd08b71009584745f7826f0)
(cherry picked from commit 6716cd87079cae70a5c521f83be292628403b9ab)

13 files changed:
arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi
arch/arm/dts/imx6qdl.dtsi
arch/arm/dts/imx6sl.dtsi
arch/arm/dts/imx6sll.dtsi
arch/arm/dts/imx6sx.dtsi
arch/arm/dts/imx6ul.dtsi
arch/arm/dts/imx7d.dtsi
arch/arm/dts/imx7s.dtsi
arch/arm/dts/imx7ulp.dtsi
arch/arm/dts/imx8mm-ddr4-evk-u-boot.dtsi
arch/arm/dts/imx8mm-evk-u-boot.dtsi
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi

index 05dd992..0194194 100644 (file)
@@ -7,6 +7,7 @@
 
        aliases {
                usbhost1 = &usbh3;
+               usbgadget0 = &usbg1;
        };
 
        usbh3: usbh3 {
                cdns3,usb = <&usbotg3>;
                status = "okay";
        };
+
+       usbg1: usbg1 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg1>;
+               status = "okay";
+               u-boot,dm-spl;
+       };
 };
 
 &{/imx8qm-pm} {
        u-boot,dm-spl;
 };
 
+&pd_conn_usbotg0 {
+       u-boot,dm-spl;
+};
+
+&pd_conn_usbotg0_phy {
+       u-boot,dm-spl;
+};
+
 &pd_conn_usb2 {
        u-boot,dm-spl;
 };
        u-boot,dm-spl;
 };
 
+&usbmisc1 {
+       u-boot,dm-spl;
+};
+
+&usbphy1 {
+       u-boot,dm-spl;
+};
+
+&usbotg1 {
+       u-boot,dm-spl;
+};
+
 &usbotg3 {
        phys = <&usbphynop1>;
        u-boot,dm-spl;
index 1f5837c..361ce44 100644 (file)
@@ -7,6 +7,7 @@
 
        aliases {
                usbhost1 = &usbh3;
+               usbgadget0 = &usbg1;
        };
 
        usbh3: usbh3 {
                cdns3,usb = <&usbotg3>;
                status = "okay";
        };
+
+       usbg1: usbg1 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg1>;
+               status = "okay";
+               u-boot,dm-spl;
+       };
+
 };
 
 &{/imx8qx-pm} {
        u-boot,dm-spl;
 };
 
+&pd_conn_usbotg0 {
+       u-boot,dm-spl;
+};
+
+&pd_conn_usbotg0_phy {
+       u-boot,dm-spl;
+};
+
 &pd_lsio_flexspi0 {
        u-boot,dm-spl;
 };
        u-boot,dm-spl;
 };
 
+&usbmisc1 {
+       u-boot,dm-spl;
+};
+
+&usbphy1 {
+       u-boot,dm-spl;
+};
+
+&usbotg1 {
+       u-boot,dm-spl;
+};
+
 &usbotg3 {
        phys = <&usbphynop1>;
        u-boot,dm-spl;
index da54c05..4171512 100644 (file)
@@ -50,6 +50,7 @@
                usbphy1 = &usbphy2;
                usb0 = &usbotg;
                usb1 = &usbh1;
+               usbgadget0 = &usbg1;
        };
 
        clocks {
                                reg = <0x0217c000 0x4000>;
                        };
 
-                       usbotg: usb@2184000 {
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg>;
+                               status = "okay";
+                       };
+
+                       usbotg: usb@02184000 {
                                compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
                                reg = <0x02184000 0x200>;
                                interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>;
index d241481..5de9e8e 100644 (file)
@@ -48,6 +48,8 @@
                usbphy1 = &usbphy2;
                usb0 = &usbotg1;
                usb1 = &usbotg2;
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
        };
 
        cpus {
                        reg = <0x02100000 0x100000>;
                        ranges;
 
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg1>;
+                               status = "okay";
+                       };
+
+                       usbg2: usbg2 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg2>;
+                               status = "okay";
+                       };
+
                        usbotg1: usb@02184000 {
                                compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
                                reg = <0x02184000 0x200>;
index 3b8ce21..0b97c29 100644 (file)
@@ -40,6 +40,8 @@
                usbphy1 = &usbphy2;
                usb0 = &usbotg1;
                usb1 = &usbotg2;
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
        };
 
        cpus {
                        reg = <0x02100000 0x100000>;
                        ranges;
 
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg1>;
+                               status = "okay";
+                       };
+
+                       usbg2: usbg2 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg2>;
+                               status = "okay";
+                       };
+
                        usbotg1: usb@02184000 {
                                compatible = "fsl,imx6sll-usb", "fsl,imx6ul-usb",
                                                "fsl,imx27-usb";
index e8d28f8..0b5d25d 100644 (file)
@@ -65,6 +65,8 @@
                usb0 = &usbotg1;
                usb1 = &usbotg2;
                pci0 = &pcie;
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
        };
 
        cpus {
                                };
                        };
 
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg1>;
+                               status = "okay";
+                       };
+
+                       usbg2: usbg2 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg2>;
+                               status = "okay";
+                       };
+
                        usbotg1: usb@2184000 {
                                compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
                                reg = <0x02184000 0x200>;
index 5644b0f..81c78ff 100644 (file)
@@ -52,6 +52,8 @@
                usbphy1 = &usbphy2;
                usb0 = &usbotg1;
                usb1 = &usbotg2;
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
        };
 
        cpus {
                                };
                        };
 
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg1>;
+                               status = "okay";
+                       };
+
+                       usbg2: usbg2 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg2>;
+                               status = "okay";
+                       };
+
                        usbotg1: usb@2184000 {
                                compatible = "fsl,imx6ul-usb", "fsl,imx27-usb";
                                reg = <0x02184000 0x200>;
index 48ac079..0b54fa2 100644 (file)
@@ -53,6 +53,7 @@
                spi4 = &ecspi4;
                ethernet1 = &fec2;
                usb1 = &usbotg2;
+               usbgadget1 = &usbg2;
        };
 
        cpus {
                status = "disabled";
        };
 
+       usbg2: usbg2 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg2>;
+               status = "okay";
+       };
+
        usbotg2: usb@30b20000 {
                compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
                reg = <0x30b20000 0x200>;
index 86c2359..49c45cb 100644 (file)
@@ -87,6 +87,7 @@
                spi3 = &ecspi4;
                ethernet0 = &fec1;
                usb0 = &usbotg1;
+               usbgadget0 = &usbg1;
        };
 
        cpus {
                                status = "disabled";
                        };
 
+                       usbg1: usbg1 {
+                               compatible = "fsl,imx27-usb-gadget";
+                               dr_mode = "peripheral";
+                               chipidea,usb = <&usbotg1>;
+                               status = "okay";
+                       };
+
                        usbotg1: usb@30b10000 {
                                compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
                                reg = <0x30b10000 0x200>;
index 7bcd2cc..9bb1396 100644 (file)
@@ -30,6 +30,7 @@
                serial3 = &lpuart7;
                usbphy0 = &usbphy1;
                usb0 = &usbotg1;
+               usbgadget0 = &usbg1;
                i2c4 = &lpi2c4;
                i2c5 = &lpi2c5;
                i2c6 = &lpi2c6;
                        status = "disabled";
                };
 
+               usbg1: usbg1 {
+                       compatible = "fsl,imx27-usb-gadget";
+                       dr_mode = "peripheral";
+                       chipidea,usb = <&usbotg1>;
+                       status = "okay";
+               };
+
                usbotg1: usb@40330000 {
                        compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb",
                                "fsl,imx27-usb";
index 7164c64..1aac7d4 100644 (file)
                u-boot,dm-spl;
        };
 
+       aliases {
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
+       };
+
+       usbg1: usbg1 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg1>;
+               status = "okay";
+       };
+
+       usbg2: usbg2 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg2>;
+               status = "okay";
+       };
+
        firmware {
                optee {
                        compatible = "linaro,optee-tz";
index 1841cc7..518000c 100644 (file)
                u-boot,dm-spl;
        };
 
+       aliases {
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
+       };
+
+       usbg1: usbg1 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg1>;
+               status = "okay";
+       };
+
+       usbg2: usbg2 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg2>;
+               status = "okay";
+       };
+
        firmware {
                optee {
                        compatible = "linaro,optee-tz";
index 8db7a25..919743b 100644 (file)
                u-boot,dm-spl;
        };
 
+       aliases {
+               usbgadget0 = &usbg1;
+               usbgadget1 = &usbg2;
+       };
+
+       usbg1: usbg1 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg1>;
+               status = "okay";
+       };
+
+       usbg2: usbg2 {
+               compatible = "fsl,imx27-usb-gadget";
+               dr_mode = "peripheral";
+               chipidea,usb = <&usbotg2>;
+               status = "okay";
+       };
+
        firmware {
                optee {
                        compatible = "linaro,optee-tz";