1 // SPDX-License-Identifier: GPL-2.0+
3 * K2L EVM : Board initialization
6 * Texas Instruments Incorporated, <www.ti.com>
10 #include <asm/arch/ddr3.h>
11 #include <asm/arch/hardware.h>
12 #include <asm/ti-common/keystone_net.h>
14 unsigned int get_external_clk(u32 clk)
16 unsigned int clk_freq;
42 static struct pll_init_data core_pll_config[NUM_SPDS] = {
43 [SPD800] = CORE_PLL_799,
44 [SPD1000] = CORE_PLL_1000,
45 [SPD1200] = CORE_PLL_1198,
49 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
52 static struct pll_init_data tetris_pll_config[] = {
53 [SPD800] = TETRIS_PLL_799,
54 [SPD1000] = TETRIS_PLL_1000,
55 [SPD1200] = TETRIS_PLL_1198,
56 [SPD1350] = TETRIS_PLL_1352,
57 [SPD1400] = TETRIS_PLL_1401,
60 static struct pll_init_data pa_pll_config =
63 struct pll_init_data *get_pll_init_data(int pll)
66 struct pll_init_data *data;
70 speed = get_max_dev_speed(speeds);
71 data = &core_pll_config[speed];
74 speed = get_max_arm_speed(speeds);
75 data = &tetris_pll_config[speed];
78 data = &pa_pll_config;
87 #ifdef CONFIG_BOARD_EARLY_INIT_F
88 int board_early_init_f(void)
96 #if defined(CONFIG_MULTI_DTB_FIT)
97 int board_fit_config_name_match(const char *name)
99 if (!strcmp(name, "keystone-k2l-evm"))
106 #ifdef CONFIG_SPL_BUILD
107 void spl_init_keystone_plls(void)