From: Dongwoo Lee Date: Fri, 23 Jun 2017 06:50:36 +0000 (+0900) Subject: ARM: dts: exynos: Add usb-gpio-extcon support for dual-role operation for OdroidXU3 X-Git-Tag: accepted/tizen/unified/20190330.030053~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a9bda9a3292fe63710361feb6d344f692a72f1e;p=platform%2Fkernel%2Flinux-exynos.git ARM: dts: exynos: Add usb-gpio-extcon support for dual-role operation for OdroidXU3 This patch enables dual-role support of dwc3 by adding usb-gpio-extcon driver. Signed-off-by: Dongwoo Lee [mszyprow: added XU3lite support, rephrased commit subject] Signed-off-by: Marek Szyprowski --- diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index 445c6c5..96489f0 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi @@ -339,6 +339,14 @@ }; }; }; + + extcon_usbdrd: extcon_usbdrd { + compatible = "linux,extcon-usb-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&usbdrd_id &usbdrd_vbus>; + id-gpios = <&gpx1 1 GPIO_ACTIVE_HIGH>; + vbus-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>; + }; }; &adc { @@ -407,6 +415,20 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + usbdrd_id: usbdrd_id { + samsung,pins = "gpx1-1"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + usbdrd_vbus: usbdrd_vbus { + samsung,pins = "gpx3-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_1 { diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts index 03fa88c..b73cf3d 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts @@ -34,5 +34,6 @@ }; &usbdrd_dwc3_1 { - dr_mode = "peripheral"; + dr_mode = "otg"; + extcon = <&extcon_usbdrd>; }; diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts index 9ed6564..2df6af3 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts @@ -65,5 +65,6 @@ }; &usbdrd_dwc3_1 { - dr_mode = "peripheral"; + dr_mode = "otg"; + extcon = <&extcon_usbdrd>; };