karo: tx6: factor out PMIC initialization
[karo-tx-uboot.git] / include / configs / tx6.h
index e65436b..0d34a9a 100644 (file)
@@ -31,7 +31,7 @@
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_IPUV3
-#define CONFIG_IPUV3_CLK               266000000
+#define CONFIG_IPUV3_CLK               (CONFIG_SYS_SDRAM_CLK * 1000000 / 2)
 #define CONFIG_LCD_LOGO
 #define LCD_BPP                                LCD_COLOR24
 #define CONFIG_CMD_BMP
@@ -94,7 +94,6 @@
 #define CONFIG_FDT_FIXUP_PARTITIONS
 #endif
 #define CONFIG_OF_BOARD_SETUP
-#define CONFIG_SYS_FDT_ADDR            (PHYS_SDRAM_1 + SZ_16M)
 #endif /* CONFIG_OF_LIBFDT */
 #endif /* CONFIG_MFG */
 
 #define CONFIG_DELAY_ENVIRONMENT
 #endif /* CONFIG_MFG */
 #define CONFIG_LOADADDR                        18000000
+#define CONFIG_FDTADDR                 10001000
 #define CONFIG_SYS_LOAD_ADDR           _pfx(0x, CONFIG_LOADADDR)
+#define CONFIG_SYS_FDT_ADDR            _pfx(0x, CONFIG_FDTADDR)
 #define CONFIG_IMX_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT_MSECS  3000
+#ifndef CONFIG_SYS_LVDS_IF
+#define DEFAULT_VIDEO_MODE             "VGA"
+#else
+#define DEFAULT_VIDEO_MODE             "HSD100PXN1"
+#endif
 
 /*
  * Extra Environments
        "autostart=no\0"                                                \
        "autoload=no\0"                                                 \
        "bootdelay=-1\0"                                                \
-       "fdtaddr=11000000\0"                                            \
+       "fdtaddr=" xstr(CONFIG_FDTADDR) "\0"                            \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "mtdparts=" MTDPARTS_DEFAULT "\0"
 #else
        "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"                                                    \
        "cpu_clk=800\0"                                                 \
        "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
        " ${append_bootargs}\0"                                         \
-       "fdtaddr=11000000\0"                                            \
+       "fdtaddr=" xstr(CONFIG_FDTADDR) "\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"
+       "video_mode=" DEFAULT_VIDEO_MODE "\0"
 #endif /*  CONFIG_ENV_IS_NOWHERE */
 #endif /*  CONFIG_MFG */
 
 #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"                   \
+#define CONFIG_SYS_FDTSAVE_CMD                                         \
+       "fdtsave=fdt resize;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"
+       "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_SYS_I2C_SPEED           400000
 #ifndef CONFIG_TX6_V2
 #define CONFIG_SYS_I2C_SLAVE           0x3c
+#define CONFIG_LTC3676
 #else
 #define CONFIG_SYS_I2C_SLAVE           0x32
+#define CONFIG_RN5T618
 #endif
 #endif
 
        "@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS)                           \
        "(u-boot),"                                                     \
        CONFIG_SYS_ENV_PART_STR                                         \
-       "4m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR ","         \
+       "6m(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