Re: [PATCH 1/2] dt-bindings: regulator: qcom,usb-vbus-regulator: add qcom,pm4125-vbus-reg

From: Konrad Dybcio

Date: Wed May 20 2026 - 05:52:46 EST


On 5/20/26 11:07 AM, Rakesh Kota wrote:
> 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.
>
> Signed-off-by: Rakesh Kota <rakesh.kota@xxxxxxxxxxxxxxxx>
> ---
> .../regulator/qcom,usb-vbus-regulator.yaml | 50 +++++++++++++++++++---
> 1 file changed, 45 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
> index fcefc722ee2a495837fedba026669de97350c566..7c74573848bcdafbf6260f69cfcd7a9b58bc9f2d 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
> @@ -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

This change needs to be paired with an update to the existing DTS users,
or validation will fail

[...]

> + pmic {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + usb-vbus-regulator@5000 {
> + compatible = "qcom,pm4125-vbus-reg";
> + reg = <0x1100>;

This should fail make dt_binding_check, as the reg value doesn't match the
unit address (after the @ sign)

Konrad