From 3e01ed00da98a29fe2b71c6d60309d5b09adc0de Mon Sep 17 00:00:00 2001 From: "Khoronzhuk, Ivan" Date: Sat, 7 Jun 2014 04:22:52 +0300 Subject: mtd: nand: davinci: add header file for driver definitions The definitions inside emif_defs.h concern davinci nand driver and should be in it's header. So create header file for davinci nand driver and move definitions from emif_defs.h and nand_defs.h to it. Acked-by: Vitaly Andrianov Signed-off-by: Ivan Khoronzhuk [trini: Fixup more davinci breakage] Signed-off-by: Tom Rini --- board/Barix/ipam390/ipam390.c | 2 +- board/ait/cam_enc_4xx/cam_enc_4xx.c | 2 +- board/davinci/da8xxevm/da830evm.c | 3 +-- board/davinci/da8xxevm/da850evm.c | 2 +- board/davinci/dm355evm/dm355evm.c | 3 +-- board/davinci/dm355leopard/dm355leopard.c | 2 +- board/davinci/dm365evm/dm365evm.c | 3 +-- board/davinci/dm6467evm/dm6467evm.c | 3 ++- board/davinci/ea20/ea20.c | 2 +- board/davinci/sonata/sonata.c | 2 +- board/enbw/enbw_cmc/enbw_cmc.c | 2 +- board/omicron/calimain/calimain.c | 2 +- board/ti/k2hk_evm/board.c | 1 - board/ti/tnetv107xevm/sdb_board.c | 2 +- 14 files changed, 14 insertions(+), 17 deletions(-) (limited to 'board') diff --git a/board/Barix/ipam390/ipam390.c b/board/Barix/ipam390/ipam390.c index ae88b4230a2..6ce8960bbd6 100644 --- a/board/Barix/ipam390/ipam390.c +++ b/board/Barix/ipam390/ipam390.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/ait/cam_enc_4xx/cam_enc_4xx.c b/board/ait/cam_enc_4xx/cam_enc_4xx.c index 7e1b16ac465..1f816b3df6e 100644 --- a/board/ait/cam_enc_4xx/cam_enc_4xx.c +++ b/board/ait/cam_enc_4xx/cam_enc_4xx.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_DAVINCI_MMC #include diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c index 4f5c780e549..c40587ff098 100644 --- a/board/davinci/da8xxevm/da830evm.c +++ b/board/davinci/da8xxevm/da830evm.c @@ -25,12 +25,11 @@ #include #include #include -#include #include #include #include #include -#include +#include #include #ifdef CONFIG_DAVINCI_MMC diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 85b483096b3..b9ca38e9293 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/davinci/dm355evm/dm355evm.c b/board/davinci/dm355evm/dm355evm.c index 10422b226b8..e5a958f7e0c 100644 --- a/board/davinci/dm355evm/dm355evm.c +++ b/board/davinci/dm355evm/dm355evm.c @@ -8,8 +8,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/board/davinci/dm355leopard/dm355leopard.c b/board/davinci/dm355leopard/dm355leopard.c index 534184329cb..53902f996c7 100644 --- a/board/davinci/dm355leopard/dm355leopard.c +++ b/board/davinci/dm355leopard/dm355leopard.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/davinci/dm365evm/dm365evm.c b/board/davinci/dm365evm/dm365evm.c index ceffd4d6038..24bec56d568 100644 --- a/board/davinci/dm365evm/dm365evm.c +++ b/board/davinci/dm365evm/dm365evm.c @@ -8,8 +8,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/board/davinci/dm6467evm/dm6467evm.c b/board/davinci/dm6467evm/dm6467evm.c index 469c9bac4b2..e51cc9e6389 100644 --- a/board/davinci/dm6467evm/dm6467evm.c +++ b/board/davinci/dm6467evm/dm6467evm.c @@ -8,7 +8,8 @@ #include #include #include -#include +#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index c4444c7c7f5..66804d75bd0 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/davinci/sonata/sonata.c b/board/davinci/sonata/sonata.c index aa04041246f..f5c3258de56 100644 --- a/board/davinci/sonata/sonata.c +++ b/board/davinci/sonata/sonata.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/board/enbw/enbw_cmc/enbw_cmc.c b/board/enbw/enbw_cmc/enbw_cmc.c index 39efe20bfdf..53b83621473 100644 --- a/board/enbw/enbw_cmc/enbw_cmc.c +++ b/board/enbw/enbw_cmc/enbw_cmc.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/omicron/calimain/calimain.c b/board/omicron/calimain/calimain.c index dd28915cdc4..32f2b201838 100644 --- a/board/omicron/calimain/calimain.c +++ b/board/omicron/calimain/calimain.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/ti/k2hk_evm/board.c b/board/ti/k2hk_evm/board.c index dc39139565f..53f26b2ef33 100644 --- a/board/ti/k2hk_evm/board.c +++ b/board/ti/k2hk_evm/board.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/board/ti/tnetv107xevm/sdb_board.c b/board/ti/tnetv107xevm/sdb_board.c index a95434b5efe..a84ec84baeb 100644 --- a/board/ti/tnetv107xevm/sdb_board.c +++ b/board/ti/tnetv107xevm/sdb_board.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; -- cgit v1.2.3 From 909ea9aa264423c99cd3039475c98f4a069cb7a4 Mon Sep 17 00:00:00 2001 From: "Khoronzhuk, Ivan" Date: Sat, 7 Jun 2014 05:10:49 +0300 Subject: ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c Move AEMIF driver to drivers/memory/ti-aemif.c along with AEMIF definitions collected in arch/arm/include/asm/ti-common/ti-aemif.h Acked-by: Vitaly Andrianov Signed-off-by: Ivan Khoronzhuk --- board/ti/k2hk_evm/board.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'board') diff --git a/board/ti/k2hk_evm/board.c b/board/ti/k2hk_evm/board.c index 53f26b2ef33..ef90f9d8213 100644 --- a/board/ti/k2hk_evm/board.c +++ b/board/ti/k2hk_evm/board.c @@ -18,6 +18,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -39,9 +40,9 @@ unsigned int external_clk[ext_clk_count] = { what is that */ }; -static struct async_emif_config async_emif_config[ASYNC_EMIF_NUM_CS] = { +static struct aemif_config aemif_configs[] = { { /* CS0 */ - .mode = ASYNC_EMIF_MODE_NAND, + .mode = AEMIF_MODE_NAND, .wr_setup = 0xf, .wr_strobe = 0x3f, .wr_hold = 7, @@ -49,7 +50,7 @@ static struct async_emif_config async_emif_config[ASYNC_EMIF_NUM_CS] = { .rd_strobe = 0x3f, .rd_hold = 7, .turn_around = 3, - .width = ASYNC_EMIF_8, + .width = AEMIF_WIDTH_8, }, }; @@ -66,7 +67,7 @@ int dram_init(void) gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, CONFIG_MAX_RAM_BANK_SIZE); - init_async_emif(ARRAY_SIZE(async_emif_config), async_emif_config); + aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs); return 0; } -- cgit v1.2.3 From d51e5aeff64d5ca248ba013e940b22b8273f4e47 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 10 Jun 2014 15:01:18 -0500 Subject: board: ti: am43xx: print unsupported board name 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 --- board/ti/am43xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 71af1ae7c89..6197076d04f 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -260,7 +260,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; } -- cgit v1.2.3 From 9cb9f3331b20b79c7b1cf6428d4b985860c5dbb6 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 10 Jun 2014 15:01:20 -0500 Subject: board: ti: am43xx: add support for AM43xx Starter Kit 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 --- board/ti/am43xx/board.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++- board/ti/am43xx/board.h | 5 ++++ 2 files changed, 76 insertions(+), 1 deletion(-) (limited to 'board') diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 6197076d04f..6379cef89f0 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -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 diff --git a/board/ti/am43xx/board.h b/board/ti/am43xx/board.h index 091162ee20f..017047d2d05 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); -- cgit v1.2.3 From 619ce62d2ddb3af64240451d571e93a356767357 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 10 Jun 2014 15:01:21 -0500 Subject: board: ti: am43xx: add AM437x SK PHY Address pass correct PHY Address when running on SK so that we have working ethernet with this board too. Signed-off-by: Felipe Balbi --- board/ti/am43xx/board.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board') diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 6379cef89f0..054a452eac3 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -594,6 +594,11 @@ int board_eth_init(bd_t *bis) writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel); cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII; cpsw_slaves[0].phy_addr = 16; + } else if (board_is_sk()) { + writel(RGMII_MODE_ENABLE, &cdev->miisel); + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII; + cpsw_slaves[0].phy_addr = 4; + cpsw_slaves[1].phy_addr = 5; } else { writel(RGMII_MODE_ENABLE, &cdev->miisel); cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII; -- cgit v1.2.3 From 403edbb94f1762d4a2ff0062121b13e0d3789b38 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 10 Jun 2014 15:01:22 -0500 Subject: board: ti: am43xx: enable QSPI and Gbit Ethernet on AM437x SK AM437x Starter Kit has a qspi flash and gbit ethernet support. By muxing those signals, we can use those interfaces from u-boot. Signed-off-by: Felipe Balbi --- board/ti/am43xx/mux.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board') diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c index 77c53d2e90e..50967e1a82b 100644 --- a/board/ti/am43xx/mux.c +++ b/board/ti/am43xx/mux.c @@ -97,6 +97,9 @@ void enable_board_pin_mux(void) if (board_is_gpevm()) { configure_module_pin_mux(gpio5_7_pin_mux); configure_module_pin_mux(rgmii1_pin_mux); + } else if (board_is_sk()) { + configure_module_pin_mux(rgmii1_pin_mux); + configure_module_pin_mux(qspi_pin_mux); } else if (board_is_eposevm()) { configure_module_pin_mux(rmii1_pin_mux); configure_module_pin_mux(qspi_pin_mux); -- cgit v1.2.3 From 12cc54376768461533b55ada1b0b6d4979f40579 Mon Sep 17 00:00:00 2001 From: Ash Charles Date: Tue, 10 Jun 2014 12:02:36 -0700 Subject: omap3: overo: Select fdtfile for expansion board The u-boot Overo board actually supports both Overo (OMAP35xx) and Overo Storm (AM/DM37xx) COMs with a range of different expansion boards. This provides a mechanism to select the an appropriate device tree file based on the processor version and, if available, the expansion board ID written on the expansion board EEPROM. To match the 3.15+ kernels, fdtfile names have this format: "omap3-overo[-storm]-.dtb" By default, we use "omap3-overo-storm-tobi.dtb". Signed-off-by: Ash Charles Conflicts: include/configs/omap3_overo.h --- board/overo/overo.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'board') diff --git a/board/overo/overo.c b/board/overo/overo.c index 62b50a8a0bb..13220c56dd0 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -267,12 +267,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "dvi"); + setenv("expansionname", "summit"); break; case GUMSTIX_TOBI: printf("Recognized Tobi expansion board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "dvi"); + setenv("expansionname", "tobi"); break; case GUMSTIX_TOBI_DUO: printf("Recognized Tobi Duo expansion board (rev %d %s)\n", @@ -293,12 +295,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "palo43"); break; case GUMSTIX_CHESTNUT43: printf("Recognized Chestnut43 expansion board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "chestnut43"); break; case GUMSTIX_PINTO: printf("Recognized Pinto expansion board (rev %d %s)\n", @@ -310,6 +314,7 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "gallop43"); break; case GUMSTIX_ALTO35: printf("Recognized Alto35 expansion board (rev %d %s)\n", @@ -317,6 +322,7 @@ int misc_init_r(void) expansion_config.fab_revision); MUX_ALTO35(); setenv("defaultdisplay", "lcd35"); + setenv("expansionname", "alto35"); break; case GUMSTIX_STAGECOACH: printf("Recognized Stagecoach expansion board (rev %d %s)\n", @@ -349,8 +355,11 @@ int misc_init_r(void) break; case GUMSTIX_NO_EEPROM: puts("No EEPROM on expansion board\n"); + setenv("expansionname", "tobi"); break; default: + if (expansion_id == 0x0) + setenv("expansionname", "tobi"); printf("Unrecognized expansion board 0x%08x\n", expansion_id); break; } @@ -360,6 +369,11 @@ int misc_init_r(void) dieid_num_r(); + if (get_cpu_family() == CPU_OMAP34XX) + setenv("boardname", "overo"); + else + setenv("boardname", "overo-storm"); + return 0; } -- cgit v1.2.3