Re: dtbs_check issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 22, 2022 at 12:08 PM Lad, Prabhakar
<prabhakar.csengg@xxxxxxxxx> wrote:
>
> On Thu, Jul 21, 2022 at 11:24 PM Rob Herring <robh+dt@xxxxxxxxxx> wrote:
> >
> > On Thu, Jul 21, 2022 at 4:18 PM Lad, Prabhakar
> > <prabhakar.csengg@xxxxxxxxx> wrote:
> > >
> > > Hi Rob,
> > >
> > > On Thu, Jul 21, 2022 at 5:57 PM Rob Herring <robh+dt@xxxxxxxxxx> wrote:
> > > >
> > > > On Thu, Jul 21, 2022 at 9:23 AM Lad, Prabhakar
> > > > <prabhakar.csengg@xxxxxxxxx> wrote:
> > > > >
> > > > > Hi Krzysztof,
> > > > >
> > > > > On Thu, Jul 21, 2022 at 4:12 PM Krzysztof Kozlowski
> > > > > <krzysztof.kozlowski@xxxxxxxxxx> wrote:
> > > > > >
> > > > > > On 21/07/2022 17:07, Lad, Prabhakar wrote:
> > > > > > > Fyi keeping even a single SMARC board in arm renesas.yaml schema I see
> > > > > > > dtbs_check failures.
> > > > > > >
> > > > > > > Any pointers on how I can get around this issue?
> > > > > >
> > > > > > Few months ago:
> > > > > > https://lore.kernel.org/linux-devicetree/cf7728fd-b5c8-cd3d-6074-d27f38f86545@xxxxxxxxxx/
> > > > > >
> > > > > Thanks for the link.
> > > > >
> > > > > > Although Rob admitted in the thread this is in general allowed
> > > > > > configuration, to me it is still confusing - the left-most compatible is
> > > > > > not the most specific. Non obvious, confusing and it seems dtschema does
> > > > > > not support it?
> > > > > >
> > > > > It looks like dtschema does not support it.
> > > >
> > > > The issue is the same as licensed IP where we have a generic
> > > > compatible and per licensee compatibles in separate schemas. The
> > > > solution anytime a compatible exists in more than 1 schema is a custom
> > > > 'select' which excludes that compatible. That would be messy here
> > > > though due to the large number of compatibles. Perhaps we could
> > > > instead merge a custom select with the default generated one. Then the
> > > > schema would just need:
> > > >
> > > > select:
> > > >   not:
> > > >     properties:
> > > >       contains:
> > > >         const: renesas,smarc-evk
> > > >
Being a novice here with the select, I added the below to ignore the
arm schema if its the RISC-V board:

diff --git a/Documentation/devicetree/bindings/arm/renesas.yaml
b/Documentation/devicetree/bindings/arm/renesas.yaml
index ff80152f092f..77e78136bfce 100644
--- a/Documentation/devicetree/bindings/arm/renesas.yaml
+++ b/Documentation/devicetree/bindings/arm/renesas.yaml
@@ -9,6 +9,16 @@ title: Renesas SH-Mobile, R-Mobile, and R-Car
Platform Device Tree Bindings
 maintainers:
   - Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

+# We want ignore this schema if the board is of RISC-V arch
+select:
+  not:
+    properties:
+      compatible:
+        contains:
+          const: renesas,r9a07g043f1
+    required:
+      - compatible
+
 properties:
   $nodename:
     const: '/'

But when I run the dt_binding_check, I get the below issues:

prasmi@prasmi:~/work/linux$ make ARCH=riscv
CROSS_COMPILE=riscv64-linux-gnu- dt_binding_check
  DTEX    Documentation/devicetree/bindings/arm/renesas.example.dts
  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  DTC     Documentation/devicetree/bindings/arm/renesas.example.dtb
  CHECK   Documentation/devicetree/bindings/arm/renesas.example.dtb
/home/prasmi/work/linux/Documentation/devicetree/bindings/arm/renesas.example.dtb:
/: compatible: 'oneOf' conditional failed, one must be fixed:
    ['foo'] is too short
    /home/prasmi/work/linux/Documentation/devicetree/bindings/arm/renesas.example.dtb:
