Man page - dtmerge(1)

Packages contas this manual

Manual

DTMERGE(1) General Commands Manual DTMERGE(1)

dtmerge - merge an overlay or parameters into a base device-tree

dtmerge [-d] base-dtb merged-dtb overlay-dtb [param=val...]
dtmerge -h

dtmerge is a command line utility for merging overlays and/or device-tree parameters with a base device-tree. See [DTREE] for more information.

The base device-tree (in dtb format) is always specified as the first (non-option) argument. The second argument is the output filename, which will also be in dtb format. The third argument provides the name of the overlay to merge into the base tree. If this is "-" then no overlay is used and the utility will simply customize the base tree with any parameters given.

Show debug output during operation.
Displays help on the application.

Produce a device-tree for the Raspberry Pi 4 in "out.dtb" which has the SPI and I2C interfaces activated. No additional device-tree overlay is applied.
Produce a device-tree for the Raspberry Pi 3+ in "out.dtb" which includes the GPIO shutdown overlay (with all parameters set to their default).
Produce a device-tree for the Raspberry Pi 5 in "out.dtb" which includes the MCP2515 CAN bus module overlay. The overlay is configured with the following settings: the oscillator frequency is set to 12 MHz (depending on the quartz crystal used), the interrupt GPIO pin is set to 25, and the SPI frequency is limited to 2 MHz.

dtoverlay(1), dtparam(1), [DTREE]

[DTREE]
https://www.raspberrypi.com/documentation/computers/configuration.html#part5.2