Merge branch 'master' of git://git.denx.de/u-boot-imx

This commit is contained in:
Tom Rini 2014-10-27 09:08:42 -04:00
commit 0ce4af99c0
19 changed files with 123 additions and 28 deletions

View file

@ -21,6 +21,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <asm/arch/mxc_hdmi.h> #include <asm/arch/mxc_hdmi.h>
#include <asm/arch/crm_regs.h> #include <asm/arch/crm_regs.h>
#include <asm/bootm.h>
enum ldo_reg { enum ldo_reg {
LDO_ARM, LDO_ARM,

View file

@ -6,9 +6,6 @@
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/imx-common/video.h> #include <asm/imx-common/video.h>
extern struct display_info_t const displays[];
extern size_t display_count;
int board_video_skip(void) int board_video_skip(void)
{ {
int i; int i;

View file

@ -0,0 +1,17 @@
/*
* Copyright 2011 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __MXC_SPI_H_
#define __MXC_SPI_H_
/*
* Board-level chip-select callback
* Should return GPIO # to be used for chip-select
*/
int board_spi_cs_gpio(unsigned bus, unsigned cs);
#endif

View file

@ -21,4 +21,9 @@ struct display_info_t {
extern int detect_hdmi(struct display_info_t const *dev); extern int detect_hdmi(struct display_info_t const *dev);
#endif #endif
#ifdef CONFIG_IMX_VIDEO_SKIP
extern struct display_info_t const displays[];
extern size_t display_count;
#endif
#endif #endif

View file

@ -23,6 +23,8 @@
#include <asm/bootm.h> #include <asm/bootm.h>
#include <asm/secure.h> #include <asm/secure.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <bootm.h>
#include <vxworks.h>
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#include <asm/armv7.h> #include <asm/armv7.h>
@ -300,7 +302,8 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
* DIFFERENCE: Instead of calling prep and go at the end * DIFFERENCE: Instead of calling prep and go at the end
* they are called if subcommand is equal 0. * they are called if subcommand is equal 0.
*/ */
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{ {
/* No need for those on ARM */ /* No need for those on ARM */
if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE) if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)

View file

@ -1,23 +1,18 @@
if TARGET_OT1200 if TARGET_OT1200
config SYS_CPU config SYS_CPU
string
default "armv7" default "armv7"
config SYS_BOARD config SYS_BOARD
string
default "ot1200" default "ot1200"
config SYS_VENDOR config SYS_VENDOR
string
default "bachmann" default "bachmann"
config SYS_SOC config SYS_SOC
string
default "mx6" default "mx6"
config SYS_CONFIG_NAME config SYS_CONFIG_NAME
string
default "ot1200" default "ot1200"
endif endif

View file

@ -12,6 +12,7 @@
#include <malloc.h> #include <malloc.h>
#include <asm/arch/mx6-pins.h> #include <asm/arch/mx6-pins.h>
#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/sata.h>
#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/boot_mode.h> #include <asm/imx-common/boot_mode.h>
#include <asm/arch/crm_regs.h> #include <asm/arch/crm_regs.h>
@ -98,6 +99,11 @@ static void setup_iomux_spi(void)
imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads)); imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
} }
int board_spi_cs_gpio(unsigned bus, unsigned cs)
{
return (bus == 2 && cs == 0) ? (IMX_GPIO_NR(1, 3)) : -1;
}
int board_early_init_f(void) int board_early_init_f(void)
{ {
setup_iomux_uart(); setup_iomux_uart();
@ -225,6 +231,10 @@ int board_init(void)
/* enable ecspi3 clocks */ /* enable ecspi3 clocks */
enable_cspi_clock(1, 2); enable_cspi_clock(1, 2);
#ifdef CONFIG_CMD_SATA
setup_sata();
#endif
return 0; return 0;
} }

View file

@ -18,6 +18,7 @@
#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/sata.h> #include <asm/imx-common/sata.h>
#include <asm/imx-common/spi.h>
#include <asm/imx-common/boot_mode.h> #include <asm/imx-common/boot_mode.h>
#include <asm/imx-common/video.h> #include <asm/imx-common/video.h>
#include <mmc.h> #include <mmc.h>

View file

@ -11,6 +11,7 @@
#include <common.h> #include <common.h>
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/imx-common/spi.h>
#include <fsl_esdhc.h> #include <fsl_esdhc.h>
#include "common.h" #include "common.h"

View file

@ -23,6 +23,7 @@
#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/boot_mode.h> #include <asm/imx-common/boot_mode.h>
#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/spi.h>
#include <asm/imx-common/video.h> #include <asm/imx-common/video.h>
#include <i2c.h> #include <i2c.h>
#include <mmc.h> #include <mmc.h>

View file

@ -17,12 +17,16 @@
#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/boot_mode.h> #include <asm/imx-common/boot_mode.h>
#include <asm/imx-common/spi.h>
#include <mmc.h> #include <mmc.h>
#include <fsl_esdhc.h> #include <fsl_esdhc.h>
#include <miiphy.h> #include <miiphy.h>
#include <netdev.h> #include <netdev.h>
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <i2c.h> #include <i2c.h>
#include <asm/arch/mxc_hdmi.h>
#include <asm/imx-common/video.h>
#include <asm/arch/crm_regs.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -234,10 +238,65 @@ u32 get_board_rev(void)
return (get_cpu_rev() & ~(0xF << 8)) | rev; return (get_cpu_rev() & ~(0xF << 8)) | rev;
} }
#if defined(CONFIG_VIDEO_IPUV3)
static void do_enable_hdmi(struct display_info_t const *dev)
{
imx_enable_hdmi_phy();
}
struct display_info_t const displays[] = {{
.bus = -1,
.addr = 0,
.pixfmt = IPU_PIX_FMT_RGB24,
.detect = detect_hdmi,
.enable = do_enable_hdmi,
.mode = {
.name = "HDMI",
.refresh = 60,
.xres = 1024,
.yres = 768,
.pixclock = 15385,
.left_margin = 220,
.right_margin = 40,
.upper_margin = 21,
.lower_margin = 7,
.hsync_len = 60,
.vsync_len = 10,
.sync = FB_SYNC_EXT,
.vmode = FB_VMODE_NONINTERLACED,
} } };
size_t display_count = ARRAY_SIZE(displays);
static void setup_display(void)
{
struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
int reg;
enable_ipu_clock();
imx_setup_hdmi();
reg = readl(&mxc_ccm->chsccdr);
reg |= (CHSCCDR_CLK_SEL_LDB_DI0
<< MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
writel(reg, &mxc_ccm->chsccdr);
}
#endif /* CONFIG_VIDEO_IPUV3 */
/*
* Do not overwrite the console
* Use always serial for U-Boot console
*/
int overwrite_console(void)
{
return 1;
}
int board_early_init_f(void) int board_early_init_f(void)
{ {
setup_iomux_uart(); setup_iomux_uart();
#ifdef CONFIG_VIDEO_IPUV3
setup_display();
#endif
return 0; return 0;
} }

View file

@ -13,6 +13,7 @@
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/spi.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/sizes.h> #include <linux/sizes.h>
#include <common.h> #include <common.h>

View file

@ -20,6 +20,7 @@
#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/boot_mode.h> #include <asm/imx-common/boot_mode.h>
#include <asm/imx-common/sata.h> #include <asm/imx-common/sata.h>
#include <asm/imx-common/spi.h>
#include <asm/imx-common/video.h> #include <asm/imx-common/video.h>
#include <jffs2/load_kernel.h> #include <jffs2/load_kernel.h>
#include <hwconfig.h> #include <hwconfig.h>

View file

@ -14,6 +14,7 @@
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <asm/arch/crm_regs.h> #include <asm/arch/crm_regs.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/imx-common/spi.h>
#include <i2c.h> #include <i2c.h>
#include <mmc.h> #include <mmc.h>
#include <fsl_esdhc.h> #include <fsl_esdhc.h>

View file

@ -15,6 +15,7 @@
#include <asm/arch/iomux-mx51.h> #include <asm/arch/iomux-mx51.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#include <asm/imx-common/spi.h>
#include <i2c.h> #include <i2c.h>
#include <mmc.h> #include <mmc.h>
#include <power/pmic.h> #include <power/pmic.h>

View file

@ -12,6 +12,7 @@
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/arch/imx-regs.h> #include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/imx-common/spi.h>
#ifdef CONFIG_MX27 #ifdef CONFIG_MX27
/* i.MX27 has a completely wrong register layout and register definitions in the /* i.MX27 has a completely wrong register layout and register definitions in the

View file

@ -260,4 +260,21 @@
#define CONFIG_CMD_CACHE #define CONFIG_CMD_CACHE
#endif #endif
/* Framebuffer */
#define CONFIG_VIDEO
#define CONFIG_VIDEO_IPUV3
#define CONFIG_CFB_CONSOLE
#define CONFIG_VGA_AS_SINGLE_DEVICE
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
#define CONFIG_VIDEO_BMP_RLE8
#define CONFIG_SPLASH_SCREEN
#define CONFIG_SPLASH_SCREEN_ALIGN
#define CONFIG_BMP_16BPP
#define CONFIG_VIDEO_LOGO
#define CONFIG_VIDEO_BMP_LOGO
#define CONFIG_IPUV3_CLK 260000000
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
#endif /* __MX6QSABRE_COMMON_CONFIG_H */ #endif /* __MX6QSABRE_COMMON_CONFIG_H */

View file

@ -32,23 +32,6 @@
#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */
#endif #endif
/* Framebuffer */
#define CONFIG_VIDEO
#define CONFIG_VIDEO_IPUV3
#define CONFIG_CFB_CONSOLE
#define CONFIG_VGA_AS_SINGLE_DEVICE
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
#define CONFIG_VIDEO_BMP_RLE8
#define CONFIG_SPLASH_SCREEN
#define CONFIG_SPLASH_SCREEN_ALIGN
#define CONFIG_BMP_16BPP
#define CONFIG_VIDEO_LOGO
#define CONFIG_VIDEO_BMP_LOGO
#define CONFIG_IPUV3_CLK 260000000
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
#define CONFIG_CMD_PCI #define CONFIG_CMD_PCI
#ifdef CONFIG_CMD_PCI #ifdef CONFIG_CMD_PCI
#define CONFIG_PCI #define CONFIG_PCI

View file

@ -47,7 +47,7 @@
#define CONFIG_SPI_FLASH_SST #define CONFIG_SPI_FLASH_SST
#define CONFIG_MXC_SPI #define CONFIG_MXC_SPI
#define CONFIG_SF_DEFAULT_BUS 2 #define CONFIG_SF_DEFAULT_BUS 2
#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(1, 3)<<8)) #define CONFIG_SF_DEFAULT_CS 0
#define CONFIG_SF_DEFAULT_SPEED 25000000 #define CONFIG_SF_DEFAULT_SPEED 25000000
#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)