Overview / Reference Guide for Open Firmware Device Trees

I am trying to install a driver for the built-in PowerPC board, and the correct way to do it today is to use the OpenFirmware Device Tree datastructure data structure (a .dtb file compiled from a .dts file). Creating a tree is pretty simple, but how can I get my device driver to find the node and the data in it? I couldn’t find good references to this, and books like Linux Device Drivers are too large for x86 to be of great help for device trees, which are mainly computers with Power Architecture (arch powerpc in the Linux kernel terminology).

+6
linux powerpc linux-device-driver device-tree
source share
1 answer

It seems that there is very little documentation, especially on the driver's side. I spoke with a longtime Linux kernel developer whom I know, and his advice was, in fact, to look at the code of other drivers.

I found some background reading: Grant Probable presentation , Grant Most likely, Linux Symposium, a pretty good overview of the data structure

The most common use of an open firmware system is found in the Freescale fsl_x.c drivers in the arch / powerpc / tree in the Linux kernel, later than 2.6.16.

+4
source share

All Articles