[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z1n8XYj0gzh3Q0U3@hu-bjorande-lv.qualcomm.com>
Date: Wed, 11 Dec 2024 12:55:57 -0800
From: Bjorn Andersson <bjorn.andersson@....qualcomm.com>
To: Tingguo Cheng <quic_tingguoc@...cinc.com>
Cc: tingweiz@....qualcomm.com, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, kernel@...cinc.com,
fenglinw@....qualcomm.com, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: qcs615-ride: Fixing power issue in LPM
On Wed, Dec 11, 2024 at 05:16:15PM +0800, Tingguo Cheng wrote:
> Change all LPM to HPM for regulators init-mode and disallowed setting
> mode. LPM mode provides at most 10/30mA current for consumers such as
> UFS,eMMC,PCIe. That caused problems because consumers take much more
> than that. At the same time, a lot of drivers didn't set load in code
> that makes it impossible for regulator framework to know exaclty when
> to switch mode.
>
Per https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
start with a problem description, then followed by the description of
the technical solution.
> Signed-off-by: Tingguo Cheng <quic_tingguoc@...cinc.com>
> ---
> At the beginning, The QCS615-ride device gets some power issues when
> enabling peripherals on the board as well as in the SoC. After figuring
> out the root cause which pointed to that drivers should tell the regula
> tor framework the required current the devices need separately, so the
> regulator framework can get to know when to switch modes to satisfy the
> requirment. But a lot of drivers did not set load for peripherals. Some
> did setting and some did not, which sometimes caused problem when LPM
> of regulators is allowed. E.g. LDO12 supplies UFS and USB. UFS sets the
> load of AmA(HPM), while USB PHY does not set any(0mA LPM). In this case,
> USB can encounter insufficient power supply when UFS's going to sleep.
Why did you choose to describe your problem in the portion that isn't
going to make it into the git history?
Perhaps worth trying to reduce the "story telling" nature of this, but
please do incorporate some of these things into the main commit message
- so that we capture it for future readers of the git log.
It would also be useful for that future reader to know that once there
exist an implementation (i.e. when Linux supports it) that actually do
manage load votes and there is power savings that can be shown, this
should be introduced again.
>
> There is some discussion about this:
> https://lore.kernel.org/all/5tbevb5wv2s43pccytv4qol4yhq4s7iw2mmqp23vt3ujqd6xev@hkioqmwoitbd/
It's okay to add this with a Link: tag.
Regards,
Bjorn
> ---
> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 52 +++++---------------------------
> 1 file changed, 8 insertions(+), 44 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcs615-ride.dts b/arch/arm64/boot/dts/qcom/qcs615-ride.dts
> index a25928933e2b66241258e418c6e5bc36c306101e..32db107dc660cff9d2ccbf19eceb5c5539c591a9 100644
> --- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts
> @@ -71,30 +71,21 @@ vreg_l1a: ldo1 {
> regulator-name = "vreg_l1a";
> regulator-min-microvolt = <488000>;
> regulator-max-microvolt = <852000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l2a: ldo2 {
> regulator-name = "vreg_l2a";
> regulator-min-microvolt = <1650000>;
> regulator-max-microvolt = <3100000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l3a: ldo3 {
> regulator-name = "vreg_l3a";
> regulator-min-microvolt = <1000000>;
> regulator-max-microvolt = <1248000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l5a: ldo5 {
> @@ -102,9 +93,6 @@ vreg_l5a: ldo5 {
> regulator-min-microvolt = <875000>;
> regulator-max-microvolt = <975000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l7a: ldo7 {
> @@ -112,9 +100,6 @@ vreg_l7a: ldo7 {
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <1900000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l8a: ldo8 {
> @@ -122,9 +107,6 @@ vreg_l8a: ldo8 {
> regulator-min-microvolt = <1150000>;
> regulator-max-microvolt = <1350000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l10a: ldo10 {
> @@ -132,59 +114,41 @@ vreg_l10a: ldo10 {
> regulator-min-microvolt = <2950000>;
> regulator-max-microvolt = <3312000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l11a: ldo11 {
> regulator-name = "vreg_l11a";
> regulator-min-microvolt = <1232000>;
> regulator-max-microvolt = <1260000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l12a: ldo12 {
> regulator-name = "vreg_l12a";
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <1890000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l13a: ldo13 {
> regulator-name = "vreg_l13a";
> regulator-min-microvolt = <3000000>;
> regulator-max-microvolt = <3230000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l15a: ldo15 {
> regulator-name = "vreg_l15a";
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <1904000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l16a: ldo16 {
> regulator-name = "vreg_l16a";
> regulator-min-microvolt = <3000000>;
> regulator-max-microvolt = <3312000>;
> - regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> - regulator-allow-set-load;
> - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> - RPMH_REGULATOR_MODE_HPM>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l17a: ldo17 {
>
> ---
> base-commit: 1b2ab8149928c1cea2d7eca30cd35bb7fe014053
> change-id: 20241211-bug-fix-qcs615-ride-dts-lpm-power-issue-44e33c8dfd3d
>
> Best regards,
> --
> Tingguo Cheng <quic_tingguoc@...cinc.com>
>
Powered by blists - more mailing lists