* [PATCH V4 0/2] Add regulator load support for QMP UFS PHY
@ 2025-08-30 7:03 Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY Nitin Rawat
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Nitin Rawat @ 2025-08-30 7:03 UTC (permalink / raw)
To: vkoul, kishon, mani, neil.armstrong, dmitry.baryshkov, andersson,
konradybcio
Cc: linux-arm-msm, linux-phy, linux-kernel, Nitin Rawat
The series improves regulator handling in the QMP UFS PHY driver and
adds load configuration support for all supported platforms.
On some SoCs, regulators are shared between the UFS PHY and other IP
blocks. To maintain stability and power efficiency, the regulator
framework needs to know the UFS PHY's peak load, as it determines the
regulator's operating mode.
The first update replaces devm_regulator_bulk_get() with
devm_regulator_bulk_get_const(), converts the regulator name array to
a bulk data structure, and uses the init_load_uA field to automatically
apply regulator_set_load() before the first enable.
The second update adds platform-specific load settings for all supported
platform to ensure proper power management where regulators are shared.
Changes from V3:
1. Addressed Mani and Dmitry comment to include phy and pll init_load_uA
for all platform.
Changes from v2:
1. Addressed Dmitry's comment to replace devm_regulator_bulk_get() with
devm_regulator_bulk_get_const.
2. inline the qmp_ufs_vreg_init() function
Changes from v1:
1. Addressed comments to move load configuration from device tree to
hardcoded, per-compatible data within the driver.
2. Accordingly updated commit text to reflect the same.
3. Addressed Manivannan's comment to avoid initialization of load.
Nitin Rawat (2):
phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY
phy: qcom-qmp-ufs: Add PHY and PLL regulator load
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 159 ++++++++++++++++--------
1 file changed, 108 insertions(+), 51 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V4 1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY
2025-08-30 7:03 [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Nitin Rawat
@ 2025-08-30 7:03 ` Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load Nitin Rawat
2025-09-01 17:08 ` [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Vinod Koul
2 siblings, 0 replies; 5+ messages in thread
From: Nitin Rawat @ 2025-08-30 7:03 UTC (permalink / raw)
To: vkoul, kishon, mani, neil.armstrong, dmitry.baryshkov, andersson,
konradybcio
Cc: linux-arm-msm, linux-phy, linux-kernel, Nitin Rawat
From: Nitin Rawat <quic_nitirawa@quicinc.com>
On certain SoCs, power regulators are shared between the QMP UFS PHY
and other IP blocks. To ensure proper operation, the regulator
framework must be informed of the UFS PHY's load requirements.
This is essential because the regulator's operating mode—whether Low
Power or High Power—depends on the maximum expected load at any given
time, which the regulator driver needs to manage accordingly.
To support this, replace devm_regulator_bulk_get() with
devm_regulator_bulk_get_const() and inline the qmp_ufs_vreg_init()
function. additionally replace the array of regulator names with a
bulk regulator data structure, and utilize the init_load_uA field
provided by the regulator framework. This ensures that
regulator_set_load() is automatically invoked before the
first enable operation.
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 29 +++++++------------------
1 file changed, 8 insertions(+), 21 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 9c69c77d10c8..aaa88ca0ef07 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -1107,7 +1107,7 @@ struct qmp_phy_cfg {
const struct qmp_phy_cfg_tbls tbls_hs_overlay[NUM_OVERLAY];
/* regulators to be requested */
- const char * const *vreg_list;
+ const struct regulator_bulk_data *vreg_list;
int num_vregs;
/* array of registers with different offsets */
@@ -1164,9 +1164,10 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val)
readl(base + offset);
}
-/* list of regulators */
-static const char * const qmp_phy_vreg_l[] = {
- "vdda-phy", "vdda-pll",
+/* Default regulator bulk data (no load used) */
+static const struct regulator_bulk_data qmp_phy_vreg_l[] = {
+ { .supply = "vdda-phy" },
+ { .supply = "vdda-pll" },
};
static const struct qmp_ufs_offsets qmp_ufs_offsets = {
@@ -1890,22 +1891,6 @@ static const struct phy_ops qcom_qmp_ufs_phy_ops = {
.owner = THIS_MODULE,
};
-static int qmp_ufs_vreg_init(struct qmp_ufs *qmp)
-{
- const struct qmp_phy_cfg *cfg = qmp->cfg;
- struct device *dev = qmp->dev;
- int num = cfg->num_vregs;
- int i;
-
- qmp->vregs = devm_kcalloc(dev, num, sizeof(*qmp->vregs), GFP_KERNEL);
- if (!qmp->vregs)
- return -ENOMEM;
-
- for (i = 0; i < num; i++)
- qmp->vregs[i].supply = cfg->vreg_list[i];
-
- return devm_regulator_bulk_get(dev, num, qmp->vregs);
-}
static int qmp_ufs_clk_init(struct qmp_ufs *qmp)
{
@@ -2068,7 +2053,9 @@ static int qmp_ufs_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = qmp_ufs_vreg_init(qmp);
+ ret = devm_regulator_bulk_get_const(dev, qmp->cfg->num_vregs,
+ qmp->cfg->vreg_list,
+ &qmp->vregs);
if (ret)
return ret;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load
2025-08-30 7:03 [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY Nitin Rawat
@ 2025-08-30 7:03 ` Nitin Rawat
2025-08-30 7:07 ` Manivannan Sadhasivam
2025-09-01 17:08 ` [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Vinod Koul
2 siblings, 1 reply; 5+ messages in thread
From: Nitin Rawat @ 2025-08-30 7:03 UTC (permalink / raw)
To: vkoul, kishon, mani, neil.armstrong, dmitry.baryshkov, andersson,
konradybcio
Cc: linux-arm-msm, linux-phy, linux-kernel, Nitin Rawat
From: Nitin Rawat <quic_nitirawa@quicinc.com>
Add phy and pll regulator load voting support for all supported
platforms by introducing dedicated regulator bulk data arrays
with their load values.
This ensures stable operation and proper power management for these
platforms where regulators are shared between the QMP UFS PHY and
other IP blocks by setting appropriate regulator load currents during
PHY operations.
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 138 ++++++++++++++++++------
1 file changed, 104 insertions(+), 34 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index aaa88ca0ef07..8a280433a42b 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -1164,10 +1164,80 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val)
readl(base + offset);
}
-/* Default regulator bulk data (no load used) */
-static const struct regulator_bulk_data qmp_phy_vreg_l[] = {
- { .supply = "vdda-phy" },
- { .supply = "vdda-pll" },
+/* Regulator bulk data with load values for specific configurations */
+static const struct regulator_bulk_data msm8996_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 51400 },
+ { .supply = "vdda-pll", .init_load_uA = 14600 },
+};
+
+static const struct regulator_bulk_data sa8775p_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 137000 },
+ { .supply = "vdda-pll", .init_load_uA = 18300 },
+};
+
+static const struct regulator_bulk_data sc7280_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 97500 },
+ { .supply = "vdda-pll", .init_load_uA = 18400 },
+};
+
+static const struct regulator_bulk_data sc8280xp_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 85700 },
+ { .supply = "vdda-pll", .init_load_uA = 18300 },
+};
+
+static const struct regulator_bulk_data sdm845_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 51400 },
+ { .supply = "vdda-pll", .init_load_uA = 14600 },
+};
+
+static const struct regulator_bulk_data sm6115_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 51400 },
+ { .supply = "vdda-pll", .init_load_uA = 14200 },
+};
+
+static const struct regulator_bulk_data sm7150_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 62900 },
+ { .supply = "vdda-pll", .init_load_uA = 18300 },
+};
+
+static const struct regulator_bulk_data sm8150_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 90200 },
+ { .supply = "vdda-pll", .init_load_uA = 19000 },
+};
+
+static const struct regulator_bulk_data sm8250_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 89900 },
+ { .supply = "vdda-pll", .init_load_uA = 18800 },
+};
+
+static const struct regulator_bulk_data sm8350_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 91600 },
+ { .supply = "vdda-pll", .init_load_uA = 19000 },
+};
+
+static const struct regulator_bulk_data sm8450_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 173000 },
+ { .supply = "vdda-pll", .init_load_uA = 24900 },
+};
+
+static const struct regulator_bulk_data sm8475_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 213030 },
+ { .supply = "vdda-pll", .init_load_uA = 18340 },
+};
+
+static const struct regulator_bulk_data sm8550_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 188000 },
+ { .supply = "vdda-pll", .init_load_uA = 18300 },
+};
+
+static const struct regulator_bulk_data sm8650_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 205000 },
+ { .supply = "vdda-pll", .init_load_uA = 17500 },
+};
+
+static const struct regulator_bulk_data sm8750_ufsphy_vreg_l[] = {
+ { .supply = "vdda-phy", .init_load_uA = 213000 },
+ { .supply = "vdda-pll", .init_load_uA = 18300 },
};
static const struct qmp_ufs_offsets qmp_ufs_offsets = {
@@ -1203,8 +1273,8 @@ static const struct qmp_phy_cfg msm8996_ufsphy_cfg = {
.rx_num = ARRAY_SIZE(msm8996_ufsphy_rx),
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = msm8996_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(msm8996_ufsphy_vreg_l),
.regs = ufsphy_v2_regs_layout,
@@ -1240,8 +1310,8 @@ static const struct qmp_phy_cfg sa8775p_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sa8775p_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sa8775p_ufsphy_vreg_l),
.regs = ufsphy_v5_regs_layout,
};
@@ -1274,8 +1344,8 @@ static const struct qmp_phy_cfg sc7280_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sc7280_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sc7280_ufsphy_vreg_l),
.regs = ufsphy_v4_regs_layout,
};
@@ -1308,8 +1378,8 @@ static const struct qmp_phy_cfg sc8280xp_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sc8280xp_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sc8280xp_ufsphy_vreg_l),
.regs = ufsphy_v5_regs_layout,
};
@@ -1333,8 +1403,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
.serdes = sdm845_ufsphy_hs_b_serdes,
.serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes),
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sdm845_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sdm845_ufsphy_vreg_l),
.regs = ufsphy_v3_regs_layout,
.no_pcs_sw_reset = true,
@@ -1360,8 +1430,8 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
.serdes = sm6115_ufsphy_hs_b_serdes,
.serdes_num = ARRAY_SIZE(sm6115_ufsphy_hs_b_serdes),
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm6115_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm6115_ufsphy_vreg_l),
.regs = ufsphy_v2_regs_layout,
.no_pcs_sw_reset = true,
@@ -1387,8 +1457,8 @@ static const struct qmp_phy_cfg sm7150_ufsphy_cfg = {
.serdes = sdm845_ufsphy_hs_b_serdes,
.serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes),
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm7150_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm7150_ufsphy_vreg_l),
.regs = ufsphy_v3_regs_layout,
.no_pcs_sw_reset = true,
@@ -1423,8 +1493,8 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8150_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8150_ufsphy_vreg_l),
.regs = ufsphy_v4_regs_layout,
};
@@ -1457,8 +1527,8 @@ static const struct qmp_phy_cfg sm8250_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8250_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8250_ufsphy_vreg_l),
.regs = ufsphy_v4_regs_layout,
};
@@ -1491,8 +1561,8 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8350_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8350_ufsphy_vreg_l),
.regs = ufsphy_v5_regs_layout,
};
@@ -1525,8 +1595,8 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8450_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8450_ufsphy_vreg_l),
.regs = ufsphy_v5_regs_layout,
};
@@ -1561,8 +1631,8 @@ static const struct qmp_phy_cfg sm8475_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8475_ufsphy_g4_pcs),
.max_gear = UFS_HS_G4,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8475_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8475_ufsphy_vreg_l),
.regs = ufsphy_v6_regs_layout,
};
@@ -1606,8 +1676,8 @@ static const struct qmp_phy_cfg sm8550_ufsphy_cfg = {
.pcs_num = ARRAY_SIZE(sm8550_ufsphy_g5_pcs),
.max_gear = UFS_HS_G5,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8550_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8550_ufsphy_vreg_l),
.regs = ufsphy_v6_regs_layout,
};
@@ -1638,8 +1708,8 @@ static const struct qmp_phy_cfg sm8650_ufsphy_cfg = {
.max_gear = UFS_HS_G5,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8650_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8650_ufsphy_vreg_l),
.regs = ufsphy_v6_regs_layout,
};
@@ -1676,8 +1746,8 @@ static const struct qmp_phy_cfg sm8750_ufsphy_cfg = {
.max_gear = UFS_HS_G5,
},
- .vreg_list = qmp_phy_vreg_l,
- .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .vreg_list = sm8750_ufsphy_vreg_l,
+ .num_vregs = ARRAY_SIZE(sm8750_ufsphy_vreg_l),
.regs = ufsphy_v6_regs_layout,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load
2025-08-30 7:03 ` [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load Nitin Rawat
@ 2025-08-30 7:07 ` Manivannan Sadhasivam
0 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2025-08-30 7:07 UTC (permalink / raw)
To: Nitin Rawat
Cc: vkoul, kishon, neil.armstrong, dmitry.baryshkov, andersson,
konradybcio, linux-arm-msm, linux-phy, linux-kernel, Nitin Rawat
On Sat, Aug 30, 2025 at 12:33:53PM GMT, Nitin Rawat wrote:
> From: Nitin Rawat <quic_nitirawa@quicinc.com>
>
> Add phy and pll regulator load voting support for all supported
> platforms by introducing dedicated regulator bulk data arrays
> with their load values.
>
> This ensures stable operation and proper power management for these
> platforms where regulators are shared between the QMP UFS PHY and
> other IP blocks by setting appropriate regulator load currents during
> PHY operations.
>
> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
I haven't cross checked the load values with downstream, but trusting that
you've done your job. So,
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
- Mani
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 138 ++++++++++++++++++------
> 1 file changed, 104 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index aaa88ca0ef07..8a280433a42b 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -1164,10 +1164,80 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val)
> readl(base + offset);
> }
>
> -/* Default regulator bulk data (no load used) */
> -static const struct regulator_bulk_data qmp_phy_vreg_l[] = {
> - { .supply = "vdda-phy" },
> - { .supply = "vdda-pll" },
> +/* Regulator bulk data with load values for specific configurations */
> +static const struct regulator_bulk_data msm8996_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 51400 },
> + { .supply = "vdda-pll", .init_load_uA = 14600 },
> +};
> +
> +static const struct regulator_bulk_data sa8775p_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 137000 },
> + { .supply = "vdda-pll", .init_load_uA = 18300 },
> +};
> +
> +static const struct regulator_bulk_data sc7280_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 97500 },
> + { .supply = "vdda-pll", .init_load_uA = 18400 },
> +};
> +
> +static const struct regulator_bulk_data sc8280xp_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 85700 },
> + { .supply = "vdda-pll", .init_load_uA = 18300 },
> +};
> +
> +static const struct regulator_bulk_data sdm845_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 51400 },
> + { .supply = "vdda-pll", .init_load_uA = 14600 },
> +};
> +
> +static const struct regulator_bulk_data sm6115_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 51400 },
> + { .supply = "vdda-pll", .init_load_uA = 14200 },
> +};
> +
> +static const struct regulator_bulk_data sm7150_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 62900 },
> + { .supply = "vdda-pll", .init_load_uA = 18300 },
> +};
> +
> +static const struct regulator_bulk_data sm8150_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 90200 },
> + { .supply = "vdda-pll", .init_load_uA = 19000 },
> +};
> +
> +static const struct regulator_bulk_data sm8250_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 89900 },
> + { .supply = "vdda-pll", .init_load_uA = 18800 },
> +};
> +
> +static const struct regulator_bulk_data sm8350_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 91600 },
> + { .supply = "vdda-pll", .init_load_uA = 19000 },
> +};
> +
> +static const struct regulator_bulk_data sm8450_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 173000 },
> + { .supply = "vdda-pll", .init_load_uA = 24900 },
> +};
> +
> +static const struct regulator_bulk_data sm8475_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 213030 },
> + { .supply = "vdda-pll", .init_load_uA = 18340 },
> +};
> +
> +static const struct regulator_bulk_data sm8550_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 188000 },
> + { .supply = "vdda-pll", .init_load_uA = 18300 },
> +};
> +
> +static const struct regulator_bulk_data sm8650_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 205000 },
> + { .supply = "vdda-pll", .init_load_uA = 17500 },
> +};
> +
> +static const struct regulator_bulk_data sm8750_ufsphy_vreg_l[] = {
> + { .supply = "vdda-phy", .init_load_uA = 213000 },
> + { .supply = "vdda-pll", .init_load_uA = 18300 },
> };
>
> static const struct qmp_ufs_offsets qmp_ufs_offsets = {
> @@ -1203,8 +1273,8 @@ static const struct qmp_phy_cfg msm8996_ufsphy_cfg = {
> .rx_num = ARRAY_SIZE(msm8996_ufsphy_rx),
> },
>
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = msm8996_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(msm8996_ufsphy_vreg_l),
>
> .regs = ufsphy_v2_regs_layout,
>
> @@ -1240,8 +1310,8 @@ static const struct qmp_phy_cfg sa8775p_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sa8775p_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sa8775p_ufsphy_vreg_l),
> .regs = ufsphy_v5_regs_layout,
> };
>
> @@ -1274,8 +1344,8 @@ static const struct qmp_phy_cfg sc7280_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sc7280_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sc7280_ufsphy_vreg_l),
> .regs = ufsphy_v4_regs_layout,
> };
>
> @@ -1308,8 +1378,8 @@ static const struct qmp_phy_cfg sc8280xp_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sc8280xp_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sc8280xp_ufsphy_vreg_l),
> .regs = ufsphy_v5_regs_layout,
> };
>
> @@ -1333,8 +1403,8 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
> .serdes = sdm845_ufsphy_hs_b_serdes,
> .serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes),
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sdm845_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sdm845_ufsphy_vreg_l),
> .regs = ufsphy_v3_regs_layout,
>
> .no_pcs_sw_reset = true,
> @@ -1360,8 +1430,8 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
> .serdes = sm6115_ufsphy_hs_b_serdes,
> .serdes_num = ARRAY_SIZE(sm6115_ufsphy_hs_b_serdes),
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm6115_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm6115_ufsphy_vreg_l),
> .regs = ufsphy_v2_regs_layout,
>
> .no_pcs_sw_reset = true,
> @@ -1387,8 +1457,8 @@ static const struct qmp_phy_cfg sm7150_ufsphy_cfg = {
> .serdes = sdm845_ufsphy_hs_b_serdes,
> .serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes),
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm7150_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm7150_ufsphy_vreg_l),
> .regs = ufsphy_v3_regs_layout,
>
> .no_pcs_sw_reset = true,
> @@ -1423,8 +1493,8 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8150_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8150_ufsphy_vreg_l),
> .regs = ufsphy_v4_regs_layout,
> };
>
> @@ -1457,8 +1527,8 @@ static const struct qmp_phy_cfg sm8250_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8150_ufsphy_hs_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8250_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8250_ufsphy_vreg_l),
> .regs = ufsphy_v4_regs_layout,
> };
>
> @@ -1491,8 +1561,8 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8350_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8350_ufsphy_vreg_l),
> .regs = ufsphy_v5_regs_layout,
> };
>
> @@ -1525,8 +1595,8 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8450_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8450_ufsphy_vreg_l),
> .regs = ufsphy_v5_regs_layout,
> };
>
> @@ -1561,8 +1631,8 @@ static const struct qmp_phy_cfg sm8475_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8475_ufsphy_g4_pcs),
> .max_gear = UFS_HS_G4,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8475_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8475_ufsphy_vreg_l),
> .regs = ufsphy_v6_regs_layout,
> };
>
> @@ -1606,8 +1676,8 @@ static const struct qmp_phy_cfg sm8550_ufsphy_cfg = {
> .pcs_num = ARRAY_SIZE(sm8550_ufsphy_g5_pcs),
> .max_gear = UFS_HS_G5,
> },
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8550_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8550_ufsphy_vreg_l),
> .regs = ufsphy_v6_regs_layout,
> };
>
> @@ -1638,8 +1708,8 @@ static const struct qmp_phy_cfg sm8650_ufsphy_cfg = {
> .max_gear = UFS_HS_G5,
> },
>
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8650_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8650_ufsphy_vreg_l),
> .regs = ufsphy_v6_regs_layout,
> };
>
> @@ -1676,8 +1746,8 @@ static const struct qmp_phy_cfg sm8750_ufsphy_cfg = {
> .max_gear = UFS_HS_G5,
> },
>
> - .vreg_list = qmp_phy_vreg_l,
> - .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .vreg_list = sm8750_ufsphy_vreg_l,
> + .num_vregs = ARRAY_SIZE(sm8750_ufsphy_vreg_l),
> .regs = ufsphy_v6_regs_layout,
>
> };
> --
> 2.50.1
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V4 0/2] Add regulator load support for QMP UFS PHY
2025-08-30 7:03 [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load Nitin Rawat
@ 2025-09-01 17:08 ` Vinod Koul
2 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2025-09-01 17:08 UTC (permalink / raw)
To: kishon, mani, neil.armstrong, dmitry.baryshkov, andersson,
konradybcio, Nitin Rawat
Cc: linux-arm-msm, linux-phy, linux-kernel
On Sat, 30 Aug 2025 12:33:51 +0530, Nitin Rawat wrote:
> The series improves regulator handling in the QMP UFS PHY driver and
> adds load configuration support for all supported platforms.
>
> On some SoCs, regulators are shared between the UFS PHY and other IP
> blocks. To maintain stability and power efficiency, the regulator
> framework needs to know the UFS PHY's peak load, as it determines the
> regulator's operating mode.
>
> [...]
Applied, thanks!
[1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY
commit: 0c4916aadb8df892399eec99f775655c31049195
[2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load
commit: df4beac9da5f162770c8563d11cda327d748c20b
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-01 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-30 7:03 [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 1/2] phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY Nitin Rawat
2025-08-30 7:03 ` [PATCH V4 2/2] phy: qcom-qmp-ufs: Add PHY and PLL regulator load Nitin Rawat
2025-08-30 7:07 ` Manivannan Sadhasivam
2025-09-01 17:08 ` [PATCH V4 0/2] Add regulator load support for QMP UFS PHY Vinod Koul
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).