xref: /rk3399_rockchip-uboot/include/configs/rv1126_common.h (revision 358df1d7ed24befaf2756cae8465e6b4de9d4adb)
1 /*
2  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __CONFIG_RV1126_COMMON_H
8 #define __CONFIG_RV1126_COMMON_H
9 
10 #include "rockchip-common.h"
11 
12 #define COUNTER_FREQUENCY		24000000
13 #define CONFIG_SYS_MALLOC_LEN		(32 << 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		0x00400000
19 #define CONFIG_SYS_INIT_SP_ADDR		0x00580000
20 #define CONFIG_SYS_LOAD_ADDR		0x00C00800
21 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
22 
23 /* SPL */
24 #define CONFIG_SPL_FRAMEWORK
25 #define CONFIG_SPL_TEXT_BASE		0x00000000
26 #define CONFIG_SPL_MAX_SIZE		0x20000
27 #define CONFIG_SPL_BSS_START_ADDR	0x00608000
28 #define CONFIG_SPL_BSS_MAX_SIZE		0x20000
29 #define CONFIG_SPL_STACK		0x00608000
30 
31 #define GICD_BASE			0xfeff1000
32 #define GICC_BASE			0xfeff2000
33 
34 /* MMC/SD IP block */
35 #define CONFIG_BOUNCE_BUFFER
36 
37 /* Nand */
38 #define CONFIG_SYS_MAX_NAND_DEVICE	1
39 #define CONFIG_SYS_NAND_ONFI_DETECTION
40 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
41 #define CONFIG_SYS_NAND_PAGE_COUNT	64
42 #define CONFIG_SYS_NAND_SIZE		(256 * 1024 * 1024)
43 
44 #define CONFIG_SYS_SDRAM_BASE		0
45 #define SDRAM_MAX_SIZE			0xfd000000
46 
47 #ifndef CONFIG_SPL_BUILD
48 
49 /* usb mass storage */
50 #define CONFIG_USB_FUNCTION_MASS_STORAGE
51 #define CONFIG_ROCKUSB_G_DNL_PID	0x110b
52 
53 #define ENV_MEM_LAYOUT_SETTINGS		\
54 	"scriptaddr=0x00000000\0"	\
55 	"pxefile_addr_r=0x00100000\0"	\
56 	"fdt_addr_r=0x08300000\0"	\
57 	"kernel_addr_r=0x02008000\0"	\
58 	"ramdisk_addr_r=0x0a200000\0"
59 
60 #include <config_distro_bootcmd.h>
61 #define CONFIG_EXTRA_ENV_SETTINGS	\
62 	ENV_MEM_LAYOUT_SETTINGS		\
63 	"partitions=" PARTS_DEFAULT	\
64 	ROCKCHIP_DEVICE_SETTINGS	\
65 	RKIMG_DET_BOOTDEV		\
66 	BOOTENV_SHARED_RKNAND		\
67 	BOOTENV
68 
69 #undef RKIMG_BOOTCOMMAND
70 #ifdef CONFIG_FIT_SIGNATURE
71 #define RKIMG_BOOTCOMMAND		\
72 	"boot_fit;"
73 #else
74 #define RKIMG_BOOTCOMMAND		\
75 	"boot_uimage;"			\
76 	"boot_fit;"			\
77 	"boot_android ${devtype} ${devnum};"
78 #endif
79 #endif
80 
81 #define CONFIG_PREBOOT
82 
83 #endif
84