Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: exynos: Enable DWC2 dual-role support on OdroidU3+ boards

MicroUSB port on OdroidU3+ boards can operate both as peripheral or as
host port. Till now it was configured as pheriperal only port, but it
turned out that the DWC2 driver code already handles everything needed to
support USB role-switch, so switch it to dual-role (OTG) mode. This has
no effect on OdroidU3 (without 'plus') and OdroidX2, which doesn't have
USB needed ID pin and VBUS wiring. Those will still operate correctly in
pheriperal mode only.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Link: https://lore.kernel.org/r/20201103140214.21690-1-m.szyprowski@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

authored by

Marek Szyprowski and committed by
Krzysztof Kozlowski
007fda30 b04544ac

+18 -1
-1
arch/arm/boot/dts/exynos4412-odroid-common.dtsi
··· 256 256 }; 257 257 258 258 &hsotg { 259 - dr_mode = "peripheral"; 260 259 status = "okay"; 261 260 vusb_d-supply = <&ldo15_reg>; 262 261 vusb_a-supply = <&ldo12_reg>;
+14
arch/arm/boot/dts/exynos4412-odroidu3.dts
··· 21 21 reg = <0x40000000 0x7FF00000>; 22 22 }; 23 23 24 + vbus_otg_reg: regulator-1 { 25 + compatible = "regulator-fixed"; 26 + regulator-name = "VBUS_VDD_5.0V"; 27 + regulator-min-microvolt = <5000000>; 28 + regulator-max-microvolt = <5000000>; 29 + gpio = <&gpl2 0 GPIO_ACTIVE_HIGH>; 30 + enable-active-high; 31 + }; 32 + 24 33 leds { 25 34 compatible = "gpio-leds"; 26 35 led1 { ··· 112 103 &ehci { 113 104 phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; 114 105 phy-names = "hsic0", "hsic1"; 106 + }; 107 + 108 + &hsotg { 109 + dr_mode = "otg"; 110 + vbus-supply = <&vbus_otg_reg>; 115 111 }; 116 112 117 113 &sound {
+4
arch/arm/boot/dts/exynos4412-odroidx.dts
··· 76 76 }; 77 77 }; 78 78 79 + &hsotg { 80 + dr_mode = "peripheral"; 81 + }; 82 + 79 83 &mshc_0 { 80 84 vqmmc-supply = <&buck8_reg>; 81 85 };