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