diff mbox series

regulator: qcom-rpmh-regulator: add support for pmc8380 regulators

Message ID 20241125-topic-hamoa-pmc8380-rpmh-regulators-v1-1-695c44ea8586@linaro.org
State New
Headers show
Series regulator: qcom-rpmh-regulator: add support for pmc8380 regulators | expand

Commit Message

Neil Armstrong Nov. 25, 2024, 8:24 a.m. UTC
Add the PMC8380 regulator data found on the Snapdragon X Elite platforms.
The tables are imported from the Linux driver.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/power/regulator/qcom-rpmh-regulator.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)


---
base-commit: 7fe55182d9263a62e18b450c97bdf0b8031e5667
change-id: 20241125-topic-hamoa-pmc8380-rpmh-regulators-2b9460fcd7bd

Best regards,

Comments

Jaehoon Chung Nov. 25, 2024, 11 a.m. UTC | #1
> -----Original Message-----
> From: Neil Armstrong <neil.armstrong@linaro.org>
> Sent: Monday, November 25, 2024 5:25 PM
> To: Jaehoon Chung <jh80.chung@samsung.com>; Caleb Connolly <caleb.connolly@linaro.org>; Sumit Garg
> <sumit.garg@linaro.org>; Tom Rini <trini@konsulko.com>
> Cc: u-boot-qcom@groups.io; u-boot@lists.denx.de; Neil Armstrong <neil.armstrong@linaro.org>
> Subject: [PATCH] regulator: qcom-rpmh-regulator: add support for pmc8380 regulators
>
> Add the PMC8380 regulator data found on the Snapdragon X Elite platforms.
> The tables are imported from the Linux driver.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/regulator/qcom-rpmh-regulator.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/power/regulator/qcom-rpmh-regulator.c b/drivers/power/regulator/qcom-rpmh-
> regulator.c
> index 2dc261d83e3727a5b2f72a5d13c1ef17a9677a8c..70df51b5fa4ee4001b7eff6facc80957ada84391 100644
> --- a/drivers/power/regulator/qcom-rpmh-regulator.c
> +++ b/drivers/power/regulator/qcom-rpmh-regulator.c
> @@ -536,6 +536,21 @@ static const struct rpmh_vreg_init_data pm8550ve_vreg_data[] = {
>  	{}
>  };
>
> +static const struct rpmh_vreg_init_data pmc8380_vreg_data[] = {
> +	RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps525_lv, "vdd-s1"),
> +	RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps525_lv, "vdd-s2"),
> +	RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps525_lv, "vdd-s3"),
> +	RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps525_mv, "vdd-s4"),
> +	RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps525_lv, "vdd-s5"),
> +	RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps525_lv, "vdd-s6"),
> +	RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps525_lv, "vdd-s7"),
> +	RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps525_lv, "vdd-s8"),
> +	RPMH_VREG("ldo1",  "ldo%s1", &pmic5_nldo515,   "vdd-l1"),
> +	RPMH_VREG("ldo2",  "ldo%s2", &pmic5_nldo515,   "vdd-l2"),
> +	RPMH_VREG("ldo3",  "ldo%s3", &pmic5_nldo515,   "vdd-l3"),
> +	{}
> +};
> +
>  /* probe an individual regulator */
>  static int rpmh_regulator_probe(struct udevice *dev)
>  {
> @@ -662,6 +677,10 @@ static const struct udevice_id rpmh_regulator_ids[] = {
>  		.compatible = "qcom,pm8550vs-rpmh-regulators",
>  		.data = (ulong)pm8550vs_vreg_data,
>  	},
> +	{
> +		.compatible = "qcom,pmc8380-rpmh-regulators",
> +		.data = (ulong)pmc8380_vreg_data,
> +	},
>  	{ /* sentinal */ },
>  };
>
>
> ---
> base-commit: 7fe55182d9263a62e18b450c97bdf0b8031e5667
> change-id: 20241125-topic-hamoa-pmc8380-rpmh-regulators-2b9460fcd7bd
>
> Best regards,
> --
> Neil Armstrong <neil.armstrong@linaro.org>
diff mbox series

Patch

diff --git a/drivers/power/regulator/qcom-rpmh-regulator.c b/drivers/power/regulator/qcom-rpmh-regulator.c
index 2dc261d83e3727a5b2f72a5d13c1ef17a9677a8c..70df51b5fa4ee4001b7eff6facc80957ada84391 100644
--- a/drivers/power/regulator/qcom-rpmh-regulator.c
+++ b/drivers/power/regulator/qcom-rpmh-regulator.c
@@ -536,6 +536,21 @@  static const struct rpmh_vreg_init_data pm8550ve_vreg_data[] = {
 	{}
 };
 
+static const struct rpmh_vreg_init_data pmc8380_vreg_data[] = {
+	RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps525_lv, "vdd-s1"),
+	RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps525_lv, "vdd-s2"),
+	RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps525_lv, "vdd-s3"),
+	RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps525_mv, "vdd-s4"),
+	RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps525_lv, "vdd-s5"),
+	RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps525_lv, "vdd-s6"),
+	RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps525_lv, "vdd-s7"),
+	RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps525_lv, "vdd-s8"),
+	RPMH_VREG("ldo1",  "ldo%s1", &pmic5_nldo515,   "vdd-l1"),
+	RPMH_VREG("ldo2",  "ldo%s2", &pmic5_nldo515,   "vdd-l2"),
+	RPMH_VREG("ldo3",  "ldo%s3", &pmic5_nldo515,   "vdd-l3"),
+	{}
+};
+
 /* probe an individual regulator */
 static int rpmh_regulator_probe(struct udevice *dev)
 {
@@ -662,6 +677,10 @@  static const struct udevice_id rpmh_regulator_ids[] = {
 		.compatible = "qcom,pm8550vs-rpmh-regulators",
 		.data = (ulong)pm8550vs_vreg_data,
 	},
+	{
+		.compatible = "qcom,pmc8380-rpmh-regulators",
+		.data = (ulong)pmc8380_vreg_data,
+	},
 	{ /* sentinal */ },
 };