regulator: dt-bindings: qcom,usb-vbus-regulator: add qcom,pm4125-vbus-reg

The pm4125 PMIC uses a different USB VBUS register layout than pm8150b.
It uses a 2-bit VBOOST voltage selector supporting output voltages of
4.25 V, 4.5 V, 4.75 V and 5.0 V, instead of a current-limit selector.

Move qcom,pm4125-vbus-reg from the pm8150b fallback items list into the
standalone enum since the driver handles it with its own match-data and
register layout.

Make regulator-min/max-microamp conditional so they are only required
for current-limit variants (pm8150b, pm6150, pm7250b, pmi632). Add an
if/then condition for qcom,pm4125-vbus-reg requiring regulator-min/
max-microvolt instead, and update the pm4125 example accordingly.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
Link: https://patch.msgid.link/20260706-add_pm4125-vbus-reg-v3-1-999d78a87b81@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Rakesh Kota
2026-07-06 18:01:05 +05:30
committed by Mark Brown
parent 8cdeaa50ea
commit a58d2e5e1c

View File

@@ -14,17 +14,21 @@ description: |
regulator will be enabled in situations where the device is required to
provide power to the connected peripheral.
allOf:
- $ref: regulator.yaml#
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 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.
properties:
compatible:
oneOf:
- enum:
- qcom,pm8150b-vbus-reg
- qcom,pm4125-vbus-reg
- items:
- enum:
- qcom,pm4125-vbus-reg
- qcom,pm6150-vbus-reg
- qcom,pm7250b-vbus-reg
- qcom,pmi632-vbus-reg
@@ -34,11 +38,35 @@ properties:
maxItems: 1
description: VBUS output base address
allOf:
- $ref: regulator.yaml#
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8150b-vbus-reg
- qcom,pm6150-vbus-reg
- qcom,pm7250b-vbus-reg
- qcom,pmi632-vbus-reg
then:
required:
- regulator-min-microamp
- regulator-max-microamp
- if:
properties:
compatible:
contains:
const: qcom,pm4125-vbus-reg
then:
required:
- regulator-min-microvolt
- regulator-max-microvolt
required:
- compatible
- reg
- regulator-min-microamp
- regulator-max-microamp
unevaluatedProperties: false
@@ -55,4 +83,16 @@ examples:
regulator-max-microamp = <3000000>;
};
};
- |
pmic {
#address-cells = <1>;
#size-cells = <0>;
usb-vbus-regulator@1100 {
compatible = "qcom,pm4125-vbus-reg";
reg = <0x1100>;
regulator-min-microvolt = <4250000>;
regulator-max-microvolt = <5000000>;
};
};
...