From 786074d2674ff3623c560f578bddcb6f66b01e73 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Fri, 10 Apr 2026 18:00:09 +0800 Subject: [PATCH 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Define the power input and the 4V power as fixed regulator supplies. Signed-off-by: Chukun Pan Signed-off-by: Linux RISC-V bot --- .../boot/dts/spacemit/k1-orangepi-r2s.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts index de75f6aac74055..409a6db269ae21 100644 --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts @@ -21,6 +21,25 @@ chosen { stdout-path = "serial0"; }; + + vcc_5v0: regulator-vcc-5v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc_5v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc4v0: regulator-vcc4v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc4v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <4000000>; + vin-supply = <&vcc_5v0>; + }; }; &emmc { From 66516475627d67568aa6221dbe18cbd820046f81 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Fri, 10 Apr 2026 18:00:10 +0800 Subject: [PATCH 2/2] riscv: dts: spacemit: enable USB3 on OrangePi R2S Enable the DWC3 USB3.0 controller and its associated PHY on the OrangePi R2S. The USB regulator provides VBUS for USB2 and USB3 ports, but the USB2 ports are handled by a separate controller. Signed-off-by: Chukun Pan Signed-off-by: Linux RISC-V bot --- .../boot/dts/spacemit/k1-orangepi-r2s.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts index 409a6db269ae21..bc68721e626357 100644 --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts @@ -40,6 +40,20 @@ regulator-max-microvolt = <4000000>; vin-supply = <&vcc_5v0>; }; + + vcc5v0_usb: regulator-vcc5v0-usb { + compatible = "regulator-fixed"; + enable-active-high; + gpios = <&gpio K1_GPIO(126) GPIO_ACTIVE_HIGH>; + regulator-name = "vcc5v0_usb"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v0>; + }; +}; + +&combo_phy { + status = "okay"; }; &emmc { @@ -109,3 +123,13 @@ pinctrl-0 = <&uart0_2_cfg>; status = "okay"; }; + +&usbphy2 { + status = "okay"; +}; + +&usb_dwc3 { + dr_mode = "host"; + vbus-supply = <&vcc5v0_usb>; + status = "okay"; +};