1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2013-2019 Toradex, Inc.
5 * Configuration settings for the Toradex Colibri iMX6
11 #include <linux/stringify.h>
13 #include "mx6_common.h"
15 #include <asm/arch/imx-regs.h>
16 #include <asm/mach-imx/gpio.h>
18 #define CFG_MXC_UART_BASE UART1_BASE
21 #define CFG_SYS_FSL_ESDHC_ADDR 0
22 #define CFG_SYS_FSL_USDHC_NUM 2
24 /* Command definition */
26 #define BOOT_TARGET_DEVICES(func) \
31 #include <config_distro_bootcmd.h>
32 #undef BOOTENV_RUN_NET_USB_START
33 #define BOOTENV_RUN_NET_USB_START ""
35 #define UBOOT_UPDATE \
39 "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
40 "setexpr blkcnt ${blkcnt} / 0x200\0" \
41 "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
42 "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
43 "update_spl=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
44 "mmc write ${loadaddr} ${uboot_spl_blk} ${blkcnt}\0"
46 #define MEM_LAYOUT_ENV_SETTINGS \
47 "bootm_size=0x10000000\0" \
48 "fdt_addr_r=0x18200000\0" \
49 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
50 "pxefile_addr_r=0x18300000\0" \
51 "ramdisk_addr_r=0x18400000\0" \
52 "scriptaddr=0x18280000\0"
54 #define CFG_EXTRA_ENV_SETTINGS \
56 "boot_script_dhcp=boot.scr\0" \
58 "fdt_board=eval-v3\0" \
59 MEM_LAYOUT_ENV_SETTINGS \
61 "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
62 "00:14:2d:00:00:00; fi; tftpboot ${loadaddr} " \
63 "flash_eth.img && source ${loadaddr}\0" \
64 "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; load " \
65 "${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
66 "source ${loadaddr}\0" \
67 "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
68 "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
69 "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
70 "source ${loadaddr}\0" \
72 "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0"
74 /* Miscellaneous configurable options */
76 /* Physical Memory Map */
77 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
79 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM
80 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
81 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
83 #endif /* __CONFIG_H */