[U-Boot] [PATCH 0/3] add support for am43xx-sk

Hi,
First patch prints out the board name because I really didn't want to keep going back to design documents to find out what's written on the EEPROM.
Second patch adds support for am43xx-sk.
Thir patch fixes mmcboot so that it actually tries to load images from mmc.
cheers
Felipe Balbi (3): board: ti: am43xx: print unsupported board name board: ti: am43xx: add support for AM43xx Starter Kit configs: am43xx_evm: make sure to set devtype correctly
board/ti/am43xx/board.c | 9 ++++++--- board/ti/am43xx/board.h | 5 +++++ include/configs/am43xx_evm.h | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-)

when porting u-boot to a new am43xx board, it helps to know the name of the current unsupported board so we don't have to hunt for design documents to figure out what's written in the EEPROM.
Signed-off-by: Felipe Balbi balbi@ti.com --- board/ti/am43xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index d744977..24097b0 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -266,7 +266,7 @@ const struct dpll_params *get_dpll_ddr_params(void) else if (board_is_gpevm()) return &gp_evm_dpll_ddr;
- puts(" Board not supported\n"); + printf(" Board '%s' not supported\n", am43xx_board_name); return NULL; }

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 | 7 +++++-- board/ti/am43xx/board.h | 5 +++++ include/configs/am43xx_evm.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 24097b0..05546ac 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -244,7 +244,7 @@ void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size) if (board_is_eposevm()) { *regs = ext_phy_ctrl_const_base_lpddr2; *size = ARRAY_SIZE(ext_phy_ctrl_const_base_lpddr2); - } else if (board_is_gpevm()) { + } else if (board_is_gpevm() || board_is_sk()) { *regs = ext_phy_ctrl_const_base_ddr3; *size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3); } @@ -263,7 +263,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); @@ -373,6 +373,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(0, &ioregs_ddr3, NULL, NULL, + &ddr3_emif_regs_400Mhz, 0); } } #endif diff --git a/board/ti/am43xx/board.h b/board/ti/am43xx/board.h index 091162e..017047d 100644 --- a/board/ti/am43xx/board.h +++ b/board/ti/am43xx/board.h @@ -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); diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 614857d..d7866ff 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -196,6 +196,8 @@ "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"

if we don't set devtype properly 'load' will fail.
Signed-off-by: Felipe Balbi balbi@ti.com --- include/configs/am43xx_evm.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index d7866ff..e661c9c 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -153,6 +153,7 @@ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ "mmcboot=mmc dev ${mmcdev}; " \ + "setenv devtype mmc; " \ "setenv devnum ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${devnum};" \
participants (1)
-
Felipe Balbi