From: Stephan Gerhold <stephan@gerhold.net>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Stephan Gerhold <stephan@gerhold.net>
Subject: [PATCH 1/8] arm64: dts: qcom: apq8016-sbc: Fix regulator constraints
Date: Wed, 17 May 2023 20:48:40 +0200 [thread overview]
Message-ID: <20230510-msm8916-regulators-v1-1-54d4960a05fc@gerhold.net> (raw)
In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net>
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>
---
arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 64 ++++++++++++++++----------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index 59860a2223b8..14cb217a13c1 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -447,21 +447,21 @@ &smd_rpm_regulators {
vdd_l7-supply = <&pm8916_s4>;
s3 {
- regulator-min-microvolt = <375000>;
- regulator-max-microvolt = <1562000>;
+ regulator-min-microvolt = <1250000>;
+ regulator-max-microvolt = <1350000>;
};
s4 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1850000>;
+ regulator-max-microvolt = <2150000>;
regulator-always-on;
regulator-boot-on;
};
l1 {
- regulator-min-microvolt = <375000>;
- regulator-max-microvolt = <1525000>;
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
};
l2 {
@@ -470,13 +470,13 @@ l2 {
};
l4 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
};
l5 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
};
l6 {
@@ -485,45 +485,45 @@ l6 {
};
l7 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
};
l8 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <2900000>;
};
l9 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
};
l10 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
};
l11 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
regulator-allow-set-load;
regulator-system-load = <200000>;
};
l12 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
};
l13 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
};
l14 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
};
/**
@@ -531,14 +531,14 @@ l14 {
* for mezzanine boards
*/
l15 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
regulator-always-on;
};
l16 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
};
l17 {
@@ -547,8 +547,8 @@ l17 {
};
l18 {
- regulator-min-microvolt = <1750000>;
- regulator-max-microvolt = <3337000>;
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <2700000>;
};
};
--
2.40.1
next prev parent reply other threads:[~2023-05-17 18:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 18:48 [PATCH 0/8] arm64: dts: qcom: msm8916: Rework regulator constraints Stephan Gerhold
2023-05-17 18:48 ` Stephan Gerhold [this message]
2023-05-17 18:48 ` [PATCH 2/8] arm64: dts: qcom: apq8016-sbc: Fix 1.8V power rail on LS expansion Stephan Gerhold
2023-05-17 18:48 ` [PATCH 3/8] arm64: dts: qcom: msm8916: Fix regulator constraints Stephan Gerhold
2023-05-26 13:38 ` Bryan O'Donoghue
2023-05-26 14:03 ` Stephan Gerhold
2023-05-26 15:42 ` Bryan O'Donoghue
2023-05-26 15:43 ` Bryan O'Donoghue
2023-05-17 18:48 ` [PATCH 4/8] arm64: dts: qcom: msm8916: Disable audio codecs by default Stephan Gerhold
2023-05-17 18:48 ` [PATCH 5/8] arm64: dts: qcom: pm8916: Move default regulator "-supply"s Stephan Gerhold
2023-05-17 18:48 ` [PATCH 6/8] arm64: dts: qcom: msm8916-pm8916: Clarify purpose Stephan Gerhold
2023-05-17 18:48 ` [PATCH 7/8] arm64: dts: qcom: msm8916: Define regulator constraints next to usage Stephan Gerhold
2023-05-25 23:35 ` Konrad Dybcio
2023-05-26 6:47 ` Stephan Gerhold
2023-05-26 21:11 ` Konrad Dybcio
2023-05-27 9:22 ` Stephan Gerhold
2023-05-17 18:48 ` [PATCH 8/8] arm64: dts: qcom: msm8916-pm8916: Mark always-on regulators Stephan Gerhold
2023-05-25 23:39 ` Konrad Dybcio
2023-05-26 0:28 ` Konrad Dybcio
2023-05-26 6:36 ` Stephan Gerhold
2023-05-26 8:50 ` Konrad Dybcio
2023-05-26 12:55 ` Stephan Gerhold
2023-05-25 4:54 ` [PATCH 0/8] arm64: dts: qcom: msm8916: Rework regulator constraints Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230510-msm8916-regulators-v1-1-54d4960a05fc@gerhold.net \
--to=stephan@gerhold.net \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).