Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] Add PM6450 RPMh regulator support
@ 2026-11-24 10:43 SignKirigami
  2026-11-24 10:44 ` [PATCH 1/2] dt-bindings: regulator: qcom,rpmh: Add PM6450 SignKirigami
  2026-11-24 10:44 ` [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support SignKirigami
  0 siblings, 2 replies; 4+ messages in thread
From: SignKirigami @ 2026-11-24 10:43 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, devicetree

Add PM6450 RPMh regulator resources using the existing PMIC5
NLDO and PLDO models. LDO24 preserves its power-on-selected voltage and only
accepts enable, mode and load votes.

Signed-off-by: SignKirigami <prcups@krgm.moe>
---
SignKirigami (2):
      dt-bindings: regulator: qcom,rpmh: Add PM6450
      regulator: qcom-rpmh: Add PM6450 LDO support

 .../bindings/regulator/qcom,rpmh-regulator.yaml    |  2 ++
 drivers/regulator/qcom-rpmh-regulator.c            | 38 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
---
base-commit: 6eba525f2c14486c1a8cac2320ab202097212f5c
change-id: 20261124-netrani-pm6450-v1-17ae284974fa

Best regards,
--  
SignKirigami <prcups@krgm.moe>


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

* [PATCH 1/2] dt-bindings: regulator: qcom,rpmh: Add PM6450
  2026-11-24 10:43 [PATCH 0/2] Add PM6450 RPMh regulator support SignKirigami
@ 2026-11-24 10:44 ` SignKirigami
  2026-11-24 10:44 ` [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support SignKirigami
  1 sibling, 0 replies; 4+ messages in thread
From: SignKirigami @ 2026-11-24 10:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, devicetree

Add the PM6450 compatible and document its supported RPMh LDO
resources.

Signed-off-by: SignKirigami <prcups@krgm.moe>
---
 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index 9115885e7985b..ba3f50352773c 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -37,6 +37,7 @@ description: |
       For PM6150, smps1 - smps5, ldo1 - ldo19
       For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
       For PM6350, smps1 - smps5, ldo1 - ldo22
+      For PM6450, ldo5, ldo7, ldo13, ldo16, ldo19, ldo23 - ldo25
       For PM660, smps1 - smps6, ldo1 - ldo3, ldo5 - ldo19
       For PM660L, smps1 - smps3, smps5, ldo1 - ldo8, bob
       For PM7325, smps1 - smps8, ldo1 - ldo19
@@ -72,6 +73,7 @@ properties:
       - qcom,pm6150-rpmh-regulators
       - qcom,pm6150l-rpmh-regulators
       - qcom,pm6350-rpmh-regulators
+      - qcom,pm6450-rpmh-regulators
       - qcom,pm660-rpmh-regulators
       - qcom,pm660l-rpmh-regulators
       - qcom,pm7325-rpmh-regulators

-- 
2.56.0


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

* [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support
  2026-11-24 10:43 [PATCH 0/2] Add PM6450 RPMh regulator support SignKirigami
  2026-11-24 10:44 ` [PATCH 1/2] dt-bindings: regulator: qcom,rpmh: Add PM6450 SignKirigami
@ 2026-11-24 10:44 ` SignKirigami
  2026-11-24 11:03   ` sashiko-bot
  1 sibling, 1 reply; 4+ messages in thread
From: SignKirigami @ 2026-11-24 10:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson
  Cc: Krzysztof Kozlowski, linux-arm-msm, linux-kernel, devicetree

Add PM6450 LDO resources using the existing PMIC5 NLDO and PLDO
voltage models. Preserve the power-on voltage for LDO24.

Signed-off-by: SignKirigami <prcups@krgm.moe>
---
 drivers/regulator/qcom-rpmh-regulator.c | 38 +++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index da4764ffa6325..c397717dc0d6d 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -475,6 +475,15 @@ static const struct regulator_ops rpmh_regulator_vrm_bypass_ops = {
 	.get_bypass		= rpmh_regulator_vrm_get_bypass,
 };
 
+static const struct regulator_ops rpmh_regulator_vrm_no_voltage_ops = {
+	.enable			= rpmh_regulator_enable,
+	.disable		= rpmh_regulator_disable,
+	.is_enabled		= rpmh_regulator_is_enabled,
+	.set_mode		= rpmh_regulator_vrm_set_mode,
+	.get_mode		= rpmh_regulator_vrm_get_mode,
+	.get_optimum_mode	= rpmh_regulator_vrm_get_optimum_mode,
+};
+
 static const struct regulator_ops rpmh_regulator_xob_ops = {
 	.enable			= rpmh_regulator_enable,
 	.disable		= rpmh_regulator_disable,
@@ -1588,6 +1597,31 @@ static const struct rpmh_vreg_init_data pm6150l_vreg_data[] = {
 	{}
 };
 
+static const struct rpmh_vreg_hw_data pm6450_ldo_10ma_no_voltage = {
+	.regulator_type = VRM,
+	.ops = &rpmh_regulator_vrm_no_voltage_ops,
+	.hpm_min_load_uA = 10000,
+	.pmic_mode_map = pmic_mode_map_pmic5_ldo,
+	.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
+};
+
+static const struct rpmh_vreg_init_data pm6450_vreg_data[] = {
+	RPMH_VREG("ldo5", LDO, 5, &pmic5_nldo, NULL),
+	RPMH_VREG("ldo7", LDO, 7, &pmic5_nldo, NULL),
+	RPMH_VREG("ldo13", LDO, 13, &pmic5_nldo, NULL),
+	RPMH_VREG("ldo16", LDO, 16, &pmic5_nldo, NULL),
+	RPMH_VREG("ldo19", LDO, 19, &pmic5_pldo, NULL),
+	RPMH_VREG("ldo23", LDO, 23, &pmic5_pldo, NULL),
+	/*
+	 * UFS VCC is selected at power-on (2.4 V or 2.96 V) according to
+	 * the storage configuration. Preserve that selection and only vote
+	 * enable and mode.
+	 */
+	RPMH_VREG("ldo24", LDO, 24, &pm6450_ldo_10ma_no_voltage, NULL),
+	RPMH_VREG("ldo25", LDO, 25, &pmic5_pldo, NULL),
+	{},
+};
+
 static const struct rpmh_vreg_init_data pm6350_vreg_data[] = {
 	RPMH_VREG("smps1",  SMPS, 1,  &pmic5_ftsmps510, "vdd-s1"),
 	RPMH_VREG("smps2",  SMPS, 2,  &pmic5_hfsmps510, "vdd-s2"),
@@ -2056,6 +2090,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
 		.compatible = "qcom,pm6350-rpmh-regulators",
 		.data = pm6350_vreg_data,
 	},
+	{
+		.compatible = "qcom,pm6450-rpmh-regulators",
+		.data = pm6450_vreg_data,
+	},
 	{
 		.compatible = "qcom,pmc8180-rpmh-regulators",
 		.data = pm8150_vreg_data,

-- 
2.56.0


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

* Re: [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support
  2026-11-24 10:44 ` [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support SignKirigami
@ 2026-11-24 11:03   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-24 11:03 UTC (permalink / raw)
  To: SignKirigami; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] regulator: qcom-rpmh: ldo24 n_voltages=0 breaks UFS load voting
  and DT uV
--

commit 9fd0e1480b4f40cc51922b0274d428fec8c1448a
Author: SignKirigami <prcups@krgm.moe>

regulator: qcom-rpmh: Add PM6450 LDO support

This commit adds RPMh regulator definitions for the PM6450 PMIC LDOs,
using a no-voltage VRM configuration for LDO24 to preserve its power-on
voltage.

> diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
> index da4764ffa6325..c397717dc0d6d 100644
> --- a/drivers/regulator/qcom-rpmh-regulator.c
> +++ b/drivers/regulator/qcom-rpmh-regulator.c
> @@ -475,6 +475,15 @@ static const struct regulator_ops rpmh_regulator_vrm_bypass_ops = {
>  	.get_bypass		= rpmh_regulator_vrm_get_bypass,
>  };
>  
> +static const struct regulator_ops rpmh_regulator_vrm_no_voltage_ops = {
> +	.enable			= rpmh_regulator_enable,
> +	.disable		= rpmh_regulator_disable,
> +	.is_enabled		= rpmh_regulator_is_enabled,
> +	.set_mode		= rpmh_regulator_vrm_set_mode,
> +	.get_mode		= rpmh_regulator_vrm_get_mode,
> +	.get_optimum_mode	= rpmh_regulator_vrm_get_optimum_mode,
> +};
> +
>  static const struct regulator_ops rpmh_regulator_xob_ops = {
>  	.enable			= rpmh_regulator_enable,
>  	.disable		= rpmh_regulator_disable,
> @@ -1588,6 +1597,31 @@ static const struct rpmh_vreg_init_data pm6150l_vreg_data[] = {
>  	{}
>  };
>  
> +static const struct rpmh_vreg_hw_data pm6450_ldo_10ma_no_voltage = {
> +	.regulator_type = VRM,
> +	.ops = &rpmh_regulator_vrm_no_voltage_ops,
> +	.hpm_min_load_uA = 10000,
> +	.pmic_mode_map = pmic_mode_map_pmic5_ldo,
> +	.of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode,
> +};
> +
> +static const struct rpmh_vreg_init_data pm6450_vreg_data[] = {
> +	RPMH_VREG("ldo5", LDO, 5, &pmic5_nldo, NULL),
> +	RPMH_VREG("ldo7", LDO, 7, &pmic5_nldo, NULL),
> +	RPMH_VREG("ldo13", LDO, 13, &pmic5_nldo, NULL),
> +	RPMH_VREG("ldo16", LDO, 16, &pmic5_nldo, NULL),
> +	RPMH_VREG("ldo19", LDO, 19, &pmic5_pldo, NULL),
> +	RPMH_VREG("ldo23", LDO, 23, &pmic5_pldo, NULL),
> +	/*
> +	 * UFS VCC is selected at power-on (2.4 V or 2.96 V) according to
> +	 * the storage configuration. Preserve that selection and only vote
> +	 * enable and mode.
> +	 */
> +	RPMH_VREG("ldo24", LDO, 24, &pm6450_ldo_10ma_no_voltage, NULL),

[Severity: High]
Does leaving n_voltages unset on pm6450_ldo_10ma_no_voltage break UFS VCC
load-based mode switching and regulator registration when DT voltage
constraints are present?

pm6450_ldo_10ma_no_voltage sets hpm_min_load_uA and get_optimum_mode for
UFS load voting, but because n_voltages is 0, regulator_count_voltages()
returns -EINVAL and ufshcd_config_vreg() skips regulator_set_load():

drivers/ufs/core/ufshcd.c:ufshcd_config_vreg() {
	...
	if (regulator_count_voltages(vreg->reg) <= 0)
		return 0;

	return ufshcd_config_vreg_load(dev, vreg, on ? vreg->max_uA : 0);
}

In addition, rpmh_regulator_init_vreg() only populates rdesc.fixed_uV and
rdesc.n_voltages = 1 from DT constraints when regulator_type is XOB.  If a
DT node for ldo24 specifies regulator-min-microvolt and
regulator-max-microvolt, machine_constraints_voltage() calls
regulator_get_voltage_rdev(), which returns -EINVAL because
rpmh_regulator_vrm_no_voltage_ops has no voltage callbacks and fixed_uV is
0, failing rpmh_regulator_probe().

Using pmic5_pldo for ldo24 avoids both issues while still preserving the
power-on voltage read back by _rpmh_regulator_vrm_get_voltage() when the
DT node either omits microvolt constraints or specifies a range covering
2.4 V to 2.96 V.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-netrani-pm6450-v1-v1-0-1914da758d3d@krgm.moe?part=2

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

end of thread, other threads:[~2026-11-24 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 10:43 [PATCH 0/2] Add PM6450 RPMh regulator support SignKirigami
2026-11-24 10:44 ` [PATCH 1/2] dt-bindings: regulator: qcom,rpmh: Add PM6450 SignKirigami
2026-11-24 10:44 ` [PATCH 2/2] regulator: qcom-rpmh: Add PM6450 LDO support SignKirigami
2026-11-24 11:03   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox