[PATCH 2/2] regulator: qcom_usb_vbus: add PM8550B support
From: Neil Armstrong
Date: Fri Nov 20 2026 - 05:11:27 EST
Add support for the PM8550B OTG boost with a different register
layout, supporting a current limit encoding from 1 A to 1.75 A
in 250 mA steps, then 2 A to 10 3.5 A in 500 mA steps.
Assisted-by: LLM
Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
---
drivers/regulator/qcom_usb_vbus-regulator.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c
index d909a6f2b7f1..dd149d28f62b 100644
--- a/drivers/regulator/qcom_usb_vbus-regulator.c
+++ b/drivers/regulator/qcom_usb_vbus-regulator.c
@@ -20,6 +20,12 @@
#define OTG_CFG 0x53
#define OTG_EN_SRC_CFG BIT(1)
+#define PM8550B_BST_EN 0x50
+#define PM8550B_BST_ILIM_SEL 0x53
+#define PM8550B_BST_IOUT_OCP_THD_MASK GENMASK(2, 0)
+#define PM8550B_BST_CFG 0x56
+#define PM8550B_OTG_EN_SRC_CFG BIT(0)
+
#define PM4125_VBOOST_EN 0x50
#define PM4125_VBOOST_SEL 0x52
#define PM4125_VBOOST_CFG_MASK GENMASK(1, 0)
@@ -45,6 +51,10 @@ static const unsigned int curr_table[] = {
500000, 1000000, 1500000, 2000000, 2500000, 3000000,
};
+static const unsigned int pm8550b_curr_table[] = {
+ 1000000, 1250000, 1500000, 1750000, 2000000, 2500000, 3000000, 3500000,
+};
+
static const unsigned int pm4125_vboost_table[] = {
4250000, 4500000, 4750000, 5000000,
};
@@ -68,6 +78,17 @@ static const struct qcom_usb_vbus_reg_data pm8150b_data = {
.ops = &qcom_usb_vbus_reg_ops,
};
+static const struct qcom_usb_vbus_reg_data pm8550b_data = {
+ .cmd_otg = PM8550B_BST_EN,
+ .otg_cfg = PM8550B_BST_CFG,
+ .otg_en_src_cfg = PM8550B_OTG_EN_SRC_CFG,
+ .csel_reg = PM8550B_BST_ILIM_SEL,
+ .csel_mask = PM8550B_BST_IOUT_OCP_THD_MASK,
+ .curr_table = pm8550b_curr_table,
+ .n_current_limits = ARRAY_SIZE(pm8550b_curr_table),
+ .ops = &qcom_usb_vbus_reg_ops,
+};
+
static const struct regulator_ops qcom_usb_vbus_pm4125_reg_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
@@ -165,6 +186,7 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev)
static const struct of_device_id qcom_usb_vbus_regulator_match[] = {
{ .compatible = "qcom,pm8150b-vbus-reg", .data = &pm8150b_data },
+ { .compatible = "qcom,pm8550b-vbus-reg", .data = &pm8550b_data },
{ .compatible = "qcom,pm4125-vbus-reg", .data = &pm4125_data },
{ }
};
--
2.34.1