From cf86d072a45f1490d447aebe8677a740164ac5fb Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 8 Sep 2016 15:53:12 +0530 Subject: ARM: dts: imx7d/imx7s-colibri: Enable usb device/host switch using extcon Use USBC_DET feature of standard Colibri SODIMM pin 137 for USB device/host switching using the generic extcon USB gpio implementation. Signed-off-by: Sanchayan Maity [remove pin from FEC and fixed pinmux assignment] Signed-off-by: Stefan Agner --- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 15 +++++++++++++++ arch/arm/boot/dts/imx7-colibri.dtsi | 4 +--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi index ebb16f32cbdd..75e0b5e28dae 100644 --- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi @@ -36,6 +36,14 @@ gpio-key,wakeup; }; }; + + extcon_usbc_det: usbc_det { + compatible = "linux,extcon-usb-gpio"; + debounce = <25>; + id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det>; + }; }; &bl { @@ -251,6 +259,7 @@ }; &usbotg1 { + extcon = <&extcon_usbc_det>; vbus-supply = <®_usb_otg2_vbus>; status = "okay"; }; @@ -291,6 +300,12 @@ MX7D_PAD_GPIO1_IO10__GPIO1_IO10 0x14 >; }; + + pinctrl_usbc_det: gpio_usbc_det { + fsl,pins = < + MX7D_PAD_ENET1_CRS__GPIO7_IO14 0x74 + >; + }; }; }; diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index db7fdb6a0ebd..8af1835198a5 100644 --- a/arch/arm/boot/dts/imx7-colibri.dtsi +++ b/arch/arm/boot/dts/imx7-colibri.dtsi @@ -405,7 +405,6 @@ pinctrl_enet1: enet1grp { fsl,pins = < - MX7D_PAD_ENET1_CRS__GPIO7_IO14 0x14 MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x73 MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x73 MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x73 @@ -432,7 +431,6 @@ pinctrl_enet1_sleep: enet1sleepgrp { fsl,pins = < - MX7D_PAD_ENET1_CRS__GPIO7_IO14 0x4 MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x3 MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x3 MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x3 @@ -737,5 +735,5 @@ }; &usbotg1 { - dr_mode = "host"; + dr_mode = "otg"; }; -- cgit v1.2.3