1 // SPDX-License-Identifier: GPL-2.0+
3 * K2L EVM : Board initialization
6 * Texas Instruments Incorporated, <www.ti.com>
12 #include <asm/arch/ddr3.h>
13 #include <asm/arch/hardware.h>
14 #include <asm/ti-common/keystone_net.h>
16 unsigned int get_external_clk(u32 clk)
18 unsigned int clk_freq;
44 static struct pll_init_data core_pll_config[NUM_SPDS] = {
45 [SPD800] = CORE_PLL_799,
46 [SPD1000] = CORE_PLL_1000,
47 [SPD1200] = CORE_PLL_1198,
51 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
54 static struct pll_init_data tetris_pll_config[] = {
55 [SPD800] = TETRIS_PLL_799,
56 [SPD1000] = TETRIS_PLL_1000,
57 [SPD1200] = TETRIS_PLL_1198,
58 [SPD1350] = TETRIS_PLL_1352,
59 [SPD1400] = TETRIS_PLL_1401,
62 static struct pll_init_data pa_pll_config =
65 struct pll_init_data *get_pll_init_data(int pll)
68 struct pll_init_data *data;
72 speed = get_max_dev_speed(speeds);
73 data = &core_pll_config[speed];
76 speed = get_max_arm_speed(speeds);
77 data = &tetris_pll_config[speed];
80 data = &pa_pll_config;
89 #ifdef CONFIG_BOARD_EARLY_INIT_F
90 int board_early_init_f(void)
98 #if defined(CONFIG_MULTI_DTB_FIT)
99 int board_fit_config_name_match(const char *name)
101 if (!strcmp(name, "keystone-k2l-evm"))
108 #ifdef CONFIG_SPL_BUILD
109 void spl_init_keystone_plls(void)