mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Rakesh Kota <rakesh.kota@oss.qualcomm.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, jishnu.prakash@oss.qualcomm.com,
	kamal.wadhwa@oss.qualcomm.com
Subject: Re: [PATCH 1/2] dt-bindings: regulator: qcom,usb-vbus-regulator: add qcom,pm4125-vbus-reg
Date: Wed, 20 May 2026 11:44:42 +0200	[thread overview]
Message-ID: <253db4e4-7b69-466f-b4b6-59a77609b9fe@oss.qualcomm.com> (raw)
In-Reply-To: <20260520-add_pm4125-vbus-reg-v1-1-f6d15d7dbbe8@oss.qualcomm.com>

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@oss.qualcomm.com>
> ---
>  .../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

  reply	other threads:[~2026-05-20  9:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  9:07 [PATCH 0/2] regulator: qcom_usb_vbus: add pm4125 VBUS regulator support Rakesh Kota
2026-05-20  9:07 ` [PATCH 1/2] dt-bindings: regulator: qcom,usb-vbus-regulator: add qcom,pm4125-vbus-reg Rakesh Kota
2026-05-20  9:44   ` Konrad Dybcio [this message]
2026-05-20 10:21     ` Rakesh Kota
2026-05-20  9:58   ` Dmitry Baryshkov
2026-05-20 11:36     ` Rakesh Kota
2026-05-20  9:07 ` [PATCH 2/2] regulator: qcom_usb_vbus: add support for qcom,pm4125-vbus-reg Rakesh Kota
2026-05-20  9:51   ` Konrad Dybcio
2026-05-20 11:21     ` Rakesh Kota
2026-06-30 13:47       ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=253db4e4-7b69-466f-b4b6-59a77609b9fe@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_wcheng@quicinc.com \
    --cc=rakesh.kota@oss.qualcomm.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®