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[] = {
40 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
43 static struct pll_init_data pa_pll_config =
46 #ifdef CONFIG_DRIVER_TI_KEYSTONE_NET
47 struct eth_priv_t eth_priv_cfg[] = {
49 .int_name = "K2E_EMAC0",
53 .sgmii_link_type = SGMII_LINK_MAC_PHY,
56 .int_name = "K2E_EMAC1",
60 .sgmii_link_type = SGMII_LINK_MAC_PHY,
63 .int_name = "K2E_EMAC2",
67 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
70 .int_name = "K2E_EMAC3",
74 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
77 .int_name = "K2E_EMAC4",
81 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
84 .int_name = "K2E_EMAC5",
88 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
91 .int_name = "K2E_EMAC6",
95 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
98 .int_name = "K2E_EMAC7",
102 .sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
106 int get_num_eth_ports(void)
108 return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
112 #if defined(CONFIG_BOARD_EARLY_INIT_F)
113 int board_early_init_f(void)
117 speed = get_max_dev_speed();
118 init_pll(&core_pll_config[speed]);
120 init_pll(&pa_pll_config);
126 #ifdef CONFIG_SPL_BUILD
127 static struct pll_init_data spl_pll_config[] = {
131 void spl_init_keystone_plls(void)
133 init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config);