Re: [PATCH] arm64: dts: meson-s4-s805x2: add 12V/3.3V/1.8V/vddcpu nodes for Regulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 07/11/2022 03:11, Chao Zhang wrote:
From: "chao.zhang" <chao.zhang@xxxxxxxxxxx>

Add 12V/3.3V/1.8V/vddcpu nodes for Regulator on Amlogic S4 SoCs.

Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@xxxxxxxxxxxx>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20221004-up-aml-fix-spi-v4-3-0342d8e10c49@xxxxxxxxxxxx
Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>

I think you did a bad copy paste because those lines comes from another already applied commit.

Please add your own Signed-off-by.

---
  .../dts/amlogic/meson-s4-s805x2-aq222.dts     | 85 +++++++++++++++++++
  arch/arm64/boot/dts/amlogic/meson-s4.dtsi     |  4 +
  2 files changed, 89 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
index 8ffbcb2b1ac5..80c959766b79 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
@@ -22,6 +22,91 @@ memory@0 {
  		device_type = "memory";
  		reg = <0x0 0x0 0x0 0x40000000>;
  	};
+	main_12v: regulator-main_12v {
+		compatible = "regulator-fixed";
+		regulator-name = "12V";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-always-on;
+	};
+
+	vddao_3v3: regulator-vddao_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDAO_3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&main_12v>;
+		regulator-always-on;
+	};
+
+	vddio_ao1v8: regulator-vddio_ao1v8 {
+	       compatible = "regulator-fixed";
+	       regulator-name = "VDDIO_AO1V8";
+	       regulator-min-microvolt = <1800000>;
+	       regulator-max-microvolt = <1800000>;
+	       vin-supply = <&vddao_3v3>;
+	       regulator-always-on;
+	};
+
+	vddcpu: regulator-vddcpu {
+		/*
+		 * SY8120B1ABC DC/DC Regulator.
+		 */
+		compatible = "pwm-regulator";
+
+		regulator-name = "VDDCPU";
+		regulator-min-microvolt = <689000>;
+		regulator-max-microvolt = <1049000>;
+
+		vin-supply = <&main_12v>;
+
+		pwms = <&pwm_ij 1 1500 0>;

Without the PWM node this won't apply.

+		pwm-dutycycle-range = <100 0>;
+
+		regulator-boot-on;
+		regulator-always-on;
+		max-duty-cycle = <1500>;
+		/* Voltage Duty-Cycle */
+		voltage-table = <1049000 0>,
+				<1039000 3>,
+				<1029000 6>,
+				<1019000 9>,
+				<1009000 12>,
+				<999000 14>,
+				<989000 17>,
+				<979000 20>,
+				<969000 23>,
+				<959000 26>,
+				<949000 29>,
+				<939000 31>,
+				<929000 34>,
+				<919000 37>,
+				<909000 40>,
+				<899000 43>,
+				<889000 45>,
+				<879000 48>,
+				<869000 51>,
+				<859000 54>,
+				<849000 56>,
+				<839000 59>,
+				<829000 62>,
+				<819000 65>,
+				<809000 68>,
+				<799000 70>,
+				<789000 73>,
+				<779000 76>,
+				<769000 79>,
+				<759000 81>,
+				<749000 84>,
+				<739000 87>,
+				<729000 89>,
+				<719000 92>,
+				<709000 95>,
+				<699000 98>,
+				<689000 100>;

This is wrong, the regulator-min-microvolt and regulator-max-microvolt + pwm-dutycycle-range is enough.

+		status = "okay";
+	};
+
}; diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
index ad50cba42d19..405a5af9ac1d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
@@ -17,6 +17,7 @@ cpu0: cpu@0 {
  			compatible = "arm,cortex-a35";
  			reg = <0x0 0x0>;
  			enable-method = "psci";
+			cpu-supply = <&vddcpu>;
  		};
cpu1: cpu@1 {
@@ -24,6 +25,7 @@ cpu1: cpu@1 {
  			compatible = "arm,cortex-a35";
  			reg = <0x0 0x1>;
  			enable-method = "psci";
+			cpu-supply = <&vddcpu>;
  		};
cpu2: cpu@2 {
@@ -31,6 +33,7 @@ cpu2: cpu@2 {
  			compatible = "arm,cortex-a35";
  			reg = <0x0 0x2>;
  			enable-method = "psci";
+			cpu-supply = <&vddcpu>;
  		};
cpu3: cpu@3 {
@@ -38,6 +41,7 @@ cpu3: cpu@3 {
  			compatible = "arm,cortex-a35";
  			reg = <0x0 0x3>;
  			enable-method = "psci";
+			cpu-supply = <&vddcpu>;
  		};
  	};

Without a clock, this is useless.

Neil




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux