0
votes

I'm looking for any appropriate solution for Device tree writing in raspberry pi

I went through:

  1. basic device driver module loading and unloading
  2. adding a kernel module in kernel source tree so that it can loaded automatically just like predefined kernel modules.

But now i have doubt about how one can write device tree in raspberry-pi for binding a particular driver or module at the booting time phase?

I researched lots of available resources within the Internet but unfortunately I could not find any precise solution that suits my need.

1
Can you elaborate more on your question? Writing a device tree is not needed for RPi as it's already available. - SD.
yes,i need to add one node in device tree and according to that, driver which is written by me is need to be loaded at a boot time. in short i want to write a dummy node in device tree and dummy driver for raspberry pi which is loaded at boot time. - Jeet Parikh
The binding between a DT node and a device driver is by the compatible property. See stackoverflow.com/questions/26840267/… - sawdust
but where should i add this DT node ? i'm using raspberry pi and interested to write demo platform driver. - Jeet Parikh

1 Answers

0
votes

So you just need to add a node in your device tree and set the "compatible" property point to your driver. Check below link for reference.

https://github.com/saiyamd/skeleton-dt-binding/blob/master/skeleton.c