2 * K2L 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] = 122880000,
19 [alt_core_clk] = 100000000,
21 [tetris_clk] = 122880000,
22 [ddr3a_clk] = 100000000,
25 static struct pll_init_data core_pll_config[NUM_SPDS] = {
26 [SPD800] = CORE_PLL_799,
27 [SPD1000] = CORE_PLL_1000,
28 [SPD1200] = CORE_PLL_1198,
32 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
35 static struct pll_init_data tetris_pll_config[] = {
36 [SPD800] = TETRIS_PLL_799,
37 [SPD1000] = TETRIS_PLL_1000,
38 [SPD1200] = TETRIS_PLL_1198,
39 [SPD1350] = TETRIS_PLL_1352,
40 [SPD1400] = TETRIS_PLL_1401,
43 static struct pll_init_data pa_pll_config =
46 struct pll_init_data *get_pll_init_data(int pll)
49 struct pll_init_data *data;
53 speed = get_max_dev_speed(speeds);
54 data = &core_pll_config[speed];
57 speed = get_max_arm_speed(speeds);
58 data = &tetris_pll_config[speed];
61 data = &pa_pll_config;
70 #ifdef CONFIG_DRIVER_TI_KEYSTONE_NET
71 struct eth_priv_t eth_priv_cfg[] = {
73 .int_name = "K2L_EMAC",
77 .sgmii_link_type = SGMII_LINK_MAC_PHY,
78 .phy_if = PHY_INTERFACE_MODE_SGMII,
81 .int_name = "K2L_EMAC1",
85 .sgmii_link_type = SGMII_LINK_MAC_PHY,
86 .phy_if = PHY_INTERFACE_MODE_SGMII,
89 .int_name = "K2L_EMAC2",
93 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
94 .phy_if = PHY_INTERFACE_MODE_SGMII,
97 .int_name = "K2L_EMAC3",
101 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
102 .phy_if = PHY_INTERFACE_MODE_SGMII,
106 int get_num_eth_ports(void)
108 return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
112 #ifdef CONFIG_BOARD_EARLY_INIT_F
113 int board_early_init_f(void)
121 #ifdef CONFIG_SPL_BUILD
122 void spl_init_keystone_plls(void)