From 8479467fe40120899bff092bdfd10f95657129a4 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 10 Mar 2016 20:11:41 +0530 Subject: ARM: dts: vf500/vf610-colibri: USB device/host switch using extcon gpio 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 Signed-off-by: Stefan Agner --- arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 12 ++++++++++++ arch/arm/boot/dts/vf-colibri.dtsi | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi index 7fc4db726ccf..a90a91fd2989 100644 --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi @@ -26,6 +26,14 @@ power-supply = <®_3v3>; }; + extcon_usbc_det: usbc_det { + compatible = "linux,extcon-usb-gpio"; + debounce = <25>; + id-gpio = <&gpio3 6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det>; + }; + reg_3v3: regulator-3v3 { compatible = "regulator-fixed"; regulator-name = "3.3V"; @@ -161,6 +169,10 @@ status = "okay"; }; +&usbdev0 { + extcon = <&extcon_usbc_det>, <&extcon_usbc_det>; +}; + &usbh1 { vbus-supply = <®_usbh_vbus>; }; diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi index bf2bdb4111f1..4319d9a0242b 100644 --- a/arch/arm/boot/dts/vf-colibri.dtsi +++ b/arch/arm/boot/dts/vf-colibri.dtsi @@ -141,6 +141,7 @@ &usbdev0 { disable-over-current; + dr_mode = "otg"; status = "okay"; }; @@ -222,7 +223,6 @@ VF610_PAD_PTB23__GPIO_93 0x22ed VF610_PAD_PTB26__GPIO_96 0x22ed VF610_PAD_PTB28__GPIO_98 0x22ed - VF610_PAD_PTC29__GPIO_102 0x22ed VF610_PAD_PTC30__GPIO_103 0x22ed VF610_PAD_PTA7__GPIO_134 0x22ed >; @@ -378,6 +378,12 @@ >; }; + pinctrl_usbc_det: gpio_usbc_det { + fsl,pins = < + VF610_PAD_PTC29__GPIO_102 0x22ed + >; + }; + pinctrl_usbh1_reg: gpio_usb_vbus { fsl,pins = < VF610_PAD_PTD4__GPIO_83 0x22ed -- cgit v1.2.3