1menu "VPL options"
2	depends on VPL
3
4config VPL_BANNER_PRINT
5	bool "Enable output of the VPL banner 'U-Boot VPL ...'"
6	default y
7	help
8	  If this option is enabled, VPL will print the banner with version
9	  info. Disabling this option could be useful to reduce VPL boot time
10	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
11
12config VPL_LDSCRIPT
13	string "Linker script for the VPL stage"
14	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
15	default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
16	help
17	  The TPL stage will usually require a different linker-script
18	  (as it runs from a different memory region) than the regular
19	  U-Boot stage.  Set this to the path of the linker-script to
20	  be used for TPL.
21
22	  May be left empty to trigger the Makefile infrastructure to
23	  fall back to the linker-script used for the SPL stage.
24
25config VPL_BOARD_INIT
26	bool "Call board-specific initialization in VPL"
27	help
28	  If this option is enabled, U-Boot will call the function
29	  spl_board_init() from board_init_r(). This function should be
30	  provided by the board.
31
32config VPL_CACHE
33	depends on CACHE
34	bool "Support cache drivers in VPL"
35	help
36	  Enable support for cache drivers in VPL.
37
38config VPL_CRC32
39	bool "Support CRC32 in VPL"
40	default y if VPL_ENV_SUPPORT || VPL_BLOBLIST
41	help
42	  Enable this to support CRC32 in uImages or FIT images within VPL.
43	  This is a 32-bit checksum value that can be used to verify images.
44	  For FIT images, this is the least secure type of checksum, suitable
45	  for detected accidental image corruption. For secure applications you
46	  should consider SHA1 or SHA256.
47
48config VPL_DM_SPI
49	bool "Support SPI DM drivers in VPL"
50	help
51	  Enable support for SPI DM drivers in VPL.
52
53config VPL_DM_SPI_FLASH
54	bool "Support SPI DM FLASH drivers in VPL"
55	help
56	  Enable support for SPI DM flash drivers in VPL.
57
58config VPL_FRAMEWORK
59	bool "Support VPL based upon the common SPL framework"
60	default y
61	help
62	  Enable the SPL framework under common/spl/ for VPL builds.
63	  This framework supports MMC, NAND and YMODEM and other methods
64	  loading of U-Boot's next stage. If unsure, say Y.
65
66config VPL_HANDOFF
67	bool "Pass hand-off information from VPL to SPL"
68	depends on HANDOFF && VPL_BLOBLIST
69	default y
70	help
71	  This option enables VPL to write handoff information. This can be
72	  used to pass information like the size of SDRAM from VPL to SPL. Also
73	  VPL can receive information from TPL in the same place if that is
74	  enabled.
75
76config VPL_LIBCOMMON_SUPPORT
77	bool "Support common libraries"
78	default y if SPL_LIBCOMMON_SUPPORT
79	help
80	  Enable support for common U-Boot libraries within VPL. See
81	  SPL_LIBCOMMON_SUPPORT for details.
82
83config VPL_LIBGENERIC_SUPPORT
84	bool "Support generic libraries"
85	default y if SPL_LIBGENERIC_SUPPORT
86	help
87	  Enable support for generic U-Boot libraries within VPL. These
88	  libraries include generic code to deal with device tree, hashing,
89	  printf(), compression and the like. This option is enabled on many
90	  boards. Enable this option to build the code in lib/ as part of a
91	  VPL build.
92
93config VPL_DRIVERS_MISC
94	bool "Support misc drivers"
95	default y if TPL_DRIVERS_MISC
96	help
97	  Enable miscellaneous drivers in VPL. These drivers perform various
98	  tasks that don't fall nicely into other categories, Enable this
99	  option to build the drivers in drivers/misc as part of a VPL
100	  build, for those that support building in VPL (not all drivers do).
101
102config VPL_ENV_SUPPORT
103	bool "Support an environment"
104	help
105	  Enable environment support in VPL. The U-Boot environment provides
106	  a number of settings (essentially name/value pairs) which can
107	  control many aspects of U-Boot's operation. Enabling this option will
108	  make env_get() and env_set() available in VSPL.
109
110config VPL_GPIO
111	bool "Support GPIO in VPL"
112	default y if SPL_GPIO
113	help
114	  Enable support for GPIOs (General-purpose Input/Output) in VPL.
115	  GPIOs allow U-Boot to read the state of an input line (high or
116	  low) and set the state of an output line. This can be used to
117	  drive LEDs, control power to various system parts and read user
118	  input. GPIOs can be useful in VPL to enable a 'sign-of-life' LED,
119	  for example. Enable this option to build the drivers in
120	  drivers/gpio as part of a VPL build.
121
122config VPL_HANDOFF
123	bool "Pass hand-off information from VPL to SPL and U-Boot proper"
124	depends on HANDOFF && VPL_BLOBLIST
125	default y
126	help
127	  This option enables VPL to write handoff information. This can be
128	  used to pass information like the size of SDRAM from VPL to U-Boot
129	  proper. The information is also available to VPL if it is useful
130	  there.
131
132config VPL_HASH
133	bool "Support hashing drivers in VPL"
134	select SHA1
135	select SHA256
136	help
137	  Enable hashing drivers in VPL. These drivers can be used to
138	  accelerate secure boot processing in secure applications. Enable
139	  this option to build system-specific drivers for hash acceleration
140	  as part of a VPL build.
141
142config VPL_I2C_SUPPORT
143	bool "Support I2C in VPL"
144	default y if SPL_I2C_SUPPORT
145	help
146	  Enable support for the I2C bus in VPL. Vee SPL_I2C_SUPPORT for
147	  details.
148
149config VPL_MMC
150	bool "Support MMC in VPL"
151	depends on VPL && MMC
152	default y if MMC
153	help
154	  Enable support for MMC (Multimedia Card) within VPL This enables
155	  the MMC protocol implementation and allows any enabled drivers to
156	  be used within VPL. MMC can be used with or without disk partition
157	  support depending on the application (SPL_LIBDISK_SUPPORT). Enable
158	  this option to build the drivers in drivers/mmc as part of an VPL
159	  build.
160
161config VPL_DM_MMC
162	bool "Enable MMC controllers using Driver Model in VPL"
163	depends on VPL_DM && DM_MMC
164	default y
165	help
166	  This enables the MultiMediaCard (MMC) uclass which supports MMC and
167	  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
168	  and non-removable (e.g. eMMC chip) devices are supported. These
169	  appear as block devices in U-Boot and can support filesystems such
170	  as EXT4 and FAT.
171
172config VPL_MMC_WRITE
173	bool "MMC/SD/SDIO card support for write operations in VPL"
174	depends on VPL_MMC
175	default y
176	help
177	  Enable write access to MMC and SD Cards in VPL
178
179config VPL_PCH_SUPPORT
180	bool "Support PCH drivers"
181	default y if TPL_PCH_SUPPORT
182	help
183	  Enable support for PCH (Platform Controller Hub) devices in VPL.
184	  These are used to set up GPIOs and the SPI peripheral early in
185	  boot. This enables the drivers in drivers/pch as part of a VPL
186	  build.
187
188config VPL_PCI
189	bool "Support PCI drivers"
190	default y if SPL_PCI
191	help
192	  Enable support for PCI in VPL. For platforms that need PCI to boot,
193	  or must perform some init using PCI in VPL, this provides the
194	  necessary driver support. This enables the drivers in drivers/pci
195	  as part of a VPL build.
196
197config VPL_RELOC_LOADER
198	bool "Allow relocating the next phase"
199	help
200	  In some cases multiple U-Boot phases need to run in SRAM, typically
201	  at the same address. Enable this to support loading the next phase
202	  to temporary memory, then copying it into place afterwards, then
203	  jumping to it.
204
205config VPL_RTC
206	bool "Support RTC drivers"
207	help
208	  Enable RTC (Real-time Clock) support in VPL. This includes support
209	  for reading and setting the time. Some RTC devices also have some
210	  non-volatile (battery-backed) memory which is accessible if
211	  needed. This enables the drivers in drivers/rtc as part of a VPL
212	  build.
213
214config VPL_SERIAL
215	bool "Support serial"
216	default y if TPL_SERIAL
217	select VPL_PRINTF
218	select VPL_STRTO
219	help
220	  Enable support for serial in VPL. See SPL_SERIAL for
221	  details.
222
223config VPL_SIZE_LIMIT
224	hex "Maximum size of VPL image"
225	default 0x0
226	help
227	  Specifies the maximum length of the U-Boot VPL image.
228	  If this value is zero, it is ignored.
229
230config VPL_SPI
231	bool "Support SPI drivers"
232	help
233	  Enable support for using SPI in VPL. See SPL_SPI_SUPPORT for
234	  details.
235
236config VPL_SPI_FLASH_SUPPORT
237	bool "Support SPI flash drivers"
238	help
239	  Enable support for using SPI flash in VPL, and loading U-Boot from
240	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
241	  the SPI bus that is used to connect it to a system. It is a simple
242	  but fast bidirectional 4-wire bus (clock, chip select and two data
243	  lines). This enables the drivers in drivers/mtd/spi as part of a
244	  VPL build. This normally requires VPL_SPI_SUPPORT.
245
246config VPL_SYS_MALLOC_SIMPLE
247	bool "Only use malloc_simple functions in the VPL"
248	default y
249	help
250	  Say Y here to only use the *_simple malloc functions from
251	  malloc_simple.c, rather then using the versions from dlmalloc.c;
252	  this will make the VPL binary smaller at the cost of more heap
253	  usage as the *_simple malloc functions do not re-use free-ed mem.
254
255config VPL_TEXT_BASE
256	hex "VPL Text Base"
257	default 0x0
258	help
259	  The address in memory that VPL will be running from.
260
261config VPL_MAX_SIZE
262	hex "Maximum size (in bytes) for the VPL stage"
263	default 0x2e000 if ROCKCHIP_RK3399
264	default 0x0
265	help
266	  The maximum size (in bytes) of the TPL stage. This size is determined
267	  by the amount of internal SRAM memory.
268
269config VPL_HAVE_INIT_STACK
270	bool "VPL requires a initial, fixed, stack-pointer location"
271	help
272	  Enable if the VPL phase should not use inherit its initial
273	  stack-pointer from the settings for U-Boot proper, but should set
274	  its own value.
275
276config VPL_STACK
277	hex "Address of the initial stack-pointer for the VPL phase"
278	depends on VPL_HAVE_INIT_STACK
279	help
280	  The address of the initial stack-pointer for the VPL phase
281	  Usually this will be the (aligned) top-of-stack.
282
283config VPL_BINMAN_SYMBOLS
284	bool "Declare binman symbols in VPL"
285	depends on VPL_FRAMEWORK && BINMAN
286	default y
287	help
288	  This enables use of symbols in VPL which refer to other entries in
289	  the same binman image as the VPL. These can be declared with the
290	  binman_sym_declare(type, entry, prop) macro and accessed by the
291	  binman_sym(type, entry, prop) macro defined in binman_sym.h.
292
293	  See tools/binman/binman.rst for a detailed explanation.
294
295config VPL_BINMAN_UBOOT_SYMBOLS
296	bool "Declare binman symbols for U-Boot phases in VPL"
297	depends on VPL_BINMAN_SYMBOLS
298	default n if ARCH_IMX8M || ARCH_IMX8ULP || ARCH_IMX9
299	default y
300	help
301	  This enables use of symbols in VPL which refer to U-Boot phases,
302	  enabling VPL to obtain the location and size of its next phase simply
303	  by calling spl_get_image_pos() and spl_get_image_size().
304
305	  For this to work, you must have all U-Boot phases in the same binman
306	  image, so binman can update VPL with the locations of everything.
307
308endmenu
309