xref: /rk3399_rockchip-uboot/include/configs/rv1106_common.h (revision 1bb4e9bafc0ca58e92f894fcc8eddb0a4ed571d6)
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 /*
45  *   Image:  0 - 8M
46  *  zImage:  8 - 12M
47  *     fdt: 12 - 13M
48  * ramdisk: 14 ...
49  */
50 #define ENV_MEM_LAYOUT_SETTINGS		\
51 	"scriptaddr=0x00b00000\0"	\
52 	"pxefile_addr_r=0x00c00000\0"	\
53 	"fdt_addr_r=0x00c00000\0"	\
54 	"kernel_addr_c=0x00808000\0"	\
55 	"kernel_addr_r=0x00008000\0"	\
56 	"ramdisk_addr_r=0x000e00000\0"
57 
58 #define CONFIG_EXTRA_ENV_SETTINGS	\
59 	ENV_MEM_LAYOUT_SETTINGS		\
60 	ROCKCHIP_DEVICE_SETTINGS	\
61 	RKIMG_DET_BOOTDEV
62 
63 #undef RKIMG_BOOTCOMMAND
64 #ifdef CONFIG_FIT_SIGNATURE
65 #define RKIMG_BOOTCOMMAND		\
66 	"boot_fit;"
67 #else
68 #define RKIMG_BOOTCOMMAND		\
69 	"boot_fit;"			\
70 	"boot_android ${devtype} ${devnum};"
71 #endif
72 #endif
73 #define CONFIG_PREBOOT
74 
75 #endif
76