xref: /rk3399_rockchip-uboot/include/configs/ti816x_evm.h (revision 205b4f33cfe58268df7d433f2da515fe660afd9c)
1425faf74STENART Antoine /*
2425faf74STENART Antoine  * ti816x_evm.h
3425faf74STENART Antoine  *
4425faf74STENART Antoine  * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com>
5425faf74STENART Antoine  * Antoine Tenart, <atenart@adeneo-embedded.com>
6425faf74STENART Antoine  *
7425faf74STENART Antoine  * SPDX-License-Identifier:	GPL-2.0+
8425faf74STENART Antoine  */
9425faf74STENART Antoine 
10425faf74STENART Antoine #ifndef __CONFIG_TI816X_EVM_H
11425faf74STENART Antoine #define __CONFIG_TI816X_EVM_H
12425faf74STENART Antoine 
13425faf74STENART Antoine #define CONFIG_TI81XX
14425faf74STENART Antoine #define CONFIG_TI816X
15425faf74STENART Antoine #define CONFIG_SYS_NO_FLASH
16425faf74STENART Antoine #define CONFIG_OMAP
17425faf74STENART Antoine #define CONFIG_OMAP_COMMON
18425faf74STENART Antoine 
19425faf74STENART Antoine #define CONFIG_ARCH_CPU_INIT
20425faf74STENART Antoine 
21425faf74STENART Antoine #include <asm/arch/omap.h>
22425faf74STENART Antoine 
23425faf74STENART Antoine #define CONFIG_ENV_SIZE			0x2000
24425faf74STENART Antoine #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (32 * 1024))
25425faf74STENART Antoine #define CONFIG_SYS_LONGHELP		/* undef save memory */
26425faf74STENART Antoine #define CONFIG_SYS_HUSH_PARSER
27425faf74STENART Antoine #define CONFIG_SYS_PROMPT		"u-boot/ti816x# "
28425faf74STENART Antoine #define CONFIG_MACH_TYPE		MACH_TYPE_TI8168EVM
29425faf74STENART Antoine 
30425faf74STENART Antoine #define CONFIG_OF_LIBFDT
31425faf74STENART Antoine #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */
32425faf74STENART Antoine #define CONFIG_SETUP_MEMORY_TAGS
33425faf74STENART Antoine #define CONFIG_INITRD_TAG		/* required for ramdisk support */
34425faf74STENART Antoine 
35425faf74STENART Antoine #include <config_cmd_default.h>		/* u-boot default commands */
36425faf74STENART Antoine 
37425faf74STENART Antoine #define CONFIG_VERSION_VARIABLE
38425faf74STENART Antoine #define CONFIG_DISPLAY_CPUINFO
39425faf74STENART Antoine 
40425faf74STENART Antoine #define CONFIG_BOOTDELAY		3 /* set negative for no autoboot */
41425faf74STENART Antoine #define CONFIG_EXTRA_ENV_SETTINGS	\
42425faf74STENART Antoine 	"loadaddr=0x81000000\0"		\
43425faf74STENART Antoine 
44425faf74STENART Antoine #define CONFIG_BOOTCOMMAND			\
45425faf74STENART Antoine 	"mmc rescan;"				\
46425faf74STENART Antoine 	"fatload mmc 0 ${loadaddr} uImage;"	\
47425faf74STENART Antoine 	"bootm ${loadaddr}"			\
48425faf74STENART Antoine 
49425faf74STENART Antoine #define CONFIG_BOOTARGS	"console=ttyO2,115200n8 noinitrd earlyprintk"
50425faf74STENART Antoine 
51425faf74STENART Antoine /* Clock Defines */
52425faf74STENART Antoine #define V_OSCK          24000000    /* Clock output from T2 */
53425faf74STENART Antoine #define V_SCLK          (V_OSCK >> 1)
54425faf74STENART Antoine 
55425faf74STENART Antoine #define CONFIG_SYS_MAXARGS	32
56425faf74STENART Antoine #define CONFIG_SYS_CBSIZE	512 /* console I/O buffer size */
57425faf74STENART Antoine #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE \
58425faf74STENART Antoine 		+ sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */
59425faf74STENART Antoine #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* boot arg buffer size */
60425faf74STENART Antoine 
61425faf74STENART Antoine #undef  CONFIG_SYS_CLKS_IN_HZ
62425faf74STENART Antoine #define CONFIG_SYS_LOAD_ADDR		0x81000000 /* Default load address */
63425faf74STENART Antoine 
64425faf74STENART Antoine #define CONFIG_CMD_ASKEN
65425faf74STENART Antoine #define CONFIG_CMD_ECHO
66425faf74STENART Antoine #define CONFIG_OMAP_GPIO
67425faf74STENART Antoine #define CONFIG_MMC
68425faf74STENART Antoine #define CONFIG_GENERIC_MMC
69425faf74STENART Antoine #define CONFIG_OMAP_HSMMC
70425faf74STENART Antoine #define CONFIG_CMD_MMC
71425faf74STENART Antoine #define CONFIG_DOS_PARTITION
72425faf74STENART Antoine #define CONFIG_CMD_FAT
73425faf74STENART Antoine #define CONFIG_CMD_EXT2
74425faf74STENART Antoine 
75425faf74STENART Antoine #define CONFIG_FS_FAT
76425faf74STENART Antoine 
77425faf74STENART Antoine /*
78425faf74STENART Antoine  * Only one of the following two options (DDR3/DDR2) should be enabled
79425faf74STENART Antoine  * CONFIG_TI816X_EVM_DDR2
80425faf74STENART Antoine  * CONFIG_TI816X_EVM_DDR3
81425faf74STENART Antoine  */
82425faf74STENART Antoine #define CONFIG_TI816X_EVM_DDR3
83425faf74STENART Antoine 
84425faf74STENART Antoine /*
85425faf74STENART Antoine  * Supported values: 400, 531, 675 or 796 MHz
86425faf74STENART Antoine  */
87425faf74STENART Antoine #define CONFIG_TI816X_DDR_PLL_796
88425faf74STENART Antoine 
89425faf74STENART Antoine #define CONFIG_TI816X_USE_EMIF0	1
90425faf74STENART Antoine #define CONFIG_TI816X_USE_EMIF1	1
91425faf74STENART Antoine 
92425faf74STENART Antoine 
93425faf74STENART Antoine #define CONFIG_NR_DRAM_BANKS	2		/* we have 2 banks of DRAM */
94425faf74STENART Antoine #define PHYS_DRAM_1		0x80000000	/* DRAM Bank #1 */
95425faf74STENART Antoine #define PHYS_DRAM_1_SIZE        0x40000000	/* 1 GB */
96425faf74STENART Antoine #define PHYS_DRAM_2		0xC0000000	/* DRAM Bank #2 */
97425faf74STENART Antoine #define PHYS_DRAM_2_SIZE	0x40000000	/* 1 GB */
98425faf74STENART Antoine 
99425faf74STENART Antoine #define CONFIG_MAX_RAM_BANK_SIZE	(2048 << 20)	/* 2048MB */
100425faf74STENART Antoine #define CONFIG_SYS_SDRAM_BASE		PHYS_DRAM_1
101425faf74STENART Antoine #define CONFIG_SYS_INIT_SP_ADDR		(NON_SECURE_SRAM_END - \
102425faf74STENART Antoine 		GENERATED_GBL_DATA_SIZE)
103425faf74STENART Antoine 
104425faf74STENART Antoine /**
105425faf74STENART Antoine  * Platform/Board specific defs
106425faf74STENART Antoine  */
107425faf74STENART Antoine #define CONFIG_SYS_CLK_FREQ     27000000
108425faf74STENART Antoine #define CONFIG_SYS_TIMERBASE    0x4802E000
109425faf74STENART Antoine #define CONFIG_SYS_PTV          2   /* Divisor: 2^(PTV+1) => 8 */
110425faf74STENART Antoine 
111425faf74STENART Antoine #undef CONFIG_NAND_OMAP_GPMC
112425faf74STENART Antoine 
113425faf74STENART Antoine /*
114425faf74STENART Antoine  * NS16550 Configuration
115425faf74STENART Antoine  */
116425faf74STENART Antoine #define CONFIG_SYS_NS16550
117425faf74STENART Antoine #define CONFIG_SYS_NS16550_SERIAL
118425faf74STENART Antoine #define CONFIG_SYS_NS16550_REG_SIZE (-4)
119425faf74STENART Antoine #define CONFIG_SYS_NS16550_CLK      (48000000)
120425faf74STENART Antoine #define CONFIG_SYS_NS16550_COM1     0x48024000  /* Base EVM has UART2 */
121425faf74STENART Antoine 
122425faf74STENART Antoine #define CONFIG_BAUDRATE     115200
123425faf74STENART Antoine 
124425faf74STENART Antoine /* allow overwriting serial config and ethaddr */
125425faf74STENART Antoine #define CONFIG_ENV_OVERWRITE
126425faf74STENART Antoine 
127425faf74STENART Antoine #define CONFIG_SERIAL1
128425faf74STENART Antoine #define CONFIG_SERIAL2
129425faf74STENART Antoine #define CONFIG_SERIAL3
130425faf74STENART Antoine #define CONFIG_CONS_INDEX	1
131425faf74STENART Antoine #define CONFIG_SYS_CONSOLE_INFO_QUIET
132425faf74STENART Antoine 
133425faf74STENART Antoine #define CONFIG_ENV_IS_NOWHERE
134425faf74STENART Antoine 
135425faf74STENART Antoine /* SPL */
136425faf74STENART Antoine /* Defines for SPL */
137425faf74STENART Antoine #define CONFIG_SPL_FRAMEWORK
138425faf74STENART Antoine #define CONFIG_SPL_TEXT_BASE    0x40400000
139425faf74STENART Antoine #define CONFIG_SPL_MAX_SIZE     ((128 - 18) * 1024)
140425faf74STENART Antoine #define CONFIG_SPL_STACK        CONFIG_SYS_INIT_SP_ADDR
141425faf74STENART Antoine 
142425faf74STENART Antoine #define CONFIG_SPL_BSS_START_ADDR   0x80000000
143425faf74STENART Antoine #define CONFIG_SPL_BSS_MAX_SIZE     0x80000     /* 512 KB */
144425faf74STENART Antoine 
145425faf74STENART Antoine #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
146425faf74STENART Antoine #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
147*205b4f33SGuillaume GARDET #define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
148*205b4f33SGuillaume GARDET #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
149425faf74STENART Antoine #define CONFIG_SPL_MMC_SUPPORT
150425faf74STENART Antoine #define CONFIG_SPL_FAT_SUPPORT
151425faf74STENART Antoine 
152425faf74STENART Antoine #define CONFIG_SPL_LIBCOMMON_SUPPORT
153425faf74STENART Antoine #define CONFIG_SPL_LIBDISK_SUPPORT
154425faf74STENART Antoine #define CONFIG_SPL_LIBGENERIC_SUPPORT
155425faf74STENART Antoine #define CONFIG_SPL_SERIAL_SUPPORT
156425faf74STENART Antoine #define CONFIG_SPL_GPIO_SUPPORT
157425faf74STENART Antoine #define CONFIG_SPL_YMODEM_SUPPORT
158425faf74STENART Antoine #define CONFIG_SYS_SPI_U_BOOT_OFFS  0x20000
159425faf74STENART Antoine #define CONFIG_SYS_SPI_U_BOOT_SIZE  0x40000
160425faf74STENART Antoine #define CONFIG_SPL_LDSCRIPT     "$(CPUDIR)/omap-common/u-boot-spl.lds"
161425faf74STENART Antoine 
162425faf74STENART Antoine #define CONFIG_SPL_BOARD_INIT
163425faf74STENART Antoine 
164425faf74STENART Antoine #define CONFIG_SYS_TEXT_BASE        0x80800000
165425faf74STENART Antoine #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
166425faf74STENART Antoine #define CONFIG_SYS_SPL_MALLOC_SIZE  0x100000
167425faf74STENART Antoine 
168425faf74STENART Antoine /* Since SPL did pll and ddr initialization for us,
169425faf74STENART Antoine  * we don't need to do it twice.
170425faf74STENART Antoine  */
171425faf74STENART Antoine #ifndef CONFIG_SPL_BUILD
172425faf74STENART Antoine #define CONFIG_SKIP_LOWLEVEL_INIT
173425faf74STENART Antoine #endif
174425faf74STENART Antoine 
175425faf74STENART Antoine /* Unsupported features */
176425faf74STENART Antoine #undef CONFIG_USE_IRQ
177425faf74STENART Antoine 
178425faf74STENART Antoine #endif
179