linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config
@ 2022-07-17 19:29 Christian Kohlschütter
  2022-07-17 19:32 ` Christian Kohlschütter
  2022-07-18 12:02 ` [PATCH v2] " Christian Kohlschütter
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Kohlschütter @ 2022-07-17 19:29 UTC (permalink / raw)
  To: Robin Murphy, wens, Heiko Stübner, Markus Reichl,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	Linux MMC List, linux-kernel
  Cc: Liam Girdwood, Mark Brown

A series of issues exist around the "vcc3v0_sd" voltage regulator that
made it necessary to mark it "always-on".

With the patch "regulator: core: Resolve supply name earlier to prevent
double-init", this option is no longer necessary.

Removing this option not only prevents a hang when rebooting Nanopi R4S,
it also ensures that bootloaders like u-boot can boot from an SD card
right away, without out-of-tree patches that re-initialize voltage levels.

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
index 8c0ff6c96e03..55b93eac2f99 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
@@ -70,7 +70,6 @@ vcc3v0_sd: vcc3v0-sd {
 		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&sdmmc0_pwr_h>;
-		regulator-always-on;
 		regulator-min-microvolt = <3000000>;
 		regulator-max-microvolt = <3000000>;
 		regulator-name = "vcc3v0_sd";
-- 
2.36.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config
  2022-07-17 19:29 [PATCH] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config Christian Kohlschütter
@ 2022-07-17 19:32 ` Christian Kohlschütter
  2022-07-18 12:02 ` [PATCH v2] " Christian Kohlschütter
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Kohlschütter @ 2022-07-17 19:32 UTC (permalink / raw)
  To: Robin Murphy, wens, Heiko Stübner, Markus Reichl,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	Linux MMC List, linux-kernel
  Cc: Liam Girdwood, Mark Brown

This patch obviously requires "regulator: core: Resolve supply name earlier to prevent double-init" and obsoletes "[PATCH v5] arm64: dts: rockchip: Fix SD card init on rk3399-nanopi4".
The latter patch may still be useful for existing kernels where one can recompile the device tree separately.

> Am 17.07.2022 um 21:29 schrieb Christian Kohlschütter <christian@kohlschutter.com>:
> 
> A series of issues exist around the "vcc3v0_sd" voltage regulator that
> made it necessary to mark it "always-on".
> 
> With the patch "regulator: core: Resolve supply name earlier to prevent
> double-init", this option is no longer necessary.
> 
> Removing this option not only prevents a hang when rebooting Nanopi R4S,
> it also ensures that bootloaders like u-boot can boot from an SD card
> right away, without out-of-tree patches that re-initialize voltage levels.
> 
> Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
> index 8c0ff6c96e03..55b93eac2f99 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
> @@ -70,7 +70,6 @@ vcc3v0_sd: vcc3v0-sd {
> 		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&sdmmc0_pwr_h>;
> -		regulator-always-on;
> 		regulator-min-microvolt = <3000000>;
> 		regulator-max-microvolt = <3000000>;
> 		regulator-name = "vcc3v0_sd";
> -- 
> 2.36.1
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config
  2022-07-17 19:29 [PATCH] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config Christian Kohlschütter
  2022-07-17 19:32 ` Christian Kohlschütter
@ 2022-07-18 12:02 ` Christian Kohlschütter
  2022-07-18 12:04   ` Christian Kohlschütter
  1 sibling, 1 reply; 5+ messages in thread
From: Christian Kohlschütter @ 2022-07-18 12:02 UTC (permalink / raw)
  To: Robin Murphy, wens, Heiko Stübner, Markus Reichl,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	Linux MMC List, linux-kernel, Liam Girdwood, Mark Brown

A series of issues exist around the "vcc3v0_sd" voltage regulator that
made it necessary to mark it "always-on".

With the patch "regulator: core: Resolve supply name earlier to prevent
double-init", this option is no longer necessary.

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
---
arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
index 8c0ff6c96e03..55b93eac2f99 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
@@ -70,7 +70,6 @@ vcc3v0_sd: vcc3v0-sd {
		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&sdmmc0_pwr_h>;
-		regulator-always-on;
		regulator-min-microvolt = <3000000>;
		regulator-max-microvolt = <3000000>;
		regulator-name = "vcc3v0_sd";
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config
  2022-07-18 12:02 ` [PATCH v2] " Christian Kohlschütter
@ 2022-07-18 12:04   ` Christian Kohlschütter
  2022-07-18 20:59     ` Christian Kohlschütter
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Kohlschütter @ 2022-07-18 12:04 UTC (permalink / raw)
  To: Robin Murphy, wens, Heiko Stübner, Markus Reichl,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	Linux MMC List, linux-kernel, Liam Girdwood, Mark Brown

Am 18.07.2022 um 14:02 schrieb Christian Kohlschütter <christian@kohlschutter.com>:
> 
> A series of issues exist around the "vcc3v0_sd" voltage regulator that
> made it necessary to mark it "always-on".
> 
> With the patch "regulator: core: Resolve supply name earlier to prevent
> double-init", this option is no longer necessary.
> ...

Walking back on my claim in the commit message that no further patches are needed for the u-boot integration to work.
Other than that, the actual patch is unchanged.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config
  2022-07-18 12:04   ` Christian Kohlschütter
@ 2022-07-18 20:59     ` Christian Kohlschütter
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Kohlschütter @ 2022-07-18 20:59 UTC (permalink / raw)
  To: Robin Murphy, wens, Heiko Stübner, Markus Reichl,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	Linux MMC List, linux-kernel, Liam Girdwood, Mark Brown

Am 18.07.2022 um 14:02 schrieb Christian Kohlschütter <christian@kohlschutter.com>:
>> 
>> A series of issues exist around the "vcc3v0_sd" voltage regulator that
>> made it necessary to mark it "always-on".
>> 
>> With the patch "regulator: core: Resolve supply name earlier to prevent
>> double-init", this option is no longer necessary.
>> ...
> 
> Walking back on my claim in the commit message that no further patches are needed for the u-boot integration to work.
> Other than that, the actual patch is unchanged.

This change (removing regulator-always-on) doesn't work reliably; please disregard for now.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-18 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-17 19:29 [PATCH] arm64: dts: rockchip: rk3399-nanopi4: Fix voltage regulator config Christian Kohlschütter
2022-07-17 19:32 ` Christian Kohlschütter
2022-07-18 12:02 ` [PATCH v2] " Christian Kohlschütter
2022-07-18 12:04   ` Christian Kohlschütter
2022-07-18 20:59     ` Christian Kohlschütter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).