1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Common configuration header file for all Keystone II EVM platforms
5 * (C) Copyright 2012-2014
6 * Texas Instruments Incorporated, <www.ti.com>
9 #ifndef __CONFIG_KS2_EVM_H
10 #define __CONFIG_KS2_EVM_H
12 /* U-Boot Build Configuration */
14 /* SoC Configuration */
16 /* Memory Configuration */
17 #define CFG_SYS_LPAE_SDRAM_BASE 0x800000000
18 #define CFG_MAX_RAM_BANK_SIZE (2 << 30) /* 2GB */
20 #ifdef CONFIG_SYS_MALLOC_F_LEN
21 #define SPL_MALLOC_F_SIZE CONFIG_SYS_MALLOC_F_LEN
23 #define SPL_MALLOC_F_SIZE 0
26 /* SPL SPI Loader Configuration */
27 #define KEYSTONE_SPL_STACK_SIZE (8 * 1024)
29 /* SRAM scratch space entries */
30 #define SRAM_SCRATCH_SPACE_ADDR 0xc0c23fc
32 #define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR)
33 #define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
34 #define KEYSTONE_SRAM_SCRATCH_SPACE_END (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
36 /* UART Configuration */
37 #define CFG_SYS_NS16550_COM1 KS2_UART0_BASE
38 #define CFG_SYS_NS16550_COM2 KS2_UART1_BASE
40 #ifndef CONFIG_SOC_K2G
41 #define CFG_SYS_NS16550_CLK ks_clk_get_rate(KS2_CLK1_6)
43 #define CFG_SYS_NS16550_CLK ks_clk_get_rate(uart_pll_clk) / 2
46 /* SPI Configuration */
47 #define CFG_SYS_SPI_CLK ks_clk_get_rate(KS2_CLK1_6)
50 #define CFG_KSNET_MAC_ID_BASE KS2_MAC_ID_BASE_ADDR
51 #define CFG_KSNET_NETCP_BASE KS2_NETCP_BASE
52 #define CFG_KSNET_SERDES_SGMII_BASE KS2_SGMII_SERDES_BASE
53 #define CFG_KSNET_SERDES_SGMII2_BASE KS2_SGMII_SERDES2_BASE
54 #define CFG_KSNET_SERDES_LANES_PER_SGMII KS2_LANES_PER_SGMII_SERDES
56 /* EEPROM definitions */
58 /* NAND Configuration */
59 #define CFG_SYS_NAND_MASK_CLE 0x4000
60 #define CFG_SYS_NAND_MASK_ALE 0x2000
61 #define CFG_SYS_NAND_CS 2
63 #define CFG_SYS_NAND_LARGEPAGE
64 #define CFG_SYS_NAND_BASE_LIST { 0x30000000, }
68 /* U-Boot general configuration */
73 /* Now for the remaining common defines */
74 #include <configs/ti_armv7_common.h>
76 /* we may include files below only after all above definitions */
77 #include <asm/arch/hardware.h>
78 #include <asm/arch/clock.h>
79 #ifndef CONFIG_SOC_K2G
80 #define CFG_SYS_HZ_CLOCK ks_clk_get_rate(KS2_CLK1_6)
82 #define CFG_SYS_HZ_CLOCK get_external_clk(sys_clk)
85 #endif /* __CONFIG_KS2_EVM_H */