Skip to contentSkip to conversation

arm64: dts: rockchip: Fix min voltage for rk3399-firefly vdd_log

PATCH In review Kever Yang 7 participants 26 messages Nov 11, 2019 – Nov 18, 2019

Subsystems (2)
lore
Share & tools
lore

Kever Yang

author
#0 lore raw

PATCH 1/3 arm64: dts: rockchip: Fix min voltage for rk3399-firefly vdd_log

The min/max value of vdd_log is decide by pwm IO voltage and its resistors, the rk3399-firefly board's pwm regulator circuit is designed for IO voltage at 1.8V, while the board actually use 3.0V for IO, which at last lead to the min-microvolt to '430mV' instead of '800mV'.

---

 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -1
index c706db0ee9ec..92de83dd4dbc 100644
@@ -206,7 +206,7 @@
 		regulator-name = "vdd_log";
 		regulator-always-on;
 		regulator-boot-on;
-		regulator-min-microvolt = <800000>;
+		regulator-min-microvolt = <430000>;
 		regulator-max-microvolt = <1400000>;
 		vin-supply = <&vcc_sys>;
 	};
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 arm64: dts: rk3399-rock960: add vdd_log

Add vdd_log node according to rock960 schematic V13.

---

 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +12 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
 		regulator-always-on;
 		vin-supply = <&vcc5v0_sys>;
 	};
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
+		vin-supply = <&vcc_sys>;
+	};
 };
 
 &cpu_l0 {
Signature · 1 line
2.17.1
Acked-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

Hi Kever,

Quoted 16 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

---

 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +0 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
 		regulator-always-on;
 		vin-supply = <&vcc5v0_sys>;
 	};

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +10 -0
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

Other than that,

Thanks,
Mani

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
 };
 
 &cpu_l0 {
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

Quoted 5 lines · Manivannan Sadhasivam

Hi Kever,

Quoted 2 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

Forgot to mention that rk3399-rock960.dtsi is common for both Rock960 Model A and Ficus boards. So the commit message should mention it clearly. Otherwise people will get confused that the patch is only affecting Rock960 boards.

Thanks,
Mani

Quoted 41 lines
Quoted 14 lines

---

 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +0 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
 		regulator-always-on;
 		vin-supply = <&vcc5v0_sys>;
 	};

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +10 -0
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

Other than that,

Thanks,
Mani

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
 };
 
 &cpu_l0 {
Signature · 1 line
2.17.1
author
#4 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

In reply to Manivannan Sadhasivam
Quoted 22 lines · Manivannan Sadhasivam

Hi Kever,

Quoted 19 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

---

  arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
  1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +3 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
  		regulator-always-on;
  		vin-supply = <&vcc5v0_sys>;
  	};
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +7 -0
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

The default value is 0.9V when pwm-regulator is not enabled, and this 'init-microvolt' suppose to set the

init value when pwm-regulator is enabled. I set this to 950mV because Peter report that he experience

the system hang during Fedora boot  up, and update the vdd_log to 950mV can fix the issue due to

engineer measure on another rk3399 board puma-Q7.

Thanks,

- Kever

Quoted 15 lines

Other than that,

Thanks,
Mani

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
  };
 
  &cpu_l0 {
Signature · 1 line
2.17.1
#5 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

Quoted 37 lines · Kever Yang
Quoted 22 lines · Manivannan Sadhasivam

Hi Kever,

Quoted 19 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

---

  arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
  1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +3 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
  		regulator-always-on;
  		vin-supply = <&vcc5v0_sys>;
  	};
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +7 -0
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

The default value is 0.9V when pwm-regulator is not enabled, and this 'init-microvolt' suppose to set the

Quoted 8 lines

init value when pwm-regulator is enabled. I set this to 950mV because Peter report that he experience

the system hang during Fedora boot  up, and update the vdd_log to 950mV can fix the issue due to

engineer measure on another rk3399 board puma-Q7.

okay. Previously we had post-boot hang issue on Rock960 Model A boards when the performance governor was set as default. So the vdd_log node was removed from the devicetree. Have you tested that case also?

Here is the commit:
13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")

thanks,
Mani

Quoted 21 lines

Thanks,

- Kever

Quoted 14 lines

Other than that,

Thanks,
Mani

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
  };
  &cpu_l0 {
Signature · 1 line
2.17.1
author
#6 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

Hi Manivannan,

Quoted 42 lines · Manivannan Sadhasivam
Quoted 41 lines · Kever Yang
Quoted 22 lines · Manivannan Sadhasivam

Hi Kever,

Quoted 19 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

---

   arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
   1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +3 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
   		regulator-always-on;
   		vin-supply = <&vcc5v0_sys>;
   	};
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +7 -0
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

