[PATCH] dt-bindings: media: nxp, imx7-mipi-csi2: Drop bad if/then schema

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Dec 2 14:21:28 PST 2021


Hi Rob,

On Thu, Dec 02, 2021 at 07:58:09AM -0600, Rob Herring wrote:
> On Wed, 01 Dec 2021 20:30:21 -0600, Rob Herring wrote:
> > The if/then schema for 'data-lanes' doesn't work as 'compatible' is at a
> > different level than 'data-lanes'. To make it work, the if/then schema
> > would have to be moved to the top level and then whole hierarchy of
> > nodes down to 'data-lanes' created. I don't think it is worth the
> > complexity to do that, so let's just drop it.
> > 
> > The error in this schema is masked by a fixup in the tools causing the
> > 'allOf' to get overwritten. Removing the fixup as part of moving to
> > json-schema draft 2019-09 revealed the issue:
> > 
> > Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi at 30750000: ports:port at 0:endpoint:data-lanes:0: [1] is too short
> > 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
> > Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi at 32e30000: ports:port at 0:endpoint:data-lanes:0: [1, 2, 3, 4] is too long
> > 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml
> > 
> > The if condition was always true because 'compatible' did not exist in
> > 'endpoint' node and a non-existent property is true for json-schema.
> > 
> > Fixes: 85b62ff2cb97 ("media: dt-bindings: media: nxp,imx7-mipi-csi2: Add i.MX8MM support")
> > Cc: Rui Miguel Silva <rmfrfs at gmail.com>
> > Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > Cc: Mauro Carvalho Chehab <mchehab at kernel.org>
> > Cc: Shawn Guo <shawnguo at kernel.org>
> > Cc: Sascha Hauer <s.hauer at pengutronix.de>
> > Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> > Cc: Fabio Estevam <festevam at gmail.com>
> > Cc: NXP Linux Team <linux-imx at nxp.com>
> > Cc: linux-media at vger.kernel.org
> > Cc: linux-arm-kernel at lists.infradead.org
> > Signed-off-by: Rob Herring <robh at kernel.org>
> > ---
> >  .../bindings/media/nxp,imx7-mipi-csi2.yaml           | 12 ------------
> >  1 file changed, 12 deletions(-)
> > 
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.

Fixes available in
https://lore.kernel.org/all/20211202221903.21882-1-laurent.pinchart@ideasonboard.com
:-)

> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/patch/1562521
> 
> 
> mipi-csi at 30750000: '#address-cells', '#size-cells', 'fsl,csis-hs-settle', 'port at 0', 'port at 1', 'reset-names' do not match any of the regexes: 'pinctrl-[0-9]+'
> 	arch/arm/boot/dts/imx7s-warp.dt.yaml
> 
> mipi-csi at 30750000: '#address-cells', '#size-cells', 'port at 0', 'port at 1', 'reset-names' do not match any of the regexes: 'pinctrl-[0-9]+'
> 	arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml
> 	arch/arm/boot/dts/imx7d-colibri-aster.dt.yaml
> 	arch/arm/boot/dts/imx7d-colibri-emmc-aster.dt.yaml
> 	arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dt.yaml
> 	arch/arm/boot/dts/imx7d-colibri-eval-v3.dt.yaml
> 	arch/arm/boot/dts/imx7d-flex-concentrator.dt.yaml
> 	arch/arm/boot/dts/imx7d-flex-concentrator-mfg.dt.yaml
> 	arch/arm/boot/dts/imx7d-mba7.dt.yaml
> 	arch/arm/boot/dts/imx7d-meerkat96.dt.yaml
> 	arch/arm/boot/dts/imx7d-nitrogen7.dt.yaml
> 	arch/arm/boot/dts/imx7d-pico-dwarf.dt.yaml
> 	arch/arm/boot/dts/imx7d-pico-hobbit.dt.yaml
> 	arch/arm/boot/dts/imx7d-pico-nymph.dt.yaml
> 	arch/arm/boot/dts/imx7d-pico-pi.dt.yaml
> 	arch/arm/boot/dts/imx7d-remarkable2.dt.yaml
> 	arch/arm/boot/dts/imx7d-sbc-imx7.dt.yaml
> 	arch/arm/boot/dts/imx7d-sdb.dt.yaml
> 	arch/arm/boot/dts/imx7d-sdb-reva.dt.yaml
> 	arch/arm/boot/dts/imx7d-sdb-sht11.dt.yaml
> 	arch/arm/boot/dts/imx7d-zii-rmu2.dt.yaml
> 	arch/arm/boot/dts/imx7d-zii-rpu2.dt.yaml
> 	arch/arm/boot/dts/imx7s-colibri-aster.dt.yaml
> 	arch/arm/boot/dts/imx7s-colibri-eval-v3.dt.yaml
> 	arch/arm/boot/dts/imx7s-mba7.dt.yaml
> 
> mipi-csi at 30750000: 'ports' is a required property
> 	arch/arm/boot/dts/imx7s-warp.dt.yaml
> 

-- 
Regards,

Laurent Pinchart



More information about the linux-arm-kernel mailing list