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