xref: /rk3399_rockchip-uboot/include/configs/rk3288_common.h (revision c964ade6392e69a0bd1a7a038a59639eb0a542d2)
1 /*
2  * (C) Copyright 2015 Google, Inc
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __CONFIG_RK3288_COMMON_H
8 #define __CONFIG_RK3288_COMMON_H
9 
10 #include <asm/arch/hardware.h>
11 #include "rockchip-common.h"
12 
13 #ifndef CONFIG_SPL_BUILD
14 #undef CONFIG_BOOTCOMMAND
15 #define CONFIG_BOOTCOMMAND RKIMG_BOOTCOMMAND
16 #endif
17 
18 #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
19 #define CONFIG_SYS_MALLOC_LEN		(192 << 20)
20 #define CONFIG_SYS_CBSIZE		1024
21 
22 #define CONFIG_SPL_FRAMEWORK
23 #define CONFIG_SYS_TEXT_BASE		0x00200000
24 #define CONFIG_SYS_INIT_SP_ADDR		0x00400000
25 #define CONFIG_SYS_LOAD_ADDR		0x00800800
26 #define CONFIG_SPL_STACK		0x00180000
27 #define CONFIG_SPL_TEXT_BASE		0x00000000
28 #define CONFIG_SPL_MAX_SIZE		0x100000
29 
30 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)	/*  64M */
31 #define GICD_BASE			0xffc01000
32 #define GICC_BASE			0xffc02000
33 
34 #define CONFIG_ROCKUSB_G_DNL_PID	0x320A
35 
36 #define CONFIG_SUPPORT_EMMC_RPMB
37 
38 /* MMC/SD IP block */
39 #define CONFIG_BOUNCE_BUFFER
40 
41 /* RAW SD card / eMMC locations. */
42 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(128 << 10)
43 
44 /* FAT sd card locations. */
45 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
46 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
47 
48 #define CONFIG_SYS_SDRAM_BASE		0
49 #define SDRAM_BANK_SIZE			(2UL << 30)
50 #define SDRAM_MAX_SIZE			0xfe000000
51 
52 #define CONFIG_SPI
53 #define CONFIG_SF_DEFAULT_SPEED 20000000
54 
55 #ifndef CONFIG_SPL_BUILD
56 /* usb otg */
57 #define CONFIG_ROCKCHIP_USB2_PHY
58 
59 /* usb mass storage */
60 #define CONFIG_USB_FUNCTION_MASS_STORAGE
61 #define CONFIG_CMD_USB_MASS_STORAGE
62 
63 /* usb host support */
64 #define ENV_MEM_LAYOUT_SETTINGS \
65 	"scriptaddr=0x00000000\0" \
66 	"pxefile_addr_r=0x00100000\0" \
67 	"fdt_addr_r=0x08300000\0" \
68 	"kernel_addr_r=0x02008000\0" \
69 	"ramdisk_addr_r=0x0a200000\0"
70 
71 #include <config_distro_bootcmd.h>
72 
73 /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
74  * limit the fdt reallocation to that */
75 #define CONFIG_EXTRA_ENV_SETTINGS \
76 	"fdt_high=0x0fffffff\0" \
77 	"initrd_high=0x0fffffff\0" \
78 	"partitions=" PARTS_DEFAULT \
79 	ENV_MEM_LAYOUT_SETTINGS \
80 	ROCKCHIP_DEVICE_SETTINGS \
81 	RKIMG_DET_BOOTDEV \
82 	BOOTENV
83 #endif
84 
85 #define CONFIG_PREBOOT
86 
87 #endif
88