devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>,
	Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] arm64: dts: qcom: msm8939: Define regulator constraints next to usage
Date: Wed, 14 Jun 2023 13:51:08 +0100	[thread overview]
Message-ID: <71a05574-64f0-1f00-19a4-8962d84ccecf@linaro.org> (raw)
In-Reply-To: <20230530-msm8939-regulators-v1-7-a3c3ac833567@gerhold.net>

On 14/06/2023 08:16, Stephan Gerhold wrote:
> Right now each MSM8939 device has a huge block of regulator constraints
> with allowed voltages for each regulator. For lack of better
> documentation these voltages are often copied as-is from the vendor
> device tree, without much extra thought.
> 
> Unfortunately, the voltages in the vendor device trees are often
> misleading or even wrong, e.g. because:
> 
>   - There is a large voltage range allowed and the actual voltage is
>     only set somewhere hidden in some messy vendor driver. This is often
>     the case for pm8916_{l14,l15,l16} because they have a broad range of
>     1.8-3.3V by default.
> 
>   - The voltage is actually wrong but thanks to the voltage constraints
>     in the RPM firmware it still ends up applying the correct voltage.
> 
> To have proper regulator constraints it is important to review them in
> context of the usage. The current setup in the MSM8939 device trees
> makes this quite hard because each device duplicates the standard
> voltages for components of the SoC and mixes those with minor
> device-specific additions and dummy voltages for completely unused
> regulators.
> 
> The actual usage of the regulators for the SoC components is in
> msm8939-pm8916.dtsi, so it can and should also define the related
> voltage constraints. These are not board-specific but defined in the
> MSM8939/PM8916 specification. There is no documentation available for
> MSM8939 but in practice it's almost identical to MSM8916.
> 
> Note that this commit does not make any functional change. All used
> regulators still have the same regulator constraints as before. Unused
> regulators do not have regulator constraints anymore because most of
> these were too broad or even entirely wrong. They should be added back
> with proper voltage constraints when there is an actual usage.
> 
> The same changes were already made for MSM8916 in commit b0a8f16ae4a0
> ("arm64: dts: qcom: msm8916: Define regulator constraints next to usage").
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>


It makes sense to replicate the 8916 change.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

  reply	other threads:[~2023-06-14 12:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  7:15 [PATCH 0/8] arm64: dts: qcom: msm8939: Rework regulator constraints Stephan Gerhold
2023-06-14  7:15 ` [PATCH 1/8] arm64: dts: qcom: msm8939-pm8916: Add missing pm8916_codec supplies Stephan Gerhold
2023-06-14 12:23   ` Bryan O'Donoghue
2023-06-14  7:16 ` [PATCH 2/8] arm64: dts: qcom: msm8939: Disable lpass_codec by default Stephan Gerhold
2023-06-14 12:25   ` Bryan O'Donoghue
2023-06-14  7:16 ` [PATCH 3/8] arm64: dts: qcom: msm8939-sony-tulip: Fix l10-l12 regulator voltages Stephan Gerhold
2023-06-14 12:26   ` Bryan O'Donoghue
2023-06-14  7:16 ` [PATCH 4/8] arm64: dts: qcom: msm8939-sony-tulip: Allow disabling pm8916_l6 Stephan Gerhold
2023-06-14 12:26   ` Bryan O'Donoghue
2023-06-14  7:16 ` [PATCH 5/8] arm64: dts: qcom: msm8939: Fix regulator constraints Stephan Gerhold
2023-06-14 12:48   ` Bryan O'Donoghue
2023-06-14  7:16 ` [PATCH 6/8] arm64: dts: qcom: msm8939-pm8916: Clarify purpose Stephan Gerhold
2023-06-14  7:16 ` [PATCH 7/8] arm64: dts: qcom: msm8939: Define regulator constraints next to usage Stephan Gerhold
2023-06-14 12:51   ` Bryan O'Donoghue [this message]
2023-06-14  7:16 ` [PATCH 8/8] arm64: dts: qcom: msm8939-pm8916: Mark always-on regulators Stephan Gerhold
2023-06-14 16:03 ` [PATCH 0/8] arm64: dts: qcom: msm8939: 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=71a05574-64f0-1f00-19a4-8962d84ccecf@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --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=stephan@gerhold.net \
    /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).