xref: /rk3399_rockchip-uboot/include/configs/rv1126_common.h (revision b16d7c2247c8bae53adea493aaa077e842a5bd67)
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 #ifdef CONFIG_SUPPORT_USBPLUG
19 #define CONFIG_SYS_TEXT_BASE		0x00000000
20 #else
21 #define CONFIG_SYS_TEXT_BASE		0x00400000
22 #endif
23 
24 #define CONFIG_SYS_INIT_SP_ADDR		0x00580000
25 #define CONFIG_SYS_LOAD_ADDR		0x00C00800
26 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
27 
28 /* SPL */
29 #define CONFIG_SPL_FRAMEWORK
30 #define CONFIG_SPL_TEXT_BASE		0x00000000
31 #define CONFIG_SPL_MAX_SIZE		0x20000
32 #define CONFIG_SPL_BSS_START_ADDR	0x00608000
33 #define CONFIG_SPL_BSS_MAX_SIZE		0x20000
34 #define CONFIG_SPL_STACK		0x00608000
35 
36 #define GICD_BASE			0xfeff1000
37 #define GICC_BASE			0xfeff2000
38 
39 /* MMC/SD IP block */
40 #define CONFIG_BOUNCE_BUFFER
41 
42 /* Nand */
43 #define CONFIG_SYS_MAX_NAND_DEVICE	1
44 #define CONFIG_SYS_NAND_ONFI_DETECTION
45 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
46 #define CONFIG_SYS_NAND_PAGE_COUNT	64
47 #define CONFIG_SYS_NAND_SIZE		(256 * 1024 * 1024)
48 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x4000
49 
50 #define CONFIG_SYS_SDRAM_BASE		0
51 #define SDRAM_MAX_SIZE			0xfd000000
52 
53 #define CONFIG_SYS_NONCACHED_MEMORY    (1 << 20)       /* 1 MiB */
54 #ifndef CONFIG_SPL_BUILD
55 
56 /* usb mass storage */
57 #define CONFIG_USB_FUNCTION_MASS_STORAGE
58 #define CONFIG_ROCKUSB_G_DNL_PID	0x110b
59 
60 #define ENV_MEM_LAYOUT_SETTINGS		\
61 	"scriptaddr=0x00000000\0"	\
62 	"pxefile_addr_r=0x00100000\0"	\
63 	"fdt_addr_r=0x08300000\0"	\
64 	"kernel_addr_r=0x02008000\0"	\
65 	"ramdisk_addr_r=0x0a200000\0"
66 
67 #include <config_distro_bootcmd.h>
68 #define CONFIG_EXTRA_ENV_SETTINGS	\
69 	ENV_MEM_LAYOUT_SETTINGS		\
70 	"partitions=" PARTS_DEFAULT	\
71 	ROCKCHIP_DEVICE_SETTINGS	\
72 	RKIMG_DET_BOOTDEV		\
73 	BOOTENV_SHARED_RKNAND		\
74 	BOOTENV
75 
76 #undef RKIMG_BOOTCOMMAND
77 #ifdef CONFIG_FIT_SIGNATURE
78 #define RKIMG_BOOTCOMMAND		\
79 	"boot_fit;"
80 #else
81 #define RKIMG_BOOTCOMMAND		\
82 	"boot_uimage;"			\
83 	"boot_fit;"			\
84 	"boot_android ${devtype} ${devnum};"
85 #endif
86 #endif
87 
88 #define CONFIG_PREBOOT
89 
90 #endif
91