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