xref: /openbmc/u-boot/common/spl/Kconfig (revision b8233483)
1menu "SPL / TPL"
2
3config SUPPORT_SPL
4	bool
5
6config SUPPORT_TPL
7	bool
8
9config SPL_DFU_NO_RESET
10	bool
11
12config SPL
13	bool
14	depends on SUPPORT_SPL
15	prompt "Enable SPL"
16	help
17	  If you want to build SPL as well as the normal image, say Y.
18
19config SPL_FRAMEWORK
20	bool "Support SPL based upon the common SPL framework"
21	depends on SPL
22	default y
23	help
24	  Enable the SPL framework under common/spl/.  This framework
25	  supports MMC, NAND and YMODEM and other methods loading of U-Boot
26	  and the Linux Kernel.  If unsure, say Y.
27
28config HANDOFF
29	bool "Pass hand-off information from SPL to U-Boot proper"
30	depends on BLOBLIST
31	help
32	  It is useful to be able to pass information from SPL to U-Boot
33	  proper to preserve state that is known in SPL and is needed in U-Boot.
34	  Enable this to locate the handoff information in U-Boot proper, early
35	  in boot. It is available in gd->handoff. The state state is set up
36	  in SPL (or TPL if that is being used).
37
38if SPL
39
40config SPL_TINY
41	bool "Minilize the SPL size"
42	depends on ASPEED_AST2600
43	help
44	  This option can minilize the SPL size to compatible with AST2600-A0
45	  secure boot.
46
47config SPL_HANDOFF
48	bool "Pass hand-off information from SPL to U-Boot proper"
49	depends on HANDOFF
50	default y
51	help
52	  This option enables SPL to write handoff information. This can be
53	  used to pass information like the size of SDRAM from SPL to U-Boot
54	  proper. Also SPL can receive information from TPL in the same place
55	  if that is enabled.
56
57config SPL_LDSCRIPT
58	string "Linker script for the SPL stage"
59	default "arch/$(ARCH)/cpu/u-boot-spl.lds"
60	help
61	  The SPL stage will usually require a different linker-script
62	  (as it runs from a different memory region) than the regular
63	  U-Boot stage.	 Set this to the path of the linker-script to
64	  be used for SPL.
65
66config SPL_BOARD_INIT
67	bool "Call board-specific initialization in SPL"
68	help
69	  If this option is enabled, U-Boot will call the function
70	  spl_board_init() from board_init_r(). This function should be
71	  provided by the board.
72
73config SPL_BOOTROM_SUPPORT
74        bool "Support returning to the BOOTROM"
75	help
76	  Some platforms (e.g. the Rockchip RK3368) provide support in their
77	  ROM for loading the next boot-stage after performing basic setup
78	  from the SPL stage.
79
80	  Enable this option, to return to the BOOTROM through the
81	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
82	  boot device list, if not implemented for a given board)
83
84config SPL_BOOTCOUNT_LIMIT
85	bool "Support bootcount in SPL"
86	depends on SPL_ENV_SUPPORT
87	help
88	  On some boards, which use 'falcon' mode, it is necessary to check
89	  and increment the number of boot attempts. Such boards do not
90	  use proper U-Boot for normal boot flow and hence needs those
91	  adjustments to be done in the SPL.
92
93config SPL_RAW_IMAGE_SUPPORT
94	bool "Support SPL loading and booting of RAW images"
95	default n if (ARCH_MX6 && (SPL_MMC_SUPPORT || SPL_SATA_SUPPORT))
96	default y if !TI_SECURE_DEVICE
97	help
98	  SPL will support loading and booting a RAW image when this option
99	  is y. If this is not set, SPL will move on to other available
100	  boot media to find a suitable image.
101
102config SPL_LEGACY_IMAGE_SUPPORT
103	bool "Support SPL loading and booting of Legacy images"
104	default y if !TI_SECURE_DEVICE
105	help
106	  SPL will support loading and booting Legacy images when this option
107	  is y. If this is not set, SPL will move on to other available
108	  boot media to find a suitable image.
109
110config SPL_LEGACY_IMAGE_CRC_CHECK
111	bool "Check CRC of Legacy images"
112	depends on SPL_LEGACY_IMAGE_SUPPORT
113	select SPL_CRC32_SUPPORT
114	help
115	  Enable this to check the CRC of Legacy images. While this increases
116	  reliability, it affects both code size and boot duration.
117	  If disabled, Legacy images are booted if the image magic and size
118	  are correct, without further integrity checks.
119
120config SPL_SYS_MALLOC_SIMPLE
121	bool
122	prompt "Only use malloc_simple functions in the SPL"
123	help
124	  Say Y here to only use the *_simple malloc functions from
125	  malloc_simple.c, rather then using the versions from dlmalloc.c;
126	  this will make the SPL binary smaller at the cost of more heap
127	  usage as the *_simple malloc functions do not re-use free-ed mem.
128
129config TPL_SYS_MALLOC_SIMPLE
130	bool
131	prompt "Only use malloc_simple functions in the TPL"
132	help
133	  Say Y here to only use the *_simple malloc functions from
134	  malloc_simple.c, rather then using the versions from dlmalloc.c;
135	  this will make the TPL binary smaller at the cost of more heap
136	  usage as the *_simple malloc functions do not re-use free-ed mem.
137
138config SPL_STACK_R
139	bool "Enable SDRAM location for SPL stack"
140	help
141	  SPL starts off execution in SRAM and thus typically has only a small
142	  stack available. Since SPL sets up DRAM while in its board_init_f()
143	  function, it is possible for the stack to move there before
144	  board_init_r() is reached. This option enables a special SDRAM
145	  location for the SPL stack. U-Boot SPL switches to this after
146	  board_init_f() completes, and before board_init_r() starts.
147
148config SPL_STACK_R_ADDR
149	depends on SPL_STACK_R
150	hex "SDRAM location for SPL stack"
151	default 0x82000000 if ARCH_OMAP2PLUS
152	help
153	  Specify the address in SDRAM for the SPL stack. This will be set up
154	  before board_init_r() is called.
155
156config SPL_STACK_R_MALLOC_SIMPLE_LEN
157	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
158	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
159	default 0x100000
160	help
161	  Specify the amount of the stack to use as memory pool for
162	  malloc_simple after switching the stack to DRAM. This may be set
163	  to give board_init_r() a larger heap then the initial heap in
164	  SRAM which is limited to SYS_MALLOC_F_LEN bytes.
165
166config SPL_SEPARATE_BSS
167	bool "BSS section is in a different memory region from text"
168	help
169	  Some platforms need a large BSS region in SPL and can provide this
170	  because RAM is already set up. In this case BSS can be moved to RAM.
171	  This option should then be enabled so that the correct device tree
172	  location is used. Normally we put the device tree at the end of BSS
173	  but with this option enabled, it goes at _image_binary_end.
174
175config SPL_BANNER_PRINT
176	bool "Enable output of the SPL banner 'U-Boot SPL ...'"
177	default y
178	help
179	  If this option is enabled, SPL will print the banner with version
180	  info. Disabling this option could be useful to reduce TPL boot time
181	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
182
183config TPL_BANNER_PRINT
184	bool "Enable output of the TPL banner 'U-Boot TPL ...'"
185	default y
186	help
187	  If this option is enabled, SPL will not print the banner with version
188	  info. Disabling this option could be useful to reduce SPL boot time
189	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
190
191config SPL_DISPLAY_PRINT
192	bool "Display a board-specific message in SPL"
193	help
194	  If this option is enabled, U-Boot will call the function
195	  spl_display_print() immediately after displaying the SPL console
196	  banner ("U-Boot SPL ..."). This function should be provided by
197	  the board.
198
199config SPL_SKIP_RELOCATE
200	bool "Skip code relocation in SPL"
201	default y
202	help
203	  The SPL code will be relocated to a high memory if you say no here.
204	  Only ARM and PowerPC SPL support relocate now.
205
206config SPL_RELOC_TEXT_BASE
207	hex "Address the SPL relocate to"
208	depends on !SPL_SKIP_RELOCATE
209	help
210	  The address on the ram where the SPL relocate to.
211
212config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
213	bool "MMC raw mode: by sector"
214	default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
215		     ARCH_MX6 || ARCH_MX7 || \
216		     ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
217		     ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
218		     OMAP44XX || OMAP54XX || AM33XX || AM43XX
219	help
220	  Use sector number for specifying U-Boot location on MMC/SD in
221	  raw mode.
222
223config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
224	hex "Address on the MMC to load U-Boot from"
225	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
226	default 0x50 if ARCH_SUNXI
227	default 0x75 if ARCH_DAVINCI
228	default 0x8a if ARCH_MX6 || ARCH_MX7
229	default 0x100 if ARCH_UNIPHIER
230	default 0x140 if ARCH_MVEBU
231	default 0x200 if ARCH_SOCFPGA || ARCH_AT91
232	default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
233		         OMAP54XX || AM33XX || AM43XX || ARCH_K3
234	default 0x4000 if ARCH_ROCKCHIP
235	help
236	  Address on the MMC to load U-Boot from, when the MMC is being used
237	  in raw mode. Units: MMC sectors (1 sector = 512 bytes).
238
239config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
240	bool "MMC Raw mode: by partition"
241	help
242	  Use a partition for loading U-Boot when using MMC/SD in raw mode.
243
244config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
245	hex "Partition to use to load U-Boot from"
246	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
247	default 1
248	help
249	  Partition on the MMC to load U-Boot from when the MMC is being
250	  used in raw mode
251
252config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
253	bool "MMC raw mode: by partition type"
254	depends on DOS_PARTITION && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
255	help
256	  Use partition type for specifying U-Boot partition on MMC/SD in
257	  raw mode. U-Boot will be loaded from the first partition of this
258	  type to be found.
259
260config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
261	hex "Partition Type on the MMC to load U-Boot from"
262	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
263	help
264	  Partition Type on the MMC to load U-Boot from, when the MMC is being
265	  used in raw mode.
266
267config SPL_CRC32_SUPPORT
268	bool "Support CRC32"
269	default y if SPL_LEGACY_IMAGE_SUPPORT
270	help
271	  Enable this to support CRC32 in uImages or FIT images within SPL.
272	  This is a 32-bit checksum value that can be used to verify images.
273	  For FIT images, this is the least secure type of checksum, suitable
274	  for detected accidental image corruption. For secure applications you
275	  should consider SHA1 or SHA256.
276
277config SPL_MD5_SUPPORT
278	bool "Support MD5"
279	depends on SPL_FIT
280	help
281	  Enable this to support MD5 in FIT images within SPL. An MD5
282	  checksum is a 128-bit hash value used to check that the image
283	  contents have not been corrupted. Note that MD5 is not considered
284	  secure as it is possible (with a brute-force attack) to adjust the
285	  image while still retaining the same MD5 hash value. For secure
286	  applications where images may be changed maliciously, you should
287	  consider SHA256 or SHA384.
288
289config SPL_SHA1_SUPPORT
290	bool "Support SHA1"
291	depends on SPL_FIT
292	select SHA1
293	help
294	  Enable this to support SHA1 in FIT images within SPL. A SHA1
295	  checksum is a 160-bit (20-byte) hash value used to check that the
296	  image contents have not been corrupted or maliciously altered.
297	  While SHA1 is fairly secure it is coming to the end of its life
298	  due to the expanding computing power available to brute-force
299	  attacks. For more security, consider SHA256 or SHA384.
300
301config SPL_SHA256_SUPPORT
302	bool "Support SHA256"
303	depends on SPL_FIT
304	select SHA256
305	help
306	  Enable this to support SHA256 in FIT images within SPL. A SHA256
307	  checksum is a 256-bit (32-byte) hash value used to check that the
308	  image contents have not been corrupted.
309
310config SPL_SHA384_SUPPORT
311	bool "Support SHA384"
312	depends on SPL_FIT
313	select SHA384
314	select SHA512_ALGO
315	help
316	  Enable this to support SHA384 in FIT images within SPL. A SHA384
317	  checksum is a 384-bit (48-byte) hash value used to check that the
318	  image contents have not been corrupted. Use this for the highest
319	  security.
320
321config SPL_SHA512_SUPPORT
322	bool "Support SHA512"
323	depends on SPL_FIT
324	select SHA512
325	select SHA512_ALGO
326	help
327	  Enable this to support SHA512 in FIT images within SPL. A SHA512
328	  checksum is a 512-bit (64-byte) hash value used to check that the
329	  image contents have not been corrupted.
330
331config SPL_FIT_IMAGE_TINY
332	bool "Remove functionality from SPL FIT loading to reduce size"
333	depends on SPL_FIT
334	default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
335	default y if ARCH_IMX8M
336	help
337	  Enable this to reduce the size of the FIT image loading code
338	  in SPL, if space for the SPL binary is very tight.
339
340	  This removes the detection of image types (which forces the
341	  first image to be treated as having a U-Boot style calling
342	  convention) and skips the recording of each loaded payload
343	  (i.e. loadable) into the FDT (modifying the loaded FDT to
344	  ensure this information is available to the next image
345	  invoked).
346
347config SPL_CPU_SUPPORT
348	bool "Support CPU drivers"
349	help
350	  Enable this to support CPU drivers in SPL. These drivers can set
351	  up CPUs and provide information about them such as the model and
352	  name. This can be useful in SPL since setting up the CPUs earlier
353	  may improve boot performance. Enable this option to build the
354	  drivers in drivers/cpu as part of an SPL build.
355
356config SPL_CRYPTO_SUPPORT
357	bool "Support crypto drivers"
358	help
359	  Enable crypto drivers in SPL. These drivers can be used to
360	  accelerate secure boot processing in secure applications. Enable
361	  this option to build the drivers in drivers/crypto as part of an
362	  SPL build.
363
364config SPL_HASH_SUPPORT
365	bool "Support hashing drivers"
366	select SHA1
367	select SHA256
368	help
369	  Enable hashing drivers in SPL. These drivers can be used to
370	  accelerate secure boot processing in secure applications. Enable
371	  this option to build system-specific drivers for hash acceleration
372	  as part of an SPL build.
373
374config TPL_HASH_SUPPORT
375	bool "Support hashing drivers in TPL"
376	select SHA1
377	select SHA256
378	help
379	  Enable hashing drivers in SPL. These drivers can be used to
380	  accelerate secure boot processing in secure applications. Enable
381	  this option to build system-specific drivers for hash acceleration
382	  as part of an SPL build.
383
384config SPL_DMA_SUPPORT
385	bool "Support DMA drivers"
386	help
387	  Enable DMA (direct-memory-access) drivers in SPL. These drivers
388	  can be used to handle memory-to-peripheral data transfer without
389	  the CPU moving the data. Enable this option to build the drivers
390	  in drivers/dma as part of an SPL build.
391
392config SPL_DRIVERS_MISC_SUPPORT
393	bool "Support misc drivers"
394	help
395	  Enable miscellaneous drivers in SPL. These drivers perform various
396	  tasks that don't fall nicely into other categories, Enable this
397	  option to build the drivers in drivers/misc as part of an SPL
398	  build, for those that support building in SPL (not all drivers do).
399
400config SPL_ENV_SUPPORT
401	bool "Support an environment"
402	help
403	  Enable environment support in SPL. The U-Boot environment provides
404	  a number of settings (essentially name/value pairs) which can
405	  control many aspects of U-Boot's operation. Normally this is not
406	  needed in SPL as it has a much simpler task with less
407	  configuration. But some boards use this to support 'Falcon' boot
408	  on EXT2 and FAT, where SPL boots directly into Linux without
409	  starting U-Boot first. Enabling this option will make env_get()
410	  and env_set() available in SPL.
411
412config SPL_SAVEENV
413	bool "Support save environment"
414	depends on SPL_ENV_SUPPORT
415	select SPL_MMC_WRITE if ENV_IS_IN_MMC
416	help
417	  Enable save environment support in SPL after setenv. By default
418	  the saveenv option is not provided in SPL, but some boards need
419	  this support in 'Falcon' boot, where SPL need to boot from
420	  different images based on environment variable set by OS. For
421	  example OS may set "reboot_image" environment variable to
422	  "recovery" inorder to boot recovery image by SPL. The SPL read
423	  "reboot_image" and act accordingly and change the reboot_image
424	  to default mode using setenv and save the environment.
425
426config SPL_ETH_SUPPORT
427	bool "Support Ethernet"
428	depends on SPL_ENV_SUPPORT
429	help
430	  Enable access to the network subsystem and associated Ethernet
431	  drivers in SPL. This permits SPL to load U-Boot over an Ethernet
432	  link rather than from an on-board peripheral. Environment support
433	  is required since the network stack uses a number of environment
434	  variables. See also SPL_NET_SUPPORT.
435
436config SPL_FS_EXT4
437	bool "Support EXT filesystems"
438	help
439	  Enable support for EXT2/3/4 filesystems with SPL. This permits
440	  U-Boot (or Linux in Falcon mode) to be loaded from an EXT
441	  filesystem from within SPL. Support for the underlying block
442	  device (e.g. MMC or USB) must be enabled separately.
443
444config SPL_FS_FAT
445	bool "Support FAT filesystems"
446	select FS_FAT
447	help
448	  Enable support for FAT and VFAT filesystems with SPL. This
449	  permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
450	  filesystem from within SPL. Support for the underlying block
451	  device (e.g. MMC or USB) must be enabled separately.
452
453config SPL_FAT_WRITE
454	bool "Support write for FAT filesystems"
455	help
456	  Enable write support for FAT and VFAT filesystems with SPL.
457	  Support for the underlying block device (e.g. MMC or USB) must be
458	  enabled separately.
459
460config SPL_FPGA_SUPPORT
461	bool "Support FPGAs"
462	help
463	  Enable support for FPGAs in SPL. Field-programmable Gate Arrays
464	  provide software-configurable hardware which is typically used to
465	  implement peripherals (such as UARTs, LCD displays, MMC) or
466	  accelerate custom processing functions, such as image processing
467	  or machine learning. Sometimes it is useful to program the FPGA
468	  as early as possible during boot, and this option can enable that
469	  within SPL.
470
471config SPL_GPIO_SUPPORT
472	bool "Support GPIO in SPL"
473	help
474	  Enable support for GPIOs (General-purpose Input/Output) in SPL.
475	  GPIOs allow U-Boot to read the state of an input line (high or
476	  low) and set the state of an output line. This can be used to
477	  drive LEDs, control power to various system parts and read user
478	  input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED,
479	  for example. Enable this option to build the drivers in
480	  drivers/gpio as part of an SPL build.
481
482config SPL_I2C_SUPPORT
483	bool "Support I2C"
484	help
485	  Enable support for the I2C (Inter-Integrated Circuit) bus in SPL.
486	  I2C works with a clock and data line which can be driven by a
487	  one or more masters or slaves. It is a fairly complex bus but is
488	  widely used as it only needs two lines for communication. Speeds of
489	  400kbps are typical but up to 3.4Mbps is supported by some
490	  hardware. I2C can be useful in SPL to configure power management
491	  ICs (PMICs) before raising the CPU clock speed, for example.
492	  Enable this option to build the drivers in drivers/i2c as part of
493	  an SPL build.
494
495config SPL_LIBCOMMON_SUPPORT
496	bool "Support common libraries"
497	help
498	  Enable support for common U-Boot libraries within SPL. These
499	  libraries include common code to deal with U-Boot images,
500	  environment and USB, for example. This option is enabled on many
501	  boards. Enable this option to build the code in common/ as part of
502	  an SPL build.
503
504config SPL_LIBDISK_SUPPORT
505	bool "Support disk partitions"
506	select PARTITIONS
507	help
508	  Enable support for disk partitions within SPL. 'Disk' is something
509	  of a misnomer as it includes non-spinning media such as flash (as
510	  used in MMC and USB sticks). Partitions provide a way for a disk
511	  to be split up into separate regions, with a partition table placed
512	  at the start or end which describes the location and size of each
513	  'partition'. These partitions are typically uses as individual block
514	  devices, typically with an EXT2 or FAT filesystem in each. This
515	  option enables whatever partition support has been enabled in
516	  U-Boot to also be used in SPL. It brings in the code in disk/.
517
518config SPL_LIBGENERIC_SUPPORT
519	bool "Support generic libraries"
520	help
521	  Enable support for generic U-Boot libraries within SPL. These
522	  libraries include generic code to deal with device tree, hashing,
523	  printf(), compression and the like. This option is enabled on many
524	  boards. Enable this option to build the code in lib/ as part of an
525	  SPL build.
526
527config SPL_DM_MAILBOX
528	bool "Support Mailbox"
529	help
530	  Enable support for Mailbox within SPL. This enable the inter
531	  processor communication protocols tobe used within SPL. Enable
532	  this option to build the drivers in drivers/mailbox as part of
533	  SPL build.
534
535config SPL_MMC_SUPPORT
536	bool "Support MMC"
537	depends on MMC
538	select HAVE_BLOCK_DEVICE
539	help
540	  Enable support for MMC (Multimedia Card) within SPL. This enables
541	  the MMC protocol implementation and allows any enabled drivers to
542	  be used within SPL. MMC can be used with or without disk partition
543	  support depending on the application (SPL_LIBDISK_SUPPORT). Enable
544	  this option to build the drivers in drivers/mmc as part of an SPL
545	  build.
546
547config SPL_MMC_WRITE
548	bool "MMC/SD/SDIO card support for write operations in SPL"
549	depends on SPL_MMC_SUPPORT
550	default n
551	help
552	  Enable write access to MMC and SD Cards in SPL
553
554
555config SPL_MPC8XXX_INIT_DDR_SUPPORT
556	bool "Support MPC8XXX DDR init"
557	help
558	  Enable support for DDR-SDRAM (double-data-rate synchronous dynamic
559	  random-access memory) on the MPC8XXX family within SPL. This
560	  allows DRAM to be set up before loading U-Boot into that DRAM,
561	  where it can run.
562
563config SPL_MTD_SUPPORT
564	bool "Support MTD drivers"
565	help
566	  Enable support for MTD (Memory Technology Device) within SPL. MTD
567	  provides a block interface over raw NAND and can also be used with
568	  SPI flash. This allows SPL to load U-Boot from supported MTD
569	  devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how
570	  to enable specific MTD drivers.
571
572config SPL_MUSB_NEW_SUPPORT
573	bool "Support new Mentor Graphics USB"
574	help
575	  Enable support for Mentor Graphics USB in SPL. This is a new
576	  driver used by some boards. Enable this option to build
577	  the drivers in drivers/usb/musb-new as part of an SPL build. The
578	  old drivers are in drivers/usb/musb.
579
580config SPL_NAND_SUPPORT
581	bool "Support NAND flash"
582	help
583	  Enable support for NAND (Negative AND) flash in SPL. NAND flash
584	  can be used to allow SPL to load U-Boot from supported devices.
585	  This enables the drivers in drivers/mtd/nand/raw as part of an SPL
586	  build.
587
588config SPL_NET_SUPPORT
589	bool "Support networking"
590	help
591	  Enable support for network devices (such as Ethernet) in SPL.
592	  This permits SPL to load U-Boot over a network link rather than
593	  from an on-board peripheral. Environment support is required since
594	  the network stack uses a number of environment variables. See also
595	  SPL_ETH_SUPPORT.
596
597if SPL_NET_SUPPORT
598config SPL_NET_VCI_STRING
599	string "BOOTP Vendor Class Identifier string sent by SPL"
600	help
601	  As defined by RFC 2132 the vendor class identifier field can be
602	  sent by the client to identify the vendor type and configuration
603	  of a client.  This is often used in practice to allow for the DHCP
604	  server to specify different files to load depending on if the ROM,
605	  SPL or U-Boot itself makes the request
606endif   # if SPL_NET_SUPPORT
607
608config SPL_NO_CPU_SUPPORT
609	bool "Drop CPU code in SPL"
610	help
611	  This is specific to the ARM926EJ-S CPU. It disables the standard
612	  start.S start-up code, presumably so that a replacement can be
613	  used on that CPU. You should not enable it unless you know what
614	  you are doing.
615
616config SPL_NOR_SUPPORT
617	bool "Support NOR flash"
618	help
619	  Enable support for loading U-Boot from memory-mapped NOR (Negative
620	  OR) flash in SPL. NOR flash is slow to write but fast to read, and
621	  a memory-mapped device makes it very easy to access. Loading from
622	  NOR is typically achieved with just a memcpy().
623
624config SPL_XIP_SUPPORT
625	bool "Support XIP"
626	depends on SPL
627	help
628	  Enable support for execute in place of U-Boot or kernel image. There
629	  is no need to copy image from flash to ram if flash supports execute
630	  in place. Its very useful in systems having enough flash but not
631	  enough ram to load the image.
632
633config SPL_ONENAND_SUPPORT
634	bool "Support OneNAND flash"
635	help
636	  Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
637	  a type of NAND flash and therefore can be used to allow SPL to
638	  load U-Boot from supported devices. This enables the drivers in
639	  drivers/mtd/onenand as part of an SPL build.
640
641config SPL_OS_BOOT
642	bool "Activate Falcon Mode"
643	depends on !TI_SECURE_DEVICE
644	default n
645	help
646	  Enable booting directly to an OS from SPL.
647	  for more info read doc/README.falcon
648
649if SPL_OS_BOOT
650config SYS_OS_BASE
651	hex "addr, where OS is found"
652	depends on SPL_NOR_SUPPORT
653	help
654	  Specify the address, where the OS image is found, which
655	  gets booted.
656
657endif # SPL_OS_BOOT
658
659config SPL_PAYLOAD
660	string "SPL payload"
661	default "tpl/u-boot-with-tpl.bin" if TPL
662	default "u-boot.bin"
663	help
664	  Payload for SPL boot. For backward compatibility, default to
665	  u-boot.bin, i.e. RAW image without any header. In case of
666	  TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
667	  use u-boot.img.
668
669config SPL_PCI
670	bool "Support PCI drivers"
671	help
672	  Enable support for PCI in SPL. For platforms that need PCI to boot,
673	  or must perform some init using PCI in SPL, this provides the
674	  necessary driver support. This enables the drivers in drivers/pci
675	  as part of an SPL build.
676
677config SPL_PCH_SUPPORT
678	bool "Support PCH drivers"
679	help
680	  Enable support for PCH (Platform Controller Hub) devices in SPL.
681	  These are used to set up GPIOs and the SPI peripheral early in
682	  boot. This enables the drivers in drivers/pch as part of an SPL
683	  build.
684
685config SPL_POST_MEM_SUPPORT
686	bool "Support POST drivers"
687	help
688	  Enable support for POST (Power-on Self Test) in SPL. POST is a
689	  procedure that checks that the hardware (CPU or board) appears to
690	  be functionally correctly. It is a sanity check that can be
691	  performed before booting. This enables the drivers in post/drivers
692	  as part of an SPL build.
693
694config SPL_DM_RESET
695	bool "Support reset drivers"
696	depends on SPL
697	help
698	  Enable support for reset control in SPL.
699	  That can be useful in SPL to handle IP reset in driver, as in U-Boot,
700	  by using the generic reset API provided by driver model.
701	  This enables the drivers in drivers/reset as part of an SPL build.
702
703config SPL_POWER_SUPPORT
704	bool "Support power drivers"
705	help
706	  Enable support for power control in SPL. This includes support
707	  for PMICs (Power-management Integrated Circuits) and some of the
708	  features provided by PMICs. In particular, voltage regulators can
709	  be used to enable/disable power and vary its voltage. That can be
710	  useful in SPL to turn on boot peripherals and adjust CPU voltage
711	  so that the clock speed can be increased. This enables the drivers
712	  in drivers/power, drivers/power/pmic and drivers/power/regulator
713	  as part of an SPL build.
714
715config SPL_POWER_DOMAIN
716	bool "Support power domain drivers"
717	help
718	  Enable support for power domain control in SPL. Many SoCs allow
719	  power to be applied to or removed from portions of the SoC (power
720	  domains). This may be used to save power. This API provides the
721	  means to control such power management hardware. This enables
722	  the drivers in drivers/power/domain as part of a SPL build.
723
724config SPL_RAM_SUPPORT
725	bool "Support booting from RAM"
726	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
727	help
728	  Enable booting of an image in RAM. The image can be preloaded or
729	  it can be loaded by SPL directly into RAM (e.g. using USB).
730
731config SPL_RAM_DEVICE
732	bool "Support booting from preloaded image in RAM"
733	depends on SPL_RAM_SUPPORT
734	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
735	help
736	  Enable booting of an image already loaded in RAM. The image has to
737	  be already in memory when SPL takes over, e.g. loaded by the boot
738	  ROM.
739
740config SPL_REMOTEPROC
741	bool "Support REMOTEPROCS"
742	help
743	  Enable support for REMOTEPROCs in SPL. This permits to load
744	  a remote processor firmware in SPL.
745
746config SPL_RTC_SUPPORT
747	bool "Support RTC drivers"
748	help
749	  Enable RTC (Real-time Clock) support in SPL. This includes support
750	  for reading and setting the time. Some RTC devices also have some
751	  non-volatile (battery-backed) memory which is accessible if
752	  needed. This enables the drivers in drivers/rtc as part of an SPL
753	  build.
754
755config SPL_SATA_SUPPORT
756	bool "Support loading from SATA"
757	help
758	  Enable support for SATA (Serial AT attachment) in SPL. This allows
759	  use of SATA devices such as hard drives and flash drivers for
760	  loading U-Boot. SATA is used in higher-end embedded systems and
761	  can provide higher performance than MMC , at somewhat higher
762	  expense and power consumption. This enables loading from SATA
763	  using a configured device.
764
765config SPL_SERIAL_SUPPORT
766	bool "Support serial"
767	select SPL_PRINTF
768	select SPL_STRTO
769	help
770	  Enable support for serial in SPL. This allows use of a serial UART
771	  for displaying messages while SPL is running. It also brings in
772	  printf() and panic() functions. This should normally be enabled
773	  unless there are space reasons not to. Even then, consider
774	  enabling USE_TINY_PRINTF which is a small printf() version.
775
776config SPL_SPI_FLASH_SUPPORT
777	bool "Support SPI flash drivers"
778	help
779	  Enable support for using SPI flash in SPL, and loading U-Boot from
780	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
781	  the SPI bus that is used to connect it to a system. It is a simple
782	  but fast bidirectional 4-wire bus (clock, chip select and two data
783	  lines). This enables the drivers in drivers/mtd/spi as part of an
784	  SPL build. This normally requires SPL_SPI_SUPPORT.
785
786if SPL_SPI_FLASH_SUPPORT
787
788config SPL_SPI_FLASH_TINY
789	bool "Enable low footprint SPL SPI Flash support"
790	depends on !SPI_FLASH_BAR
791	default y if SPI_FLASH
792	help
793	 Enable lightweight SPL SPI Flash support that supports just reading
794	 data/images from flash. No support to write/erase flash. Enable
795	 this if you have SPL size limitations and don't need full
796	 fledged SPI flash support.
797
798config SPL_SPI_FLASH_SFDP_SUPPORT
799	bool "SFDP table parsing support for SPI NOR flashes"
800	depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
801	help
802	 Enable support for parsing and auto discovery of parameters for
803	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
804	 tables as per JESD216 standard in SPL.
805
806config SPL_SPI_LOAD
807	bool "Support loading from SPI flash"
808	help
809	  Enable support for loading next stage, U-Boot or otherwise, from
810	  SPI NOR in U-Boot SPL.
811
812endif # SPL_SPI_FLASH_SUPPORT
813
814config SPL_SPI_SUPPORT
815	bool "Support SPI drivers"
816	help
817	  Enable support for using SPI in SPL. This is used for connecting
818	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
819	  more details on that. The SPI driver provides the transport for
820	  data between the SPI flash and the CPU. This option can be used to
821	  enable SPI drivers that are needed for other purposes also, such
822	  as a SPI PMIC.
823
824config SPL_THERMAL
825	bool "Driver support for thermal devices"
826	help
827	  Enable support for temperature-sensing devices. Some SoCs have on-chip
828	  temperature sensors to permit warnings, speed throttling or even
829	  automatic power-off when the temperature gets too high or low. Other
830	  devices may be discrete but connected on a suitable bus.
831
832config SPL_USB_HOST_SUPPORT
833	bool "Support USB host drivers"
834	select HAVE_BLOCK_DEVICE
835	help
836	  Enable access to USB (Universal Serial Bus) host devices so that
837	  SPL can load U-Boot from a connected USB peripheral, such as a USB
838	  flash stick. While USB takes a little longer to start up than most
839	  buses, it is very flexible since many different types of storage
840	  device can be attached. This option enables the drivers in
841	  drivers/usb/host as part of an SPL build.
842
843config SPL_USB_STORAGE
844	bool "Support loading from USB"
845	depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB)
846	help
847	  Enable support for USB devices in SPL. This allows use of USB
848	  devices such as hard drives and flash drivers for loading U-Boot.
849	  The actual drivers are enabled separately using the normal U-Boot
850	  config options. This enables loading from USB using a configured
851	  device.
852
853config SPL_USB_GADGET
854	bool "Suppport USB Gadget drivers"
855	help
856	  Enable USB Gadget API which allows to enable USB device functions
857	  in SPL.
858
859if SPL_USB_GADGET
860
861config SPL_USB_ETHER
862	bool "Support USB Ethernet drivers"
863	help
864	  Enable access to the USB network subsystem and associated
865	  drivers in SPL. This permits SPL to load U-Boot over a
866	  USB-connected Ethernet link (such as a USB Ethernet dongle) rather
867	  than from an onboard peripheral. Environment support is required
868	  since the network stack uses a number of environment variables.
869	  See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
870
871config SPL_DFU
872	bool "Support DFU (Device Firmware Upgrade)"
873	select SPL_HASH_SUPPORT
874	select SPL_DFU_NO_RESET
875	depends on SPL_RAM_SUPPORT
876	help
877	  This feature enables the DFU (Device Firmware Upgrade) in SPL with
878	  RAM memory device support. The ROM code will load and execute
879	  the SPL built with dfu. The user can load binaries (u-boot/kernel) to
880	  selected device partition from host-pc using dfu-utils.
881	  This feature is useful to flash the binaries to factory or bare-metal
882	  boards using USB interface.
883
884choice
885	bool "DFU device selection"
886	depends on SPL_DFU
887
888config SPL_DFU_RAM
889	bool "RAM device"
890	depends on SPL_DFU && SPL_RAM_SUPPORT
891	help
892	 select RAM/DDR memory device for loading binary images
893	 (u-boot/kernel) to the selected device partition using
894	 DFU and execute the u-boot/kernel from RAM.
895
896endchoice
897
898config SPL_USB_SDP_SUPPORT
899	bool "Support SDP (Serial Download Protocol)"
900	help
901	  Enable Serial Download Protocol (SDP) device support in SPL. This
902	  allows to download images into memory and execute (jump to) them
903	  using the same protocol as implemented by the i.MX family's boot ROM.
904endif
905
906config SPL_WATCHDOG_SUPPORT
907	bool "Support watchdog drivers"
908	help
909	  Enable support for watchdog drivers in SPL. A watchdog is
910	  typically a hardware peripheral which can reset the system when it
911	  detects no activity for a while (such as a software crash). This
912	  enables the drivers in drivers/watchdog as part of an SPL build.
913
914config SPL_YMODEM_SUPPORT
915	bool "Support loading using Ymodem"
916	depends on SPL_SERIAL_SUPPORT
917	help
918	  While loading from serial is slow it can be a useful backup when
919	  there is no other option. The Ymodem protocol provides a reliable
920	  means of transmitting U-Boot over a serial line for using in SPL,
921	  with a checksum to ensure correctness.
922
923config SPL_ATF
924	bool "Support ARM Trusted Firmware"
925	depends on ARM64
926	help
927	  ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
928	  is loaded by SPL (which is considered as BL2 in ATF terminology).
929	  More detail at: https://github.com/ARM-software/arm-trusted-firmware
930
931config SPL_ATF_NO_PLATFORM_PARAM
932        bool "Pass no platform parameter"
933	depends on SPL_ATF
934	help
935	  While we expect to call a pointer to a valid FDT (or NULL)
936	  as the platform parameter to an ATF, some ATF versions are
937	  not U-Boot aware and have an insufficiently robust parameter
938	  validation to gracefully reject a FDT being passed.
939
940	  If this option is enabled, the spl_atf os-type handler will
941	  always pass NULL for the platform parameter.
942
943	  If your ATF is affected, say Y.
944
945config SPL_AM33XX_ENABLE_RTC32K_OSC
946	bool "Enable the RTC32K OSC on AM33xx based platforms"
947	default y if AM33XX
948	help
949	  Enable access to the AM33xx RTC and select the external 32kHz clock
950	  source.
951
952config SPL_OPTEE
953	bool "Support OP-TEE Trusted OS"
954	depends on ARM
955	help
956	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
957	  More detail at: https://github.com/OP-TEE/optee_os
958
959config TPL
960	bool
961	depends on SUPPORT_TPL
962	prompt "Enable TPL"
963	help
964	  If you want to build TPL as well as the normal image and SPL, say Y.
965
966if TPL
967
968config TPL_HANDOFF
969	bool "Pass hand-off information from TPL to SPL and U-Boot proper"
970	depends on HANDOFF
971	default y
972	help
973	  This option enables TPL to write handoff information. This can be
974	  used to pass information like the size of SDRAM from TPL to U-Boot
975	  proper. The information is also available to SPL if it is useful
976	  there.
977
978config TPL_BOARD_INIT
979	bool "Call board-specific initialization in TPL"
980	help
981	  If this option is enabled, U-Boot will call the function
982	  spl_board_init() from board_init_r(). This function should be
983	  provided by the board.
984
985config TPL_LDSCRIPT
986        string "Linker script for the TPL stage"
987	depends on TPL
988	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
989	default "arch/$(ARCH)/cpu/u-boot-spl.lds"
990	help
991	  The TPL stage will usually require a different linker-script
992	  (as it runs from a different memory region) than the regular
993	  U-Boot stage.  Set this to the path of the linker-script to
994	  be used for TPL.
995
996	  May be left empty to trigger the Makefile infrastructure to
997	  fall back to the linker-script used for the SPL stage.
998
999config TPL_NEEDS_SEPARATE_TEXT_BASE
1000        bool "TPL needs a separate text-base"
1001	default n
1002	depends on TPL
1003	help
1004	  Enable, if the TPL stage should not inherit its text-base
1005	  from the SPL stage.  When enabled, a base address for the
1006	  .text sections of the TPL stage has to be set below.
1007
1008config TPL_NEEDS_SEPARATE_STACK
1009        bool "TPL needs a separate initial stack-pointer"
1010	default n
1011	depends on TPL
1012	help
1013	  Enable, if the TPL stage should not inherit its initial
1014	  stack-pointer from the settings for the SPL stage.
1015
1016config TPL_TEXT_BASE
1017        hex "Base address for the .text section of the TPL stage"
1018	depends on TPL_NEEDS_SEPARATE_TEXT_BASE
1019	help
1020	  The base address for the .text section of the TPL stage.
1021
1022config TPL_MAX_SIZE
1023        int "Maximum size (in bytes) for the TPL stage"
1024	default 0
1025	depends on TPL
1026	help
1027	  The maximum size (in bytes) of the TPL stage.
1028
1029config TPL_STACK
1030        hex "Address of the initial stack-pointer for the TPL stage"
1031	depends on TPL_NEEDS_SEPARATE_STACK
1032	help
1033	  The address of the initial stack-pointer for the TPL stage.
1034	  Usually this will be the (aligned) top-of-stack.
1035
1036config TPL_BOOTROM_SUPPORT
1037        bool "Support returning to the BOOTROM (from TPL)"
1038	help
1039	  Some platforms (e.g. the Rockchip RK3368) provide support in their
1040	  ROM for loading the next boot-stage after performing basic setup
1041	  from the TPL stage.
1042
1043	  Enable this option, to return to the BOOTROM through the
1044	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
1045	  boot device list, if not implemented for a given board)
1046
1047config TPL_DRIVERS_MISC_SUPPORT
1048	bool "Support misc drivers in TPL"
1049	help
1050	  Enable miscellaneous drivers in TPL. These drivers perform various
1051	  tasks that don't fall nicely into other categories, Enable this
1052	  option to build the drivers in drivers/misc as part of an TPL
1053	  build, for those that support building in TPL (not all drivers do).
1054
1055config TPL_ENV_SUPPORT
1056	bool "Support an environment"
1057	help
1058	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
1059
1060config TPL_GPIO_SUPPORT
1061	bool "Support GPIO in TPL"
1062	help
1063	  Enable support for GPIOs (General-purpose Input/Output) in TPL.
1064	  GPIOs allow U-Boot to read the state of an input line (high or
1065	  low) and set the state of an output line. This can be used to
1066	  drive LEDs, control power to various system parts and read user
1067	  input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
1068	  for example. Enable this option to build the drivers in
1069	  drivers/gpio as part of an TPL build.
1070
1071config TPL_I2C_SUPPORT
1072	bool "Support I2C"
1073	help
1074	  Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for
1075	  details.
1076
1077config TPL_LIBCOMMON_SUPPORT
1078	bool "Support common libraries"
1079	help
1080	  Enable support for common U-Boot libraries within TPL. See
1081	  SPL_LIBCOMMON_SUPPORT for details.
1082
1083config TPL_LIBGENERIC_SUPPORT
1084	bool "Support generic libraries"
1085	help
1086	  Enable support for generic U-Boot libraries within TPL. See
1087	  SPL_LIBGENERIC_SUPPORT for details.
1088
1089config TPL_MPC8XXX_INIT_DDR_SUPPORT
1090	bool "Support MPC8XXX DDR init"
1091	help
1092	  Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
1093	  SPL_MPC8XXX_INIT_DDR_SUPPORT for details.
1094
1095config TPL_MMC_SUPPORT
1096	bool "Support MMC"
1097	depends on MMC
1098	help
1099	  Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
1100
1101config TPL_NAND_SUPPORT
1102	bool "Support NAND flash"
1103	help
1104	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
1105
1106config TPL_PCI
1107	bool "Support PCI drivers"
1108	help
1109	  Enable support for PCI in TPL. For platforms that need PCI to boot,
1110	  or must perform some init using PCI in SPL, this provides the
1111	  necessary driver support. This enables the drivers in drivers/pci
1112	  as part of a TPL build.
1113
1114config TPL_PCH_SUPPORT
1115	bool "Support PCH drivers"
1116	help
1117	  Enable support for PCH (Platform Controller Hub) devices in TPL.
1118	  These are used to set up GPIOs and the SPI peripheral early in
1119	  boot. This enables the drivers in drivers/pch as part of a TPL
1120	  build.
1121
1122config TPL_RAM_SUPPORT
1123	bool "Support booting from RAM"
1124	help
1125	  Enable booting of an image in RAM. The image can be preloaded or
1126	  it can be loaded by TPL directly into RAM (e.g. using USB).
1127
1128config TPL_RAM_DEVICE
1129	bool "Support booting from preloaded image in RAM"
1130	depends on TPL_RAM_SUPPORT
1131	help
1132	  Enable booting of an image already loaded in RAM. The image has to
1133	  be already in memory when TPL takes over, e.g. loaded by the boot
1134	  ROM.
1135
1136config TPL_RTC_SUPPORT
1137	bool "Support RTC drivers"
1138	help
1139	  Enable RTC (Real-time Clock) support in TPL. This includes support
1140	  for reading and setting the time. Some RTC devices also have some
1141	  non-volatile (battery-backed) memory which is accessible if
1142	  needed. This enables the drivers in drivers/rtc as part of an TPL
1143	  build.
1144
1145config TPL_SERIAL_SUPPORT
1146	bool "Support serial"
1147	select TPL_PRINTF
1148	select TPL_STRTO
1149	help
1150	  Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
1151	  details.
1152
1153config TPL_SPI_FLASH_SUPPORT
1154	bool "Support SPI flash drivers"
1155	help
1156	  Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
1157	  for details.
1158
1159config TPL_SPI_LOAD
1160	bool "Support loading from SPI flash"
1161	depends on TPL_SPI_FLASH_SUPPORT
1162	help
1163	  Enable support for loading next stage, U-Boot or otherwise, from
1164	  SPI NOR in U-Boot TPL.
1165
1166config TPL_SPI_SUPPORT
1167	bool "Support SPI drivers"
1168	help
1169	  Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for
1170	  details.
1171
1172config TPL_YMODEM_SUPPORT
1173	bool "Support loading using Ymodem"
1174	depends on TPL_SERIAL_SUPPORT
1175	help
1176	  While loading from serial is slow it can be a useful backup when
1177	  there is no other option. The Ymodem protocol provides a reliable
1178	  means of transmitting U-Boot over a serial line for using in TPL,
1179	  with a checksum to ensure correctness.
1180
1181endif # TPL
1182
1183endif # SPL
1184endmenu
1185