xref: /OK3568_Linux_fs/u-boot/include/configs/rk3188_common.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * (C) Copyright 2015 Google, Inc
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __CONFIG_RK3188_COMMON_H
8 #define __CONFIG_RK3188_COMMON_H
9 
10 #define CONFIG_SYS_CACHELINE_SIZE	64
11 
12 #include <asm/arch/hardware.h>
13 #include "rockchip-common.h"
14 
15 #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
16 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
17 #define CONFIG_SYS_CBSIZE		1024
18 
19 #define CONFIG_SYS_TIMER_COUNTS_DOWN
20 /* RK3188 do not have a ARMv7 ARCH timer */
21 #undef CONFIG_SYS_ARCH_TIMER
22 
23 #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
24 /* Bootrom will load u-boot binary to 0x60000000 once return from SPL */
25 #define CONFIG_SYS_TEXT_BASE		0x60000000
26 #else
27 #define CONFIG_SYS_TEXT_BASE		0x60200000
28 #endif
29 #define CONFIG_SYS_INIT_SP_ADDR		0x60400000
30 #define CONFIG_SYS_LOAD_ADDR		0x60800800
31 
32 #define CONFIG_ROCKCHIP_MAX_INIT_SIZE	(0x8000 - 0x800)
33 #define CONFIG_ROCKCHIP_CHIP_TAG	"RK31"
34 #define CONFIG_ROCKUSB_G_DNL_PID	0x310B
35 
36 #define CONFIG_SPL_TEXT_BASE		0x10080800
37 /* spl size 32kb sram - 2kb bootrom */
38 #define CONFIG_SPL_MAX_SIZE		(0x8000 - 0x800)
39 #define CONFIG_SPL_FRAMEWORK		1
40 #define CONFIG_ROCKCHIP_SERIAL		1
41 
42 #define CONFIG_SPL_STACK		0x10087fff
43 
44 /* MMC/SD IP block */
45 #define CONFIG_BOUNCE_BUFFER
46 
47 #define CONFIG_SYS_SDRAM_BASE		0x60000000
48 #define SDRAM_BANK_SIZE			(2UL << 30)
49 #define SDRAM_MAX_SIZE			0x80000000
50 
51 #ifndef CONFIG_SPL_BUILD
52 
53 /* usb mass storage */
54 #define CONFIG_USB_FUNCTION_MASS_STORAGE
55 
56 /* usb otg */
57 #define CONFIG_ROCKCHIP_USB2_PHY
58 
59 /* usb host support */
60 #define ENV_MEM_LAYOUT_SETTINGS \
61 	"scriptaddr=0x60000000\0" \
62 	"pxefile_addr_r=0x60100000\0" \
63 	"fdt_addr_r=0x68300000\0" \
64 	"kernel_addr_r=0x62000000\0" \
65 	"ramdisk_addr_r=0x6a200000\0"
66 
67 #include <config_distro_bootcmd.h>
68 
69 /* Linux fails to load the fdt if it's loaded above 256M on a Rock board,
70  * so limit the fdt reallocation to that */
71 #define CONFIG_EXTRA_ENV_SETTINGS \
72 	"fdt_high=0x6fffffff\0" \
73 	"initrd_high=0x6fffffff\0" \
74 	"partitions=" PARTS_DEFAULT \
75 	ENV_MEM_LAYOUT_SETTINGS \
76 	ROCKCHIP_DEVICE_SETTINGS \
77 	BOOTENV
78 
79 #endif /* CONFIG_SPL_BUILD */
80 
81 #define CONFIG_PREBOOT
82 
83 #endif
84