ARM: sun8i: a83t: cubietruck-plus: Enable onboard USB peripherals
authorChen-Yu Tsai <wens@csie.org>
Thu, 3 Aug 2017 08:14:10 +0000 (16:14 +0800)
committerChen-Yu Tsai <wens@csie.org>
Fri, 18 Aug 2017 16:25:24 +0000 (00:25 +0800)
The Cubietruck-plus has a GL830 USB-to-SATA bridge connected to EHCI0,
and a USB3503 HSIC USB 2.0 hub connected to EHCI1. The USB3503's I2C
control interface is not connected.

This patch enables both EHCI controllers, adds a device node for the
USB hub, and includes sunxi-common-regulators.dtsi for the VBUS
regulators. The existing reg_vcc3v3 is dropped as it is also available
in the set of common regulators. Other unused regulators are disabled.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts

index f583e5b9a1c8fe835da4042aba709558e17b8fa1..716a205c6dbbeca282efbe4498742634205ad8bd 100644 (file)
@@ -44,6 +44,7 @@
 
 /dts-v1/;
 #include "sun8i-a83t.dtsi"
+#include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
                };
        };
 
-       reg_vcc3v3: vcc3v3 {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc3v3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
+       usb-hub {
+               /* I2C is not connected */
+               compatible = "smsc,usb3503";
+               initial-mode = <1>; /* initialize in HUB mode */
+               disabled-ports = <1>;
+               intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+               reset-gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
+               connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
+               refclk-frequency = <19200000>;
        };
 
        sound {
        };
 };
 
+&ehci0 {
+       /* GL830 USB-to-SATA bridge here */
+       status = "okay";
+};
+
+&ehci1 {
+       /* USB3503 HSIC USB 2.0 hub here */
+       status = "okay";
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
        };
 };
 
+&reg_usb1_vbus {
+       gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+       status = "okay";
+};
+
+&reg_vcc3v0 {
+       status = "disabled";
+};
+
+&reg_vcc5v0 {
+       status = "disabled";
+};
+
 &spdif {
        status = "okay";
 };
        pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};