]> git.sur5r.net Git - u-boot/commitdiff
board: ti: am43xx: add support for AM43xx Starter Kit
authorFelipe Balbi <balbi@ti.com>
Tue, 10 Jun 2014 20:01:20 +0000 (15:01 -0500)
committerTom Rini <trini@ti.com>
Thu, 19 Jun 2014 21:53:58 +0000 (17:53 -0400)
AM43xx Starter Kit is a new board based on
AM437x line of SoCs. Being a low-cost EVM and
small size EVM are intended to provide an entry
level development platform on a full fledged
Hardware System.

Signed-off-by: Felipe Balbi <balbi@ti.com>
board/ti/am43xx/board.c
board/ti/am43xx/board.h
include/configs/am43xx_evm.h

index 6197076d04fa219a7dd3895b9e712109e2c6fc50..6379cef89f08959bb2ffc38c451ef698d8aa958c 100644 (file)
@@ -217,6 +217,28 @@ const struct emif_regs ddr3_emif_regs_400Mhz = {
        .emif_rd_wr_exec_thresh         = 0x00000405
 };
 
+static const struct emif_regs ddr3_sk_emif_regs_400Mhz = {
+       .sdram_config                   = 0x638413b2,
+       .sdram_config2                  = 0x00000000,
+       .ref_ctrl                       = 0x00000c30,
+       .sdram_tim1                     = 0xeaaad4db,
+       .sdram_tim2                     = 0x266b7fda,
+       .sdram_tim3                     = 0x107f8678,
+       .read_idle_ctrl                 = 0x00050000,
+       .zq_config                      = 0x50074be4,
+       .temp_alert_config              = 0x0,
+       .emif_ddr_phy_ctlr_1            = 0x0e084008,
+       .emif_ddr_ext_phy_ctrl_1        = 0x08020080,
+       .emif_ddr_ext_phy_ctrl_2        = 0x89,
+       .emif_ddr_ext_phy_ctrl_3        = 0x90,
+       .emif_ddr_ext_phy_ctrl_4        = 0x8e,
+       .emif_ddr_ext_phy_ctrl_5        = 0x8d,
+       .emif_rd_wr_lvl_rmp_win         = 0x0,
+       .emif_rd_wr_lvl_rmp_ctl         = 0x00000000,
+       .emif_rd_wr_lvl_ctl             = 0x00000000,
+       .emif_rd_wr_exec_thresh         = 0x00000000,
+};
+
 const u32 ext_phy_ctrl_const_base_ddr3[] = {
        0x00400040,
        0x00350035,
@@ -240,6 +262,48 @@ const u32 ext_phy_ctrl_const_base_ddr3[] = {
        0x08102040
 };
 
+static const u32 ext_phy_ctrl_const_base_ddr3_sk[] = {
+       /* first 5 are taken care by emif_regs */
+       0x00700070,
+
+       0x00350035,
+       0x00350035,
+       0x00350035,
+       0x00350035,
+       0x00350035,
+
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+
+       0x00150015,
+       0x00150015,
+       0x00150015,
+       0x00150015,
+       0x00150015,
+
+       0x00800080,
+       0x00800080,
+
+       0x40000000,
+
+       0x08102040,
+
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+};
+
 void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
 {
        if (board_is_eposevm()) {
@@ -248,6 +312,9 @@ void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
        } else if (board_is_gpevm()) {
                *regs = ext_phy_ctrl_const_base_ddr3;
                *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3);
+       } else if (board_is_sk()) {
+               *regs = ext_phy_ctrl_const_base_ddr3_sk;
+               *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3_sk);
        }
 
        return;
@@ -257,7 +324,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
 {
        if (board_is_eposevm())
                return &epos_evm_dpll_ddr;
-       else if (board_is_gpevm())
+       else if (board_is_gpevm() || board_is_sk())
                return &gp_evm_dpll_ddr;
 
        printf(" Board '%s' not supported\n", am43xx_board_name);
@@ -410,6 +477,9 @@ void sdram_init(void)
                enable_vtt_regulator();
                config_ddr(0, &ioregs_ddr3, NULL, NULL,
                           &ddr3_emif_regs_400Mhz, 0);
+       } else if (board_is_sk()) {
+               config_ddr(400, &ioregs_ddr3, NULL, NULL,
+                          &ddr3_sk_emif_regs_400Mhz, 0);
        }
 }
 #endif
index 091162ee20ff8ff9b49f571e483d43775e300f2a..017047d2d0513ead355869a121d3008bbd40fbf7 100644 (file)
@@ -47,6 +47,11 @@ static inline int board_is_gpevm(void)
        return !strncmp(am43xx_board_name, "AM43__GP", HDR_NAME_LEN);
 }
 
+static inline int board_is_sk(void)
+{
+       return !strncmp(am43xx_board_name, "AM43__SK", HDR_NAME_LEN);
+}
+
 void enable_uart0_pin_mux(void);
 void enable_board_pin_mux(void);
 void enable_i2c0_pin_mux(void);
index 823cba6ff43583f0536c026e451d6c30aaceecf5..974ce986e9ce8bef0eea7394c5033f114ae5908e 100644 (file)
                        "setenv fdtfile am43x-epos-evm.dtb; fi; " \
                "if test $board_name = AM43__GP; then " \
                        "setenv fdtfile am437x-gp-evm.dtb; fi; " \
+               "if test $board_name = AM43__SK; then " \
+                       "setenv fdtfile am437x-sk-evm.dtb; fi; " \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree; fi; \0"