xref: /rk3399_rockchip-uboot/include/configs/ti_am335x_common.h (revision 157f8461d468ad7bcd19ad9563b16c824c63bcd4)
187694558STom Rini /*
287694558STom Rini  * ti_am335x_common.h
387694558STom Rini  *
487694558STom Rini  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
587694558STom Rini  *
687694558STom Rini  * SPDX-License-Identifier:	GPL-2.0+
787694558STom Rini  *
887694558STom Rini  * For more details, please see the technical documents listed at
987694558STom Rini  * http://www.ti.com/product/am3359#technicaldocuments
1087694558STom Rini  */
1187694558STom Rini 
1287694558STom Rini #ifndef __CONFIG_TI_AM335X_COMMON_H__
1387694558STom Rini #define __CONFIG_TI_AM335X_COMMON_H__
1487694558STom Rini 
1587694558STom Rini #define CONFIG_ARCH_CPU_INIT
1687694558STom Rini #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
1787694558STom Rini #define CONFIG_SYS_TIMERBASE		0x48040000	/* Use Timer2 */
1816678eb4SHeiko Schocher #define CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
1987694558STom Rini 
2087694558STom Rini #include <asm/arch/omap.h>
2187694558STom Rini 
2287694558STom Rini /* NS16550 Configuration */
231a44cd89SSimon Glass #ifdef CONFIG_SPL_BUILD
2487694558STom Rini #define CONFIG_SYS_NS16550_SERIAL
25*238205f1SLokesh Vutla #ifndef CONFIG_DM_SERIAL
2687694558STom Rini #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
271a44cd89SSimon Glass #endif
28*238205f1SLokesh Vutla #endif
2987694558STom Rini #define CONFIG_SYS_NS16550_CLK		48000000
3087694558STom Rini 
31e77faeb7SLokesh Vutla #ifndef CONFIG_SPL_BUILD
3287694558STom Rini /* Network defines. */
33a7a06400STom Rini #define CONFIG_BOOTP_DNS		/* Configurable parts of CMD_DHCP */
3487694558STom Rini #define CONFIG_BOOTP_DNS2
3587694558STom Rini #define CONFIG_BOOTP_SEND_HOSTNAME
3687694558STom Rini #define CONFIG_BOOTP_GATEWAY
3787694558STom Rini #define CONFIG_BOOTP_SUBNETMASK
3887694558STom Rini #define CONFIG_NET_RETRY_COUNT         10
39a7a06400STom Rini #define CONFIG_MII			/* Required in net/eth.c */
40e77faeb7SLokesh Vutla #endif
4187694558STom Rini 
42e77faeb7SLokesh Vutla #define CONFIG_DRIVER_TI_CPSW		/* Driver for IP block */
43c27efde6STom Rini /*
44a1c143f4STom Rini  * RTC related defines. To use bootcount you must set bootlimit in the
45abcaa6eeSTom Rini  * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT
46abcaa6eeSTom Rini  * in the board config.
47a1c143f4STom Rini  */
48a1c143f4STom Rini #define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
49a1c143f4STom Rini 
50a1c143f4STom Rini /*
51c27efde6STom Rini  * SPL related defines.  The Public RAM memory map the ROM defines the
52c27efde6STom Rini  * area between 0x402F0400 and 0x4030B800 as a download area and
53c27efde6STom Rini  * 0x4030B800 to 0x4030CE00 as a public stack area.  The ROM also
54c27efde6STom Rini  * supports X-MODEM loading via UART, and we leverage this and then use
55c27efde6STom Rini  * Y-MODEM to load u-boot.img, when booted over UART.
56c27efde6STom Rini  */
574d82c4b5SAndrew F. Davis #define CONFIG_SPL_TEXT_BASE		CONFIG_ISW_ENTRY_ADDR
58d3289aacSTom Rini #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_SDRAM_BASE + \
59d3289aacSTom Rini 					 (128 << 20))
6087694558STom Rini 
616843918eSTom Rini /* Enable the watchdog inside of SPL */
626843918eSTom Rini 
6387694558STom Rini /*
6487694558STom Rini  * Since SPL did pll and ddr initialization for us,
6587694558STom Rini  * we don't need to do it twice.
6687694558STom Rini  */
6787694558STom Rini #if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NOR_BOOT)
6887694558STom Rini #define CONFIG_SKIP_LOWLEVEL_INIT
6987694558STom Rini #endif
7087694558STom Rini 
71196311dcSTom Rini /*
72196311dcSTom Rini  * When building U-Boot such that there is no previous loader
73196311dcSTom Rini  * we need to call board_early_init_f.  This is taken care of in
74196311dcSTom Rini  * s_init when we have SPL used.
75196311dcSTom Rini  */
76196311dcSTom Rini 
7787694558STom Rini /* Now bring in the rest of the common code. */
789a0f4004SNishanth Menon #include <configs/ti_armv7_omap.h>
7987694558STom Rini 
8087694558STom Rini #endif	/* __CONFIG_TI_AM335X_COMMON_H__ */
81