xref: /rk3399_rockchip-uboot/common/spl/Kconfig (revision 8c7c24c01a6f59f93e6564743e0e75c973d73387)
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_UFS_SUPPORT
682	bool "Support loading from UFS"
683	help
684	  Enable support for UFS in SPL. This allows
685	  use of UFS devices such as hard drives and flash drivers for
686	  loading U-Boot.
687
688config SYS_UFS_RAW_MODE_U_BOOT_SECTOR
689	hex "Address on the UFS to load U-Boot from"
690	depends on SPL_UFS_SUPPORT
691	default 0x4000
692	help
693	  Address on the block device to load U-Boot from,
694	  Units: UFS sectors (1 sector = 512 bytes).
695
696config SPL_SERIAL_SUPPORT
697	bool "Support serial"
698	help
699	  Enable support for serial in SPL. This allows use of a serial UART
700	  for displaying messages while SPL is running. It also brings in
701	  printf() and panic() functions. This should normally be enabled
702	  unless there are space reasons not to. Even then, consider
703	  enabling USE_TINY_PRINTF which is a small printf() version.
704
705config SPL_SPI_FLASH_SUPPORT
706	bool "Support SPI flash drivers"
707	help
708	  Enable support for using SPI flash in SPL, and loading U-Boot from
709	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
710	  the SPI bus that is used to connect it to a system. It is a simple
711	  but fast bidirectional 4-wire bus (clock, chip select and two data
712	  lines). This enables the drivers in drivers/mtd/spi as part of an
713	  SPL build. This normally requires SPL_SPI_SUPPORT.
714
715config SPL_RKNAND_SUPPORT
716	bool "Rockchip NAND FLASH device support"
717	depends on BLK
718	select RKNAND
719	select ZFTL if (ROCKCHIP_PX30 || ROCKCHIP_RK3568)
720	help
721	  This option enables support for Rockchip NAND FLASH devices.
722	  It supports block interface(with rk ftl) to read and write NAND FLASH.
723
724config RKNAND_BLK_U_BOOT_OFFS
725	hex "Location in RKNAND block to read U-Boot from"
726	default 0x4000
727	depends on SPL_RKNAND_SUPPORT
728	help
729	  Set the offset from the start of the rknand device where
730	  u-boot should be loaded from.
731
732if SPL_SPI_FLASH_SUPPORT
733
734config SPL_SPI_FLASH_TINY
735	bool "Enable low footprint SPL SPI Flash support"
736	depends on !SPI_FLASH_BAR
737	help
738	 Enable lightweight SPL SPI Flash support that supports just reading
739	 data/images from flash. No support to write/erase flash. Enable
740	 this if you have SPL size limitations and don't need full
741	 fledged SPI flash support.
742
743config SPL_SPI_FLASH_SFDP_SUPPORT
744	bool "SFDP table parsing support for SPI NOR flashes"
745	depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
746	help
747	 Enable support for parsing and auto discovery of parameters for
748	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
749	 tables as per JESD216 standard in SPL.
750
751config SPL_SPI_LOAD
752	bool "Support loading from SPI flash"
753	help
754	  Enable support for loading next stage, U-Boot or otherwise, from
755	  SPI NOR in U-Boot SPL.
756
757endif # SPL_SPI_FLASH_SUPPORT
758
759config SPL_SPI_SUPPORT
760	bool "Support SPI drivers"
761	help
762	  Enable support for using SPI in SPL. This is used for connecting
763	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
764	  more details on that. The SPI driver provides the transport for
765	  data between the SPI flash and the CPU. This option can be used to
766	  enable SPI drivers that are needed for other purposes also, such
767	  as a SPI PMIC.
768
769config SPL_USB_HOST_SUPPORT
770	bool "Support USB host drivers"
771	help
772	  Enable access to USB (Universal Serial Bus) host devices so that
773	  SPL can load U-Boot from a connected USB peripheral, such as a USB
774	  flash stick. While USB takes a little longer to start up than most
775	  buses, it is very flexible since many different types of storage
776	  device can be attached. This option enables the drivers in
777	  drivers/usb/host as part of an SPL build.
778
779config SPL_USB_SUPPORT
780	bool "Support loading from USB"
781	depends on SPL_USB_HOST_SUPPORT
782	help
783	  Enable support for USB devices in SPL. This allows use of USB
784	  devices such as hard drives and flash drivers for loading U-Boot.
785	  The actual drivers are enabled separately using the normal U-Boot
786	  config options. This enables loading from USB using a configured
787	  device.
788
789config SPL_USB_GADGET
790	bool "Suppport USB Gadget drivers"
791	help
792	  Enable USB Gadget API which allows to enable USB device functions
793	  in SPL.
794
795if SPL_USB_GADGET
796
797config SPL_USBETH_SUPPORT
798	bool "Support USB Ethernet drivers"
799	help
800	  Enable access to the USB network subsystem and associated
801	  drivers in SPL. This permits SPL to load U-Boot over a
802	  USB-connected Ethernet link (such as a USB Ethernet dongle) rather
803	  than from an onboard peripheral. Environment support is required
804	  since the network stack uses a number of environment variables.
805	  See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
806
807config SPL_DFU
808	bool "Support DFU (Device Firmware Upgrade)"
809	select SPL_HASH_SUPPORT
810	select SPL_DFU_NO_RESET
811	depends on SPL_RAM_SUPPORT
812	help
813	  This feature enables the DFU (Device Firmware Upgarde) in SPL with
814	  RAM memory device support. The ROM code will load and execute
815	  the SPL built with dfu. The user can load binaries (u-boot/kernel) to
816	  selected device partition from host-pc using dfu-utils.
817	  This feature is useful to flash the binaries to factory or bare-metal
818	  boards using USB interface.
819
820choice
821	bool "DFU device selection"
822	depends on SPL_DFU
823
824config SPL_DFU_RAM
825	bool "RAM device"
826	depends on SPL_DFU && SPL_RAM_SUPPORT
827	help
828	 select RAM/DDR memory device for loading binary images
829	 (u-boot/kernel) to the selected device partition using
830	 DFU and execute the u-boot/kernel from RAM.
831
832endchoice
833
834config SPL_USB_SDP_SUPPORT
835	bool "Support SDP (Serial Download Protocol)"
836	help
837	  Enable Serial Download Protocol (SDP) device support in SPL. This
838	  allows to download images into memory and execute (jump to) them
839	  using the same protocol as implemented by the i.MX family's boot ROM.
840endif
841
842config SPL_WATCHDOG_SUPPORT
843	bool "Support watchdog drivers"
844	help
845	  Enable support for watchdog drivers in SPL. A watchdog is
846	  typically a hardware peripheral which can reset the system when it
847	  detects no activity for a while (such as a software crash). This
848	  enables the drivers in drivers/watchdog as part of an SPL build.
849
850config SPL_YMODEM_SUPPORT
851	bool "Support loading using Ymodem"
852	help
853	  While loading from serial is slow it can be a useful backup when
854	  there is no other option. The Ymodem protocol provides a reliable
855	  means of transmitting U-Boot over a serial line for using in SPL,
856	  with a checksum to ensure correctness.
857
858config SPL_ATF
859	bool "Support ARM Trusted Firmware"
860	depends on ARM64
861	help
862	  ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
863	  is loaded by SPL (which is considered as BL2 in ATF terminology).
864	  More detail at: https://github.com/ARM-software/arm-trusted-firmware
865
866config SPL_OPTEE_SUPPORT
867	bool "Support OP-TEE Trusted OS"
868	depends on ARM
869	help
870	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
871	  More detail at: https://github.com/OP-TEE/optee_os
872
873config SPL_ATF_NO_PLATFORM_PARAM
874        bool "Pass no platform parameter"
875	depends on SPL_ATF
876	help
877	  While we expect to call a pointer to a valid FDT (or NULL)
878	  as the platform parameter to an ATF, some ATF versions are
879	  not U-Boot aware and have an insufficiently robust parameter
880	  validation to gracefully reject a FDT being passed.
881
882	  If this option is enabled, the spl_atf os-type handler will
883	  always pass NULL for the platform parameter.
884
885	  If your ATF is affected, say Y.
886
887config SPL_ATF_AARCH32_BL33
888	bool "Support BL33 runs as AArch32 mode"
889	depends on SPL_ATF
890	help
891	  This option setup the AArch32 Mode for BL33.
892
893config SPL_OPTEE
894	bool "Support OP-TEE Trusted OS"
895	depends on ARM
896	help
897	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
898	  More detail at: https://github.com/OP-TEE/optee_os
899
900config SPL_AB
901	bool "Support AB system boot"
902	depends on SPL && SPL_LIBDISK_SUPPORT
903	select SPL_MTD_WRITE if SPL_MTD_SUPPORT
904	select SPL_MMC_WRITE if SPL_MMC_SUPPORT
905	help
906	  Enable this config to support AB system boot.
907
908config SPL_LOAD_RKFW
909	bool "SPL support load rockchip firmware images"
910	depends on SPL
911	help
912	  This enables SPL support load rockchip firmware images.
913	  Please define both RKFW_TRUST_SECTOR and RKFW_U_BOOT_SECTOR
914	  for trust and U-Boot images.
915
916config RKFW_TRUST_SECTOR
917	hex "rockchip trust image load sector"
918	depends on SPL_LOAD_RKFW
919	default 0x6000
920
921config RKFW_U_BOOT_SECTOR
922	hex "rockchip uboot image load sector"
923	depends on SPL_LOAD_RKFW
924	default 0x4000
925
926config RKFW_BOOT_SECTOR
927        hex "rockchip boot image load sector"
928        depends on SPL_LOAD_RKFW
929        default 0xa000
930
931config SPL_KERNEL_BOOT
932	bool "Enable boot kernel in SPL"
933	depends on SPL
934	help
935	  Enable boot kernel in SPL.
936
937config SPL_KERNEL_BOOT_PREBUILT
938	bool "Enable boot kernel in SPL with prebuilt program"
939	depends on SPL_KERNEL_BOOT
940	default y
941	help
942	  Enable boot kernel in SPL with prebuilt program.
943
944config SPL_KERNEL_BOOT_SECTOR
945	hex "Sector address to load kernel in SPL"
946	depends on SPL_KERNEL_BOOT
947	depends on !SPL_LIBDISK_SUPPORT
948	default 0xa000
949
950config SPL_KERNEL_RAMDISK_SECTOR
951	hex "Sector address to load ramdisk in SPL"
952	depends on SPL_KERNEL_BOOT
953	depends on !SPL_LIBDISK_SUPPORT
954	default 0xf000
955
956if SPL_LOAD_RKFW
957config SPL_KERNEL_ADDR
958	hex "Kernel load address in spl"
959	depends on SPL
960	default 0x280000
961	help
962	  Define the kernel address where load kernel image to.
963	  This is used to boot kernel in spl.
964
965config SPL_KERNEL_COMPRESS_ADDR
966	hex "The compressed kernel in spl"
967	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
968	help
969	  Load compressed kernel in this address, then call the
970	  decompress process to decompress the firmware.
971
972config SPL_KERNEL_DECOM_LIMIT_SIZE
973        hex "The decompress limit size"
974        depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
975	default 0x1ff8000
976        help
977          Define kernel maximum decompressible size that prevent
978          memory overrun.
979
980config SPL_FDT_ADDR
981	hex "Device tree blob load address in spl"
982	depends on SPL
983	default 0x01f00000
984	help
985	  Define the fdt address where load dtb image to.
986	  This is used to boot kernel in spl.
987
988config SPL_RAMDISK_ADDR
989	hex "Ramdisk load address in spl"
990	depends on SPL
991	default 0x0a200000
992	help
993	  Define the ramdisk address where load ramdisk image to.
994	  This is used to boot kernel in spl.
995
996config SPL_RAMDISK_COMPRESS_ADDR
997	hex "The compressed ramdisk in spl"
998	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
999	help
1000	  Load compressed ramdisk in this address, then call the
1001	  decompress process to decompress the firmware.
1002
1003config SPL_RAMDISK_DECOM_LIMIT_SIZE
1004	hex "The decompress limit size"
1005	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
1006	default 0x3000000
1007	help
1008	  Define ramdisk maximum decompressible size that prevent
1009	  memory overrun.
1010endif
1011
1012config TPL
1013	bool
1014	depends on SUPPORT_TPL
1015	prompt "Enable TPL"
1016	help
1017	  If you want to build TPL as well as the normal image and SPL, say Y.
1018
1019if TPL
1020
1021config TPL_BOARD_INIT
1022	bool "Call board-specific initialization in TPL"
1023	help
1024	  If this option is enabled, U-Boot will call the function
1025	  spl_board_init() from board_init_r(). This function should be
1026	  provided by the board.
1027
1028config TPL_LDSCRIPT
1029        string "Linker script for the TPL stage"
1030	depends on TPL
1031	help
1032	  The TPL stage will usually require a different linker-script
1033	  (as it runs from a different memory region) than the regular
1034	  U-Boot stage.  Set this to the path of the linker-script to
1035	  be used for TPL.
1036
1037	  May be left empty to trigger the Makefile infrastructure to
1038	  fall back to the linker-script used for the SPL stage.
1039
1040config TPL_NEEDS_SEPARATE_TEXT_BASE
1041        bool "TPL needs a separate text-base"
1042	default n
1043	depends on TPL
1044	help
1045	  Enable, if the TPL stage should not inherit its text-base
1046	  from the SPL stage.  When enabled, a base address for the
1047	  .text sections of the TPL stage has to be set below.
1048
1049config TPL_NEEDS_SEPARATE_STACK
1050        bool "TPL needs a separate initial stack-pointer"
1051	default n
1052	depends on TPL
1053	help
1054	  Enable, if the TPL stage should not inherit its initial
1055	  stack-pointer from the settings for the SPL stage.
1056
1057config TPL_TEXT_BASE
1058        hex "Base address for the .text section of the TPL stage"
1059	depends on TPL_NEEDS_SEPARATE_TEXT_BASE
1060	help
1061	  The base address for the .text section of the TPL stage.
1062
1063config TPL_MAX_SIZE
1064        int "Maximum size (in bytes) for the TPL stage"
1065	default 0
1066	depends on TPL
1067	help
1068	  The maximum size (in bytes) of the TPL stage.
1069
1070config TPL_STACK
1071        hex "Address of the initial stack-pointer for the TPL stage"
1072	depends on TPL_NEEDS_SEPARATE_STACK
1073	help
1074	  The address of the initial stack-pointer for the TPL stage.
1075	  Usually this will be the (aligned) top-of-stack.
1076
1077config TPL_BOOTROM_SUPPORT
1078        bool "Support returning to the BOOTROM (from TPL)"
1079	help
1080	  Some platforms (e.g. the Rockchip RK3368) provide support in their
1081	  ROM for loading the next boot-stage after performing basic setup
1082	  from the TPL stage.
1083
1084	  Enable this option, to return to the BOOTROM through the
1085	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
1086	  boot device list, if not implemented for a given board)
1087
1088config TPL_DRIVERS_MISC_SUPPORT
1089	bool "Support misc drivers in TPL"
1090	help
1091	  Enable miscellaneous drivers in TPL. These drivers perform various
1092	  tasks that don't fall nicely into other categories, Enable this
1093	  option to build the drivers in drivers/misc as part of an TPL
1094	  build, for those that support building in TPL (not all drivers do).
1095
1096config TPL_ENV_SUPPORT
1097	bool "Support an environment"
1098	help
1099	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
1100
1101config TPL_I2C_SUPPORT
1102	bool "Support I2C"
1103	help
1104	  Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for
1105	  details.
1106
1107config TPL_LIBCOMMON_SUPPORT
1108	bool "Support common libraries"
1109	help
1110	  Enable support for common U-Boot libraries within TPL. See
1111	  SPL_LIBCOMMON_SUPPORT for details.
1112
1113config TPL_LIBGENERIC_SUPPORT
1114	bool "Support generic libraries"
1115	help
1116	  Enable support for generic U-Boot libraries within TPL. See
1117	  SPL_LIBGENERIC_SUPPORT for details.
1118
1119config TPL_TINY_FRAMEWORK
1120	bool "Support not to use spl framework in TPL"
1121	help
1122	  Enable support for not using spl framework in TPL, to reduce the TPL size.
1123
1124config TPL_MPC8XXX_INIT_DDR_SUPPORT
1125	bool "Support MPC8XXX DDR init"
1126	help
1127	  Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
1128	  SPL_MPC8XXX_INIT_DDR_SUPPORT for details.
1129
1130config TPL_MMC_SUPPORT
1131	bool "Support MMC"
1132	depends on MMC
1133	help
1134	  Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
1135
1136config TPL_NAND_SUPPORT
1137	bool "Support NAND flash"
1138	help
1139	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
1140
1141config TPL_SERIAL_SUPPORT
1142	bool "Support serial"
1143	help
1144	  Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
1145	  details.
1146
1147config TPL_SPI_FLASH_SUPPORT
1148	bool "Support SPI flash drivers"
1149	help
1150	  Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
1151	  for details.
1152
1153config TPL_SPI_SUPPORT
1154	bool "Support SPI drivers"
1155	help
1156	  Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for
1157	  details.
1158
1159endif # TPL
1160
1161endif # SPL
1162endmenu
1163