Raspberry Pi Device Tree and Overlay Configuration

The Raspberry Pi platform makes use of the Device Tree configuration system, this allows the configuration of on-chip peripherals and GPIO very early on in the boot sequence.

A custom device tree file has been pre-installed in the default MyPi image to setup and configure GPIO lines with system functions as well as camera support, a copy of the source files live in /root/device-tree :

The source device tree file has comments throughout describing what different sections do and how to reconfigure/recompile this file.

Unless you wish to change the boot state of GPIO lines it's usually a better idea to use one or more of the (usually pre-done) device tree overlays to make config changes

Here's the device tree file /root/device-tree/piboard.dts

MyPi Industrial Raspberry Pi Device Tree Configuration Step 1

To compile this you should have the device tree compiler installed via apt-get install device-tree-compiler and then run the command below

MyPi Industrial Raspberry Pi Device Tree Configuration Step 2

 

Additional overlay files have been added to the system  (uart0-overlay.dtb and uart0-full-overlay.dtb) which enable support for UART0 and the RTS/CTS handshaking lines on UART0, these live in /boot/overlay

 

MyPi Industrial Raspberry Pi Device Tree Configuration Step 3

 

 

To configure which of the on-chip functions are enabled during boot the system uses the /boot/config.txt file to control this

See below example showing the bottom of the config.txt file with sections for the main features  :

 

MyPi Industrial Raspberry Pi Device Tree Configuration Step 4

 

 For more details on which device overlays exist and how they work see the links below

 

Device Tree Overlays

MyPi Device Tree Files

UART0 Overlay Pack

 

 

 

 

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us