]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/configs/tx6.h
add support for TX6U-8012
[karo-tx-uboot.git] / include / configs / tx6.h
index 02eb89d849b299c049e2fd381045efce90fbcd83..9eff81d3f4269b775ac27ff33c12302893f20963 100644 (file)
 /* LCD Logo and Splash screen support */
 #define CONFIG_LCD
 #ifdef CONFIG_LCD
-#ifndef CONFIG_TX6_V2
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_SPLASH_SCREEN_ALIGN
-#endif
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_IPUV3_CLK               266000000
 #define CONFIG_LCD_LOGO
 #endif /* CONFIG_LCD */
 #endif /* CONFIG_MFG */
 
-#ifdef CONFIG_SYS_LVDS_IF
-#define is_lvds()                      1
-#else
-#define is_lvds()                      0
-#endif
-
 /*
  * Memory configuration options
  */
@@ -82,7 +74,7 @@
 #define CONFIG_SYS_PBSIZE                                              \
        (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
                                                /* Print buffer size */
-#define CONFIG_SYS_MAXARGS             64      /* Max number of command args */
+#define CONFIG_SYS_MAXARGS             256     /* Max number of command args */
 #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
                                                /* Boot argument buffer size */
 #define CONFIG_VERSION_VARIABLE                        /* U-BOOT version */
        "bootargs_jffs2=run default_bootargs;set bootargs ${bootargs}"  \
        " root=/dev/mtdblock3 rootfstype=jffs2\0"                       \
        "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}"    \
-       " root=/dev/mmcblk0p2 rootwait\0"                               \
+       MMC_ROOT_STR                                                    \
        "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}"    \
        " root=/dev/nfs nfsroot=${nfs_server}:${nfsroot},nolock"        \
        " ip=dhcp\0"                                                    \
        ";nboot linux\0"                                                \
        "bootcmd_mmc=set autostart no;run bootargs_mmc"                 \
        ";fatload mmc 0 ${loadaddr} uImage\0"                           \
-       "bootcmd_nand=set autostart no;run bootargs_ubifs"              \
-       ";nboot linux\0"                                                \
+       CONFIG_SYS_BOOT_CMD_NAND                                        \
        "bootcmd_net=set autoload y;set autostart n;run bootargs_nfs"   \
        ";dhcp\0"                                                       \
        "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0"                    \
-       "boot_mode=nand\0"                                              \
+       "boot_mode=" CONFIG_SYS_DEFAULT_BOOT_MODE "\0"                  \
        "cpu_clk=800\0"                                                 \
        "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
        " ${append_bootargs}\0"                                         \
        "fdtaddr=11000000\0"                                            \
-       "fdtsave=nand erase.part dtb"                                   \
-       ";nand write ${fdtaddr} dtb ${fdtsize}\0"                       \
+       CONFIG_SYS_FDTSAVE_CMD                                          \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
        "nfsroot=/tftpboot/rootfs\0"                                    \
        "otg_mode=device\0"                                             \
+       ROOTPART_UUID_STR                                               \
        "touchpanel=tsc2007\0"                                          \
        "video_mode=VGA\0"
 #endif /*  CONFIG_ENV_IS_NOWHERE */
 #endif /*  CONFIG_MFG */
 
 #ifndef CONFIG_TX6_V2
+#define CONFIG_SYS_DEFAULT_BOOT_MODE "nand"
+#define CONFIG_SYS_BOOT_CMD_NAND                                       \
+       "bootcmd_nand=set autostart no;run bootargs_ubifs;nboot linux\0"
+#define CONFIG_SYS_FDTSAVE_CMD                         \
+       "fdtsave=nand erase.part dtb"                   \
+       ";nand write ${fdtaddr} dtb ${fdtsize}\0"
 #define MTD_NAME                       "gpmi-nand"
 #define MTDIDS_DEFAULT                 "nand0=" MTD_NAME
 #define CONFIG_SYS_NAND_ONFI_DETECTION
+#define MMC_ROOT_STR " root=dev/mmcblk0p2 rootwait\0"
+#define ROOTPART_UUID_STR ""
 #else
+#define CONFIG_SYS_DEFAULT_BOOT_MODE "mmc"
+#define CONFIG_SYS_BOOT_CMD_NAND ""
+#define CONFIG_SYS_FDTSAVE_CMD                                         \
+       "fdtsave=mmc open 0 1;mmc write ${fdtaddr} " xstr(CONFIG_SYS_DTB_BLKNO) " 80;mmc close 0 1\0"
+#define MMC_ROOT_STR " root=PARTUUID=${rootpart_uuid} rootwait\0"
+#define ROOTPART_UUID_STR "rootpart_uuid=0cc66cc0-02\0"
 #define MTD_NAME                       ""
 #define MTDIDS_DEFAULT                 ""
 #define CONFIG_SUPPORT_EMMC_BOOT
+#define CONFIG_MMC_BOOT_DEV            0
 #endif
 
 /*
 #ifndef CONFIG_TX6_V2
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_MTDPARTS
-#else
-#define CONFIG_PARTITION_UUIDS
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_GPT
 #endif
 #define CONFIG_CMD_BOOTCE
 #define CONFIG_CMD_TIME
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_BASE           0x00000000
 #define CONFIG_CMD_ROMUPDATE
-#else
-#undef CONFIG_ENV_IS_IN_NAND
-#endif /* CONFIG_CMD_NAND */
 
 #define CONFIG_ENV_OFFSET              (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
 #define CONFIG_ENV_SIZE                        SZ_128K
 #define CONFIG_ENV_RANGE               (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#else
+#undef CONFIG_ENV_IS_IN_NAND
+#endif /* CONFIG_CMD_NAND */
+
 #ifdef CONFIG_ENV_OFFSET_REDUND
 #define CONFIG_SYS_ENV_PART_STR                xstr(CONFIG_SYS_ENV_PART_SIZE)  \
        "(env),"                                                        \
 
 #define CONFIG_DOS_PARTITION
 #define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
 #define CONFIG_CMD_EXT2
 
 /*
  */
 #ifdef CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV         0
-#undef CONFIG_ENV_OFFSET
-#undef CONFIG_ENV_SIZE
-#define CONFIG_ENV_OFFSET              (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
-#define CONFIG_ENV_SIZE                        SZ_128K
+#define CONFIG_SYS_MMC_ENV_PART                1
 #define CONFIG_DYNAMIC_MMC_DEVNO
 #endif /* CONFIG_ENV_IS_IN_MMC */
 #else
        CONFIG_SYS_ENV_PART_STR                                         \
        "4m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR ","         \
        xstr(CONFIG_SYS_DTB_PART_SIZE)                                  \
-       "(dtb),"                                                        \
+       "@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb),"                   \
        xstr(CONFIG_SYS_NAND_BBT_SIZE)                                  \
        "@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
 #else