On Thu, 23 Nov 2023 20:06:12 +0100, Niklas Söderlund wrote: > Compatibles can come in two formats. Either "vendor,ip-soc" or > "vendor,soc-ip". Add a DT schema file documenting Renesas preferred > policy and enforcing it for all new compatibles, except few existing > patterns. > > Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> > --- > Hello, > > I have mixed up the order of soc and ip a few times. The last time I did > Krzysztof suggested a schema could help catch this, and this is my > attempt to create one. > > One thing to note is that the select clause matches on all renesas > related bindings, including ones that are SoC agnostic and a few that > are Renesas IP that are not related to a SoC e.g. a Renesas regulator. > > For this reason these two classes of compatibles have been added to this > schema. An alternative solution would be to change the select clause to > "^renesas,.+-.+$" and drop these two classes from the schema. > > I have tested this schema with all DTBs built for ARM using the in tree > shmobile_defconfig and ARM64 using the renesas_defconfig found in > Geert's renesas-drivers tree [1]. > > 1. https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git > > --- > .../devicetree/bindings/arm/renesas-soc.yaml | 85 +++++++++++++++++++ > 1 file changed, 85 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/renesas-soc.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/remoteproc/renesas,rcar-rproc.example.dtb: cr7: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,rcar-cr7' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,rcar-cr7' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,rcar-cr7' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,rcar-cr7' does not match '^renesas,du-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,rcar-cr7' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,rcar-cr7' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,rcar-cr7' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.example.dtb: potentiometer@0: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,x9250t' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,x9250t' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,x9250t' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,x9250t' does not match '^renesas,du-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,x9250t' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,x9250t' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,x9250t' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/timer/renesas,tpu.example.dtb: tpu@ffffe0: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,tpu' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,tpu' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,tpu' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,tpu' does not match '^renesas,du-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,tpu' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,tpu' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,tpu' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/renesas,9series.example.dtb: clock-generator@6a: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,9fgv0241' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,9fgv0241' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,9fgv0241' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,9fgv0241' does not match '^renesas,du-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,9fgv0241' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,9fgv0241' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,9fgv0241' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/renesas,versaclock7.example.dtb: clock-controller@9: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,rc21008a' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,rc21008a' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,rc21008a' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,rc21008a' does not match '^renesas,du-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,rc21008a' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,rc21008a' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,rc21008a' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,idt821034.example.dtb: audio-codec@0: compatible: 'oneOf' conditional failed, one must be fixed: 'renesas,idt821034' does not match '^renesas,emev2-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,r7s[0-9]+-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,r8a[a-z0-9]+-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,r9a[0-9]+g[0-9]+-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,rzn1-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,rzv2m-[a-z0-9-]+$' 'renesas,idt821034' does not match '^renesas,sh73a0-[a-z0-9-]+$' 'renesas,idt821034' is not one of ['renesas,bsid', 'renesas,fcpf', 'renesas,fcpv', 'renesas,fdp1', 'renesas,prr', 'renesas,smp-sram', 'renesas,vsp1', 'renesas,vsp2'] 'renesas,idt821034' does not match '^renesas,du-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,ether-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,gether-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,ipmmu-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,pfc-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,sata-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,scif-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,sdhi-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,thermal-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,usb2-phy-[a-z0-9]+$' 'renesas,idt821034' does not match '^renesas,vin-[a-z0-9]+$' 'renesas,idt821034' is not one of ['renesas,dbsc-r8a73a4', 'renesas,dbsc3-r8a7740', 'renesas,em-gio', 'renesas,em-sti', 'renesas,em-uart', 'renesas,iic-emev2', 'renesas,sbsc-sh73a0', 'renesas,sdhi-mmc-r8a77470'] 'renesas,idt821034' is not one of ['renesas,5p35023', 'renesas,r2a11302ft', 'renesas,raa215300'] from schema $id: http://devicetree.org/schemas/arm/renesas-soc.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231123190612.2427668-1-niklas.soderlund+renesas@xxxxxxxxxxxx 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.