xref: /rk3399_rockchip-uboot/include/configs/ti816x_evm.h (revision 157f8461d468ad7bcd19ad9563b16c824c63bcd4)
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 
131d7f6ad2STom Rini #include <configs/ti_armv7_omap.h>
14425faf74STENART Antoine #include <asm/arch/omap.h>
15425faf74STENART Antoine 
16425faf74STENART Antoine #define CONFIG_ENV_SIZE			0x2000
17425faf74STENART Antoine #define CONFIG_MACH_TYPE		MACH_TYPE_TI8168EVM
18425faf74STENART Antoine 
19425faf74STENART Antoine #define CONFIG_EXTRA_ENV_SETTINGS	\
201d7f6ad2STom Rini 	DEFAULT_LINUX_BOOT_ENV \
211d7f6ad2STom Rini 	"mtdids=" MTDIDS_DEFAULT "\0" \
221d7f6ad2STom Rini 	"mtdparts=" MTDPARTS_DEFAULT "\0" \
23425faf74STENART Antoine 
24425faf74STENART Antoine #define CONFIG_BOOTCOMMAND			\
25425faf74STENART Antoine 	"mmc rescan;"				\
26425faf74STENART Antoine 	"fatload mmc 0 ${loadaddr} uImage;"	\
27425faf74STENART Antoine 	"bootm ${loadaddr}"			\
28425faf74STENART Antoine 
29425faf74STENART Antoine /* Clock Defines */
30425faf74STENART Antoine #define V_OSCK          24000000    /* Clock output from T2 */
31425faf74STENART Antoine #define V_SCLK          (V_OSCK >> 1)
32425faf74STENART Antoine 
334848d89dSSimon Glass #define CONFIG_CMD_ASKENV
34425faf74STENART Antoine 
35425faf74STENART Antoine #define CONFIG_MAX_RAM_BANK_SIZE	(2048 << 20)	/* 2048MB */
361d7f6ad2STom Rini #define CONFIG_SYS_SDRAM_BASE		0x80000000
37425faf74STENART Antoine 
38425faf74STENART Antoine /**
39425faf74STENART Antoine  * Platform/Board specific defs
40425faf74STENART Antoine  */
41425faf74STENART Antoine #define CONFIG_SYS_CLK_FREQ     27000000
42425faf74STENART Antoine #define CONFIG_SYS_TIMERBASE    0x4802E000
43425faf74STENART Antoine #define CONFIG_SYS_PTV          2   /* Divisor: 2^(PTV+1) => 8 */
44425faf74STENART Antoine 
45425faf74STENART Antoine /*
46425faf74STENART Antoine  * NS16550 Configuration
47425faf74STENART Antoine  */
48425faf74STENART Antoine #define CONFIG_SYS_NS16550_SERIAL
49425faf74STENART Antoine #define CONFIG_SYS_NS16550_REG_SIZE (-4)
50425faf74STENART Antoine #define CONFIG_SYS_NS16550_CLK      (48000000)
51425faf74STENART Antoine #define CONFIG_SYS_NS16550_COM1     0x48024000  /* Base EVM has UART2 */
52425faf74STENART Antoine 
53425faf74STENART Antoine /* allow overwriting serial config and ethaddr */
54425faf74STENART Antoine #define CONFIG_ENV_OVERWRITE
55425faf74STENART Antoine 
56425faf74STENART Antoine #define CONFIG_SERIAL1
57425faf74STENART Antoine #define CONFIG_SERIAL2
58425faf74STENART Antoine #define CONFIG_SERIAL3
59425faf74STENART Antoine #define CONFIG_CONS_INDEX	1
60425faf74STENART Antoine 
6177e99277STom Rini /*
6277e99277STom Rini  * GPMC NAND block.  We support 1 device and the physical address to
6377e99277STom Rini  * access CS0 at is 0x8000000.
6477e99277STom Rini  */
6577e99277STom Rini #define CONFIG_SYS_NAND_BASE		0x8000000
6677e99277STom Rini #define CONFIG_SYS_MAX_NAND_DEVICE	1
6777e99277STom Rini 
6877e99277STom Rini /* NAND: SPL related configs */
6977e99277STom Rini 
7077e99277STom Rini /* NAND: device related configs */
7177e99277STom Rini #define CONFIG_SYS_NAND_5_ADDR_CYCLE
7277e99277STom Rini #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
7377e99277STom Rini 					 CONFIG_SYS_NAND_PAGE_SIZE)
7477e99277STom Rini #define CONFIG_SYS_NAND_PAGE_SIZE	2048
7577e99277STom Rini #define CONFIG_SYS_NAND_OOBSIZE		64
7677e99277STom Rini #define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
7777e99277STom Rini /* NAND: driver related configs */
7877e99277STom Rini #define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
7977e99277STom Rini #define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8, 9, \
8077e99277STom Rini 					 10, 11, 12, 13, 14, 15, 16, 17, \
8177e99277STom Rini 					 18, 19, 20, 21, 22, 23, 24, 25, \
8277e99277STom Rini 					 26, 27, 28, 29, 30, 31, 32, 33, \
8377e99277STom Rini 					 34, 35, 36, 37, 38, 39, 40, 41, \
8477e99277STom Rini 					 42, 43, 44, 45, 46, 47, 48, 49, \
8577e99277STom Rini 					 50, 51, 52, 53, 54, 55, 56, 57, }
8677e99277STom Rini 
8777e99277STom Rini #define CONFIG_SYS_NAND_ECCSIZE		512
8877e99277STom Rini #define CONFIG_SYS_NAND_ECCBYTES	14
8977e99277STom Rini #define CONFIG_SYS_NAND_ONFI_DETECTION
9077e99277STom Rini #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
9177e99277STom Rini #define MTDIDS_DEFAULT			"nand0=nand.0"
9277e99277STom Rini #define MTDPARTS_DEFAULT		"mtdparts=nand.0:" \
9377e99277STom Rini 					"128k(NAND.SPL)," \
9477e99277STom Rini 					"128k(NAND.SPL.backup1)," \
9577e99277STom Rini 					"128k(NAND.SPL.backup2)," \
9677e99277STom Rini 					"128k(NAND.SPL.backup3)," \
9777e99277STom Rini 					"256k(NAND.u-boot-spl-os)," \
9877e99277STom Rini 					"1m(NAND.u-boot)," \
9977e99277STom Rini 					"128k(NAND.u-boot-env)," \
10077e99277STom Rini 					"128k(NAND.u-boot-env.backup1)," \
10177e99277STom Rini 					"8m(NAND.kernel)," \
10277e99277STom Rini 					"-(NAND.file-system)"
10377e99277STom Rini #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
10477e99277STom Rini #define CONFIG_ENV_OFFSET		0x001c0000
10577e99277STom Rini #define CONFIG_ENV_OFFSET_REDUND	0x001e0000
10677e99277STom Rini #define CONFIG_SYS_ENV_SECT_SIZE	CONFIG_SYS_NAND_BLOCK_SIZE
107425faf74STENART Antoine 
108425faf74STENART Antoine /* SPL */
109425faf74STENART Antoine /* Defines for SPL */
110425faf74STENART Antoine #define CONFIG_SPL_TEXT_BASE    0x40400000
111fa2f81b0STom Rini #define CONFIG_SPL_MAX_SIZE		(SRAM_SCRATCH_SPACE_ADDR - \
112fa2f81b0STom Rini 					 CONFIG_SPL_TEXT_BASE)
113425faf74STENART Antoine 
114425faf74STENART Antoine #define CONFIG_SYS_TEXT_BASE        0x80800000
115425faf74STENART Antoine 
116*de820365STom Rini #define CONFIG_DRIVER_TI_EMAC
117*de820365STom Rini #define CONFIG_MII
118*de820365STom Rini #define CONFIG_BOOTP_DNS
119*de820365STom Rini #define CONFIG_BOOTP_DNS2
120*de820365STom Rini #define CONFIG_BOOTP_SEND_HOSTNAME
121*de820365STom Rini #define CONFIG_BOOTP_GATEWAY
122*de820365STom Rini #define CONFIG_BOOTP_SUBNETMASK
123*de820365STom Rini #define CONFIG_NET_RETRY_COUNT	10
124*de820365STom Rini 
125425faf74STENART Antoine /* Since SPL did pll and ddr initialization for us,
126425faf74STENART Antoine  * we don't need to do it twice.
127425faf74STENART Antoine  */
128425faf74STENART Antoine #ifndef CONFIG_SPL_BUILD
129425faf74STENART Antoine #define CONFIG_SKIP_LOWLEVEL_INIT
130425faf74STENART Antoine #endif
131425faf74STENART Antoine 
1321d7f6ad2STom Rini /*
1331d7f6ad2STom Rini  * Disable MMC DM for SPL build and can be re-enabled after adding
1341d7f6ad2STom Rini  * DM support in SPL
1351d7f6ad2STom Rini  */
1361d7f6ad2STom Rini #ifdef CONFIG_SPL_BUILD
1371d7f6ad2STom Rini #undef CONFIG_DM_MMC
1381d7f6ad2STom Rini #undef CONFIG_TIMER
1391d7f6ad2STom Rini #endif
140425faf74STENART Antoine #endif
141