* [PATCH 0/2] dt-bindings: usb: qcom,pmic-typec: two small fixes
@ 2026-09-20 14:37 Dmitry Baryshkov
2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov
2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov
0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2026-09-20 14:37 UTC (permalink / raw)
To: Bryan O'Donoghue, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel
Two fixes for the Qualcomm PMIC Type-C VBUS rework ([1])
[1] https://patch.msgid.link/20260519-fix-tcpm-vbus-v1-0-14754695282d@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Dmitry Baryshkov (2):
dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources
dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property
Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
base-commit: 3f2425f5b5bbbdd991ca9cdfd5502e68d8895998
change-id: 20260920-fix-tcpm-vbus-bis-e83fe7c57590
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources 2026-09-20 14:37 [PATCH 0/2] dt-bindings: usb: qcom,pmic-typec: two small fixes Dmitry Baryshkov @ 2026-09-20 14:37 ` Dmitry Baryshkov 2026-09-20 14:44 ` sashiko-bot 2026-09-20 21:22 ` Bryan O'Donoghue 2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov 1 sibling, 2 replies; 8+ messages in thread From: Dmitry Baryshkov @ 2026-09-20 14:37 UTC (permalink / raw) To: Bryan O'Donoghue, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate device-specific VBUS") deprecated the old, device-specific VBUS supply property for the sake of using the generic vbus-supply of the connector. It also removed the old property from the list of required properties, so now schema stopped requiring any VBUS supply. Add separate claude demanding that either an old one or a generic property are provided. Fixes: fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate device-specific VBUS") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> --- Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml index ba790c4488b7..db487562cec4 100644 --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml @@ -91,6 +91,14 @@ required: - interrupts - interrupt-names +oneOf: + - required: + - vdd-vbus-supply + - properties: + connector: + required: + - vbus-supply + allOf: - if: properties: -- 2.47.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources 2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov @ 2026-09-20 14:44 ` sashiko-bot 2026-09-20 21:22 ` Bryan O'Donoghue 1 sibling, 0 replies; 8+ messages in thread From: sashiko-bot @ 2026-09-20 14:44 UTC (permalink / raw) To: Dmitry Baryshkov; +Cc: conor+dt, robh, devicetree Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: broken oneOf logic erroneously rejects valid legacy nodes -- commit 91a069f510352e4c4e88b45ca0d906bfa22ef623 Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources This commit attempts to enforce that either the generic vbus-supply inside a connector node or the legacy vdd-vbus-supply is provided. It adds a oneOf constraint to check for either the old property or the generic property inside the connector node. > diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > @@ -91,6 +91,14 @@ required: > - interrupts > - interrupt-names > > +oneOf: > + - required: > + - vdd-vbus-supply > + - properties: > + connector: > + required: > + - vbus-supply [Severity: Medium] Does this logic mistakenly reject valid legacy nodes and allow missing vbus supplies? The JSON Schema properties keyword only applies constraints if the property exists in the instance. If the connector node is omitted entirely, the second branch of the oneOf block will vacuously evaluate to true. If neither vbus property is present, the first branch is false, but the second branch is true, meaning the oneOf constraint passes. This silently allows nodes missing vbus supplies. Conversely, if a valid legacy node provides vdd-vbus-supply but has no connector node, both the first branch and the second branch evaluate to true. Because oneOf strictly requires exactly one branch to be true, it fails validation and erroneously rejects valid legacy configurations. Should the second branch use a required constraint for the connector node to prevent this issue? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260920-fix-tcpm-vbus-bis-v1-0-cc9347bbe81a@oss.qualcomm.com?part=1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources 2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov 2026-09-20 14:44 ` sashiko-bot @ 2026-09-20 21:22 ` Bryan O'Donoghue 1 sibling, 0 replies; 8+ messages in thread From: Bryan O'Donoghue @ 2026-09-20 21:22 UTC (permalink / raw) To: Dmitry Baryshkov, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel On 20/09/2026 15:37, Dmitry Baryshkov wrote: > The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate > device-specific VBUS") deprecated the old, device-specific VBUS supply > property for the sake of using the generic vbus-supply of the connector. > It also removed the old property from the list of required properties, > so now schema stopped requiring any VBUS supply. Add separate claude > demanding that either an old one or a generic property are provided. This is a weird sentence. > > Fixes: fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate device-specific VBUS") > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > index ba790c4488b7..db487562cec4 100644 > --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > @@ -91,6 +91,14 @@ required: > - interrupts > - interrupt-names > > +oneOf: > + - required: > + - vdd-vbus-supply > + - properties: > + connector: > + required: > + - vbus-supply > + > allOf: > - if: > properties: > Other than that this seems logical. Once fixed. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property 2026-09-20 14:37 [PATCH 0/2] dt-bindings: usb: qcom,pmic-typec: two small fixes Dmitry Baryshkov 2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov @ 2026-09-20 14:37 ` Dmitry Baryshkov 2026-09-20 14:43 ` sashiko-bot ` (2 more replies) 1 sibling, 3 replies; 8+ messages in thread From: Dmitry Baryshkov @ 2026-09-20 14:37 UTC (permalink / raw) To: Bryan O'Donoghue, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate device-specific VBUS") switched the schema to use generic vbus-supply property, however the example continued to use the old, deprecated one. Update example to use the expected style of specifying the VBUS. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> --- Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml index db487562cec4..dd56dc8afe03 100644 --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml @@ -176,7 +176,6 @@ examples: "msg-rx-discarded", "fr-swap"; - vdd-vbus-supply = <&pm8150b_vbus>; vdd-pdphy-supply = <&vreg_l2a_3p1>; connector { @@ -186,6 +185,8 @@ examples: data-role = "dual"; self-powered; + vbus-supply = <&pm8150b_vbus>; + source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; -- 2.47.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property 2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov @ 2026-09-20 14:43 ` sashiko-bot 2026-09-20 21:21 ` Bryan O'Donoghue 2026-09-24 13:01 ` Krzysztof Kozlowski 2 siblings, 0 replies; 8+ messages in thread From: sashiko-bot @ 2026-09-20 14:43 UTC (permalink / raw) To: Dmitry Baryshkov; +Cc: devicetree, conor+dt, robh Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: incomplete oneOf constraint allows omitting VBUS supply -- commit 3178bc24ea3cc08021dfdd40f7987789b23a49de Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate device-specific VBUS") switched the schema to use generic vbus-supply property, however the example continued to use the old, deprecated one. Update example to use the expected style of specifying the VBUS. > diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > index db487562cec49..dd56dc8afe032 100644 > --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > @@ -176,7 +176,6 @@ examples: [ ... ] > - vdd-vbus-supply = <&pm8150b_vbus>; > vdd-pdphy-supply = <&vreg_l2a_3p1>; > > connector { > @@ -186,6 +185,8 @@ examples: > data-role = "dual"; > self-powered; > > + vbus-supply = <&pm8150b_vbus>; [Severity: Medium] Does the schema properly enforce that one of the VBUS sources is provided? Looking at the oneOf constraint defined in this file: Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml:oneOf - required: - vdd-vbus-supply - properties: connector: required: - vbus-supply If a device tree node misses both vdd-vbus-supply and the connector node, it fails the first branch but trivially passes the second branch. This happens because the properties keyword only applies constraints to properties actually present in the instance. Since exactly one branch passes, the overall oneOf constraint evaluates to true, silently accepting incomplete configurations and defeating the purpose of requiring one of the VBUS sources. Should the second branch also require the connector node to be present to ensure the constraint works as intended? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260920-fix-tcpm-vbus-bis-v1-0-cc9347bbe81a@oss.qualcomm.com?part=2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property 2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov 2026-09-20 14:43 ` sashiko-bot @ 2026-09-20 21:21 ` Bryan O'Donoghue 2026-09-24 13:01 ` Krzysztof Kozlowski 2 siblings, 0 replies; 8+ messages in thread From: Bryan O'Donoghue @ 2026-09-20 21:21 UTC (permalink / raw) To: Dmitry Baryshkov, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel On 20/09/2026 15:37, Dmitry Baryshkov wrote: > The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate > device-specific VBUS") switched the schema to use generic vbus-supply > property, however the example continued to use the old, deprecated one. > Update example to use the expected style of specifying the VBUS. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > index db487562cec4..dd56dc8afe03 100644 > --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml > @@ -176,7 +176,6 @@ examples: > "msg-rx-discarded", > "fr-swap"; > > - vdd-vbus-supply = <&pm8150b_vbus>; > vdd-pdphy-supply = <&vreg_l2a_3p1>; > > connector { > @@ -186,6 +185,8 @@ examples: > data-role = "dual"; > self-powered; > > + vbus-supply = <&pm8150b_vbus>; > + > source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | > PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; > > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property 2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov 2026-09-20 14:43 ` sashiko-bot 2026-09-20 21:21 ` Bryan O'Donoghue @ 2026-09-24 13:01 ` Krzysztof Kozlowski 2 siblings, 0 replies; 8+ messages in thread From: Krzysztof Kozlowski @ 2026-09-24 13:01 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Bryan O'Donoghue, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, linux-arm-msm, linux-usb, devicetree, linux-kernel On Sun, Sep 20, 2026 at 05:37:57PM +0300, Dmitry Baryshkov wrote: > The commit fe2195b019f6 ("dt-bindings: usb: qcom,pmic-typec: deprecate > device-specific VBUS") switched the schema to use generic vbus-supply > property, however the example continued to use the old, deprecated one. > Update example to use the expected style of specifying the VBUS. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> The other one has a valid Sashiko comment. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-09-24 13:02 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-20 14:37 [PATCH 0/2] dt-bindings: usb: qcom,pmic-typec: two small fixes Dmitry Baryshkov 2026-09-20 14:37 ` [PATCH 1/2] dt-bindings: usb: qcom,pmic-types: require one of the VBUS sources Dmitry Baryshkov 2026-09-20 14:44 ` sashiko-bot 2026-09-20 21:22 ` Bryan O'Donoghue 2026-09-20 14:37 ` [PATCH 2/2] dt-bindings: usb: qcom,pmic-types: make example use generic VBUS property Dmitry Baryshkov 2026-09-20 14:43 ` sashiko-bot 2026-09-20 21:21 ` Bryan O'Donoghue 2026-09-24 13:01 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox