linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support
@ 2021-03-15 13:54 satya priya
  2021-03-15 13:54 ` [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Below patches are already picked
[3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck
[6/7] regulator: qcom-rpmh: Use correct buck for S1C regulator

Sending V2 with remaining patches after few corrections/comments answered.

This series is dependent on below series which adds DT files for SC7280 SoC
https://lore.kernel.org/patchwork/project/lkml/list/?series=488871

satya priya (5):
  regulator: qcom-rpmh: Add pmic5_ftsmps520 buck
  regulator: qcom-rpmh: Add PM7325/PMR735A regulator support
  arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp
  dt-bindings: regulator: Convert regulator bindings to YAML format
  dt-bindings: regulator: Add compatibles for PM7325/PMR735A

 .../bindings/regulator/qcom,rpmh-regulator.txt     | 180 -----------------
 .../bindings/regulator/qcom,rpmh-regulator.yaml    | 162 ++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7280-idp.dts            | 212 +++++++++++++++++++++
 drivers/regulator/qcom-rpmh-regulator.c            |  62 +++++-
 4 files changed, 435 insertions(+), 181 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
@ 2021-03-15 13:54 ` satya priya
  2021-03-16 19:22   ` Matthias Kaehlcke
  2021-03-15 13:54 ` [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support satya priya
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Add pmic5_ftsmps520 buck as this is required for PM7325
and PMR735A PMICs.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
 - No change.

 drivers/regulator/qcom-rpmh-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 79a554f..9471890 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -723,6 +723,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps510 = {
 	.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
 };
 
+static const struct rpmh_vreg_hw_data pmic5_ftsmps520 = {
+	.regulator_type = VRM,
+	.ops = &rpmh_regulator_vrm_ops,
+	.voltage_range = REGULATOR_LINEAR_RANGE(300000, 0, 263, 4000),
+	.n_voltages = 264,
+	.pmic_mode_map = pmic_mode_map_pmic5_smps,
+	.of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
+};
+
 static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
 	.regulator_type = VRM,
 	.ops = &rpmh_regulator_vrm_ops,
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
  2021-03-15 13:54 ` [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
@ 2021-03-15 13:54 ` satya priya
  2021-03-16 19:52   ` Matthias Kaehlcke
  2021-03-15 13:54 ` [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp satya priya
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Add support for PM7325/PMR735A regulators. This ensures
that consumers are able to modify the physical state of PMIC
regulators.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
 - No change.

 drivers/regulator/qcom-rpmh-regulator.c | 53 ++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 9471890..3509523 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-// Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
 
 #define pr_fmt(fmt) "%s: " fmt, __func__
 
@@ -1042,6 +1042,49 @@ static const struct rpmh_vreg_init_data pmx55_vreg_data[] = {
 	{},
 };
 
+static const struct rpmh_vreg_init_data pm7325_vreg_data[] = {
+	RPMH_VREG("smps1",  "smp%s1",  &pmic5_hfsmps510, "vdd-s1"),
+	RPMH_VREG("smps2",  "smp%s2",  &pmic5_ftsmps520, "vdd-s2"),
+	RPMH_VREG("smps3",  "smp%s3",  &pmic5_ftsmps520, "vdd-s3"),
+	RPMH_VREG("smps4",  "smp%s4",  &pmic5_ftsmps520, "vdd-s4"),
+	RPMH_VREG("smps5",  "smp%s5",  &pmic5_ftsmps520, "vdd-s5"),
+	RPMH_VREG("smps6",  "smp%s6",  &pmic5_ftsmps520, "vdd-s6"),
+	RPMH_VREG("smps7",  "smp%s7",  &pmic5_ftsmps520, "vdd-s7"),
+	RPMH_VREG("smps8",  "smp%s8",  &pmic5_hfsmps510, "vdd-s8"),
+	RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
+	RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_pldo,      "vdd-l2-l7"),
+	RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_nldo,      "vdd-l3"),
+	RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
+	RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_nldo,      "vdd-l5"),
+	RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_nldo,      "vdd-l6-l9-l10"),
+	RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      "vdd-l2-l7"),
+	RPMH_VREG("ldo8",   "ldo%s8",  &pmic5_nldo,      "vdd-l8"),
+	RPMH_VREG("ldo9",   "ldo%s9",  &pmic5_nldo,      "vdd-l6-l9-l10"),
+	RPMH_VREG("ldo10",  "ldo%s10", &pmic5_nldo,      "vdd-l6-l9-l10"),
+	RPMH_VREG("ldo11",  "ldo%s11", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
+	RPMH_VREG("ldo12",  "ldo%s12", &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
+	RPMH_VREG("ldo13",  "ldo%s13", &pmic5_nldo,      "vdd-l13"),
+	RPMH_VREG("ldo14",  "ldo%s14", &pmic5_nldo,      "vdd-l14-l16"),
+	RPMH_VREG("ldo15",  "ldo%s15", &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
+	RPMH_VREG("ldo16",  "ldo%s16", &pmic5_nldo,      "vdd-l14-l16"),
+	RPMH_VREG("ldo17",  "ldo%s17", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
+	RPMH_VREG("ldo18",  "ldo%s18", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
+	RPMH_VREG("ldo19",  "ldo%s19", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
+};
+
+static const struct rpmh_vreg_init_data pmr735a_vreg_data[] = {
+	RPMH_VREG("smps1",  "smp%s1",  &pmic5_ftsmps520, "vdd-s1"),
+	RPMH_VREG("smps2",  "smp%s2",  &pmic5_ftsmps520, "vdd-s2"),
+	RPMH_VREG("smps3",  "smp%s3",  &pmic5_hfsmps510, "vdd-s3"),
+	RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      "vdd-l1-l2"),
+	RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_nldo,      "vdd-l1-l2"),
+	RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_nldo,      "vdd-l3"),
+	RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_pldo_lv,   "vdd-l4"),
+	RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_nldo,      "vdd-l5-l6"),
+	RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_nldo,      "vdd-l5-l6"),
+	RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      "vdd-l7-bob"),
+};
+
 static int rpmh_regulator_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -1136,6 +1179,14 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
 		.compatible = "qcom,pmx55-rpmh-regulators",
 		.data = pmx55_vreg_data,
 	},
