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