OSDN Git Service

ARM: dts: sun7i: bananapi-m1-plus: Enable USB OTG
authorChen-Yu Tsai <wens@csie.org>
Tue, 15 Nov 2016 13:51:06 +0000 (21:51 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 22 Nov 2016 14:34:08 +0000 (15:34 +0100)
The Bananapi M1+ supports USB OTG, with the PMIC doing VBUS sensing.
Enable the USB OTG related functions.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts

index f9b85fc..532f1a1 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        gmac_power_pin_bpi_m1p: gmac_power_pin@0 {
                allwinner,pins = "PH23";
        regulator-name = "avcc";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
 &usbphy {
+       usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        /* VBUS on usb host ports are tied to DC5V and therefore always on */
        status = "okay";
 };