summaryrefslogtreecommitdiff
path: root/board/siemens/draco
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2015-06-16 14:59:34 +0200
committerTom Rini <trini@konsulko.com>2015-06-19 16:46:47 -0400
commit61159b76844437bf9004c3a38b5a4ff1a24860d5 (patch)
tree8c0e50ce0f93d328c724bd42839a8572e80465b9 /board/siemens/draco
parent8607c4f127d0f2a6d2572960821443563f4eca51 (diff)
downloadu-boot-imx-61159b76844437bf9004c3a38b5a4ff1a24860d5.zip
u-boot-imx-61159b76844437bf9004c3a38b5a4ff1a24860d5.tar.gz
u-boot-imx-61159b76844437bf9004c3a38b5a4ff1a24860d5.tar.bz2
arm, am33xx: update for siemens am335x based boards
updates for the siemens am335x based boards: - draco: add delay for DDR3 configuration - change MTD partition layout and add a possibility to redefine MTD layout in board header. - move ubi support to common header file - draco: improve dtb naming - draco: set CONFIG_SYS_CBSIZE to 1024 - add generic env based led Leds can now be defined in Environment - add generic env based dfu button Which gpio is used for the dfu button can be defined through the Environment - set MACH_TYPE only if defined - draco: increase CPU freq to 300MHz - Add time command to siemens am33xx boards - DDR3: increase default tRFC - draco: enable pullup for DFU and ERST pin - change print format DDR3 Signed-off-by: Samuel Egli <samuel.egli@siemens.com> Acked-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/siemens/draco')
-rw-r--r--board/siemens/draco/board.c43
-rw-r--r--board/siemens/draco/board.h13
-rw-r--r--board/siemens/draco/mux.c4
3 files changed, 43 insertions, 17 deletions
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index ede73ba..2697762 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -43,7 +43,7 @@ static struct draco_baseboard_id __attribute__((section(".data"))) settings;
/* Default@303MHz-i0 */
const struct ddr3_data ddr3_default = {
0x33524444, 0x56312e35, 0x0080, 0x0000, 0x003A, 0x003F, 0x009F,
- 0x0079, 0x0888A39B, 0x26247FDA, 0x501F821F, 0x00100206, 0x61A44A32,
+ 0x0079, 0x0888A39B, 0x26517FDA, 0x501F84EF, 0x00100206, 0x61A44A32,
0x0000093B, 0x0000014A,
"default name @303MHz \0",
"default marking \0",
@@ -71,8 +71,8 @@ static void print_ddr3_timings(void)
printf("clock:\t\t%d MHz\n", DDR_PLL_FREQ);
printf("device:\t\t%s\n", settings.ddr3.manu_name);
printf("marking:\t%s\n", settings.ddr3.manu_marking);
- printf("timing parameters\n");
- printf("diff\teeprom\tdefault\n");
+ printf("%-20s, %-8s, %-8s, %-4s\n", "timing parameters", "eeprom",
+ "default", "diff");
PRINTARGS(magic);
PRINTARGS(version);
PRINTARGS(ddr3_sratio);
@@ -96,9 +96,12 @@ static void print_ddr3_timings(void)
static void print_chip_data(void)
{
+ struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
+ dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
printf("\nCPU BOARD\n");
printf("device: \t'%s'\n", settings.chip.sdevname);
printf("hw version: \t'%s'\n", settings.chip.shwver);
+ printf("max freq: \t%d MHz\n", dpll_mpu_opp100.m);
}
#endif /* CONFIG_SPL_BUILD */
@@ -193,6 +196,11 @@ struct ctrl_ioregs draco_ddr3_ioregs = {
config_ddr(DDR_PLL_FREQ, &draco_ddr3_ioregs, &draco_ddr3_data,
&draco_ddr3_cmd_ctrl_data, &draco_ddr3_emif_reg_data, 0);
+
+ /* For Samsung 2Gbit RAM we need this delay otherwise config fails after
+ * soft reset.
+ */
+ udelay(2000);
}
static void spl_siemens_board_init(void)
@@ -201,6 +209,26 @@ static void spl_siemens_board_init(void)
}
#endif /* if def CONFIG_SPL_BUILD */
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ omap_nand_switch_ecc(1, 8);
+#ifdef CONFIG_FACTORYSET
+ /* Set ASN in environment*/
+ if (factory_dat.asn[0] != 0) {
+ setenv("dtb_name", (char *)factory_dat.asn);
+ } else {
+ /* dtb suffix gets added in load script */
+ setenv("dtb_name", "am335x-draco");
+ }
+#else
+ setenv("dtb_name", "am335x-draco");
+#endif
+
+ return 0;
+}
+#endif
+
#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
static void cpsw_control(int enabled)
@@ -280,13 +308,4 @@ U_BOOT_CMD(
#endif /* #if defined(CONFIG_DRIVER_TI_CPSW) */
#endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */
-#ifdef CONFIG_BOARD_LATE_INIT
-int board_late_init(void)
-{
- omap_nand_switch_ecc(1, 8);
-
- return 0;
-}
-#endif
-
#include "../common/board.c"
diff --git a/board/siemens/draco/board.h b/board/siemens/draco/board.h
index ff8ab76..8856fd0 100644
--- a/board/siemens/draco/board.h
+++ b/board/siemens/draco/board.h
@@ -16,9 +16,13 @@
#ifndef _BOARD_H_
#define _BOARD_H_
-#define PARGS3(x) settings.ddr3.x-ddr3_default.x, \
- settings.ddr3.x, ddr3_default.x
-#define PRINTARGS(y) printf("%x, %8x, %8x : "#y"\n", PARGS3(y))
+#define PARGS(x) #x , /* Parameter Name */ \
+ settings.ddr3.x, /* EEPROM Value */ \
+ ddr3_default.x, /* Default Value */ \
+ settings.ddr3.x-ddr3_default.x /* Difference */
+
+#define PRINTARGS(y) printf("%-20s, %8x, %8x, %4d\n", PARGS(y))
+
#define MAGIC_CHIP 0x50494843
/* Automatic generated definition */
@@ -69,4 +73,7 @@ void enable_uart4_pin_mux(void);
void enable_uart5_pin_mux(void);
void enable_i2c0_pin_mux(void);
void enable_board_pin_mux(void);
+
+/* Forwared declaration, defined in common board.c */
+void set_env_gpios(unsigned char state);
#endif
diff --git a/board/siemens/draco/mux.c b/board/siemens/draco/mux.c
index eaa3c70..dbcc80b 100644
--- a/board/siemens/draco/mux.c
+++ b/board/siemens/draco/mux.c
@@ -60,7 +60,7 @@ static struct module_pin_mux nand_pin_mux[] = {
static struct module_pin_mux gpios_pin_mux[] = {
/* DFU button GPIO0_27*/
- {OFFSET(gpmc_ad11), (MODE(7) | PULLUDEN | RXACTIVE)},
+ {OFFSET(gpmc_ad11), (MODE(7) | PULLUDEN | PULLUP_EN | RXACTIVE)},
{OFFSET(gpmc_csn3), MODE(7) }, /* LED0 GPIO2_0 */
{OFFSET(emu0), MODE(7)}, /* LED1 GPIO3_7 */
/* Triacs in HW Rev 2 */
@@ -222,7 +222,7 @@ static struct module_pin_mux gpios_pin_mux[] = {
{OFFSET(vrefp), MODE(7) | RXACTIVE | PULLUDDIS},
{OFFSET(vrefn), MODE(7) | RXACTIVE | PULLUDDIS},
/* nRST for SMSC LAN9303 switch - GPIO2_24 */
- {OFFSET(lcd_pclk), MODE(7) }, /* LAN9303 nRST */
+ {OFFSET(lcd_pclk), MODE(7) | PULLUDEN | PULLUP_EN }, /* LAN9303 nRST */
{-1},
};