xref: /rk3399_rockchip-uboot/include/configs/rk3308_common.h (revision 7c1937d6d1c7daf8e59b4760f8adc7ee42bd7bea)
1 /*
2  * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __CONFIG_RK3308_COMMON_H
8 #define __CONFIG_RK3308_COMMON_H
9 
10 #include "rockchip-common.h"
11 
12 #define CONFIG_SYS_MALLOC_LEN		(10 << 20)
13 #define CONFIG_SYS_CBSIZE		1024
14 #define CONFIG_SKIP_LOWLEVEL_INIT
15 
16 #define CONFIG_SPL_FRAMEWORK
17 
18 #define CONFIG_SYS_NS16550_MEM32
19 
20 #define CONFIG_SYS_TEXT_BASE		0x00600000
21 #define CONFIG_SYS_INIT_SP_ADDR		0x00700000
22 #define CONFIG_SYS_LOAD_ADDR		0x00C00800
23 #define CONFIG_SPL_STACK		0x00400000
24 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)	/* 64M */
25 
26 #define COUNTER_FREQUENCY		24000000
27 
28 #define GICD_BASE			0xff131000
29 #define GICC_BASE			0xff132000
30 
31 #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* 64M */
32 
33 /* MMC/SD IP block */
34 #define CONFIG_BOUNCE_BUFFER
35 
36 #define CONFIG_SYS_SDRAM_BASE		0
37 #define SDRAM_MAX_SIZE			0xff000000
38 #define SDRAM_BANK_SIZE			(2UL << 30)
39 #define CONFIG_PREBOOT
40 
41 #ifndef CONFIG_SPL_BUILD
42 
43 /* usb mass storage */
44 #define CONFIG_USB_FUNCTION_MASS_STORAGE
45 #define CONFIG_ROCKUSB_G_DNL_PID        0x330d
46 
47 #ifdef CONFIG_ARM64
48 #define ENV_MEM_LAYOUT_SETTINGS \
49 	"scriptaddr=0x00500000\0" \
50 	"pxefile_addr_r=0x00600000\0" \
51 	"fdt_addr_r=0x01f00000\0" \
52 	"kernel_addr_r=0x02080000\0" \
53 	"kernel_addr_c=0x04080000\0" \
54 	"ramdisk_addr_r=0x04000000\0"
55 #else
56 #define ENV_MEM_LAYOUT_SETTINGS \
57 	"scriptaddr=0x00500000\0" \
58 	"pxefile_addr_r=0x00600000\0" \
59 	"fdt_addr_r=0x03200000\0" \
60 	"kernel_addr_r=0x00058000\0" \
61 	"kernel_addr_c=0x2008000\0" \
62 	"ramdisk_addr_r=0x03080000\0"
63 #endif
64 
65 #include <config_distro_bootcmd.h>
66 #define CONFIG_EXTRA_ENV_SETTINGS \
67 	ENV_MEM_LAYOUT_SETTINGS \
68 	"partitions=" PARTS_DEFAULT \
69 	ROCKCHIP_DEVICE_SETTINGS \
70 	RKIMG_DET_BOOTDEV \
71 	BOOTENV
72 
73 #endif
74 
75 #endif
76