ARM: dts: sun9i: Enable USB support on A80 Optimus board
authorChen-Yu Tsai <wens@csie.org>
Mon, 2 Feb 2015 22:22:03 +0000 (06:22 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 27 Apr 2015 06:20:18 +0000 (08:20 +0200)
On the Optimus board, all three USB hosts can be used.
HCI0 and HCI2 are available through the USB connector.
HCI1 is available with HSIC through 2 pins on the GPIO
expansion header.

This patch also adds a regulator for HCI2/USB3's VBUS.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun9i-a80-optimus.dts

index a3fed2b..e53f265 100644 (file)
                        gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>;
                };
        };
+
+       reg_usb3_vbus: usb3-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&usb3_vbus_pin_optimus>;
+               regulator-name = "usb3-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
 };
 
 &i2c3 {
        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
+&ohci0 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
 &pio {
        led_pins_optimus: led-pins@0 {
                allwinner,pins = "PH0", "PH1";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
        };
+
+       usb1_vbus_pin_optimus: usb1_vbus_pin@1 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb3_vbus_pin_optimus: usb3_vbus_pin@1 {
+               allwinner,pins = "PH5";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
 
 &mmc0 {
        status = "okay";
 };
 
+&reg_usb1_vbus {
+       pinctrl-0 = <&usb1_vbus_pin_optimus>;
+       gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        /* Enable internal pull-up */
        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
+
+&usbphy1 {
+       vbus-supply = <&reg_usb1_vbus>;
+       status = "okay";
+};
+
+&usbphy2 {
+       status = "okay";
+};
+
+&usbphy3 {
+       vbus-supply = <&reg_usb3_vbus>;
+       status = "okay";
+};