The default value is 0.9V when pwm-regulator is not enabled, and this 'init-microvolt' suppose to set the

init value when pwm-regulator is enabled. I set this to 950mV because Peter report that he experience

the system hang during Fedora boot  up, and update the vdd_log to 950mV can fix the issue due to

Quoted 8 lines
Quoted 2 lines

engineer measure on another rk3399 board puma-Q7.

okay. Previously we had post-boot hang issue on Rock960 Model A boards when the performance governor was set as default. So the vdd_log node was removed from the devicetree. Have you tested that case also?

Here is the commit:
13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")

For rk3399, the kernel does not touch this regulator, it should be take care by bootloader.

So I think we need to update both U-Boot and kernel.

Thanks,

- Kever

Quoted 21 lines

thanks,
Mani

Quoted 18 lines

Thanks,

- Kever

Quoted 13 lines

Other than that,

Thanks,
Mani

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
   };
   &cpu_l0 {
Signature · 1 line
2.17.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

Re: [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log

Hi Kever,

Quoted 51 lines · Kever Yang

Hi Manivannan,

Quoted 48 lines · Manivannan Sadhasivam
Quoted 35 lines · Kever Yang
Quoted 22 lines · Manivannan Sadhasivam

Hi Kever,

Quoted 19 lines · Kever Yang

Add vdd_log node according to rock960 schematic V13.

---

   arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
   1 file changed, 12 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +3 -0
index c7d48d41e184..73afee257115 100644
@@ -76,6 +76,18 @@
   		regulator-always-on;
   		vin-supply = <&vcc5v0_sys>;
   	};
+
+	vdd_log: vdd-log {
+		compatible = "pwm-regulator";
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi line 88

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +7 -0
+		pwms = <&pwm2 0 25000 1>;
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <800000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;

The default value seems to be 0.9v as per both Rock960 and Ficus schematics.

The default value is 0.9V when pwm-regulator is not enabled, and this 'init-microvolt' suppose to set the

Quoted 8 lines

init value when pwm-regulator is enabled. I set this to 950mV because Peter report that he experience

the system hang during Fedora boot  up, and update the vdd_log to 950mV can fix the issue due to

engineer measure on another rk3399 board puma-Q7.

okay. Previously we had post-boot hang issue on Rock960 Model A boards when the performance governor was set as default. So the vdd_log node was removed from the devicetree. Have you tested that case also?

Quoted 9 lines
Quoted 2 lines

Here is the commit:
13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")

For rk3399, the kernel does not touch this regulator, it should be take care by bootloader.

So I think we need to update both U-Boot and kernel.

Hmm, okay. I will try to test these patches soon and share the observation here.

Thanks,
Mani

Quoted 28 lines

Thanks,

- Kever

Quoted 21 lines

thanks,
Mani

Quoted 18 lines

Thanks,

- Kever

Quoted 13 lines

Other than that,

Thanks,
Mani

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +2 -0
+		vin-supply = <&vcc_sys>;
+	};
   };
   &cpu_l0 {
Signature · 1 line
2.17.1
author
#8 lore raw

PATCH 3/3 arm64: dts: rk3399: Add init voltage for vdd_log

In reply to Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

 arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
 9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
 		regulator-name = "vdd_center";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <430000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
 		regulator-name = "vdd_log";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vsys_3v3>;
 	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc3v3_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
index 1bc1579674e5..f8e2cb8c0624 100644
@@ -133,6 +133,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
Signature · 1 line
2.17.1
#9 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Quoted 8 lines · Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I think it's a good idea to include this setting in the main dts for the boards (not in u-boot specific additions as is done now). But there is (for some reason?) no documented binding for regulator-init-microvolt in linux.

Regards,
Soeren

Quoted 125 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

 arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
 9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
 		regulator-name = "vdd_center";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <430000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
 		regulator-name = "vdd_log";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vsys_3v3>;
 	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc3v3_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
index 1bc1579674e5..f8e2cb8c0624 100644
@@ -133,6 +133,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
author
#10 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Quoted 6 lines · Soeren Moch
Quoted 5 lines · Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Quoted 7 lines
Quoted 3 lines

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I think it's a good idea to include this setting in the main dts for the boards (not in u-boot specific additions as is done now). But there is (for some reason?) no documented binding for regulator-init-microvolt in linux.

Ohh, I forgot the kernel driver does not support this property.

@Heiko, can we add this 'regulator-init-microvolt' without driver support but adding document for

it at dt-binding?

Thanks,

- Kever

Quoted 119 lines

Regards,
Soeren

Quoted 116 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

  arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
  9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
  		regulator-name = "vdd_center";
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		regulator-always-on;
  		regulator-boot-on;
  		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <430000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
  		regulator-name = "vdd_log";
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		regulator-always-on;
  		regulator-boot-on;
  	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vsys_3v3>;
  	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc5v0_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc3v3_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc5v0_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0 -0
index 1bc1579674e5..f8e2cb8c0624 100644
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi line 139

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
@@ -133,6 +133,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#11 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Hi Kever,

Am Dienstag, 12. November 2019, 09:04:49 CET schrieb Kever Yang:

Quoted 17 lines · Soeren Moch
Quoted 6 lines · Kever Yang
Quoted 5 lines

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Quoted 7 lines
Quoted 3 lines

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I think it's a good idea to include this setting in the main dts for the boards (not in u-boot specific additions as is done now). But there is (for some reason?) no documented binding for regulator-init-microvolt in linux.

Quoted 6 lines

Ohh, I forgot the kernel driver does not support this property.

@Heiko, can we add this 'regulator-init-microvolt' without driver support but adding document for

it at dt-binding?

In theory yes, but you would still need to get DT maintainers and Mark Brown (regulator maintainer) involved before that.

Especially as this is a individual property you will need to have a good excuse why you're not implementing it in the kernel as well.

And of course you will need to keep in mind that it might be in the kernel in the future.

Heiko

Quoted 136 lines

Thanks,

- Kever

Quoted 127 lines

Regards,
Soeren

Quoted 124 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

  arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
  arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
  9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
  		regulator-name = "vdd_center";
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		regulator-always-on;
  		regulator-boot-on;
  		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <430000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
  		regulator-name = "vdd_log";
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		regulator-always-on;
  		regulator-boot-on;
  	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vsys_3v3>;
  	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc5v0_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc3v3_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc5v0_sys>;
  	};
  };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
