Hello,
The VSC plugin is showing squiggles for SPI related nodes which are valid. (compile with no errors)
Here is an example:
Here is the error message
Thanks
Hello,
The VSC plugin is showing squiggles for SPI related nodes which are valid. (compile with no errors)
Here is an example:
Here is the error message
Thanks
The devicetree extension is a bit more strict than the compiler, since what you're trying to do is technically not allowed in the devicetree-language.
You need to add a compatible field for both the spi1 as well as the child node.
For spi1 you should add compatible = "nordic,nrf-spim". Our developer has created a PR regarding this https://github.com/zephyrproject-rtos/zephyr/pull/41102.
For the SPI child node, check out the possible compatibles in <ncs location>/zephyr/dts/bindings/sensor. For example:
Best regards,
Simon
> The devicetree extension is a bit more strict than the compiler, since what you're trying to is technically not allowed in the devicetree-language.
Simon, could you please provide some more details here? I maintain the zephyr devicetree tooling, and I don't see anything inherently wrong with the above example from a DT language perspective.
Hi Marti.
I got this information from an internal in Nordic. Maybe I misunderstood what he was saying. I'll talk to him tomorrow and clarify.
I don't believe there is anything in the devicetree-language that requires the "compatible" field. Basically this is requiring all devices to have a device driver. I would like to use the devicetree structure to describe the interface but communicate with the SPI device directly without the need for a driver.
I talked to the developer and got some more insight. The statement I wrote about the DT language is not correct. However, in the DT extension we mark stuff that "should" be done, as errors. The reason you got the squiggly red lines, is because the extension expect it to be set according to https://docs.zephyrproject.org/latest/guides/dts/bindings.html#on-bus.
In your case, you can just ignore the error.