xref: /rk3399_rockchip-uboot/include/configs/rv1106_common.h (revision 392b70de0ae4c18a3ff0fdbcf0fe24b9ca2e2bb6)
1 /*
2  * (C) Copyright 2022 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __CONFIG_RV1106_COMMON_H
8 #define __CONFIG_RV1106_COMMON_H
9 
10 #include "rockchip-common.h"
11 
12 #define COUNTER_FREQUENCY		24000000
13 #define CONFIG_SYS_MALLOC_LEN		(16 << 20)
14 #define CONFIG_SYS_CBSIZE		1024
15 #define CONFIG_SKIP_LOWLEVEL_INIT
16 #define CONFIG_SYS_NS16550_MEM32
17 
18 #define CONFIG_SYS_TEXT_BASE		0x00200000
19 #define CONFIG_SYS_INIT_SP_ADDR		0x00400000
20 #define CONFIG_SYS_LOAD_ADDR		0x00e00800
21 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
22 #define GICD_BASE			0xff1f1000
23 #define GICC_BASE			0xff1f2000
24 #define CONFIG_SYS_SDRAM_BASE		0
25 #define SDRAM_MAX_SIZE			0xfd000000
26 #define CONFIG_SYS_NONCACHED_MEMORY    (1 << 20)       /* 1 MiB */
27 
28 /* SPL */
29 #define CONFIG_SPL_FRAMEWORK
30 #define CONFIG_SPL_TEXT_BASE		0x00000000
31 #define CONFIG_SPL_MAX_SIZE		0x30000
32 #define CONFIG_SPL_BSS_START_ADDR	0x00600000
33 #define CONFIG_SPL_BSS_MAX_SIZE		0x20000
34 #define CONFIG_SPL_STACK		0x00600000
35 
36 /* MMC/SD IP block */
37 #define CONFIG_BOUNCE_BUFFER
38 
39 #ifndef CONFIG_SPL_BUILD
40 /* usb mass storage */
41 #define CONFIG_USB_FUNCTION_MASS_STORAGE
42 #define CONFIG_ROCKUSB_G_DNL_PID	0x110c
43 
44 #define CONFIG_LIB_HW_RAND
45 #define CONFIG_PREBOOT
46 
47 /*
48  *   Image:  0 - 8M
49  *  zImage:  8 - 12M
50  *     fdt: 12 - 13M
51  * ramdisk: 14 ...
52  */
53 #define ENV_MEM_LAYOUT_SETTINGS		\
54 	"scriptaddr=0x00b00000\0"	\
55 	"pxefile_addr_r=0x00c00000\0"	\
56 	"fdt_addr_r=0x00c00000\0"	\
57 	"kernel_addr_c=0x00808000\0"	\
58 	"kernel_addr_r=0x00008000\0"	\
59 	"ramdisk_addr_r=0x000e00000\0"
60 
61 #define CONFIG_EXTRA_ENV_SETTINGS	\
62 	ENV_MEM_LAYOUT_SETTINGS		\
63 	ROCKCHIP_DEVICE_SETTINGS	\
64 	RKIMG_DET_BOOTDEV
65 
66 #undef RKIMG_BOOTCOMMAND
67 #ifdef CONFIG_FIT_SIGNATURE
68 #define RKIMG_BOOTCOMMAND		\
69 	"boot_fit;"
70 #else
71 #define RKIMG_BOOTCOMMAND		\
72 	"boot_fit;"			\
73 	"boot_android ${devtype} ${devnum};"
74 #endif
75 
76 /* Update define for tiny image */
77 #ifdef CONFIG_ROCKCHIP_IMAGE_TINY
78 #undef RKIMG_BOOTCOMMAND
79 #undef RKIMG_DET_BOOTDEV
80 #undef CONFIG_EXTRA_ENV_SETTINGS
81 #undef CONFIG_AUTO_COMPLETE
82 #undef CONFIG_SYS_LONGHELP
83 #undef CONFIG_ZLIB
84 #undef CONFIG_GZIP
85 /* TODO: #define CONFIG_LIB_HW_RAND */
86 
87 #define RKIMG_BOOTCOMMAND		"boot_fit;"
88 #define CONFIG_EXTRA_ENV_SETTINGS	ENV_MEM_LAYOUT_SETTINGS
89 #endif
90 #endif	/* !CONFIG_SPL_BUILD */
91 
92 #endif
93