OSDN Git Service

arm64: dts: qcom: apq8016-sbc: Fix regulator constraints
authorStephan Gerhold <stephan@gerhold.net>
Wed, 17 May 2023 18:48:40 +0000 (20:48 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 25 May 2023 04:50:47 +0000 (21:50 -0700)
commite27654df20d77ad7549a3cf6739ebaa3aa59a088
tree5a36310a90348340826eb53100a155056392ec90
parent05860f678c686afebc781c1fe8233bf997f2435b
arm64: dts: qcom: apq8016-sbc: Fix regulator constraints

For some reason DB410c has completely bogus regulator constraints that
actually just correspond to the programmable voltages which are already
provided by the regulator driver. Some of them are not just outside the
recommended operating conditions of the APQ8016E SoC but even exceed
the absolute maximum ratings, potentially risking permanent device
damage.

In practice it's not quite as dangerous thanks to the RPM firmware:
It turns out that it has its own voltage constraints and silently
clamps all regulator requests. For example, requesting 3.3V for L5
(allowed by the current regulator constraints!) still results in 1.8V
being programmed in the actual regulator hardware.

Experimentation with various voltages shows that the internal RPM
voltage constraints roughly correspond to the safe "specified range"
in the PM8916 Device Specification (rather than the "programmable
range" used inside apq8016-sbc.dtsi right now).

Combine those together with some fixed voltages used in the old
msm-3.10 device tree from Qualcomm to give DB410c some actually valid
voltage constraints.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 4c7d53d16d77 ("arm64: dts: apq8016-sbc: add regulators support")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230510-msm8916-regulators-v1-1-54d4960a05fc@gerhold.net
arch/arm64/boot/dts/qcom/apq8016-sbc.dts