All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: dts: qcom: Fix broken regulator spec on RPMH boards
@ 2022-08-25 16:41 Douglas Anderson
  2022-08-25 16:41 ` [PATCH 1/7] arm64: dts: qcom: sa8155p-adp: Specify which LDO modes are allowed Douglas Anderson
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Douglas Anderson @ 2022-08-25 16:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andrew Halaney, Mark Brown, Douglas Anderson, Andy Gross,
	AngeloGioacchino Del Regno, Bhupesh Sharma, Johan Hovold,
	Konrad Dybcio, Krzysztof Kozlowski, Rob Herring, Vinod Koul,
	devicetree, linux-arm-msm, linux-kernel

Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement
get_optimum_mode(), not set_load()") several boards were able to
change their regulator mode even though they had nothing listed in
"regulator-allowed-modes". After that commit (and fixes [1]) we'll be
stuck at the initial mode. Discussion of this (again, see [1]) has
resulted in the decision that the old dts files were wrong and should
be fixed to fully restore old functionality.

This series attempts to fix everyone. I've kept each board in a
separate patch to make stable / backports work easier.

Affected boards were found with:
  rpmh_users=$(git grep -l -i rpmh -- arch/arm*/boot/dts/qcom)
  set_modes=$(grep -l regulator-allow-set-load ${rpmh_users})
  but_no_allowed_modes=$(grep -l -v regulator-allowed-modes ${set_modes})

Fix was applied with:
  for f in ${but_no_allowed_modes}; do
    sed -i~ -e \
      's/^\(\s*\)regulator-allow-set-load;/\1regulator-allow-set-load;\n\1regulator-allowed-modes =\n\1    <RPMH_REGULATOR_MODE_LPM\n\1     RPMH_REGULATOR_MODE_HPM>;/'\
      $f
  done

Then results were manually inspected. In one board I removed a
"regulator-allow-set-load" from a fixed regulator since that was
clearly wrong.

[1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid


Douglas Anderson (7):
  arm64: dts: qcom: sa8155p-adp: Specify which LDO modes are allowed
  arm64: dts: qcom: sa8295p-adp: Specify which LDO modes are allowed
  arm64: dts: qcom: sc8280xp-crd: Specify which LDO modes are allowed
  arm64: dts: qcom: sc8280xp-thinkpad-x13s: Specify which LDO modes are
    allowed
  arm64: dts: qcom: sm8150-xperia-kumano: Specify which LDO modes are
    allowed
  arm64: dts: qcom: sm8250-xperia-edo: Specify which LDO modes are
    allowed
  arm64: dts: qcom: sm8350-hdk: Specify which LDO modes are allowed

 arch/arm64/boot/dts/qcom/sa8155p-adp.dts      | 13 +++++-
 arch/arm64/boot/dts/qcom/sa8295p-adp.dts      | 45 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts     | 33 ++++++++++++++
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 30 +++++++++++++
 .../dts/qcom/sm8150-sony-xperia-kumano.dtsi   |  6 +++
 .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi |  6 +++
 arch/arm64/boot/dts/qcom/sm8350-hdk.dts       | 12 +++++
 7 files changed, 144 insertions(+), 1 deletion(-)

-- 
2.37.2.672.g94769d06f0-goog


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

end of thread, other threads:[~2022-08-29 16:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 16:41 [PATCH 0/7] arm64: dts: qcom: Fix broken regulator spec on RPMH boards Douglas Anderson
2022-08-25 16:41 ` [PATCH 1/7] arm64: dts: qcom: sa8155p-adp: Specify which LDO modes are allowed Douglas Anderson
2022-08-25 21:30   ` Andrew Halaney
2022-08-25 21:58     ` Doug Anderson
2022-08-26 18:40   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 2/7] arm64: dts: qcom: sa8295p-adp: " Douglas Anderson
2022-08-25 21:33   ` Andrew Halaney
2022-08-26 18:40   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: " Douglas Anderson
2022-08-25 21:35   ` Andrew Halaney
2022-08-26 18:40   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 4/7] arm64: dts: qcom: sc8280xp-thinkpad-x13s: " Douglas Anderson
2022-08-25 21:37   ` Andrew Halaney
2022-08-26 18:40   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 5/7] arm64: dts: qcom: sm8150-xperia-kumano: " Douglas Anderson
2022-08-25 21:39   ` Andrew Halaney
2022-08-26 18:40   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 6/7] arm64: dts: qcom: sm8250-xperia-edo: " Douglas Anderson
2022-08-25 21:39   ` Andrew Halaney
2022-08-26 18:41   ` Konrad Dybcio
2022-08-25 16:42 ` [PATCH 7/7] arm64: dts: qcom: sm8350-hdk: " Douglas Anderson
2022-08-25 21:41   ` Andrew Halaney
2022-08-26  4:56   ` Vinod Koul
2022-08-26 18:41   ` Konrad Dybcio
2022-08-26  7:02 ` [PATCH 0/7] arm64: dts: qcom: Fix broken regulator spec on RPMH boards Johan Hovold
2022-08-29 16:51   ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.