mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
dm: Add callback to modify the device tree
Certain boards come in different variations by way of utilizing daughter boards, for example. These boards might contain additional chips, which are added to the main board's busses, e.g. I2C. The device tree support for such boards would either, quite naturally, employ the overlay mechanism to add such chips to the tree, or would use one large default device tree, and delete the devices that are actually not present. Regardless of approach, even on the U-Boot level, a modification of the device tree is a prerequisite to have such modular families of boards supported properly. Therefore, we add an option to make the U-Boot device tree (the actual copy later used by the driver model) writeable, and add a callback method that allows boards to modify the device tree at an early stage, at which, hopefully, also the application of device tree overlays will be possible. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
committed by
Stefan Roese
parent
1ec2a80b10
commit
2a792753d6
10
dts/Kconfig
10
dts/Kconfig
@@ -14,6 +14,16 @@ config OF_CONTROL
|
||||
This feature provides for run-time configuration of U-Boot
|
||||
via a flattened device tree.
|
||||
|
||||
config OF_BOARD_FIXUP
|
||||
bool "Board-specific manipulation of Device Tree"
|
||||
help
|
||||
In certain circumstances it is necessary to be able to modify
|
||||
U-Boot's device tree (e.g. to delete device from it). This option
|
||||
make the Device Tree writeable and provides a board-specific
|
||||
"board_fix_fdt" callback (called during pre-relocation time), which
|
||||
enables the board initialization to modifiy the Device Tree. The
|
||||
modified copy is subsequently used by U-Boot after relocation.
|
||||
|
||||
config SPL_OF_CONTROL
|
||||
bool "Enable run-time configuration via Device Tree in SPL"
|
||||
depends on SPL && OF_CONTROL
|
||||
|
Reference in New Issue
Block a user