uboot-d1: add bootloader for upcoming d1 target
[openwrt/staging/mans0n.git] / package / boot / uboot-d1 / patches / 0004-ARM-dts-sun6i-mixtile-loftq-Add-USB1-VBUS-regulator.patch
1 From 40a0ec0fdb6a110d69151de5480148772877f267 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Thu, 26 Aug 2021 20:39:33 -0500
4 Subject: [PATCH 04/90] ARM: dts: sun6i: mixtile-loftq: Add USB1 VBUS regulator
5
6 This board is configured with CONFIG_USB1_VBUS_PIN="PH24", but no
7 regulator exists in its device tree. Add the regulator, so USB will
8 continue to work when the PHY driver switches to using the regulator
9 uclass instead of a GPIO.
10
11 Update the device tree here because it does not exist in Linux.
12
13 Signed-off-by: Samuel Holland <samuel@sholland.org>
14 ---
15 arch/arm/dts/sun6i-a31-mixtile-loftq.dts | 17 +++++++++++++++++
16 1 file changed, 17 insertions(+)
17
18 --- a/arch/arm/dts/sun6i-a31-mixtile-loftq.dts
19 +++ b/arch/arm/dts/sun6i-a31-mixtile-loftq.dts
20 @@ -6,6 +6,9 @@
21 */
22
23 /dts-v1/;
24 +
25 +#include <dt-bindings/gpio/gpio.h>
26 +
27 #include "sun6i-a31.dtsi"
28
29 / {
30 @@ -19,6 +22,15 @@
31 chosen {
32 stdout-path = "serial0:115200n8";
33 };
34 +
35 + reg_usb1_vbus: usb1-vbus {
36 + compatible = "regulator-fixed";
37 + regulator-name = "usb1-vbus";
38 + regulator-min-microvolt = <5000000>;
39 + regulator-max-microvolt = <5000000>;
40 + enable-active-high;
41 + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
42 + };
43 };
44
45 &ehci0 {
46 @@ -56,3 +68,8 @@
47 pinctrl-0 = <&uart0_ph_pins>;
48 status = "okay";
49 };
50 +
51 +&usbphy {
52 + usb1_vbus-supply = <&reg_usb1_vbus>;
53 + status = "okay";
54 +};