1menu "TPL configuration options"
2	depends on TPL
3
4config TPL_SIZE_LIMIT
5	hex "Maximum size of TPL image"
6	default 0x0
7	help
8	  Specifies the maximum length of the U-Boot TPL image.
9	  If this value is zero, it is ignored.
10
11config TPL_BINMAN_SYMBOLS
12	bool "Support binman symbols in TPL"
13	depends on TPL_FRAMEWORK && BINMAN
14	default y
15	help
16	  This enables use of symbols in TPL which refer to other entries in
17	  the same binman image as the TPL. These can be declared with the
18	  binman_sym_declare(type, entry, prop) macro and accessed by the
19	  binman_sym(type, entry, prop) macro defined in binman_sym.h.
20
21	  See tools/binman/binman.rst for a detailed explanation.
22
23config TPL_BINMAN_UBOOT_SYMBOLS
24	bool "Declare binman symbols for U-Boot phases in TPL"
25	depends on TPL_BINMAN_SYMBOLS
26	default n if ARCH_IMX8M || ARCH_IMX8ULP || ARCH_IMX9
27	default y
28	help
29	  This enables use of symbols in TPL which refer to U-Boot phases,
30	  enabling TPL to obtain the location and size of its next phase simply
31	  by calling spl_get_image_pos() and spl_get_image_size().
32
33	  For this to work, you must have all U-Boot phases in the same binman
34	  image, so binman can update TPL with the locations of everything.
35
36config TPL_FRAMEWORK
37	bool "Support TPL based upon the common SPL framework"
38	default y if SPL_FRAMEWORK
39	help
40	  Enable the SPL framework under common/spl/ for TPL builds.
41	  This framework supports MMC, NAND and YMODEM and other methods
42	  loading of U-Boot's SPL stage. If unsure, say Y.
43
44config TPL_BANNER_PRINT
45	bool "Enable output of the TPL banner 'U-Boot TPL ...'"
46	depends on DEBUG_UART && TPL_SERIAL
47	default y
48	help
49	  If this option is enabled, TPL will print the banner with version
50	  info. Disabling this option could be useful to reduce TPL boot time
51	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
52
53config TPL_HANDOFF
54	bool "Pass hand-off information from TPL to SPL and U-Boot proper"
55	depends on HANDOFF && TPL_BLOBLIST
56	default y
57	help
58	  This option enables TPL to write handoff information. This can be
59	  used to pass information like the size of SDRAM from TPL to U-Boot
60	  proper. The information is also available to SPL if it is useful
61	  there.
62
63config TPL_BOARD_INIT
64	bool "Call board-specific initialization in TPL"
65	help
66	  If this option is enabled, U-Boot will call the function
67	  spl_board_init() from board_init_r(). This function should be
68	  provided by the board.
69
70config TPL_BOOTCOUNT_LIMIT
71	bool "Support bootcount in TPL"
72	depends on TPL_ENV_SUPPORT
73	help
74	  If this option is enabled, the TPL will support bootcount.
75	  For example, it may be useful to choose the device to boot.
76
77config TPL_SYS_MALLOC_SIMPLE
78	bool
79	prompt "Only use malloc_simple functions in the TPL"
80	help
81	  Say Y here to only use the *_simple malloc functions from
82	  malloc_simple.c, rather then using the versions from dlmalloc.c;
83	  this will make the TPL binary smaller at the cost of more heap
84	  usage as the *_simple malloc functions do not re-use free-ed mem.
85
86config TPL_SEPARATE_BSS
87	bool "BSS section is in a different memory region from text"
88	default y if SPL_SEPARATE_BSS
89	help
90	  Some platforms need a large BSS region in TPL and can provide this
91	  because RAM is already set up. In this case BSS can be moved to RAM.
92	  This option should then be enabled so that the correct device tree
93	  location is used. Normally we put the device tree at the end of BSS
94	  but with this option enabled, it goes at _image_binary_end.
95
96config TPL_LDSCRIPT
97	string "Linker script for the TPL stage"
98	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
99	default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
100	help
101	  The TPL stage will usually require a different linker-script
102	  (as it runs from a different memory region) than the regular
103	  U-Boot stage.  Set this to the path of the linker-script to
104	  be used for TPL.
105
106	  May be left empty to trigger the Makefile infrastructure to
107	  fall back to the linker-script used for the SPL stage.
108
109config TPL_POWER
110	bool "Support power drivers"
111	help
112	  Enable support for power control in TPL. This includes support
113	  for PMICs (Power-management Integrated Circuits) and some of the
114	  features provided by PMICs. In particular, voltage regulators can
115	  be used to enable/disable power and vary its voltage. That can be
116	  useful in TPL to turn on boot peripherals and adjust CPU voltage
117	  so that the clock speed can be increased. This enables the drivers
118	  in drivers/power, drivers/power/pmic and drivers/power/regulator
119	  as part of an TPL build.
120
121config TPL_TEXT_BASE
122	hex "Base address for the .text section of the TPL stage"
123	default 0x0
124	help
125	  The base address for the .text section of the TPL stage.
126
127config TPL_MAX_SIZE
128	hex "Maximum size (in bytes) for the TPL stage"
129	default 0x2e000 if ROCKCHIP_RK3399
130	default 0x8000 if ROCKCHIP_RK3288 || ROCKCHIP_RV1126
131	default 0x7000 if ROCKCHIP_RK322X || ROCKCHIP_RK3328 || ROCKCHIP_RK3368
132	default 0x2800 if ROCKCHIP_PX30
133	default 0x0
134	help
135	  The maximum size (in bytes) of the TPL stage.
136
137config TPL_HAVE_INIT_STACK
138	bool "TPL requires a initial, fixed, stack-pointer location"
139	help
140	  Enable if the TPL phase should not inherit its initial
141	  stack-pointer from the settings for U-Boot proper, but should set its
142	  own value.
143
144config TPL_STACK
145	hex "Address of the initial stack-pointer for the TPL phase"
146	depends on TPL_HAVE_INIT_STACK
147	help
148	  The address of the initial stack-pointer for the TPL phase
149	  Usually this will be the (aligned) top-of-stack.
150
151config TPL_READ_ONLY
152	bool
153	depends on TPL_OF_PLATDATA
154	select TPL_OF_PLATDATA_NO_BIND
155	select TPL_OF_PLATDATA_RT
156	help
157	  Some platforms (e.g. x86 Apollo Lake) load SPL into a read-only
158	  section of memory. This means that of-platdata must make a copy (in
159	  writeable memory) of anything it wants to modify, such as
160	  device-private data.
161
162config TPL_BOOTROM_SUPPORT
163	bool "Support returning to the BOOTROM (from TPL)"
164	help
165	  Some platforms (e.g. the Rockchip RK3368) provide support in their
166	  ROM for loading the next boot-stage after performing basic setup
167	  from the TPL stage.
168
169	  Enable this option, to return to the BOOTROM through the
170	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
171	  boot device list, if not implemented for a given board)
172
173config TPL_CRC32
174	bool "Support CRC32 in TPL"
175	default y if TPL_ENV_SUPPORT || TPL_BLOBLIST
176	help
177	  Enable this to support CRC32 in uImages or FIT images within SPL.
178	  This is a 32-bit checksum value that can be used to verify images.
179	  For FIT images, this is the least secure type of checksum, suitable
180	  for detected accidental image corruption. For secure applications you
181	  should consider SHA1 or SHA256.
182
183config TPL_DRIVERS_MISC
184	bool "Support misc drivers in TPL"
185	help
186	  Enable miscellaneous drivers in TPL. These drivers perform various
187	  tasks that don't fall nicely into other categories, Enable this
188	  option to build the drivers in drivers/misc as part of an TPL
189	  build, for those that support building in TPL (not all drivers do).
190
191config TPL_ENV_SUPPORT
192	bool "Support an environment"
193	help
194	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
195
196config TPL_GPIO
197	bool "Support GPIO in TPL"
198	help
199	  Enable support for GPIOs (General-purpose Input/Output) in TPL.
200	  GPIOs allow U-Boot to read the state of an input line (high or
201	  low) and set the state of an output line. This can be used to
202	  drive LEDs, control power to various system parts and read user
203	  input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
204	  for example. Enable this option to build the drivers in
205	  drivers/gpio as part of an TPL build.
206
207config TPL_I2C
208	bool "Support I2C"
209	help
210	  Enable support for the I2C bus in TPL. See SPL_I2C for
211	  details.
212
213config TPL_LIBCOMMON_SUPPORT
214	bool "Support common libraries"
215	help
216	  Enable support for common U-Boot libraries within TPL. See
217	  SPL_LIBCOMMON_SUPPORT for details.
218
219config TPL_LIBGENERIC_SUPPORT
220	bool "Support generic libraries"
221	help
222	  Enable support for generic U-Boot libraries within TPL. See
223	  SPL_LIBGENERIC_SUPPORT for details.
224
225config TPL_MPC8XXX_INIT_DDR
226	bool "Support MPC8XXX DDR init"
227	help
228	  Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
229	  SPL_MPC8XXX_INIT_DDR for details.
230
231config TPL_MMC
232	bool "Support MMC"
233	depends on MMC
234	help
235	  Enable support for MMC within TPL. See SPL_MMC for details.
236
237config TPL_NAND_SUPPORT
238	bool "Support NAND flash"
239	help
240	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
241
242config TPL_PCI
243	bool "Support PCI drivers"
244	help
245	  Enable support for PCI in TPL. For platforms that need PCI to boot,
246	  or must perform some init using PCI in SPL, this provides the
247	  necessary driver support. This enables the drivers in drivers/pci
248	  as part of a TPL build.
249
250config TPL_PCH
251	bool "Support PCH drivers"
252	help
253	  Enable support for PCH (Platform Controller Hub) devices in TPL.
254	  These are used to set up GPIOs and the SPI peripheral early in
255	  boot. This enables the drivers in drivers/pch as part of a TPL
256	  build.
257
258config TPL_RAM_SUPPORT
259	bool "Support booting from RAM"
260	help
261	  Enable booting of an image in RAM. The image can be preloaded or
262	  it can be loaded by TPL directly into RAM (e.g. using USB).
263
264config TPL_RAM_DEVICE
265	bool "Support booting from preloaded image in RAM"
266	depends on TPL_RAM_SUPPORT
267	help
268	  Enable booting of an image already loaded in RAM. The image has to
269	  be already in memory when TPL takes over, e.g. loaded by the boot
270	  ROM.
271
272config TPL_RELOC_LOADER
273	bool "Allow relocating the next phase"
274	help
275	  In some cases multiple U-Boot phases need to run in SRAM, typically
276	  at the same address. Enable this to support loading the next phase
277	  to temporary memory, then copying it into place afterwards, then
278	  jumping to it.
279
280config TPL_RTC
281	bool "Support RTC drivers"
282	help
283	  Enable RTC (Real-time Clock) support in TPL. This includes support
284	  for reading and setting the time. Some RTC devices also have some
285	  non-volatile (battery-backed) memory which is accessible if
286	  needed. This enables the drivers in drivers/rtc as part of an TPL
287	  build.
288
289config TPL_SERIAL
290	bool "Support serial"
291	select TPL_PRINTF
292	select TPL_STRTO
293	help
294	  Enable support for serial in TPL. See SPL_SERIAL for
295	  details.
296
297config TPL_SPI_FLASH_SUPPORT
298	bool "Support SPI flash drivers"
299	help
300	  Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
301	  for details.
302
303config TPL_SPI_FLASH_TINY
304	bool "Enable low footprint TPL SPI Flash support"
305	depends on TPL_SPI_FLASH_SUPPORT && !SPI_FLASH_BAR
306	default y if SPI_FLASH
307	help
308	 Enable lightweight TPL SPI Flash support that supports just reading
309	 data/images from flash. No support to write/erase flash. Enable
310	 this if you have TPL size limitations and don't need full-fledged
311	 SPI flash support.
312
313config TPL_SPI_LOAD
314	bool "Support loading from SPI flash"
315	depends on TPL_SPI_FLASH_SUPPORT
316	help
317	  Enable support for loading next stage, U-Boot or otherwise, from
318	  SPI NOR in U-Boot TPL.
319
320config TPL_SPI
321	bool "Support SPI drivers"
322	help
323	  Enable support for using SPI in TPL. See SPL_SPI for
324	  details.
325
326config TPL_DM_SPI
327	bool "Support SPI DM drivers in TPL"
328	help
329	  Enable support for SPI DM drivers in TPL.
330
331config TPL_DM_SPI_FLASH
332	bool "Support SPI DM FLASH drivers in TPL"
333	help
334	  Enable support for SPI DM flash drivers in TPL.
335
336config TPL_YMODEM_SUPPORT
337	bool "Support loading using Ymodem"
338	depends on TPL_SERIAL
339	help
340	  While loading from serial is slow it can be a useful backup when
341	  there is no other option. The Ymodem protocol provides a reliable
342	  means of transmitting U-Boot over a serial line for using in TPL,
343	  with a checksum to ensure correctness.
344
345endmenu
346