From 6192ec5c77bfad55eda4fcbf2b6ea42d4781ff6a Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 10 Feb 2022 16:24:16 +0100 Subject: arm64: dts: imx8mp-verdin: fix usb device/host switching The PCB of the hardware version V1.1 has the USB ID pin issue fixed. Move USB_1_ID (pin 161) from USB1_ID to SD1_RESET_B. Support USB device/host switching using the ID pin as an extcon GPIO. Signed-off-by: Marcel Ziswiler --- arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi | 11 +++++++++++ arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 11 ++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'arch/arm64/boot/dts/freescale') diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi index a8d590b17486..830ff9c8d66b 100755 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi @@ -4,6 +4,13 @@ */ / { + extcon_usb_1_id: usb_1_id { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb_1_id>; + }; + /* Carrier Board Supply +V1.8 */ reg_1p8v: regulator-1p8v { compatible = "regulator-fixed"; @@ -216,6 +223,10 @@ status = "okay"; }; +&usb_dwc3_0 { + extcon = <&extcon_usb_1_id>; +}; + &usb3_1 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi index eab76b85d144..edf5b19a7257 100755 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -714,12 +714,10 @@ }; &usb_dwc3_0 { -// dr_mode = "otg"; - dr_mode = "peripheral"; + dr_mode = "otg"; hnp-disable; srp-disable; adp-disable; - usb-role-switch; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1_en>; }; @@ -1170,6 +1168,13 @@ >; }; + /* USB_1_ID */ + pinctrl_usb_1_id: usb1idgrp { + fsl,pins = < + MX8MP_IOMUXC_SD1_RESET_B__GPIO2_IO10 0x1c4 /* SODIMM 161 */ + >; + }; + pinctrl_usb2_en: usb2engrp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO14__USB2_PWR 0x184 /* SODIMM 185 */ -- cgit v1.2.3