linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator
@ 2021-07-01 14:00 H. Nikolaus Schaller
  2021-07-14  7:32 ` H. Nikolaus Schaller
  0 siblings, 1 reply; 3+ messages in thread
From: H. Nikolaus Schaller @ 2021-07-01 14:00 UTC (permalink / raw)
  To: Tony Lindgren, gg, Liam Girdwood, Mark Brown, Nishanth Menon,
	peter.ujfalusi, Benoît Cousson, Rob Herring
  Cc: linux-omap, linux-kernel, letux-kernel, kernel, devicetree,
	H. Nikolaus Schaller

This device tree include file describes a fixed-regulator
connecting smps7_reg output (1.8V) to some 1.8V rail and
consumers (vdds_1v8_main).

This regulator does not physically exist.

I assume it was introduced as a wrapper around smps7_reg
to provide a speaking signal name "vdds_1v8_main" as label.

This fixed-regulator without real function was not an issue
in driver code until

  Commit 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators")

introduced a new check for regulator initialization which
makes Palmas regulator registration fail:

[    5.407712] ldo1: supplied by vsys_cobra
[    5.412748] ldo2: supplied by vsys_cobra
[    5.417603] palmas-pmic 48070000.i2c:palmas@48:palmas_pmic: failed to register 48070000.i2c:palmas@48:palmas_pmic regulator

The reason is that the supply-chain of regulators is too
long and goes from ldo3 through the virtual vdds_1v8_main
regulator and then back to smps7. This adds a cross-dependency
of probing Palmas regulators and the fixed-regulator which
leads to probe deferral by the new check and is no longer
resolved.

Since we do not control what device tree files including this
one reference (either &vdds_1v8_main or &smps7_reg or both)
we keep both labels for smps7 for compatibility.

Fixes: 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators")
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/arm/boot/dts/omap5-board-common.dtsi | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index d8f13626cfd1..3a8f10231475 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -30,14 +30,6 @@ vsys_cobra: fixedregulator-vsys_cobra {
 		regulator-max-microvolt = <5000000>;
 	};
 
-	vdds_1v8_main: fixedregulator-vdds_1v8_main {
-		compatible = "regulator-fixed";
-		regulator-name = "vdds_1v8_main";
-		vin-supply = <&smps7_reg>;
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-	};
-
 	vmmcsd_fixed: fixedregulator-mmcsd {
 		compatible = "regulator-fixed";
 		regulator-name = "vmmcsd_fixed";
@@ -487,6 +479,7 @@ smps6_reg: smps6 {
 					regulator-boot-on;
 				};
 
+				vdds_1v8_main:
 				smps7_reg: smps7 {
 					/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
 					regulator-name = "smps7";
-- 
2.31.1


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

* Re: [PATCH v2] omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator
  2021-07-01 14:00 [PATCH v2] omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator H. Nikolaus Schaller
@ 2021-07-14  7:32 ` H. Nikolaus Schaller
  2021-07-27  8:15   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: H. Nikolaus Schaller @ 2021-07-14  7:32 UTC (permalink / raw)
  To: Tony Lindgren, Graeme Gregory, Liam Girdwood, Mark Brown,
	Nishanth Menon, peter.ujfalusi, Benoît Cousson, Rob Herring
  Cc: linux-omap, linux-kernel, letux-kernel, kernel, devicetree

Any comments?

> Am 01.07.2021 um 16:00 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
> This device tree include file describes a fixed-regulator
> connecting smps7_reg output (1.8V) to some 1.8V rail and
> consumers (vdds_1v8_main).
> 
> This regulator does not physically exist.
> 
> I assume it was introduced as a wrapper around smps7_reg
> to provide a speaking signal name "vdds_1v8_main" as label.
> 
> This fixed-regulator without real function was not an issue
> in driver code until
> 
>  Commit 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators")
> 
> introduced a new check for regulator initialization which
> makes Palmas regulator registration fail:
> 
> [    5.407712] ldo1: supplied by vsys_cobra
> [    5.412748] ldo2: supplied by vsys_cobra
> [    5.417603] palmas-pmic 48070000.i2c:palmas@48:palmas_pmic: failed to register 48070000.i2c:palmas@48:palmas_pmic regulator
> 
> The reason is that the supply-chain of regulators is too
> long and goes from ldo3 through the virtual vdds_1v8_main
> regulator and then back to smps7. This adds a cross-dependency
> of probing Palmas regulators and the fixed-regulator which
> leads to probe deferral by the new check and is no longer
> resolved.
> 
> Since we do not control what device tree files including this
> one reference (either &vdds_1v8_main or &smps7_reg or both)
> we keep both labels for smps7 for compatibility.
> 
> Fixes: 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators")
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
> arch/arm/boot/dts/omap5-board-common.dtsi | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
> index d8f13626cfd1..3a8f10231475 100644
> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
> @@ -30,14 +30,6 @@ vsys_cobra: fixedregulator-vsys_cobra {
> 		regulator-max-microvolt = <5000000>;
> 	};
> 
> -	vdds_1v8_main: fixedregulator-vdds_1v8_main {
> -		compatible = "regulator-fixed";
> -		regulator-name = "vdds_1v8_main";
> -		vin-supply = <&smps7_reg>;
> -		regulator-min-microvolt = <1800000>;
> -		regulator-max-microvolt = <1800000>;
> -	};
> -
> 	vmmcsd_fixed: fixedregulator-mmcsd {
> 		compatible = "regulator-fixed";
> 		regulator-name = "vmmcsd_fixed";
> @@ -487,6 +479,7 @@ smps6_reg: smps6 {
> 					regulator-boot-on;
> 				};
> 
> +				vdds_1v8_main:
> 				smps7_reg: smps7 {
> 					/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
> 					regulator-name = "smps7";
> -- 
> 2.31.1
> 


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

* Re: [PATCH v2] omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator
  2021-07-14  7:32 ` H. Nikolaus Schaller
@ 2021-07-27  8:15   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2021-07-27  8:15 UTC (permalink / raw)
  To: H. Nikolaus Schaller
  Cc: Graeme Gregory, Liam Girdwood, Mark Brown, Nishanth Menon,
	peter.ujfalusi, Benoît Cousson, Rob Herring, linux-omap,
	linux-kernel, letux-kernel, kernel, devicetree

* H. Nikolaus Schaller <hns@goldelico.com> [210714 07:33]:
> Any comments?

Seems like the way to go, applying into fixes.

Thanks,

Tony

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

end of thread, other threads:[~2021-07-27  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 14:00 [PATCH v2] omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator H. Nikolaus Schaller
2021-07-14  7:32 ` H. Nikolaus Schaller
2021-07-27  8:15   ` Tony Lindgren

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).