Message ID | 20220825094155.3.Ie7d2c50d2b42ef2d364f3a0c8e300e5ce1875b79@changeid (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | arm64: dts: qcom: Fix broken regulator spec on RPMH boards | expand |
On Thu, Aug 25, 2022 at 09:42:01AM -0700, Douglas Anderson wrote: > This board uses RPMH, specifies "regulator-allow-set-load" for LDOs, > but doesn't specify any modes with "regulator-allowed-modes". > > Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement > get_optimum_mode(), not set_load()") the above meant that we were able > to set either LPM or HPM mode. After that commit (and fixes [1]) we'll > be stuck at the initial mode. Discussion of this has resulted in the > decision that the old dts files were wrong and should be fixed to > fully restore old functionality. > > Let's re-enable the old functionality by fixing the dts. > > [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid > > Fixes: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") > Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 +++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index d6f272c71a47..f64d58e371bd 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -88,6 +88,9 @@ vreg_l3b: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > regulator-boot-on; > regulator-always-on; > }; > @@ -98,6 +101,9 @@ vreg_l4b: ldo4 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l6b: ldo6 { > @@ -106,6 +112,9 @@ vreg_l6b: ldo6 { > regulator-max-microvolt = <880000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > regulator-boot-on; > }; > }; > @@ -120,6 +129,9 @@ vreg_l1c: ldo1 { > regulator-max-microvolt = <1800000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7c: ldo7 { > @@ -128,6 +140,9 @@ vreg_l7c: ldo7 { > regulator-max-microvolt = <2504000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l13c: ldo13 { > @@ -136,6 +151,9 @@ vreg_l13c: ldo13 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > }; > > @@ -151,6 +169,9 @@ vreg_l3d: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l4d: ldo4 { > @@ -159,6 +180,9 @@ vreg_l4d: ldo4 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l6d: ldo6 { > @@ -167,6 +191,9 @@ vreg_l6d: ldo6 { > regulator-max-microvolt = <880000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7d: ldo7 { > @@ -175,6 +202,9 @@ vreg_l7d: ldo7 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l9d: ldo9 { > @@ -183,6 +213,9 @@ vreg_l9d: ldo9 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > }; > }; > -- > 2.37.2.672.g94769d06f0-goog >
On 25.08.2022 18:42, Douglas Anderson wrote: > This board uses RPMH, specifies "regulator-allow-set-load" for LDOs, > but doesn't specify any modes with "regulator-allowed-modes". > > Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement > get_optimum_mode(), not set_load()") the above meant that we were able > to set either LPM or HPM mode. After that commit (and fixes [1]) we'll > be stuck at the initial mode. Discussion of this has resulted in the > decision that the old dts files were wrong and should be fixed to > fully restore old functionality. > > Let's re-enable the old functionality by fixing the dts. > > [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid > > Fixes: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> Konrad > > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 +++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index d6f272c71a47..f64d58e371bd 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -88,6 +88,9 @@ vreg_l3b: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > regulator-boot-on; > regulator-always-on; > }; > @@ -98,6 +101,9 @@ vreg_l4b: ldo4 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l6b: ldo6 { > @@ -106,6 +112,9 @@ vreg_l6b: ldo6 { > regulator-max-microvolt = <880000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > regulator-boot-on; > }; > }; > @@ -120,6 +129,9 @@ vreg_l1c: ldo1 { > regulator-max-microvolt = <1800000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7c: ldo7 { > @@ -128,6 +140,9 @@ vreg_l7c: ldo7 { > regulator-max-microvolt = <2504000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l13c: ldo13 { > @@ -136,6 +151,9 @@ vreg_l13c: ldo13 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > }; > > @@ -151,6 +169,9 @@ vreg_l3d: ldo3 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l4d: ldo4 { > @@ -159,6 +180,9 @@ vreg_l4d: ldo4 { > regulator-max-microvolt = <1200000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l6d: ldo6 { > @@ -167,6 +191,9 @@ vreg_l6d: ldo6 { > regulator-max-microvolt = <880000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l7d: ldo7 { > @@ -175,6 +202,9 @@ vreg_l7d: ldo7 { > regulator-max-microvolt = <3072000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > > vreg_l9d: ldo9 { > @@ -183,6 +213,9 @@ vreg_l9d: ldo9 { > regulator-max-microvolt = <912000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > + regulator-allowed-modes = > + <RPMH_REGULATOR_MODE_LPM > + RPMH_REGULATOR_MODE_HPM>; > }; > }; > };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index d6f272c71a47..f64d58e371bd 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -88,6 +88,9 @@ vreg_l3b: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; regulator-boot-on; regulator-always-on; }; @@ -98,6 +101,9 @@ vreg_l4b: ldo4 { regulator-max-microvolt = <912000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l6b: ldo6 { @@ -106,6 +112,9 @@ vreg_l6b: ldo6 { regulator-max-microvolt = <880000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; regulator-boot-on; }; }; @@ -120,6 +129,9 @@ vreg_l1c: ldo1 { regulator-max-microvolt = <1800000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l7c: ldo7 { @@ -128,6 +140,9 @@ vreg_l7c: ldo7 { regulator-max-microvolt = <2504000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l13c: ldo13 { @@ -136,6 +151,9 @@ vreg_l13c: ldo13 { regulator-max-microvolt = <3072000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; }; @@ -151,6 +169,9 @@ vreg_l3d: ldo3 { regulator-max-microvolt = <1200000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l4d: ldo4 { @@ -159,6 +180,9 @@ vreg_l4d: ldo4 { regulator-max-microvolt = <1200000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l6d: ldo6 { @@ -167,6 +191,9 @@ vreg_l6d: ldo6 { regulator-max-microvolt = <880000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l7d: ldo7 { @@ -175,6 +202,9 @@ vreg_l7d: ldo7 { regulator-max-microvolt = <3072000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; vreg_l9d: ldo9 { @@ -183,6 +213,9 @@ vreg_l9d: ldo9 { regulator-max-microvolt = <912000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; + regulator-allowed-modes = + <RPMH_REGULATOR_MODE_LPM + RPMH_REGULATOR_MODE_HPM>; }; }; };
This board uses RPMH, specifies "regulator-allow-set-load" for LDOs, but doesn't specify any modes with "regulator-allowed-modes". Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()") the above meant that we were able to set either LPM or HPM mode. After that commit (and fixes [1]) we'll be stuck at the initial mode. Discussion of this has resulted in the decision that the old dts files were wrong and should be fixed to fully restore old functionality. Let's re-enable the old functionality by fixing the dts. [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid Fixes: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") Signed-off-by: Douglas Anderson <dianders@chromium.org> --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+)