index 1bc1579674e5..f8e2cb8c0624 100644
@@ -133,6 +133,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <800000>;
  		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc_sys>;
  	};
  };
author
#12 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Heiko,

    Could you help to just pick the first patch and drop the other 2 patches?

    I think it's better to fix in the U-Boot first so that the stability issue will be fixed,

and the update in kernel dts is not so urgent for kernel driver actually not setting

this pwm regulator.

    I want to add a patch for rk3399-roc-pc, since Markus Reichl already send it,

so it's OK for that board, and for rock960/Ficus, the vdd_log is removed for stability

issue, then we have to update U-Boot first before kernel can add the vdd_log back.

Thanks,

- Kever

Quoted 174 lines · Heiko Stübner

Hi Kever,

Am Dienstag, 12. November 2019, 09:04:49 CET schrieb Kever Yang:

Quoted 15 lines · Soeren Moch
Quoted 6 lines · Kever Yang
Quoted 5 lines

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Quoted 7 lines
Quoted 3 lines

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I think it's a good idea to include this setting in the main dts for the boards (not in u-boot specific additions as is done now). But there is (for some reason?) no documented binding for regulator-init-microvolt in linux.

Quoted 6 lines

Ohh, I forgot the kernel driver does not support this property.

@Heiko, can we add this 'regulator-init-microvolt' without driver support but adding document for

it at dt-binding?

In theory yes, but you would still need to get DT maintainers and Mark Brown (regulator maintainer) involved before that.

Especially as this is a individual property you will need to have a good excuse why you're not implementing it in the kernel as well.

And of course you will need to keep in mind that it might be in the kernel in the future.

Heiko

Quoted 133 lines

Thanks,

- Kever

Quoted 126 lines

Regards,
Soeren

Quoted 124 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

   arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
   arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
   9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
   		regulator-name = "vdd_center";
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		regulator-always-on;
   		regulator-boot-on;
   		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <430000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc_sys>;
   	};
   };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
   		regulator-name = "vdd_log";
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		regulator-always-on;
   		regulator-boot-on;
   	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vsys_3v3>;
   	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc5v0_sys>;
   	};
   };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc_sys>;
   	};
   };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc3v3_sys>;
   	};
   };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc5v0_sys>;
   	};
   };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
