/uboot-rockchip/include/configs/rk_default_config.h
/*
2 * Default Configuration for Rockchip Platform
3 *
4 * (C) Copyright 2008-2015 Fuzhou Rockchip Electronics Co., Ltd
5 * Peter, Software Engineering, <superpeter.cai@gmail.com>.
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10 #ifndef __RK_DEFAULT_CONFIG_H
11 #define __RK_DEFAULT_CONFIG_H
12
13
14 /* Display CPU and Board Info */
15 #define CONFIG_ARCH_CPU_INIT
16 #define CONFIG_DISPLAY_CPUINFO
17 #define CONFIG_DISPLAY_BOARDINFO
18
19 #define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */
20 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
21 #define CONFIG_CMDLINE_EDITING /* add command line history */
22 #define CONFIG_INITRD_TAG /* Required for ramdisk support */
23 #define CONFIG_BOARD_LATE_INIT
24 #define CONFIG_ARCH_EARLY_INIT_R
25
26
27 /* rk board common fold */
28 #define HAVE_VENDOR_COMMON_LIB y
29
30
31 /* enable genreal board */
32 #define CONFIG_SYS_GENERIC_BOARD
33
34
35 /*
36 * Supported U-boot commands
37 */
38 /* Declare no flash (NOR/SPI) */
39 #define CONFIG_SYS_NO_FLASH 1 /* It should define before config_cmd_default.h */
40
41 /* Command definition */
42 #include <config_cmd_default.h>
43
44 #define CONFIG_SHA256
45 #define CONFIG_LIB_RAND
46
47 #undef CONFIG_GZIP
48 #undef CONFIG_ZLIB
49 #undef CONFIG_SOURCE
50 #undef CONFIG_PARTITIONS
51
52 /* config for cmd_bootm */
53 #undef CONFIG_BOOTM_NETBSD
54 #undef CONFIG_BOOTM_RTEMS
55 #undef CONFIG_BOOTM_OSE
56 #undef CONFIG_BOOTM_PLAN9
57 #undef CONFIG_BOOTM_VXWORKS
58 #undef CONFIG_LYNXKDI
59 #undef CONFIG_INTEGRITY
60 #undef CONFIG_CMD_ELF
61 #undef CONFIG_CMD_BOOTD
62
63 /* Disabled commands */
64 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
65 #undef CONFIG_CMD_MISC
66 #undef CONFIG_CMD_NET
67 #undef CONFIG_CMD_NFS
68 #undef CONFIG_CMD_XIMG
69
70 #undef CONFIG_CMD_ITEST
71 #undef CONFIG_CMD_SOURCE
72 #undef CONFIG_CMD_BDI
73 #undef CONFIG_CMD_CONSOLE
74 #undef CONFIG_CMD_CACHE
75 #undef CONFIG_CMD_MEMORY
76 #undef CONFIG_CMD_ECHO
77 #undef CONFIG_CMD_REGINFO
78 #undef CONFIG_CMDLINE_EDITING
79 #undef CONFIG_CMD_LOADB
80 #undef CONFIG_CMD_LOADS
81 #undef CONFIG_CMD_IMI
82 #undef CONFIG_CMD_EDITENV
83 /*#undef CONFIG_CMD_RUN*/
84 #define CONFIG_CMD_RUN /* modify by andy 20220221 */
85 #undef CONFIG_CMD_SETGETDCR
86
87
88 /*
89 * cache config
90 */
91 #undef CONFIG_SYS_ICACHE_OFF
92 #undef CONFIG_SYS_DCACHE_OFF
93 #define CONFIG_SYS_L2CACHE_OFF
94 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
95
96
97 /* irq config, arch64 gic no using CONFIG_USE_IRQ */
98 #if !defined(CONFIG_ARM64)
99 #define CONFIG_USE_IRQ
100 #endif
101
102 /* enable imprecise aborts check, default disable */
103 #undef CONFIG_IMPRECISE_ABORTS_CHECK
104
105
106 /*
107 * Enabling relocation of u-boot by default
108 * Relocation can be skipped if u-boot is copied to the TEXT_BASE
109 */
110 #undef CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */
111
112
113 /*
114 * select serial console configuration
115 */
116 #ifndef CONFIG_BAUDRATE
117 #define CONFIG_BAUDRATE 115200
118 #endif
119 /* valid baudrates */
120 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 1500000 }
121
122
123 /* input clock of PLL: has 24MHz input clock at rk30xx */
124 #define CONFIG_SYS_CLK_FREQ_CRYSTAL 24000000
125 #define CONFIG_SYS_CLK_FREQ CONFIG_SYS_CLK_FREQ_CRYSTAL
126 #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
127
128
129 /*
130 * Environment setup
131 */
132 /* use preboot to detect key press for fastboot */
133 /* if you want to enable bootdelay, define CONFIG_PREBOOT as:
134 * #define CONFIG_PREBOOT "setenv bootdelay 3"
135 * else just do as:
136 * #define CONFIG_PREBOOT
137 */
138 #define CONFIG_PREBOOT
139 #define CONFIG_CMD_BOOTRK
140 #define CONFIG_BOOTCOMMAND "bootrk"
141
142 #ifdef CONFIG_ARM64
143 #define CONFIG_EXTRA_ENV_SETTINGS "verify=n\0initrd_high=0xffffffffffffffff=n\0"
144 #else
145 #define CONFIG_EXTRA_ENV_SETTINGS "verify=n\0initrd_high=0xffffffff=n\0"
146 #endif
147
148 /* env config */
149 #define CONFIG_ENV_IS_IN_RK_STORAGE 1 /* Store ENV in rk storage only */
150
151 #define CONFIG_ENV_OFFSET 0
152 #define CONFIG_ENV_SIZE 0x200
153 #define CONFIG_CMD_SAVEENV
154
155 #undef CONFIG_SILENT_CONSOLE
156 #define CONFIG_LCD_CONSOLE_DISABLE /* lcd not support console putc and puts */
157 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
158
159
160 /*
161 * Miscellaneous configurable options
162 */
163 #define CONFIG_SYS_LONGHELP /* undef to save memory */
164 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
165 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
166 #define CONFIG_SYS_PROMPT "rkboot # "
167 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
168 #define CONFIG_SYS_PBSIZE 1024 /* Print Buffer Size */
169 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
170 /* Boot Argument Buffer Size */
171 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
172
173 #define CONFIG_SYS_RAMBOOT
174 #define CONFIG_SYS_VSNPRINTF
175
176
177 /*
178 * Uboot memory map
179 *
180 * CONFIG_SYS_TEXT_BASE is the default address which maskrom loader uboot code.
181 * CONFIG_RKNAND_API_ADDR is the address which maskrom loader miniloader code.
182 *
183 * kernel load address: CONFIG_SDRAM_PHY_START + 32M, size 16M,
184 * miniloader code load address: CONFIG_SDRAM_PHY_START + 48M, size 8M,
185 * total reverse memory is CONFIG_LMB_RESERVE_MEMORY_SIZE.
186 *
187 *|---------------------------------------------------------------------------|
188 *|START - KERNEL LOADER - NAND LOADER - LMB - Uboot - END|
189 *|SDRAM - START 32M - START 48M - - START 56M - START 80M - 128M|
190 *| - - kernel - nand code - fdt - -uboot/ramdisk |
191 *|---------------------------------------------------------------------------|
192 */
193 /* rk kernel load address */
194 #define CONFIG_KERNEL_LOAD_ADDR (CONFIG_RAM_PHY_START + SZ_32M) /* 32M offset */
195
196 /* rk nand api function code address */
197 #define CONFIG_RKNAND_API_ADDR (CONFIG_RAM_PHY_START + SZ_32M + SZ_16M) /* 48M offset */
198
199 /* rk uboot reserve size */
200 #define CONFIG_LMB_RESERVE_SIZE (SZ_32M + SZ_16M + SZ_8M) /* 56M offset */
201
202 /* rk ddr information */
203 #define CONFIG_RK_MAX_DRAM_BANKS 8 /* rk ddr max banks */
204 #define CONFIG_RKDDR_PARAM_ADDR (CONFIG_RAM_PHY_START + SZ_32M) /* rk ddr banks address and size */
205 #define CONFIG_RKTRUST_PARAM_ADDR (CONFIG_RAM_PHY_START + SZ_32M + SZ_2M) /* rk trust os banks address and size */
206
207
208 /* rk hdmi device information buffer (start: 128M - size: 8K) */
209 #define CONFIG_RKHDMI_PARAM_ADDR CONFIG_RAM_PHY_END
210
211
212 /*
213 * SDRAM Memory Map
214 * Even though we use two CS all the memory
215 * is mapped to one contiguous block
216 */
217 #define CONFIG_NR_DRAM_BANKS 1
218
219 #define PHYS_SDRAM CONFIG_RAM_PHY_START /* OneDRAM Bank #0 */
220 #define PHYS_SDRAM_SIZE (CONFIG_RAM_PHY_END - CONFIG_RAM_PHY_START) /* 128 MB in Bank #0 */
221
222 /* DRAM Base */
223 #define CONFIG_SYS_SDRAM_BASE CONFIG_RAM_PHY_START /* Physical start address of SDRAM. */
224 #define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_SIZE
225
226 /* Default load address */
227 #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
228
229 /* sp addr before relocate. */
230 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_RAM_PHY_END
231
232
233 /*
234 * Stack sizes
235 *
236 * The stack sizes are set up in start.S using the settings below
237 */
238 #ifdef CONFIG_USE_IRQ
239 # define CONFIG_STACKSIZE_IRQ 0x10000
240 # define CONFIG_STACKSIZE_FIQ 0x1000
241 #endif
242
243 /*
244 * Size of malloc() pool
245 */
246 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_2M)
247 /*
248 * bmp max size
249 */
250 #define CONFIG_MAX_BMP_BLOCKS (SZ_8M / BLOCK_SIZE)
251
252 /* rockchip global buffer. */
253 #define CONFIG_RK_GLOBAL_BUFFER_SIZE (SZ_4M)
254 #define CONFIG_RK_BOOT_BUFFER_SIZE (SZ_32M + SZ_16M)
255
256 /*
257 * CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE should be larger than our boot/recovery image size.
258 */
259 #define CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE CONFIG_RK_BOOT_BUFFER_SIZE
260 #define CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE_EACH (CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE >> 1)
261
262
263 /*
264 * boot mode enable config
265 */
266 #define CONFIG_RK_SDMMC_BOOT_EN
267 #define CONFIG_RK_SDCARD_BOOT_EN
268 #undef CONFIG_RK_UMS_BOOT_EN
269 #ifdef CONFIG_SECOND_LEVEL_BOOTLOADER
270 #define CONFIG_RK_FLASH_BOOT_EN
271 #endif /* CONFIG_SECOND_LEVEL_BOOTLOADER */
272
273
274 /*
275 * merger bin enable config
276 */
277 #ifdef CONFIG_SECOND_LEVEL_BOOTLOADER
278 #define CONFIG_MERGER_MINILOADER
279 #ifdef CONFIG_ARM64
280 #define CONFIG_MERGER_TRUSTIMAGE
281 #endif /* CONFIG_ARM64 */
282 #endif /* CONFIG_SECOND_LEVEL_BOOTLOADER */
283
284 /*
285 * fdtdec parse enable 64bit format for property 'reg', this compatible 32bit
286 */
287 #define CONFIG_PHYS_64BIT
288
289 /*
290 * boot image: rk mode and ota mode check
291 * rk mode - crc32 check kernel and boot image
292 * ota mode - sha check boot image
293 */
294 #undef CONFIG_BOOTRK_RK_IMAGE_CHECK
295 #undef CONFIG_BOOTRK_OTA_IMAGE_CHECK
296
297 /*
298 * allow to flash loader when check sign failed. should undef this in release version.
299 */
300 #undef CONFIG_ENABLE_ERASEKEY
301
302
303 /* rk quick check sum */
304 #define CONFIG_QUICK_CHECKSUM
305
306
307 /* rk io command tool */
308 #define CONFIG_RK_IO_TOOL
309
310
311 /* rockusb */
312 #define CONFIG_CMD_ROCKUSB
313
314
315 /* fastboot */
316 #define CONFIG_CMD_FASTBOOT
317
318
319 /* rk mtd block size */
320 #define RK_BLK_SIZE 512
321
322 /* rk mtd block size */
323 #define CONFIG_MAX_PARTITIONS 32
324
325
326 /* fdt and rk resource support */
327 #define CONFIG_RESOURCE_PARTITION /* rk resource parttion */
328 #define CONFIG_OF_LIBFDT /* fdt support */
329 #define CONFIG_OF_FROM_RESOURCE /* fdt from resource */
330
331
332 #ifndef CONFIG_PRODUCT_BOX
333 /* rk pm management module */
334 #define CONFIG_PM_SUBSYSTEM
335 #endif
336
337
338 /* LCDC console */
339 #define CONFIG_LCD
340
341
342 #ifdef CONFIG_PRODUCT_BOX
343 /* rk deviceinfo partition */
344 #define CONFIG_RK_DEVICEINFO
345
346 /* rk pwm remote ctrl */
347 #define CONFIG_RK_PWM_REMOTE
348 #endif
349
350
351 /*
352 * rockchip Hardware drivers
353 */
354 /* rk serial module */
355 #define CONFIG_RK_UART
356 #ifndef CONFIG_UART_NUM
357 #define CONFIG_UART_NUM UART_CH2
358 #endif
359 #define CONFIG_RKUART2USB_FORCE /* uart2usb force */
360
361 /* usb device */
362 #if defined(CONFIG_CMD_ROCKUSB) || defined(CONFIG_CMD_FASTBOOT)
363 #define CONFIG_USB_DEVICE
364 #define CONFIG_RK_UDC
365 #endif
366
367 /* rk clock module */
368 #define CONFIG_RK_CLOCK
369
370 /* rk gpio module */
371 #define CONFIG_RK_GPIO
372
373 /* rk iomux module */
374 #define CONFIG_RK_IOMUX
375
376 /* rk i2c module */
377 #define CONFIG_RK_I2C
378 #define CONFIG_I2C_MULTI_BUS
379 #define CONFIG_SYS_I2C_SPEED 100000
380
381 /* rk spi module */
382 #undef CONFIG_RK_SPI
383
384 /* rk key module */
385 #define CONFIG_RK_KEY
386
387 /* rk pwm module */
388 #define CONFIG_RK_PWM
389
390 /* rk efuse module */
391 #define CONFIG_RK_EFUSE
392
393 /* rk dma config */
394 #define CONFIG_RK_PL330_DMAC /* rk pl330 dmac */
395
396 /* Ethernet support */
397 #undef CONFIG_RK_GMAC
398
399 /* rk power config */
400 #define CONFIG_RK_POWER
401
402 /* rk display module */
403 #ifdef CONFIG_LCD
404
405 #define CONFIG_RK_FB
406 #ifndef CONFIG_PRODUCT_BOX
407 #define CONFIG_RK_PWM_BL
408 #endif
409
410 #ifdef CONFIG_PRODUCT_BOX
411 #define CONFIG_RK_HDMI
412 #define CONFIG_RK_TVE
413 #endif
414
415 #define CONFIG_LCD_LOGO
416 #define CONFIG_LCD_BMP_RLE8
417 #define CONFIG_CMD_BMP
418
419 /* CONFIG_COMPRESS_LOGO_RLE8 or CONFIG_COMPRESS_LOGO_RLE16 */
420 #undef CONFIG_COMPRESS_LOGO_RLE8
421 #undef CONFIG_COMPRESS_LOGO_RLE16
422
423 #define CONFIG_BMP_16BPP
424 #define CONFIG_BMP_24BPP
425 #define CONFIG_BMP_32BPP
426 #define CONFIG_SYS_WHITE_ON_BLACK
427 #define LCD_BPP LCD_COLOR16
428
429 #define CONFIG_LCD_MAX_WIDTH 4096
430 #define CONFIG_LCD_MAX_HEIGHT 2048
431
432 /* rk lcd size at the end of ddr address */
433 #define CONFIG_RK_FB_DDREND
434
435 #ifdef CONFIG_RK_FB_DDREND
436 /* support load bmp files for kernel logo */
437 #define CONFIG_KERNEL_LOGO
438
439 /* rk lcd total size = fb size + kernel logo size */
440 #define CONFIG_RK_LCD_SIZE SZ_32M
441 #define CONFIG_RK_FB_SIZE SZ_16M
442 #endif
443
444 #define CONFIG_BRIGHTNESS_DIM 64
445
446 #undef CONFIG_UBOOT_CHARGE
447
448 #endif /* CONFIG_LCD */
449
450
451 #endif /* __RK_DEFAULT_CONFIG_H */
-------------------------------------------------------------------------------------------------------------
line number 32
/uboot-rockchip/include/config_cmd_default.h
#ifndef _CONFIG_CMD_DEFAULT_H
#define _CONFIG_CMD_DEFAULT_H
/*
* Alphabetical list of all commands that are configured by default.
* This is essentially all commands minus those that are considered
* "non-standard" for some reason (memory hogs, requires special
* hardware, not fully tested, etc.).
*/
#define CONFIG_CMD_BDI /* bdinfo */
#define CONFIG_CMD_BOOTD /* bootd */
#define CONFIG_CMD_CONSOLE /* coninfo */
#define CONFIG_CMD_ECHO /* echo arguments */
#define CONFIG_CMD_EDITENV /* editenv */
#define CONFIG_CMD_FPGA /* FPGA configuration Support */
#define CONFIG_CMD_IMI /* iminfo */
#define CONFIG_CMD_ITEST /* Integer (and string) test */
#ifndef CONFIG_SYS_NO_FLASH
#define CONFIG_CMD_FLASH /* flinfo, erase, protect */
#define CONFIG_CMD_IMLS /* List all found images */
#endif
#define CONFIG_CMD_LOADB /* loadb */
#define CONFIG_CMD_LOADS /* loads */
#define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */
#define CONFIG_CMD_MISC /* Misc functions like sleep etc*/
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#define CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_RUN /* run command in env variable */
#define CONFIG_CMD_SAVEENV /* saveenv */
#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
#define CONFIG_CMD_SOURCE /* "source" command support */
#define CONFIG_CMD_XIMG /* Load part of Multi Image */
#endif /* _CONFIG_CMD_DEFAULT_H */