xref: /openbmc/u-boot/include/configs/dra7xx_evm.h (revision 66c433ed4342e5761ee9b048c85fe47d31130b2e)
183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
23ef5ebebSLokesh Vutla /*
33ef5ebebSLokesh Vutla  * (C) Copyright 2013
43ef5ebebSLokesh Vutla  * Texas Instruments Incorporated.
53ef5ebebSLokesh Vutla  * Lokesh Vutla	  <lokeshvutla@ti.com>
63ef5ebebSLokesh Vutla  *
73ef5ebebSLokesh Vutla  * Configuration settings for the TI DRA7XX board.
83d657a05SEnric Balletbò i Serra  * See ti_omap5_common.h for omap5 common settings.
93ef5ebebSLokesh Vutla  */
103ef5ebebSLokesh Vutla 
113ef5ebebSLokesh Vutla #ifndef __CONFIG_DRA7XX_EVM_H
123ef5ebebSLokesh Vutla #define __CONFIG_DRA7XX_EVM_H
133ef5ebebSLokesh Vutla 
14f843770aSSekhar Nori #include <environment/ti/dfu.h>
15f843770aSSekhar Nori 
16706dd348SLokesh Vutla #define CONFIG_IODELAY_RECALIBRATION
17706dd348SLokesh Vutla 
18212425b2SLokesh Vutla #define CONFIG_VERY_BIG_RAM
19212425b2SLokesh Vutla #define CONFIG_MAX_MEM_MAPPED		0x80000000
20212425b2SLokesh Vutla 
2179b079f3STom Rini #ifndef CONFIG_QSPI_BOOT
22d3d33dafSLokesh Vutla /* MMC ENV related defines */
23d3d33dafSLokesh Vutla #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
242737f011STom Rini #define CONFIG_ENV_SIZE			(128 << 10)
257a53a1a8SJean-Jacques Hiblot #define CONFIG_ENV_OFFSET		0x260000
26d3d33dafSLokesh Vutla #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
27d3d33dafSLokesh Vutla #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
2879b079f3STom Rini #endif
299552ee3eSTom Rini 
30a13cbf5fSMinal Shah #if (CONFIG_CONS_INDEX == 1)
31a8017574STom Rini #define CONSOLEDEV			"ttyO0"
32a13cbf5fSMinal Shah #elif (CONFIG_CONS_INDEX == 3)
33a13cbf5fSMinal Shah #define CONSOLEDEV			"ttyO2"
34a13cbf5fSMinal Shah #endif
35a13cbf5fSMinal Shah #define CONFIG_SYS_NS16550_COM1		UART1_BASE	/* Base EVM has UART0 */
36a13cbf5fSMinal Shah #define CONFIG_SYS_NS16550_COM2		UART2_BASE	/* UART2 */
37a13cbf5fSMinal Shah #define CONFIG_SYS_NS16550_COM3		UART3_BASE	/* UART3 */
3897405d84SLokesh Vutla 
39a1dc980dSSimon Glass #define CONFIG_ENV_EEPROM_IS_ON_I2C
40a1dc980dSSimon Glass #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* Main EEPROM */
41a1dc980dSSimon Glass #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2
42a1dc980dSSimon Glass 
4397405d84SLokesh Vutla #define CONFIG_SYS_OMAP_ABE_SYSCK
4445dbbf29SDan Murphy 
4508520bf5STom Rini #ifndef CONFIG_SPL_BUILD
467a5a3e37SKishon Vijay Abraham I #define DFUARGS \
477a5a3e37SKishon Vijay Abraham I 	"dfu_bufsiz=0x10000\0" \
487a5a3e37SKishon Vijay Abraham I 	DFU_ALT_INFO_MMC \
497a5a3e37SKishon Vijay Abraham I 	DFU_ALT_INFO_EMMC \
505486d067SVignesh R 	DFU_ALT_INFO_RAM \
515486d067SVignesh R 	DFU_ALT_INFO_QSPI
5208520bf5STom Rini #endif
53be17d396SDileep Katta 
54cdb1808aSB, Ravi #ifdef CONFIG_SPL_BUILD
55cdb1808aSB, Ravi #undef CONFIG_CMD_BOOTD
56*6536ca4dSAndrew F. Davis #ifdef CONFIG_SPL_DFU
57cdb1808aSB, Ravi #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000
58cdb1808aSB, Ravi #define DFUARGS \
59cdb1808aSB, Ravi 	"dfu_bufsiz=0x10000\0" \
60cdb1808aSB, Ravi 	DFU_ALT_INFO_RAM
61cdb1808aSB, Ravi #endif
62cdb1808aSB, Ravi #endif
63cdb1808aSB, Ravi 
643d657a05SEnric Balletbò i Serra #include <configs/ti_omap5_common.h>
6545dbbf29SDan Murphy 
662efa79aeSTom Rini /* Enhance our eMMC support / experience. */
678065a4e8SLubomir Popov #define CONFIG_HSMMC2_8BIT
682efa79aeSTom Rini 
69c9be62caSMugunthan V N /* CPSW Ethernet */
70c9be62caSMugunthan V N #define CONFIG_BOOTP_DNS2
71c9be62caSMugunthan V N #define CONFIG_BOOTP_SEND_HOSTNAME
72c9be62caSMugunthan V N #define CONFIG_NET_RETRY_COUNT		10
7339fbac91SDan Murphy #define CONFIG_PHY_TI
74c9be62caSMugunthan V N 
75247cdf04SMatt Porter /* SPI */
76247cdf04SMatt Porter #define CONFIG_TI_SPI_MMAP
7746122960SRavi Babu #define CONFIG_QSPI_QUAD_SUPPORT
78247cdf04SMatt Porter 
7979b079f3STom Rini /*
8079b079f3STom Rini  * Default to using SPI for environment, etc.
81279dcd89SB, Ravi  * 0x000000 - 0x040000 : QSPI.SPL (256KiB)
8279b079f3STom Rini  * 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
8379b079f3STom Rini  * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
8479b079f3STom Rini  * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
8579b079f3STom Rini  * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
8679b079f3STom Rini  * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
8779b079f3STom Rini  * 0x9E0000 - 0x2000000 : USERLAND
8879b079f3STom Rini  */
8979b079f3STom Rini #define CONFIG_SYS_SPI_KERNEL_OFFS	0x1E0000
9079b079f3STom Rini #define CONFIG_SYS_SPI_ARGS_OFFS	0x140000
9179b079f3STom Rini #define CONFIG_SYS_SPI_ARGS_SIZE	0x80000
9279b079f3STom Rini #if defined(CONFIG_QSPI_BOOT)
9379b079f3STom Rini #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
9479b079f3STom Rini #define CONFIG_ENV_SIZE			(64 << 10)
9579b079f3STom Rini #define CONFIG_ENV_SECT_SIZE		(64 << 10) /* 64 KB sectors */
9679b079f3STom Rini #define CONFIG_ENV_OFFSET		0x1C0000
9779b079f3STom Rini #define CONFIG_ENV_OFFSET_REDUND	0x1D0000
9879b079f3STom Rini #endif
9979b079f3STom Rini 
100247cdf04SMatt Porter /* SPI SPL */
101fc5e2200SVignesh R #define CONFIG_TI_EDMA3
10279b079f3STom Rini #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
103247cdf04SMatt Porter 
104b818d9abSTom Rini #define CONFIG_SUPPORT_EMMC_BOOT
105b818d9abSTom Rini 
106834e91afSDan Murphy /* USB xHCI HOST */
107834e91afSDan Murphy #define CONFIG_USB_XHCI_OMAP
108834e91afSDan Murphy 
109834e91afSDan Murphy #define CONFIG_OMAP_USB2PHY2_HOST
110834e91afSDan Murphy 
11121914ee6SRoger Quadros /* SATA */
11221914ee6SRoger Quadros #define CONFIG_SCSI_AHCI_PLAT
11321914ee6SRoger Quadros 
11454a97d28Spekon gupta /* NAND support */
11554a97d28Spekon gupta #ifdef CONFIG_NAND
11654a97d28Spekon gupta /* NAND: device related configs */
11754a97d28Spekon gupta #define CONFIG_SYS_NAND_PAGE_SIZE	2048
11854a97d28Spekon gupta #define CONFIG_SYS_NAND_OOBSIZE		64
11954a97d28Spekon gupta #define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
12054a97d28Spekon gupta #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
12154a97d28Spekon gupta 					 CONFIG_SYS_NAND_PAGE_SIZE)
12254a97d28Spekon gupta #define CONFIG_SYS_NAND_5_ADDR_CYCLE
12354a97d28Spekon gupta /* NAND: driver related configs */
12454a97d28Spekon gupta #define CONFIG_SYS_NAND_ONFI_DETECTION
12554a97d28Spekon gupta #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
12654a97d28Spekon gupta #define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
12754a97d28Spekon gupta #define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8, 9, \
12854a97d28Spekon gupta 					 10, 11, 12, 13, 14, 15, 16, 17, \
12954a97d28Spekon gupta 					 18, 19, 20, 21, 22, 23, 24, 25, \
13054a97d28Spekon gupta 					 26, 27, 28, 29, 30, 31, 32, 33, \
13154a97d28Spekon gupta 					 34, 35, 36, 37, 38, 39, 40, 41, \
13254a97d28Spekon gupta 					 42, 43, 44, 45, 46, 47, 48, 49, \
13354a97d28Spekon gupta 					 50, 51, 52, 53, 54, 55, 56, 57, }
13454a97d28Spekon gupta #define CONFIG_SYS_NAND_ECCSIZE		512
13554a97d28Spekon gupta #define CONFIG_SYS_NAND_ECCBYTES	14
13654a97d28Spekon gupta #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
13754a97d28Spekon gupta /* NAND: SPL related configs */
13854a97d28Spekon gupta /* NAND: SPL falcon mode configs */
13954a97d28Spekon gupta #ifdef CONFIG_SPL_OS_BOOT
14054a97d28Spekon gupta #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x00200000 /* kernel offset */
14154a97d28Spekon gupta #endif
14254a97d28Spekon gupta #endif /* !CONFIG_NAND */
14354a97d28Spekon gupta 
1449352697aSpekon gupta /* Parallel NOR Support */
1459352697aSpekon gupta #if defined(CONFIG_NOR)
1469352697aSpekon gupta /* NOR: device related configs */
1479352697aSpekon gupta #define CONFIG_SYS_MAX_FLASH_SECT	512
1489352697aSpekon gupta #define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
1499352697aSpekon gupta #define CONFIG_SYS_FLASH_SIZE		(64 * 1024 * 1024) /* 64 MB */
1509352697aSpekon gupta /* #define CONFIG_INIT_IGNORE_ERROR */
1519352697aSpekon gupta #define CONFIG_SYS_MAX_FLASH_BANKS	1
1529352697aSpekon gupta #define CONFIG_SYS_FLASH_BASE		(0x08000000)
1539352697aSpekon gupta #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
1549352697aSpekon gupta /* Reduce SPL size by removing unlikey targets */
1559352697aSpekon gupta #ifdef CONFIG_NOR_BOOT
1569352697aSpekon gupta #define CONFIG_ENV_SECT_SIZE		(128 * 1024)	/* 128 KiB */
1579352697aSpekon gupta #define CONFIG_ENV_OFFSET		0x001c0000
1589352697aSpekon gupta #define CONFIG_ENV_OFFSET_REDUND	0x001e0000
1599352697aSpekon gupta #endif
1609352697aSpekon gupta #endif  /* NOR support */
1619352697aSpekon gupta 
1623ef5ebebSLokesh Vutla #endif /* __CONFIG_DRA7XX_EVM_H */
163