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 | |
Tom Rini | 61d0fac | 2017-09-23 13:00:57 -0400 | [diff] [blame] | 8 | config DTC |
| 9 | bool |
| 10 | |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 11 | config PYLIBFDT |
| 12 | bool |
| 13 | |
| 14 | config DTOC |
| 15 | bool |
| 16 | select PYLIBFDT |
| 17 | |
| 18 | config BINMAN |
| 19 | bool |
| 20 | select DTOC |
| 21 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 22 | menu "Device Tree Control" |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 23 | depends on SUPPORT_OF_CONTROL |
| 24 | |
| 25 | config OF_CONTROL |
| 26 | bool "Run-time configuration via Device Tree" |
Tom Rini | 61d0fac | 2017-09-23 13:00:57 -0400 | [diff] [blame] | 27 | select DTC |
Sean Anderson | 08c854a | 2019-12-17 21:40:09 -0500 | [diff] [blame] | 28 | select OF_LIBFDT if !OF_PLATDATA |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 29 | help |
| 30 | This feature provides for run-time configuration of U-Boot |
| 31 | via a flattened device tree. |
| 32 | |
mario.six@gdsys.cc | 7e9b9d6 | 2017-02-22 16:07:22 +0100 | [diff] [blame] | 33 | config OF_BOARD_FIXUP |
| 34 | bool "Board-specific manipulation of Device Tree" |
| 35 | help |
| 36 | In certain circumstances it is necessary to be able to modify |
| 37 | U-Boot's device tree (e.g. to delete device from it). This option |
| 38 | make the Device Tree writeable and provides a board-specific |
| 39 | "board_fix_fdt" callback (called during pre-relocation time), which |
| 40 | enables the board initialization to modifiy the Device Tree. The |
| 41 | modified copy is subsequently used by U-Boot after relocation. |
| 42 | |
Masahiro Yamada | 1e35f39 | 2015-08-12 07:31:54 +0900 | [diff] [blame] | 43 | config SPL_OF_CONTROL |
| 44 | bool "Enable run-time configuration via Device Tree in SPL" |
| 45 | depends on SPL && OF_CONTROL |
Sean Anderson | 08c854a | 2019-12-17 21:40:09 -0500 | [diff] [blame] | 46 | select SPL_OF_LIBFDT if !SPL_OF_PLATDATA |
Simon Glass | 400d040 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 47 | help |
| 48 | 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] | 49 | which is not enough to support device tree. Disable this option to |
Simon Glass | 400d040 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 50 | allow such boards to be supported by U-Boot SPL. |
| 51 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 52 | config TPL_OF_CONTROL |
| 53 | bool "Enable run-time configuration via Device Tree in TPL" |
| 54 | depends on TPL && OF_CONTROL |
Sean Anderson | 08c854a | 2019-12-17 21:40:09 -0500 | [diff] [blame] | 55 | select TPL_OF_LIBFDT if !TPL_OF_PLATDATA |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 56 | help |
| 57 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 58 | which is not enough to support device tree. Enable this option to |
| 59 | allow such boards to be supported by U-Boot TPL. |
| 60 | |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 61 | config OF_LIVE |
| 62 | bool "Enable use of a live tree" |
| 63 | depends on OF_CONTROL |
| 64 | help |
| 65 | Normally U-Boot uses a flat device tree which saves space and |
| 66 | avoids the need to unpack the tree before use. However a flat |
Michal Simek | 97a0e49 | 2018-08-17 10:16:36 +0200 | [diff] [blame] | 67 | tree does not support modification from within U-Boot since it |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 68 | can invalidate driver-model device tree offsets. This option |
| 69 | enables a live tree which is available after relocation, |
| 70 | and can be adjusted as needed. |
| 71 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 72 | choice |
| 73 | prompt "Provider of DTB for DT control" |
| 74 | depends on OF_CONTROL |
| 75 | |
| 76 | config OF_SEPARATE |
| 77 | bool "Separate DTB for DT control" |
| 78 | depends on !SANDBOX |
| 79 | help |
| 80 | If this option is enabled, the device tree will be built and |
| 81 | placed as a separate u-boot.dtb file alongside the U-Boot image. |
| 82 | |
| 83 | config OF_EMBED |
| 84 | bool "Embedded DTB for DT control" |
| 85 | help |
| 86 | 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] | 87 | built into the U-Boot image. This is suitable for local debugging |
| 88 | and development only and is not recommended for production devices. |
| 89 | Boards in the mainline U-Boot tree should not use it. |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 90 | |
Alex Deymo | 5b661ec | 2017-04-02 01:25:20 -0700 | [diff] [blame] | 91 | config OF_BOARD |
| 92 | bool "Provided by the board at runtime" |
| 93 | depends on !SANDBOX |
| 94 | help |
| 95 | If this option is enabled, the device tree will be provided by |
| 96 | the board at runtime if the board supports it, instead of being |
| 97 | bundled with the image. |
| 98 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 99 | config OF_HOSTFILE |
| 100 | bool "Host filed DTB for DT control" |
| 101 | depends on SANDBOX |
| 102 | help |
| 103 | If this option is enabled, DTB will be read from a file on startup. |
| 104 | This is only useful for Sandbox. Use the -d flag to U-Boot to |
| 105 | specify the file to read. |
| 106 | |
Thomas Fitzsimmons | 919646d | 2018-06-08 17:59:45 -0400 | [diff] [blame] | 107 | config OF_PRIOR_STAGE |
| 108 | bool "Prior stage bootloader DTB for DT control" |
| 109 | help |
| 110 | If this option is enabled, the device tree used for DT |
| 111 | control will be read from a device tree binary, at a memory |
| 112 | location passed to U-Boot by the prior stage bootloader. |
| 113 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 114 | endchoice |
| 115 | |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 116 | config DEFAULT_DEVICE_TREE |
| 117 | string "Default Device Tree for DT control" |
Simon Glass | 644f5bc | 2016-02-22 22:55:44 -0700 | [diff] [blame] | 118 | depends on OF_CONTROL |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 119 | help |
| 120 | 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] | 121 | It can be overridden from the command line: |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 122 | $ make DEVICE_TREE=<device-tree-name> |
| 123 | |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 124 | config OF_LIST |
| 125 | string "List of device tree files to include for DT control" |
Jean-Jacques Hiblot | 2037fa4 | 2017-09-15 12:57:24 +0200 | [diff] [blame] | 126 | depends on SPL_LOAD_FIT || MULTI_DTB_FIT |
Michal Simek | 9b2e95a | 2016-05-04 15:14:11 +0200 | [diff] [blame] | 127 | default DEFAULT_DEVICE_TREE |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 128 | help |
| 129 | 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] | 130 | control. These will be packaged into a FIT. At run-time, U-boot |
| 131 | or SPL will select the correct DT to use by examining the |
| 132 | hardware (e.g. reading a board ID value). This is a list of |
| 133 | device tree files (without the directory or .dtb suffix) |
| 134 | separated by <space>. |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 135 | |
Jean-Jacques Hiblot | 985cec3 | 2019-10-22 16:39:21 +0200 | [diff] [blame] | 136 | config OF_OVERLAY_LIST |
| 137 | string "List of device tree overlays to include for DT control" |
| 138 | depends on SPL_LOAD_FIT_APPLY_OVERLAY |
| 139 | help |
| 140 | This option specifies a list of device tree overlays to use for DT |
| 141 | control. This option can then be used by a FIT generator to include |
| 142 | the overlays in the FIT image. |
| 143 | |
Marek Vasut | aeaa29d | 2019-03-08 16:06:55 +0100 | [diff] [blame] | 144 | choice |
Baruch Siach | 45508fc | 2019-10-07 15:05:47 +0300 | [diff] [blame] | 145 | prompt "OF LIST compression" |
Marek Vasut | aeaa29d | 2019-03-08 16:06:55 +0100 | [diff] [blame] | 146 | depends on MULTI_DTB_FIT |
| 147 | default MULTI_DTB_FIT_NO_COMPRESSION |
| 148 | |
| 149 | config MULTI_DTB_FIT_LZO |
| 150 | bool "LZO" |
| 151 | depends on SYS_MALLOC_F |
| 152 | select LZO |
| 153 | help |
| 154 | Compress the FIT image containing the DTBs available for the SPL |
| 155 | using LZO compression. (requires lzop on host). |
| 156 | |
| 157 | config MULTI_DTB_FIT_GZIP |
| 158 | bool "GZIP" |
| 159 | depends on SYS_MALLOC_F |
| 160 | select GZIP |
| 161 | help |
| 162 | Compress the FIT image containing the DTBs available for the SPL |
| 163 | using GZIP compression. (requires gzip on host) |
| 164 | |
| 165 | config MULTI_DTB_FIT_NO_COMPRESSION |
| 166 | bool "No compression" |
| 167 | help |
| 168 | Do not compress the FIT image containing the DTBs available for the SPL. |
| 169 | Use this options only if LZO is not available and the DTBs are very small. |
| 170 | endchoice |
| 171 | |
| 172 | choice |
| 173 | prompt "Location of uncompressed DTBs" |
| 174 | depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO) |
| 175 | default MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F |
| 176 | |
| 177 | config MULTI_DTB_FIT_DYN_ALLOC |
| 178 | bool "Dynamically allocate the memory" |
| 179 | depends on SYS_MALLOC_F |
| 180 | |
| 181 | config MULTI_DTB_FIT_USER_DEFINED_AREA |
| 182 | bool "User-defined location" |
| 183 | endchoice |
| 184 | |
| 185 | config MULTI_DTB_FIT_UNCOMPRESS_SZ |
| 186 | hex "Size of memory reserved to uncompress the DTBs" |
| 187 | depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO) |
| 188 | default 0x8000 |
| 189 | help |
| 190 | This is the size of this area where the DTBs are uncompressed. |
| 191 | If this area is dynamically allocated, make sure that |
| 192 | SYS_MALLOC_F_LEN is big enough to contain it. |
| 193 | |
| 194 | config MULTI_DTB_FIT_USER_DEF_ADDR |
| 195 | hex "Address of memory where dtbs are uncompressed" |
| 196 | depends on MULTI_DTB_FIT_USER_DEFINED_AREA |
| 197 | help |
| 198 | the FIT image containing the DTBs is uncompressed in an area defined |
| 199 | at compilation time. This is the address of this area. It must be |
| 200 | aligned on 2-byte boundary. |
Jean-Jacques Hiblot | 2037fa4 | 2017-09-15 12:57:24 +0200 | [diff] [blame] | 201 | |
| 202 | config DTB_RESELECT |
| 203 | bool "Support swapping dtbs at a later point in boot" |
| 204 | depends on MULTI_DTB_FIT |
| 205 | help |
| 206 | It is possible during initial boot you may need to use a generic |
| 207 | dtb until you can fully determine the board your running on. This |
| 208 | config allows boards to implement a function at a later point |
| 209 | during boot to switch to the "correct" dtb. |
| 210 | |
| 211 | config MULTI_DTB_FIT |
| 212 | bool "Support embedding several DTBs in a FIT image for u-boot" |
| 213 | help |
| 214 | This option provides hooks to allow U-boot to parse an |
| 215 | appended FIT image and enable board specific code to then select |
| 216 | the correct DTB to be used. Use this if you need to support |
| 217 | multiple DTBs but don't use the SPL. |
| 218 | |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 219 | |
| 220 | config SPL_MULTI_DTB_FIT |
| 221 | depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA |
| 222 | bool "Support embedding several DTBs in a FIT image for the SPL" |
| 223 | help |
| 224 | This option provides the SPL with the ability to select its own |
| 225 | DTB at runtime from an appended FIT image containing several DTBs. |
| 226 | This allows using the same SPL binary on multiple platforms. |
| 227 | The primary purpose is to handle different versions of |
| 228 | the same platform without tweaking the platform code if the |
| 229 | differences can be expressed in the DTBs (common examples are: bus |
| 230 | capabilities, pad configurations). |
| 231 | |
| 232 | config SPL_OF_LIST |
| 233 | string "List of device tree files to include for DT control in SPL" |
| 234 | depends on SPL_MULTI_DTB_FIT |
| 235 | default OF_LIST |
| 236 | help |
| 237 | This option specifies a list of device tree files to use for DT |
| 238 | control in the SPL. These will be packaged into a FIT. At run-time, |
| 239 | the SPL will select the correct DT to use by examining the |
| 240 | hardware (e.g. reading a board ID value). This is a list of |
| 241 | device tree files (without the directory or .dtb suffix) |
| 242 | separated by <space>. |
| 243 | |
| 244 | choice |
| 245 | prompt "SPL OF LIST compression" |
| 246 | depends on SPL_MULTI_DTB_FIT |
| 247 | default SPL_MULTI_DTB_FIT_LZO |
| 248 | |
| 249 | config SPL_MULTI_DTB_FIT_LZO |
| 250 | bool "LZO" |
| 251 | depends on SYS_MALLOC_F |
| 252 | select SPL_LZO |
| 253 | help |
| 254 | Compress the FIT image containing the DTBs available for the SPL |
| 255 | using LZO compression. (requires lzop on host). |
| 256 | |
| 257 | config SPL_MULTI_DTB_FIT_GZIP |
| 258 | bool "GZIP" |
| 259 | depends on SYS_MALLOC_F |
| 260 | select SPL_GZIP |
| 261 | help |
| 262 | Compress the FIT image containing the DTBs available for the SPL |
| 263 | using GZIP compression. (requires gzip on host) |
| 264 | |
| 265 | config SPL_MULTI_DTB_FIT_NO_COMPRESSION |
| 266 | bool "No compression" |
| 267 | help |
| 268 | Do not compress the FIT image containing the DTBs available for the SPL. |
| 269 | Use this options only if LZO is not available and the DTBs are very small. |
| 270 | endchoice |
| 271 | |
| 272 | choice |
Michal Simek | c7df3a2 | 2018-07-23 08:38:56 +0200 | [diff] [blame] | 273 | prompt "Location of uncompressed DTBs" |
Jean-Jacques Hiblot | a2fee16 | 2017-09-15 12:57:32 +0200 | [diff] [blame] | 274 | depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO) |
| 275 | default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F |
| 276 | |
| 277 | config SPL_MULTI_DTB_FIT_DYN_ALLOC |
| 278 | bool "Dynamically allocate the memory" |
| 279 | depends on SYS_MALLOC_F |
| 280 | |
| 281 | config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA |
| 282 | bool "User-defined location" |
| 283 | endchoice |
| 284 | |
| 285 | config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ |
| 286 | hex "Size of memory reserved to uncompress the DTBs" |
| 287 | depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO) |
| 288 | default 0x8000 |
| 289 | help |
| 290 | This is the size of this area where the DTBs are uncompressed. |
| 291 | If this area is dynamically allocated, make sure that |
| 292 | SPL_SYS_MALLOC_F_LEN is big enough to contain it. |
| 293 | |
| 294 | config SPL_MULTI_DTB_FIT_USER_DEF_ADDR |
| 295 | hex "Address of memory where dtbs are uncompressed" |
| 296 | depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA |
| 297 | help |
| 298 | the FIT image containing the DTBs is uncompressed in an area defined |
| 299 | at compilation time. This is the address of this area. It must be |
| 300 | aligned on 2-byte boundary. |
| 301 | |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 302 | config OF_SPL_REMOVE_PROPS |
| 303 | string "List of device tree properties to drop for SPL" |
Masahiro Yamada | ddb9aa97 | 2015-08-28 20:28:42 +0900 | [diff] [blame] | 304 | depends on SPL_OF_CONTROL |
Michal Simek | de21807 | 2019-02-22 10:50:23 +0100 | [diff] [blame] | 305 | default "interrupt-parent interrupts" if SPL_PINCTRL && SPL_CLK |
| 306 | default "clocks clock-names interrupt-parent interrupts" if SPL_PINCTRL |
| 307 | default "pinctrl-0 pinctrl-names interrupt-parent interrupts" if SPL_CLK |
| 308 | default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupts" |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 309 | help |
| 310 | Since SPL normally runs in a reduced memory space, the device tree |
| 311 | is cut down to only what is needed to load and start U-Boot. Only |
| 312 | nodes marked with the property "u-boot,dm-pre-reloc" will be |
| 313 | included. In addition, some properties are not used by U-Boot and |
| 314 | can be discarded. This option defines the list of properties to |
| 315 | discard. |
| 316 | |
Anatolij Gustschin | 0856834 | 2020-01-12 15:57:42 +0100 | [diff] [blame] | 317 | config OF_DTB_PROPS_REMOVE |
| 318 | bool "Enable removal of device tree properties" |
| 319 | depends on OF_CONTROL |
| 320 | help |
| 321 | Some boards have restricted amount of storage for U-Boot image. |
| 322 | If the generated binary doesn't fit into available image storage, |
| 323 | the built-in device tree could probably be cut down by removing |
| 324 | some not required device tree properties to reduce the image size. |
| 325 | Enable this option and define the properties to be removed in the |
| 326 | CONFIG_OF_REMOVE_PROPS list. Do not enable this option if you must |
| 327 | pass the built-in DTB directly to the kernel! |
| 328 | |
| 329 | config OF_REMOVE_PROPS |
| 330 | string "List of device tree properties to drop" |
| 331 | depends on OF_DTB_PROPS_REMOVE |
| 332 | default "interrupt-parent interrupts" if PINCTRL |
| 333 | help |
| 334 | Some properties are not used by U-Boot and can be discarded. |
| 335 | This option defines the list of properties to discard. |
| 336 | |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 337 | config SPL_OF_PLATDATA |
| 338 | bool "Generate platform data for use in SPL" |
| 339 | depends on SPL_OF_CONTROL |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 340 | select DTOC |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 341 | help |
| 342 | For very constrained SPL environments the overhead of decoding |
| 343 | device tree nodes and converting their contents into platform data |
| 344 | is too large. This overhead includes libfdt code as well as the |
| 345 | device tree contents itself. The latter is fairly compact, but the |
| 346 | former can add 3KB or more to a Thumb 2 Image. |
| 347 | |
| 348 | This option enables generation of platform data from the device |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 349 | tree as C code. This code creates devices using U_BOOT_DRVINFO() |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 350 | declarations. The benefit is that it allows driver code to access |
| 351 | the platform data directly in C structures, avoidin the libfdt |
| 352 | overhead. |
| 353 | |
| 354 | This option works by generating C structure declarations for each |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 355 | compatible string, then adding platform data and U_BOOT_DRVINFO |
Simon Goldschmidt | 49ce8ca | 2019-01-16 20:40:18 +0100 | [diff] [blame] | 356 | declarations for each node. See of-plat.txt for more information. |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 357 | |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 358 | config SPL_OF_PLATDATA_PARENT |
| 359 | bool "Support parent information in devices" |
| 360 | depends on SPL_OF_PLATDATA |
| 361 | default y |
| 362 | help |
| 363 | Generally it is useful to be able to access the parent of a device |
| 364 | with of-platdata. To save space this can be disabled, but in that |
| 365 | case dev_get_parent() will always return NULL; |
| 366 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 367 | config TPL_OF_PLATDATA |
| 368 | bool "Generate platform data for use in TPL" |
| 369 | depends on TPL_OF_CONTROL |
Masahiro Yamada | 87247af | 2017-10-17 13:42:44 +0900 | [diff] [blame] | 370 | select DTOC |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 371 | help |
| 372 | For very constrained SPL environments the overhead of decoding |
| 373 | device tree nodes and converting their contents into platform data |
| 374 | is too large. This overhead includes libfdt code as well as the |
| 375 | device tree contents itself. The latter is fairly compact, but the |
| 376 | former can add 3KB or more to a Thumb 2 Image. |
| 377 | |
| 378 | This option enables generation of platform data from the device |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 379 | tree as C code. This code creates devices using U_BOOT_DRVINFO() |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 380 | declarations. The benefit is that it allows driver code to access |
| 381 | the platform data directly in C structures, avoidin the libfdt |
| 382 | overhead. |
| 383 | |
| 384 | This option works by generating C structure declarations for each |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 385 | compatible string, then adding platform data and U_BOOT_DRVINFO |
Simon Goldschmidt | 49ce8ca | 2019-01-16 20:40:18 +0100 | [diff] [blame] | 386 | declarations for each node. See of-plat.txt for more information. |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 387 | |
Simon Glass | 36b15e2 | 2020-10-03 11:31:35 -0600 | [diff] [blame] | 388 | config TPL_OF_PLATDATA_PARENT |
| 389 | bool "Support parent information in devices" |
| 390 | depends on TPL_OF_PLATDATA |
| 391 | default y |
| 392 | help |
| 393 | Generally it is useful to be able to access the parent of a device |
| 394 | with of-platdata. To save space this can be disabled, but in that |
| 395 | case dev_get_parent() will always return NULL; |
| 396 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 397 | endmenu |