diff options
Diffstat (limited to 'board/k+p')
-rw-r--r-- | board/k+p/bootscripts/tpcboot.cmd | 6 | ||||
-rw-r--r-- | board/k+p/kp_imx53/kp_imx53.c | 34 |
2 files changed, 28 insertions, 12 deletions
diff --git a/board/k+p/bootscripts/tpcboot.cmd b/board/k+p/bootscripts/tpcboot.cmd index eac79dc890..16b93ebe3f 100644 --- a/board/k+p/bootscripts/tpcboot.cmd +++ b/board/k+p/bootscripts/tpcboot.cmd @@ -23,6 +23,10 @@ setenv mmcroot "/dev/mmcblk${devnum}p2 rootwait rw" setenv displayargs "" setenv mmcargs "setenv bootargs console=${console} ${smp} root=${mmcroot} \ ${displayargs}" +setenv miscadj " +if test '${boardsoc}' = 'imx53'; then + setenv bootargs '${bootargs} di=${dig_in} key1=${key1}'; +fi;" setenv boot_fitImage " setenv fdt_conf 'conf@${boardsoc}-${boardname}.dtb'; setenv itbcfg "\"#\${fdt_conf}\""; @@ -39,6 +43,7 @@ if test -e ${devtype} ${devnum}:${distro_bootpart} ${kernel_file}; then if load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} \ ${kernel_file}; then run mmcargs; + run miscadj; run boot_fitImage; fi; fi;" @@ -52,6 +57,7 @@ setenv download_kernel "tftpboot ${loadaddr} ${kernel_file}" setenv boot_tftp_kernel " if run download_kernel; then run mmcargs; + run miscadj; run boot_fitImage; fi" diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index c80eed36c6..becb6a63fa 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -22,6 +22,8 @@ #define VBUS_PWR_EN IMX_GPIO_NR(7, 8) #define PHY_nRST IMX_GPIO_NR(7, 6) #define BOOSTER_OFF IMX_GPIO_NR(2, 23) +#define LCD_BACKLIGHT IMX_GPIO_NR(1, 1) +#define KEY1 IMX_GPIO_NR(2, 26) DECLARE_GLOBAL_DATA_PTR; @@ -43,18 +45,6 @@ int dram_init_banksize(void) return 0; } -u32 get_board_rev(void) -{ - struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE; - struct fuse_bank *bank = &iim->bank[0]; - struct fuse_bank0_regs *fuse = - (struct fuse_bank0_regs *)bank->fuse_regs; - - int rev = readl(&fuse->gp[6]); - - return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8; -} - #ifdef CONFIG_USB_EHCI_MX5 int board_ehci_hcd_init(int port) { @@ -189,10 +179,28 @@ void eth_phy_reset(void) udelay(50); } +void board_disable_display(void) +{ + gpio_request(LCD_BACKLIGHT, "LCD_BACKLIGHT"); + gpio_direction_output(LCD_BACKLIGHT, 0); +} + +void board_misc_setup(void) +{ + gpio_request(KEY1, "KEY1_GPIO"); + gpio_direction_input(KEY1); + + if (gpio_get_value(KEY1)) + env_set("key1", "off"); + else + env_set("key1", "on"); +} + int board_late_init(void) { int ret = 0; + board_disable_display(); setup_ups(); if (!power_init()) @@ -207,5 +215,7 @@ int board_late_init(void) show_eeprom(); read_board_id(); + board_misc_setup(); + return ret; } |