Suggested way to add/modify node to device tree in fsl-community-bsp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Suggested way to add/modify node to device tree in fsl-community-bsp

4,264 Views
sweckhoff
Contributor I

Hello,

I develop Linux drivers and I usually use the Raspberry Pi to interface to the hardware that I am developing for, but I needed more than one I2S interface so I picked up the pico-pi-imx7d board. In the Raspberry Pi I am able to use overlays and they are a very elegant solution to dynamically adding devices to the device tree. 

Now I am working with the fsl-community-bsp and on my board I do not see any overlays, so I am wondering what is the next best solution?

Currently I have a hack working where I have modified the dts file that has been unpacked under the build directory. This works for my purposes since I am only testing a driver, but since I have taken the time to get this board up and running with our hardware I'd like to be able to provide something to customers who may also be working with the pico-pi-imx7d board.

The best thing I can come up with is to create a patch for the dts file and add the patch using a bbappend file. If you think this is the correct approach, then do you know which recipe that it would be that I would append to? I am a bit of a Yocto newb.

What are your thoughts?

Thanks for any input.

Labels (1)
Tags (2)
0 Kudos
1 Reply

2,400 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Steven,

You may need to edit the device tree manually, or create a new one. The following post explain with good detail an example with Udoo Basic Device Tree for the Udoo Board 

After you edit or create your device tree you must build it as indicated in the document above and copy the ouput file (.dtb) to the FAT partition of the sdcard where you have the Linux image.

You may find also useful the following links:

https://www.nxp.com/docs/en/application-note/AN5125.pdf 

Device Tree Made Easy 


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos