linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* DT schema warnings on Risc-V virt machine
@ 2022-08-03 17:05 Rob Herring
  2022-08-03 17:10 ` Conor Dooley
  2022-08-03 22:27 ` Conor Dooley
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2022-08-03 17:05 UTC (permalink / raw)
  To: Conor Dooley, Palmer Dabbelt, Paul Walmsley, devicetree, linux-riscv

Hey folks,

FYI, I ran DT validation on the Risc-V 'virt' machine and these are the 
warnings:

/home/rob/riscv-virt.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
/home/rob/riscv-virt.dtb: soc: poweroff: {'value': [[21845]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-poweroff']} should not be valid under {'type': 'object'}
        From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
/home/rob/riscv-virt.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {'type': 'object'}
        From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
/home/rob/riscv-virt.dtb: uart@10000000: $nodename:0: 'uart@10000000' does not match '^serial(@.*)?$'
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/serial/8250.yaml
/home/rob/riscv-virt.dtb: plic@c000000: compatible: 'oneOf' conditional failed, one must be fixed:
        'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'starfive,jh7100-plic', 'canaan,k210-plic']
        'sifive,plic-1.0.0' is not one of ['allwinner,sun20i-d1-plic']
        'sifive,plic-1.0.0' was expected
        'thead,c900-plic' was expected
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
/home/rob/riscv-virt.dtb: plic@c000000: '#address-cells' is a required property
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
/home/rob/riscv-virt.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
/home/rob/riscv-virt.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml


Also from the 'spike' machine:

/home/rob/riscv-spike.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
/home/rob/riscv-spike.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
/home/rob/riscv-spike.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
        From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml


There could also be other warnings from non-default configurations.

To reproduce, dump the dtb and run:

dt-validate -p Documentation/devicetree/bindings/processed-schema.json riscv-spike.dtb 

(processed-schema.json is from kernel validation run)

Rob

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DT schema warnings on Risc-V virt machine
  2022-08-03 17:05 DT schema warnings on Risc-V virt machine Rob Herring
@ 2022-08-03 17:10 ` Conor Dooley
  2022-08-05 17:54   ` Conor.Dooley
  2022-08-03 22:27 ` Conor Dooley
  1 sibling, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2022-08-03 17:10 UTC (permalink / raw)
  To: Rob Herring, Palmer Dabbelt, Paul Walmsley, devicetree, linux-riscv

On 03/08/2022 18:05, Rob Herring wrote:
> Hey folks,
> 
> FYI, I ran DT validation on the Risc-V 'virt' machine and these are the 
> warnings:

/sigh
There was I thinking I was almost done with dt warnings!
I guess I'll take a look Rob, thanks for the report.
Conor.

> 
> /home/rob/riscv-virt.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
> /home/rob/riscv-virt.dtb: soc: poweroff: {'value': [[21845]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-poweroff']} should not be valid under {'type': 'object'}
>         From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
> /home/rob/riscv-virt.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {'type': 'object'}
>         From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
> /home/rob/riscv-virt.dtb: uart@10000000: $nodename:0: 'uart@10000000' does not match '^serial(@.*)?$'
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/serial/8250.yaml
> /home/rob/riscv-virt.dtb: plic@c000000: compatible: 'oneOf' conditional failed, one must be fixed:
>         'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'starfive,jh7100-plic', 'canaan,k210-plic']
>         'sifive,plic-1.0.0' is not one of ['allwinner,sun20i-d1-plic']
>         'sifive,plic-1.0.0' was expected
>         'thead,c900-plic' was expected
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
> /home/rob/riscv-virt.dtb: plic@c000000: '#address-cells' is a required property
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
> /home/rob/riscv-virt.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> /home/rob/riscv-virt.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> 
> 
> Also from the 'spike' machine:
> 
> /home/rob/riscv-spike.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
> /home/rob/riscv-spike.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> /home/rob/riscv-spike.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
> 
> 
> There could also be other warnings from non-default configurations.
> 
> To reproduce, dump the dtb and run:
> 
> dt-validate -p Documentation/devicetree/bindings/processed-schema.json riscv-spike.dtb 
> 
> (processed-schema.json is from kernel validation run)
> 
> Rob

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DT schema warnings on Risc-V virt machine
  2022-08-03 17:05 DT schema warnings on Risc-V virt machine Rob Herring
  2022-08-03 17:10 ` Conor Dooley
@ 2022-08-03 22:27 ` Conor Dooley
  1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2022-08-03 22:27 UTC (permalink / raw)
  To: Rob Herring, Palmer Dabbelt
  Cc: Paul Walmsley, devicetree, linux-riscv, qemu-riscv

On 03/08/2022 18:05, Rob Herring wrote:
> Hey folks,
> 
> FYI, I ran DT validation on the Risc-V 'virt' machine and these are the 
> warnings:
> 
> /home/rob/riscv-virt.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml

This one is party a QEMU problem & should've been fixed - but the fix
was never applied:
https://lore.kernel.org/qemu-devel/20190813225307.5792-1-palmer@sifive.com/
I think this just needs a rebase & a resend which I can do.
I think kernel-side we need to add a new string riscv,isa string but it
is not the one in your error message - it's either "rv64imafdch" or
"rv64imafdch_zicsr_zifencei_zba_zbb_zbc_zbs". Palmer, what is your
take on that? Is only the short misa meant to go into the dt?

For the plic/clint related warnings, documenting the
"riscv,{plic,clint}0" variants seems to be to be the right thing to do
as they're already in the kernel in drivers. I'll send patches for
these.

BTW Rob, what version of qemu were you using? I saw more errors on
QEMU's master branch - like the following from a dump of the virt
machine:
/stuff/qemu/qemu.dtb: platform@4000000: $nodename:0: 'platform@4000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
        From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml

Using a platform bus seems to be a core QEMU feature, used on multiple
archs in hw/core/sysbus-fdt.c - but that violates the schema. Not sure
what to do there.

/stuff/qemu/qemu.dtb: soc: poweroff: {'value': [[21845]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-poweroff']} should not be valid under {'type': 'object'}
        From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml
/stuff/qemu/qemu.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {'type': 'object'}
        From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml

These two seem to be that the creation script adds them as subnodes of
the soc bus not subnodes of the syscon. A QEMU problem rather than a dt
bindings problem.

The rest seem to be a variety of incorrect names being used in riscv's
virt.c in QEMU. I guess I'll send fixes for those too..

Thanks,
Conor

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DT schema warnings on Risc-V virt machine
  2022-08-03 17:10 ` Conor Dooley
@ 2022-08-05 17:54   ` Conor.Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor.Dooley @ 2022-08-05 17:54 UTC (permalink / raw)
  To: robh, palmer, paul.walmsley, devicetree, linux-riscv

On 03/08/2022 18:10, Conor Dooley wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 03/08/2022 18:05, Rob Herring wrote:
>> Hey folks,
>>
>> FYI, I ran DT validation on the Risc-V 'virt' machine and these are the
>> warnings:
> 
> /sigh
> There was I thinking I was almost done with dt warnings!
> I guess I'll take a look Rob, thanks for the report.

FWIW, patches sent for QEMU:
https://lore.kernel.org/linux-riscv/20220805155405.1504081-1-mail@conchuod.ie/T/#t

and kernel:
https://lore.kernel.org/linux-riscv/20220805162844.1554247-1-mail@conchuod.ie/T/#t

Conor.


> Conor.
> 
>>
>> /home/rob/riscv-virt.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
>> /home/rob/riscv-virt.dtb: soc: poweroff: {'value': [[21845]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-poweroff']} should not be valid under {'type': 'object'}
>>         From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
>> /home/rob/riscv-virt.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {'type': 'object'}
>>         From schema: /home/rob/proj/git/dt-schema/dtschema/schemas/simple-bus.yaml
>> /home/rob/riscv-virt.dtb: uart@10000000: $nodename:0: 'uart@10000000' does not match '^serial(@.*)?$'
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/serial/8250.yaml
>> /home/rob/riscv-virt.dtb: plic@c000000: compatible: 'oneOf' conditional failed, one must be fixed:
>>         'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'starfive,jh7100-plic', 'canaan,k210-plic']
>>         'sifive,plic-1.0.0' is not one of ['allwinner,sun20i-d1-plic']
>>         'sifive,plic-1.0.0' was expected
>>         'thead,c900-plic' was expected
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
>> /home/rob/riscv-virt.dtb: plic@c000000: '#address-cells' is a required property
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
>> /home/rob/riscv-virt.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
>> /home/rob/riscv-virt.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
>>
>>
>> Also from the 'spike' machine:
>>
>> /home/rob/riscv-spike.dtb: cpu@0: riscv,isa:0: 'rv64imafdcsuh' is not one of ['rv64imac', 'rv64imafdc']
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/riscv/cpus.yaml
>> /home/rob/riscv-spike.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint']
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
>> /home/rob/riscv-spike.dtb: clint@2000000: compatible:1: 'sifive,clint0' was expected
>>         From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/timer/sifive,clint.yaml
>>
>>
>> There could also be other warnings from non-default configurations.
>>
>> To reproduce, dump the dtb and run:
>>
>> dt-validate -p Documentation/devicetree/bindings/processed-schema.json riscv-spike.dtb
>>
>> (processed-schema.json is from kernel validation run)
>>
>> Rob
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-05 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 17:05 DT schema warnings on Risc-V virt machine Rob Herring
2022-08-03 17:10 ` Conor Dooley
2022-08-05 17:54   ` Conor.Dooley
2022-08-03 22:27 ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).