blob: 34f255847a8c940c793a291c1da72e69795f9804 [file] [log] [blame]
Simon Glass17aa5482015-08-30 16:55:41 -06001/*
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>
Jacob Chen7f35bbb2016-10-08 13:47:41 +080011#include "rockchip-common.h"
Simon Glass17aa5482015-08-30 16:55:41 -060012
Xu Ziyuan5a4a90f2016-08-27 21:53:14 +080013#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
Simon Glass17aa5482015-08-30 16:55:41 -060014#define CONFIG_NR_DRAM_BANKS 1
Simon Glass17aa5482015-08-30 16:55:41 -060015#define CONFIG_ENV_SIZE 0x2000
Simon Glass17aa5482015-08-30 16:55:41 -060016#define CONFIG_SYS_MALLOC_LEN (32 << 20)
17#define CONFIG_SYS_CBSIZE 1024
Simon Glass17aa5482015-08-30 16:55:41 -060018
19#define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000)
huang lincc2244b2015-11-17 14:20:09 +080020#define CONFIG_SYS_TIMER_BASE 0xff810020 /* TIMER7 */
21#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
Simon Glass17aa5482015-08-30 16:55:41 -060022
23#define CONFIG_SPL_FRAMEWORK
Simon Glass17aa5482015-08-30 16:55:41 -060024#define CONFIG_SYS_NS16550_MEM32
Simon Glass17aa5482015-08-30 16:55:41 -060025
Philipp Tomsichee14d292017-06-29 11:21:15 +020026#ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
Xu Ziyuanb47ea792016-07-12 19:09:49 +080027/* Bootrom will load u-boot binary to 0x0 once return from SPL */
28#define CONFIG_SYS_TEXT_BASE 0x00000000
29#else
Simon Glass17aa5482015-08-30 16:55:41 -060030#define CONFIG_SYS_TEXT_BASE 0x00100000
Xu Ziyuanb47ea792016-07-12 19:09:49 +080031#endif
Simon Glass17aa5482015-08-30 16:55:41 -060032#define CONFIG_SYS_INIT_SP_ADDR 0x00100000
33#define CONFIG_SYS_LOAD_ADDR 0x00800800
34#define CONFIG_SPL_STACK 0xff718000
Jagan Teki532cb7f2017-09-27 23:03:12 +053035#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_TPL_BOOTROM_SUPPORT)
36# define CONFIG_SPL_TEXT_BASE 0x0
37#else
38# define CONFIG_SPL_TEXT_BASE 0xff704004
39#endif
Simon Glass17aa5482015-08-30 16:55:41 -060040
41/* MMC/SD IP block */
Simon Glass17aa5482015-08-30 16:55:41 -060042#define CONFIG_BOUNCE_BUFFER
43
Simon Glass17aa5482015-08-30 16:55:41 -060044/* RAW SD card / eMMC locations. */
Simon Glass17aa5482015-08-30 16:55:41 -060045#define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
46
47/* FAT sd card locations. */
48#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
49#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
50
Simon Glass17aa5482015-08-30 16:55:41 -060051#define CONFIG_SYS_SDRAM_BASE 0
52#define CONFIG_NR_DRAM_BANKS 1
53#define SDRAM_BANK_SIZE (2UL << 30)
Kever Yang6d1970f2017-06-23 16:11:05 +080054#define SDRAM_MAX_SIZE 0xfe000000
Simon Glass17aa5482015-08-30 16:55:41 -060055
56#define CONFIG_SPI_FLASH
57#define CONFIG_SPI
Simon Glass17aa5482015-08-30 16:55:41 -060058#define CONFIG_SF_DEFAULT_SPEED 20000000
59
jk.kernel@gmail.com1743d0b2016-07-26 18:28:24 +080060#ifndef CONFIG_SPL_BUILD
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080061/* usb otg */
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080062#define CONFIG_ROCKCHIP_USB2_PHY
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080063
Xu Ziyuanb9f93392016-08-03 11:55:06 +080064/* usb mass storage */
65#define CONFIG_USB_FUNCTION_MASS_STORAGE
66#define CONFIG_CMD_USB_MASS_STORAGE
67
Kever Yangf57f35a2016-11-24 15:29:51 +080068/* usb host support */
Sjoerd Simons6460fc42015-08-30 16:55:48 -060069#define ENV_MEM_LAYOUT_SETTINGS \
70 "scriptaddr=0x00000000\0" \
71 "pxefile_addr_r=0x00100000\0" \
72 "fdt_addr_r=0x01f00000\0" \
73 "kernel_addr_r=0x02000000\0" \
74 "ramdisk_addr_r=0x04000000\0"
75
Sjoerd Simons6460fc42015-08-30 16:55:48 -060076#include <config_distro_bootcmd.h>
77
Sandy Patterson60169822016-07-11 13:38:52 -040078/* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
Sjoerd Simons6460fc42015-08-30 16:55:48 -060079 * limit the fdt reallocation to that */
80#define CONFIG_EXTRA_ENV_SETTINGS \
Sandy Patterson60169822016-07-11 13:38:52 -040081 "fdt_high=0x0fffffff\0" \
82 "initrd_high=0x0fffffff\0" \
Xu Ziyuan6ead8bd2016-08-03 11:55:05 +080083 "partitions=" PARTS_DEFAULT \
Sjoerd Simons6460fc42015-08-30 16:55:48 -060084 ENV_MEM_LAYOUT_SETTINGS \
Simon Glass27a19612016-01-21 19:44:13 -070085 ROCKCHIP_DEVICE_SETTINGS \
Sjoerd Simons6460fc42015-08-30 16:55:48 -060086 BOOTENV
Simon Glass17aa5482015-08-30 16:55:41 -060087#endif
88
Jacob Chen67171e12016-09-19 18:46:28 +080089#define CONFIG_PREBOOT
90
Simon Glass17aa5482015-08-30 16:55:41 -060091#endif