[U-Boot] [PATCH] rockchip: dts: rk3399: rockpro64: Provide init voltage

Add missing regulator-init-microvolt property to vdd_log regulator.
Signed-off-by: Mark Kettenis kettenis@openbsd.org --- Without this property the pwm regulator driver prints a warning and the OpenBSD kernel crashes shortly after spinning up the big cores.
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index dbfa4ba9f8..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -5,3 +5,7 @@
#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi" + +&vdd_log { + regulator-init-microvolt = <950000>; +};

On 06/22/2019 05:16 AM, Mark Kettenis wrote:
Add missing regulator-init-microvolt property to vdd_log regulator.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Reveiwed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Without this property the pwm regulator driver prints a warning and the OpenBSD kernel crashes shortly after spinning up the big cores.
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index dbfa4ba9f8..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -5,3 +5,7 @@
#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi"
+&vdd_log {
- regulator-init-microvolt = <950000>;
+};

On Sat, Jun 22, 2019 at 2:46 AM Mark Kettenis kettenis@openbsd.org wrote:
Add missing regulator-init-microvolt property to vdd_log regulator.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Without this property the pwm regulator driver prints a warning and the OpenBSD kernel crashes shortly after spinning up the big cores.
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index dbfa4ba9f8..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -5,3 +5,7 @@
#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi"
+&vdd_log {
regulator-init-microvolt = <950000>;
+};
This seems to be issue on whole? how does Linux work? if it required in Linux better make a change there and sync here.

From: Jagan Teki jagan@amarulasolutions.com Date: Sat, 22 Jun 2019 20:17:13 +0530
On Sat, Jun 22, 2019 at 2:46 AM Mark Kettenis kettenis@openbsd.org wrote:
Add missing regulator-init-microvolt property to vdd_log regulator.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Without this property the pwm regulator driver prints a warning and the OpenBSD kernel crashes shortly after spinning up the big cores.
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index dbfa4ba9f8..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -5,3 +5,7 @@
#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi"
+&vdd_log {
regulator-init-microvolt = <950000>;
+};
This seems to be issue on whole? how does Linux work? if it required in Linux better make a change there and sync here.
It needs the fix to actually turn on the boot-on regulators as well. But yes, with this property in the device tree, U-Boot enables the regulator with the appropriate voltage and the crash I'm seeing is gone.
I deliberately made this change in the rk3399-rockpro64-u-boot.dtsi file since the "regulator-init-microvolt" property is *not* defined by the Linux devicetree bindings. So I expect that a patch to change this in the Linux device tree would be rejected.
Note that this regulator has a "regulator-boot-on" property. So Linux doesn't need to know the initial setting of this regulator as the bootloader/firmware is supposed to set it up.
I don't know if folks running Linux are experiencing problems as wll; I don't run Linux on my boards ;). I suspect very few people are actually using mainline U-Boot on their boards. But it is also possible that the Linux kernel does enable this regulator when it boots, since it sees that it hasn't been enabled. It does have some fallback code to fix that up in case the bootloader/firmware didn't do things properly. But what voltage would it use?

On 06/22/2019 11:11 PM, Mark Kettenis wrote:
From: Jagan Teki jagan@amarulasolutions.com Date: Sat, 22 Jun 2019 20:17:13 +0530
On Sat, Jun 22, 2019 at 2:46 AM Mark Kettenis kettenis@openbsd.org wrote:
Add missing regulator-init-microvolt property to vdd_log regulator.
Signed-off-by: Mark Kettenis kettenis@openbsd.org
Without this property the pwm regulator driver prints a warning and the OpenBSD kernel crashes shortly after spinning up the big cores.
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index dbfa4ba9f8..f7f26d584f 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -5,3 +5,7 @@
#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi"
+&vdd_log {
regulator-init-microvolt = <950000>;
+};
This seems to be issue on whole? how does Linux work? if it required in Linux better make a change there and sync here.
This is a pwm regulator, need to init in U-Boot instead of in kernel, or else the kernel may hang in the regulator init. And this pwm regulator suppose to be init with regulators_enable_boot_on().
I would apply the fix first with a rebase without lpddr4 patch set.
Applied to u-boot-rockchip/master.
Thanks, - Kever
It needs the fix to actually turn on the boot-on regulators as well. But yes, with this property in the device tree, U-Boot enables the regulator with the appropriate voltage and the crash I'm seeing is gone.
I deliberately made this change in the rk3399-rockpro64-u-boot.dtsi file since the "regulator-init-microvolt" property is *not* defined by the Linux devicetree bindings. So I expect that a patch to change this in the Linux device tree would be rejected.
Note that this regulator has a "regulator-boot-on" property. So Linux doesn't need to know the initial setting of this regulator as the bootloader/firmware is supposed to set it up.
I don't know if folks running Linux are experiencing problems as wll; I don't run Linux on my boards ;). I suspect very few people are actually using mainline U-Boot on their boards. But it is also possible that the Linux kernel does enable this regulator when it boots, since it sees that it hasn't been enabled. It does have some fallback code to fix that up in case the bootloader/firmware didn't do things properly. But what voltage would it use? _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
participants (4)
-
Jagan Teki
-
Kever Yang
-
Mark Kettenis
-
Mark Kettenis