[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825213503.2appw3rguwnnuxw6@halaneylaptop>
Date: Thu, 25 Aug 2022 16:35:03 -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 3/7] arm64: dts: qcom: sc8280xp-crd: Specify which LDO
modes are allowed
On Thu, Aug 25, 2022 at 09:42:01AM -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: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
Reviewed-by: Andrew Halaney <ahalaney@...hat.com>
> ---
>
> arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 33 +++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index d6f272c71a47..f64d58e371bd 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -88,6 +88,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;
> regulator-always-on;
> };
> @@ -98,6 +101,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 {
> @@ -106,6 +112,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;
> };
> };
> @@ -120,6 +129,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_l7c: ldo7 {
> @@ -128,6 +140,9 @@ vreg_l7c: ldo7 {
> regulator-max-microvolt = <2504000>;
> 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 {
> @@ -136,6 +151,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>;
> };
> };
>
> @@ -151,6 +169,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 {
> @@ -159,6 +180,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_l6d: ldo6 {
> @@ -167,6 +191,9 @@ vreg_l6d: 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>;
> };
>
> vreg_l7d: ldo7 {
> @@ -175,6 +202,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 {
> @@ -183,6 +213,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