Re: question on devicetree (nrf52840dongle)

Kristoff Bonne

Hi all,

First, thanks to who reply off-list. :-)

I found the solution, so I will Just a reply for sake of the the mail-achive:
In contrast to the device-tree module on linux/*BSD, the devicetree source-files (i.e. the .dts file) are recompiled every time, so there is no need to first convert the .dts source-files in binary blobs.
In my case, as I just a hobbyist, I just modified the "nrf52840dongle_nrf52840.dts" file and that solved my issue. (Alhough I guess I would have needed to use an device-tree overlay file to do this the "proper" way).

But I am still a bit puzzled by this.
The way I have done it now, I have made a modification that will impact all my projects.
The device-tree files are in the 'boards' directory which is common to all projects.

So, say you have two different projects with different pinmux settings, how do you do this?
Create two different 'boards' , and compile the two projects with a different '-b' setting?


On 24.05.21 15:40, Kristoff Bonne wrote:
Hi all,

I have been experimenting with running zephyr on some nrf52840dongle device that I bought some time ago.

According the document on this device, zephyr should support both i2c and spi on these devices, and as the nrf52840 a pinmux it should be possible to use any pin for this.
Looking at the devicetree file (*) it says that i2c uses pins 26 and 27 for i2c0, and 30 and 31 for i2c1, which is a bit strange as of these 4 pins, the dongle only exposes ports 26 and 30. (No idea why the person who created this dts-file chose those pins).


- How exactly does the devicetree on zephyr work?
Can I assume that if I would modify the dts file compile it and 'link' that dto-file in the compilation address, I would be able to use other pins?

- Am I correct to assume that the device-tree file actually instructs some part of the boot-process to configure the pinmux in a certain way? (so it's not just a reflection of the configuration of the pinmux 'as it', but it a configuration that is pushed to the pinmux)

- Where can I find information on how to actually do this?

(*) boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts

Thanks in advance for any help!


Join to automatically receive all group messages.