On Qualcomm automotive SoC sa8255p, platform resources like clocks,
interconnect, resets, regulators and GDSC are configured remotely by
firmware.
PM OPP is used to abstract these resources in firmware and SCMI perf
protocol is used to request resource operations by using runtime PM
framework APIs such as pm_runtime_get/put_sync to signal firmware
for managing resources accordingly for respective perf levels.
"qcom,snps-dwc3-fw-managed" compatible helps determine if
the device's resources are managed by firmware.
Additionally, it makes the power-domains property mandatory
and excludes the clocks property for the controller.
Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com>
---
.../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 173 +++++++++++++--------
1 file changed, 111 insertions(+), 62 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index 8cee7c5582f2..d2d1b42fbb07 100644
--- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
@@ -12,68 +12,65 @@ maintainers:
description:
Describes the Qualcomm USB block, based on Synopsys DWC3.
-select:
- properties:
- compatible:
- contains:
- const: qcom,snps-dwc3
- required:
- - compatible
-
properties:
compatible:
- items:
- - enum:
- - qcom,glymur-dwc3
- - qcom,glymur-dwc3-mp
- - qcom,ipq4019-dwc3
- - qcom,ipq5018-dwc3
- - qcom,ipq5332-dwc3
- - qcom,ipq5424-dwc3
- - qcom,ipq6018-dwc3
- - qcom,ipq8064-dwc3
- - qcom,ipq8074-dwc3
- - qcom,ipq9574-dwc3
- - qcom,kaanapali-dwc3
- - qcom,milos-dwc3
- - qcom,msm8953-dwc3
- - qcom,msm8994-dwc3
- - qcom,msm8996-dwc3
- - qcom,msm8998-dwc3
- - qcom,qcm2290-dwc3
- - qcom,qcs404-dwc3
- - qcom,qcs615-dwc3
- - qcom,qcs8300-dwc3
- - qcom,qdu1000-dwc3
- - qcom,sa8775p-dwc3
- - qcom,sar2130p-dwc3
- - qcom,sc7180-dwc3
- - qcom,sc7280-dwc3
- - qcom,sc8180x-dwc3
- - qcom,sc8180x-dwc3-mp
- - qcom,sc8280xp-dwc3
- - qcom,sc8280xp-dwc3-mp
- - qcom,sdm660-dwc3
- - qcom,sdm670-dwc3
- - qcom,sdm845-dwc3
- - qcom,sdx55-dwc3
- - qcom,sdx65-dwc3
- - qcom,sdx75-dwc3
- - qcom,sm4250-dwc3
- - qcom,sm6115-dwc3
- - qcom,sm6125-dwc3
- - qcom,sm6350-dwc3
- - qcom,sm6375-dwc3
- - qcom,sm8150-dwc3
- - qcom,sm8250-dwc3
- - qcom,sm8350-dwc3
- - qcom,sm8450-dwc3
- - qcom,sm8550-dwc3
- - qcom,sm8650-dwc3
- - qcom,sm8750-dwc3
- - qcom,x1e80100-dwc3
- - qcom,x1e80100-dwc3-mp
- - const: qcom,snps-dwc3
+ oneOf:
+ - items:
+ - enum:
+ - qcom,glymur-dwc3
+ - qcom,glymur-dwc3-mp
+ - qcom,ipq4019-dwc3
+ - qcom,ipq5018-dwc3
+ - qcom,ipq5332-dwc3
+ - qcom,ipq5424-dwc3
+ - qcom,ipq6018-dwc3
+ - qcom,ipq8064-dwc3
+ - qcom,ipq8074-dwc3
+ - qcom,ipq9574-dwc3
+ - qcom,kaanapali-dwc3
+ - qcom,milos-dwc3
+ - qcom,msm8953-dwc3
+ - qcom,msm8994-dwc3
+ - qcom,msm8996-dwc3
+ - qcom,msm8998-dwc3
+ - qcom,qcm2290-dwc3
+ - qcom,qcs404-dwc3
+ - qcom,qcs615-dwc3
+ - qcom,qcs8300-dwc3
+ - qcom,qdu1000-dwc3
+ - qcom,sa8775p-dwc3
+ - qcom,sar2130p-dwc3
+ - qcom,sc7180-dwc3
+ - qcom,sc7280-dwc3
+ - qcom,sc8180x-dwc3
+ - qcom,sc8180x-dwc3-mp
+ - qcom,sc8280xp-dwc3
+ - qcom,sc8280xp-dwc3-mp
+ - qcom,sdm660-dwc3
+ - qcom,sdm670-dwc3
+ - qcom,sdm845-dwc3
+ - qcom,sdx55-dwc3
+ - qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
+ - qcom,sm4250-dwc3
+ - qcom,sm6115-dwc3
+ - qcom,sm6125-dwc3
+ - qcom,sm6350-dwc3
+ - qcom,sm6375-dwc3
+ - qcom,sm8150-dwc3
+ - qcom,sm8250-dwc3
+ - qcom,sm8350-dwc3
+ - qcom,sm8450-dwc3
+ - qcom,sm8550-dwc3
+ - qcom,sm8650-dwc3
+ - qcom,sm8750-dwc3
+ - qcom,x1e80100-dwc3
+ - qcom,x1e80100-dwc3-mp
+ - const: qcom,snps-dwc3
+ - items:
+ - enum:
+ - qcom,sa8255p-dwc3
+ - const: qcom,snps-dwc3-fw-managed
reg:
maxItems: 1
@@ -158,13 +155,31 @@ properties:
required:
- compatible
- reg
- - clocks
- - clock-names
- interrupts
- interrupt-names
allOf:
- $ref: snps,dwc3-common.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,snps-dwc3
+ then:
+ required:
+ - clocks
+ - clock-names
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,snps-dwc3-fw-managed
+ then:
+ required:
+ - power-domains
+
- if:
properties:
compatible:
@@ -513,6 +528,7 @@ allOf:
- qcom,qcs615-dwc3
- qcom,qcs8300-dwc3
- qcom,qdu1000-dwc3
+ - qcom,sa8255p-dwc3
- qcom,sa8775p-dwc3
- qcom,sc7180-dwc3
- qcom,sc7280-dwc3
@@ -657,4 +673,37 @@ examples:
phy-names = "usb2-phy", "usb3-phy";
};
};
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ usb@a600000 {
+ compatible = "qcom,sa8255p-dwc3", "qcom,snps-dwc3-fw-managed";
+ reg = <0x0 0x0a800000 0x0 0x10000>;
+
+ interrupts-extended = <&intc GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 8 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 7 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 13 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dwc_usb3",
+ "pwr_event",
+ "hs_phy_irq",
+ "dp_hs_phy_irq",
+ "dm_hs_phy_irq",
+ "ss_phy_irq";
+
+ power-domains = <&scmi1_dvfs 0>;
+
+ iommus = <&apps_smmu 0x0a0 0x0>;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_enblslpm_quirk;
+ phys = <&usb_1_hsphy>, <&usb_1_qmpphy>;
+ phy-names = "usb2-phy", "usb3-phy";
+ };
+ };
...
--
2.34.1
On 27/11/2025 11:31, Sriram Dash wrote: > On Qualcomm automotive SoC sa8255p, platform resources like clocks, > interconnect, resets, regulators and GDSC are configured remotely by > firmware. > > PM OPP is used to abstract these resources in firmware and SCMI perf > protocol is used to request resource operations by using runtime PM > framework APIs such as pm_runtime_get/put_sync to signal firmware > for managing resources accordingly for respective perf levels. > > "qcom,snps-dwc3-fw-managed" compatible helps determine if > the device's resources are managed by firmware. > Additionally, it makes the power-domains property mandatory > and excludes the clocks property for the controller. > > Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com> > --- > .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 173 +++++++++++++-------- > 1 file changed, 111 insertions(+), 62 deletions(-) > > diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml > index 8cee7c5582f2..d2d1b42fbb07 100644 > --- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml > +++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml > @@ -12,68 +12,65 @@ maintainers: > description: > Describes the Qualcomm USB block, based on Synopsys DWC3. > > -select: > - properties: > - compatible: > - contains: > - const: qcom,snps-dwc3 > - required: > - - compatible I wonder why do you think dropping some code is fine... > + - items: > + - enum: > + - qcom,sa8255p-dwc3 > + - const: qcom,snps-dwc3-fw-managed No, you cannot keep coming with more generic compatibles. If you want generic a compatible, you already have - qcom,snps-dwc3 - and that "generic" part already said that everything is compatible with it. Now you claim that existing generic compatible qcom,snps-dwc3 is not generic enough and you need one more generic compatible. Next year you will say that two generic compatibles are not generic enough and you need third generic compatible. In two years we will learn that three generic compatibles are not enough... I think I was complaining on the lists a lot on this, so I am surprised it is still coming back. So no, you cannot claim that you need more generic compatibles because one generic is not generic. NAK. Best regards, Krzysztof
On 11/27/2025 5:43 PM, Krzysztof Kozlowski wrote:
> On 27/11/2025 11:31, Sriram Dash wrote:
>> On Qualcomm automotive SoC sa8255p, platform resources like clocks,
>> interconnect, resets, regulators and GDSC are configured remotely by
>> firmware.
>>
>> PM OPP is used to abstract these resources in firmware and SCMI perf
>> protocol is used to request resource operations by using runtime PM
>> framework APIs such as pm_runtime_get/put_sync to signal firmware
>> for managing resources accordingly for respective perf levels.
>>
>> "qcom,snps-dwc3-fw-managed" compatible helps determine if
>> the device's resources are managed by firmware.
>> Additionally, it makes the power-domains property mandatory
>> and excludes the clocks property for the controller.
>>
>> Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com>
>> ---
>> .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 173 +++++++++++++--------
>> 1 file changed, 111 insertions(+), 62 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
>> index 8cee7c5582f2..d2d1b42fbb07 100644
>> --- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
>> @@ -12,68 +12,65 @@ maintainers:
>> description:
>> Describes the Qualcomm USB block, based on Synopsys DWC3.
>>
>> -select:
>> - properties:
>> - compatible:
>> - contains:
>> - const: qcom,snps-dwc3
>> - required:
>> - - compatible
> I wonder why do you think dropping some code is fine...
>
>
>> + - items:
>> + - enum:
>> + - qcom,sa8255p-dwc3
>> + - const: qcom,snps-dwc3-fw-managed
> No, you cannot keep coming with more generic compatibles.
>
> If you want generic a compatible, you already have - qcom,snps-dwc3 -
> and that "generic" part already said that everything is compatible with it.
>
> Now you claim that existing generic compatible qcom,snps-dwc3 is not
> generic enough and you need one more generic compatible.
>
> Next year you will say that two generic compatibles are not generic
> enough and you need third generic compatible.
>
> In two years we will learn that three generic compatibles are not enough...
>
> I think I was complaining on the lists a lot on this, so I am surprised
> it is still coming back.
>
> So no, you cannot claim that you need more generic compatibles because
> one generic is not generic. NAK.
Hi Krzysztof,
understood. Shall i make it platform specific then ? For example,
Say, For x1e80100, where platform resources are not managed by firmware,
use compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3";
For Soc 8255p, where platform resources are managed by firmware, still
will use the generic compatible say, compatible = "qcom,sa8255p-dwc3",
"qcom,snps-dwc3";
and in the driver, we will handle with the platform specific compatible.
static const struct of_device_id dwc3_qcom_of_match[] = {
{
.compatible = "qcom,sa8255p-dwc3",
.data = (void *)true,
},
{ .compatible = "qcom,snps-dwc3" },
{ }
};
For any other Soc where the resources are managed by firmware, we can
still reuse the compatible qcom,sa8255p-dwc3
say compatible = "qcom-foo-dwc3", "qcom,sa8255p-dwc3", "qcom,snps-dwc3";
compatible = "qcom-bar-dwc3", "qcom,sa8255p-dwc3", "qcom,snps-dwc3";
...
>
> Best regards,
> Krzysztof
On 27/11/2025 13:13, Krzysztof Kozlowski wrote: > On 27/11/2025 11:31, Sriram Dash wrote: >> On Qualcomm automotive SoC sa8255p, platform resources like clocks, >> interconnect, resets, regulators and GDSC are configured remotely by >> firmware. >> >> PM OPP is used to abstract these resources in firmware and SCMI perf >> protocol is used to request resource operations by using runtime PM >> framework APIs such as pm_runtime_get/put_sync to signal firmware >> for managing resources accordingly for respective perf levels. >> >> "qcom,snps-dwc3-fw-managed" compatible helps determine if >> the device's resources are managed by firmware. >> Additionally, it makes the power-domains property mandatory >> and excludes the clocks property for the controller. >> >> Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com> >> --- >> .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 173 +++++++++++++-------- >> 1 file changed, 111 insertions(+), 62 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml >> index 8cee7c5582f2..d2d1b42fbb07 100644 >> --- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml >> +++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml >> @@ -12,68 +12,65 @@ maintainers: >> description: >> Describes the Qualcomm USB block, based on Synopsys DWC3. >> >> -select: >> - properties: >> - compatible: >> - contains: >> - const: qcom,snps-dwc3 >> - required: >> - - compatible > > I wonder why do you think dropping some code is fine... > > >> + - items: >> + - enum: >> + - qcom,sa8255p-dwc3 >> + - const: qcom,snps-dwc3-fw-managed > > No, you cannot keep coming with more generic compatibles. > > If you want generic a compatible, you already have - qcom,snps-dwc3 - > and that "generic" part already said that everything is compatible with it. > > Now you claim that existing generic compatible qcom,snps-dwc3 is not > generic enough and you need one more generic compatible. > > Next year you will say that two generic compatibles are not generic > enough and you need third generic compatible. > > In two years we will learn that three generic compatibles are not enough... > > I think I was complaining on the lists a lot on this, so I am surprised > it is still coming back. > > So no, you cannot claim that you need more generic compatibles because > one generic is not generic. NAK. What is even weirder is that other patchset for the same SA8255 FW managed IP block correctly ignored generic compatible: https://lore.kernel.org/all/20251114145646.2291324-3-ram.dwivedi@oss.qualcomm.com/ so somehow you should meet and align on common understanding of things. Please do not send completely different patches for the same problem. Best regards, Krzysztof
On Thu, 27 Nov 2025 16:01:44 +0530, Sriram Dash wrote:
> On Qualcomm automotive SoC sa8255p, platform resources like clocks,
> interconnect, resets, regulators and GDSC are configured remotely by
> firmware.
>
> PM OPP is used to abstract these resources in firmware and SCMI perf
> protocol is used to request resource operations by using runtime PM
> framework APIs such as pm_runtime_get/put_sync to signal firmware
> for managing resources accordingly for respective perf levels.
>
> "qcom,snps-dwc3-fw-managed" compatible helps determine if
> the device's resources are managed by firmware.
> Additionally, it makes the power-domains property mandatory
> and excludes the clocks property for the controller.
>
> Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com>
> ---
> .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 173 +++++++++++++--------
> 1 file changed, 111 insertions(+), 62 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): #address-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): #size-cells: 0 was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): interrupt-names:0: 'dwc_usb3' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): interrupt-names:1: 'pwr_event' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): interrupt-names:2: 'hs_phy_irq' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): interrupt-names:3: 'dp_hs_phy_irq' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): interrupt-names:4: 'dm_hs_phy_irq' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): compatible: 'oneOf' conditional failed, one must be fixed:
'qcom,sdm845-dwc3' is not one of ['qcom,sa8255p-dwc3']
'qcom,snps-dwc3' was expected
'qcom,snps-dwc3-fw-managed' was expected
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.example.dtb: usb@a6f8800 (qcom,sdm845-dwc3): Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'ranges', 'usb@a600000' were unexpected)
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251127-controller_scmi_upstream-v1-1-38bcca513c28@oss.qualcomm.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2025 Red Hat, Inc.