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