]> Git Repo - u-boot.git/blame - dts/Kconfig
lib: fdt: Allow LZO and GZIP DT compression in U-Boot
[u-boot.git] / dts / Kconfig
CommitLineData
783e6a72
MY
1#
2# Device Tree Control
3#
783e6a72
MY
4
5config SUPPORT_OF_CONTROL
6 bool
7
36dd5f1b
TR
8config DTC
9 bool
10
d6a0c78a
MY
11config PYLIBFDT
12 bool
13
14config DTOC
15 bool
16 select PYLIBFDT
17
18config BINMAN
19 bool
20 select DTOC
21
783e6a72 22menu "Device Tree Control"
783e6a72
MY
23 depends on SUPPORT_OF_CONTROL
24
25config OF_CONTROL
26 bool "Run-time configuration via Device Tree"
36dd5f1b 27 select DTC
783e6a72
MY
28 help
29 This feature provides for run-time configuration of U-Boot
30 via a flattened device tree.
31
2a792753 32config OF_BOARD_FIXUP
33 bool "Board-specific manipulation of Device Tree"
34 help
35 In certain circumstances it is necessary to be able to modify
36 U-Boot's device tree (e.g. to delete device from it). This option
37 make the Device Tree writeable and provides a board-specific
38 "board_fix_fdt" callback (called during pre-relocation time), which
39 enables the board initialization to modifiy the Device Tree. The
40 modified copy is subsequently used by U-Boot after relocation.
41
dffb86e4
MY
42config SPL_OF_CONTROL
43 bool "Enable run-time configuration via Device Tree in SPL"
44 depends on SPL && OF_CONTROL
2860f03b
SG
45 help
46 Some boards use device tree in U-Boot but only have 4KB of SRAM
47 which is not enough to support device tree. Enable this option to
48 allow such boards to be supported by U-Boot SPL.
49
f291ce12
PT
50config TPL_OF_CONTROL
51 bool "Enable run-time configuration via Device Tree in TPL"
52 depends on TPL && OF_CONTROL
53 help
54 Some boards use device tree in U-Boot but only have 4KB of SRAM
55 which is not enough to support device tree. Enable this option to
56 allow such boards to be supported by U-Boot TPL.
57
5e060d8b
SG
58config OF_LIVE
59 bool "Enable use of a live tree"
60 depends on OF_CONTROL
61 help
62 Normally U-Boot uses a flat device tree which saves space and
63 avoids the need to unpack the tree before use. However a flat
4adc6605 64 tree does not support modification from within U-Boot since it
5e060d8b
SG
65 can invalidate driver-model device tree offsets. This option
66 enables a live tree which is available after relocation,
67 and can be adjusted as needed.
68
783e6a72
MY
69choice
70 prompt "Provider of DTB for DT control"
71 depends on OF_CONTROL
72
73config OF_SEPARATE
74 bool "Separate DTB for DT control"
75 depends on !SANDBOX
76 help
77 If this option is enabled, the device tree will be built and
78 placed as a separate u-boot.dtb file alongside the U-Boot image.
79
80config OF_EMBED
81 bool "Embedded DTB for DT control"
82 help
83 If this option is enabled, the device tree will be picked up and
3d3f60cb
SG
84 built into the U-Boot image. This is suitable for local debugging
85 and development only and is not recommended for production devices.
86 Boards in the mainline U-Boot tree should not use it.
783e6a72 87
82f766d1
AD
88config OF_BOARD
89 bool "Provided by the board at runtime"
90 depends on !SANDBOX
91 help
92 If this option is enabled, the device tree will be provided by
93 the board at runtime if the board supports it, instead of being
94 bundled with the image.
95
783e6a72
MY
96config OF_HOSTFILE
97 bool "Host filed DTB for DT control"
98 depends on SANDBOX
99 help
100 If this option is enabled, DTB will be read from a file on startup.
101 This is only useful for Sandbox. Use the -d flag to U-Boot to
102 specify the file to read.
103
894c3ad2
TF
104config OF_PRIOR_STAGE
105 bool "Prior stage bootloader DTB for DT control"
106 help
107 If this option is enabled, the device tree used for DT
108 control will be read from a device tree binary, at a memory
109 location passed to U-Boot by the prior stage bootloader.
110
783e6a72
MY
111endchoice
112
f1ef2b62
MY
113config DEFAULT_DEVICE_TREE
114 string "Default Device Tree for DT control"
70d41093 115 depends on OF_CONTROL
f1ef2b62
MY
116 help
117 This option specifies the default Device Tree used for DT control.
5699ea6d 118 It can be overridden from the command line:
f1ef2b62
MY
119 $ make DEVICE_TREE=<device-tree-name>
120
cdf17246
SG
121config OF_LIST
122 string "List of device tree files to include for DT control"
11955590 123 depends on SPL_LOAD_FIT || MULTI_DTB_FIT
c409bd01 124 default DEFAULT_DEVICE_TREE
cdf17246
SG
125 help
126 This option specifies a list of device tree files to use for DT
d9797409
CJF
127 control. These will be packaged into a FIT. At run-time, U-boot
128 or SPL will select the correct DT to use by examining the
129 hardware (e.g. reading a board ID value). This is a list of
130 device tree files (without the directory or .dtb suffix)
131 separated by <space>.
cdf17246 132
95f4bbd5
MV
133choice
134 prompt "SPL OF LIST compression"
135 depends on MULTI_DTB_FIT
136 default MULTI_DTB_FIT_NO_COMPRESSION
137
138config MULTI_DTB_FIT_LZO
139 bool "LZO"
140 depends on SYS_MALLOC_F
141 select LZO
142 help
143 Compress the FIT image containing the DTBs available for the SPL
144 using LZO compression. (requires lzop on host).
145
146config MULTI_DTB_FIT_GZIP
147 bool "GZIP"
148 depends on SYS_MALLOC_F
149 select GZIP
150 help
151 Compress the FIT image containing the DTBs available for the SPL
152 using GZIP compression. (requires gzip on host)
153
154config MULTI_DTB_FIT_NO_COMPRESSION
155 bool "No compression"
156 help
157 Do not compress the FIT image containing the DTBs available for the SPL.
158 Use this options only if LZO is not available and the DTBs are very small.
159endchoice
160
161choice
162 prompt "Location of uncompressed DTBs"
163 depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO)
164 default MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
165
166config MULTI_DTB_FIT_DYN_ALLOC
167 bool "Dynamically allocate the memory"
168 depends on SYS_MALLOC_F
169
170config MULTI_DTB_FIT_USER_DEFINED_AREA
171 bool "User-defined location"
172endchoice
173
174config MULTI_DTB_FIT_UNCOMPRESS_SZ
175 hex "Size of memory reserved to uncompress the DTBs"
176 depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO)
177 default 0x8000
178 help
179 This is the size of this area where the DTBs are uncompressed.
180 If this area is dynamically allocated, make sure that
181 SYS_MALLOC_F_LEN is big enough to contain it.
182
183config MULTI_DTB_FIT_USER_DEF_ADDR
184 hex "Address of memory where dtbs are uncompressed"
185 depends on MULTI_DTB_FIT_USER_DEFINED_AREA
186 help
187 the FIT image containing the DTBs is uncompressed in an area defined
188 at compilation time. This is the address of this area. It must be
189 aligned on 2-byte boundary.
11955590
JJH
190
191config DTB_RESELECT
192 bool "Support swapping dtbs at a later point in boot"
193 depends on MULTI_DTB_FIT
194 help
195 It is possible during initial boot you may need to use a generic
196 dtb until you can fully determine the board your running on. This
197 config allows boards to implement a function at a later point
198 during boot to switch to the "correct" dtb.
199
200config MULTI_DTB_FIT
201 bool "Support embedding several DTBs in a FIT image for u-boot"
202 help
203 This option provides hooks to allow U-boot to parse an
204 appended FIT image and enable board specific code to then select
205 the correct DTB to be used. Use this if you need to support
206 multiple DTBs but don't use the SPL.
207
2f57c951
JJH
208
209config SPL_MULTI_DTB_FIT
210 depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA
211 bool "Support embedding several DTBs in a FIT image for the SPL"
212 help
213 This option provides the SPL with the ability to select its own
214 DTB at runtime from an appended FIT image containing several DTBs.
215 This allows using the same SPL binary on multiple platforms.
216 The primary purpose is to handle different versions of
217 the same platform without tweaking the platform code if the
218 differences can be expressed in the DTBs (common examples are: bus
219 capabilities, pad configurations).
220
221config SPL_OF_LIST
222 string "List of device tree files to include for DT control in SPL"
223 depends on SPL_MULTI_DTB_FIT
224 default OF_LIST
225 help
226 This option specifies a list of device tree files to use for DT
227 control in the SPL. These will be packaged into a FIT. At run-time,
228 the SPL will select the correct DT to use by examining the
229 hardware (e.g. reading a board ID value). This is a list of
230 device tree files (without the directory or .dtb suffix)
231 separated by <space>.
232
233choice
234 prompt "SPL OF LIST compression"
235 depends on SPL_MULTI_DTB_FIT
236 default SPL_MULTI_DTB_FIT_LZO
237
238config SPL_MULTI_DTB_FIT_LZO
239 bool "LZO"
240 depends on SYS_MALLOC_F
241 select SPL_LZO
242 help
243 Compress the FIT image containing the DTBs available for the SPL
244 using LZO compression. (requires lzop on host).
245
246config SPL_MULTI_DTB_FIT_GZIP
247 bool "GZIP"
248 depends on SYS_MALLOC_F
249 select SPL_GZIP
250 help
251 Compress the FIT image containing the DTBs available for the SPL
252 using GZIP compression. (requires gzip on host)
253
254config SPL_MULTI_DTB_FIT_NO_COMPRESSION
255 bool "No compression"
256 help
257 Do not compress the FIT image containing the DTBs available for the SPL.
258 Use this options only if LZO is not available and the DTBs are very small.
259endchoice
260
261choice
b8448051 262 prompt "Location of uncompressed DTBs"
2f57c951
JJH
263 depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
264 default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
265
266config SPL_MULTI_DTB_FIT_DYN_ALLOC
267 bool "Dynamically allocate the memory"
268 depends on SYS_MALLOC_F
269
270config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
271 bool "User-defined location"
272endchoice
273
274config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ
275 hex "Size of memory reserved to uncompress the DTBs"
276 depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
277 default 0x8000
278 help
279 This is the size of this area where the DTBs are uncompressed.
280 If this area is dynamically allocated, make sure that
281 SPL_SYS_MALLOC_F_LEN is big enough to contain it.
282
283config SPL_MULTI_DTB_FIT_USER_DEF_ADDR
284 hex "Address of memory where dtbs are uncompressed"
285 depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
286 help
287 the FIT image containing the DTBs is uncompressed in an area defined
288 at compilation time. This is the address of this area. It must be
289 aligned on 2-byte boundary.
290
fa78e0a3
SG
291config OF_SPL_REMOVE_PROPS
292 string "List of device tree properties to drop for SPL"
897705ec 293 depends on SPL_OF_CONTROL
239ae4a9
VM
294 default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
295 default "clocks clock-names interrupt-parent" if SPL_PINCTRL
5f3f7b79 296 default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
fa78e0a3
SG
297 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
298 help
299 Since SPL normally runs in a reduced memory space, the device tree
300 is cut down to only what is needed to load and start U-Boot. Only
301 nodes marked with the property "u-boot,dm-pre-reloc" will be
302 included. In addition, some properties are not used by U-Boot and
303 can be discarded. This option defines the list of properties to
304 discard.
305
2789ddb9
SG
306config SPL_OF_PLATDATA
307 bool "Generate platform data for use in SPL"
308 depends on SPL_OF_CONTROL
d6a0c78a 309 select DTOC
2789ddb9
SG
310 help
311 For very constrained SPL environments the overhead of decoding
312 device tree nodes and converting their contents into platform data
313 is too large. This overhead includes libfdt code as well as the
314 device tree contents itself. The latter is fairly compact, but the
315 former can add 3KB or more to a Thumb 2 Image.
316
317 This option enables generation of platform data from the device
318 tree as C code. This code creates devices using U_BOOT_DEVICE()
319 declarations. The benefit is that it allows driver code to access
320 the platform data directly in C structures, avoidin the libfdt
321 overhead.
322
323 This option works by generating C structure declarations for each
324 compatible string, then adding platform data and U_BOOT_DEVICE
3600b461 325 declarations for each node. See of-plat.txt for more information.
2789ddb9 326
f291ce12
PT
327config TPL_OF_PLATDATA
328 bool "Generate platform data for use in TPL"
329 depends on TPL_OF_CONTROL
d6a0c78a 330 select DTOC
f291ce12
PT
331 help
332 For very constrained SPL environments the overhead of decoding
333 device tree nodes and converting their contents into platform data
334 is too large. This overhead includes libfdt code as well as the
335 device tree contents itself. The latter is fairly compact, but the
336 former can add 3KB or more to a Thumb 2 Image.
337
338 This option enables generation of platform data from the device
339 tree as C code. This code creates devices using U_BOOT_DEVICE()
340 declarations. The benefit is that it allows driver code to access
341 the platform data directly in C structures, avoidin the libfdt
342 overhead.
343
344 This option works by generating C structure declarations for each
345 compatible string, then adding platform data and U_BOOT_DEVICE
3600b461 346 declarations for each node. See of-plat.txt for more information.
f291ce12 347
783e6a72 348endmenu
1f6049e2
TR
349
350config MKIMAGE_DTC_PATH
351 string "Path to dtc binary for use within mkimage"
352 default "dtc"
353 help
354 The mkimage host tool will, in order to generate FIT images make
355 calls to the dtc application in order to create the output. In
356 some cases the system dtc may not support all required features
357 and the path to a different version should be given here.
This page took 0.233319 seconds and 4 git commands to generate.