arm64: dts: imx8mm-beacon: Enable USB Controllers
authorAdam Ford <aford173@gmail.com>
Thu, 4 Nov 2021 12:34:11 +0000 (07:34 -0500)
committerShawn Guo <shawnguo@kernel.org>
Mon, 22 Nov 2021 00:57:09 +0000 (08:57 +0800)
The i.MX8M Mini has two available USB controllers.  On the
imx8mm-beacon board, USB1 is routed to a mini-USB port with
OTG functionality.  USB2 is routed to a USB hub which has
three host-only ports connected to it.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi

index 6f5e636..4097a66 100644 (file)
                enable-active-high;
        };
 
+       reg_usbotg1: regulator-usbotg1 {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usb_otg1>;
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        reg_usdhc2_vmmc: regulator-usdhc2 {
                compatible = "regulator-fixed";
                regulator-name = "VSD_3V3";
        status = "okay";
 };
 
+&usbotg1 {
+       vbus-supply = <&reg_usbotg1>;
+       disable-over-current;
+       dr_mode="otg";
+       status = "okay";
+};
+
+&usbotg2 {
+       pinctrl-names = "default";
+       disable-over-current;
+       dr_mode="host";
+       status = "okay";
+};
+
+&usbphynop2 {
+       reset-gpios = <&pca6416_1 7 GPIO_ACTIVE_HIGH>;
+};
+
 &usdhc2 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
        pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
                >;
        };
 
+       pinctrl_reg_usb_otg1: usbotg1grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29     0x19
+               >;
+       };
+
        pinctrl_sai3: sai3grp {
                fsl,pins = <
                        MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC     0xd6