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