[PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2

Han Gao posted 7 patches 1 week ago
[PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2
Posted by Han Gao 1 week ago
Define a 3.3v fixed voltage regulator to be used by PCIe on the
OrangePi RV2. On this platform, this regulator is always on.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
 arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index c0a0c96f2ac4..a370dd35e9bc 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -23,6 +23,16 @@ chosen {
 		stdout-path = "serial0";
 	};
 
+	pcie_vcc_3v3: pcie-vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "PCIE_VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	reg_dc_in: dc-in-12v {
 		compatible = "regulator-fixed";
 		regulator-name = "dc_in_12v";
-- 
2.47.3
Re: [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2
Posted by Chukun Pan 4 days, 6 hours ago
Hi,

> Define a 3.3v fixed voltage regulator to be used by PCIe on the
> OrangePi RV2. On this platform, this regulator is always on.

(...)

> +		regulator-always-on;
> +		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;

Why is this regulator always on?
It is clearly controlled by gpio.

Thanks,
Chukun