index 1bc1579674e5..f8e2cb8c0624 100644
@@ -133,6 +133,7 @@
   		regulator-boot-on;
   		regulator-min-microvolt = <800000>;
   		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
   		vin-supply = <&vcc_sys>;
   	};
   };
maintainer
#13 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Hi Kever,

Am Mittwoch, 13. November 2019, 04:21:35 CET schrieb Kever Yang:

Quoted 4 lines

Heiko,

Could you help to just pick the first patch and drop the other 2
patches?

I did as requested now :-)

Heiko

#14 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

In reply to Kever Yang

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.
Is this a danger for the board?
How to fix it?
Btw. vin-supply for this pwm-regulator is ignored and I could not find it in bindings doc.

Gruß,

Signature · 4 lines
Markus Reichl


Am 12.11.19 um 09:04 schrieb Kever Yang:
Quoted 162 lines · Soeren Moch
Quoted 6 lines · Kever Yang
Quoted 5 lines

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Quoted 7 lines
Quoted 3 lines

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I think it's a good idea to include this setting in the main dts for the boards (not in u-boot specific additions as is done now). But there is (for some reason?) no documented binding for regulator-init-microvolt in linux.

Ohh, I forgot the kernel driver does not support this property.

@Heiko, can we add this 'regulator-init-microvolt' without driver support but adding document for

it at dt-binding?

Thanks,

- Kever

Quoted 119 lines

Regards,
Soeren

Quoted 116 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

  arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 + arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 + arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 + arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 + arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 + arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 + arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 + arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +

  9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
           regulator-name = "vdd_center";
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           regulator-always-on;
           regulator-boot-on;
           status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <430000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc_sys>;
       };
   };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
           regulator-name = "vdd_log";
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           regulator-always-on;
           regulator-boot-on;
       };
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vsys_3v3>;
       };
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc5v0_sys>;
       };
   };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc_sys>;
       };
   };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc3v3_sys>;
       };
   };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1700000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc5v0_sys>;
       };
   };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0 -0
index 1bc1579674e5..f8e2cb8c0624 100644
Quoted 8 lines

arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi line 139

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
@@ -133,6 +133,7 @@
           regulator-boot-on;
           regulator-min-microvolt = <800000>;
           regulator-max-microvolt = <1400000>;
+        regulator-init-microvolt = <950000>;
           vin-supply = <&vcc_sys>;
       };
   };

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#15 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Quoted 5 lines · Markus Reichl

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.
Is this a danger for the board?

I think yes. What I read vdd_log on rk3399 must not exceed 1.0V.

Quoted 1 line

How to fix it?

You probably need to do something like [1].

[1] https://patchwork.kernel.org/patch/11173465/

Gruß,
Sören

Quoted 4 lines

Btw. vin-supply for this pwm-regulator is ignored and I could not find it in bindings doc.

Gruß,

#16 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Thanks Sören,

Am 12.11.19 um 09:44 schrieb Sören Moch:

Quoted 9 lines · Markus Reichl
Quoted 5 lines

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.
Is this a danger for the board?

I think yes. What I read vdd_log on rk3399 must not exceed 1.0V.

Quoted 1 line

How to fix it?

You probably need to do something like [1].

will measure and come up with a patch.

Quoted 9 lines

[1] https://patchwork.kernel.org/patch/11173465/

Gruß,
Sören

Quoted 3 lines

Btw. vin-supply for this pwm-regulator is ignored and I could not find it in bindings doc.

Gruß,

Signature · 1 line
Markus Reichl
author
#17 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

In reply to Markus Reichl

Markus,

Quoted 4 lines · Markus Reichl

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.

The rk3399-roc-pc have the same vdd_log circuit in schematic, so it should like the patch 1/3 of

this patch set.

I don't understand who is setting this value, maybe the default value without pwm regulator enabled?

Quoted 2 lines

Is this a danger for the board?
How to fix it?

The best way is to set correct min/max microvolt of the regulator(measure with PWM output low and high),

(note that if  no driver touch the regulator, the PWM is default input, not output;)

and set a init-microvolt for U-Boot driver, and I think no kernel driver touch this regulator now.

Thanks,

- Kever

Quoted 4 lines

Btw. vin-supply for this pwm-regulator is ignored and I could not find it in bindings doc.

Gruß,

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#18 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Quoted 14 lines · Kever Yang

Markus,

Quoted 4 lines · Markus Reichl

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.

The rk3399-roc-pc have the same vdd_log circuit in schematic, so it should like the patch 1/3 of

this patch set.

