1 // SPDX-License-Identifier: GPL-2.0+
3 * K2HK EVM : Board initialization
5 * (C) Copyright 2012-2014
6 * Texas Instruments Incorporated, <www.ti.com>
12 #include <asm/arch/clock.h>
13 #include <asm/arch/hardware.h>
14 #include <asm/ti-common/keystone_net.h>
16 unsigned int external_clk[ext_clk_count] = {
17 [sys_clk] = 122880000,
18 [alt_core_clk] = 125000000,
20 [tetris_clk] = 125000000,
21 [ddr3a_clk] = 100000000,
22 [ddr3b_clk] = 100000000,
25 unsigned int get_external_clk(u32 clk)
27 unsigned int clk_freq;
56 static struct pll_init_data core_pll_config[NUM_SPDS] = {
57 [SPD800] = CORE_PLL_799,
58 [SPD1000] = CORE_PLL_999,
59 [SPD1200] = CORE_PLL_1200,
63 0, 0, 1, 4, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
66 static struct pll_init_data tetris_pll_config[] = {
67 [SPD800] = TETRIS_PLL_800,
68 [SPD1000] = TETRIS_PLL_1000,
69 [SPD1200] = TETRIS_PLL_1200,
70 [SPD1350] = TETRIS_PLL_1350,
71 [SPD1400] = TETRIS_PLL_1400,
74 static struct pll_init_data pa_pll_config =
77 struct pll_init_data *get_pll_init_data(int pll)
80 struct pll_init_data *data;
84 speed = get_max_dev_speed(speeds);
85 data = &core_pll_config[speed];
88 speed = get_max_arm_speed(speeds);
89 data = &tetris_pll_config[speed];
92 data = &pa_pll_config;
101 #ifdef CONFIG_BOARD_EARLY_INIT_F
102 int board_early_init_f(void)
110 #if defined(CONFIG_MULTI_DTB_FIT)
111 int board_fit_config_name_match(const char *name)
113 if (!strcmp(name, "keystone-k2hk-evm"))
120 #ifdef CONFIG_SPL_BUILD
121 void spl_init_keystone_plls(void)