config SUPPORT_OF_CONTROL
bool
-config DTC
- bool
-
config PYLIBFDT
bool
config OF_CONTROL
bool "Run-time configuration via Device Tree"
- select DTC
select OF_LIBFDT if !OF_PLATDATA
+ select OF_REAL if !OF_PLATDATA
help
This feature provides for run-time configuration of U-Boot
via a flattened device tree.
+config OF_REAL
+ bool
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ OF_CONTROL is enabled in U-Boot proper.
+
config OF_BOARD_FIXUP
bool "Board-specific manipulation of Device Tree"
help
bool "Enable run-time configuration via Device Tree in SPL"
depends on SPL && OF_CONTROL
select SPL_OF_LIBFDT if !SPL_OF_PLATDATA
+ select SPL_OF_REAL if !SPL_OF_PLATDATA
help
Some boards use device tree in U-Boot but only have 4KB of SRAM
which is not enough to support device tree. Disable this option to
bool "Enable run-time configuration via Device Tree in TPL"
depends on TPL && OF_CONTROL
select TPL_OF_LIBFDT if !TPL_OF_PLATDATA
+ select TPL_OF_REAL if !TPL_OF_PLATDATA
help
Some boards use device tree in U-Boot but only have 4KB of SRAM
which is not enough to support device tree. Enable this option to
config OF_LIVE
bool "Enable use of a live tree"
- depends on OF_CONTROL
+ depends on DM && OF_CONTROL
help
Normally U-Boot uses a flat device tree which saves space and
avoids the need to unpack the tree before use. However a flat
config OF_SEPARATE
bool "Separate DTB for DT control"
- depends on !SANDBOX
help
If this option is enabled, the device tree will be built and
placed as a separate u-boot.dtb file alongside the U-Boot image.
and development only and is not recommended for production devices.
Boards in the mainline U-Boot tree should not use it.
+endchoice
+
config OF_BOARD
- bool "Provided by the board at runtime"
- depends on !SANDBOX
+ bool "Provided by the board (e.g a previous loader) at runtime"
+ default y if SANDBOX
help
If this option is enabled, the device tree will be provided by
- the board at runtime if the board supports it, instead of being
- bundled with the image.
-
-config OF_HOSTFILE
- bool "Host filed DTB for DT control"
- depends on SANDBOX
- help
- If this option is enabled, DTB will be read from a file on startup.
- This is only useful for Sandbox. Use the -d flag to U-Boot to
- specify the file to read.
+ the board at runtime if the board supports it. The device tree bundled
+ with the image (if any) will be overridden / ignored.
-config OF_PRIOR_STAGE
- bool "Prior stage bootloader DTB for DT control"
- help
- If this option is enabled, the device tree used for DT
- control will be read from a device tree binary, at a memory
- location passed to U-Boot by the prior stage bootloader.
-
-endchoice
+ A device tree file must be provided in the tree.
config DEFAULT_DEVICE_TREE
string "Default Device Tree for DT control"
config MULTI_DTB_FIT_UNCOMPRESS_SZ
hex "Size of memory reserved to uncompress the DTBs"
- depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO)
default 0x8000
help
This is the size of this area where the DTBs are uncompressed.
config SPL_MULTI_DTB_FIT
- depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA
+ depends on SPL_LOAD_FIT && SPL_OF_REAL
bool "Support embedding several DTBs in a FIT image for the SPL"
help
This option provides the SPL with the ability to select its own
bool "Generate platform data for use in SPL"
depends on SPL_OF_CONTROL
select DTOC
+ select SPL_OF_PLATDATA_DRIVER_RT if !SPL_OF_PLATDATA_INST
help
For very constrained SPL environments the overhead of decoding
device tree nodes and converting their contents into platform data
former can add 3KB or more to a Thumb 2 Image.
This option enables generation of platform data from the device
- tree as C code. This code creates devices using U_BOOT_DEVICE()
+ tree as C code. This code creates devices using U_BOOT_DRVINFO()
declarations. The benefit is that it allows driver code to access
the platform data directly in C structures, avoidin the libfdt
overhead.
This option works by generating C structure declarations for each
- compatible string, then adding platform data and U_BOOT_DEVICE
+ compatible string, then adding platform data and U_BOOT_DRVINFO
declarations for each node. See of-plat.txt for more information.
+config SPL_OF_REAL
+ bool
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ SPL_OF_CONTROL is enabled and not SPL_OF_PLATDATA
+
+if SPL_OF_PLATDATA
+
+config SPL_OF_PLATDATA_PARENT
+ bool "Support parent information in devices"
+ default y
+ help
+ Generally it is useful to be able to access the parent of a device
+ with of-platdata. To save space this can be disabled, but in that
+ case dev_get_parent() will always return NULL;
+
+config SPL_OF_PLATDATA_INST
+ bool "Declare devices at build time"
+ help
+ Declare devices as udevice instances so that they do not need to be
+ bound when U-Boot starts. This can save time and code space.
+
+config SPL_OF_PLATDATA_NO_BIND
+ bool "Don't allow run-time binding of devices"
+ depends on SPL_OF_PLATDATA_INST
+ default y
+ help
+ This removes the ability to bind devices at run time, thus saving
+ some code space in U-Boot. This can be disabled if binding is needed,
+ at the code of some code size increase.
+
+config SPL_OF_PLATDATA_RT
+ bool "Use a separate struct for device runtime data"
+ depends on SPL_OF_PLATDATA_INST
+ default y
+ help
+ For systems running SPL from read-only memory it is convenient to
+ separate out the runtime information, so that the devices don't need
+ to be copied before being used. This moves the read-write parts of
+ struct udevice (at present just the flags) into a separate struct,
+ which is allocated at runtime.
+
+config SPL_OF_PLATDATA_DRIVER_RT
+ bool
+ help
+ Use a separate struct for driver runtime data.
+
+ This enables the driver_rt information, used with of-platdata when
+ of-platdata-inst is not used. It allows finding devices by their
+ driver data.
+
+endif
+
+config TPL_OF_REAL
+ bool
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ TPL_OF_CONTROL is enabled and not TPL_OF_PLATDATA
+
config TPL_OF_PLATDATA
bool "Generate platform data for use in TPL"
depends on TPL_OF_CONTROL
select DTOC
+ select TPL_OF_PLATDATA_DRIVER_RT if !TPL_OF_PLATDATA_INST
help
For very constrained SPL environments the overhead of decoding
device tree nodes and converting their contents into platform data
former can add 3KB or more to a Thumb 2 Image.
This option enables generation of platform data from the device
- tree as C code. This code creates devices using U_BOOT_DEVICE()
+ tree as C code. This code creates devices using U_BOOT_DRVINFO()
declarations. The benefit is that it allows driver code to access
the platform data directly in C structures, avoidin the libfdt
overhead.
This option works by generating C structure declarations for each
- compatible string, then adding platform data and U_BOOT_DEVICE
+ compatible string, then adding platform data and U_BOOT_DRVINFO
declarations for each node. See of-plat.txt for more information.
-endmenu
+if TPL_OF_PLATDATA
+
+config TPL_OF_PLATDATA_PARENT
+ bool "Support parent information in devices"
+ default y
+ help
+ Generally it is useful to be able to access the parent of a device
+ with of-platdata. To save space this can be disabled, but in that
+ case dev_get_parent() will always return NULL;
-config MKIMAGE_DTC_PATH
- string "Path to dtc binary for use within mkimage"
- default "dtc"
+config TPL_OF_PLATDATA_INST
+ bool "Declare devices at build time"
+
+ help
+ Declare devices as udevice instances so that they do not need to be
+ bound when U-Boot starts. This can save time and code space.
+
+config TPL_OF_PLATDATA_NO_BIND
+ bool "Don't allow run-time binding of devices"
+ depends on TPL_OF_PLATDATA_INST
+ default y
+ help
+ This removes the ability to bind devices at run time, thus saving
+ some code space in U-Boot. This can be disabled if binding is needed,
+ at the code of some code size increase.
+
+config TPL_OF_PLATDATA_RT
+ bool "Use a separate struct for device runtime data"
+ depends on TPL_OF_PLATDATA_INST
+ default y
+ help
+ For systems running TPL from read-only memory it is convenient to
+ separate out the runtime information, so that the devices don't need
+ to be copied before being used. This moves the read-write parts of
+ struct udevice (at present just the flags) into a separate struct,
+ which is allocated at runtime.
+
+config TPL_OF_PLATDATA_DRIVER_RT
+ bool
help
- The mkimage host tool will, in order to generate FIT images make
- calls to the dtc application in order to create the output. In
- some cases the system dtc may not support all required features
- and the path to a different version should be given here.
+ Use a separate struct for driver runtime data.
+
+ This enables the driver_rt information, used with of-platdata when
+ of-platdata-inst is not used. It allows finding devices by their
+ driver data.
+
+endif
+
+endmenu