xref: /openbmc/u-boot/board/ti/ks2_evm/board_k2e.c (revision 461be2f9)
1 /*
2  * K2E EVM : Board initialization
3  *
4  * (C) Copyright 2014
5  *     Texas Instruments Incorporated, <www.ti.com>
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9 
10 #include <common.h>
11 #include <asm/arch/ddr3.h>
12 #include <asm/arch/hardware.h>
13 
14 DECLARE_GLOBAL_DATA_PTR;
15 
16 unsigned int external_clk[ext_clk_count] = {
17 	[sys_clk]	= 100000000,
18 	[alt_core_clk]	= 100000000,
19 	[pa_clk]	= 100000000,
20 	[ddr3_clk]	= 100000000,
21 	[mcm_clk]	= 312500000,
22 	[pcie_clk]	= 100000000,
23 	[sgmii_clk]	= 156250000,
24 	[xgmii_clk]	= 156250000,
25 	[usb_clk]	= 100000000,
26 };
27 
28 static struct pll_init_data core_pll_config[] = {
29 	CORE_PLL_800,
30 	CORE_PLL_850,
31 	CORE_PLL_1000,
32 	CORE_PLL_1250,
33 	CORE_PLL_1350,
34 	CORE_PLL_1400,
35 	CORE_PLL_1500,
36 };
37 
38 
39 static struct pll_init_data pa_pll_config =
40 	PASS_PLL_1000;
41 
42 #if defined(CONFIG_BOARD_EARLY_INIT_F)
43 int board_early_init_f(void)
44 {
45 	int speed;
46 
47 	speed = get_max_dev_speed();
48 	init_pll(&core_pll_config[speed]);
49 
50 	init_pll(&pa_pll_config);
51 
52 	return 0;
53 }
54 #endif
55