1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
5 * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
7 #ifndef __MX6ULLEVK_CONFIG_H
8 #define __MX6ULLEVK_CONFIG_H
11 #include <asm/arch/imx-regs.h>
12 #include <linux/sizes.h>
13 #include <linux/stringify.h>
14 #include "mx6_common.h"
15 #include <asm/mach-imx/gpio.h>
17 #define PHYS_SDRAM_SIZE SZ_512M
19 /* Size of malloc() pool */
20 #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
22 #define CONFIG_MXC_UART_BASE UART1_BASE
25 #ifdef CONFIG_FSL_USDHC
26 #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
28 /* NAND pin conflicts with usdhc2 */
29 #ifdef CONFIG_SYS_USE_NAND
30 #define CONFIG_SYS_FSL_USDHC_NUM 1
32 #define CONFIG_SYS_FSL_USDHC_NUM 2
38 #define CONFIG_SYS_I2C_MXC
39 #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
40 #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
41 #define CONFIG_SYS_I2C_SPEED 100000
44 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
46 #define CONFIG_EXTRA_ENV_SETTINGS \
50 "fdt_high=0xffffffff\0" \
51 "initrd_high=0xffffffff\0" \
52 "fdt_file=undefined\0" \
53 "fdt_addr=0x83000000\0" \
56 "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
57 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
58 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
59 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
60 "mmcautodetect=yes\0" \
61 "mmcargs=setenv bootargs console=${console},${baudrate} " \
64 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
65 "bootscript=echo Running bootscript from mmc ...; " \
67 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
68 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
69 "mmcboot=echo Booting from mmc ...; " \
71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 "if run loadfdt; then " \
73 "bootz ${loadaddr} - ${fdt_addr}; " \
75 "if test ${boot_fdt} = try; then " \
78 "echo WARN: Cannot load the DT; " \
85 "if test $fdt_file = undefined; then " \
86 "if test $board_name = ULZ-EVK && test $board_rev = 14X14; then " \
87 "setenv fdt_file imx6ulz-14x14-evk.dtb; fi; " \
88 "if test $board_name = EVK && test $board_rev = 14X14; then " \
89 "setenv fdt_file imx6ull-14x14-evk.dtb; fi; " \
90 "if test $fdt_file = undefined; then " \
91 "echo WARNING: Could not determine dtb to use; " \
94 "netargs=setenv bootargs console=${console},${baudrate} " \
96 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
97 "netboot=echo Booting from net ...; " \
99 "if test ${ip_dyn} = yes; then " \
100 "setenv get_cmd dhcp; " \
102 "setenv get_cmd tftp; " \
104 "${get_cmd} ${image}; " \
105 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
106 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
107 "bootz ${loadaddr} - ${fdt_addr}; " \
109 "if test ${boot_fdt} = try; then " \
112 "echo WARN: Cannot load the DT; " \
119 #define CONFIG_BOOTCOMMAND \
121 "mmc dev ${mmcdev};" \
122 "mmc dev ${mmcdev}; if mmc rescan; then " \
123 "if run loadbootscript; then " \
126 "if run loadimage; then " \
128 "else run netboot; " \
131 "else run netboot; fi"
133 /* Miscellaneous configurable options */
135 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
136 #define CONFIG_SYS_HZ 1000
138 /* Physical Memory Map */
139 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
141 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
142 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
143 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
145 #define CONFIG_SYS_INIT_SP_OFFSET \
146 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
147 #define CONFIG_SYS_INIT_SP_ADDR \
148 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
150 /* environment organization */
151 #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
153 #define CONFIG_IOMUX_LPSR
155 #define CONFIG_SOFT_SPI
157 #ifdef CONFIG_CMD_NET
158 #define CONFIG_FEC_ENET_DEV 1
159 #if (CONFIG_FEC_ENET_DEV == 0)
160 #define CONFIG_ETHPRIME "eth0"
161 #elif (CONFIG_FEC_ENET_DEV == 1)
162 #define CONFIG_ETHPRIME "eth1"