/: compatible: 'oneOf' conditional failed, one must be fixed:
        ['foo'] is too short
        'shimafuji,kingfisher' was expected
    'foo' is not one of ['renesas,kzm9d']
    'foo' is not one of ['renesas,genmai', 'renesas,gr-peach',
'renesas,rskrza1']
    'foo' is not one of ['renesas,rza2mevb']
    'foo' is not one of ['renesas,kzm9g']
    'foo' is not one of ['renesas,ape6evm']
    'foo' is not one of ['renesas,armadillo800eva']
    'foo' is not one of ['iwave,g21m']
    'foo' is not one of ['iwave,g21d']
    'foo' is not one of ['iwave,g20d']
    'foo' is not one of ['iwave,g20m', 'renesas,sk-rzg1m']
    'foo' is not one of ['iwave,g20m']
    'foo' is not one of ['iwave,g22m', 'renesas,sk-rzg1e']
    'iwave,g22d' was expected
    'foo' is not one of ['iwave,g23s']
    'foo' is not one of ['hoperun,hihope-rzg2m', 'beacon,beacon-rzg2m']
    'foo' is not one of ['hoperun,hihope-rzg2-ex']
    'foo' is not one of ['beacon,beacon-rzg2n', 'hoperun,hihope-rzg2n']
    'foo' is not one of ['si-linux,cat874']
    'foo' is not one of ['si-linux,cat875']
    'foo' is not one of ['beacon,beacon-rzg2h', 'hoperun,hihope-rzg2h']
    'foo' is not one of ['renesas,bockw']
    'foo' is not one of ['renesas,marzen']
    'foo' is not one of ['renesas,lager', 'renesas,stout']
    'foo' is not one of ['renesas,henninger', 'renesas,koelsch',
'renesas,porter']
    'foo' is not one of ['renesas,blanche', 'renesas,wheat']
    'foo' is not one of ['renesas,gose']
    'foo' is not one of ['renesas,alt', 'renesas,silk']
    'foo' is not one of ['renesas,h3ulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3ulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3ulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3nulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,eagle', 'renesas,v3msk']
    'foo' is not one of ['renesas,condor', 'renesas,v3hsk']
    'foo' is not one of ['renesas,ebisu']
    'foo' is not one of ['renesas,draak']
    'foo' is not one of ['renesas,falcon-cpu']
    'foo' is not one of ['renesas,falcon-breakout']
    'foo' is not one of ['renesas,spider-cpu']
    'foo' is not one of ['renesas,spider-breakout']
    'foo' is not one of ['renesas,white-hawk-cpu']
    'foo' is not one of ['renesas,white-hawk-breakout']
    'foo' is not one of ['renesas,h3ulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3nulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,rzn1d400-db']
    'foo' is not one of ['renesas,smarc-evk']
    'foo' is not one of ['renesas,rzv2mevk2']
    From schema:
/home/prasmi/work/linux/Documentation/devicetree/bindings/arm/renesas.yaml
  DTC     Documentation/devicetree/bindings/riscv/renesas.example.dtb
  CHECK   Documentation/devicetree/bindings/riscv/renesas.example.dtb
/home/prasmi/work/linux/Documentation/devicetree/bindings/riscv/renesas.example.dtb:
/: compatible: 'oneOf' conditional failed, one must be fixed:
    ['foo'] is too short
    /home/prasmi/work/linux/Documentation/devicetree/bindings/riscv/renesas.example.dtb:
/: compatible: 'oneOf' conditional failed, one must be fixed:
        ['foo'] is too short
        'shimafuji,kingfisher' was expected
    'foo' is not one of ['renesas,kzm9d']
    'foo' is not one of ['renesas,genmai', 'renesas,gr-peach',
'renesas,rskrza1']
    'foo' is not one of ['renesas,rza2mevb']
    'foo' is not one of ['renesas,kzm9g']
    'foo' is not one of ['renesas,ape6evm']
    'foo' is not one of ['renesas,armadillo800eva']
    'foo' is not one of ['iwave,g21m']
    'foo' is not one of ['iwave,g21d']
    'foo' is not one of ['iwave,g20d']
    'foo' is not one of ['iwave,g20m', 'renesas,sk-rzg1m']
    'foo' is not one of ['iwave,g20m']
    'foo' is not one of ['iwave,g22m', 'renesas,sk-rzg1e']
    'iwave,g22d' was expected
    'foo' is not one of ['iwave,g23s']
    'foo' is not one of ['hoperun,hihope-rzg2m', 'beacon,beacon-rzg2m']
    'foo' is not one of ['hoperun,hihope-rzg2-ex']
    'foo' is not one of ['beacon,beacon-rzg2n', 'hoperun,hihope-rzg2n']
    'foo' is not one of ['si-linux,cat874']
    'foo' is not one of ['si-linux,cat875']
    'foo' is not one of ['beacon,beacon-rzg2h', 'hoperun,hihope-rzg2h']
    'foo' is not one of ['renesas,bockw']
    'foo' is not one of ['renesas,marzen']
    'foo' is not one of ['renesas,lager', 'renesas,stout']
    'foo' is not one of ['renesas,henninger', 'renesas,koelsch',
'renesas,porter']
    'foo' is not one of ['renesas,blanche', 'renesas,wheat']
    'foo' is not one of ['renesas,gose']
    'foo' is not one of ['renesas,alt', 'renesas,silk']
    'foo' is not one of ['renesas,h3ulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3ulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3ulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3nulcb', 'renesas,salvator-x',
'renesas,salvator-xs']
    'foo' is not one of ['renesas,eagle', 'renesas,v3msk']
    'foo' is not one of ['renesas,condor', 'renesas,v3hsk']
    'foo' is not one of ['renesas,ebisu']
    'foo' is not one of ['renesas,draak']
    'foo' is not one of ['renesas,falcon-cpu']
    'foo' is not one of ['renesas,falcon-breakout']
    'foo' is not one of ['renesas,spider-cpu']
    'foo' is not one of ['renesas,spider-breakout']
    'foo' is not one of ['renesas,white-hawk-cpu']
    'foo' is not one of ['renesas,white-hawk-breakout']
    'foo' is not one of ['renesas,h3ulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,m3nulcb', 'renesas,salvator-xs']
    'foo' is not one of ['renesas,rzn1d400-db']
    'foo' is not one of ['renesas,smarc-evk']
    'foo' is not one of ['renesas,rzv2mevk2']
    From schema:
/home/prasmi/work/linux/Documentation/devicetree/bindings/arm/renesas.yaml

Any pointers on what I'm missing.

Cheers,
Prabhakar



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux