From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sebastian Meyer <git-commit@mailhell.seb7.de>
Date: Mon, 3 Feb 2020 21:27:47 +0100
Subject: [PATCH] arm64: allwinner: h6: Enable USB3 for OrangePi Lite2

Signed-off-by: Sebastian Meyer <git-commit@mailhell.seb7.de>
---
 .../allwinner/sun50i-h6-orangepi-lite2.dts    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
@@ -11,6 +11,16 @@
 		serial1 = &uart1; /* BT-UART */
 	};
 
+	reg_usb_vbus: vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		startup-delay-us = <100000>;
+		gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 USB0-DRVVBUS */
+		enable-active-high;
+	};
+
 	wifi_pwrseq: pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		clocks = <&rtc 1>;
@@ -20,6 +30,10 @@
 	};
 };
 
+&dwc3 {
+	status = "okay";
+};
+
 &mmc1 {
 	vmmc-supply = <&reg_cldo2>;
 	vqmmc-supply = <&reg_bldo3>;
@@ -72,3 +86,8 @@
 		max-speed = <1500000>;
 	};
 };
+
+&usb3phy {
+	phy-supply = <&reg_usb_vbus>;
+	status = "okay";
+};
