/*
* Copyright (C) 2012 <LW@KARO-electronics.de>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
+ * SPDX-License-Identifier: GPL-2.0
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
-#ifndef __TX53_H
-#define __TX53_H
-#include <config.h>
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_MX53 /* must be set before including imx-regs.h */
+
#include <asm/sizes.h>
+#include <asm/arch/imx-regs.h>
/*
* Ka-Ro TX53 board - SoC configuration
*/
-#define CONFIG_TX53 /* TX53 SoM */
-#define CONFIG_MX53 /* i.MX53 SoC */
+#define CONFIG_TX53 /* TX53 SoM */
#define CONFIG_SYS_MX5_IOMUX_V3
-#define CONFIG_MXC_GPIO /* GPIO control */
-#define CONFIG_SYS_MX5_HCLK 24000000
-#define CONFIG_SYS_MX5_CLK32 32768
-#define CONFIG_SYS_DDR_CLKSEL 0
-#define CONFIG_SYS_HZ 1000 /* Ticks per second */
+#define CONFIG_MXC_GPIO /* GPIO control */
+#define CONFIG_SYS_MX5_HCLK 24000000
+#define CONFIG_SYS_DDR_CLKSEL 0
+#define CONFIG_SYS_HZ 1000 /* Ticks per second */
#define CONFIG_SHOW_ACTIVITY
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_BOARD_LATE_INIT
#ifdef CONFIG_LCD
#define CONFIG_SPLASH_SCREEN
#define CONFIG_SPLASH_SCREEN_ALIGN
-#define CONFIG_VIDEO_MX5
+#define CONFIG_VIDEO_IPUV3
+#define CONFIG_IPUV3_CLK 200000000
#define CONFIG_LCD_LOGO
-#define LCD_BPP LCD_COLOR24
+#define LCD_BPP LCD_COLOR24
#define CONFIG_CMD_BMP
#define CONFIG_VIDEO_BMP_RLE8
#endif /* CONFIG_LCD */
/*
* Memory configurations
*/
-#define PHYS_SDRAM_1 0x70000000 /* Base address of bank 1 */
-#define PHYS_SDRAM_1_SIZE SZ_512M
+#define PHYS_SDRAM_1 0x70000000 /* Base address of bank 1 */
+#define PHYS_SDRAM_1_SIZE SZ_512M
#if CONFIG_NR_DRAM_BANKS > 1
-#define PHYS_SDRAM_2 0xb0000000 /* Base address of bank 2 */
-#define PHYS_SDRAM_2_SIZE SZ_512M
-#define TX53_MOD_SUFFIX "1"
+#define PHYS_SDRAM_2 0xb0000000 /* Base address of bank 2 */
+#define PHYS_SDRAM_2_SIZE SZ_512M
+#define TX53_MOD_SUFFIX "1"
#else
-#define TX53_MOD_SUFFIX "0"
+#define TX53_MOD_SUFFIX "0"
#endif
-#define CONFIG_STACKSIZE SZ_128K
-#define CONFIG_SYS_MALLOC_LEN SZ_8M
-#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
-#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + SZ_4M) /* 4 MB RAM test */
-#define CONFIG_SYS_SDRAM_CLK 400
+#define CONFIG_STACKSIZE SZ_128K
+#define CONFIG_SYS_MALLOC_LEN SZ_8M
+#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
+#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + SZ_4M) /* 4 MB RAM test */
+#define CONFIG_SYS_SDRAM_CLK 400
/*
* U-Boot general configurations
*/
#define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_PROMPT "TX53 U-Boot > "
-#define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
+#define CONFIG_SYS_PROMPT "TX53 U-Boot > "
+#define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
#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_BARGSIZE CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/* Boot argument buffer size */
#define CONFIG_VERSION_VARIABLE /* U-BOOT version */
#define CONFIG_AUTO_COMPLETE /* Command auto complete */
* Flattened Device Tree (FDT) support
*/
#define CONFIG_OF_LIBFDT
-#define CONFIG_OF_EMBED
#define CONFIG_OF_BOARD_SETUP
#define CONFIG_DEFAULT_DEVICE_TREE tx53
#define CONFIG_ARCH_DEVICE_TREE mx53
+#define CONFIG_SYS_FDT_ADDR (PHYS_SDRAM_1 + SZ_16M)
/*
* Boot Linux
*/
-#define xstr(s) str(s)
-#define str(s) #s
-#define __pfx(x, s) (x##s)
-#define _pfx(x, s) __pfx(x, s)
+#define xstr(s) str(s)
+#define str(s) #s
+#define __pfx(x, s) (x##s)
+#define _pfx(x, s) __pfx(x, s)
#define CONFIG_CMDLINE_TAG
#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 3
#define CONFIG_ZERO_BOOTDELAY_CHECK
-#define CONFIG_SYS_AUTOLOAD "no"
-#define CONFIG_BOOTFILE "uImage"
-#define CONFIG_BOOTARGS "console=ttymxc0,115200 ro debug panic=1"
-#define CONFIG_BOOTCOMMAND "run bootcmd_nand"
-#define CONFIG_LOADADDR 78000000
-#define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
-#define CONFIG_U_BOOT_IMG_SIZE SZ_1M
+#define CONFIG_SYS_AUTOLOAD "no"
+#define CONFIG_BOOTFILE "uImage"
+#define CONFIG_BOOTARGS "console=ttymxc0,115200 ro debug panic=1"
+#define CONFIG_BOOTCOMMAND "run bootcmd_nand"
+#define CONFIG_LOADADDR 78000000
+#define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
+#define CONFIG_U_BOOT_IMG_SIZE SZ_1M
#define CONFIG_HW_WATCHDOG
/*
" root=/dev/mtdblock3 rootfstype=jffs2\0" \
"nfsroot=/tftpboot/rootfs\0" \
"bootargs_nfs=run default_bootargs;set bootargs ${bootargs}" \
- " root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"\
+ " root=/dev/nfs ip=dhcp nfsroot=${nfs_server}:${nfsroot},nolock\0"\
"bootcmd_mmc=set autostart no;run bootargs_mmc;" \
"mmc read ${loadaddr} 100 3000;run bootm_cmd\0" \
"bootcmd_nand=set autostart no;run bootargs_nand;" \
"nboot linux;run bootm_cmd\0" \
"bootcmd_net=set autostart no;run bootargs_nfs;dhcp;" \
"run bootm_cmd\0" \
- "bootm_cmd=fdt boardsetup;bootm ${loadaddr} - ${fdtaddr}\0" \
+ "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0" \
"default_bootargs=set bootargs " CONFIG_BOOTARGS \
- " ${mtdparts} video=${video_mode} ${append_bootargs}\0" \
+ " ${append_bootargs}\0" \
"cpu_clk=800\0" \
"fdtaddr=71000000\0" \
"mtdids=" MTDIDS_DEFAULT "\0" \
"mtdparts=" MTDPARTS_DEFAULT "\0" \
"otg_mode=device\0" \
"touchpanel=tsc2007\0" \
- "video_mode=VGA-1:640x480MR-24@60\0"
+ "video_mode=VGA\0"
#define MTD_NAME "mxc_nand"
#define MTDIDS_DEFAULT "nand0=" MTD_NAME
*/
#include <config_cmd_default.h>
#define CONFIG_CMD_CACHE
-#define CONFIG_CMD_IIM
#define CONFIG_CMD_MMC
#define CONFIG_CMD_NAND
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_BOOTCE
#define CONFIG_CMD_TIME
+#define CONFIG_CMD_MEMTEST
/*
* Serial Driver
#define CONFIG_MTD_DEVICE
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_NAND_MXC
-#define CONFIG_MXC_NAND_REGS_BASE 0xf7ff0000
-#define CONFIG_MXC_NAND_IP_BASE 0x63fdb000
+#define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR_AXI
+#define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_CMD_NAND_TRIMFFS
#define CONFIG_SYS_MAX_FLASH_SECT 1024
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_FSL_ESDHC
-#define CONFIG_SYS_FSL_ESDHC_USE_PIO
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
#define CONFIG_SYS_FSL_ESDHC_NUM 2
* Environments on MMC
*/
#ifdef CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_ENV_OVERWRITE
/* Associated with the MMC layout defined in mmcops.c */
#define CONFIG_ENV_OFFSET SZ_1K
xstr(CONFIG_ENV_RANGE) \
"(env)," \
xstr(CONFIG_ENV_RANGE) \
- "(env2),4m(linux),16m(rootfs),256k(dtb),-(userfs)"
+ "(env2),4m(linux),16m(rootfs),108032k(userfs),256k(dtb),512k@0x7f80000(bbt)ro"
#else
#define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
"1m(u-boot)," \
xstr(CONFIG_ENV_RANGE) \
- "(env),4m(linux),16m(rootfs),256k(dtb),-(userfs)"
+ "(env),4m(linux),16m(rootfs),108416k(userfs),256k(dtb),512k@0x7f80000(bbt)ro"
#endif
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
GENERATED_GBL_DATA_SIZE)
#ifdef CONFIG_CMD_IIM
-#define CONFIG_IMX_IIM
+#define CONFIG_FSL_IIM
#endif
#endif /* __CONFIG_H */