enjoy-digital / litex

Build your hardware, easily!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generated DTS lacks root compatible and model properties

geertu opened this issue · comments

According to the Devicetree Specification, the "model" and "compatible" properties are mandatory for the root node.
However, litex/tools/litex_json2dts_linux.py does not generate them.

This may lead to subtle issues, cfr.
https://lore.kernel.org/all/CAMuHMdUKa-KdWfYswEpFvj3RjQPM+ThhU85myfBGVkXxZqbHWw@mail.gmail.com

Good to know. Is there a good reference you can point to on how to verify a device tree validates to the schema? I'm interested to help improve this.

Integrate the DTS in your copy of the Linux kernel source tree, i.e. copy it to arch/riscv/boot/dts/litex/, and wire it up in arch/riscv/boot/dts/Makefile:

+subdir-$(CONFIG_LITEX) += litex

and arch/riscv/boot/dts/litex/Makefile, e.g.

dtb-$(CONFIG_LITEX) += orangecrab.dtb

and run "make dtbs_check":

arch/riscv/boot/dts/litex/orangecrab.dtb: /: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml#
arch/riscv/boot/dts/litex/orangecrab.dtb: /: 'model' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml#
[...]

I had noticed these validation warnings before, but until recently they had no real impact.