* [PATCH v3 01/12] regulator: dt-bindings: qcom,usb-vbus-regulator: Add pmi8998 and pm660
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
@ 2026-11-21 22:37 ` David Heidelberg via B4 Relay
2026-12-02 14:54 ` Rob Herring (Arm)
2026-11-21 22:37 ` [PATCH v3 02/12] regulator: qcom_usb_vbus: Fix the MODULE_LICENSE() string David Heidelberg via B4 Relay
` (10 subsequent siblings)
11 siblings, 1 reply; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:37 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
The VBUS register block on the PMI8998 and PM660 PMIC shares the design.
Define corresponding compatible string, having the
qcom,pmi8998-vbus-reg as a fallback.
As a part of the definition properly define existing chips using
min/max/multipleOf properties.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../regulator/qcom,usb-vbus-regulator.yaml | 56 ++++++++++++++++++++--
1 file changed, 52 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
index 024b34d0eb1a6..7e984ab9a1474 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
@@ -9,35 +9,38 @@ title: The Qualcomm PMIC VBUS output regulator driver
maintainers:
- Wesley Cheng <quic_wcheng@quicinc.com>
description: |
This regulator driver controls the VBUS output by the Qualcomm PMIC. This
regulator will be enabled in situations where the device is required to
provide power to the connected peripheral.
- The pm8150b variant uses an OTG current-limit selector, supporting limits
- of 500 mA, 1000 mA, 1500 mA, 2000 mA, 2500 mA and 3000 mA.
+ The pm8150b and pmi8998 variant uses an OTG current-limit selector.
The pm4125 variant uses a different register layout with a 2-bit VBOOST
- voltage selector supporting output voltages of 4.25 V, 4.5 V, 4.75 V
- and 5.0 V.
+ voltage selector.
properties:
compatible:
oneOf:
- enum:
- qcom,pm8150b-vbus-reg
- qcom,pm4125-vbus-reg
+ - qcom,pmi8998-vbus-reg
- items:
- enum:
- qcom,pm6150-vbus-reg
- qcom,pm7250b-vbus-reg
- qcom,pmi632-vbus-reg
- const: qcom,pm8150b-vbus-reg
+ - items:
+ - enum:
+ - qcom,pm660-vbus-reg
+ - const: qcom,pmi8998-vbus-reg
reg:
maxItems: 1
description: VBUS output base address
allOf:
- $ref: regulator.yaml#
- if:
@@ -45,26 +48,71 @@ allOf:
compatible:
contains:
enum:
- qcom,pm8150b-vbus-reg
- qcom,pm6150-vbus-reg
- qcom,pm7250b-vbus-reg
- qcom,pmi632-vbus-reg
then:
+ properties:
+ regulator-min-microamp:
+ multipleOf: 500000
+ minimum: 500000
+ maximum: 3000000
+
+ regulator-max-microamp:
+ multipleOf: 500000
+ minimum: 500000
+ maximum: 3000000
+
+ required:
+ - regulator-min-microamp
+ - regulator-max-microamp
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pm660-vbus-reg
+ - qcom,pmi8998-vbus-reg
+ then:
+ properties:
+ regulator-min-microamp:
+ multipleOf: 250000
+ minimum: 250000
+ maximum: 2000000
+
+ regulator-max-microamp:
+ multipleOf: 250000
+ minimum: 250000
+ maximum: 2000000
+
required:
- regulator-min-microamp
- regulator-max-microamp
- if:
properties:
compatible:
contains:
const: qcom,pm4125-vbus-reg
then:
+ properties:
+ regulator-min-microvolt:
+ multipleOf: 250000
+ minimum: 4250000
+ maximum: 5000000
+
+ regulator-max-microvolt:
+ multipleOf: 250000
+ minimum: 4250000
+ maximum: 5000000
+
required:
- regulator-min-microvolt
- regulator-max-microvolt
required:
- compatible
- reg
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v3 01/12] regulator: dt-bindings: qcom,usb-vbus-regulator: Add pmi8998 and pm660
2026-11-21 22:37 ` [PATCH v3 01/12] regulator: dt-bindings: qcom,usb-vbus-regulator: Add pmi8998 and pm660 David Heidelberg via B4 Relay
@ 2026-12-02 14:54 ` Rob Herring (Arm)
0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2026-12-02 14:54 UTC (permalink / raw)
To: David Heidelberg
Cc: Conor Dooley, linux-pm, Sebastian Reichel, Richard Acayan,
Alexey Minnekhanov, Konrad Dybcio, Mark Brown, Wesley Cheng,
Sebastian Reichel, Robin Snyders, linux-arm-msm, Casey Connolly,
phone-devel, Abel Vesa, Krzysztof Kozlowski, Liam Girdwood,
linux-kernel, Bjorn Andersson, Markus Rathgeb, devicetree
On Sat, 21 Nov 2026 23:37:55 +0100, David Heidelberg wrote:
> The VBUS register block on the PMI8998 and PM660 PMIC shares the design.
> Define corresponding compatible string, having the
> qcom,pmi8998-vbus-reg as a fallback.
>
> As a part of the definition properly define existing chips using
> min/max/multipleOf properties.
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> .../regulator/qcom,usb-vbus-regulator.yaml | 56 ++++++++++++++++++++--
> 1 file changed, 52 insertions(+), 4 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 02/12] regulator: qcom_usb_vbus: Fix the MODULE_LICENSE() string
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
2026-11-21 22:37 ` [PATCH v3 01/12] regulator: dt-bindings: qcom,usb-vbus-regulator: Add pmi8998 and pm660 David Heidelberg via B4 Relay
@ 2026-11-21 22:37 ` David Heidelberg via B4 Relay
2026-11-21 22:37 ` [PATCH v3 03/12] regulator: qcom_usb_vbus: Add support for pmi8998 David Heidelberg via B4 Relay
` (9 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:37 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Replace the bogus "GPL v2" with "GPL" as MODULE_LICENSE() string. The
value does not declare the module's exact license, but only lets the
module loader test whether the module is Free Software or not.
See commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs.
"GPL v2" bogosity") in the details of the issue. The fix is to use
"GPL" for all modules under any variant of the GPL.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
drivers/regulator/qcom_usb_vbus-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c
index d909a6f2b7f14..88f5a6ba79e6e 100644
--- a/drivers/regulator/qcom_usb_vbus-regulator.c
+++ b/drivers/regulator/qcom_usb_vbus-regulator.c
@@ -176,9 +176,9 @@ static struct platform_driver qcom_usb_vbus_regulator_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = qcom_usb_vbus_regulator_match,
},
.probe = qcom_usb_vbus_regulator_probe,
};
module_platform_driver(qcom_usb_vbus_regulator_driver);
MODULE_DESCRIPTION("Qualcomm USB vbus regulator driver");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 03/12] regulator: qcom_usb_vbus: Add support for pmi8998
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
2026-11-21 22:37 ` [PATCH v3 01/12] regulator: dt-bindings: qcom,usb-vbus-regulator: Add pmi8998 and pm660 David Heidelberg via B4 Relay
2026-11-21 22:37 ` [PATCH v3 02/12] regulator: qcom_usb_vbus: Fix the MODULE_LICENSE() string David Heidelberg via B4 Relay
@ 2026-11-21 22:37 ` David Heidelberg via B4 Relay
2026-11-21 22:37 ` [PATCH v3 04/12] power: supply: qcom_smbx: Stop clearing software control select David Heidelberg via B4 Relay
` (8 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:37 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
The PMI8998 uses different register layout, but due to the limited
functionality of the qcom_usb_vbus driver, the basic registers are the
same as the PM8150B, thus reuse these. Table of currents differentiate
in steps and maximum 2A current. For more advanced features it'll differ.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
drivers/regulator/qcom_usb_vbus-regulator.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c
index 88f5a6ba79e6e..61a1b45f36e84 100644
--- a/drivers/regulator/qcom_usb_vbus-regulator.c
+++ b/drivers/regulator/qcom_usb_vbus-regulator.c
@@ -36,17 +36,17 @@ struct qcom_usb_vbus_reg_data {
unsigned int n_current_limits;
u16 vsel_reg;
u8 vsel_mask;
const unsigned int *volt_table;
unsigned int n_voltages;
const struct regulator_ops *ops;
};
-static const unsigned int curr_table[] = {
+static const unsigned int pm8150b_curr_table[] = {
500000, 1000000, 1500000, 2000000, 2500000, 3000000,
};
static const unsigned int pm4125_vboost_table[] = {
4250000, 4500000, 4750000, 5000000,
};
static const struct regulator_ops qcom_usb_vbus_reg_ops = {
@@ -58,18 +58,33 @@ static const struct regulator_ops qcom_usb_vbus_reg_ops = {
};
static const struct qcom_usb_vbus_reg_data pm8150b_data = {
.cmd_otg = CMD_OTG,
.otg_cfg = OTG_CFG,
.otg_en_src_cfg = OTG_EN_SRC_CFG,
.csel_reg = OTG_CURRENT_LIMIT_CFG,
.csel_mask = OTG_CURRENT_LIMIT_MASK,
- .curr_table = curr_table,
- .n_current_limits = ARRAY_SIZE(curr_table),
+ .curr_table = pm8150b_curr_table,
+ .n_current_limits = ARRAY_SIZE(pm8150b_curr_table),
+ .ops = &qcom_usb_vbus_reg_ops,
+};
+
+static const unsigned int pmi8998_curr_table[] = {
+ 250000, 500000, 750000, 1000000, 1250000, 1500000, 1750000, 2000000,
+};
+
+static const struct qcom_usb_vbus_reg_data pmi8998_data = {
+ .cmd_otg = CMD_OTG,
+ .otg_cfg = OTG_CFG,
+ .otg_en_src_cfg = OTG_EN_SRC_CFG,
+ .csel_reg = OTG_CURRENT_LIMIT_CFG,
+ .csel_mask = OTG_CURRENT_LIMIT_MASK,
+ .curr_table = pmi8998_curr_table,
+ .n_current_limits = ARRAY_SIZE(pmi8998_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,
.is_enabled = regulator_is_enabled_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -161,16 +176,17 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev)
regmap_update_bits(regmap, base + data->otg_cfg, data->otg_en_src_cfg, 0);
return 0;
}
static const struct of_device_id qcom_usb_vbus_regulator_match[] = {
{ .compatible = "qcom,pm8150b-vbus-reg", .data = &pm8150b_data },
{ .compatible = "qcom,pm4125-vbus-reg", .data = &pm4125_data },
+ { .compatible = "qcom,pmi8998-vbus-reg", .data = &pmi8998_data },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_usb_vbus_regulator_match);
static struct platform_driver qcom_usb_vbus_regulator_driver = {
.driver = {
.name = "qcom-usb-vbus-regulator",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 04/12] power: supply: qcom_smbx: Stop clearing software control select
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (2 preceding siblings ...)
2026-11-21 22:37 ` [PATCH v3 03/12] regulator: qcom_usb_vbus: Add support for pmi8998 David Heidelberg via B4 Relay
@ 2026-11-21 22:37 ` David Heidelberg via B4 Relay
2026-12-02 2:56 ` Sebastian Reichel
2026-11-21 22:37 ` [PATCH v3 05/12] arm64: dts: qcom: pmi8998: Add node for PMIC VBUS booster David Heidelberg via B4 Relay
` (7 subsequent siblings)
11 siblings, 1 reply; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:37 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Charger should not touch OTG block registers now handled by the vbus
driver. This change stops clearing OTG_EN_SRC_CFG_BIT (software control
select).
Signed-off-by: David Heidelberg <david@ixit.cz>
---
drivers/power/supply/qcom_smbx.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/power/supply/qcom_smbx.c b/drivers/power/supply/qcom_smbx.c
index c6188c915703a..a4f5ffd3cd6e5 100644
--- a/drivers/power/supply/qcom_smbx.c
+++ b/drivers/power/supply/qcom_smbx.c
@@ -96,28 +96,16 @@
#define USBIN_ICL_CHANGE_RT_STS_BIT BIT(6)
#define USBIN_SOURCE_CHANGE_RT_STS_BIT BIT(5)
#define USBIN_PLUGIN_RT_STS_BIT BIT(4)
#define USBIN_OV_RT_STS_BIT BIT(3)
#define USBIN_UV_RT_STS_BIT BIT(2)
#define USBIN_LT_3P6V_RT_STS_BIT BIT(1)
#define USBIN_COLLAPSE_RT_STS_BIT BIT(0)
-#define OTG_CFG 0x153
-#define OTG_RESERVED_MASK GENMASK(7, 6)
-#define DIS_OTG_ON_TLIM_BIT BIT(5)
-#define QUICKSTART_OTG_FASTROLESWAP_BIT BIT(4)
-#define INCREASE_DFP_TIME_BIT BIT(3)
-#define ENABLE_OTG_IN_DEBUG_MODE_BIT BIT(2)
-#define OTG_EN_SRC_CFG_BIT BIT(1)
-#define CONCURRENT_MODE_CFG_BIT BIT(0)
-
-#define OTG_ENG_OTG_CFG 0x1C0
-#define ENG_BUCKBOOST_HALT1_8_MODE_BIT BIT(0)
-
#define APSD_STATUS 0x307
#define APSD_STATUS_7_BIT BIT(7)
#define HVDCP_CHECK_TIMEOUT_BIT BIT(6)
#define SLOW_PLUGIN_TIMEOUT_BIT BIT(5)
#define ENUMERATION_DONE_BIT BIT(4)
#define VADP_CHANGE_DONE_AFTER_AUTH_BIT BIT(3)
#define QC_AUTH_DONE_STATUS_BIT BIT(2)
#define QC_CHARGER_BIT BIT(1)
@@ -811,18 +799,16 @@ static const struct smb_init_register smb_init_seq[] = {
.val = VCONN_EN_SRC_BIT },
/*
* Disable Type-C factory mode and stay in Attached.SRC state when VCONN
* over-current happens
*/
{ .addr = TYPE_C_CFG,
.mask = FACTORY_MODE_DETECTION_EN_BIT | VCONN_OC_CFG_BIT,
.val = 0 },
- /* Configure VBUS for software control */
- { .addr = OTG_CFG, .mask = OTG_EN_SRC_CFG_BIT, .val = 0 },
/*
* Use VBAT to determine the recharge threshold when battery is full
* rather than the state of charge.
*/
{ .addr = FG_UPDATE_CFG_2_SEL,
.mask = SOC_LT_CHG_RECHARGE_THRESH_SEL_BIT |
VBT_LT_CHG_RECHARGE_THRESH_SEL_BIT,
.val = VBT_LT_CHG_RECHARGE_THRESH_SEL_BIT },
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v3 04/12] power: supply: qcom_smbx: Stop clearing software control select
2026-11-21 22:37 ` [PATCH v3 04/12] power: supply: qcom_smbx: Stop clearing software control select David Heidelberg via B4 Relay
@ 2026-12-02 2:56 ` Sebastian Reichel
0 siblings, 0 replies; 15+ messages in thread
From: Sebastian Reichel @ 2026-12-02 2:56 UTC (permalink / raw)
To: david
Cc: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Wesley Cheng, Richard Acayan, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel
[-- Attachment #1: Type: text/plain, Size: 2720 bytes --]
Hi,
On Sat, Nov 21, 2026 at 11:37:58PM +0100, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Charger should not touch OTG block registers now handled by the vbus
> driver. This change stops clearing OTG_EN_SRC_CFG_BIT (software control
> select).
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Greetings,
-- Sebastian
> drivers/power/supply/qcom_smbx.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/power/supply/qcom_smbx.c b/drivers/power/supply/qcom_smbx.c
> index c6188c915703a..a4f5ffd3cd6e5 100644
> --- a/drivers/power/supply/qcom_smbx.c
> +++ b/drivers/power/supply/qcom_smbx.c
> @@ -96,28 +96,16 @@
> #define USBIN_ICL_CHANGE_RT_STS_BIT BIT(6)
> #define USBIN_SOURCE_CHANGE_RT_STS_BIT BIT(5)
> #define USBIN_PLUGIN_RT_STS_BIT BIT(4)
> #define USBIN_OV_RT_STS_BIT BIT(3)
> #define USBIN_UV_RT_STS_BIT BIT(2)
> #define USBIN_LT_3P6V_RT_STS_BIT BIT(1)
> #define USBIN_COLLAPSE_RT_STS_BIT BIT(0)
>
> -#define OTG_CFG 0x153
> -#define OTG_RESERVED_MASK GENMASK(7, 6)
> -#define DIS_OTG_ON_TLIM_BIT BIT(5)
> -#define QUICKSTART_OTG_FASTROLESWAP_BIT BIT(4)
> -#define INCREASE_DFP_TIME_BIT BIT(3)
> -#define ENABLE_OTG_IN_DEBUG_MODE_BIT BIT(2)
> -#define OTG_EN_SRC_CFG_BIT BIT(1)
> -#define CONCURRENT_MODE_CFG_BIT BIT(0)
> -
> -#define OTG_ENG_OTG_CFG 0x1C0
> -#define ENG_BUCKBOOST_HALT1_8_MODE_BIT BIT(0)
> -
> #define APSD_STATUS 0x307
> #define APSD_STATUS_7_BIT BIT(7)
> #define HVDCP_CHECK_TIMEOUT_BIT BIT(6)
> #define SLOW_PLUGIN_TIMEOUT_BIT BIT(5)
> #define ENUMERATION_DONE_BIT BIT(4)
> #define VADP_CHANGE_DONE_AFTER_AUTH_BIT BIT(3)
> #define QC_AUTH_DONE_STATUS_BIT BIT(2)
> #define QC_CHARGER_BIT BIT(1)
> @@ -811,18 +799,16 @@ static const struct smb_init_register smb_init_seq[] = {
> .val = VCONN_EN_SRC_BIT },
> /*
> * Disable Type-C factory mode and stay in Attached.SRC state when VCONN
> * over-current happens
> */
> { .addr = TYPE_C_CFG,
> .mask = FACTORY_MODE_DETECTION_EN_BIT | VCONN_OC_CFG_BIT,
> .val = 0 },
> - /* Configure VBUS for software control */
> - { .addr = OTG_CFG, .mask = OTG_EN_SRC_CFG_BIT, .val = 0 },
> /*
> * Use VBAT to determine the recharge threshold when battery is full
> * rather than the state of charge.
> */
> { .addr = FG_UPDATE_CFG_2_SEL,
> .mask = SOC_LT_CHG_RECHARGE_THRESH_SEL_BIT |
> VBT_LT_CHG_RECHARGE_THRESH_SEL_BIT,
> .val = VBT_LT_CHG_RECHARGE_THRESH_SEL_BIT },
>
> --
> 2.55.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 05/12] arm64: dts: qcom: pmi8998: Add node for PMIC VBUS booster
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (3 preceding siblings ...)
2026-11-21 22:37 ` [PATCH v3 04/12] power: supply: qcom_smbx: Stop clearing software control select David Heidelberg via B4 Relay
@ 2026-11-21 22:37 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 06/12] arm64: dts: qcom: pm660: " David Heidelberg via B4 Relay
` (6 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:37 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Add the required DTS node for the USB VBUS output regulator, which is
available on PMI8998. This will provide the VBUS source to connected
peripherals.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/pmi8998.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
index cd3f0790fd420..9d65dd4abcdbb 100644
--- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
@@ -24,16 +24,23 @@ pmi8998_charger: charger@1000 {
io-channels = <&pmi8998_rradc 3>,
<&pmi8998_rradc 4>;
io-channel-names = "usbin_i", "usbin_v";
status = "disabled";
};
+ pmi8998_vbus: usb-vbus-regulator@1100 {
+ compatible = "qcom,pmi8998-vbus-reg";
+ reg = <0x1100>;
+
+ status = "disabled";
+ };
+
pmi8998_gpios: gpio@c000 {
compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
gpio-ranges = <&pmi8998_gpios 0 0 14>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 06/12] arm64: dts: qcom: pm660: Add node for PMIC VBUS booster
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (4 preceding siblings ...)
2026-11-21 22:37 ` [PATCH v3 05/12] arm64: dts: qcom: pmi8998: Add node for PMIC VBUS booster David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 07/12] arm64: dts: qcom: sdm845-google: Enable vbus support David Heidelberg via B4 Relay
` (5 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Add the required DTS node for the USB VBUS output regulator, which is
available on PM660. This will provide the VBUS source to connected
peripherals.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/pm660.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm660.dtsi b/arch/arm64/boot/dts/qcom/pm660.dtsi
index 156b2ddff0dcb..fe9ef304d64e7 100644
--- a/arch/arm64/boot/dts/qcom/pm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm660.dtsi
@@ -85,16 +85,23 @@ pm660_charger: charger@1000 {
io-channels = <&pm660_rradc 3>,
<&pm660_rradc 4>;
io-channel-names = "usbin_i", "usbin_v";
status = "disabled";
};
+ pm660_vbus: usb-vbus-regulator@1100 {
+ compatible = "qcom,pm660-vbus-reg", "qcom,pmi8998-vbus-reg";
+ reg = <0x1100>;
+
+ status = "disabled";
+ };
+
pm660_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
io-channels = <&pm660_adc ADC5_DIE_TEMP>;
io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
};
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 07/12] arm64: dts: qcom: sdm845-google: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (5 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 06/12] arm64: dts: qcom: pm660: " David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 08/12] arm64: dts: qcom: sdm845-oneplus: " David Heidelberg via B4 Relay
` (4 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Enable the PMI8998 VBUS regulator on Pixel 3 and 3 XL.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
index 3c9656b88b696..417c767a1821d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
@@ -451,16 +451,23 @@ &pm8998_resin {
};
&pmi8998_charger {
monitored-battery = <&battery>;
status = "okay";
};
+&pmi8998_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 08/12] arm64: dts: qcom: sdm845-oneplus: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (6 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 07/12] arm64: dts: qcom: sdm845-google: Enable vbus support David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 09/12] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
` (3 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Enable the PMI8998 VBUS regulator on OnePlus 6 and 6T.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 1df09da3c4d71..4996ce24fee36 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -660,16 +660,23 @@ led-1 {
color = <LED_COLOR_ID_YELLOW>;
led-sources = <2>;
led-max-microamp = <500000>;
flash-max-microamp = <1500000>;
flash-max-timeout-us = <1280000>;
};
};
+&pmi8998_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
&q6afedai {
dai@22 {
reg = <QUATERNARY_MI2S_RX>;
qcom,sd-lines = <1>;
};
dai@23 {
reg = <QUATERNARY_MI2S_TX>;
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 09/12] arm64: dts: qcom: sdm845-shift-axolotl: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (7 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 08/12] arm64: dts: qcom: sdm845-oneplus: " David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 10/12] arm64: dts: qcom: sdm845-lg: " David Heidelberg via B4 Relay
` (2 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Enable the PMI8998 VBUS regulator on SHIFT 6MQ.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index 1b0eaeafbd517..124717214edd6 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -654,16 +654,23 @@ led-1 {
color = <LED_COLOR_ID_YELLOW>;
led-sources = <2>;
led-max-microamp = <100000>;
flash-max-microamp = <1100000>;
flash-max-timeout-us = <1280000>;
};
};
+&pmi8998_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
&qup_uart9_rx {
drive-strength = <2>;
bias-pull-up;
};
&qup_uart9_tx {
drive-strength = <2>;
bias-disable;
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 10/12] arm64: dts: qcom: sdm845-lg: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (8 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 09/12] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 11/12] arm64: dts: qcom: sdm845-xiaomi-beryllium: " David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 12/12] arm64: dts: qcom: sdm670-google: " David Heidelberg via B4 Relay
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
On LG G7 (judyln), vbus block was kept uncontrolled.
LG V35 (judyp) doesn't have charger block wired yet in upstream, thus
nothing was done, but we know from downstream this configuration is
valid, thus enable vbus block too.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 6989532584251..e868cf44956b5 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -548,16 +548,23 @@ led@4 {
led@5 {
reg = <5>;
color = <LED_COLOR_ID_RED>;
};
};
};
+&pmi8998_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
&pmi8998_wled {
qcom,current-limit-microamp = <20000>;
qcom,ovp-millivolt = <29600>;
qcom,switching-freq = <800>;
qcom,cabc;
status = "okay";
};
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 11/12] arm64: dts: qcom: sdm845-xiaomi-beryllium: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (9 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 10/12] arm64: dts: qcom: sdm845-lg: " David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
2026-11-21 22:38 ` [PATCH v3 12/12] arm64: dts: qcom: sdm670-google: " David Heidelberg via B4 Relay
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Enable the PMI8998 VBUS regulator on Xiaomi Poco F1.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
index d57851b0b9419..98763608d5310 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -418,16 +418,23 @@ led-1 {
};
};
&pm8998_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};
+&pmi8998_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
/* QUAT I2S Uses 1 I2S SD Line for audio on TAS2559/60 amplifiers */
&q6afedai {
dai@22 {
reg = <QUATERNARY_MI2S_RX>;
qcom,sd-lines = <0>;
};
};
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 12/12] arm64: dts: qcom: sdm670-google: Enable vbus support
2026-11-21 22:37 [PATCH v3 00/12] Enable Qualcomm VBUS block on PMI8998 and PM660 David Heidelberg via B4 Relay
` (10 preceding siblings ...)
2026-11-21 22:38 ` [PATCH v3 11/12] arm64: dts: qcom: sdm845-xiaomi-beryllium: " David Heidelberg via B4 Relay
@ 2026-11-21 22:38 ` David Heidelberg via B4 Relay
11 siblings, 0 replies; 15+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-21 22:38 UTC (permalink / raw)
To: Abel Vesa, Alexey Minnekhanov, Bjorn Andersson, Casey Connolly,
Conor Dooley, Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood,
Mark Brown, Markus Rathgeb, Rob Herring, Robin Snyders,
Sebastian Reichel, Wesley Cheng
Cc: Richard Acayan, Sebastian Reichel, devicetree, linux-arm-msm,
linux-kernel, linux-pm, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Enable the PM660 VBUS regulator on Pixel 3a and 3a XL.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi b/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
index 8f91faf8a9cc5..9c95855b56e7b 100644
--- a/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
@@ -604,16 +604,23 @@ cam_vio_pin: cam-vio-state {
power-source = <0>;
};
};
&pm660_rradc {
status = "okay";
};
+&pm660_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <1500000>;
+
+ status = "okay";
+};
+
&pm660l_flash {
status = "okay";
led-0 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1>, <2>;
led-max-microamp = <500000>;
--
2.55.0
^ permalink raw reply [flat|nested] 15+ messages in thread