blob: b36207cb5d185a6492943ba19ef757e0062001b5 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Hao Zhang2221cd12014-07-09 23:44:48 +03002/*
3 * Common configuration header file for all Keystone II EVM platforms
4 *
5 * (C) Copyright 2012-2014
6 * Texas Instruments Incorporated, <www.ti.com>
Hao Zhang2221cd12014-07-09 23:44:48 +03007 */
8
9#ifndef __CONFIG_KS2_EVM_H
10#define __CONFIG_KS2_EVM_H
11
Hao Zhang2221cd12014-07-09 23:44:48 +030012/* Memory Configuration */
Tom Rini65cc0e22022-11-16 13:10:41 -050013#define CFG_SYS_LPAE_SDRAM_BASE 0x800000000
Tom Rini8a897c42022-12-04 10:04:51 -050014#define CFG_MAX_RAM_BANK_SIZE (2 << 30) /* 2GB */
Hao Zhang2221cd12014-07-09 23:44:48 +030015
Franklin S Cooper Jra4562d02017-03-13 15:04:26 +020016/* SRAM scratch space entries */
Tom Rini9b5f9ae2022-05-19 15:09:22 -040017#define SRAM_SCRATCH_SPACE_ADDR 0xc0c23fc
Franklin S Cooper Jra4562d02017-03-13 15:04:26 +020018
19#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR)
20#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
21#define KEYSTONE_SRAM_SCRATCH_SPACE_END (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
22
Hao Zhang2221cd12014-07-09 23:44:48 +030023/* UART Configuration */
Tom Rini91092132022-11-16 13:10:28 -050024#define CFG_SYS_NS16550_COM1 KS2_UART0_BASE
25#define CFG_SYS_NS16550_COM2 KS2_UART1_BASE
Hao Zhang2221cd12014-07-09 23:44:48 +030026
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053027#ifndef CONFIG_SOC_K2G
Tom Rini91092132022-11-16 13:10:28 -050028#define CFG_SYS_NS16550_CLK ks_clk_get_rate(KS2_CLK1_6)
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053029#else
Tom Rini91092132022-11-16 13:10:28 -050030#define CFG_SYS_NS16550_CLK ks_clk_get_rate(uart_pll_clk) / 2
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053031#endif
32
Hao Zhang2221cd12014-07-09 23:44:48 +030033/* SPI Configuration */
Tom Rini65cc0e22022-11-16 13:10:41 -050034#define CFG_SYS_SPI_CLK ks_clk_get_rate(KS2_CLK1_6)
Hao Zhang2221cd12014-07-09 23:44:48 +030035
Khoronzhuk, Ivan0935cac2014-09-29 22:17:22 +030036/* Keystone net */
Tom Rinif060d182022-12-04 10:04:26 -050037#define CFG_KSNET_MAC_ID_BASE KS2_MAC_ID_BASE_ADDR
Tom Rinid4e4bc82022-12-04 10:04:27 -050038#define CFG_KSNET_NETCP_BASE KS2_NETCP_BASE
Tom Rinie9f508c2022-12-04 10:04:30 -050039#define CFG_KSNET_SERDES_SGMII_BASE KS2_SGMII_SERDES_BASE
Tom Rini81d239a2022-12-04 10:04:29 -050040#define CFG_KSNET_SERDES_SGMII2_BASE KS2_SGMII_SERDES2_BASE
Tom Rinid0366062022-12-04 10:04:28 -050041#define CFG_KSNET_SERDES_LANES_PER_SGMII KS2_LANES_PER_SGMII_SERDES
Khoronzhuk, Ivan0935cac2014-09-29 22:17:22 +030042
Hao Zhang2221cd12014-07-09 23:44:48 +030043/* NAND Configuration */
Tom Rini4e590942022-11-12 17:36:51 -050044#define CFG_SYS_NAND_MASK_CLE 0x4000
45#define CFG_SYS_NAND_MASK_ALE 0x2000
46#define CFG_SYS_NAND_CS 2
Hao Zhang2221cd12014-07-09 23:44:48 +030047
Tom Rini4e590942022-11-12 17:36:51 -050048#define CFG_SYS_NAND_LARGEPAGE
49#define CFG_SYS_NAND_BASE_LIST { 0x30000000, }
Hao Zhang2221cd12014-07-09 23:44:48 +030050
Nishanth Menone07cff12015-07-22 18:05:45 -050051/* Now for the remaining common defines */
52#include <configs/ti_armv7_common.h>
53
Hao Zhang2221cd12014-07-09 23:44:48 +030054/* we may include files below only after all above definitions */
Hao Zhang2221cd12014-07-09 23:44:48 +030055#include <asm/arch/clock.h>
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053056#ifndef CONFIG_SOC_K2G
Tom Rini65cc0e22022-11-16 13:10:41 -050057#define CFG_SYS_HZ_CLOCK ks_clk_get_rate(KS2_CLK1_6)
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053058#else
Tom Rini65cc0e22022-11-16 13:10:41 -050059#define CFG_SYS_HZ_CLOCK get_external_clk(sys_clk)
Vitaly Andrianove6d71e12015-09-19 16:26:41 +053060#endif
Hao Zhang2221cd12014-07-09 23:44:48 +030061
Hao Zhang2221cd12014-07-09 23:44:48 +030062#endif /* __CONFIG_KS2_EVM_H */