diff options
author | Samuel Egli <samuel.egli@siemens.com> | 2013-11-04 14:05:03 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-11-12 09:53:59 -0500 |
commit | 56eb3da43fab5990a4b7bc118b76c7cae2ceb140 (patch) | |
tree | 46ba8b1bf05596d48fa247f7a2a89450509be5b3 /board/siemens/rut/board.c | |
parent | 7a0d463f587b0c00f6abfd33d96fae9fdd0dc55a (diff) | |
download | u-boot-imx-56eb3da43fab5990a4b7bc118b76c7cae2ceb140.zip u-boot-imx-56eb3da43fab5990a4b7bc118b76c7cae2ceb140.tar.gz u-boot-imx-56eb3da43fab5990a4b7bc118b76c7cae2ceb140.tar.bz2 |
arm, am335x: update for the siemens boards
- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.
Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.
- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development
* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.
rut:
* add nand_img_size
dxr2:
* update nand_img_size
* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/siemens/rut/board.c')
-rw-r--r-- | board/siemens/rut/board.c | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c index 5de8fc6..0cf17ef 100644 --- a/board/siemens/rut/board.c +++ b/board/siemens/rut/board.c @@ -83,9 +83,48 @@ struct cmd_control rut_ddr3_cmd_ctrl_data = { &rut_ddr3_cmd_ctrl_data, &rut_ddr3_emif_reg_data, 0); } +static int request_and_pulse_reset(int gpio, const char *name) +{ + int ret; + const int delay_us = 2000; /* 2ms */ + + ret = gpio_request(gpio, name); + if (ret < 0) { + printf("%s: Unable to request %s\n", __func__, name); + goto err; + } + + ret = gpio_direction_output(gpio, 0); + if (ret < 0) { + printf("%s: Unable to set %s as output\n", __func__, name); + goto err_free_gpio; + } + + udelay(delay_us); + + gpio_set_value(gpio, 1); + + return 0; + +err_free_gpio: + gpio_free(gpio); +err: + return ret; +} + +#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio)) +#define ETH_PHY_RESET_GPIO GPIO_TO_PIN(2, 18) +#define MAXTOUCH_RESET_GPIO GPIO_TO_PIN(3, 18) +#define DISPLAY_RESET_GPIO GPIO_TO_PIN(3, 19) + +#define REQUEST_AND_PULSE_RESET(N) \ + request_and_pulse_reset(N, #N); + static void spl_siemens_board_init(void) { - return; + REQUEST_AND_PULSE_RESET(ETH_PHY_RESET_GPIO); + REQUEST_AND_PULSE_RESET(MAXTOUCH_RESET_GPIO); + REQUEST_AND_PULSE_RESET(DISPLAY_RESET_GPIO); } #endif /* if def CONFIG_SPL_BUILD */ @@ -336,7 +375,6 @@ int clk_get(int clk) static int conf_disp_pll(int m, int n) { struct cm_perpll *cmper = (struct cm_perpll *)CM_PER; - struct cm_dpll *cmdpll = (struct cm_dpll *)CM_DPLL; struct dpll_params dpll_lcd = {m, n, -1, -1, -1, -1, -1}; #if defined(DISPL_PLL_SPREAD_SPECTRUM) struct cm_wkuppll *cmwkup = (struct cm_wkuppll *)CM_WKUP; @@ -353,8 +391,6 @@ static int conf_disp_pll(int m, int n) 0 }; do_enable_clocks(clk_domains, clk_modules_explicit_en, 1); - /* 0x44e0_0500 write lcdc pixel clock mux Linux hat hier 0 */ - writel(0x0, &cmdpll->clklcdcpixelclk); do_setup_dpll(&dpll_lcd_regs, &dpll_lcd); @@ -380,10 +416,13 @@ static int enable_lcd(void) { unsigned char buf[1]; + set_gpio(BOARD_LCD_RESET, 0); + mdelay(1); set_gpio(BOARD_LCD_RESET, 1); + mdelay(1); /* spi lcd init */ - kwh043st20_f01_spi_startup(1, 0, 5000000, SPI_MODE_3); + kwh043st20_f01_spi_startup(1, 0, 5000000, SPI_MODE_0); /* backlight on */ buf[0] = 0xf; @@ -418,7 +457,7 @@ static int board_video_init(void) printf("%s: %s not found, using default %s\n", __func__, factory_dat.disp_name, lcd_panels[i].name); } - conf_disp_pll(25, 2); + conf_disp_pll(24, 1); da8xx_video_init(&lcd_panels[display], &lcd_cfgs[display], lcd_cfgs[display].bpp); |