This patch adds Keystone II Lammar (K2L) EVM board support. Acked-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Hao Zhang <hzhang@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>master
parent
b66604fb66
commit
345af53456
@ -0,0 +1,72 @@ |
||||
/*
|
||||
* K2L EVM : Board initialization |
||||
* |
||||
* (C) Copyright 2014 |
||||
* Texas Instruments Incorporated, <www.ti.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <asm/arch/ddr3.h> |
||||
#include <asm/arch/hardware.h> |
||||
#include <asm/ti-common/ti-aemif.h> |
||||
|
||||
DECLARE_GLOBAL_DATA_PTR; |
||||
|
||||
unsigned int external_clk[ext_clk_count] = { |
||||
[sys_clk] = 122880000, |
||||
[alt_core_clk] = 100000000, |
||||
[pa_clk] = 122880000, |
||||
[tetris_clk] = 122880000, |
||||
[ddr3_clk] = 100000000, |
||||
[pcie_clk] = 100000000, |
||||
[sgmii_clk] = 156250000, |
||||
[usb_clk] = 100000000, |
||||
}; |
||||
|
||||
static struct pll_init_data core_pll_config[] = { |
||||
CORE_PLL_799, |
||||
CORE_PLL_1000, |
||||
CORE_PLL_1198, |
||||
}; |
||||
|
||||
static struct pll_init_data tetris_pll_config[] = { |
||||
TETRIS_PLL_799, |
||||
TETRIS_PLL_1000, |
||||
TETRIS_PLL_1198, |
||||
TETRIS_PLL_1352, |
||||
TETRIS_PLL_1401, |
||||
}; |
||||
|
||||
static struct pll_init_data pa_pll_config = |
||||
PASS_PLL_983; |
||||
|
||||
#ifdef CONFIG_BOARD_EARLY_INIT_F |
||||
int board_early_init_f(void) |
||||
{ |
||||
int speed; |
||||
|
||||
speed = get_max_dev_speed(); |
||||
init_pll(&core_pll_config[speed]); |
||||
|
||||
init_pll(&pa_pll_config); |
||||
|
||||
speed = get_max_arm_speed(); |
||||
init_pll(&tetris_pll_config[speed]); |
||||
|
||||
return 0; |
||||
} |
||||
#endif |
||||
|
||||
#ifdef CONFIG_SPL_BUILD |
||||
static struct pll_init_data spl_pll_config[] = { |
||||
CORE_PLL_799, |
||||
TETRIS_PLL_491, |
||||
}; |
||||
|
||||
void spl_init_keystone_plls(void) |
||||
{ |
||||
init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config); |
||||
} |
||||
#endif |
@ -0,0 +1,38 @@ |
||||
/*
|
||||
* Keystone2: DDR3 initialization |
||||
* |
||||
* (C) Copyright 2014 |
||||
* Texas Instruments Incorporated, <www.ti.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include "ddr3_cfg.h" |
||||
#include <asm/arch/ddr3.h> |
||||
|
||||
static int ddr3_size; |
||||
static struct pll_init_data ddr3_400 = DDR3_PLL_400; |
||||
|
||||
void ddr3_init(void) |
||||
{ |
||||
init_pll(&ddr3_400); |
||||
|
||||
/* No SO-DIMM, 2GB discreet DDR */ |
||||
printf("DRAM: 2 GiB\n"); |
||||
ddr3_size = 2; |
||||
|
||||
/* Reset DDR3 PHY after PLL enabled */ |
||||
ddr3_reset_ddrphy(); |
||||
|
||||
ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, &ddr3phy_1600_2g); |
||||
ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE, &ddr3_1600_2g); |
||||
} |
||||
|
||||
/**
|
||||
* ddr3_get_size - return ddr3 size in GiB |
||||
*/ |
||||
int ddr3_get_size(void) |
||||
{ |
||||
return ddr3_size; |
||||
} |
@ -0,0 +1,4 @@ |
||||
CONFIG_SPL=y |
||||
+S:CONFIG_ARM=y |
||||
+S:CONFIG_ARCH_KEYSTONE=y |
||||
+S:CONFIG_TARGET_K2L_EVM=y |
@ -0,0 +1,37 @@ |
||||
/*
|
||||
* Configuration header file for TI's k2l-evm |
||||
* |
||||
* (C) Copyright 2012-2014 |
||||
* Texas Instruments Incorporated, <www.ti.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#ifndef __CONFIG_K2L_EVM_H |
||||
#define __CONFIG_K2L_EVM_H |
||||
|
||||
/* Platform type */ |
||||
#define CONFIG_SOC_K2L |
||||
#define CONFIG_K2L_EVM |
||||
|
||||
/* U-Boot general configuration */ |
||||
#define CONFIG_SYS_PROMPT "K2L EVM # " |
||||
|
||||
#define KS2_ARGS_UBI "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "\ |
||||
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,4096\0" |
||||
|
||||
#define KS2_FDT_NAME "name_fdt=k2l-evm.dtb\0" |
||||
#define KS2_ADDR_MON "addr_mon=0x0c140000\0" |
||||
#define KS2_NAME_MON "name_mon=skern-k2l-evm.bin\0" |
||||
#define NAME_UBOOT "name_uboot=u-boot-spi-k2l-evm.gph\0" |
||||
#define NAME_UBI "name_ubi=k2l-evm-ubifs.ubi\0" |
||||
|
||||
#include <configs/ks2_evm.h> |
||||
|
||||
/* SPL SPI Loader Configuration */ |
||||
#define CONFIG_SPL_TEXT_BASE 0x0c100000 |
||||
|
||||
/* NAND Configuration */ |
||||
#define CONFIG_SYS_NAND_PAGE_4K |
||||
|
||||
#endif /* __CONFIG_K2L_EVM_H */ |
Loading…
Reference in new issue