Device Tree Overlay Build Workflow¶
Device Tree overlays are used to describe additional hardware configuration without rebuilding the full base Device Tree.
In this project, overlays are commonly used for:
- platform driver binding
- GPIO mapping
- IRQ routing
- I2C and SPI device instantiation
Typical Overlay Build Command¶
The -@ option is important because overlays require symbol information.
Raspberry Pi Overlay Install Flow¶
Check the active overlay state and kernel messages:
Typical Overlay Pattern¶
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2712";
fragment@0 {
target-path = "/";
__overlay__ {
my_device: my-device {
compatible = "myvendor,my-device";
status = "okay";
};
};
};
};
GPIO Property Naming¶
For descriptor-based GPIO APIs:
Device Tree should provide:
Common Pitfalls¶
- missing
/plugin/; - missing
-@when compiling the overlay - wrong
compatiblestring - incorrect
#address-cellsor#size-cells - GPIO controller label mismatch
- overlay applied but driver not matched
- pin already used by another overlay or driver