Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 1 | # |
| 2 | # Device Tree Control |
| 3 | # |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 4 | |
| 5 | config SUPPORT_OF_CONTROL |
| 6 | bool |
| 7 | |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 8 | config PYLIBFDT |
| 9 | bool |
| 10 | |
| 11 | config DTOC |
| 12 | bool |
| 13 | select PYLIBFDT |
| 14 | |
| 15 | config BINMAN |
| 16 | bool |
| 17 | select DTOC |
| 18 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 19 | menu "Device Tree Control" |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 20 | depends on SUPPORT_OF_CONTROL |
| 21 | |
| 22 | config OF_CONTROL |
| 23 | bool "Run-time configuration via Device Tree" |
Simon Glass | 1501a83 | 2023-02-01 13:20:27 -0700 | [diff] [blame] | 24 | select OF_LIBFDT |
| 25 | select OF_REAL |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 26 | help |
| 27 | This feature provides for run-time configuration of U-Boot |
| 28 | via a flattened device tree. |
| 29 | |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 30 | config OF_REAL |
Simon Glass | 3580f6d | 2021-08-07 07:24:03 -0600 | [diff] [blame] | 31 | bool |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 32 | help |
| 33 | Indicates that a real devicetree is available which can be accessed |
| 34 | at runtime. This means that dev_read_...() functions can be used to |
| 35 | read data from the devicetree for each device. This is true if |
| 36 | OF_CONTROL is enabled in U-Boot proper. |
| 37 | |
mario.six@gdsys.cc | 7e9b9d6 | 2017-02-22 16:07:22 +0100 | [diff] [blame] | 38 | config OF_BOARD_FIXUP |
| 39 | bool "Board-specific manipulation of Device Tree" |
| 40 | help |
| 41 | In certain circumstances it is necessary to be able to modify |
| 42 | U-Boot's device tree (e.g. to delete device from it). This option |
| 43 | make the Device Tree writeable and provides a board-specific |
| 44 | "board_fix_fdt" callback (called during pre-relocation time), which |
| 45 | enables the board initialization to modifiy the Device Tree. The |
| 46 | modified copy is subsequently used by U-Boot after relocation. |
| 47 | |
Masahiro Yamada | 1e35f39 | 2015-08-12 07:31:54 +0900 | [diff] [blame] | 48 | config SPL_OF_CONTROL |
| 49 | bool "Enable run-time configuration via Device Tree in SPL" |
| 50 | depends on SPL && OF_CONTROL |
Sean Anderson | 08c854a | 2019-12-17 21:40:09 -0500 | [diff] [blame] | 51 | select SPL_OF_LIBFDT if !SPL_OF_PLATDATA |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 52 | select SPL_OF_REAL if !SPL_OF_PLATDATA |
Simon Glass | 400d040 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 53 | help |
| 54 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
Walter Lozano | 7b3d258 | 2019-10-22 11:50:19 -0300 | [diff] [blame] | 55 | which is not enough to support device tree. Disable this option to |
Simon Glass | 400d040 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 56 | allow such boards to be supported by U-Boot SPL. |
| 57 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 58 | config TPL_OF_CONTROL |
| 59 | bool "Enable run-time configuration via Device Tree in TPL" |
| 60 | depends on TPL && OF_CONTROL |
Sean Anderson | 08c854a | 2019-12-17 21:40:09 -0500 | [diff] [blame] | 61 | select TPL_OF_LIBFDT if !TPL_OF_PLATDATA |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 62 | select TPL_OF_REAL if !TPL_OF_PLATDATA |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 63 | help |
| 64 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 65 | which is not enough to support device tree. Enable this option to |
| 66 | allow such boards to be supported by U-Boot TPL. |
| 67 | |
Simon Glass | e7ca7da | 2022-04-30 00:56:53 -0600 | [diff] [blame] | 68 | config VPL_OF_CONTROL |
| 69 | bool "Enable run-time configuration via Device Tree in VPL" |
| 70 | depends on VPL && OF_CONTROL |
| 71 | default y if SPL_OF_CONTROL |
| 72 | help |
| 73 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 74 | which is not enough to support device tree. Enable this option to |
| 75 | allow such boards to be supported by U-Boot VPL. |
| 76 | |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 77 | config OF_LIVE |
| 78 | bool "Enable use of a live tree" |
Bin Meng | 85f737b | 2021-02-03 21:20:03 +0800 | [diff] [blame] | 79 | depends on DM && OF_CONTROL |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 80 | help |
| 81 | Normally U-Boot uses a flat device tree which saves space and |
| 82 | avoids the need to unpack the tree before use. However a flat |
Michal Simek | 97a0e49 | 2018-08-17 10:16:36 +0200 | [diff] [blame] | 83 | tree does not support modification from within U-Boot since it |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 84 | can invalidate driver-model device tree offsets. This option |
| 85 | enables a live tree which is available after relocation, |
| 86 | and can be adjusted as needed. |
| 87 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 88 | choice |
| 89 | prompt "Provider of DTB for DT control" |
| 90 | depends on OF_CONTROL |
| 91 | |
| 92 | config OF_SEPARATE |
| 93 | bool "Separate DTB for DT control" |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 94 | help |
| 95 | If this option is enabled, the device tree will be built and |
| 96 | placed as a separate u-boot.dtb file alongside the U-Boot image. |
| 97 | |
| 98 | config OF_EMBED |
| 99 | bool "Embedded DTB for DT control" |
| 100 | help |
| 101 | If this option is enabled, the device tree will be picked up and |
Simon Glass | d9b64ea | 2015-08-31 18:47:52 -0600 | [diff] [blame] | 102 | built into the U-Boot image. This is suitable for local debugging |
| 103 | and development only and is not recommended for production devices. |
| 104 | Boards in the mainline U-Boot tree should not use it. |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 105 | |
Simon Glass | 4cea97f | 2021-12-16 20:59:21 -0700 | [diff] [blame] | 106 | endchoice |
| 107 | |
Alex Deymo | 5b661ec | 2017-04-02 01:25:20 -0700 | [diff] [blame] | 108 | config OF_BOARD |
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 109 | bool "Provided by the board (e.g a previous loader) at runtime" |
Simon Glass | 3760439 | 2021-12-16 20:59:35 -0700 | [diff] [blame] | 110 | default y if SANDBOX || OF_HAS_PRIOR_STAGE |
Alex Deymo | 5b661ec | 2017-04-02 01:25:20 -0700 | [diff] [blame] | 111 | help |
Simon Glass | 3760439 | 2021-12-16 20:59:35 -0700 | [diff] [blame] | 112 | If this option is enabled, the device tree is provided at runtime by |
| 113 | a custom function called board_fdt_blob_setup(). The board must |
| 114 | implement this function if it wishes to provide special behaviour. |
| 115 | |
| 116 | With this option, the device tree build by U-Boot may be overridden or |
| 117 | ignored. See OF_HAS_PRIOR_STAGE. |
| 118 | |
| 119 | Note: Boards which use this to handle a device tree passed from an |
| 120 | earlier stage should enable OF_HAS_PRIOR_STAGE. |
| 121 | |
| 122 | config OF_HAS_PRIOR_STAGE |
| 123 | bool |
| 124 | help |
| 125 | Indicates that a prior stage of the firmware (before U-Boot proper) |
| 126 | makes use of device tree and this board normally boots with that prior |
| 127 | stage, that provides a devicetree to U-Boot. |
| 128 | |
| 129 | This means that the device tree built in U-Boot should not be packaged |
| 130 | in the firmware image. Instead, the prior stage's device tree should |
| 131 | be so packaged. At runtime, the prior stage reads this, does any |
| 132 | necessary fix-ups, then passes it to U-Boot. See OF_BOARD. |
| 133 | |
| 134 | This option does not preclude using the U-Boot device tree, e.g. for |
| 135 | development purposes, but it is not recommended, and likely will not |
| 136 | even work, for production systems. |
Alex Deymo | 5b661ec | 2017-04-02 01:25:20 -0700 | [diff] [blame] | 137 | |
Simon Glass | 3760439 | 2021-12-16 20:59:35 -0700 | [diff] [blame] | 138 | Note: This option must be set in Kconfig and cannot be enabled or |
| 139 | disabled in the board's defconfig file. |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 140 | |
Simon Glass | 944f8d8 | 2021-12-16 20:59:38 -0700 | [diff] [blame] | 141 | config OF_OMIT_DTB |
| 142 | bool "Omit the device tree output when building" |
| 143 | default y if OF_HAS_PRIOR_STAGE && !BINMAN |
| 144 | help |
| 145 | As a special case, avoid writing a device tree file u-boot.dtb when |
| 146 | building. Also don't include that file in u-boot.bin |
| 147 | |
| 148 | This is used for boards which normally provide a devicetree via a |
| 149 | runtime mechanism (such as OF_BOARD), to avoid confusion. |
| 150 | |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 151 | config DEFAULT_DEVICE_TREE |
| 152 | string "Default Device Tree for DT control" |
Simon Glass | 644f5bc | 2016-02-22 22:55:44 -0700 | [diff] [blame] | 153 | depends on OF_CONTROL |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 154 | help |
| 155 | This option specifies the default Device Tree used for DT control. |
Robert P. J. Day | eb61df5 | 2014-10-21 16:44:32 -0400 | [diff] [blame] | 156 | It can be overridden from the command line: |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 157 | $ make DEVICE_TREE=<device-tree-name> |
| 158 | |
Rasmus Villemoes | 303d98d | 2021-11-21 14:52:51 +0100 | [diff] [blame] | 159 | config DEVICE_TREE_INCLUDES |
| 160 | string "Extra .dtsi files to include when building DT control" |
| 161 | depends on OF_CONTROL |
| 162 | help |
| 163 | U-Boot's control .dtb is usually built from an in-tree .dts |
| 164 | file, plus (if available) an in-tree U-Boot-specific .dtsi |
| 165 | file. This option specifies a space-separated list of extra |
| 166 | .dtsi files that will also be used. |
| 167 | |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 168 | config OF_LIST |
Rasmus Villemoes | c8481ef | 2022-01-10 14:34:41 +0100 | [diff] [blame] | 169 | string "List of device tree files to include for DT control" if SPL_LOAD_FIT || MULTI_DTB_FIT |
| 170 | depends on OF_CONTROL |
Michal Simek | 9b2e95a | 2016-05-04 15:14:11 +0200 | [diff] [blame] | 171 | default DEFAULT_DEVICE_TREE |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 172 | help |
| 173 | This option specifies a list of device tree files to use for DT |
Cooper Jr., Franklin | 06c7b62 | 2017-06-16 17:25:09 -0500 | [diff] [blame] | 174 | control. These will be packaged into a FIT. At run-time, U-boot |
| 175 | or SPL will select the correct DT to use by examining the |
| 176 | hardware (e.g. reading a board ID value). This is a list of |
| 177 | device tree files (without the directory or .dtb suffix) |
| 178 | separated by <space>. |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 179 | |
Jean-Jacques Hiblot | 985cec3 | 2019-10-22 16:39:21 +0200 | [diff] [blame] | 180 | config OF_OVERLAY_LIST |
| 181 | string "List of device tree overlays to include for DT control" |
| 182 | depends on SPL_LOAD_FIT_APPLY_OVERLAY |
| 183 | help |
| 184 | This option specifies a list of device tree overlays to use for DT |
| 185 | control. This option can then be used by a FIT generator to include |
| 186 | the overlays in the FIT image. |
| 187 | |
Marek Vasut | aeaa29d | 2019-03-08 16:06:55 +0100 | [diff] [blame] | 188 | choice |
Baruch Siach | 45508fc | 2019-10-07 15:05:47 +0300 | [diff] [blame] | 189 | prompt "OF LIST compression" |
Marek Vasut | aeaa29d | 2019-03-08 16:06:55 +0100 | [diff] [blame] | 190 | depends on MULTI_DTB_FIT |
| 191 | default MULTI_DTB_FIT_NO_COMPRESSION |
| 192 | |
| 193 | config MULTI_DTB_FIT_LZO |
| 194 | bool "LZO" |
| 195 | depends on SYS_MALLOC_F |
| 196 | select LZO |
| 197 | help |
| 198 | Compress the FIT image containing the DTBs available for the SPL |
| 199 | using LZO compression. (requires lzop on host). |
| 200 | |
| 201 | config MULTI_DTB_FIT_GZIP |
| 202 | bool "GZIP" |
| 203 | depends on SYS_MALLOC_F |
| 204 | select GZIP |
| 205 | help |
| 206 | Compress the FIT image containing the DTBs available for the SPL |
| 207 | using GZIP compression. (requires gzip on host) |
| 208 | |
| 209 | config MULTI_DTB_FIT_NO_COMPRESSION |
| 210 | bool "No compression" |
| 211 | help |
| 212 | Do not compress the FIT image containing the DTBs available for the SPL. |
| 213 | Use this options only if LZO is not available and the DTBs are very small. |
| 214 | endchoice |
| 215 | |
| 216 | choice |
| 217 | prompt "Location of uncompressed DTBs" |
| 218 | depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO) |
| 219 | default MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F |
| 220 | |
| 221 | config MULTI_DTB_FIT_DYN_ALLOC |
| 222 | bool "Dynamically allocate the memory" |
| 223 | depends on SYS_MALLOC_F |
| 224 | |
| 225 | config MULTI_DTB_FIT_USER_DEFINED_AREA |
| 226 | bool "User-defined location" |
| 227 | endchoice |
| 228 | |
| 229 | config MULTI_DTB_FIT_UNCOMPRESS_SZ |
| 230 | hex "Size of memory reserved to uncompress the DTBs" |
Marek Vasut | aeaa29d | 2019-03-08 16:06:55 +0100 | [diff] [blame] | 231 | default 0x8000 |
| 232 | help |
| 233 | This is the size of this area where the DTBs are uncompressed. |
| 234 | If this area is dynamically allocated, make sure that |
| 235 | SYS_MALLOC_F_LEN is big enough to contain it. |
| 236 | |
| 237 | config MULTI_DTB_FIT_USER_DEF_ADDR |
| 238 | hex "Address of memory where dtbs are uncompressed" |
| 239 | depends on MULTI_DTB_FIT_USER_DEFINED_AREA |
| 240 | help |
| 241 | the FIT image containing the DTBs is uncompressed in an area defined |
| 242 | at compilation time. This is the address of this area. It must be |
| 243 | aligned on 2-byte boundary. |
Jean-Jacques Hiblot | 2037fa4 | 2017-09-15 12:57:24 +0200 | [diff] [blame] | 244 | |
| 245 | config DTB_RESELECT |
| 246 | bool "Support swapping dtbs at a later point in boot" |
| 247 | depends on MULTI_DTB_FIT |
| 248 | help |
| 249 | It is possible during initial boot you may need to use a generic |
| 250 | dtb until you can fully determine the board your running on. This |
| 251 | config allows boards to implement a function at a later point |
| 252 | during boot to switch to the "correct" dtb. |
| 253 | |
| 254 | config MULTI_DTB_FIT |
| 255 | bool "Support embedding several DTBs in a FIT image for u-boot" |
| 256 | help |
| 257 | This option provides hooks to allow U-boot to parse an |
| 258 | appended FIT image and enable board specific code to then select |
| 259 | the correct DTB to be used. Use this if you need to support |
| 260 | multiple DTBs but don't use the SPL. |
| 261 | |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 262 | |
| 263 | config SPL_MULTI_DTB_FIT |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 264 | depends on SPL_LOAD_FIT && SPL_OF_REAL |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 265 | bool "Support embedding several DTBs in a FIT image for the SPL" |
| 266 | help |
| 267 | This option provides the SPL with the ability to select its own |
| 268 | DTB at runtime from an appended FIT image containing several DTBs. |
| 269 | This allows using the same SPL binary on multiple platforms. |
| 270 | The primary purpose is to handle different versions of |
| 271 | the same platform without tweaking the platform code if the |
| 272 | differences can be expressed in the DTBs (common examples are: bus |
| 273 | capabilities, pad configurations). |
| 274 | |
| 275 | config SPL_OF_LIST |
Rasmus Villemoes | c8481ef | 2022-01-10 14:34:41 +0100 | [diff] [blame] | 276 | string "List of device tree files to include for DT control in SPL" if SPL_MULTI_DTB_FIT |
| 277 | depends on SPL_OF_CONTROL |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 278 | default OF_LIST |
| 279 | help |
| 280 | This option specifies a list of device tree files to use for DT |
| 281 | control in the SPL. These will be packaged into a FIT. At run-time, |
| 282 | the SPL will select the correct DT to use by examining the |
| 283 | hardware (e.g. reading a board ID value). This is a list of |
| 284 | device tree files (without the directory or .dtb suffix) |
| 285 | separated by <space>. |
| 286 | |
| 287 | choice |
| 288 | prompt "SPL OF LIST compression" |
| 289 | depends on SPL_MULTI_DTB_FIT |
| 290 | default SPL_MULTI_DTB_FIT_LZO |
| 291 | |
| 292 | config SPL_MULTI_DTB_FIT_LZO |
| 293 | bool "LZO" |
| 294 | depends on SYS_MALLOC_F |
| 295 | select SPL_LZO |
| 296 | help |
| 297 | Compress the FIT image containing the DTBs available for the SPL |
| 298 | using LZO compression. (requires lzop on host). |
| 299 | |
| 300 | config SPL_MULTI_DTB_FIT_GZIP |
| 301 | bool "GZIP" |
| 302 | depends on SYS_MALLOC_F |
| 303 | select SPL_GZIP |
| 304 | help |
| 305 | Compress the FIT image containing the DTBs available for the SPL |
| 306 | using GZIP compression. (requires gzip on host) |
| 307 | |
| 308 | config SPL_MULTI_DTB_FIT_NO_COMPRESSION |
| 309 | bool "No compression" |
| 310 | help |
| 311 | Do not compress the FIT image containing the DTBs available for the SPL. |
| 312 | Use this options only if LZO is not available and the DTBs are very small. |
| 313 | endchoice |
| 314 | |
| 315 | choice |
Michal Simek | c7df3a2 | 2018-07-23 08:38:56 +0200 | [diff] [blame] | 316 | prompt "Location of uncompressed DTBs" |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 317 | depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO) |
| 318 | default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F |
| 319 | |
| 320 | config SPL_MULTI_DTB_FIT_DYN_ALLOC |
| 321 | bool "Dynamically allocate the memory" |
| 322 | depends on SYS_MALLOC_F |
| 323 | |
| 324 | config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA |
| 325 | bool "User-defined location" |
| 326 | endchoice |
| 327 | |
| 328 | config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ |
| 329 | hex "Size of memory reserved to uncompress the DTBs" |
| 330 | depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO) |
| 331 | default 0x8000 |
| 332 | help |
| 333 | This is the size of this area where the DTBs are uncompressed. |
| 334 | If this area is dynamically allocated, make sure that |
| 335 | SPL_SYS_MALLOC_F_LEN is big enough to contain it. |
| 336 | |
| 337 | config SPL_MULTI_DTB_FIT_USER_DEF_ADDR |
| 338 | hex "Address of memory where dtbs are uncompressed" |
| 339 | depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA |
| 340 | help |
| 341 | the FIT image containing the DTBs is uncompressed in an area defined |
| 342 | at compilation time. This is the address of this area. It must be |
| 343 | aligned on 2-byte boundary. |
| 344 | |
Simon Glass | c2727e5 | 2023-02-13 08:56:32 -0700 | [diff] [blame^] | 345 | config OF_TAG_MIGRATE |
| 346 | bool "Ease migration from old device trees with u-boot,dm- tags" |
| 347 | default y |
| 348 | help |
| 349 | U-Boot moved over to use new tags to mark device tree nodes which need |
| 350 | to be processed in SPL, before relocation, etc. Enable this option to |
| 351 | detect old tags and handle them. |
| 352 | |
| 353 | Note: This option will be removed after the 2023.07 release. |
| 354 | |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 355 | config OF_SPL_REMOVE_PROPS |
| 356 | string "List of device tree properties to drop for SPL" |
Masahiro Yamada | ddb9aa97 | 2015-08-28 20:28:42 +0900 | [diff] [blame] | 357 | depends on SPL_OF_CONTROL |
Michal Simek | de21807 | 2019-02-22 10:50:23 +0100 | [diff] [blame] | 358 | default "interrupt-parent interrupts" if SPL_PINCTRL && SPL_CLK |
| 359 | default "clocks clock-names interrupt-parent interrupts" if SPL_PINCTRL |
| 360 | default "pinctrl-0 pinctrl-names interrupt-parent interrupts" if SPL_CLK |
| 361 | default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupts" |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 362 | help |
| 363 | Since SPL normally runs in a reduced memory space, the device tree |
| 364 | is cut down to only what is needed to load and start U-Boot. Only |
| 365 | nodes marked with the property "u-boot,dm-pre-reloc" will be |
| 366 | included. In addition, some properties are not used by U-Boot and |
| 367 | can be discarded. This option defines the list of properties to |
| 368 | discard. |
| 369 | |
Anatolij Gustschin | 0856834 | 2020-01-12 15:57:42 +0100 | [diff] [blame] | 370 | config OF_DTB_PROPS_REMOVE |
| 371 | bool "Enable removal of device tree properties" |
| 372 | depends on OF_CONTROL |
| 373 | help |
| 374 | Some boards have restricted amount of storage for U-Boot image. |
| 375 | If the generated binary doesn't fit into available image storage, |
| 376 | the built-in device tree could probably be cut down by removing |
| 377 | some not required device tree properties to reduce the image size. |
| 378 | Enable this option and define the properties to be removed in the |
| 379 | CONFIG_OF_REMOVE_PROPS list. Do not enable this option if you must |
| 380 | pass the built-in DTB directly to the kernel! |
| 381 | |
| 382 | config OF_REMOVE_PROPS |
| 383 | string "List of device tree properties to drop" |
| 384 | depends on OF_DTB_PROPS_REMOVE |
| 385 | default "interrupt-parent interrupts" if PINCTRL |
| 386 | help |
| 387 | Some properties are not used by U-Boot and can be discarded. |
| 388 | This option defines the list of properties to discard. |
| 389 | |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 390 | config SPL_OF_PLATDATA |
| 391 | bool "Generate platform data for use in SPL" |
| 392 | depends on SPL_OF_CONTROL |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 393 | select DTOC |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 394 | select SPL_OF_PLATDATA_DRIVER_RT if !SPL_OF_PLATDATA_INST |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 395 | help |
| 396 | For very constrained SPL environments the overhead of decoding |
| 397 | device tree nodes and converting their contents into platform data |
| 398 | is too large. This overhead includes libfdt code as well as the |
| 399 | device tree contents itself. The latter is fairly compact, but the |
| 400 | former can add 3KB or more to a Thumb 2 Image. |
| 401 | |
| 402 | This option enables generation of platform data from the device |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 403 | tree as C code. This code creates devices using U_BOOT_DRVINFO() |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 404 | declarations. The benefit is that it allows driver code to access |
| 405 | the platform data directly in C structures, avoidin the libfdt |
| 406 | overhead. |
| 407 | |
| 408 | This option works by generating C structure declarations for each |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 409 | compatible string, then adding platform data and U_BOOT_DRVINFO |
Simon Goldschmidt | 49ce8ca | 2019-01-16 20:40:18 +0100 | [diff] [blame] | 410 | declarations for each node. See of-plat.txt for more information. |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 411 | |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 412 | config SPL_OF_REAL |
| 413 | bool |
| 414 | help |
| 415 | Indicates that a real devicetree is available which can be accessed |
| 416 | at runtime. This means that dev_read_...() functions can be used to |
| 417 | read data from the devicetree for each device. This is true if |
| 418 | SPL_OF_CONTROL is enabled and not SPL_OF_PLATDATA |
| 419 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 420 | if SPL_OF_PLATDATA |
| 421 | |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 422 | config SPL_OF_PLATDATA_PARENT |
| 423 | bool "Support parent information in devices" |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 424 | default y |
| 425 | help |
| 426 | Generally it is useful to be able to access the parent of a device |
| 427 | with of-platdata. To save space this can be disabled, but in that |
| 428 | case dev_get_parent() will always return NULL; |
| 429 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 430 | config SPL_OF_PLATDATA_INST |
| 431 | bool "Declare devices at build time" |
| 432 | help |
| 433 | Declare devices as udevice instances so that they do not need to be |
| 434 | bound when U-Boot starts. This can save time and code space. |
| 435 | |
Simon Glass | 47fd4a2 | 2021-03-15 17:25:15 +1300 | [diff] [blame] | 436 | config SPL_OF_PLATDATA_NO_BIND |
| 437 | bool "Don't allow run-time binding of devices" |
| 438 | depends on SPL_OF_PLATDATA_INST |
| 439 | default y |
| 440 | help |
| 441 | This removes the ability to bind devices at run time, thus saving |
| 442 | some code space in U-Boot. This can be disabled if binding is needed, |
| 443 | at the code of some code size increase. |
| 444 | |
Simon Glass | 5b21b34 | 2021-03-15 17:25:35 +1300 | [diff] [blame] | 445 | config SPL_OF_PLATDATA_RT |
| 446 | bool "Use a separate struct for device runtime data" |
| 447 | depends on SPL_OF_PLATDATA_INST |
| 448 | default y |
| 449 | help |
| 450 | For systems running SPL from read-only memory it is convenient to |
| 451 | separate out the runtime information, so that the devices don't need |
| 452 | to be copied before being used. This moves the read-write parts of |
| 453 | struct udevice (at present just the flags) into a separate struct, |
| 454 | which is allocated at runtime. |
| 455 | |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 456 | config SPL_OF_PLATDATA_DRIVER_RT |
| 457 | bool |
| 458 | help |
| 459 | Use a separate struct for driver runtime data. |
| 460 | |
| 461 | This enables the driver_rt information, used with of-platdata when |
| 462 | of-platdata-inst is not used. It allows finding devices by their |
| 463 | driver data. |
| 464 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 465 | endif |
| 466 | |
Simon Glass | 7c4ba16 | 2021-08-07 07:24:02 -0600 | [diff] [blame] | 467 | config TPL_OF_REAL |
| 468 | bool |
| 469 | help |
| 470 | Indicates that a real devicetree is available which can be accessed |
| 471 | at runtime. This means that dev_read_...() functions can be used to |
| 472 | read data from the devicetree for each device. This is true if |
| 473 | TPL_OF_CONTROL is enabled and not TPL_OF_PLATDATA |
| 474 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 475 | config TPL_OF_PLATDATA |
| 476 | bool "Generate platform data for use in TPL" |
| 477 | depends on TPL_OF_CONTROL |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 478 | select DTOC |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 479 | select TPL_OF_PLATDATA_DRIVER_RT if !TPL_OF_PLATDATA_INST |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 480 | help |
| 481 | For very constrained SPL environments the overhead of decoding |
| 482 | device tree nodes and converting their contents into platform data |
| 483 | is too large. This overhead includes libfdt code as well as the |
| 484 | device tree contents itself. The latter is fairly compact, but the |
| 485 | former can add 3KB or more to a Thumb 2 Image. |
| 486 | |
| 487 | This option enables generation of platform data from the device |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 488 | tree as C code. This code creates devices using U_BOOT_DRVINFO() |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 489 | declarations. The benefit is that it allows driver code to access |
| 490 | the platform data directly in C structures, avoidin the libfdt |
| 491 | overhead. |
| 492 | |
| 493 | This option works by generating C structure declarations for each |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 494 | compatible string, then adding platform data and U_BOOT_DRVINFO |
Simon Goldschmidt | 49ce8ca | 2019-01-16 20:40:18 +0100 | [diff] [blame] | 495 | declarations for each node. See of-plat.txt for more information. |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 496 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 497 | if TPL_OF_PLATDATA |
| 498 | |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 499 | config TPL_OF_PLATDATA_PARENT |
| 500 | bool "Support parent information in devices" |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 501 | default y |
| 502 | help |
| 503 | Generally it is useful to be able to access the parent of a device |
| 504 | with of-platdata. To save space this can be disabled, but in that |
| 505 | case dev_get_parent() will always return NULL; |
| 506 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 507 | config TPL_OF_PLATDATA_INST |
| 508 | bool "Declare devices at build time" |
| 509 | |
| 510 | help |
| 511 | Declare devices as udevice instances so that they do not need to be |
| 512 | bound when U-Boot starts. This can save time and code space. |
| 513 | |
Simon Glass | 47fd4a2 | 2021-03-15 17:25:15 +1300 | [diff] [blame] | 514 | config TPL_OF_PLATDATA_NO_BIND |
| 515 | bool "Don't allow run-time binding of devices" |
| 516 | depends on TPL_OF_PLATDATA_INST |
| 517 | default y |
| 518 | help |
| 519 | This removes the ability to bind devices at run time, thus saving |
| 520 | some code space in U-Boot. This can be disabled if binding is needed, |
| 521 | at the code of some code size increase. |
| 522 | |
Simon Glass | 5b21b34 | 2021-03-15 17:25:35 +1300 | [diff] [blame] | 523 | config TPL_OF_PLATDATA_RT |
| 524 | bool "Use a separate struct for device runtime data" |
| 525 | depends on TPL_OF_PLATDATA_INST |
| 526 | default y |
| 527 | help |
| 528 | For systems running TPL from read-only memory it is convenient to |
| 529 | separate out the runtime information, so that the devices don't need |
| 530 | to be copied before being used. This moves the read-write parts of |
| 531 | struct udevice (at present just the flags) into a separate struct, |
| 532 | which is allocated at runtime. |
| 533 | |
Simon Glass | 8beeb28 | 2021-03-15 17:25:36 +1300 | [diff] [blame] | 534 | config TPL_OF_PLATDATA_DRIVER_RT |
| 535 | bool |
| 536 | help |
| 537 | Use a separate struct for driver runtime data. |
| 538 | |
| 539 | This enables the driver_rt information, used with of-platdata when |
| 540 | of-platdata-inst is not used. It allows finding devices by their |
| 541 | driver data. |
| 542 | |
Simon Glass | 240d5f6 | 2021-02-03 06:01:13 -0700 | [diff] [blame] | 543 | endif |
| 544 | |
Simon Glass | e7ca7da | 2022-04-30 00:56:53 -0600 | [diff] [blame] | 545 | config VPL_OF_REAL |
| 546 | def_bool y |
Tom Rini | 7fb323b | 2022-06-08 08:24:40 -0400 | [diff] [blame] | 547 | depends on VPL |
Simon Glass | e7ca7da | 2022-04-30 00:56:53 -0600 | [diff] [blame] | 548 | help |
| 549 | Indicates that a real devicetree is available which can be accessed |
| 550 | at runtime. This means that dev_read_...() functions can be used to |
| 551 | read data from the devicetree for each device. This is true if |
| 552 | TPL_OF_CONTROL is enabled and not TPL_OF_PLATDATA |
| 553 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 554 | endmenu |