xref: /rk3399_rockchip-uboot/include/configs/rk3188_common.h (revision 8ea74120565f81f5f3f7e7fa29bb3cd5be62a91e)
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 #define CONFIG_SPI
52 
53 #ifndef CONFIG_SPL_BUILD
54 
55 /* usb mass storage */
56 #define CONFIG_USB_FUNCTION_MASS_STORAGE
57 
58 /* usb otg */
59 #define CONFIG_ROCKCHIP_USB2_PHY
60 
61 /* usb host support */
62 #define ENV_MEM_LAYOUT_SETTINGS \
63 	"scriptaddr=0x60000000\0" \
64 	"pxefile_addr_r=0x60100000\0" \
65 	"fdt_addr_r=0x68300000\0" \
66 	"kernel_addr_r=0x62000000\0" \
67 	"ramdisk_addr_r=0x6a200000\0"
68 
69 #include <config_distro_bootcmd.h>
70 
71 /* Linux fails to load the fdt if it's loaded above 256M on a Rock board,
72  * so limit the fdt reallocation to that */
73 #define CONFIG_EXTRA_ENV_SETTINGS \
74 	"fdt_high=0x6fffffff\0" \
75 	"initrd_high=0x6fffffff\0" \
76 	"partitions=" PARTS_DEFAULT \
77 	ENV_MEM_LAYOUT_SETTINGS \
78 	ROCKCHIP_DEVICE_SETTINGS \
79 	BOOTENV
80 
81 #endif /* CONFIG_SPL_BUILD */
82 
83 #define CONFIG_PREBOOT
84 
85 #endif
86