Quoted 8 lines

I don't understand who is setting this value, maybe the default value without pwm regulator enabled?

Quoted 2 lines

Is this a danger for the board?
How to fix it?

The best way is to set correct min/max microvolt of the regulator(measure with PWM output low and high),

I didn't look into the schematic of this board, but if it is similar to RockPro64, setting the pwm regulator to the max voltage of 1.7V will probably kill the rk3399 immediately. So I recommend not to do this...

Regards,
Soeren

Quoted 19 lines

(note that if  no driver touch the regulator, the PWM is default input, not output;)
to
and set a init-microvolt for U-Boot driver, and I think no kernel driver touch this regulator now.

Thanks,

- Kever

Quoted 5 lines

Btw. vin-supply for this pwm-regulator is ignored and I could not find it
in bindings doc.

Gruß,

#19 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Dear Sore, Kever,

Am 12.11.19 um 11:19 schrieb Soeren Moch:

Quoted 20 lines · Kever Yang
Quoted 17 lines

Markus,

Quoted 4 lines · Markus Reichl

Hi Kever,

have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is showing 1118 mV.

The rk3399-roc-pc have the same vdd_log circuit in schematic, so it should like the patch 1/3 of

this patch set.

I don't understand who is setting this value, maybe the default value without pwm regulator enabled?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Is this a danger for the board?
How to fix it?

The best way is to set correct min/max microvolt of the regulator(measure with PWM output low and high),

I didn't look into the schematic of this board, but if it is similar to RockPro64, setting the pwm regulator to the max voltage of 1.7V will probably kill the rk3399 immediately. So I recommend not to do this...

It has to be set to 450mV - 1400mV to give 953mV.
I will come out with a patch that fixes this.

Quoted 23 lines

Regards,
Soeren

Quoted 8 lines

(note that if  no driver touch the regulator, the PWM is default input, not output;)
to
and set a init-microvolt for U-Boot driver, and I think no kernel driver touch this regulator now.

Quoted 11 lines

Thanks,

- Kever

Quoted 5 lines

Btw. vin-supply for this pwm-regulator is ignored and I could not find it
in bindings doc.

Gruß,

Quoted 5 lines

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

Gruß,

Signature · 1 line
Markus Reichl
#20 lore raw

PATCH 1/1 arm64: dts: rockchip: Fix vdd_log on rk3399-roc-pc

In reply to Soeren Moch

On rk3399 vdd_log shall not exceed 1.0 V. On rk3399-roc-pc vdd_log is presently 1118 mV. Fix by setting the min voltage of the respective pwm-regulator down to 450 mV. This results in a vdd_log of 953 mV.
Specify the supply to silence warning.

---
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2 -2
index a31099f7620b..4dac88ef7e72 100644
@@ -211,9 +211,9 @@
 		regulator-name = "vdd_log";
 		regulator-always-on;
 		regulator-boot-on;
-		regulator-min-microvolt = <800000>;
+		regulator-min-microvolt = <450000>;
 		regulator-max-microvolt = <1400000>;
-		vin-supply = <&vcc3v3_sys>;
+		pwm-supply = <&vcc3v3_sys>;
 	};
 };
 
Signature · 1 line
2.20.1
maintainer
#21 lore raw

Re: [PATCH] arm64: dts: rockchip: Fix vdd_log on rk3399-roc-pc

Am Dienstag, 12. November 2019, 12:42:09 CET schrieb Markus Reichl:

Quoted 7 lines

On rk3399 vdd_log shall not exceed 1.0 V. On rk3399-roc-pc vdd_log is presently 1118 mV. Fix by setting the min voltage of the respective pwm-regulator down to 450 mV. This results in a vdd_log of 953 mV.
Specify the supply to silence warning.

applied for 5.6 (or maybe still 5.5)

Thanks
Heiko

#22 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

In reply to Kever Yang

Hi,

Quoted 9 lines · Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I'm a tad bit confused here. When U-Boot boots the kernel, how is the PWM configured?

I remember folks going through a lot of work to make sure that we could actually _read_ the PWM state that the bootloader gave us and report it as the initial voltage. If the kernel ends up needing to configure the PWM regulator's period for some reason, I remember it would actually pick something close. Is that not working for you?

For instance, on rk3288-veyron when I boot up mainline (no devfreq on rk3288-veyron on mainline) the vdd_logic reports 1.2 volts because it read what the bootloader left it as.

...are you saying that U-Boot doesn't configure the PWM and you're trying to fix it up in the kernel?

-Doug

