From: Chen-Yu Tsai Date: Thu, 24 Nov 2016 11:29:08 +0000 (+0800) Subject: ARM: dts: sun6i: hummingbird: Enable USB OTG X-Git-Tag: v4.14-rc1~1426^2~4^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b67379a6ac02f25a5b4ae940e3479e442aa19111;p=platform%2Fkernel%2Flinux-rpi.git ARM: dts: sun6i: hummingbird: Enable USB OTG The A31 Hummingbird has a mini USB OTG port, and uses GPIO pins from the SoC for ID pin and VBUS detection and VBUS control. The PMIC can also do VBUS detection and control. Here we prefer to use the PMIC's DRIVEVBUS function to control VBUS for USB OTG, as that is the hardware default. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts index b168d6d..9062d0f6 100644 --- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts +++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts @@ -244,6 +244,7 @@ reg = <0x68>; interrupt-parent = <&nmi_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + x-powers,drive-vbus-en; }; }; @@ -302,6 +303,11 @@ regulator-name = "vcc-dram"; }; +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + ®_usb1_vbus { gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ status = "okay"; @@ -326,12 +332,25 @@ status = "okay"; }; +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; + &usb1_vbus_pin_a { /* different pin from sunxi-common-regulators */ pins = "PH24"; }; &usbphy { + usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */ + usb0_vbus_det-gpio = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_drivevbus>; usb1_vbus-supply = <®_usb1_vbus>; status = "okay"; };