]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-imx
authorTom Rini <trini@ti.com>
Mon, 27 Oct 2014 13:08:42 +0000 (09:08 -0400)
committerTom Rini <trini@ti.com>
Mon, 27 Oct 2014 13:08:42 +0000 (09:08 -0400)
19 files changed:
arch/arm/cpu/armv7/mx6/soc.c
arch/arm/imx-common/video.c
arch/arm/include/asm/imx-common/spi.h [new file with mode: 0644]
arch/arm/include/asm/imx-common/video.h
arch/arm/lib/bootm.c
board/bachmann/ot1200/Kconfig
board/bachmann/ot1200/ot1200.c
board/boundary/nitrogen6x/nitrogen6x.c
board/compulab/cm_fx6/common.c
board/embest/mx6boards/mx6boards.c
board/freescale/mx6qsabreauto/mx6qsabreauto.c
board/freescale/mx6slevk/mx6slevk.c
board/gateworks/gw_ventana/gw_ventana.c
board/genesi/mx51_efikamx/efikamx.c
board/ttcontrol/vision2/vision2.c
drivers/spi/mxc_spi.c
include/configs/mx6sabre_common.h
include/configs/mx6sabresd.h
include/configs/ot1200.h

index a202b0318e0659e02551027c6de9e6fa9e56b095..dd5aaa286a68d708fda6814e6d107adba4d70231 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdbool.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/crm_regs.h>
+#include <asm/bootm.h>
 
 enum ldo_reg {
        LDO_ARM,
index 0121cd78f27694629b49f50890642a0500a3d27e..8651b80ce0672f86334b7034fe27b889d30d2080 100644 (file)
@@ -6,9 +6,6 @@
 #include <asm/errno.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 i;
diff --git a/arch/arm/include/asm/imx-common/spi.h b/arch/arm/include/asm/imx-common/spi.h
new file mode 100644 (file)
index 0000000..1d4473a
--- /dev/null
@@ -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
index 2d948508d574f51f18d4f0071d159874083f05e9..1a907d44e405a4a51898f9d3eab6da833101633b 100644 (file)
@@ -21,4 +21,9 @@ struct display_info_t {
 extern int detect_hdmi(struct display_info_t const *dev);
 #endif
 
+#ifdef CONFIG_IMX_VIDEO_SKIP
+extern struct display_info_t const displays[];
+extern size_t display_count;
+#endif
+
 #endif
index 0d19c8ae2366caee800920d36dce8d79f984b6c2..cdb19751058815b19e274ba32c7293690c5ce99f 100644 (file)
@@ -23,6 +23,8 @@
 #include <asm/bootm.h>
 #include <asm/secure.h>
 #include <linux/compiler.h>
+#include <bootm.h>
+#include <vxworks.h>
 
 #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
 #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
  * 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 */
        if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
index 55a825d8aa84afb4a853b7ff139fcd5c924f4a73..6cf257322100f0eb03ae702f8c18f183898c0c47 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_OT1200
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "ot1200"
 
 config SYS_VENDOR
-       string
        default "bachmann"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "ot1200"
 
 endif
index 0d5ede5ca89fc0aa8698086b0a0040185e049482..acf95cb372ac2a48c574bce6005c3bce4575f4c4 100644 (file)
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <asm/arch/mx6-pins.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/boot_mode.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));
 }
 
+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)
 {
        setup_iomux_uart();
@@ -225,6 +231,10 @@ int board_init(void)
        /* enable ecspi3 clocks */
        enable_cspi_clock(1, 2);
 
+#ifdef CONFIG_CMD_SATA
+       setup_sata();
+#endif
+
        return 0;
 }
 
index 951b820cbba8ab6d4c82150f6224ae7e76434973..fcd4d82c4e7ed8c19a50d11e1468935b42d7d867 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/imx-common/sata.h>
+#include <asm/imx-common/spi.h>
 #include <asm/imx-common/boot_mode.h>
 #include <asm/imx-common/video.h>
 #include <mmc.h>
index 1f3967995f92366bceaf4f5446446ef73446cd60..59c9d1ac0644c902582e61488aceba6fb1246dcd 100644 (file)
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
+#include <asm/imx-common/spi.h>
 #include <fsl_esdhc.h>
 #include "common.h"
 
index a725f15a2eb8172b540aac191b4b38ca6d1626df..02fb3fa1a4111a511876af4f37af5b12501937fd 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/boot_mode.h>
 #include <asm/imx-common/mxc_i2c.h>
+#include <asm/imx-common/spi.h>
 #include <asm/imx-common/video.h>
 #include <i2c.h>
 #include <mmc.h>
index 1cb7561759827acb06706706bcc894391854fd41..0dc0160e19fe9e70510d66668bc2cdef1b341090 100644 (file)
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/imx-common/boot_mode.h>
+#include <asm/imx-common/spi.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <asm/arch/sys_proto.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;
 
@@ -234,10 +238,65 @@ u32 get_board_rev(void)
        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)
 {
        setup_iomux_uart();
-
+#ifdef CONFIG_VIDEO_IPUV3
+       setup_display();
+#endif
        return 0;
 }
 
index a0832f4a201e63ce6e8ec99b4d87b99667b2e1dd..a500133efae1b08b3c416dd202bb5ef2b654c0f2 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
 #include <asm/imx-common/iomux-v3.h>
+#include <asm/imx-common/spi.h>
 #include <asm/io.h>
 #include <linux/sizes.h>
 #include <common.h>
index 1038d9d975a4347e8e48a575fc06f96f2919d800..df491a8fc8869afc5a531302a315f5fc713c51d2 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/imx-common/boot_mode.h>
 #include <asm/imx-common/sata.h>
+#include <asm/imx-common/spi.h>
 #include <asm/imx-common/video.h>
 #include <jffs2/load_kernel.h>
 #include <hwconfig.h>
index 137e4ed661030b9ede7f194f2f7f865429ebce1d..6ba55cd08a82f62a5cd420b024ff68cdb0cc171a 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
+#include <asm/imx-common/spi.h>
 #include <i2c.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
index b5249e74a779a3a1b1f16a9be3a5c9a9c5c32521..247991d5888900629c494d3ff987a600012f4b50 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/arch/iomux-mx51.h>
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/imx-common/spi.h>
 #include <i2c.h>
 #include <mmc.h>
 #include <power/pmic.h>
index 026f680d80d90e60591d04bb3b092058df371883..be102692d446450528886c998440ecefc8a32fbf 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
+#include <asm/imx-common/spi.h>
 
 #ifdef CONFIG_MX27
 /* i.MX27 has a completely wrong register layout and register definitions in the
index 2d93d6c70076fb2a18423773192afa68936084bc..c81e9e9747fdceed70fd9a977458e7dd41f97985 100644 (file)
 #define CONFIG_CMD_CACHE
 #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 */
index e666ebb9984ab8de88a9a103e35ed8be54829529..938030d56d69d989f5e79bb295257d9cd77d568e 100644 (file)
 #define CONFIG_SYS_MMC_ENV_DEV         1       /* SDHC3 */
 #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
 #ifdef CONFIG_CMD_PCI
 #define CONFIG_PCI
index 071880fe7599864348d723beed698d46811ac0cb..d7696bd203c622f8ec56e5a70cd210eddb6e2089 100644 (file)
@@ -47,7 +47,7 @@
 #define CONFIG_SPI_FLASH_SST
 #define CONFIG_MXC_SPI
 #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_MODE (SPI_MODE_0)