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