Re: Using an external DTS binding for an out-of-tree driver


Henrik Brix Andersen
 

Hi Diogo,

Please have a look at the documentation for creating custom devicetree definitions:
https://docs.zephyrproject.org/latest/application/index.html#devicetree-definitions

You can put the ‘dts’ folder in the application folder and it will automatically be picked up. A few examples in-tree of this:
- https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/drivers/espi/dts
- https://github.com/zephyrproject-rtos/zephyr/tree/master/tests/drivers/gpio/gpio_basic_api/dts
- https://github.com/zephyrproject-rtos/zephyr/tree/master/tests/drivers/regulator/fixed/dts

You can also do board-specific bindings:
- https://github.com/zephyrproject-rtos/zephyr/tree/master/boards/arm/arty/dts

Regards,
Brix
--
Henrik Brix Andersen

On 9 Nov 2020, at 17.18, diogo.correia@fraunhofer.pt wrote:

[Edited Message Follows]

Hi!

I'm developing an out-of-tree driver for Zephyr, that I would like to configure using the board overlay file (just like a normal driver in Zephyr). Is there a way to add an external DTS binding file into the project? Or do I need to modify the zephyr's source code (by adding the .yaml into /dts/bindings)?

Kind regards,
Diogo Correia

Join users@lists.zephyrproject.org to automatically receive all group messages.