[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825213739.undn5q2ybzevtbtf@halaneylaptop>
Date: Thu, 25 Aug 2022 16:37:39 -0500
From: Andrew Halaney <ahalaney@...hat.com>
To: Douglas Anderson <dianders@...omium.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
Mark Brown <broonie@...nel.org>,
Andy Gross <agross@...nel.org>,
Johan Hovold <johan+linaro@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/7] arm64: dts: qcom: sc8280xp-thinkpad-x13s: Specify
which LDO modes are allowed
On Thu, Aug 25, 2022 at 09:42:02AM -0700, Douglas Anderson wrote:
> This board uses RPMH, specifies "regulator-allow-set-load" for LDOs,
> but doesn't specify any modes with "regulator-allowed-modes".
>
> Prior to commit efb0cb50c427 ("regulator: qcom-rpmh: Implement
> get_optimum_mode(), not set_load()") the above meant that we were able
> to set either LPM or HPM mode. After that commit (and fixes [1]) we'll
> be stuck at the initial mode. Discussion of this has resulted in the
> decision that the old dts files were wrong and should be fixed to
> fully restore old functionality.
>
> Let's re-enable the old functionality by fixing the dts.
>
> [1] https://lore.kernel.org/r/20220824142229.RFT.v2.2.I6f77860e5cd98bf5c67208fa9edda4a08847c304@changeid
>
> Fixes: 32c231385ed4 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
Reviewed-by: Andrew Halaney <ahalaney@...hat.com>
> ---
>
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 16c6e4d920bb..0c2534b4ec24 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -80,6 +80,9 @@ vreg_l3b: ldo3 {
> regulator-max-microvolt = <1200000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> regulator-boot-on;
> };
>
> @@ -89,6 +92,9 @@ vreg_l4b: ldo4 {
> regulator-max-microvolt = <912000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l6b: ldo6 {
> @@ -97,6 +103,9 @@ vreg_l6b: ldo6 {
> regulator-max-microvolt = <880000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> regulator-boot-on;
> regulator-always-on; // FIXME: VDD_A_EDP_0_0P9
> };
> @@ -112,6 +121,9 @@ vreg_l1c: ldo1 {
> regulator-max-microvolt = <1800000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l12c: ldo12 {
> @@ -120,6 +132,9 @@ vreg_l12c: ldo12 {
> regulator-max-microvolt = <1800000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l13c: ldo13 {
> @@ -128,6 +143,9 @@ vreg_l13c: ldo13 {
> regulator-max-microvolt = <3072000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
> };
>
> @@ -143,6 +161,9 @@ vreg_l3d: ldo3 {
> regulator-max-microvolt = <1200000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l4d: ldo4 {
> @@ -151,6 +172,9 @@ vreg_l4d: ldo4 {
> regulator-max-microvolt = <1200000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l7d: ldo7 {
> @@ -159,6 +183,9 @@ vreg_l7d: ldo7 {
> regulator-max-microvolt = <3072000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
>
> vreg_l9d: ldo9 {
> @@ -167,6 +194,9 @@ vreg_l9d: ldo9 {
> regulator-max-microvolt = <912000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> regulator-allow-set-load;
> + regulator-allowed-modes =
> + <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> };
> };
> };
> --
> 2.37.2.672.g94769d06f0-goog
>
Powered by blists - more mailing lists