Message ID | 20240123-sm8650_pm8010_support-v2-0-52f517b20a1d@quicinc.com |
---|---|
Headers | show |
Series | Add PM8010 regulators for sm8650 boards. | expand |
On 1/23/24 00:49, Fenglin Wu via B4 Relay wrote: > From: Fenglin Wu <quic_fenglinw@quicinc.com> > > Add PM8010 regulator device nodes for sm8650-mtp board. > > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> > Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> > --- > arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 118 ++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > index 9d916edb1c73..3791971efee6 100644 > --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > @@ -428,6 +428,124 @@ vreg_l3i_1p2: ldo3 { > RPMH_REGULATOR_MODE_HPM>; > }; > }; > + > + regulators-6 { > + compatible = "qcom,pm8010-rpmh-regulators"; > + qcom,pmic-id = "m"; > + > + vdd-l1-l2-supply = <&vreg_s1c_1p2>; > + vdd-l3-l4-supply = <&vreg_bob2>; > + vdd-l5-supply = <&vreg_s6c_1p8>; > + vdd-l6-l7-supply = <&vreg_bob1>; Please replace this line with: vdd-l6-supply = <&vreg_bob1>; vdd-l7-supply = <&vreg_bob1>; > + > + vreg_l1m_1p1: ldo1 { > + regulator-name = "vreg_l1m_1p1"; > + regulator-min-microvolt = <1104000>; > + regulator-max-microvolt = <1104000>; > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; Optional: PM8010 L1 and L2 physically support LPM vs HPM configuration. Therefore, these lines could be added here to allow such configuration by software at runtime: regulator-allow-set-load; regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM RPMH_REGULATOR_MODE_HPM>; > + }; > + > + vreg_l2m_1p056: ldo2 { > + regulator-name = "vreg_l2m_1p056"; > + regulator-min-microvolt = <1056000>; > + regulator-max-microvolt = <1056000>; > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; The same comment about LPM vs HPM configuration applies here. > + regulators-7 { > + compatible = "qcom,pm8010-rpmh-regulators"; > + qcom,pmic-id = "n"; > + > + vdd-l1-l2-supply = <&vreg_s1c_1p2>; > + vdd-l3-l4-supply = <&vreg_s6c_1p8>; > + vdd-l5-l6-supply = <&vreg_bob2>; Please replace this line with: vdd-l5-supply = <&vreg_bob2>; vdd-l6-supply = <&vreg_bob2>; > + vdd-l7-supply = <&vreg_bob1>; > + > + vreg_l1n_1p1: ldo1 { > + regulator-name = "vreg_l1n_1p1"; > + regulator-min-microvolt = <1104000>; > + regulator-max-microvolt = <1104000>; > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; The same comment about LPM vs HPM configuration applies here. > + }; > + > + vreg_l2n_1p056: ldo2 { > + regulator-name = "vreg_l2n_1p056"; > + regulator-min-microvolt = <1056000>; > + regulator-max-microvolt = <1056000>; > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; The same comment about LPM vs HPM configuration applies here. Thanks, David
On 1/24/24 20:15, David Collins wrote: > On 1/23/24 00:49, Fenglin Wu via B4 Relay wrote: >> From: Fenglin Wu <quic_fenglinw@quicinc.com> >> >> Add PM8010 regulator device nodes for sm8650-mtp board. >> >> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> >> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> >> --- >> arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 118 ++++++++++++++++++++++++++++++++ >> 1 file changed, 118 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> index 9d916edb1c73..3791971efee6 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> @@ -428,6 +428,124 @@ vreg_l3i_1p2: ldo3 { >> RPMH_REGULATOR_MODE_HPM>; >> }; >> }; >> + >> + regulators-6 { >> + compatible = "qcom,pm8010-rpmh-regulators"; >> + qcom,pmic-id = "m"; >> + >> + vdd-l1-l2-supply = <&vreg_s1c_1p2>; >> + vdd-l3-l4-supply = <&vreg_bob2>; >> + vdd-l5-supply = <&vreg_s6c_1p8>; >> + vdd-l6-l7-supply = <&vreg_bob1>; > > Please replace this line with: > > vdd-l6-supply = <&vreg_bob1>; > vdd-l7-supply = <&vreg_bob1>; > >> + >> + vreg_l1m_1p1: ldo1 { >> + regulator-name = "vreg_l1m_1p1"; >> + regulator-min-microvolt = <1104000>; >> + regulator-max-microvolt = <1104000>; >> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > > Optional: > PM8010 L1 and L2 physically support LPM vs HPM configuration. > Therefore, these lines could be added here to allow such configuration > by software at runtime: > > regulator-allow-set-load; > regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM > RPMH_REGULATOR_MODE_HPM>; David, I was under the impression that *all* RPMh regulators support modesetting. Would that be an incorrect assumption to make? Konrad
On 1/24/24 15:36, Konrad Dybcio wrote: > On 1/24/24 20:15, David Collins wrote: >> On 1/23/24 00:49, Fenglin Wu via B4 Relay wrote: >>> From: Fenglin Wu <quic_fenglinw@quicinc.com> >>> >>> Add PM8010 regulator device nodes for sm8650-mtp board. >>> >>> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> >>> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> ... >>> + >>> + vreg_l1m_1p1: ldo1 { >>> + regulator-name = "vreg_l1m_1p1"; >>> + regulator-min-microvolt = <1104000>; >>> + regulator-max-microvolt = <1104000>; >>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; >> >> Optional: >> PM8010 L1 and L2 physically support LPM vs HPM configuration. >> Therefore, these lines could be added here to allow such configuration >> by software at runtime: >> >> regulator-allow-set-load; >> regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM >> RPMH_REGULATOR_MODE_HPM>; > > David, > > I was under the impression that *all* RPMh regulators support > modesetting. Would that be an incorrect assumption to make? > > Konrad Hello Konrad, That is generally true. However, PM8010 LDOs 3-7 are a special case. These do not support LPM configuration. The limitation is enforced in the driver by this change: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2544631faa7f3244c9bcb9b511ca4f1a4f5a3ba0 . Take care, David
On 1/25/24 03:52, David Collins wrote: > On 1/24/24 15:36, Konrad Dybcio wrote: >> On 1/24/24 20:15, David Collins wrote: >>> On 1/23/24 00:49, Fenglin Wu via B4 Relay wrote: >>>> From: Fenglin Wu <quic_fenglinw@quicinc.com> >>>> >>>> Add PM8010 regulator device nodes for sm8650-mtp board. >>>> >>>> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> >>>> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> > ... >>>> + >>>> + vreg_l1m_1p1: ldo1 { >>>> + regulator-name = "vreg_l1m_1p1"; >>>> + regulator-min-microvolt = <1104000>; >>>> + regulator-max-microvolt = <1104000>; >>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; >>> >>> Optional: >>> PM8010 L1 and L2 physically support LPM vs HPM configuration. >>> Therefore, these lines could be added here to allow such configuration >>> by software at runtime: >>> >>> regulator-allow-set-load; >>> regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM >>> RPMH_REGULATOR_MODE_HPM>; >> >> David, >> >> I was under the impression that *all* RPMh regulators support >> modesetting. Would that be an incorrect assumption to make? >> >> Konrad > > Hello Konrad, > > That is generally true. However, PM8010 LDOs 3-7 are a special case. > These do not support LPM configuration. The limitation is enforced in > the driver by this change: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2544631faa7f3244c9bcb9b511ca4f1a4f5a3ba0 Oh, I never noticed that. Thanks a lot for confirming! Konrad
On Tue, 23 Jan 2024 16:49:23 +0800, Fenglin Wu wrote: > Add PM8010 RPMh regulators for sm8650-mtp and sm8650-qrd boards. > > Applied, thanks! [1/2] arm64: dts: qcom: sm8650-mtp: add PM8010 regulators commit: a2eb99176b102b8945de94dbd0d60b53a240fa6e [2/2] arm64: dts: qcom: sm8650-qrd: add PM8010 regulators commit: 4a8efd8a02efd9837da06b3995141f66b2c0e8dd Best regards,
Add PM8010 RPMh regulators for sm8650-mtp and sm8650-qrd boards. Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> --- Changes in v2: - Added Reviewed-by/Tested-by trailers - Link to v1: https://lore.kernel.org/r/20240123-sm8650_pm8010_support-v1-0-dec2224d5740@quicinc.com --- Fenglin Wu (2): arm64: dts: qcom: sm8650-mtp: add PM8010 regulators arm64: dts: qcom: sm8650-qrd: add PM8010 regulators arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 118 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 118 ++++++++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240123-sm8650_pm8010_support-750c05a5cd5d Best regards,