-Doug

author
#23 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

Hi Doug,

Quoted 20 lines · Doug Anderson

Hi,

Quoted 8 lines · Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

I'm a tad bit confused here. When U-Boot boots the kernel, how is the PWM configured?

I remember folks going through a lot of work to make sure that we could actually _read_ the PWM state that the bootloader gave us and report it as the initial voltage. If the kernel ends up needing to configure the PWM regulator's period for some reason, I remember it would actually pick something close. Is that not working for you?

Quoted 6 lines

For instance, on rk3288-veyron when I boot up mainline (no devfreq on rk3288-veyron on mainline) the vdd_logic reports 1.2 volts because it read what the bootloader left it as.

...are you saying that U-Boot doesn't configure the PWM and you're trying to fix it up in the kernel?

U-Boot will configure the PWM with dts setting(and now U-Boot would like to sync the dts

from kernel directly):

- no dts node for pwm regulator, it will be default as input IO without any configure;

- with pwm regulator dts enable, no 'init-microvolt', enable PWM with default 0% output;

- with pwm regulator dts with 'init-microvolt', enable PWM with corresponding duty output;

We should leave it not configure(around 0.9V for most of board) or configure to correct

output(some boards need 0.95V while default is 0.9V for stability issue).

For the rk3399 boards on upstream, some of them do not have a vdd_log in dts,

and others have dts node but without 'init-microvolt' for init setting, that's what I want

to fix to make sure all the boards can work correctly.

Thanks,

- Kever

Quoted 11 lines
(quoted diff) +0 -2
-Doug
 
 
-Doug

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#24 lore raw

Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log

In reply to Kever Yang
Quoted 8 lines · Kever Yang

Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator) will be 'enable' with the dts node at a default PWM state with high or low output. Both too high or too low for vdd_log is not good for the board, add init voltage for driver to make the regulator get into a know output.

Note that this will be used by U-Boot for init voltage output, and this is very important for it may get system hang somewhere during system boot up with regulator enable and without this init value.

Hi, just for reference: doing the math based on the Sapphire board schematic, the values for vdd_log are:

|------|-------|
| PWM  | Volts |
|------|-------|
| Hi-Z | 1.136 |
|   0% | 1.356 |
| 100% | .9167 |
|------|-------|

The datasheet states that the acceptable range for vdd_log is 0.8 .. 1.0 So, an option could be to configure GPIO1_C3 as output high and vdd_log would be at the range's center.

Aside from math on paper, it has been tested. Setting GPIO1_C3 as output high gives a vdd_log of 0.922 measured volts and the board, so far, works fine.

Regards,
Vicente.

Quoted 124 lines
CC Elaine Zhang <[email protected]>
CC Peter Robinson <[email protected]>

---

 arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
 9 files changed, 9 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-evb.dts +1 -0
index 77008dca45bc..fa241aeb11b0 100644
@@ -65,6 +65,7 @@
 		regulator-name = "vdd_center";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 		status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -0
index 92de83dd4dbc..4e45269fcdff 100644
@@ -208,6 +208,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <430000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -0
index c133e8d64b2a..692f3154edc3 100644
@@ -100,6 +100,7 @@
 		regulator-name = "vdd_log";
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		regulator-always-on;
 		regulator-boot-on;
 	};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -0
index 4944d78a0a1c..c2ac80d99301 100644
@@ -79,6 +79,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vsys_3v3>;
 	};
 
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -0
index 73be38a53796..c32abcc4ddc1 100644
@@ -101,6 +101,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -0
index 0541dfce924d..9d674c51f025 100644
@@ -164,6 +164,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts +1 -0
index 19f7732d728c..7d856ce1d156 100644
@@ -129,6 +129,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc3v3_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +1 -0
index e544deb61d28..8fbccbc8bf47 100644
@@ -174,6 +174,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1700000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -0
index 1bc1579674e5..f8e2cb8c0624 100644
@@ -133,6 +133,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <800000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc_sys>;
 	};
 };
maintainer
#25 lore raw
In reply to Kever Yang

Am Montag, 11. November 2019, 01:51:56 CET schrieb Kever Yang:

Quoted 6 lines

The min/max value of vdd_log is decide by pwm IO voltage and its resistors, the rk3399-firefly board's pwm regulator circuit is designed for IO voltage at 1.8V, while the board actually use 3.0V for IO, which at last lead to the min-microvolt to '430mV' instead of '800mV'.

applied for 5.6 (or maybe still 5.5)

Thanks
Heiko