arm64: dts: imx8mq-nitrogen: add USB OTG support
authorAdrien Grassein <adrien.grassein@gmail.com>
Tue, 11 May 2021 19:35:58 +0000 (21:35 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 12 Jun 2021 08:17:02 +0000 (16:17 +0800)
Add the description for the USB OTG port.
The OTG port uses a dedicated regulator for vbus.

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts

index 81d2692..b46f45a 100644 (file)
                };
        };
 
+       reg_usb_otg_vbus: regulator-usb-otg-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usbotg_vbus>;
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        reg_vref_0v9: regulator-vref-0v9 {
                compatible = "regulator-fixed";
                regulator-name = "vref-0v9";
        status = "okay";
 };
 
+&usb_dwc3_0 {
+       dr_mode = "otg";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb3_0>;
+       status = "okay";
+};
+
+&usb3_phy0 {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       status = "okay";
+};
+
 &usdhc1 {
        assigned-clocks = <&clk IMX8MQ_CLK_USDHC1>;
        assigned-clock-rates = <400000000>;
                >;
        };
 
+       pinctrl_reg_usbotg_vbus: reg-usbotg-vbusgrp {
+               fsl,pins = <
+                       MX8MQ_IOMUXC_GPIO1_IO12_GPIO1_IO12      0x16
+               >;
+       };
+
        pinctrl_uart1: uart1grp {
                fsl,pins = <
                        MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX             0x45
                >;
        };
 
+       pinctrl_usb3_0: usb3-0grp {
+               fsl,pins = <
+                       MX8MQ_IOMUXC_GPIO1_IO13_USB1_OTG_OC             0x16
+               >;
+       };
+
        pinctrl_usdhc1: usdhc1grp {
                fsl,pins = <
                        MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK                 0x83