]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno Micro
authorHans de Goede <hdegoede@redhat.com>
Fri, 31 Jul 2015 12:53:36 +0000 (14:53 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 31 Jul 2015 16:57:25 +0000 (18:57 +0200)
Enable the otg/drc usb controller on the A10s OLinuxIno Micro.

Note the A10s OlinuxIno Micro always has some voltage on its otg power
pin, even if the usb-vbus0-regulator is disabled, the leaked voltage is
enough to make vbus-det always report 1, so we do not use vbus-det on
this board.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts

index 7b26e17146b892b937793d489d3167ef89f6bf3a..5a422c1ff725d875ceca0f2b61eeea696b117323 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
                allwinner,pins = "PG1";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PG12";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+       status = "okay";
 };
 
 &reg_usb1_vbus {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb0_vbus_pin_a {
+       allwinner,pins = "PG11";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
 };
-