2 * K2E EVM : Board initialization
5 * Texas Instruments Incorporated, <www.ti.com>
7 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/ddr3.h>
12 #include <asm/arch/hardware.h>
13 #include <asm/ti-common/keystone_net.h>
15 DECLARE_GLOBAL_DATA_PTR;
17 unsigned int external_clk[ext_clk_count] = {
18 [sys_clk] = 100000000,
19 [alt_core_clk] = 100000000,
21 [ddr3a_clk] = 100000000,
24 static struct pll_init_data core_pll_config[NUM_SPDS] = {
25 [SPD800] = CORE_PLL_800,
26 [SPD850] = CORE_PLL_850,
27 [SPD1000] = CORE_PLL_1000,
28 [SPD1250] = CORE_PLL_1250,
29 [SPD1350] = CORE_PLL_1350,
30 [SPD1400] = CORE_PLL_1400,
31 [SPD1500] = CORE_PLL_1500,
34 /* DEV and ARM speed definitions as specified in DEVSPEED register */
35 int speeds[DEVSPEED_NUMSPDS] = {
51 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
54 static struct pll_init_data pa_pll_config =
57 struct pll_init_data *get_pll_init_data(int pll)
60 struct pll_init_data *data;
64 speed = get_max_dev_speed();
65 data = &core_pll_config[speed];
68 data = &pa_pll_config;
77 #ifdef CONFIG_DRIVER_TI_KEYSTONE_NET
78 struct eth_priv_t eth_priv_cfg[] = {
80 .int_name = "K2E_EMAC0",
84 .sgmii_link_type = SGMII_LINK_MAC_PHY,
87 .int_name = "K2E_EMAC1",
91 .sgmii_link_type = SGMII_LINK_MAC_PHY,
94 .int_name = "K2E_EMAC2",
98 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
101 .int_name = "K2E_EMAC3",
105 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
108 .int_name = "K2E_EMAC4",
112 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
115 .int_name = "K2E_EMAC5",
119 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
122 .int_name = "K2E_EMAC6",
126 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
129 .int_name = "K2E_EMAC7",
133 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
137 int get_num_eth_ports(void)
139 return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
143 #if defined(CONFIG_BOARD_EARLY_INIT_F)
144 int board_early_init_f(void)
152 #ifdef CONFIG_SPL_BUILD
153 void spl_init_keystone_plls(void)