Re: [PATCH 3/3] dt-bindings: arm: qcom-soc: Validate nodes with fallbacks

From: Rob Herring (Arm)

Date: Tue May 19 2026 - 19:56:38 EST



On Tue, 19 May 2026 22:03:20 +0200, Krzysztof Kozlowski wrote:
> The schema checking for expected naming patterns for SoC IP block nodes
> was really incomplete and was checking only nodes with single
> compatible. Fixing this and applying schema for nodes with fallbacks is
> not trivial, because obvious solution like:
>
> minItems: 1
> items:
> - oneOf:
> - pattern: ...
> - pattern: ...
> - {}
> - {}
>
> is not allowed by dtschema. The binding should also skip root nodes,
> which have SoC-based fallback, but completely random front compatibles.
>
> Solve this all by:
> 1. Extending the select pattern to match all nodes except root node.
> 2. Apply schema to all items of "compatible" property, which means it
> will be evaluating also all sorts of generic compatibles like
> "syscon". List them all and let's hope that fallback list will not
> grow too much, because generic compatible fallbacks are discouraged.
>
> The benefit is that this schema is finally very specific and evaluates
> all nodes for desired naming.
>
> Diff is a bit obfuscated, due to indentation change so briefly
> explaining:
> 1. None of the patterns are changed (neither in "Preferred naming style"
> group nor in "Legacy namings").
> 2. None of the enums with "Legacy namings" and "Legacy compatibles with
> wild-cards" are changed.
> 3. Add pattern for sound cards.
> 4. Add list with all used generic fallbacks.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
> ---
> .../devicetree/bindings/arm/qcom-soc.yaml | 182 ++++++++++++++++-----
> 1 file changed, 137 insertions(+), 45 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/phy/qcom,usb-hsic-phy.example.dtb: phy (qcom,usb-hsic-phy-msm8974): compatible:0: 'anyOf' conditional failed, one must be fixed:
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+(pro)?-.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,sar[0-9]+[a-z]?-.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,(sa|sc)8[0-9]+[a-z][a-z]?-.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,(eliza|kaanapali|glymur|hawi|mahua|milos|shikra)-.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,[ak]pss-wdt-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,apss-wdt-[a-z]+$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,kpss-gcc-(apq|ipq|mdm|msm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,gcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,mmcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,pcie-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,rpm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,rpmcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,scm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sar?|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,scm-[a-z]+$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,tcsr-(apq|ipq|mdm|msm)[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' does not match '^qcom,usb-hs-phy-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy-msm8974' is not one of ['qcom,dsi-ctrl-6g-qcm2290', 'qcom,gpucc-sdm630', 'qcom,gpucc-sdm660', 'qcom,lcc-apq8064', 'qcom,lcc-ipq8064', 'qcom,lcc-mdm9615', 'qcom,lcc-msm8960', 'qcom,lpass-cpu-apq8016', 'qcom,usb-ss-ipq4019-phy', 'qcom,usb-hs-ipq4019-phy', 'qcom,vqmmc-ipq4019-regulator']
'qcom,usb-hsic-phy-msm8974' is not one of ['qcom,ipq806x-ahci', 'qcom,ipq806x-gmac', 'qcom,ipq806x-nand', 'qcom,ipq806x-sata-phy', 'qcom,ipq806x-usb-phy-ss', 'qcom,ipq806x-usb-phy-hs']
'qcom,usb-hsic-phy-msm8974' does not match '^.*,.*sndcard$'
'qcom,usb-hsic-phy-msm8974' is not one of ['arm,gic-v3', 'arm,mmu-500', 'generic-ahci', 'jedec,ufs-2.0', 'mmio-sram', 'qcom,adreno-smmu', 'qcom,aoss-qmp', 'qcom,cpr', 'qcom,cpufreq-epss', 'qcom,cpufreq-hw', 'qcom,dcc', 'qcom,dwc3', 'qcom,epss-l3', 'qcom,eud', 'qcom,glink-smd-rpm', 'qcom,inline-crypto-engine', 'qcom,ipcc', 'qcom,kpss-gcc', 'qcom,kpss-timer', 'qcom,kpss-wdt', 'qcom,mdp5', 'qcom,mdss-dsi-ctrl', 'qcom,msm-iommu-v1', 'qcom,msm-iommu-v2', 'qcom,msm-timer', 'qcom,osm-l3', 'qcom,pcie2-phy', 'qcom,pdc', 'qcom,pmic-glink', 'qcom,qce', 'qcom,qfprom', 'qcom,qspi-v1', 'qcom,qusb2-v2-phy', 'qcom,rpm-proc', 'qcom,rpmh-rsc', 'qcom,rpmcc', 'qcom,saw2', 'qcom,scm', 'qcom,sdhci-msm-v4', 'qcom,sdhci-msm-v5', 'qcom,sec-qfprom', 'qcom,smd-rpm', 'qcom,smmu-500', 'qcom,smmu-v2', 'qcom,snps-dwc3', 'qcom,ssc-block-bus', 'qcom,tcsr-mutex', 'qcom,trng', 'qcom,tsens-v0_1', 'qcom,tsens-v1', 'qcom,tsens-v2', 'qcom,ufshc', 'qcom,usb-hs-phy', 'qcom,usb-snps-hs-5nm-phy', 'qcom,usb-snps-hs-7nm-phy',
'simple-mfd', 'snps,dwmac', 'syscon']
from schema $id: http://devicetree.org/schemas/arm/qcom-soc.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/qcom,usb-hsic-phy.example.dtb: phy (qcom,usb-hsic-phy-msm8974): compatible:1: 'anyOf' conditional failed, one must be fixed:
'qcom,usb-hsic-phy' does not match '^qcom,(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+(pro)?-.*$'
'qcom,usb-hsic-phy' does not match '^qcom,sar[0-9]+[a-z]?-.*$'
'qcom,usb-hsic-phy' does not match '^qcom,(sa|sc)8[0-9]+[a-z][a-z]?-.*$'
'qcom,usb-hsic-phy' does not match '^qcom,(eliza|kaanapali|glymur|hawi|mahua|milos|shikra)-.*$'
'qcom,usb-hsic-phy' does not match '^qcom,[ak]pss-wdt-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,apss-wdt-[a-z]+$'
'qcom,usb-hsic-phy' does not match '^qcom,kpss-gcc-(apq|ipq|mdm|msm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,gcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,mmcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,pcie-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,rpm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,rpmcc-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,scm-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sar?|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,scm-[a-z]+$'
'qcom,usb-hsic-phy' does not match '^qcom,tcsr-(apq|ipq|mdm|msm)[0-9]+.*$'
'qcom,usb-hsic-phy' does not match '^qcom,usb-hs-phy-(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sc|sd[amx]|sm|x1[ep])[0-9]+.*$'
'qcom,usb-hsic-phy' is not one of ['qcom,dsi-ctrl-6g-qcm2290', 'qcom,gpucc-sdm630', 'qcom,gpucc-sdm660', 'qcom,lcc-apq8064', 'qcom,lcc-ipq8064', 'qcom,lcc-mdm9615', 'qcom,lcc-msm8960', 'qcom,lpass-cpu-apq8016', 'qcom,usb-ss-ipq4019-phy', 'qcom,usb-hs-ipq4019-phy', 'qcom,vqmmc-ipq4019-regulator']
'qcom,usb-hsic-phy' is not one of ['qcom,ipq806x-ahci', 'qcom,ipq806x-gmac', 'qcom,ipq806x-nand', 'qcom,ipq806x-sata-phy', 'qcom,ipq806x-usb-phy-ss', 'qcom,ipq806x-usb-phy-hs']
'qcom,usb-hsic-phy' does not match '^.*,.*sndcard$'
'qcom,usb-hsic-phy' is not one of ['arm,gic-v3', 'arm,mmu-500', 'generic-ahci', 'jedec,ufs-2.0', 'mmio-sram', 'qcom,adreno-smmu', 'qcom,aoss-qmp', 'qcom,cpr', 'qcom,cpufreq-epss', 'qcom,cpufreq-hw', 'qcom,dcc', 'qcom,dwc3', 'qcom,epss-l3', 'qcom,eud', 'qcom,glink-smd-rpm', 'qcom,inline-crypto-engine', 'qcom,ipcc', 'qcom,kpss-gcc', 'qcom,kpss-timer', 'qcom,kpss-wdt', 'qcom,mdp5', 'qcom,mdss-dsi-ctrl', 'qcom,msm-iommu-v1', 'qcom,msm-iommu-v2', 'qcom,msm-timer', 'qcom,osm-l3', 'qcom,pcie2-phy', 'qcom,pdc', 'qcom,pmic-glink', 'qcom,qce', 'qcom,qfprom', 'qcom,qspi-v1', 'qcom,qusb2-v2-phy', 'qcom,rpm-proc', 'qcom,rpmh-rsc', 'qcom,rpmcc', 'qcom,saw2', 'qcom,scm', 'qcom,sdhci-msm-v4', 'qcom,sdhci-msm-v5', 'qcom,sec-qfprom', 'qcom,smd-rpm', 'qcom,smmu-500', 'qcom,smmu-v2', 'qcom,snps-dwc3', 'qcom,ssc-block-bus', 'qcom,tcsr-mutex', 'qcom,trng', 'qcom,tsens-v0_1', 'qcom,tsens-v1', 'qcom,tsens-v2', 'qcom,ufshc', 'qcom,usb-hs-phy', 'qcom,usb-snps-hs-5nm-phy', 'qcom,usb-snps-hs-7nm-phy', 'simple-
mfd', 'snps,dwmac', 'syscon']
from schema $id: http://devicetree.org/schemas/arm/qcom-soc.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/20260519-dt-bindings-qcom-soc-naming-v1-3-005d29d261ae@xxxxxxxxxxxxxxxx

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.