blob: e9e3c4013c3c9637e7dbc0de2fd7f480bbb89a1d [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
35#define CONFIG_SPL_TEXT_BASE 0xff704004
36
37/* MMC/SD IP block */
Simon Glass17aa5482015-08-30 16:55:41 -060038#define CONFIG_BOUNCE_BUFFER
39
Simon Glass17aa5482015-08-30 16:55:41 -060040/* RAW SD card / eMMC locations. */
Simon Glass17aa5482015-08-30 16:55:41 -060041#define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
42
43/* FAT sd card locations. */
44#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
45#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
46
Simon Glass17aa5482015-08-30 16:55:41 -060047#define CONFIG_SYS_SDRAM_BASE 0
48#define CONFIG_NR_DRAM_BANKS 1
49#define SDRAM_BANK_SIZE (2UL << 30)
Kever Yang6d1970f2017-06-23 16:11:05 +080050#define SDRAM_MAX_SIZE 0xfe000000
Simon Glass17aa5482015-08-30 16:55:41 -060051
52#define CONFIG_SPI_FLASH
53#define CONFIG_SPI
Simon Glass17aa5482015-08-30 16:55:41 -060054#define CONFIG_SF_DEFAULT_SPEED 20000000
55
jk.kernel@gmail.com1743d0b2016-07-26 18:28:24 +080056#ifndef CONFIG_SPL_BUILD
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080057/* usb otg */
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080058#define CONFIG_ROCKCHIP_USB2_PHY
Xu Ziyuan266c8fa2016-07-15 00:26:59 +080059
Xu Ziyuanb9f93392016-08-03 11:55:06 +080060/* usb mass storage */
61#define CONFIG_USB_FUNCTION_MASS_STORAGE
62#define CONFIG_CMD_USB_MASS_STORAGE
63
Kever Yangf57f35a2016-11-24 15:29:51 +080064/* usb host support */
Sjoerd Simons6460fc42015-08-30 16:55:48 -060065#define ENV_MEM_LAYOUT_SETTINGS \
66 "scriptaddr=0x00000000\0" \
67 "pxefile_addr_r=0x00100000\0" \
68 "fdt_addr_r=0x01f00000\0" \
69 "kernel_addr_r=0x02000000\0" \
70 "ramdisk_addr_r=0x04000000\0"
71
Sjoerd Simons6460fc42015-08-30 16:55:48 -060072#include <config_distro_bootcmd.h>
73
Sandy Patterson60169822016-07-11 13:38:52 -040074/* 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 -060075 * limit the fdt reallocation to that */
76#define CONFIG_EXTRA_ENV_SETTINGS \
Sandy Patterson60169822016-07-11 13:38:52 -040077 "fdt_high=0x0fffffff\0" \
78 "initrd_high=0x0fffffff\0" \
Xu Ziyuan6ead8bd2016-08-03 11:55:05 +080079 "partitions=" PARTS_DEFAULT \
Sjoerd Simons6460fc42015-08-30 16:55:48 -060080 ENV_MEM_LAYOUT_SETTINGS \
Simon Glass27a19612016-01-21 19:44:13 -070081 ROCKCHIP_DEVICE_SETTINGS \
Sjoerd Simons6460fc42015-08-30 16:55:48 -060082 BOOTENV
Simon Glass17aa5482015-08-30 16:55:41 -060083#endif
84
Jacob Chen67171e12016-09-19 18:46:28 +080085#define CONFIG_PREBOOT
86
Simon Glass17aa5482015-08-30 16:55:41 -060087#endif