arm64: dts: qcom: msm8939: Fix regulator constraints
authorStephan Gerhold <stephan@gerhold.net>
Wed, 14 Jun 2023 07:16:03 +0000 (09:16 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 14 Jun 2023 15:03:32 +0000 (08:03 -0700)
commit9187d555c4ba9544c7f117062d241aa085f59a06
tree60d7e31137534229c63aed8b77ba0efd3cc6f2a0
parent8771308c91cefc072f36415cec0b802ee55b1d96
arm64: dts: qcom: msm8939: Fix regulator constraints

The regulator constraints for the MSM8939 devices were originally taken
from Qualcomm's msm-3.10 vendor device tree (for lack of better
documentation). Unfortunately it turns out that Qualcomm's voltages are
slightly off as well and do not match the voltage constraints applied
by the RPM firmware.

This means that we sometimes request a specific voltage but the RPM
firmware actually applies a much lower or higher voltage. This is
particularly critical for pm8916_l11 which is used as SD card VMMC
regulator: The SD card can choose a voltage from the current range of
1.8 - 2.95V. If it chooses to run at 1.8V we pretend that this is fine
but the RPM firmware will still silently end up configuring 2.95V.
This can be easily reproduced with a multimeter or by checking the
SPMI hardware registers of the regulator.

Apply the same change as for MSM8916 in commit 355750828c55 ("arm64:
dts: qcom: msm8916: Fix regulator constraints") and make the voltages
match the actual "specified range" in the PM8916 Device Specification
which is enforced by the RPM firmware.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230530-msm8939-regulators-v1-5-a3c3ac833567@gerhold.net
arch/arm64/boot/dts/qcom/apq8039-t2.dts
arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts