"Das U-Boot" Source Tree
1config SUPPORT_SPL
2 bool
3
4config SUPPORT_TPL
5 bool
6
7config SUPPORT_VPL
8 bool
9
10config SPL_DFU_NO_RESET
11 bool
12
13config SPL
14 bool "Enable SPL"
15 depends on SUPPORT_SPL
16 help
17 If you want to build SPL as well as the normal image, say Y.
18
19menu "SPL configuration options"
20 depends on SPL
21
22config SPL_FRAMEWORK
23 bool "Support SPL based upon the common SPL framework"
24 default y
25 help
26 Enable the SPL framework under common/spl/. This framework
27 supports MMC, NAND and YMODEM and other methods loading of U-Boot
28 and the Linux Kernel. If unsure, say Y.
29
30config SPL_FRAMEWORK_BOARD_INIT_F
31 bool "Define a generic function board_init_f"
32 depends on SPL_FRAMEWORK
33 help
34 Define a generic function board_init_f that:
35 - initialize the spl (spl_early_init)
36 - initialize the serial (preloader_console_init)
37 Unless you want to provide your own board_init_f, you should say Y.
38
39config SPL_SIZE_LIMIT
40 hex "Maximum size of SPL image"
41 default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
42 default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB
43 default 0x30000 if ARCH_MVEBU && ARMADA_32BIT
44 default 0x0
45 help
46 Specifies the maximum length of the U-Boot SPL image.
47 If this value is zero, it is ignored.
48
49config SPL_SIZE_LIMIT_SUBTRACT_GD
50 bool "SPL image size check: provide space for global data"
51 depends on SPL_SIZE_LIMIT > 0
52 help
53 If enabled, aligned size of global data is reserved in
54 SPL_SIZE_LIMIT check to ensure such an image does not overflow SRAM
55 if SPL_SIZE_LIMIT describes the size of SRAM available for SPL when
56 pre-reloc global data is put into this SRAM, too.
57
58config SPL_SIZE_LIMIT_SUBTRACT_MALLOC
59 bool "SPL image size check: provide space for malloc() pool before relocation"
60 depends on SPL_SIZE_LIMIT > 0
61 help
62 If enabled, SPL_SYS_MALLOC_F_LEN is reserved in SPL_SIZE_LIMIT check
63 to ensure such an image does not overflow SRAM if SPL_SIZE_LIMIT
64 describes the size of SRAM available for SPL when pre-reloc malloc
65 pool is put into this SRAM, too.
66
67config SPL_SIZE_LIMIT_PROVIDE_STACK
68 hex "SPL image size check: provide stack space before relocation"
69 depends on SPL_SIZE_LIMIT > 0
70 default 0x0
71 help
72 If set, this size is reserved in SPL_SIZE_LIMIT check to ensure such
73 an image does not overflow SRAM if SPL_SIZE_LIMIT describes the size
74 of SRAM available for SPL when the stack required before reolcation
75 uses this SRAM, too.
76
77config SPL_MAX_SIZE
78 hex "Maximum size of the SPL image, excluding BSS"
79 default 0x30000 if ARCH_MX6 && MX6_OCRAM_256KB
80 default 0x1b000 if AM33XX && !TI_SECURE_DEVICE
81 default 0xec00 if OMAP34XX
82 default 0x10000 if ARCH_MX6 && !MX6_OCRAM_256KB
83 default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x10000
84 default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x20000 && !MACH_SUN50I_H616
85 default 0xbfa0 if MACH_SUN50I_H616
86 default 0x7000 if RCAR_GEN3
87 default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0
88 default 0x10000 if ASPEED_AST2600
89 default 0x27000 if IMX8MM && SPL_TEXT_BASE = 0x7E1000
90 default 0x30000 if ARCH_SC5XX && (SC59X_64 || SC59X)
91 default 0x20000 if ARCH_SC5XX && (SC58X || SC57X)
92 default 0x0
93 help
94 Maximum size of the SPL image (text, data, rodata, and linker lists
95 sections), BSS excluded. When defined, the linker checks that the
96 actual size does not exceed it.
97
98config SPL_PAD_TO
99 hex "Offset to which the SPL should be padded before appending the SPL payload"
100 default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB
101 default 0x11000 if ARCH_MX7 || (ARCH_MX6 && !MX6_OCRAM_256KB)
102 default 0x10000 if ARCH_KEYSTONE
103 default 0x0 if ARCH_MTMIPS || ARCH_SUNXI
104 default TPL_MAX_SIZE if TPL_MAX_SIZE > SPL_MAX_SIZE
105 default SPL_MAX_SIZE
106 help
107 Image offset to which the SPL should be padded before appending the
108 SPL payload. By default, this is defined as CONFIG_SPL_MAX_SIZE, or 0 if
109 CONFIG_SPL_MAX_SIZE is undefined. CONFIG_SPL_PAD_TO must be either
110 0, meaning to append the SPL payload without any padding, or >=
111 CONFIG_SPL_MAX_SIZE.
112
113config SPL_HAS_BSS_LINKER_SECTION
114 depends on SPL_FRAMEWORK
115 bool "Use a specific address for the BSS via the linker script"
116 default y if ARCH_SUNXI || ARCH_MX6 || ARCH_OMAP2PLUS || MIPS || RISCV || ARCH_ZYNQMP || ARCH_SC5XX
117
118config SPL_BSS_START_ADDR
119 hex "Link address for the BSS within the SPL binary"
120 depends on SPL_HAS_BSS_LINKER_SECTION
121 default 0x88200000 if (ARCH_MX6 && (MX6SX || MX6SL || MX6UL || MX6ULL)) || ARCH_MX7
122 default 0x18200000 if ARCH_MX6 && !(MX6SX || MX6SL || MX6UL || MX6ULL)
123 default 0x80a00000 if ARCH_OMAP2PLUS
124 default 0x81f80000 if ARCH_SUNXI && MACH_SUNIV
125 default 0x4ff80000 if ARCH_SUNXI && !(MACH_SUN9I || MACH_SUNIV)
126 default 0x2ff80000 if ARCH_SUNXI && MACH_SUN9I
127 default 0x1000 if ARCH_ZYNQMP
128 default 0x200B0000 if ARCH_SC5XX && (SC59X_64 || SC59X)
129 default 0x20080000 if ARCH_SC5XX && SC58X
130 default 0x200A0000 if ARCH_SC5XX && SC57X
131
132choice
133 prompt "Enforce SPL BSS limit"
134 depends on !PPC
135 default SPL_BSS_LIMIT
136 help
137 In some platforms we only want to enforce a limit on the size of the
138 BSS in memory. On other platforms we need to enforce a limit on the
139 whole of the memory allocation as we're strictly limited to a small
140 typically non-DRAM location. Finally, other platforms do not enforce
141 a memory limit within SPL.
142
143config SPL_NO_BSS_LIMIT
144 bool "Do not enforce a build time limit on the size of the BSS"
145
146config SPL_BSS_LIMIT
147 bool "Enforce a limit on the size of the BSS only"
148
149config SPL_FOOTPRINT_LIMIT
150 bool "Enforce a limit on the whole of memory allocated to SPL, BSS included"
151
152endchoice
153
154config SPL_BSS_MAX_SIZE
155 hex "Maximum size in memory allocated to the SPL BSS"
156 depends on SPL_BSS_LIMIT
157 default 0x100000 if ARCH_MX6 || RISCV
158 default 0x80000 if ARCH_OMAP2PLUS || ARCH_SUNXI
159 default 0x10000 if ARCH_SC5XX
160 help
161 When non-zero, the linker checks that the actual memory used by SPL
162 from __bss_start to __bss_end does not exceed it.
163
164config SPL_MAX_FOOTPRINT
165 hex "Maximum size in memory allocated to the SPL, BSS included"
166 depends on SPL_FOOTPRINT_LIMIT
167 help
168 When non-zero, the linker checks that the actual memory used by SPL
169 from _start to __bss_end does not exceed it.
170
171config SPL_SYS_STACK_F_CHECK_BYTE
172 hex
173 default 0xaa
174 help
175 Constant used to check the stack
176
177config SPL_SYS_REPORT_STACK_F_USAGE
178 depends on SPL_SIZE_LIMIT_PROVIDE_STACK != 0
179 bool "Check and report stack usage in SPL before relocation"
180 help
181 If this option is enabled, the initial SPL stack is filled with 0xaa
182 very early, up to the size configured with
183 SPL_SIZE_LIMIT_PROVIDE_STACK.
184 Later when SPL is done using this initial stack and switches to a
185 stack in DRAM, the actually used size of this initial stack is
186 reported by examining the memory and searching for the lowest
187 occurrence of non 0xaa bytes.
188 This default implementation works for stacks growing down only.
189
190config SPL_SHOW_ERRORS
191 bool "Show more information when something goes wrong"
192 depends on SPL_LIBCOMMON_SUPPORT
193 help
194 This enabled more verbose error messages and checking when something
195 goes wrong in SPL. For example, it shows the error code when U-Boot
196 cannot be located. This can help to diagnose the problem and figure
197 out a fix, particularly during development.
198
199 This adds a small amount to SPL code size, perhaps 100 bytes.
200
201config SPL_BINMAN_SYMBOLS
202 bool "Declare binman symbols in SPL"
203 depends on SPL_FRAMEWORK && BINMAN
204 default y
205 help
206 This enables use of symbols in SPL which refer to other entries in
207 the same binman image as the SPL. These can be declared with the
208 binman_sym_declare(type, entry, prop) macro and accessed by the
209 binman_sym(type, entry, prop) macro defined in binman_sym.h.
210
211 See tools/binman/binman.rst for a detailed explanation.
212
213config SPL_BINMAN_UBOOT_SYMBOLS
214 bool "Declare binman symbols for U-Boot phases in SPL"
215 depends on SPL_BINMAN_SYMBOLS
216 default n if ARCH_IMX8M || ARCH_IMX8ULP || ARCH_IMX9
217 default y
218 help
219 This enables use of symbols in SPL which refer to U-Boot phases,
220 enabling SPL to obtain the location and size of its next phase simply
221 by calling spl_get_image_pos() and spl_get_image_size().
222
223 For this to work, you must have all U-Boot phases in the same binman
224 image, so binman can update SPL with the locations of everything.
225
226source "common/spl/Kconfig.nxp"
227
228config HANDOFF
229 bool "Pass hand-off information from SPL to U-Boot proper"
230 depends on BLOBLIST
231 help
232 It is useful to be able to pass information from SPL to U-Boot
233 proper to preserve state that is known in SPL and is needed in U-Boot.
234 Enable this to locate the handoff information in U-Boot proper, early
235 in boot. It is available in gd->handoff. The state state is set up
236 in SPL (or TPL if that is being used).
237
238config SPL_HANDOFF
239 bool "Pass hand-off information from SPL to U-Boot proper"
240 depends on HANDOFF && SPL_BLOBLIST
241 default y
242 help
243 This option enables SPL to write handoff information. This can be
244 used to pass information like the size of SDRAM from SPL to U-Boot
245 proper. Also SPL can receive information from TPL in the same place
246 if that is enabled.
247
248config SPL_LDSCRIPT
249 string "Linker script for the SPL stage"
250 default "arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds" if MACH_SUNIV
251 default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if ARCH_SUNXI && !MACH_SUNIV && !ARM64
252 default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
253 default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
254 default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A
255 default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
256 default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if ARCH_AT91 && CPU_ARM926EJS
257 default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if ARCH_AT91 && CPU_V7A
258 default "arch/arm/mach-omap2/u-boot-spl.lds" if ARCH_MX6 || ARCH_OMAP2PLUS || (ARCH_K3 && !ARM64)
259 default "arch/arm/mach-zynq/u-boot-spl.lds" if ARCH_ZYNQ
260 default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4
261 default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds" if ARCH_DAVINCI
262 default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
263 help
264 The SPL stage will usually require a different linker-script
265 (as it runs from a different memory region) than the regular
266 U-Boot stage. Set this to the path of the linker-script to
267 be used for SPL.
268
269config SPL_TEXT_BASE
270 hex "SPL Text Base"
271 default 0x40200000 if OMAP34XX
272 default 0x402F4000 if AM43XX
273 default 0x402F0400 if AM33XX
274 default 0x00908000 if ARCH_MX6
275 default 0x00912000 if ARCH_MX7
276 default 0x40301350 if OMAP54XX
277 default 0x10060 if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN9I
278 default 0x20060 if SUN50I_GEN_H6 || SUNXI_GEN_NCAT2
279 default 0x00060 if ARCH_SUNXI
280 default 0xfffc0000 if ARCH_ZYNQMP
281 default 0x20080000 if ARCH_SC5XX
282 default 0x0
283 help
284 The address in memory that SPL will be running from.
285
286config SPL_SOC_INIT
287 bool "Call SoC-specific initialization in SPL"
288 help
289 If this option is enabled, U-Boot will call the function
290 spl_soc_init() from board_init_r(). This function should be
291 provided by the SoC vendor.
292
293config SPL_BOARD_INIT
294 bool "Call board-specific initialization in SPL"
295 help
296 If this option is enabled, U-Boot will call the function
297 spl_board_init() from board_init_r(). This function should be
298 provided by the board.
299
300config SPL_LOAD_BLOCK
301 bool
302 help
303 Support loading images from block devices. This adds a bl_len member
304 to struct spl_load_info.
305
306config SPL_BOOTROM_SUPPORT
307 bool "Support returning to the BOOTROM"
308 select SPL_LOAD_BLOCK if MACH_IMX
309 help
310 Some platforms (e.g. the Rockchip RK3368) provide support in their
311 ROM for loading the next boot-stage after performing basic setup
312 from the SPL stage.
313
314 Enable this option, to return to the BOOTROM through the
315 BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
316 boot device list, if not implemented for a given board)
317
318config SPL_BOOTCOUNT_LIMIT
319 bool "Support bootcount in SPL"
320 depends on SPL_ENV_SUPPORT && !TPL_BOOTCOUNT_LIMIT
321 help
322 On some boards, which use 'falcon' mode, it is necessary to check
323 and increment the number of boot attempts. Such boards do not
324 use proper U-Boot for normal boot flow and hence needs those
325 adjustments to be done in the SPL.
326
327config SPL_RAW_IMAGE_SUPPORT
328 bool "Support SPL loading and booting of RAW images"
329 default n if ARCH_MVEBU
330 default n if (ARCH_MX6 && (SPL_MMC || SPL_SATA))
331 default y
332 depends on !TI_SECURE_DEVICE
333 help
334 SPL will support loading and booting a RAW image when this option
335 is y. If this is not set, SPL will move on to other available
336 boot media to find a suitable image.
337
338config SPL_LEGACY_IMAGE_FORMAT
339 bool "Support SPL loading and booting of Legacy images"
340 default n if ARCH_MVEBU
341 default y if !SPL_LOAD_FIT
342 depends on !TI_SECURE_DEVICE
343 help
344 SPL will support loading and booting Legacy images when this option
345 is y. If this is not set, SPL will move on to other available
346 boot media to find a suitable image.
347
348config SPL_LEGACY_IMAGE_CRC_CHECK
349 bool "Check CRC of Legacy images"
350 depends on SPL_LEGACY_IMAGE_FORMAT
351 select SPL_CRC32
352 help
353 Enable this to check the CRC of Legacy images. While this increases
354 reliability, it affects both code size and boot duration.
355 If disabled, Legacy images are booted if the image magic and size
356 are correct, without further integrity checks.
357
358config SPL_LOAD_IMX_CONTAINER
359 bool "Enable SPL loading and booting of i.MX8 Containers"
360 depends on SPL
361 help
362 Support booting U-Boot from an i.MX8 container image. If you are not
363 using i.MX8, say 'n'.
364
365config IMX_CONTAINER_CFG
366 string "i.MX8 Container config file"
367 depends on SPL && SPL_LOAD_IMX_CONTAINER
368 help
369 Specify the cfg file for generating the container image which will be
370 loaded by SPL.
371
372config SPL_SYS_MALLOC_SIMPLE
373 bool "Only use malloc_simple functions in the SPL"
374 help
375 Say Y here to only use the *_simple malloc functions from
376 malloc_simple.c, rather then using the versions from dlmalloc.c;
377 this will make the SPL binary smaller at the cost of more heap
378 usage as the *_simple malloc functions do not re-use free-ed mem.
379
380config SPL_SHARES_INIT_SP_ADDR
381 bool "SPL and U-Boot use the same initial stack pointer location"
382 depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && SPL_FRAMEWORK
383 default n if ARCH_SUNXI || ARCH_MX6 || ARCH_MX7 || ARCH_SC5XX
384 default y
385 help
386 In many cases, we can use the same initial stack pointer address for
387 both SPL and U-Boot itself. If you need to specify a different address
388 however, say N here and then set a different value in CONFIG_SPL_STACK.
389
390config SPL_STACK
391 hex "Initial stack pointer location"
392 depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && \
393 SPL_FRAMEWORK || ROCKCHIP_RK3036
394 depends on !SPL_SHARES_INIT_SP_ADDR
395 default 0x946bb8 if ARCH_MX7
396 default 0x93ffb8 if ARCH_MX6 && MX6_OCRAM_256KB
397 default 0x91ffb8 if ARCH_MX6 && !MX6_OCRAM_256KB
398 default 0x118000 if MACH_SUN50I_H6
399 default 0x52a00 if MACH_SUN50I_H616
400 default 0x40000 if MACH_SUN8I_R528
401 default 0x54000 if MACH_SUN50I || MACH_SUN50I_H5
402 default 0x18000 if MACH_SUN9I
403 default 0x8000 if ARCH_SUNXI
404 default 0x200E4000 if ARCH_SC5XX && (SC59X_64 || SC59X)
405 default 0x200B0000 if ARCH_SC5XX && SC58X
406 default 0x200D0000 if ARCH_SC5XX && SC57X
407 help
408 Address of the start of the stack SPL will use before SDRAM is
409 initialized.
410
411config SPL_STACK_R
412 bool "Enable SDRAM location for SPL stack"
413 help
414 SPL starts off execution in SRAM and thus typically has only a small
415 stack available. Since SPL sets up DRAM while in its board_init_f()
416 function, it is possible for the stack to move there before
417 board_init_r() is reached. This option enables a special SDRAM
418 location for the SPL stack. U-Boot SPL switches to this after
419 board_init_f() completes, and before board_init_r() starts.
420
421config SPL_STACK_R_ADDR
422 depends on SPL_STACK_R
423 hex "SDRAM location for SPL stack"
424 default 0x82000000 if ARCH_OMAP2PLUS
425 help
426 Specify the address in SDRAM for the SPL stack. This will be set up
427 before board_init_r() is called.
428
429config SPL_STACK_R_MALLOC_SIMPLE_LEN
430 depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
431 hex "Size of malloc_simple heap after switching to DRAM SPL stack"
432 default 0x400000 if ARCH_K3 && ARM64
433 default 0x200000 if ARCH_K3 && CPU_V7R
434 default 0x100000
435 help
436 Specify the amount of the stack to use as memory pool for
437 malloc_simple after switching the stack to DRAM. This may be set
438 to give board_init_r() a larger heap then the initial heap in
439 SRAM which is limited to SYS_MALLOC_F_LEN bytes.
440
441config SPL_SEPARATE_BSS
442 bool "BSS section is in a different memory region from text"
443 help
444 Some platforms need a large BSS region in SPL and can provide this
445 because RAM is already set up. In this case BSS can be moved to RAM.
446 This option should then be enabled so that the correct device tree
447 location is used. Normally we put the device tree at the end of BSS
448 but with this option enabled, it goes at _image_binary_end.
449
450config SPL_SYS_MALLOC
451 bool "Enable malloc pool in SPL"
452 depends on SPL_FRAMEWORK
453
454config SPL_HAS_CUSTOM_MALLOC_START
455 bool "For the SPL malloc pool, define a custom starting address"
456 depends on SPL_SYS_MALLOC
457
458config SPL_CUSTOM_SYS_MALLOC_ADDR
459 hex "SPL malloc addr"
460 depends on SPL_HAS_CUSTOM_MALLOC_START
461
462config SPL_SYS_MALLOC_SIZE
463 hex "Size of the SPL malloc pool"
464 depends on SPL_SYS_MALLOC
465 default 0x180000 if BIOSEMU && RISCV
466 default 0x100000
467
468config SPL_READ_ONLY
469 bool
470 depends on SPL_OF_PLATDATA
471 # Bind cannot be supported because the udevice structs are in read-only
472 # memory so we cannot update the linked lists.
473 select SPL_OF_PLATDATA_NO_BIND
474 select SPL_OF_PLATDATA_RT
475 help
476 Some platforms (e.g. x86 Apollo Lake) load SPL into a read-only
477 section of memory. This means that of-platdata must make a copy (in
478 writeable memory) of anything it wants to modify, such as
479 device-private data.
480
481config SPL_BANNER_PRINT
482 bool "Enable output of the SPL banner 'U-Boot SPL ...'"
483 default y
484 help
485 If this option is enabled, SPL will print the banner with version
486 info. Disabling this option could be useful to reduce SPL boot time
487 (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
488
489config SPL_EARLY_BSS
490 depends on ARM && !ARM64
491 bool "Allows initializing BSS early before entering board_init_f"
492 help
493 On some platform we have sufficient memory available early on to
494 allow setting up and using a basic BSS prior to entering
495 board_init_f. Activating this option will also de-activate the
496 clearing of BSS during the SPL relocation process, thus allowing
497 to carry state from board_init_f to board_init_r by way of BSS.
498
499config SPL_DISPLAY_PRINT
500 bool "Display a board-specific message in SPL"
501 help
502 If this option is enabled, U-Boot will call the function
503 spl_display_print() immediately after displaying the SPL console
504 banner ("U-Boot SPL ..."). This function should be provided by
505 the board.
506
507config SPL_SYS_MMCSD_RAW_MODE
508 bool "Use raw reads to locate the next boot phase"
509 depends on SPL_DM_MMC || SPL_MMC
510 default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
511 ARCH_MX6 || ARCH_MX7 || \
512 ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \
513 ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
514 OMAP54XX || AM33XX || AM43XX || \
515 TARGET_SIFIVE_UNLEASHED || TARGET_SIFIVE_UNMATCHED
516 help
517 Support booting from an MMC without a filesystem.
518
519if SPL_SYS_MMCSD_RAW_MODE
520
521choice
522 prompt "Method for locating next phase of boot (e.g. U-Boot)"
523
524config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
525 bool "MMC raw mode: by sector"
526 select SPL_LOAD_BLOCK
527 help
528 Use sector number for specifying U-Boot location on MMC/SD in
529 raw mode.
530
531config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
532 bool "MMC raw mode: by partition"
533 select SPL_LOAD_BLOCK
534 help
535 Use a partition for loading U-Boot when using MMC/SD in raw mode.
536
537config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
538 bool "MMC raw mode: by partition type"
539 depends on DOS_PARTITION
540 help
541 Use partition type for specifying U-Boot partition on MMC/SD in
542 raw mode. U-Boot will be loaded from the first partition of this
543 type to be found.
544
545endchoice
546
547config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
548 hex "Address on the MMC to load U-Boot from"
549 depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
550 default 0x40 if ARCH_SUNXI
551 default 0x75 if ARCH_DAVINCI
552 default 0x8a if ARCH_MX6 || ARCH_MX7
553 default 0x100 if ARCH_UNIPHIER
554 default 0x0 if ARCH_MVEBU
555 default 0x200 if ARCH_SOCFPGA || ARCH_AT91
556 default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
557 OMAP54XX || AM33XX || AM43XX || ARCH_K3
558 default 0x4000 if ARCH_ROCKCHIP
559 default 0x822 if TARGET_SIFIVE_UNLEASHED || TARGET_SIFIVE_UNMATCHED
560 help
561 Address on the MMC to load U-Boot from, when the MMC is being used
562 in raw mode. Units: MMC sectors (1 sector = 512 bytes).
563
564config SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET
565 hex "U-Boot main hardware partition image offset"
566 depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
567 default 0x10 if ARCH_SUNXI
568 default 0x0
569 help
570 On some platforms SPL location depends on hardware partition. The ROM
571 code skips the MBR sector when loading SPL from main hardware data
572 partition. This adds offset to the main U-Boot image. Set this symbol
573 to the number of skipped sectors.
574
575 If unsure, leave the default.
576
577config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
578 hex "Partition to use to load U-Boot from"
579 depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
580 default 1
581 help
582 Partition on the MMC to load U-Boot from when the MMC is being
583 used in raw mode
584
585config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
586 hex "Partition Type on the MMC to load U-Boot from"
587 depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
588 help
589 Partition Type on the MMC to load U-Boot from, when the MMC is being
590 used in raw mode.
591
592endif # SPL_SYS_MMCSD_RAW_MODE
593
594config SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
595 bool "Override eMMC EXT_CSC_PART_CONFIG by user defined partition"
596 depends on SUPPORT_EMMC_BOOT
597 help
598 eMMC boot partition is normally configured by the bits of the EXT_CSD
599 register (EXT_CSC_PART_CONFIG), BOOT_PARTITION_ENABLE field. In some
600 cases it might be required in SPL to load the image from different
601 partition than the partition selected by EXT_CSC_PART_CONFIG register.
602 Enable this option if you intend to use an eMMC boot partition other
603 then selected via EXT_CSC_PART_CONFIG register and specify the custom
604 partition number by the CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
605 option.
606
607config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
608 int "Number of the eMMC boot partition to use"
609 depends on SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
610 default 1
611 help
612 eMMC boot partition number to use when the eMMC in raw mode and
613 the eMMC EXT_CSC_PART_CONFIG selection should be overridden in SPL
614 by user defined partition number.
615
616config SPL_FIT_IMAGE_TINY
617 bool "Remove functionality from SPL FIT loading to reduce size"
618 depends on SPL_FIT
619 default y if ARCH_IMX8M || ARCH_IMX9 || ARCH_SUNXI
620 help
621 Enable this to reduce the size of the FIT image loading code
622 in SPL, if space for the SPL binary is very tight.
623
624 This skips the recording of each loaded payload
625 (i.e. loadable) into the FDT (modifying the loaded FDT to
626 ensure this information is available to the next image
627 invoked).
628
629config SPL_CACHE
630 bool "Support CACHE drivers"
631 help
632 Enable CACHE drivers in SPL. These drivers can keep data so that
633 future requests for that data can be served faster. Enable this option
634 to build the drivers in drivers/cache as part of an SPL build.
635
636config SPL_CPU
637 bool "Support CPU drivers"
638 help
639 Enable this to support CPU drivers in SPL. These drivers can set
640 up CPUs and provide information about them such as the model and
641 name. This can be useful in SPL since setting up the CPUs earlier
642 may improve boot performance. Enable this option to build the
643 drivers in drivers/cpu as part of an SPL build.
644
645config SPL_CRYPTO
646 bool "Support crypto drivers"
647 help
648 Enable crypto drivers in SPL. These drivers can be used to
649 accelerate secure boot processing in secure applications. Enable
650 this option to build the drivers in drivers/crypto as part of an
651 SPL build.
652
653config SPL_DMA
654 bool "Support DMA drivers"
655 help
656 Enable DMA (direct-memory-access) drivers in SPL. These drivers
657 can be used to handle memory-to-peripheral data transfer without
658 the CPU moving the data. Enable this option to build the drivers
659 in drivers/dma as part of an SPL build.
660
661config SPL_DRIVERS_MISC
662 bool "Support misc drivers"
663 help
664 Enable miscellaneous drivers in SPL. These drivers perform various
665 tasks that don't fall nicely into other categories, Enable this
666 option to build the drivers in drivers/misc as part of an SPL
667 build, for those that support building in SPL (not all drivers do).
668
669config SPL_ENV_SUPPORT
670 bool "Support an environment"
671 help
672 Enable environment support in SPL. The U-Boot environment provides
673 a number of settings (essentially name/value pairs) which can
674 control many aspects of U-Boot's operation. Normally this is not
675 needed in SPL as it has a much simpler task with less
676 configuration. But some boards use this to support 'Falcon' boot
677 on EXT2 and FAT, where SPL boots directly into Linux without
678 starting U-Boot first. Enabling this option will make env_get()
679 and env_set() available in SPL.
680
681config SPL_SAVEENV
682 bool "Support save environment"
683 depends on SPL_ENV_SUPPORT
684 select SPL_MMC_WRITE if ENV_IS_IN_MMC
685 help
686 Enable save environment support in SPL after setenv. By default
687 the saveenv option is not provided in SPL, but some boards need
688 this support in 'Falcon' boot, where SPL need to boot from
689 different images based on environment variable set by OS. For
690 example OS may set "reboot_image" environment variable to
691 "recovery" inorder to boot recovery image by SPL. The SPL read
692 "reboot_image" and act accordingly and change the reboot_image
693 to default mode using setenv and save the environment.
694
695config SPL_ETH
696 bool "Support Ethernet"
697 depends on SPL_ENV_SUPPORT
698 depends on SPL_NET
699 help
700 Enable access to the network subsystem and associated Ethernet
701 drivers in SPL. This permits SPL to load U-Boot over an Ethernet
702 link rather than from an on-board peripheral. Environment support
703 is required since the network stack uses a number of environment
704 variables. See also SPL_NET.
705
706config SPL_FS_EXT4
707 bool "Support EXT filesystems"
708 select SPL_CRC16 if EXT4_WRITE
709 help
710 Enable support for EXT2/3/4 filesystems with SPL. This permits
711 U-Boot (or Linux in Falcon mode) to be loaded from an EXT
712 filesystem from within SPL. Support for the underlying block
713 device (e.g. MMC or USB) must be enabled separately.
714
715config SPL_FS_SQUASHFS
716 bool "Support SquashFS filesystems"
717 select FS_SQUASHFS
718 help
719 Enable support for SquashFS filesystems with SPL. This permits
720 U-Boot (or Linux in Falcon mode) to be loaded from a SquashFS
721 filesystem from within SPL. Support for the underlying block
722 device (e.g. MMC or USB) must be enabled separately.
723
724config SPL_FS_FAT
725 bool "Support FAT filesystems"
726 select FS_FAT
727 help
728 Enable support for FAT and VFAT filesystems with SPL. This
729 permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
730 filesystem from within SPL. Support for the underlying block
731 device (e.g. MMC or USB) must be enabled separately.
732
733config SPL_FS_FAT_DMA_ALIGN
734 bool "Use DMA-aligned buffers with FAT"
735 depends on SPL_FS_FAT
736 select SPL_LOAD_BLOCK
737 default y if SPL_LOAD_FIT
738 help
739 The FAT filesystem driver tries to ensure that the reads it issues to
740 the block subsystem use DMA-aligned buffers. If the supplied buffer is
741 not DMA-aligned, the FAT driver will use a bounce-buffer and read
742 block-by-block. This is separate from the bounce-buffer used by the
743 block subsystem (CONFIG_BOUNCE_BUFFER).
744
745 Enable this config to align buffers passed to the FAT filesystem
746 driver. This will speed up reads, but will increase the size of U-Boot
747 by around 60 bytes.
748
749config SPL_FS_LOAD_PAYLOAD_NAME
750 string "File to load for U-Boot from the filesystem"
751 depends on SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS || SPL_SEMIHOSTING
752 default "tispl.bin" if SYS_K3_SPL_ATF
753 default "u-boot.itb" if SPL_LOAD_FIT
754 default "linux.itb" if SPL_LOAD_FIT_OPENSBI_OS_BOOT
755 default "u-boot.img"
756 help
757 Filename to read to load U-Boot when reading from filesystem.
758
759config SPL_FS_LOAD_KERNEL_NAME
760 string "File to load for the OS kernel from the filesystem"
761 depends on (SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS) && SPL_OS_BOOT
762 default "uImage"
763 help
764 Filename to read to load for the OS kernel when reading from the
765 filesystem.
766
767config SPL_FS_LOAD_ARGS_NAME
768 string "File to load for the OS kernel argument parameters from the filesystem"
769 depends on (SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS) && SPL_OS_BOOT
770 default "args"
771 help
772 Filename to read to load for the OS kernel argument parameters from
773 the filesystem.
774
775config SPL_FAT_WRITE
776 bool "Support write for FAT filesystems"
777 help
778 Enable write support for FAT and VFAT filesystems with SPL.
779 Support for the underlying block device (e.g. MMC or USB) must be
780 enabled separately.
781
782config SPL_FPGA
783 bool "Support FPGAs"
784 help
785 Enable support for FPGAs in SPL. Field-programmable Gate Arrays
786 provide software-configurable hardware which is typically used to
787 implement peripherals (such as UARTs, LCD displays, MMC) or
788 accelerate custom processing functions, such as image processing
789 or machine learning. Sometimes it is useful to program the FPGA
790 as early as possible during boot, and this option can enable that
791 within SPL.
792
793config SPL_GPIO
794 bool "Support GPIO in SPL"
795 help
796 Enable support for GPIOs (General-purpose Input/Output) in SPL.
797 GPIOs allow U-Boot to read the state of an input line (high or
798 low) and set the state of an output line. This can be used to
799 drive LEDs, control power to various system parts and read user
800 input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED,
801 for example. Enable this option to build the drivers in
802 drivers/gpio as part of an SPL build.
803
804config SPL_I2C
805 bool "Support I2C"
806 help
807 Enable support for the I2C (Inter-Integrated Circuit) bus in SPL.
808 I2C works with a clock and data line which can be driven by a
809 one or more masters or slaves. It is a fairly complex bus but is
810 widely used as it only needs two lines for communication. Speeds of
811 400kbps are typical but up to 3.4Mbps is supported by some
812 hardware. I2C can be useful in SPL to configure power management
813 ICs (PMICs) before raising the CPU clock speed, for example.
814 Enable this option to build the drivers in drivers/i2c as part of
815 an SPL build.
816
817config SPL_LIBCOMMON_SUPPORT
818 bool "Support common libraries"
819 help
820 Enable support for common U-Boot libraries within SPL. These
821 libraries include common code to deal with U-Boot images,
822 environment and USB, for example. This option is enabled on many
823 boards. Enable this option to build the code in common/ as part of
824 an SPL build.
825
826config SPL_LIBDISK_SUPPORT
827 bool "Support disk partitions"
828 select PARTITIONS
829 help
830 Enable support for disk partitions within SPL. 'Disk' is something
831 of a misnomer as it includes non-spinning media such as flash (as
832 used in MMC and USB sticks). Partitions provide a way for a disk
833 to be split up into separate regions, with a partition table placed
834 at the start or end which describes the location and size of each
835 'partition'. These partitions are typically uses as individual block
836 devices, typically with an EXT2 or FAT filesystem in each. This
837 option enables whatever partition support has been enabled in
838 U-Boot to also be used in SPL. It brings in the code in disk/.
839
840config SPL_LIBGENERIC_SUPPORT
841 bool "Support generic libraries"
842 help
843 Enable support for generic U-Boot libraries within SPL. These
844 libraries include generic code to deal with device tree, hashing,
845 printf(), compression and the like. This option is enabled on many
846 boards. Enable this option to build the code in lib/ as part of an
847 SPL build.
848
849config SPL_DM_MAILBOX
850 bool "Support Mailbox"
851 depends on SPL_DM
852 help
853 Enable support for Mailbox within SPL. This enable the inter
854 processor communication protocols tobe used within SPL. Enable
855 this option to build the drivers in drivers/mailbox as part of
856 SPL build.
857
858config SPL_MEMORY
859 bool "Support Memory controller drivers"
860 help
861 Enable support for Memory Controller drivers within SPL.
862 These devices provide Memory bus interface to various devices like
863 SRAM, Ethernet adapters, FPGAs, etc.
864
865config SPL_MMC
866 bool "Support MMC"
867 depends on MMC
868 help
869 Enable support for MMC (Multimedia Card) within SPL. This enables
870 the MMC protocol implementation and allows any enabled drivers to
871 be used within SPL. MMC can be used with or without disk partition
872 support depending on the application (SPL_LIBDISK_SUPPORT). Enable
873 this option to build the drivers in drivers/mmc as part of an SPL
874 build.
875
876config SYS_MMCSD_FS_BOOT
877 bool "MMC FS Boot mode"
878 depends on SPL_MMC
879 default y if !ARCH_MVEBU
880 help
881 Enable MMC FS Boot mode. Partition is selected by option
882 SYS_MMCSD_FS_BOOT_PARTITION.
883
884config SYS_MMCSD_FS_BOOT_PARTITION
885 int "MMC Boot Partition"
886 depends on SYS_MMCSD_FS_BOOT
887 default 1
888 help
889 Partition on the MMC to load U-Boot from when the MMC is being
890 used in fs mode.
891 Use -1 as a special value to use the first bootable partition.
892
893config SPL_MMC_TINY
894 bool "Tiny MMC framework in SPL"
895 depends on SPL_MMC
896 help
897 Enable MMC framework tinification support. This option is useful if
898 if your SPL is extremely size constrained. Heed the warning, enable
899 this option if and only if you know exactly what you are doing, if
900 you are reading this help text, you most likely have no idea :-)
901
902 The MMC framework is reduced to bare minimum to be useful. No malloc
903 support is needed for the MMC framework operation with this option
904 enabled. The framework supports exactly one MMC device and exactly
905 one MMC driver. The MMC driver can be adjusted to avoid any malloc
906 operations too, which can remove the need for malloc support in SPL
907 and thus further reduce footprint.
908
909config SPL_MMC_WRITE
910 bool "MMC/SD/SDIO card support for write operations in SPL"
911 depends on SPL_MMC
912 help
913 Enable write access to MMC and SD Cards in SPL
914
915
916config SPL_MPC8XXX_INIT_DDR
917 bool "Support MPC8XXX DDR init"
918 help
919 Enable support for DDR-SDRAM (double-data-rate synchronous dynamic
920 random-access memory) on the MPC8XXX family within SPL. This
921 allows DRAM to be set up before loading U-Boot into that DRAM,
922 where it can run.
923
924config SPL_MTD
925 bool "Support MTD drivers"
926 help
927 Enable support for MTD (Memory Technology Device) within SPL. MTD
928 provides a block interface over raw NAND and can also be used with
929 SPI flash. This allows SPL to load U-Boot from supported MTD
930 devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how
931 to enable specific MTD drivers.
932
933config SPL_MUSB_NEW
934 bool "Support new Mentor Graphics USB"
935 help
936 Enable support for Mentor Graphics USB in SPL. This is a new
937 driver used by some boards. Enable this option to build
938 the drivers in drivers/usb/musb-new as part of an SPL build. The
939 old drivers are in drivers/usb/musb.
940
941config SPL_NAND_SUPPORT
942 bool "Support NAND flash"
943 select SPL_LOAD_BLOCK
944 help
945 Enable support for NAND (Negative AND) flash in SPL. NAND flash
946 can be used to allow SPL to load U-Boot from supported devices.
947 This enables the drivers in drivers/mtd/nand/raw as part of an SPL
948 build.
949
950config SPL_NAND_RAW_ONLY
951 bool "Support to boot only raw u-boot.bin images"
952 depends on SPL_NAND_SUPPORT
953 help
954 Use this only if you need to save space.
955
956config SPL_NAND_DRIVERS
957 bool "Use standard NAND driver"
958 help
959 SPL uses normal NAND drivers, not minimal drivers.
960
961config SPL_NAND_ECC
962 bool "Include standard ECC in SPL"
963
964config SPL_NAND_SOFTECC
965 bool "Use software ECC in SPL"
966 depends on SPL_NAND_ECC
967
968config SPL_NAND_SIMPLE
969 bool "Support simple NAND drivers in SPL"
970 help
971 Support for NAND boot using simple NAND drivers that
972 expose the cmd_ctrl() interface.
973
974config SPL_NAND_BASE
975 depends on SPL_NAND_SUPPORT
976 bool "Use Base NAND Driver"
977 help
978 Include nand_base.c in the SPL.
979
980config SPL_NAND_IDENT
981 depends on SPL_NAND_BASE
982 bool "Use chip ID to identify NAND flash"
983 help
984 SPL uses the chip ID list to identify the NAND flash.
985
986config SPL_RELOC_LOADER
987 bool "Allow relocating the next phase"
988 help
989 In some cases multiple U-Boot phases need to run in SRAM, typically
990 at the same address. Enable this to support loading the next phase
991 to temporary memory, then copying it into place afterwards, then
992 jumping to it.
993
994config SPL_UBI
995 bool "Support UBI"
996 help
997 Enable support for loading payloads from UBI. See
998 README.ubispl for more info.
999
1000menu "UBI configuration for SPL"
1001 depends on SPL_UBI
1002
1003config SPL_UBI_LOAD_BY_VOLNAME
1004 bool "Support loading volumes by name"
1005 help
1006 This enables support for loading UBI volumes by name. When this
1007 is set, CONFIG_SPL_UBI_LOAD_MONITOR_VOLNAME can be used to
1008 configure the volume name from which to load U-Boot.
1009
1010config SPL_UBI_MAX_VOL_LEBS
1011 int "Maximum number of LEBs per volume"
1012 help
1013 The maximum number of logical eraseblocks which a static volume
1014 to load can contain. Used for sizing the scan data structure.
1015
1016config SPL_UBI_MAX_PEB_SIZE
1017 int "Maximum PEB size"
1018 help
1019 The maximum physical erase block size.
1020
1021config SPL_UBI_MAX_PEBS
1022 int "Maximum number of PEBs"
1023 help
1024 The maximum physical erase block size. If not overridden by
1025 board code, this value will be used as the actual number of PEBs.
1026
1027config SPL_UBI_PEB_OFFSET
1028 int "Offset to first UBI PEB"
1029 help
1030 The offset in number of PEBs from the start of flash to the first
1031 PEB part of the UBI image.
1032
1033config SPL_UBI_VID_OFFSET
1034 int "Offset to VID header"
1035
1036config SPL_UBI_LEB_START
1037 int "Offset to LEB in PEB"
1038 help
1039 The offset in bytes to the LEB within a PEB.
1040
1041config SPL_UBI_INFO_ADDR
1042 hex "Address to place UBI scan info"
1043 help
1044 Address for ubispl to place the scan info. Read README.ubispl to
1045 determine the required size
1046
1047config SPL_UBI_VOL_IDS
1048 int "Maximum volume id"
1049 help
1050 The maximum volume id which can be loaded. Used for sizing the
1051 scan data structure.
1052
1053config SPL_UBI_LOAD_MONITOR_ID
1054 int "id of U-Boot volume"
1055 help
1056 The UBI volume id from which to load U-Boot
1057
1058config SPL_UBI_LOAD_MONITOR_VOLNAME
1059 string "volume name of U-Boot volume"
1060 depends on SPL_UBI_LOAD_BY_VOLNAME
1061 help
1062 The UBI volume name from which to load U-Boot
1063
1064config SPL_UBI_LOAD_KERNEL_ID
1065 int "id of kernel volume"
1066 depends on SPL_OS_BOOT
1067 help
1068 The UBI volume id from which to load the kernel
1069
1070config SPL_UBI_LOAD_ARGS_ID
1071 int "id of kernel args volume"
1072 depends on SPL_OS_BOOT
1073 help
1074 The UBI volume id from which to load the device tree
1075
1076config UBI_SPL_SILENCE_MSG
1077 bool "silence UBI SPL messages"
1078 help
1079 Disable messages from UBI SPL. This leaves warnings
1080 and errors enabled.
1081
1082endmenu
1083
1084config SPL_DM_SPI
1085 bool "Support SPI DM drivers in SPL"
1086 depends on SPL_DM
1087 help
1088 Enable support for SPI DM drivers in SPL.
1089
1090config SPL_DM_SPI_FLASH
1091 bool "Support SPI DM FLASH drivers in SPL"
1092 depends on SPL_DM
1093 help
1094 Enable support for SPI DM flash drivers in SPL.
1095
1096config SPL_NET
1097 bool "Support networking"
1098 depends on !NET_LWIP
1099 help
1100 Enable support for network devices (such as Ethernet) in SPL.
1101 This permits SPL to load U-Boot over a network link rather than
1102 from an on-board peripheral. Environment support is required since
1103 the network stack uses a number of environment variables. See also
1104 SPL_ETH.
1105
1106config SPL_NET_VCI_STRING
1107 string "BOOTP Vendor Class Identifier string sent by SPL"
1108 depends on SPL_NET
1109 help
1110 As defined by RFC 2132 the vendor class identifier field can be
1111 sent by the client to identify the vendor type and configuration
1112 of a client. This is often used in practice to allow for the DHCP
1113 server to specify different files to load depending on if the ROM,
1114 SPL or U-Boot itself makes the request
1115
1116config SPL_NO_CPU_SUPPORT
1117 def_bool y
1118 depends on (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
1119 help
1120 This is specific to the ARM926EJ-S CPU. It disables the standard
1121 start.S start-up code, presumably so that a replacement can be
1122 used on that CPU. You should not enable it unless you know what
1123 you are doing.
1124
1125config SPL_NOR_SUPPORT
1126 bool "Support NOR flash"
1127 help
1128 Enable support for loading U-Boot from memory-mapped NOR (Negative
1129 OR) flash in SPL. NOR flash is slow to write but fast to read, and
1130 a memory-mapped device makes it very easy to access. Loading from
1131 NOR is typically achieved with just a memcpy().
1132
1133config SPL_XIP_SUPPORT
1134 bool "Support XIP"
1135 help
1136 Enable support for execute in place of U-Boot or kernel image. There
1137 is no need to copy image from flash to ram if flash supports execute
1138 in place. Its very useful in systems having enough flash but not
1139 enough ram to load the image.
1140
1141config SPL_ONENAND_SUPPORT
1142 bool "Support OneNAND flash"
1143 help
1144 Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
1145 a type of NAND flash and therefore can be used to allow SPL to
1146 load U-Boot from supported devices. This enables the drivers in
1147 drivers/mtd/onenand as part of an SPL build.
1148
1149config SPL_OS_BOOT
1150 bool "Activate Falcon Mode"
1151 depends on !TI_SECURE_DEVICE
1152 help
1153 Enable booting directly to an OS from SPL.
1154 for more info read doc/README.falcon
1155
1156config SPL_PAYLOAD_ARGS_ADDR
1157 hex "Address in memory to load 'args' file for Falcon Mode to"
1158 depends on SPL_OS_BOOT || SPL_LOAD_FIT_OPENSBI_OS_BOOT
1159 default 0x88000000 if ARCH_OMAP2PLUS
1160 default 0x99000000 if ARCH_SC5XX && SC59X_64
1161 default 0xA0000000 if ARCH_SC5XX && TARGET_SC594_SOM_EZKIT
1162 default 0x80000000 if ARCH_SC5XX && TARGET_SC594_SOM_EZLITE
1163 help
1164 Address in memory where the 'args' file, typically a device tree
1165 will be loaded in to memory.
1166
1167config SYS_NAND_SPL_KERNEL_OFFS
1168 hex "Address in memory to load the OS file for Falcon mode to"
1169 depends on SPL_OS_BOOT && SPL_NAND_SUPPORT
1170
1171config SYS_OS_BASE
1172 hex "addr, where OS is found"
1173 depends on SPL_OS_BOOT && SPL_NOR_SUPPORT
1174 help
1175 Specify the address, where the OS image is found, which
1176 gets booted.
1177
1178config SPL_FALCON_BOOT_MMCSD
1179 bool "Enable Falcon boot from MMC or SD media"
1180 depends on SPL_OS_BOOT && SPL_MMC
1181 select SPL_LOAD_BLOCK
1182 select SPL_SYS_MMCSD_RAW_MODE
1183 help
1184 Select this if the Falcon mode OS image mode is on MMC or SD media.
1185
1186config SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
1187 hex "Falcon mode: Sector to load kernel uImage from MMC"
1188 depends on SPL_FALCON_BOOT_MMCSD
1189 help
1190 When Falcon mode is used with an MMC or SD media, SPL needs to know
1191 where to look for the kernel uImage. The image is expected to begin
1192 at the raw MMC specified in this config.
1193 Note that the Falcon mode image can also be a FIT, if FIT support is
1194 enabled.
1195
1196config SYS_MMCSD_RAW_MODE_ARGS_SECTOR
1197 hex "Falcon mode: Sector to load 'args' from MMC"
1198 depends on SPL_FALCON_BOOT_MMCSD
1199 help
1200 When Falcon mode is used with an MMC or SD media, SPL needs to know
1201 where to look for the OS 'args', typically a device tree. The
1202 contents are expected to begin at the raw MMC specified in this config.
1203 Note that if using a FIT image, this and the next option can be set to
1204 0x0.
1205
1206config SYS_MMCSD_RAW_MODE_ARGS_SECTORS
1207 hex "Falcon mode: Number of sectors to load for 'args' from MMC"
1208 depends on SPL_FALCON_BOOT_MMCSD && SYS_MMCSD_RAW_MODE_ARGS_SECTOR != 0x0
1209
1210config SPL_PAYLOAD
1211 string "SPL payload"
1212 default "tpl/u-boot-with-tpl.bin" if TPL
1213 default "u-boot.bin"
1214 help
1215 Payload for SPL boot. For backward compatibility, default to
1216 u-boot.bin, i.e. RAW image without any header. In case of
1217 TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
1218 use u-boot.img.
1219
1220config SPL_PCI
1221 bool "Support PCI drivers"
1222 help
1223 Enable support for PCI in SPL. For platforms that need PCI to boot,
1224 or must perform some init using PCI in SPL, this provides the
1225 necessary driver support. This enables the drivers in drivers/pci
1226 as part of an SPL build.
1227
1228config SPL_PCH
1229 bool "Support PCH drivers"
1230 help
1231 Enable support for PCH (Platform Controller Hub) devices in SPL.
1232 These are used to set up GPIOs and the SPI peripheral early in
1233 boot. This enables the drivers in drivers/pch as part of an SPL
1234 build.
1235
1236config SPL_POST_MEM_SUPPORT
1237 bool "Support POST drivers"
1238 help
1239 Enable support for POST (Power-on Self Test) in SPL. POST is a
1240 procedure that checks that the hardware (CPU or board) appears to
1241 be functionally correctly. It is a sanity check that can be
1242 performed before booting. This enables the drivers in post/drivers
1243 as part of an SPL build.
1244
1245config SPL_DM_RESET
1246 bool "Support reset drivers"
1247 depends on SPL_DM
1248 help
1249 Enable support for reset control in SPL.
1250 That can be useful in SPL to handle IP reset in driver, as in U-Boot,
1251 by using the generic reset API provided by driver model.
1252 This enables the drivers in drivers/reset as part of an SPL build.
1253
1254config SPL_POWER
1255 bool "Support power drivers"
1256 help
1257 Enable support for power control in SPL. This includes support
1258 for PMICs (Power-management Integrated Circuits) and some of the
1259 features provided by PMICs. In particular, voltage regulators can
1260 be used to enable/disable power and vary its voltage. That can be
1261 useful in SPL to turn on boot peripherals and adjust CPU voltage
1262 so that the clock speed can be increased. This enables the drivers
1263 in drivers/power, drivers/power/pmic and drivers/power/regulator
1264 as part of an SPL build.
1265
1266config SPL_POWER_DOMAIN
1267 bool "Support power domain drivers"
1268 select SPL_POWER
1269 help
1270 Enable support for power domain control in SPL. Many SoCs allow
1271 power to be applied to or removed from portions of the SoC (power
1272 domains). This may be used to save power. This API provides the
1273 means to control such power management hardware. This enables
1274 the drivers in drivers/power/domain as part of a SPL build.
1275
1276config SPL_RAM_SUPPORT
1277 bool
1278
1279config SPL_RAM_DEVICE
1280 bool "Support booting from preloaded image in RAM"
1281 select SPL_RAM_SUPPORT
1282 default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
1283 help
1284 Enable booting of an image already loaded in RAM. The image has to
1285 be already in memory when SPL takes over, e.g. loaded by the boot
1286 ROM.
1287
1288config SPL_REMOTEPROC
1289 bool "Support REMOTEPROCS"
1290 help
1291 Enable support for REMOTEPROCs in SPL. This permits to load
1292 a remote processor firmware in SPL.
1293
1294config SPL_RTC
1295 bool "Support RTC drivers"
1296 help
1297 Enable RTC (Real-time Clock) support in SPL. This includes support
1298 for reading and setting the time. Some RTC devices also have some
1299 non-volatile (battery-backed) memory which is accessible if
1300 needed. This enables the drivers in drivers/rtc as part of an SPL
1301 build.
1302
1303config SPL_SATA
1304 bool "Support loading from SATA"
1305 help
1306 Enable support for SATA (Serial AT attachment) in SPL. This allows
1307 use of SATA devices such as hard drives and flash drivers for
1308 loading U-Boot. SATA is used in higher-end embedded systems and
1309 can provide higher performance than MMC , at somewhat higher
1310 expense and power consumption. This enables loading from SATA
1311 using a configured device.
1312
1313config SYS_SATA_FAT_BOOT_PARTITION
1314 int "Partition on the SATA disk to load U-Boot from"
1315 depends on SPL_SATA && SPL_FS_FAT
1316 default 1
1317
1318config SPL_SATA_RAW_U_BOOT_USE_SECTOR
1319 bool "SATA raw mode: by sector"
1320 depends on SPL_SATA
1321 default y if ARCH_MVEBU
1322 help
1323 Use sector number for specifying U-Boot location on SATA disk in
1324 raw mode.
1325
1326config SPL_SATA_RAW_U_BOOT_SECTOR
1327 hex "Sector on the SATA disk to load U-Boot from"
1328 depends on SPL_SATA_RAW_U_BOOT_USE_SECTOR
1329 default 0x1 if ARCH_MVEBU
1330 help
1331 Sector on the SATA disk to load U-Boot from, when the SATA disk is being
1332 used in raw mode. Units: SATA disk sectors (1 sector = 512 bytes).
1333
1334config SPL_NVME
1335 bool "NVM Express device support"
1336 depends on SPL_BLK
1337 select FS_LOADER
1338 select SPL_BLK_FS
1339 help
1340 This option enables support for NVM Express devices.
1341 It supports basic functions of NVMe (read/write).
1342
1343config SPL_NVME_PCI
1344 bool "NVM Express PCI device support for SPL"
1345 depends on SPL_PCI && SPL_NVME
1346 help
1347 This option enables support for NVM Express PCI devices.
1348 This allows use of NVMe devices for loading u-boot.
1349
1350config SPL_NVME_BOOT_DEVICE
1351 hex "NVMe boot device number"
1352 depends on SPL_NVME
1353 default 0x0
1354
1355config SYS_NVME_BOOT_PARTITION
1356 hex "NVMe boot partition number"
1357 depends on SPL_NVME
1358 default 0x1
1359
1360config SPL_SERIAL
1361 bool "Support serial"
1362 select SPL_PRINTF
1363 select SPL_STRTO
1364 help
1365 Enable support for serial in SPL. This allows use of a serial UART
1366 for displaying messages while SPL is running. It also brings in
1367 printf() and panic() functions. This should normally be enabled
1368 unless there are space reasons not to. Even then, consider
1369 enabling SPL_USE_TINY_PRINTF which is a small printf() version.
1370
1371config SPL_SPI
1372 bool "Support SPI drivers"
1373 help
1374 Enable support for using SPI in SPL. This is used for connecting
1375 to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
1376 more details on that. The SPI driver provides the transport for
1377 data between the SPI flash and the CPU. This option can be used to
1378 enable SPI drivers that are needed for other purposes also, such
1379 as a SPI PMIC.
1380
1381config SPL_SPI_FLASH_SUPPORT
1382 bool "Support SPI flash drivers"
1383 depends on SPL_SPI
1384 help
1385 Enable support for using SPI flash in SPL, and loading U-Boot from
1386 SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
1387 the SPI bus that is used to connect it to a system. It is a simple
1388 but fast bidirectional 4-wire bus (clock, chip select and two data
1389 lines). This enables the drivers in drivers/mtd/spi as part of an
1390 SPL build. This normally requires SPL_SPI.
1391
1392if SPL_SPI_FLASH_SUPPORT
1393
1394config SPL_SPI_FLASH_TINY
1395 bool "Enable low footprint SPL SPI Flash support"
1396 depends on !SPI_FLASH_BAR
1397 default y if SPI_FLASH
1398 help
1399 Enable lightweight SPL SPI Flash support that supports just reading
1400 data/images from flash. No support to write/erase flash. Enable
1401 this if you have SPL size limitations and don't need full
1402 fledged SPI flash support.
1403
1404config SPL_SPI_FLASH_SFDP_SUPPORT
1405 bool "SFDP table parsing support for SPI NOR flashes"
1406 depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
1407 help
1408 Enable support for parsing and auto discovery of parameters for
1409 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
1410 tables as per JESD216 standard in SPL.
1411
1412config SPL_SPI_FLASH_MTD
1413 bool "Support for SPI flash MTD drivers in SPL"
1414 help
1415 Enable support for SPI flash MTD drivers in SPL.
1416
1417config SPL_SPI_LOAD
1418 bool "Support loading from SPI flash"
1419 help
1420 Enable support for loading next stage, U-Boot or otherwise, from
1421 SPI NOR in U-Boot SPL.
1422
1423endif # SPL_SPI_FLASH_SUPPORT
1424
1425config SYS_SPI_U_BOOT_OFFS
1426 hex "address of u-boot payload in SPI flash"
1427 default 0x8000 if ARCH_SUNXI
1428 default 0x0
1429 depends on SPL_SPI_LOAD || SPL_SPI_SUNXI
1430 help
1431 Address within SPI-Flash from where the u-boot payload is fetched
1432 from.
1433
1434config SPL_THERMAL
1435 bool "Driver support for thermal devices"
1436 help
1437 Enable support for temperature-sensing devices. Some SoCs have on-chip
1438 temperature sensors to permit warnings, speed throttling or even
1439 automatic power-off when the temperature gets too high or low. Other
1440 devices may be discrete but connected on a suitable bus.
1441
1442config SPL_WATCHDOG
1443 bool "Support watchdog drivers"
1444 imply SPL_WDT if !HW_WATCHDOG
1445 help
1446 Enable support for watchdog drivers in SPL. A watchdog is
1447 typically a hardware peripheral which can reset the system when it
1448 detects no activity for a while (such as a software crash). This
1449 enables the drivers in drivers/watchdog as part of an SPL build.
1450
1451config SPL_YMODEM_SUPPORT
1452 bool "Support loading using Ymodem"
1453 depends on SPL_SERIAL
1454 help
1455 While loading from serial is slow it can be a useful backup when
1456 there is no other option. The Ymodem protocol provides a reliable
1457 means of transmitting U-Boot over a serial line for using in SPL,
1458 with a checksum to ensure correctness.
1459
1460config SPL_ATF
1461 bool "Support ARM Trusted Firmware"
1462 depends on ARM64
1463 depends on SPL_LOAD_FIT && !SPL_FIT_IMAGE_TINY
1464 help
1465 ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
1466 is loaded by SPL (which is considered as BL2 in ATF terminology).
1467 More detail at: https://github.com/TrustedFirmware-A/trusted-firmware-a
1468
1469config SPL_ATF_LOAD_IMAGE_V2
1470 bool "Use the new LOAD_IMAGE_V2 parameter passing"
1471 depends on SPL_ATF
1472 help
1473 Some platforms use the newer LOAD_IMAGE_V2 parameter passing.
1474
1475 If you want to load a bl31 image from the SPL and need the new
1476 method, say Y.
1477
1478config SPL_ATF_NO_PLATFORM_PARAM
1479 bool "Pass no platform parameter"
1480 depends on SPL_ATF
1481 help
1482 While we expect to call a pointer to a valid FDT (or NULL)
1483 as the platform parameter to an ATF, some ATF versions are
1484 not U-Boot aware and have an insufficiently robust parameter
1485 validation to gracefully reject a FDT being passed.
1486
1487 If this option is enabled, the spl_atf os-type handler will
1488 always pass NULL for the platform parameter.
1489
1490 If your ATF is affected, say Y.
1491
1492config SPL_AM33XX_ENABLE_RTC32K_OSC
1493 bool "Enable the RTC32K OSC on AM33xx based platforms"
1494 depends on AM33XX
1495 default y if AM33XX
1496 help
1497 Enable access to the AM33xx RTC and select the external 32kHz clock
1498 source.
1499
1500config SPL_OPTEE_IMAGE
1501 bool "Support OP-TEE Trusted OS image in SPL"
1502 depends on ARM
1503 depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
1504 help
1505 OP-TEE is an open source Trusted OS which is loaded by SPL.
1506 More detail at: https://github.com/OP-TEE/optee_os
1507
1508config SPL_OPENSBI
1509 bool "Support RISC-V OpenSBI"
1510 depends on RISCV && SPL_RISCV_MMODE && RISCV_SMODE
1511 depends on SPL_LOAD_FIT && !SPL_FIT_IMAGE_TINY
1512 help
1513 OpenSBI is an open-source implementation of the RISC-V Supervisor Binary
1514 Interface (SBI) specification. U-Boot supports the OpenSBI FW_DYNAMIC
1515 firmware. It is loaded and started by U-Boot SPL.
1516
1517 More details are available at https://github.com/riscv/opensbi and
1518 https://github.com/riscv/riscv-sbi-doc
1519
1520config SPL_OPENSBI_LOAD_ADDR
1521 hex "OpenSBI load address"
1522 depends on SPL_OPENSBI
1523 help
1524 Load address of the OpenSBI binary.
1525
1526config SPL_OPENSBI_SCRATCH_OPTIONS
1527 hex "Scratch options passed to OpenSBI"
1528 default 0x1
1529 depends on SPL_OPENSBI
1530 help
1531 This bitmap of options is passed from U-Boot SPL to OpenSBI.
1532 As of OpenSBI 1.3 the following bits are defined:
1533 - SBI_SCRATCH_NO_BOOT_PRINTS = 0x1 (Disable prints during boot)
1534 - SBI_SCRATCH_DEBUG_PRINTS = 0x2 (Enable runtime debug prints)
1535
1536config SPL_TARGET
1537 string "Addtional build targets for 'make'"
1538 default "spl/u-boot-spl.srec" if RCAR_GEN2
1539 default "spl/u-boot-spl.scif" if RCAR_GEN3
1540 default ""
1541 help
1542 On some platforms we need to have 'make' run additional build target
1543 rules. If required on your platform, enter it here, otherwise leave blank.
1544
1545
1546config SPL_AT91_MCK_BYPASS
1547 bool "Use external clock signal as a source of main clock for AT91 platforms"
1548 depends on ARCH_AT91
1549 help
1550 Use external 8 to 24 Mhz clock signal as source of main clock instead
1551 of an external crystal oscillator.
1552 This option disables the internal driving on the XOUT pin.
1553 The external source has to provide a stable clock on the XIN pin.
1554 If this option is disabled, the SoC expects a crystal oscillator
1555 that needs driving on both XIN and XOUT lines.
1556endmenu
1557
1558config TPL
1559 depends on SUPPORT_TPL
1560 bool "Enable TPL"
1561 help
1562 If you want to build TPL as well as the normal image and SPL, say Y.
1563
1564source "common/spl/Kconfig.tpl"
1565
1566config VPL
1567 depends on SUPPORT_SPL
1568 bool "Enable VPL"
1569 help
1570 If you want to build VPL as well as the normal image, TPL and SPL,
1571 say Y.
1572
1573source "common/spl/Kconfig.vpl"