xref: /rk3399_rockchip-uboot/common/spl/Kconfig (revision effae6d71544d6cab5ae01aa7160bb709b3a3e6e)
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_KERNEL_BOOT
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 MTD_BLK_U_BOOT_OFFS
469	hex "Location in MTD block to read U-Boot from"
470	default 0x4000
471	depends on SPL_MTD_SUPPORT
472	help
473	  Set the offset from the start of the nand,spi nand and nor flash where
474	  u-boot should be loaded from.
475
476config SPL_MUSB_NEW_SUPPORT
477	bool "Support new Mentor Graphics USB"
478	help
479	  Enable support for Mentor Graphics USB in SPL. This is a new
480	  driver used by some boards. Enable this option to build
481	  the drivers in drivers/usb/musb-new as part of an SPL build. The
482	  old drivers are in drivers/usb/musb.
483
484config SPL_NAND_SUPPORT
485	bool "Support NAND flash"
486	help
487	  Enable support for NAND (Negative AND) flash in SPL. NAND flash
488	  can be used to allow SPL to load U-Boot from supported devices.
489	  This enables the drivers in drivers/mtd/nand/raw as part of an SPL
490	  build.
491
492config SPL_NET_SUPPORT
493	bool "Support networking"
494	help
495	  Enable support for network devices (such as Ethernet) in SPL.
496	  This permits SPL to load U-Boot over a network link rather than
497	  from an on-board peripheral. Environment support is required since
498	  the network stack uses a number of environment variables. See also
499	  SPL_ETH_SUPPORT.
500
501if SPL_NET_SUPPORT
502config SPL_NET_VCI_STRING
503	string "BOOTP Vendor Class Identifier string sent by SPL"
504	help
505	  As defined by RFC 2132 the vendor class identifier field can be
506	  sent by the client to identify the vendor type and configuration
507	  of a client.  This is often used in practice to allow for the DHCP
508	  server to specify different files to load depending on if the ROM,
509	  SPL or U-Boot itself makes the request
510endif   # if SPL_NET_SUPPORT
511
512config SPL_NO_CPU_SUPPORT
513	bool "Drop CPU code in SPL"
514	help
515	  This is specific to the ARM926EJ-S CPU. It disables the standard
516	  start.S start-up code, presumably so that a replacement can be
517	  used on that CPU. You should not enable it unless you know what
518	  you are doing.
519
520config SPL_NOR_SUPPORT
521	bool "Support NOR flash"
522	help
523	  Enable support for loading U-Boot from memory-mapped NOR (Negative
524	  OR) flash in SPL. NOR flash is slow to write but fast to read, and
525	  a memory-mapped device makes it very easy to access. Loading from
526	  NOR is typically achieved with just a memcpy().
527
528config SPL_XIP_SUPPORT
529	bool "Support XIP"
530	depends on SPL
531	help
532	  Enable support for execute in place of U-Boot or kernel image. There
533	  is no need to copy image from flash to ram if flash supports execute
534	  in place. Its very useful in systems having enough flash but not
535	  enough ram to load the image.
536
537config SPL_ONENAND_SUPPORT
538	bool "Support OneNAND flash"
539	help
540	  Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
541	  a type of NAND flash and therefore can be used to allow SPL to
542	  load U-Boot from supported devices. This enables the drivers in
543	  drivers/mtd/onenand as part of an SPL build.
544
545config SPL_OS_BOOT
546	bool "Activate Falcon Mode"
547	depends on !TI_SECURE_DEVICE
548	default n
549	help
550	  Enable booting directly to an OS from SPL.
551	  for more info read doc/README.falcon
552
553if SPL_OS_BOOT
554config SYS_OS_BASE
555	hex "addr, where OS is found"
556	depends on SPL_NOR_SUPPORT
557	help
558	  Specify the address, where the OS image is found, which
559	  gets booted.
560
561endif # SPL_OS_BOOT
562
563config SPL_PCI_SUPPORT
564	bool "Support PCI drivers"
565	help
566	  Enable support for PCI in SPL. For platforms that need PCI to boot,
567	  or must perform some init using PCI in SPL, this provides the
568	  necessary driver support. This enables the drivers in drivers/pci
569	  as part of an SPL build.
570
571config SPL_PCH_SUPPORT
572	bool "Support PCH drivers"
573	help
574	  Enable support for PCH (Platform Controller Hub) devices in SPL.
575	  These are used to set up GPIOs and the SPI peripheral early in
576	  boot. This enables the drivers in drivers/pch as part of an SPL
577	  build.
578
579config SPL_POST_MEM_SUPPORT
580	bool "Support POST drivers"
581	help
582	  Enable support for POST (Power-on Self Test) in SPL. POST is a
583	  procedure that checks that the hardware (CPU or board) appears to
584	  be functionally correctly. It is a sanity check that can be
585	  performed before booting. This enables the drivers in post/drivers
586	  as part of an SPL build.
587
588config SPL_POWER_SUPPORT
589	bool "Support power drivers"
590	help
591	  Enable support for power control in SPL. This includes support
592	  for PMICs (Power-management Integrated Circuits) and some of the
593	  features provided by PMICs. In particular, voltage regulators can
594	  be used to enable/disable power and vary its voltage. That can be
595	  useful in SPL to turn on boot peripherals and adjust CPU voltage
596	  so that the clock speed can be increased. This enables the drivers
597	  in drivers/power, drivers/power/pmic and drivers/power/regulator
598	  as part of an SPL build.
599
600config SPL_PWM_SUPPORT
601	bool "Support PWM driver"
602	depends on SPL
603	help
604	  Enable support for pwm in SPL. This allows use pwm to control
605	  somethings, for example control voltage.
606
607config SPL_RAM_SUPPORT
608	bool "Support booting from RAM"
609	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
610	help
611	  Enable booting of an image in RAM. The image can be preloaded or
612	  it can be loaded by SPL directly into RAM (e.g. using USB).
613
614config SPL_RAM_DEVICE
615	bool "Support booting from preloaded image in RAM"
616	depends on SPL_RAM_SUPPORT
617	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
618	help
619	  Enable booting of an image already loaded in RAM. The image has to
620	  be already in memory when SPL takes over, e.g. loaded by the boot
621	  ROM.
622
623config SPL_RTC_SUPPORT
624	bool "Support RTC drivers"
625	help
626	  Enable RTC (Real-time Clock) support in SPL. This includes support
627	  for reading and setting the time. Some RTC devices also have some
628	  non-volatile (battery-backed) memory which is accessible if
629	  needed. This enables the drivers in drivers/rtc as part of an SPL
630	  build.
631
632config SPL_SATA_SUPPORT
633	bool "Support loading from SATA"
634	help
635	  Enable support for SATA (Serial AT attachment) in SPL. This allows
636	  use of SATA devices such as hard drives and flash drivers for
637	  loading U-Boot. SATA is used in higher-end embedded systems and
638	  can provide higher performance than MMC , at somewhat higher
639	  expense and power consumption. This enables loading from SATA
640	  using a configured device.
641
642config SPL_SERIAL_SUPPORT
643	bool "Support serial"
644	help
645	  Enable support for serial in SPL. This allows use of a serial UART
646	  for displaying messages while SPL is running. It also brings in
647	  printf() and panic() functions. This should normally be enabled
648	  unless there are space reasons not to. Even then, consider
649	  enabling USE_TINY_PRINTF which is a small printf() version.
650
651config SPL_SPI_FLASH_SUPPORT
652	bool "Support SPI flash drivers"
653	help
654	  Enable support for using SPI flash in SPL, and loading U-Boot from
655	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
656	  the SPI bus that is used to connect it to a system. It is a simple
657	  but fast bidirectional 4-wire bus (clock, chip select and two data
658	  lines). This enables the drivers in drivers/mtd/spi as part of an
659	  SPL build. This normally requires SPL_SPI_SUPPORT.
660
661config SPL_RKNAND_SUPPORT
662	bool "Rockchip NAND FLASH device support"
663	depends on BLK
664	select RKNAND
665	select ZFTL if (ROCKCHIP_PX30 || ROCKCHIP_RK3568)
666	help
667	  This option enables support for Rockchip NAND FLASH devices.
668	  It supports block interface(with rk ftl) to read and write NAND FLASH.
669
670config RKNAND_BLK_U_BOOT_OFFS
671	hex "Location in RKNAND block to read U-Boot from"
672	default 0x4000
673	depends on SPL_RKNAND_SUPPORT
674	help
675	  Set the offset from the start of the rknand device where
676	  u-boot should be loaded from.
677
678if SPL_SPI_FLASH_SUPPORT
679
680config SPL_SPI_FLASH_TINY
681	bool "Enable low footprint SPL SPI Flash support"
682	depends on !SPI_FLASH_BAR
683	help
684	 Enable lightweight SPL SPI Flash support that supports just reading
685	 data/images from flash. No support to write/erase flash. Enable
686	 this if you have SPL size limitations and don't need full
687	 fledged SPI flash support.
688
689config SPL_SPI_FLASH_SFDP_SUPPORT
690	bool "SFDP table parsing support for SPI NOR flashes"
691	depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
692	help
693	 Enable support for parsing and auto discovery of parameters for
694	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
695	 tables as per JESD216 standard in SPL.
696
697config SPL_SPI_LOAD
698	bool "Support loading from SPI flash"
699	help
700	  Enable support for loading next stage, U-Boot or otherwise, from
701	  SPI NOR in U-Boot SPL.
702
703endif # SPL_SPI_FLASH_SUPPORT
704
705config SPL_SPI_SUPPORT
706	bool "Support SPI drivers"
707	help
708	  Enable support for using SPI in SPL. This is used for connecting
709	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
710	  more details on that. The SPI driver provides the transport for
711	  data between the SPI flash and the CPU. This option can be used to
712	  enable SPI drivers that are needed for other purposes also, such
713	  as a SPI PMIC.
714
715config SPL_USB_HOST_SUPPORT
716	bool "Support USB host drivers"
717	help
718	  Enable access to USB (Universal Serial Bus) host devices so that
719	  SPL can load U-Boot from a connected USB peripheral, such as a USB
720	  flash stick. While USB takes a little longer to start up than most
721	  buses, it is very flexible since many different types of storage
722	  device can be attached. This option enables the drivers in
723	  drivers/usb/host as part of an SPL build.
724
725config SPL_USB_SUPPORT
726	bool "Support loading from USB"
727	depends on SPL_USB_HOST_SUPPORT
728	help
729	  Enable support for USB devices in SPL. This allows use of USB
730	  devices such as hard drives and flash drivers for loading U-Boot.
731	  The actual drivers are enabled separately using the normal U-Boot
732	  config options. This enables loading from USB using a configured
733	  device.
734
735config SPL_USB_GADGET
736	bool "Suppport USB Gadget drivers"
737	help
738	  Enable USB Gadget API which allows to enable USB device functions
739	  in SPL.
740
741if SPL_USB_GADGET
742
743config SPL_USBETH_SUPPORT
744	bool "Support USB Ethernet drivers"
745	help
746	  Enable access to the USB network subsystem and associated
747	  drivers in SPL. This permits SPL to load U-Boot over a
748	  USB-connected Ethernet link (such as a USB Ethernet dongle) rather
749	  than from an onboard peripheral. Environment support is required
750	  since the network stack uses a number of environment variables.
751	  See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
752
753config SPL_DFU
754	bool "Support DFU (Device Firmware Upgrade)"
755	select SPL_HASH_SUPPORT
756	select SPL_DFU_NO_RESET
757	depends on SPL_RAM_SUPPORT
758	help
759	  This feature enables the DFU (Device Firmware Upgarde) in SPL with
760	  RAM memory device support. The ROM code will load and execute
761	  the SPL built with dfu. The user can load binaries (u-boot/kernel) to
762	  selected device partition from host-pc using dfu-utils.
763	  This feature is useful to flash the binaries to factory or bare-metal
764	  boards using USB interface.
765
766choice
767	bool "DFU device selection"
768	depends on SPL_DFU
769
770config SPL_DFU_RAM
771	bool "RAM device"
772	depends on SPL_DFU && SPL_RAM_SUPPORT
773	help
774	 select RAM/DDR memory device for loading binary images
775	 (u-boot/kernel) to the selected device partition using
776	 DFU and execute the u-boot/kernel from RAM.
777
778endchoice
779
780config SPL_USB_SDP_SUPPORT
781	bool "Support SDP (Serial Download Protocol)"
782	help
783	  Enable Serial Download Protocol (SDP) device support in SPL. This
784	  allows to download images into memory and execute (jump to) them
785	  using the same protocol as implemented by the i.MX family's boot ROM.
786endif
787
788config SPL_WATCHDOG_SUPPORT
789	bool "Support watchdog drivers"
790	help
791	  Enable support for watchdog drivers in SPL. A watchdog is
792	  typically a hardware peripheral which can reset the system when it
793	  detects no activity for a while (such as a software crash). This
794	  enables the drivers in drivers/watchdog as part of an SPL build.
795
796config SPL_YMODEM_SUPPORT
797	bool "Support loading using Ymodem"
798	help
799	  While loading from serial is slow it can be a useful backup when
800	  there is no other option. The Ymodem protocol provides a reliable
801	  means of transmitting U-Boot over a serial line for using in SPL,
802	  with a checksum to ensure correctness.
803
804config SPL_ATF
805	bool "Support ARM Trusted Firmware"
806	depends on ARM64
807	help
808	  ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
809	  is loaded by SPL (which is considered as BL2 in ATF terminology).
810	  More detail at: https://github.com/ARM-software/arm-trusted-firmware
811
812config SPL_OPTEE_SUPPORT
813	bool "Support OP-TEE Trusted OS"
814	depends on ARM
815	help
816	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
817	  More detail at: https://github.com/OP-TEE/optee_os
818
819config SPL_ATF_NO_PLATFORM_PARAM
820        bool "Pass no platform parameter"
821	depends on SPL_ATF
822	help
823	  While we expect to call a pointer to a valid FDT (or NULL)
824	  as the platform parameter to an ATF, some ATF versions are
825	  not U-Boot aware and have an insufficiently robust parameter
826	  validation to gracefully reject a FDT being passed.
827
828	  If this option is enabled, the spl_atf os-type handler will
829	  always pass NULL for the platform parameter.
830
831	  If your ATF is affected, say Y.
832
833config SPL_OPTEE
834	bool "Support OP-TEE Trusted OS"
835	depends on ARM
836	help
837	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
838	  More detail at: https://github.com/OP-TEE/optee_os
839
840config SPL_AB
841	bool "Support AB system boot"
842	depends on SPL && SPL_EFI_PARTITION
843	help
844	  Enable this config to support AB system boot.
845
846config SPL_LOAD_RKFW
847	bool "SPL support load rockchip firmware images"
848	depends on SPL
849	help
850	  This enables SPL support load rockchip firmware images.
851	  Please define both RKFW_TRUST_SECTOR and RKFW_U_BOOT_SECTOR
852	  for trust and U-Boot images.
853
854config RKFW_TRUST_SECTOR
855	hex "rockchip trust image load sector"
856	depends on SPL_LOAD_RKFW
857	default 0x6000
858
859config RKFW_U_BOOT_SECTOR
860	hex "rockchip uboot image load sector"
861	depends on SPL_LOAD_RKFW
862	default 0x4000
863
864config RKFW_BOOT_SECTOR
865        hex "rockchip boot image load sector"
866        depends on SPL_LOAD_RKFW
867        default 0xa000
868
869config SPL_KERNEL_BOOT
870	bool "Enable boot kernel in SPL"
871	depends on SPL
872	help
873	  Enable boot kernel in SPL.
874
875config SPL_KERNEL_BOOT_SECTOR
876	hex "Sector address to load kernel in SPL"
877	depends on SPL_KERNEL_BOOT
878	depends on !SPL_LIBDISK_SUPPORT
879	default 0xa000
880
881if SPL_LOAD_RKFW
882config SPL_KERNEL_ADDR
883	hex "Kernel load address in spl"
884	depends on SPL
885	default 0x280000
886	help
887	  Define the kernel address where load kernel image to.
888	  This is used to boot kernel in spl.
889
890config SPL_KERNEL_COMPRESS_ADDR
891	hex "The compressed kernel in spl"
892	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
893	help
894	  Load compressed kernel in this address, then call the
895	  decompress process to decompress the firmware.
896
897config SPL_KERNEL_DECOM_LIMIT_SIZE
898        hex "The decompress limit size"
899        depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
900	default 0x1ff8000
901        help
902          Define kernel maximum decompressible size that prevent
903          memory overrun.
904
905config SPL_FDT_ADDR
906	hex "Device tree blob load address in spl"
907	depends on SPL
908	default 0x01f00000
909	help
910	  Define the fdt address where load dtb image to.
911	  This is used to boot kernel in spl.
912
913config SPL_RAMDISK_ADDR
914	hex "Ramdisk load address in spl"
915	depends on SPL
916	default 0x0a200000
917	help
918	  Define the ramdisk address where load ramdisk image to.
919	  This is used to boot kernel in spl.
920
921config SPL_RAMDISK_COMPRESS_ADDR
922	hex "The compressed ramdisk in spl"
923	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
924	help
925	  Load compressed ramdisk in this address, then call the
926	  decompress process to decompress the firmware.
927
928config SPL_RAMDISK_DECOM_LIMIT_SIZE
929	hex "The decompress limit size"
930	depends on SPL && SPL_ROCKCHIP_HW_DECOMPRESS
931	default 0x3000000
932	help
933	  Define ramdisk maximum decompressible size that prevent
934	  memory overrun.
935endif
936
937config TPL
938	bool
939	depends on SUPPORT_TPL
940	prompt "Enable TPL"
941	help
942	  If you want to build TPL as well as the normal image and SPL, say Y.
943
944if TPL
945
946config TPL_BOARD_INIT
947	bool "Call board-specific initialization in TPL"
948	help
949	  If this option is enabled, U-Boot will call the function
950	  spl_board_init() from board_init_r(). This function should be
951	  provided by the board.
952
953config TPL_LDSCRIPT
954        string "Linker script for the TPL stage"
955	depends on TPL
956	help
957	  The TPL stage will usually require a different linker-script
958	  (as it runs from a different memory region) than the regular
959	  U-Boot stage.  Set this to the path of the linker-script to
960	  be used for TPL.
961
962	  May be left empty to trigger the Makefile infrastructure to
963	  fall back to the linker-script used for the SPL stage.
964
965config TPL_NEEDS_SEPARATE_TEXT_BASE
966        bool "TPL needs a separate text-base"
967	default n
968	depends on TPL
969	help
970	  Enable, if the TPL stage should not inherit its text-base
971	  from the SPL stage.  When enabled, a base address for the
972	  .text sections of the TPL stage has to be set below.
973
974config TPL_NEEDS_SEPARATE_STACK
975        bool "TPL needs a separate initial stack-pointer"
976	default n
977	depends on TPL
978	help
979	  Enable, if the TPL stage should not inherit its initial
980	  stack-pointer from the settings for the SPL stage.
981
982config TPL_TEXT_BASE
983        hex "Base address for the .text section of the TPL stage"
984	depends on TPL_NEEDS_SEPARATE_TEXT_BASE
985	help
986	  The base address for the .text section of the TPL stage.
987
988config TPL_MAX_SIZE
989        int "Maximum size (in bytes) for the TPL stage"
990	default 0
991	depends on TPL
992	help
993	  The maximum size (in bytes) of the TPL stage.
994
995config TPL_STACK
996        hex "Address of the initial stack-pointer for the TPL stage"
997	depends on TPL_NEEDS_SEPARATE_STACK
998	help
999	  The address of the initial stack-pointer for the TPL stage.
1000	  Usually this will be the (aligned) top-of-stack.
1001
1002config TPL_BOOTROM_SUPPORT
1003        bool "Support returning to the BOOTROM (from TPL)"
1004	help
1005	  Some platforms (e.g. the Rockchip RK3368) provide support in their
1006	  ROM for loading the next boot-stage after performing basic setup
1007	  from the TPL stage.
1008
1009	  Enable this option, to return to the BOOTROM through the
1010	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
1011	  boot device list, if not implemented for a given board)
1012
1013config TPL_DRIVERS_MISC_SUPPORT
1014	bool "Support misc drivers in TPL"
1015	help
1016	  Enable miscellaneous drivers in TPL. These drivers perform various
1017	  tasks that don't fall nicely into other categories, Enable this
1018	  option to build the drivers in drivers/misc as part of an TPL
1019	  build, for those that support building in TPL (not all drivers do).
1020
1021config TPL_ENV_SUPPORT
1022	bool "Support an environment"
1023	help
1024	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
1025
1026config TPL_I2C_SUPPORT
1027	bool "Support I2C"
1028	help
1029	  Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for
1030	  details.
1031
1032config TPL_LIBCOMMON_SUPPORT
1033	bool "Support common libraries"
1034	help
1035	  Enable support for common U-Boot libraries within TPL. See
1036	  SPL_LIBCOMMON_SUPPORT for details.
1037
1038config TPL_LIBGENERIC_SUPPORT
1039	bool "Support generic libraries"
1040	help
1041	  Enable support for generic U-Boot libraries within TPL. See
1042	  SPL_LIBGENERIC_SUPPORT for details.
1043
1044config TPL_TINY_FRAMEWORK
1045	bool "Support not to use spl framework in TPL"
1046	help
1047	  Enable support for not using spl framework in TPL, to reduce the TPL size.
1048
1049config TPL_MPC8XXX_INIT_DDR_SUPPORT
1050	bool "Support MPC8XXX DDR init"
1051	help
1052	  Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
1053	  SPL_MPC8XXX_INIT_DDR_SUPPORT for details.
1054
1055config TPL_MMC_SUPPORT
1056	bool "Support MMC"
1057	depends on MMC
1058	help
1059	  Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
1060
1061config TPL_NAND_SUPPORT
1062	bool "Support NAND flash"
1063	help
1064	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
1065
1066config TPL_SERIAL_SUPPORT
1067	bool "Support serial"
1068	help
1069	  Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
1070	  details.
1071
1072config TPL_SPI_FLASH_SUPPORT
1073	bool "Support SPI flash drivers"
1074	help
1075	  Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
1076	  for details.
1077
1078config TPL_SPI_SUPPORT
1079	bool "Support SPI drivers"
1080	help
1081	  Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for
1082	  details.
1083
1084endif # TPL
1085
1086endif # SPL
1087endmenu
1088