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