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
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 <[email protected]>
---
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
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.
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 <[email protected]>
> ---
> 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.
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 <[email protected]>
>> ---
>> 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