xref: /rk3399_rockchip-uboot/include/configs/rk3308_common.h (revision 331c2375688d79920fb06b8f0c4c52a7df56fb29)
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 #define CONFIG_SYS_MAX_NAND_DEVICE	1
16 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
17 #define CONFIG_SYS_NAND_PAGE_COUNT	64
18 #define CONFIG_SYS_NAND_SIZE		(256 * 1024 * 1024)
19 #define CONFIG_SPL_FRAMEWORK
20 #define CONFIG_SPL_TEXT_BASE		0x00000000
21 #define CONFIG_SPL_MAX_SIZE		0x20000
22 #define CONFIG_SPL_BSS_START_ADDR	0x00400000
23 #define CONFIG_SPL_BSS_MAX_SIZE		0x2000
24 
25 #define CONFIG_SYS_NS16550_MEM32
26 
27 #define CONFIG_SYS_TEXT_BASE		0x00600000
28 #define CONFIG_SYS_INIT_SP_ADDR		0x00800000
29 #define CONFIG_SYS_LOAD_ADDR		0x00C00800
30 #define CONFIG_SPL_STACK		0x00400000
31 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)	/* 64M */
32 
33 #define COUNTER_FREQUENCY		24000000
34 
35 #define GICD_BASE			0xff581000
36 #define GICC_BASE			0xff582000
37 
38 #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* 64M */
39 
40 /* MMC/SD IP block */
41 #define CONFIG_BOUNCE_BUFFER
42 
43 #define CONFIG_SYS_SDRAM_BASE		0
44 #define SDRAM_MAX_SIZE			0xff000000
45 #define SDRAM_BANK_SIZE			(2UL << 30)
46 #ifdef CONFIG_DM_DVFS
47 #define CONFIG_PREBOOT			"dvfs repeat"
48 #else
49 #define CONFIG_PREBOOT
50 #endif
51 
52 #ifndef CONFIG_SPL_BUILD
53 
54 /* usb mass storage */
55 #define CONFIG_USB_FUNCTION_MASS_STORAGE
56 #define CONFIG_ROCKUSB_G_DNL_PID        0x330d
57 
58 #ifdef CONFIG_ARM64
59 #define ENV_MEM_LAYOUT_SETTINGS \
60 	"scriptaddr=0x00500000\0" \
61 	"pxefile_addr_r=0x00600000\0" \
62 	"fdt_addr_r=0x01f00000\0" \
63 	"kernel_addr_no_bl32_r=0x00280000\0" \
64 	"kernel_addr_r=0x00680000\0" \
65 	"kernel_addr_c=0x02480000\0" \
66 	"ramdisk_addr_r=0x04000000\0"
67 #else
68 #define ENV_MEM_LAYOUT_SETTINGS \
69 	"scriptaddr=0x00500000\0" \
70 	"pxefile_addr_r=0x00600000\0" \
71 	"fdt_addr_r=0x02f00000\0" \
72 	"kernel_addr_r=0x00058000\0" \
73 	"kernel_addr_c=0x2008000\0" \
74 	"ramdisk_addr_r=0x03080000\0"
75 #endif
76 
77 #include <config_distro_bootcmd.h>
78 #define CONFIG_EXTRA_ENV_SETTINGS \
79 	ENV_MEM_LAYOUT_SETTINGS \
80 	"partitions=" PARTS_DEFAULT \
81 	ROCKCHIP_DEVICE_SETTINGS \
82 	RKIMG_DET_BOOTDEV \
83 	BOOTENV_SHARED_RKNAND \
84 	BOOTENV
85 
86 #endif
87 
88 #endif
89