Commit b67379a6 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Maxime Ripard

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: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 80ee72e7
...@@ -244,6 +244,7 @@ axp22x: pmic@68 { ...@@ -244,6 +244,7 @@ axp22x: pmic@68 {
reg = <0x68>; reg = <0x68>;
interrupt-parent = <&nmi_intc>; interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
x-powers,drive-vbus-en;
}; };
}; };
...@@ -302,6 +303,11 @@ &reg_dcdc5 { ...@@ -302,6 +303,11 @@ &reg_dcdc5 {
regulator-name = "vcc-dram"; regulator-name = "vcc-dram";
}; };
&reg_drivevbus {
regulator-name = "usb0-vbus";
status = "okay";
};
&reg_usb1_vbus { &reg_usb1_vbus {
gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
status = "okay"; status = "okay";
...@@ -326,12 +332,25 @@ &uart0 { ...@@ -326,12 +332,25 @@ &uart0 {
status = "okay"; status = "okay";
}; };
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usb_power_supply {
status = "okay";
};
&usb1_vbus_pin_a { &usb1_vbus_pin_a {
/* different pin from sunxi-common-regulators */ /* different pin from sunxi-common-regulators */
pins = "PH24"; pins = "PH24";
}; };
&usbphy { &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 = <&reg_drivevbus>;
usb1_vbus-supply = <&reg_usb1_vbus>; usb1_vbus-supply = <&reg_usb1_vbus>;
status = "okay"; status = "okay";
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment