From 8f8ac761cae7fb568b5bbe8547af687276576eac Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Thu, 2 Apr 2026 18:00:05 +0800 Subject: [PATCH 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi Define the power input and the 4V power as fixed regulator supplies for the PMIC and USB Hub. Signed-off-by: Chukun Pan Signed-off-by: Linux RISC-V bot --- .../boot/dts/spacemit/k1-orangepi-r2s.dts | 19 +++++++++++++++++++ .../boot/dts/spacemit/k1-orangepi-rv2.dts | 19 +++++++++++++++++++ 2 files changed, 38 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 { diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts index 7b7331cb3c726f..929b70d384b556 100644 --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts @@ -33,6 +33,25 @@ default-state = "on"; }; }; + + 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>; + }; }; ð0 { From ddbf4e8eb09cd565997801f337390e3e616eb616 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Thu, 2 Apr 2026 18:00:06 +0800 Subject: [PATCH 2/3] 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"; +}; From 115d0940b5ad7d1307daa543c9cb32831cb9e993 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Thu, 2 Apr 2026 18:00:07 +0800 Subject: [PATCH 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2 Enable the DWC3 USB3.0 controller and its associated PHY on the OrangePi RV2. The onboard GENESYS GL3523 Hub provides 3 USB3 Type-A ports. Enable the corresponding VBUS regulator. Signed-off-by: Chukun Pan Signed-off-by: Linux RISC-V bot --- .../boot/dts/spacemit/k1-orangepi-rv2.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts index 929b70d384b556..ab835c30dd86c5 100644 --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts @@ -52,6 +52,20 @@ regulator-max-microvolt = <4000000>; vin-supply = <&vcc_5v0>; }; + + vcc5v0_usb30: regulator-vcc5v0-usb30 { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usb30"; + enable-active-high; + gpios = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v0>; + }; +}; + +&combo_phy { + status = "okay"; }; ð0 { @@ -111,3 +125,13 @@ pinctrl-0 = <&uart0_2_cfg>; status = "okay"; }; + +&usbphy2 { + status = "okay"; +}; + +&usb_dwc3 { + dr_mode = "host"; + vbus-supply = <&vcc5v0_usb30>; + status = "okay"; +};