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 [ddr3_clk] = 100000000,
22 [mcm_clk] = 312500000,
23 [pcie_clk] = 100000000,
24 [sgmii_clk] = 156250000,
25 [xgmii_clk] = 156250000,
26 [usb_clk] = 100000000,
29 static struct pll_init_data core_pll_config[] = {
39 static struct pll_init_data pa_pll_config =
42 #ifdef CONFIG_DRIVER_TI_KEYSTONE_NET
43 struct eth_priv_t eth_priv_cfg[] = {
45 .int_name = "K2E_EMAC0",
49 .sgmii_link_type = SGMII_LINK_MAC_PHY,
52 .int_name = "K2E_EMAC1",
56 .sgmii_link_type = SGMII_LINK_MAC_PHY,
59 .int_name = "K2E_EMAC2",
63 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
66 .int_name = "K2E_EMAC3",
70 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
73 .int_name = "K2E_EMAC4",
77 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
80 .int_name = "K2E_EMAC5",
84 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
87 .int_name = "K2E_EMAC6",
91 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
94 .int_name = "K2E_EMAC7",
98 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
102 int get_num_eth_ports(void)
104 return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
108 #if defined(CONFIG_BOARD_EARLY_INIT_F)
109 int board_early_init_f(void)
113 speed = get_max_dev_speed();
114 init_pll(&core_pll_config[speed]);
116 init_pll(&pa_pll_config);
122 #ifdef CONFIG_SPL_BUILD
123 static struct pll_init_data spl_pll_config[] = {
127 void spl_init_keystone_plls(void)
129 init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config);