Re: [PATCH v2 2/7] dt-bindings: usb: Introduce qcom,snps-dwc3

Rob Herring (Arm)
2024-08-12T04:32:07Z

On Sun, 11 Aug 2024 20:11:59 -0700, Bjorn Andersson wrote:
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> The Qualcomm USB glue is not separate of the Synopsys DWC3 core and
> several of the snps,dwc3 properties (such as clocks and reset) conflicts
> in expectation with the Qualcomm integration.
>
> Using the newly split out Synopsys DWC3 core properties, describe the
> Qualcomm USB block in a single block. The new binding is a copy of
> qcom,dwc3 with the needed modifications.
>
> It would have been convenient to retain the two structures with the same
> compatibles, but as there exist no way to select a binding based on the
> absence of a subnode/patternProperty, a new generic compatible is
> introduced to describe this binding.
>
> To avoid redefining all the platform-specific compatibles, "select" is
> used to tell the DeviceTree validator which binding to use solely on the
> generic compatible. (Otherwise if the specific compatible matches during
> validation, the generic one must match as well)
>
> Mark qcom,dwc3 deprecated, to favor expressing future platforms using
> the new combined binding.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
> .../devicetree/bindings/usb/qcom,dwc3.yaml | 13 +-
> .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 608 +++++++++++++++++++++
> 2 files changed, 620 insertions(+), 1 deletion(-)
>

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,snps-dwc3.example.dtb: usb@a600000: False schema does not allow {'compatible': ['qcom,sdm845-dwc3', 'qcom,snps-dwc3'], 'reg': [[0, 174063616, 0, 1048576]], 'clocks': [[4294967295, 12], [4294967295, 141], [4294967295, 3], [4294967295, 145], [4294967295, 143]], 'clock-names': ['cfg_noc', 'core', 'iface', 'sleep', 'mock_utmi'], 'assigned-clocks': [[4294967295, 143], [4294967295, 141]], 'assigned-clock-rates': [19200000, 150000000], 'interrupts': [[0, 133, 4], [0, 130, 4], [0, 131, 4], [0, 489, 3], [0, 488, 3], [0, 486, 4]], 'interrupt-names': ['dwc_usb3', 'pwr_event', 'hs_phy_irq', 'dp_hs_phy_irq', 'dm_hs_phy_irq', 'ss_phy_irq'], 'power-domains': [[4294967295, 4]], 'resets': [[4294967295, 15]], 'iommus': [[4294967295, 1856, 0]], 'snps,dis_u2_susphy_quirk': True, 'snps,dis_enblslpm_quirk': True, 'phys': [[4294967295], [4294967295]], 'phy-names': ['usb2-phy', 'usb3-phy'], '$nodename': ['usb@a600000']}
from schema $id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.example.dtb: usb@a600000: Unevaluated properties are not allowed ('phy-names', 'phys', 'snps,dis_enblslpm_quirk', 'snps,dis_u2_susphy_quirk' 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/20240811-dwc3-refactor-v2-2-91f370d61ad2@quicinc.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.