+	{
+		.compatible = "qcom,pm7325-rpmh-regulators",
+		.data = pm7325_vreg_data,
+	},
+	{
+		.compatible = "qcom,pmr735a-rpmh-regulators",
+		.data = pmr735a_vreg_data,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table);
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
  2021-03-15 13:54 ` [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
  2021-03-15 13:54 ` [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support satya priya
@ 2021-03-15 13:54 ` satya priya
  2021-03-16 23:26   ` Matthias Kaehlcke
  2021-03-15 13:54 ` [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Add regulator devices for SC7280 as RPMh regulators. This ensures
that consumers are able to modify the physical state of PMIC
regulators.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
 - Corrected the indentation for "compatible" and "qcom,pmic-id" under
   pm8350c-regulators as per Konrad's comment.

 arch/arm64/boot/dts/qcom/sc7280-idp.dts | 212 ++++++++++++++++++++++++++++++++
 1 file changed, 212 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
index 428f863..78effe5 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
@@ -22,6 +22,218 @@
 	};
 };
 
+&apps_rsc {
+	pm7325-regulators {
+		compatible = "qcom,pm7325-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vreg_s1b_1p8: smps1 {
+			regulator-min-microvolt = <1856000>;
+			regulator-max-microvolt = <2040000>;
+		};
+
+		vreg_s7b_0p9: smps7 {
+			regulator-min-microvolt = <535000>;
+			regulator-max-microvolt = <1120000>;
+		};
+
+		vreg_s8b_1p2: smps8 {
+			regulator-min-microvolt = <1256000>;
+			regulator-max-microvolt = <1500000>;
+		};
+
+		vreg_l1b_0p8: ldo1 {
+			regulator-min-microvolt = <825000>;
+			regulator-max-microvolt = <925000>;
+		};
+
+		vreg_l2b_3p0: ldo2 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+		};
+
+		vreg_l6b_1p2: ldo6 {
+			regulator-min-microvolt = <1140000>;
+			regulator-max-microvolt = <1260000>;
+		};
+
+		vreg_l7b_2p9: ldo7 {
+			regulator-min-microvolt = <2960000>;
+			regulator-max-microvolt = <2960000>;
+		};
+
+		vreg_l8b_0p9: ldo8 {
+			regulator-min-microvolt = <870000>;
+			regulator-max-microvolt = <970000>;
+		};
+
+		vreg_l9b_1p2: ldo9 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1304000>;
+		};
+
+		vreg_l11b_1p7: ldo11 {
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_l12b_0p8: ldo12 {
+			regulator-min-microvolt = <751000>;
+			regulator-max-microvolt = <824000>;
+		};
+
+		vreg_l13b_0p8: ldo13 {
+			regulator-min-microvolt = <530000>;
+			regulator-max-microvolt = <824000>;
+		};
+
+		vreg_l14b_1p2: ldo14 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1304000>;
+		};
+
+		vreg_l15b_0p8: ldo15 {
+			regulator-min-microvolt = <765000>;
+			regulator-max-microvolt = <1020000>;
+		};
+
+		vreg_l16b_1p2: ldo16 {
+			regulator-min-microvolt = <1100000>;
+			regulator-max-microvolt = <1300000>;
+		};
+
+		vreg_l17b_1p8: ldo17 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <1900000>;
+		};
+
+		vreg_l18b_1p8: ldo18 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_l19b_1p8: ldo19 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+	};
+
+	pm8350c-regulators {
+		compatible = "qcom,pm8350c-rpmh-regulators";
+		qcom,pmic-id = "c";
+
+		vreg_s1c_2p2: smps1 {
+			regulator-min-microvolt = <2190000>;
+			regulator-max-microvolt = <2210000>;
+		};
+
+		vreg_s9c_1p0: smps9 {
+			regulator-min-microvolt = <1010000>;
+			regulator-max-microvolt = <1170000>;
+		};
+
+		vreg_l1c_1p8: ldo1 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1980000>;
+		};
+
+		vreg_l2c_1p8: ldo2 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+		};
+
+		vreg_l3c_3p0: ldo3 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <3540000>;
+		};
+
+		vreg_l4c_1p8: ldo4 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		vreg_l5c_1p8: ldo5 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		vreg_l6c_2p9: ldo6 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2950000>;
+		};
+
+		vreg_l7c_3p0: ldo7 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3544000>;
+		};
+
+		vreg_l8c_1p8: ldo8 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_l9c_2p9: ldo9 {
+			regulator-min-microvolt = <2960000>;
+			regulator-max-microvolt = <2960000>;
+		};
+
+		vreg_l10c_0p8: ldo10 {
+			regulator-min-microvolt = <720000>;
+			regulator-max-microvolt = <1050000>;
+		};
+
+		vreg_l11c_2p8: ldo11 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <3544000>;
+		};
+
+		vreg_l12c_1p8: ldo12 {
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_l13c_3p0: ldo13 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+		};
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <3960000>;
+		};
+	};
+
+	pmr735a-regulators {
+		compatible = "qcom,pmr735a-rpmh-regulators";
+		qcom,pmic-id = "e";
+
+		vreg_l2e_1p2: ldo2 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_l3e_0p9: ldo3 {
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <1020000>;
+		};
+
+		vreg_l4e_1p7: ldo4 {
+			regulator-min-microvolt = <1776000>;
+			regulator-max-microvolt = <1890000>;
+		};
+
+		vreg_l5e_0p8: ldo5 {
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <800000>;
+		};
+
+		vreg_l6e_0p8: ldo6 {
+			regulator-min-microvolt = <480000>;
+			regulator-max-microvolt = <904000>;
+		};
+	};
+};
+
 &qupv3_id_0 {
 	status = "okay";
 };
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
                   ` (2 preceding siblings ...)
  2021-03-15 13:54 ` [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp satya priya
@ 2021-03-15 13:54 ` satya priya
  2021-03-16 17:54   ` Rob Herring
  2021-03-16 18:47   ` Matthias Kaehlcke
  2021-03-15 13:54 ` [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A satya priya
  2021-03-15 15:20 ` [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support Mark Brown
  5 siblings, 2 replies; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Convert regulator bindings from .txt to .yaml format.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
 - As per Mark's comment moved this patch to the end of series.
 - As per Rob's comments,  added flash and rgb bindings, dropped allOf and
   unused labels and fixed few other things.

 .../bindings/regulator/qcom,rpmh-regulator.txt     | 180 ---------------------
 .../bindings/regulator/qcom,rpmh-regulator.yaml    | 158 ++++++++++++++++++
 2 files changed, 158 insertions(+), 180 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
deleted file mode 100644
index ce1e043..0000000
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-Qualcomm Technologies, Inc. RPMh Regulators
-
-rpmh-regulator devices support PMIC regulator management via the Voltage
-Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.  The APPS
-processor communicates with these hardware blocks via a Resource State
-Coordinator (RSC) using command packets.  The VRM allows changing three
-parameters for a given regulator: enable state, output voltage, and operating
-mode.  The XOB allows changing only a single parameter for a given regulator:
-its enable state.  Despite its name, the XOB is capable of controlling the
-enable state of any PMIC peripheral.  It is used for clock buffers, low-voltage
-switches, and LDO/SMPS regulators which have a fixed voltage and mode.
-
-=======================
-Required Node Structure
-=======================
-
-RPMh regulators must be described in two levels of device nodes.  The first
-level describes the PMIC containing the regulators and must reside within an
-RPMh device node.  The second level describes each regulator within the PMIC
-which is to be used on the board.  Each of these regulators maps to a single
-RPMh resource.
-
-The names used for regulator nodes must match those supported by a given PMIC.
-Supported regulator node names:
-	PM8005:		smps1 - smps4
-	PM8009:		smps1 - smps2, ldo1 - ldo7
-	PM8150:		smps1 - smps10, ldo1 - ldo18
-	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
-	PM8350:		smps1 - smps12, ldo1 - ldo10,
-	PM8350C:	smps1 - smps10, ldo1 - ldo13, bob
-	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
-	PMI8998:	bob
-	PM6150:         smps1 - smps5, ldo1 - ldo19
-	PM6150L:        smps1 - smps8, ldo1 - ldo11, bob
-	PMX55:		smps1 - smps7, ldo1 - ldo16
-
-========================
-First Level Nodes - PMIC
-========================
-
-- compatible
-	Usage:      required
-	Value type: <string>
-	Definition: Must be one of below:
-		    "qcom,pm8005-rpmh-regulators"
-		    "qcom,pm8009-rpmh-regulators"
-		    "qcom,pm8009-1-rpmh-regulators"
-		    "qcom,pm8150-rpmh-regulators"
-		    "qcom,pm8150l-rpmh-regulators"
-		    "qcom,pm8350-rpmh-regulators"
-		    "qcom,pm8350c-rpmh-regulators"
-		    "qcom,pm8998-rpmh-regulators"
-		    "qcom,pmc8180-rpmh-regulators"
-		    "qcom,pmc8180c-rpmh-regulators"
-		    "qcom,pmi8998-rpmh-regulators"
-		    "qcom,pm6150-rpmh-regulators"
-		    "qcom,pm6150l-rpmh-regulators"
-		    "qcom,pmx55-rpmh-regulators"
-
-- qcom,pmic-id
-	Usage:      required
-	Value type: <string>
-	Definition: RPMh resource name suffix used for the regulators found on
-		    this PMIC.  Typical values: "a", "b", "c", "d", "e", "f".
-
-- vdd-s1-supply
-- vdd-s2-supply
-- vdd-s3-supply
-- vdd-s4-supply
-	Usage:      optional (PM8998 and PM8005 only)
-	Value type: <phandle>
-	Definition: phandle of the parent supply regulator of one or more of the
-		    regulators for this PMIC.
-
-- vdd-s5-supply
-- vdd-s6-supply
-- vdd-s7-supply
-- vdd-s8-supply
-- vdd-s9-supply
-- vdd-s10-supply
-- vdd-s11-supply
-- vdd-s12-supply
-- vdd-s13-supply
-- vdd-l1-l27-supply
-- vdd-l2-l8-l17-supply
-- vdd-l3-l11-supply
-- vdd-l4-l5-supply
-- vdd-l6-supply
-- vdd-l7-l12-l14-l15-supply
-- vdd-l9-supply
-- vdd-l10-l23-l25-supply
-- vdd-l13-l19-l21-supply
-- vdd-l16-l28-supply
-- vdd-l18-l22-supply
-- vdd-l20-l24-supply
-- vdd-l26-supply
-- vin-lvs-1-2-supply
-	Usage:      optional (PM8998 only)
-	Value type: <phandle>
-	Definition: phandle of the parent supply regulator of one or more of the
-		    regulators for this PMIC.
-
-- vdd-bob-supply
-	Usage:      optional (PMI8998 only)
-	Value type: <phandle>
-	Definition: BOB regulator parent supply phandle
-
-===============================
-Second Level Nodes - Regulators
-===============================
-
-- qcom,always-wait-for-ack
-	Usage:      optional
-	Value type: <empty>
-	Definition: Boolean flag which indicates that the application processor
-		    must wait for an ACK or a NACK from RPMh for every request
-		    sent for this regulator including those which are for a
-		    strictly lower power state.
-
-Other properties defined in Documentation/devicetree/bindings/regulator/regulator.txt
-may also be used.  regulator-initial-mode and regulator-allowed-modes may be
-specified for VRM regulators using mode values from
-include/dt-bindings/regulator/qcom,rpmh-regulator.h.  regulator-allow-bypass
-may be specified for BOB type regulators managed via VRM.
-regulator-allow-set-load may be specified for LDO type regulators managed via
-VRM.
-
-========
-Examples
-========
-
-#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
-
-&apps_rsc {
-	pm8998-rpmh-regulators {
-		compatible = "qcom,pm8998-rpmh-regulators";
-		qcom,pmic-id = "a";
-
-		vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
-
-		smps2 {
-			regulator-min-microvolt = <1100000>;
-			regulator-max-microvolt = <1100000>;
-		};
-
-		pm8998_s5: smps5 {
-			regulator-min-microvolt = <1904000>;
-			regulator-max-microvolt = <2040000>;
-		};
-
-		ldo7 {
-			regulator-min-microvolt = <1800000>;
-			regulator-max-microvolt = <1800000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-			regulator-allowed-modes =
-				<RPMH_REGULATOR_MODE_LPM
-				 RPMH_REGULATOR_MODE_HPM>;
-			regulator-allow-set-load;
-		};
-
-		lvs1 {
-			regulator-min-microvolt = <1800000>;
-			regulator-max-microvolt = <1800000>;
-		};
-	};
-
-	pmi8998-rpmh-regulators {
-		compatible = "qcom,pmi8998-rpmh-regulators";
-		qcom,pmic-id = "b";
-
-		bob {
-			regulator-min-microvolt = <3312000>;
-			regulator-max-microvolt = <3600000>;
-			regulator-allowed-modes =
-				<RPMH_REGULATOR_MODE_AUTO
-				 RPMH_REGULATOR_MODE_HPM>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
new file mode 100644
index 0000000..f29e3b7
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -0,0 +1,158 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/qcom,rpmh-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. RPMh Regulators
+
+maintainers:
+  - David Collins <collinsd@codeaurora.org>
+
+description: |
+    rpmh-regulator devices support PMIC regulator management via the Voltage
+    Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.
+    The APPS processor communicates with these hardware blocks via a
+    Resource State Coordinator (RSC) using command packets.  The VRM allows
+    changing three parameters for a given regulator, enable state, output
+    voltage, and operating mode.  The XOB allows changing only a single
+    parameter for a given regulator, its enable state.  Despite its name,
+    the XOB is capable of controlling the enable state of any PMIC peripheral.
+    It is used for clock buffers, low-voltage switches, and LDO/SMPS regulators
+    which have a fixed voltage and mode.
+
+    =======================
+    Required Node Structure
+    =======================
+
+    RPMh regulators must be described in two levels of device nodes.  The first
+    level describes the PMIC containing the regulators and must reside within an
+    RPMh device node.  The second level describes each regulator within the PMIC
+    which is to be used on the board.  Each of these regulators maps to a single
+    RPMh resource.
+
+    The names used for regulator nodes must match those supported by a given PMIC.
+    Supported regulator node names are
+      For PM8005, smps1 - smps4
+      For PM8009, smps1 - smps2, ldo1 - ldo7
+      For PM8150, smps1 - smps10, ldo1 - ldo18
+      For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
+      For PM8350, smps1 - smps12, ldo1 - ldo10
+      For PM8350C, smps1 - smps10, ldo1 - ldo13, bob
+      For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
+      For PMI8998, bob
+      For PM6150, smps1 - smps5, ldo1 - ldo19
+      For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
+      For PMX55, smps1 - smps7, ldo1 - ldo16
+
+properties:
+  compatible:
+    enum:
+      - qcom,pm8005-rpmh-regulators
+      - qcom,pm8009-rpmh-regulators
+      - qcom,pm8009-1-rpmh-regulators
+      - qcom,pm8150-rpmh-regulators
+      - qcom,pm8150l-rpmh-regulators
+      - qcom,pm8350-rpmh-regulators
+      - qcom,pm8350c-rpmh-regulators
+      - qcom,pm8998-rpmh-regulators
+      - qcom,pmi8998-rpmh-regulators
+      - qcom,pm6150-rpmh-regulators
+      - qcom,pm6150l-rpmh-regulators
+      - qcom,pmx55-rpmh-regulators
+
+  qcom,pmic-id:
+    description: |
+        RPMh resource name suffix used for the regulators found
+        on this PMIC.
+    $ref: /schemas/types.yaml#/definitions/string
+    enum: [ a, b, c, d, e, f ]
+
+  qcom,always-wait-for-ack:
+    description: |
+        Boolean flag which indicates that the application processor
+        must wait for an ACK or a NACK from RPMh for every request
+        sent for this regulator including those which are for a
+        strictly lower power state.
+    $ref: /schemas/types.yaml#/definitions/flag
+
+  vdd-flash-supply:
+    description: Input supply phandle of flash.
+
+  vdd-rgb-supply:
+    description: Input supply phandle of rgb.
+
+  vin-lvs-1-2-supply:
+    description: Input supply phandle of one or more regulators.
+
+  vdd-bob-supply:
+    description: BOB regulator parent supply phandle.
+
+  bob:
+    type: object
+    $ref: "regulator.yaml#"
+    description: BOB regulator node.
+
+patternProperties:
+  "^vdd-s([0-9]+)-supply$":
+    description: Input supply phandle(s) of one or more regulators.
+
+  "^vdd-(l[0-9]+[-]){1,5}supply$":
+    description: Input supply phandle(s) of one or more regulators.
+
+  "^(smps|ldo|lvs)[0-9]+$":
+    type: object
+    $ref: "regulator.yaml#"
+    description: smps/ldo regulator nodes(s).
+
+additionalProperties: false
+
+required:
+ - compatible
+ - qcom,pmic-id
+
+examples:
+  - |
+    #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+
+    pm8998-rpmh-regulators {
+        compatible = "qcom,pm8998-rpmh-regulators";
+        qcom,pmic-id = "a";
+
+        vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
+
+        smps2 {
+            regulator-min-microvolt = <1100000>;
+            regulator-max-microvolt = <1100000>;
+        };
+
+        ldo7 {
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+            regulator-allowed-modes =
+                <RPMH_REGULATOR_MODE_LPM
+                 RPMH_REGULATOR_MODE_HPM>;
+            regulator-allow-set-load;
+        };
+
+        lvs1 {
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+        };
+    };
+
+    pmi8998-rpmh-regulators {
+        compatible = "qcom,pmi8998-rpmh-regulators";
+        qcom,pmic-id = "b";
+
+        bob {
+            regulator-min-microvolt = <3312000>;
+            regulator-max-microvolt = <3600000>;
+            regulator-allowed-modes =
+                <RPMH_REGULATOR_MODE_AUTO
+                 RPMH_REGULATOR_MODE_HPM>;
+            regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+        };
+    };
+...
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
                   ` (3 preceding siblings ...)
  2021-03-15 13:54 ` [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
@ 2021-03-15 13:54 ` satya priya
  2021-03-16 23:32   ` Matthias Kaehlcke
  2021-03-15 15:20 ` [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support Mark Brown
  5 siblings, 1 reply; 16+ messages in thread
From: satya priya @ 2021-03-15 13:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Liam Girdwood, Mark Brown, Rob Herring, mka, rnayak,
	linux-arm-msm, linux-kernel, devicetree, kgunda, David Collins,
	satya priya

Add PM7325/PMR735A compatibles for Qualcomm SC7280 platform.

Signed-off-by: satya priya <skakit@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in V2:
 - No change.

 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index f29e3b7..bafd52a 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -44,6 +44,8 @@ description: |
       For PM6150, smps1 - smps5, ldo1 - ldo19
       For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
       For PMX55, smps1 - smps7, ldo1 - ldo16
+      For PM7325, smps1 - smps8, ldo1 - ldo19
+      For PMR735A, smps1 - smps3, ldo1 - ldo7
 
 properties:
   compatible:
@@ -60,6 +62,8 @@ properties:
       - qcom,pm6150-rpmh-regulators
       - qcom,pm6150l-rpmh-regulators
       - qcom,pmx55-rpmh-regulators
+      - qcom,pm7325-rpmh-regulators
+      - qcom,pmr735a-rpmh-regulators
 
   qcom,pmic-id:
     description: |
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support
  2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
                   ` (4 preceding siblings ...)
  2021-03-15 13:54 ` [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A satya priya
@ 2021-03-15 15:20 ` Mark Brown
  5 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2021-03-15 15:20 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Rob Herring, mka,
	rnayak, linux-arm-msm, linux-kernel, devicetree, kgunda,
	David Collins

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Mon, Mar 15, 2021 at 07:24:09PM +0530, satya priya wrote:
> Below patches are already picked
> [3/7] regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck
> [6/7] regulator: qcom-rpmh: Use correct buck for S1C regulator

Please do not submit new versions of already applied patches, please
submit incremental updates to the existing code.  Modifying existing
commits creates problems for other users building on top of those
commits so it's best practice to only change pubished git commits if
absolutely essential.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format
  2021-03-15 13:54 ` [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
@ 2021-03-16 17:54   ` Rob Herring
  2021-03-16 18:47   ` Matthias Kaehlcke
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-03-16 17:54 UTC (permalink / raw)
  To: satya priya
  Cc: David Collins, devicetree, kgunda, rnayak, Mark Brown,
	Bjorn Andersson, mka, linux-kernel, linux-arm-msm, Rob Herring,
	Andy Gross, Liam Girdwood

On Mon, 15 Mar 2021 19:24:13 +0530, satya priya wrote:
> Convert regulator bindings from .txt to .yaml format.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V2:
>  - As per Mark's comment moved this patch to the end of series.
>  - As per Rob's comments,  added flash and rgb bindings, dropped allOf and
>    unused labels and fixed few other things.
> 
>  .../bindings/regulator/qcom,rpmh-regulator.txt     | 180 ---------------------
>  .../bindings/regulator/qcom,rpmh-regulator.yaml    | 158 ++++++++++++++++++
>  2 files changed, 158 insertions(+), 180 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml:111:2: [warning] wrong indentation: expected 2 but found 1 (indentation)

dtschema/dtc warnings/errors:

See https://patchwork.ozlabs.org/patch/1453283

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format
  2021-03-15 13:54 ` [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
  2021-03-16 17:54   ` Rob Herring
@ 2021-03-16 18:47   ` Matthias Kaehlcke
  2021-03-19  7:58     ` skakit
  1 sibling, 1 reply; 16+ messages in thread
From: Matthias Kaehlcke @ 2021-03-16 18:47 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

Subject: dt-bindings: regulator: Convert regulator bindings to YAML format

Make sure to mention that this is about the RPMh regulators, not the
general regulator binding which was already converted.

On Mon, Mar 15, 2021 at 07:24:13PM +0530, satya priya wrote:
> Convert regulator bindings from .txt to .yaml format.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V2:
>  - As per Mark's comment moved this patch to the end of series.
>  - As per Rob's comments,  added flash and rgb bindings, dropped allOf and
>    unused labels and fixed few other things.
> 
>  .../bindings/regulator/qcom,rpmh-regulator.txt     | 180 ---------------------
>  .../bindings/regulator/qcom,rpmh-regulator.yaml    | 158 ++++++++++++++++++
>  2 files changed, 158 insertions(+), 180 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> deleted file mode 100644
> index ce1e043..0000000
> --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> +++ /dev/null
> @@ -1,180 +0,0 @@
> -Qualcomm Technologies, Inc. RPMh Regulators
> -
> -rpmh-regulator devices support PMIC regulator management via the Voltage
> -Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.  The APPS
> -processor communicates with these hardware blocks via a Resource State
> -Coordinator (RSC) using command packets.  The VRM allows changing three
> -parameters for a given regulator: enable state, output voltage, and operating
> -mode.  The XOB allows changing only a single parameter for a given regulator:
> -its enable state.  Despite its name, the XOB is capable of controlling the
> -enable state of any PMIC peripheral.  It is used for clock buffers, low-voltage
> -switches, and LDO/SMPS regulators which have a fixed voltage and mode.
> -
> -=======================
> -Required Node Structure
> -=======================
> -
> -RPMh regulators must be described in two levels of device nodes.  The first
> -level describes the PMIC containing the regulators and must reside within an
> -RPMh device node.  The second level describes each regulator within the PMIC
> -which is to be used on the board.  Each of these regulators maps to a single
> -RPMh resource.
> -
> -The names used for regulator nodes must match those supported by a given PMIC.
> -Supported regulator node names:
> -	PM8005:		smps1 - smps4
> -	PM8009:		smps1 - smps2, ldo1 - ldo7
> -	PM8150:		smps1 - smps10, ldo1 - ldo18
> -	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
> -	PM8350:		smps1 - smps12, ldo1 - ldo10,
> -	PM8350C:	smps1 - smps10, ldo1 - ldo13, bob
> -	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
> -	PMI8998:	bob
> -	PM6150:         smps1 - smps5, ldo1 - ldo19
> -	PM6150L:        smps1 - smps8, ldo1 - ldo11, bob
> -	PMX55:		smps1 - smps7, ldo1 - ldo16
> -
> -========================
> -First Level Nodes - PMIC
> -========================
> -
> -- compatible
> -	Usage:      required
> -	Value type: <string>
> -	Definition: Must be one of below:
> -		    "qcom,pm8005-rpmh-regulators"
> -		    "qcom,pm8009-rpmh-regulators"
> -		    "qcom,pm8009-1-rpmh-regulators"
> -		    "qcom,pm8150-rpmh-regulators"
> -		    "qcom,pm8150l-rpmh-regulators"
> -		    "qcom,pm8350-rpmh-regulators"
> -		    "qcom,pm8350c-rpmh-regulators"
> -		    "qcom,pm8998-rpmh-regulators"
> -		    "qcom,pmc8180-rpmh-regulators"
> -		    "qcom,pmc8180c-rpmh-regulators"
> -		    "qcom,pmi8998-rpmh-regulators"
> -		    "qcom,pm6150-rpmh-regulators"
> -		    "qcom,pm6150l-rpmh-regulators"
> -		    "qcom,pmx55-rpmh-regulators"
> -
> -- qcom,pmic-id
> -	Usage:      required
> -	Value type: <string>
> -	Definition: RPMh resource name suffix used for the regulators found on
> -		    this PMIC.  Typical values: "a", "b", "c", "d", "e", "f".
> -
> -- vdd-s1-supply
> -- vdd-s2-supply
> -- vdd-s3-supply
> -- vdd-s4-supply
> -	Usage:      optional (PM8998 and PM8005 only)
> -	Value type: <phandle>
> -	Definition: phandle of the parent supply regulator of one or more of the
> -		    regulators for this PMIC.
> -
> -- vdd-s5-supply
> -- vdd-s6-supply
> -- vdd-s7-supply
> -- vdd-s8-supply
> -- vdd-s9-supply
> -- vdd-s10-supply
> -- vdd-s11-supply
> -- vdd-s12-supply
> -- vdd-s13-supply
> -- vdd-l1-l27-supply
> -- vdd-l2-l8-l17-supply
> -- vdd-l3-l11-supply
> -- vdd-l4-l5-supply
> -- vdd-l6-supply
> -- vdd-l7-l12-l14-l15-supply
> -- vdd-l9-supply
> -- vdd-l10-l23-l25-supply
> -- vdd-l13-l19-l21-supply
> -- vdd-l16-l28-supply
> -- vdd-l18-l22-supply
> -- vdd-l20-l24-supply
> -- vdd-l26-supply
> -- vin-lvs-1-2-supply
> -	Usage:      optional (PM8998 only)
> -	Value type: <phandle>
> -	Definition: phandle of the parent supply regulator of one or more of the
> -		    regulators for this PMIC.
> -
> -- vdd-bob-supply
> -	Usage:      optional (PMI8998 only)
> -	Value type: <phandle>
> -	Definition: BOB regulator parent supply phandle
> -
> -===============================
> -Second Level Nodes - Regulators
> -===============================
> -
> -- qcom,always-wait-for-ack
> -	Usage:      optional
> -	Value type: <empty>
> -	Definition: Boolean flag which indicates that the application processor
> -		    must wait for an ACK or a NACK from RPMh for every request
> -		    sent for this regulator including those which are for a
> -		    strictly lower power state.
> -
> -Other properties defined in Documentation/devicetree/bindings/regulator/regulator.txt
> -may also be used.  regulator-initial-mode and regulator-allowed-modes may be
> -specified for VRM regulators using mode values from
> -include/dt-bindings/regulator/qcom,rpmh-regulator.h.  regulator-allow-bypass
> -may be specified for BOB type regulators managed via VRM.
> -regulator-allow-set-load may be specified for LDO type regulators managed via
> -VRM.
> -
> -========
> -Examples
> -========
> -
> -#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> -
> -&apps_rsc {
> -	pm8998-rpmh-regulators {
> -		compatible = "qcom,pm8998-rpmh-regulators";
> -		qcom,pmic-id = "a";
> -
> -		vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
> -
> -		smps2 {
> -			regulator-min-microvolt = <1100000>;
> -			regulator-max-microvolt = <1100000>;
> -		};
> -
> -		pm8998_s5: smps5 {
> -			regulator-min-microvolt = <1904000>;
> -			regulator-max-microvolt = <2040000>;
> -		};
> -
> -		ldo7 {
> -			regulator-min-microvolt = <1800000>;
> -			regulator-max-microvolt = <1800000>;
> -			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> -			regulator-allowed-modes =
> -				<RPMH_REGULATOR_MODE_LPM
> -				 RPMH_REGULATOR_MODE_HPM>;
> -			regulator-allow-set-load;
> -		};
> -
> -		lvs1 {
> -			regulator-min-microvolt = <1800000>;
> -			regulator-max-microvolt = <1800000>;
> -		};
> -	};
> -
> -	pmi8998-rpmh-regulators {
> -		compatible = "qcom,pmi8998-rpmh-regulators";
> -		qcom,pmic-id = "b";
> -
> -		bob {
> -			regulator-min-microvolt = <3312000>;
> -			regulator-max-microvolt = <3600000>;
> -			regulator-allowed-modes =
> -				<RPMH_REGULATOR_MODE_AUTO
> -				 RPMH_REGULATOR_MODE_HPM>;
> -			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> new file mode 100644
> index 0000000..f29e3b7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> @@ -0,0 +1,158 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/qcom,rpmh-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Technologies, Inc. RPMh Regulators
> +
> +maintainers:
> +  - David Collins <collinsd@codeaurora.org>
> +
> +description: |
> +    rpmh-regulator devices support PMIC regulator management via the Voltage
> +    Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.
> +    The APPS processor communicates with these hardware blocks via a
> +    Resource State Coordinator (RSC) using command packets.  The VRM allows
> +    changing three parameters for a given regulator, enable state, output
> +    voltage, and operating mode.  The XOB allows changing only a single
> +    parameter for a given regulator, its enable state.  Despite its name,
> +    the XOB is capable of controlling the enable state of any PMIC peripheral.
> +    It is used for clock buffers, low-voltage switches, and LDO/SMPS regulators
> +    which have a fixed voltage and mode.
> +
> +    =======================
> +    Required Node Structure
> +    =======================
> +
> +    RPMh regulators must be described in two levels of device nodes.  The first
> +    level describes the PMIC containing the regulators and must reside within an
> +    RPMh device node.  The second level describes each regulator within the PMIC
> +    which is to be used on the board.  Each of these regulators maps to a single
> +    RPMh resource.
> +
> +    The names used for regulator nodes must match those supported by a given PMIC.
> +    Supported regulator node names are
> +      For PM8005, smps1 - smps4
> +      For PM8009, smps1 - smps2, ldo1 - ldo7
> +      For PM8150, smps1 - smps10, ldo1 - ldo18
> +      For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
> +      For PM8350, smps1 - smps12, ldo1 - ldo10
> +      For PM8350C, smps1 - smps10, ldo1 - ldo13, bob
> +      For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
> +      For PMI8998, bob
> +      For PM6150, smps1 - smps5, ldo1 - ldo19
> +      For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
> +      For PMX55, smps1 - smps7, ldo1 - ldo16
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,pm8005-rpmh-regulators
> +      - qcom,pm8009-rpmh-regulators
> +      - qcom,pm8009-1-rpmh-regulators
> +      - qcom,pm8150-rpmh-regulators
> +      - qcom,pm8150l-rpmh-regulators
> +      - qcom,pm8350-rpmh-regulators
> +      - qcom,pm8350c-rpmh-regulators
> +      - qcom,pm8998-rpmh-regulators
> +      - qcom,pmi8998-rpmh-regulators
> +      - qcom,pm6150-rpmh-regulators
> +      - qcom,pm6150l-rpmh-regulators
> +      - qcom,pmx55-rpmh-regulators
> +
> +  qcom,pmic-id:
> +    description: |
> +        RPMh resource name suffix used for the regulators found
> +        on this PMIC.
> +    $ref: /schemas/types.yaml#/definitions/string
> +    enum: [ a, b, c, d, e, f ]
> +
> +  qcom,always-wait-for-ack:
> +    description: |
> +        Boolean flag which indicates that the application processor
> +        must wait for an ACK or a NACK from RPMh for every request
> +        sent for this regulator including those which are for a
> +        strictly lower power state.
> +    $ref: /schemas/types.yaml#/definitions/flag
> +
> +  vdd-flash-supply:
> +    description: Input supply phandle of flash.
> +
> +  vdd-rgb-supply:
> +    description: Input supply phandle of rgb.
> +
> +  vin-lvs-1-2-supply:
> +    description: Input supply phandle of one or more regulators.
> +
> +  vdd-bob-supply:
> +    description: BOB regulator parent supply phandle.
> +
> +  bob:
> +    type: object
> +    $ref: "regulator.yaml#"
> +    description: BOB regulator node.
> +
> +patternProperties:
> +  "^vdd-s([0-9]+)-supply$":
> +    description: Input supply phandle(s) of one or more regulators.
> +
> +  "^vdd-(l[0-9]+[-]){1,5}supply$":
> +    description: Input supply phandle(s) of one or more regulators.
> +
> +  "^(smps|ldo|lvs)[0-9]+$":
> +    type: object
> +    $ref: "regulator.yaml#"
> +    description: smps/ldo regulator nodes(s).
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - qcom,pmic-id
> +
> +examples:
> +  - |
> +    #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +
> +    pm8998-rpmh-regulators {
> +        compatible = "qcom,pm8998-rpmh-regulators";
> +        qcom,pmic-id = "a";
> +
> +        vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
> +
> +        smps2 {
> +            regulator-min-microvolt = <1100000>;
> +            regulator-max-microvolt = <1100000>;
> +        };
> +
> +        ldo7 {
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +            regulator-allowed-modes =
> +                <RPMH_REGULATOR_MODE_LPM
> +                 RPMH_REGULATOR_MODE_HPM>;
> +            regulator-allow-set-load;
> +        };
> +
> +        lvs1 {
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +        };
> +    };
> +
> +    pmi8998-rpmh-regulators {
> +        compatible = "qcom,pmi8998-rpmh-regulators";
> +        qcom,pmic-id = "b";
> +
> +        bob {
> +            regulator-min-microvolt = <3312000>;
> +            regulator-max-microvolt = <3600000>;
> +            regulator-allowed-modes =
> +                <RPMH_REGULATOR_MODE_AUTO
> +                 RPMH_REGULATOR_MODE_HPM>;
> +            regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
> +        };
> +    };
> +...
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck
  2021-03-15 13:54 ` [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
@ 2021-03-16 19:22   ` Matthias Kaehlcke
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Kaehlcke @ 2021-03-16 19:22 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

On Mon, Mar 15, 2021 at 07:24:10PM +0530, satya priya wrote:
> Add pmic5_ftsmps520 buck as this is required for PM7325
> and PMR735A PMICs.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support
  2021-03-15 13:54 ` [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support satya priya
@ 2021-03-16 19:52   ` Matthias Kaehlcke
  2021-03-19  7:57     ` skakit
  0 siblings, 1 reply; 16+ messages in thread
From: Matthias Kaehlcke @ 2021-03-16 19:52 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

On Mon, Mar 15, 2021 at 07:24:11PM +0530, satya priya wrote:
> Add support for PM7325/PMR735A regulators. This ensures
> that consumers are able to modify the physical state of PMIC
> regulators.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V2:
>  - No change.
> 
>  drivers/regulator/qcom-rpmh-regulator.c | 53 ++++++++++++++++++++++++++++++++-
>  1 file changed, 52 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
> index 9471890..3509523 100644
> --- a/drivers/regulator/qcom-rpmh-regulator.c
> +++ b/drivers/regulator/qcom-rpmh-regulator.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -// Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
> +// Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
>  
>  #define pr_fmt(fmt) "%s: " fmt, __func__
>  
> @@ -1042,6 +1042,49 @@ static const struct rpmh_vreg_init_data pmx55_vreg_data[] = {
>  	{},
>  };
>  
> +static const struct rpmh_vreg_init_data pm7325_vreg_data[] = {
> +	RPMH_VREG("smps1",  "smp%s1",  &pmic5_hfsmps510, "vdd-s1"),
> +	RPMH_VREG("smps2",  "smp%s2",  &pmic5_ftsmps520, "vdd-s2"),
> +	RPMH_VREG("smps3",  "smp%s3",  &pmic5_ftsmps520, "vdd-s3"),
> +	RPMH_VREG("smps4",  "smp%s4",  &pmic5_ftsmps520, "vdd-s4"),
> +	RPMH_VREG("smps5",  "smp%s5",  &pmic5_ftsmps520, "vdd-s5"),
> +	RPMH_VREG("smps6",  "smp%s6",  &pmic5_ftsmps520, "vdd-s6"),
> +	RPMH_VREG("smps7",  "smp%s7",  &pmic5_ftsmps520, "vdd-s7"),
> +	RPMH_VREG("smps8",  "smp%s8",  &pmic5_hfsmps510, "vdd-s8"),
> +	RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
> +	RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_pldo,      "vdd-l2-l7"),
> +	RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_nldo,      "vdd-l3"),
> +	RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
> +	RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_nldo,      "vdd-l5"),
> +	RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_nldo,      "vdd-l6-l9-l10"),
> +	RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      "vdd-l2-l7"),
> +	RPMH_VREG("ldo8",   "ldo%s8",  &pmic5_nldo,      "vdd-l8"),
> +	RPMH_VREG("ldo9",   "ldo%s9",  &pmic5_nldo,      "vdd-l6-l9-l10"),
> +	RPMH_VREG("ldo10",  "ldo%s10", &pmic5_nldo,      "vdd-l6-l9-l10"),
> +	RPMH_VREG("ldo11",  "ldo%s11", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
> +	RPMH_VREG("ldo12",  "ldo%s12", &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
> +	RPMH_VREG("ldo13",  "ldo%s13", &pmic5_nldo,      "vdd-l13"),
> +	RPMH_VREG("ldo14",  "ldo%s14", &pmic5_nldo,      "vdd-l14-l16"),
> +	RPMH_VREG("ldo15",  "ldo%s15", &pmic5_nldo,      "vdd-l1-l4-l12-l15"),
> +	RPMH_VREG("ldo16",  "ldo%s16", &pmic5_nldo,      "vdd-l14-l16"),
> +	RPMH_VREG("ldo17",  "ldo%s17", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
> +	RPMH_VREG("ldo18",  "ldo%s18", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
> +	RPMH_VREG("ldo19",  "ldo%s19", &pmic5_pldo_lv,   "vdd-l11-l17-l18-l19"),
> +};

Could you help me understand these funky supply names? I see other RPMh
regulators also have them, so they are probably totally fine, but it
isn't clear to me what exactly the names represent. Apparently the LDO
itself is in the supply name, but many LDOs also list others.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp
  2021-03-15 13:54 ` [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp satya priya
@ 2021-03-16 23:26   ` Matthias Kaehlcke
  2021-03-19  8:00     ` skakit
  0 siblings, 1 reply; 16+ messages in thread
From: Matthias Kaehlcke @ 2021-03-16 23:26 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

On Mon, Mar 15, 2021 at 07:24:12PM +0530, satya priya wrote:
> Add regulator devices for SC7280 as RPMh regulators. This ensures
> that consumers are able to modify the physical state of PMIC
> regulators.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V2:
>  - Corrected the indentation for "compatible" and "qcom,pmic-id" under
>    pm8350c-regulators as per Konrad's comment.
> 
>  arch/arm64/boot/dts/qcom/sc7280-idp.dts | 212 ++++++++++++++++++++++++++++++++
>  1 file changed, 212 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> index 428f863..78effe5 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> @@ -22,6 +22,218 @@
>  	};
>  };
>  
> +&apps_rsc {
> +	pm7325-regulators {
> +		compatible = "qcom,pm7325-rpmh-regulators";
> +		qcom,pmic-id = "b";
> +
> +		vreg_s1b_1p8: smps1 {
> +			regulator-min-microvolt = <1856000>;

For most LDOs their 'Active minimum voltage' is specified as their
minimum, however for S1B and S8B it's the 'Nominal voltage. Is that
intentional?

There might be a misunderstanding on my side what the values in the
datasheet actually mean, see my comment at the end.

> +			regulator-max-microvolt = <2040000>;
> +		};
> +
> +		vreg_s7b_0p9: smps7 {
> +			regulator-min-microvolt = <535000>;

According to the datasheet the minimum voltage of the S7B regulator
is 904 mV.

> +			regulator-max-microvolt = <1120000>;
> +		};
> +
> +		vreg_s8b_1p2: smps8 {
> +			regulator-min-microvolt = <1256000>;
> +			regulator-max-microvolt = <1500000>;
> +		};
> +
> +		vreg_l1b_0p8: ldo1 {
> +			regulator-min-microvolt = <825000>;
> +			regulator-max-microvolt = <925000>;
> +		};
> +
> +		vreg_l2b_3p0: ldo2 {
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +		};

Another question that came up for sc7180-trogdor regulators,
whose core regulator config was derived from sc7180-idp: the
label suggests that this regulator is supposed to supply 3V,
however the range spans from 2.7 to 3.54V. Shouldn't it be
narrower around 3V? Same for other some regulators.

> +
> +		vreg_l6b_1p2: ldo6 {
> +			regulator-min-microvolt = <1140000>;

The datasheet says the minimum for L6B is 1.2V.

> +			regulator-max-microvolt = <1260000>;
> +		};
> +
> +		vreg_l7b_2p9: ldo7 {
> +			regulator-min-microvolt = <2960000>;
> +			regulator-max-microvolt = <2960000>;
> +		};

This regulator has a fixed voltage in difference to the others, why
is that?

> +
> +		vreg_l8b_0p9: ldo8 {
> +			regulator-min-microvolt = <870000>;
> +			regulator-max-microvolt = <970000>;
> +		};
> +
> +		vreg_l9b_1p2: ldo9 {
> +			regulator-min-microvolt = <1080000>;
> +			regulator-max-microvolt = <1304000>;
> +		};
> +
> +		vreg_l11b_1p7: ldo11 {
> +			regulator-min-microvolt = <1504000>;

The datasheet says the mininum voltage for L11B is 1.776V.

> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_l12b_0p8: ldo12 {
> +			regulator-min-microvolt = <751000>;
> +			regulator-max-microvolt = <824000>;
> +		};
> +
> +		vreg_l13b_0p8: ldo13 {
> +			regulator-min-microvolt = <530000>;
> +			regulator-max-microvolt = <824000>;

The max for L13B is 880mV, is this a copy and paste from L12B?

> +		};
> +
> +		vreg_l14b_1p2: ldo14 {
> +			regulator-min-microvolt = <1080000>;

The datasheet says the mininum voltage for L14B is 1.2V.

> +			regulator-max-microvolt = <1304000>;
> +		};
> +
> +		vreg_l15b_0p8: ldo15 {
> +			regulator-min-microvolt = <765000>;
> +			regulator-max-microvolt = <1020000>;
> +		};
> +
> +		vreg_l16b_1p2: ldo16 {
> +			regulator-min-microvolt = <1100000>;

The datasheet says the mininum voltage for L16B is 1.2V.

> +			regulator-max-microvolt = <1300000>;
> +		};
> +
> +		vreg_l17b_1p8: ldo17 {
> +			regulator-min-microvolt = <1700000>;

The datasheet says the mininum voltage for L17B is 1.8V.

> +			regulator-max-microvolt = <1900000>;
> +		};
> +
> +		vreg_l18b_1p8: ldo18 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_l19b_1p8: ldo19 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;

Is a fixed voltage intentional here?

> +		};
> +	};
> +
> +	pm8350c-regulators {
> +		compatible = "qcom,pm8350c-rpmh-regulators";

I can't find the datasheet for this chip, skipping this part.


> +	pmr735a-regulators {
> +		compatible = "qcom,pmr735a-rpmh-regulators";
> +		qcom,pmic-id = "e";
> +
> +		vreg_l2e_1p2: ldo2 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		vreg_l3e_0p9: ldo3 {
> +			regulator-min-microvolt = <912000>;
> +			regulator-max-microvolt = <1020000>;

According to the datasheet min and max for L3E is 1.2V. The
datasheet lists different voltages for 'SM8350 lineup' and
'SM8xyz' lineup though, does that mean that the voltages
aren't limitations of what the regulators can provide but
what their consumers support?

There are also deltas for the remaining regulators, but now
I'm in doubt about what the info in the datasheet actually
means.

> +		};
> +
> +		vreg_l4e_1p7: ldo4 {
> +			regulator-min-microvolt = <1776000>;
> +			regulator-max-microvolt = <1890000>;
> +		};
> +
> +		vreg_l5e_0p8: ldo5 {
> +			regulator-min-microvolt = <800000>;
> +			regulator-max-microvolt = <800000>;
> +		};
> +
> +		vreg_l6e_0p8: ldo6 {
> +			regulator-min-microvolt = <480000>;
> +			regulator-max-microvolt = <904000>;
> +		};
> +	};
> +};
> +
>  &qupv3_id_0 {
>  	status = "okay";
>  };

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A
  2021-03-15 13:54 ` [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A satya priya
@ 2021-03-16 23:32   ` Matthias Kaehlcke
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Kaehlcke @ 2021-03-16 23:32 UTC (permalink / raw)
  To: satya priya
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

On Mon, Mar 15, 2021 at 07:24:14PM +0530, satya priya wrote:
> Add PM7325/PMR735A compatibles for Qualcomm SC7280 platform.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> Acked-by: Rob Herring <robh@kernel.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support
  2021-03-16 19:52   ` Matthias Kaehlcke
@ 2021-03-19  7:57     ` skakit
  0 siblings, 0 replies; 16+ messages in thread
From: skakit @ 2021-03-19  7:57 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

Hi Matthias,

Thanks for reviewing the patches!

On 2021-03-17 01:22, Matthias Kaehlcke wrote:
> On Mon, Mar 15, 2021 at 07:24:11PM +0530, satya priya wrote:
>> Add support for PM7325/PMR735A regulators. This ensures
>> that consumers are able to modify the physical state of PMIC
>> regulators.
>> 
>> Signed-off-by: satya priya <skakit@codeaurora.org>
>> ---
>> Changes in V2:
>>  - No change.
>> 
>>  drivers/regulator/qcom-rpmh-regulator.c | 53 
>> ++++++++++++++++++++++++++++++++-
>>  1 file changed, 52 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/regulator/qcom-rpmh-regulator.c 
>> b/drivers/regulator/qcom-rpmh-regulator.c
>> index 9471890..3509523 100644
>> --- a/drivers/regulator/qcom-rpmh-regulator.c
>> +++ b/drivers/regulator/qcom-rpmh-regulator.c
>> @@ -1,5 +1,5 @@
>>  // SPDX-License-Identifier: GPL-2.0
>> -// Copyright (c) 2018-2019, The Linux Foundation. All rights 
>> reserved.
>> +// Copyright (c) 2018-2021, The Linux Foundation. All rights 
>> reserved.
>> 
>>  #define pr_fmt(fmt) "%s: " fmt, __func__
>> 
>> @@ -1042,6 +1042,49 @@ static const struct rpmh_vreg_init_data 
>> pmx55_vreg_data[] = {
>>  	{},
>>  };
>> 
>> +static const struct rpmh_vreg_init_data pm7325_vreg_data[] = {
>> +	RPMH_VREG("smps1",  "smp%s1",  &pmic5_hfsmps510, "vdd-s1"),
>> +	RPMH_VREG("smps2",  "smp%s2",  &pmic5_ftsmps520, "vdd-s2"),
>> +	RPMH_VREG("smps3",  "smp%s3",  &pmic5_ftsmps520, "vdd-s3"),
>> +	RPMH_VREG("smps4",  "smp%s4",  &pmic5_ftsmps520, "vdd-s4"),
>> +	RPMH_VREG("smps5",  "smp%s5",  &pmic5_ftsmps520, "vdd-s5"),
>> +	RPMH_VREG("smps6",  "smp%s6",  &pmic5_ftsmps520, "vdd-s6"),
>> +	RPMH_VREG("smps7",  "smp%s7",  &pmic5_ftsmps520, "vdd-s7"),
>> +	RPMH_VREG("smps8",  "smp%s8",  &pmic5_hfsmps510, "vdd-s8"),
>> +	RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      
>> "vdd-l1-l4-l12-l15"),
>> +	RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_pldo,      "vdd-l2-l7"),
>> +	RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_nldo,      "vdd-l3"),
>> +	RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_nldo,      
>> "vdd-l1-l4-l12-l15"),
>> +	RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_nldo,      "vdd-l5"),
>> +	RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_nldo,      "vdd-l6-l9-l10"),
>> +	RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      "vdd-l2-l7"),
>> +	RPMH_VREG("ldo8",   "ldo%s8",  &pmic5_nldo,      "vdd-l8"),
>> +	RPMH_VREG("ldo9",   "ldo%s9",  &pmic5_nldo,      "vdd-l6-l9-l10"),
>> +	RPMH_VREG("ldo10",  "ldo%s10", &pmic5_nldo,      "vdd-l6-l9-l10"),
>> +	RPMH_VREG("ldo11",  "ldo%s11", &pmic5_pldo_lv,   
>> "vdd-l11-l17-l18-l19"),
>> +	RPMH_VREG("ldo12",  "ldo%s12", &pmic5_nldo,      
>> "vdd-l1-l4-l12-l15"),
>> +	RPMH_VREG("ldo13",  "ldo%s13", &pmic5_nldo,      "vdd-l13"),
>> +	RPMH_VREG("ldo14",  "ldo%s14", &pmic5_nldo,      "vdd-l14-l16"),
>> +	RPMH_VREG("ldo15",  "ldo%s15", &pmic5_nldo,      
>> "vdd-l1-l4-l12-l15"),
>> +	RPMH_VREG("ldo16",  "ldo%s16", &pmic5_nldo,      "vdd-l14-l16"),
>> +	RPMH_VREG("ldo17",  "ldo%s17", &pmic5_pldo_lv,   
>> "vdd-l11-l17-l18-l19"),
>> +	RPMH_VREG("ldo18",  "ldo%s18", &pmic5_pldo_lv,   
>> "vdd-l11-l17-l18-l19"),
>> +	RPMH_VREG("ldo19",  "ldo%s19", &pmic5_pldo_lv,   
>> "vdd-l11-l17-l18-l19"),
>> +};
> 
> Could you help me understand these funky supply names? I see other RPMh
> regulators also have them, so they are probably totally fine, but it
> isn't clear to me what exactly the names represent. Apparently the LDO
> itself is in the supply name, but many LDOs also list others.

These supply names are taken from powergrid. They are basically the 
parent supply names.
For example ldo2 and ldo7 have the parent supply vdd-l2-l7. Hence we 
gave supply name vdd-l2-l7 for these 2 regulators.

Thanks,
Satya Priya

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format
  2021-03-16 18:47   ` Matthias Kaehlcke
@ 2021-03-19  7:58     ` skakit
  0 siblings, 0 replies; 16+ messages in thread
From: skakit @ 2021-03-19  7:58 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins

On 2021-03-17 00:17, Matthias Kaehlcke wrote:
> Subject: dt-bindings: regulator: Convert regulator bindings to YAML 
> format
> 
> Make sure to mention that this is about the RPMh regulators, not the
> general regulator binding which was already converted.
> 

Okay, will change the commit message.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp
  2021-03-16 23:26   ` Matthias Kaehlcke
@ 2021-03-19  8:00     ` skakit
  0 siblings, 0 replies; 16+ messages in thread
From: skakit @ 2021-03-19  8:00 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
	Rob Herring, rnayak, linux-arm-msm, linux-kernel, devicetree,
	kgunda, David Collins, sbhanu

On 2021-03-17 04:56, Matthias Kaehlcke wrote:
> On Mon, Mar 15, 2021 at 07:24:12PM +0530, satya priya wrote:
>> Add regulator devices for SC7280 as RPMh regulators. This ensures
>> that consumers are able to modify the physical state of PMIC
>> regulators.
>> 
>> Signed-off-by: satya priya <skakit@codeaurora.org>
>> ---
>> Changes in V2:
>>  - Corrected the indentation for "compatible" and "qcom,pmic-id" under
>>    pm8350c-regulators as per Konrad's comment.
>> 
>>  arch/arm64/boot/dts/qcom/sc7280-idp.dts | 212 
>> ++++++++++++++++++++++++++++++++
>>  1 file changed, 212 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts 
>> b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> index 428f863..78effe5 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> @@ -22,6 +22,218 @@
>>  	};
>>  };
>> 
>> +&apps_rsc {
>> +	pm7325-regulators {
>> +		compatible = "qcom,pm7325-rpmh-regulators";
>> +		qcom,pmic-id = "b";
>> +
>> +		vreg_s1b_1p8: smps1 {
>> +			regulator-min-microvolt = <1856000>;
> 
> For most LDOs their 'Active minimum voltage' is specified as their
> minimum, however for S1B and S8B it's the 'Nominal voltage. Is that
> intentional?
> 
> There might be a misunderstanding on my side what the values in the
> datasheet actually mean, see my comment at the end.
> 
>> +			regulator-max-microvolt = <2040000>;
>> +		};
>> +
>> +		vreg_s7b_0p9: smps7 {
>> +			regulator-min-microvolt = <535000>;
> 
> According to the datasheet the minimum voltage of the S7B regulator
> is 904 mV.
> 
>> +			regulator-max-microvolt = <1120000>;
>> +		};
>> +
>> +		vreg_s8b_1p2: smps8 {
>> +			regulator-min-microvolt = <1256000>;
>> +			regulator-max-microvolt = <1500000>;
>> +		};
>> +
>> +		vreg_l1b_0p8: ldo1 {
>> +			regulator-min-microvolt = <825000>;
>> +			regulator-max-microvolt = <925000>;
>> +		};
>> +
>> +		vreg_l2b_3p0: ldo2 {
>> +			regulator-min-microvolt = <2700000>;
>> +			regulator-max-microvolt = <3544000>;
>> +		};
> 
> Another question that came up for sc7180-trogdor regulators,
> whose core regulator config was derived from sc7180-idp: the
> label suggests that this regulator is supposed to supply 3V,
> however the range spans from 2.7 to 3.54V. Shouldn't it be
> narrower around 3V? Same for other some regulators.
> 

The label names are given based on the default voltage value(a typical 
value supported by any usecase) which is specified in the Powergrid. For 
this regulator the default voltage is 3.072V, whereas the range is 2.7 
to 3.5V

>> +
>> +		vreg_l6b_1p2: ldo6 {
>> +			regulator-min-microvolt = <1140000>;
> 
> The datasheet says the minimum for L6B is 1.2V.
> 
>> +			regulator-max-microvolt = <1260000>;
>> +		};
>> +
>> +		vreg_l7b_2p9: ldo7 {
>> +			regulator-min-microvolt = <2960000>;
>> +			regulator-max-microvolt = <2960000>;
>> +		};
> 
> This regulator has a fixed voltage in difference to the others, why
> is that?
> 

L7B and L19B regulators are used for EMMC. EMMC probe is failing if the 
value is not fixed to default voltage(2.96V for L7B). Similar issue was 
seen on Rennell as well, [1] is the upstream change for the same posted 
by storage team.

[1] https://lore.kernel.org/patchwork/patch/1176993/

>> +
>> +		vreg_l8b_0p9: ldo8 {
>> +			regulator-min-microvolt = <870000>;
>> +			regulator-max-microvolt = <970000>;
>> +		};
>> +
>> +		vreg_l9b_1p2: ldo9 {
>> +			regulator-min-microvolt = <1080000>;
>> +			regulator-max-microvolt = <1304000>;
>> +		};
>> +
>> +		vreg_l11b_1p7: ldo11 {
>> +			regulator-min-microvolt = <1504000>;
> 
> The datasheet says the mininum voltage for L11B is 1.776V.
> 
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_l12b_0p8: ldo12 {
>> +			regulator-min-microvolt = <751000>;
>> +			regulator-max-microvolt = <824000>;
>> +		};
>> +
>> +		vreg_l13b_0p8: ldo13 {
>> +			regulator-min-microvolt = <530000>;
>> +			regulator-max-microvolt = <824000>;
> 
> The max for L13B is 880mV, is this a copy and paste from L12B?
> 
>> +		};
>> +
>> +		vreg_l14b_1p2: ldo14 {
>> +			regulator-min-microvolt = <1080000>;
> 
> The datasheet says the mininum voltage for L14B is 1.2V.
> 
>> +			regulator-max-microvolt = <1304000>;
>> +		};
>> +
>> +		vreg_l15b_0p8: ldo15 {
>> +			regulator-min-microvolt = <765000>;
>> +			regulator-max-microvolt = <1020000>;
>> +		};
>> +
>> +		vreg_l16b_1p2: ldo16 {
>> +			regulator-min-microvolt = <1100000>;
> 
> The datasheet says the mininum voltage for L16B is 1.2V.
> 
>> +			regulator-max-microvolt = <1300000>;
>> +		};
>> +
>> +		vreg_l17b_1p8: ldo17 {
>> +			regulator-min-microvolt = <1700000>;
> 
> The datasheet says the mininum voltage for L17B is 1.8V.
> 
>> +			regulator-max-microvolt = <1900000>;
>> +		};
>> +
>> +		vreg_l18b_1p8: ldo18 {
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_l19b_1p8: ldo19 {
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <1800000>;
> 
> Is a fixed voltage intentional here?
> 

Same explanation as l7b regulator(see above).

>> +		};
>> +	};
>> +
>> +	pm8350c-regulators {
>> +		compatible = "qcom,pm8350c-rpmh-regulators";
> 
> I can't find the datasheet for this chip, skipping this part.
> 
> 
>> +	pmr735a-regulators {
>> +		compatible = "qcom,pmr735a-rpmh-regulators";
>> +		qcom,pmic-id = "e";
>> +
>> +		vreg_l2e_1p2: ldo2 {
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +		};
>> +
>> +		vreg_l3e_0p9: ldo3 {
>> +			regulator-min-microvolt = <912000>;
>> +			regulator-max-microvolt = <1020000>;
> 
> According to the datasheet min and max for L3E is 1.2V. The
> datasheet lists different voltages for 'SM8350 lineup' and
> 'SM8xyz' lineup though, does that mean that the voltages
> aren't limitations of what the regulators can provide but
> what their consumers support?
> 
> There are also deltas for the remaining regulators, but now
> I'm in doubt about what the info in the datasheet actually
> means.
> 

The min/max voltages here are as per min/max values mentioned in AOP, 
which are finalized after multiple discussions with chipset architecture 
team. The same is followed for all chipsets.

>> +		};
>> +
>> +		vreg_l4e_1p7: ldo4 {
>> +			regulator-min-microvolt = <1776000>;
>> +			regulator-max-microvolt = <1890000>;
>> +		};
>> +
>> +		vreg_l5e_0p8: ldo5 {
>> +			regulator-min-microvolt = <800000>;
>> +			regulator-max-microvolt = <800000>;
>> +		};
>> +
>> +		vreg_l6e_0p8: ldo6 {
>> +			regulator-min-microvolt = <480000>;
>> +			regulator-max-microvolt = <904000>;
>> +		};
>> +	};
>> +};
>> +
>>  &qupv3_id_0 {
>>  	status = "okay";
>>  };

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-03-19  8:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 13:54 [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support satya priya
2021-03-15 13:54 ` [PATCH V2 1/5] regulator: qcom-rpmh: Add pmic5_ftsmps520 buck satya priya
2021-03-16 19:22   ` Matthias Kaehlcke
2021-03-15 13:54 ` [PATCH V2 2/5] regulator: qcom-rpmh: Add PM7325/PMR735A regulator support satya priya
2021-03-16 19:52   ` Matthias Kaehlcke
2021-03-19  7:57     ` skakit
2021-03-15 13:54 ` [PATCH V2 3/5] arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp satya priya
2021-03-16 23:26   ` Matthias Kaehlcke
2021-03-19  8:00     ` skakit
2021-03-15 13:54 ` [PATCH V2 4/5] dt-bindings: regulator: Convert regulator bindings to YAML format satya priya
2021-03-16 17:54   ` Rob Herring
2021-03-16 18:47   ` Matthias Kaehlcke
2021-03-19  7:58     ` skakit
2021-03-15 13:54 ` [PATCH V2 5/5] dt-bindings: regulator: Add compatibles for PM7325/PMR735A satya priya
2021-03-16 23:32   ` Matthias Kaehlcke
2021-03-15 15:20 ` [PATCH V2 0/5] Add PM7325/PM8350C/PMR735A regulator support Mark Brown

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).