blob: 7cce911314b3bc5e51b415d8490dff9190ad68c7 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fan81590632016-08-11 14:02:57 +08002/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
Peng Fan81590632016-08-11 14:02:57 +08006 */
7#ifndef __MX6ULLEVK_CONFIG_H
8#define __MX6ULLEVK_CONFIG_H
9
10
11#include <asm/arch/imx-regs.h>
12#include <linux/sizes.h>
13#include "mx6_common.h"
Stefano Babic33731bc2017-06-29 10:16:06 +020014#include <asm/mach-imx/gpio.h>
Peng Fan81590632016-08-11 14:02:57 +080015
Peng Fan81590632016-08-11 14:02:57 +080016#define PHYS_SDRAM_SIZE SZ_512M
17
Peng Fan81590632016-08-11 14:02:57 +080018/* Size of malloc() pool */
19#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
20
Peng Fan81590632016-08-11 14:02:57 +080021#define CONFIG_MXC_UART
22#define CONFIG_MXC_UART_BASE UART1_BASE
23
24/* MMC Configs */
25#ifdef CONFIG_FSL_USDHC
26#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
27
28/* NAND pin conflicts with usdhc2 */
29#ifdef CONFIG_SYS_USE_NAND
30#define CONFIG_SYS_FSL_USDHC_NUM 1
31#else
32#define CONFIG_SYS_FSL_USDHC_NUM 2
33#endif
34#endif
35
36/* I2C configs */
37#ifdef CONFIG_CMD_I2C
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
42#endif
43
44#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
45
46#define CONFIG_EXTRA_ENV_SETTINGS \
47 "script=boot.scr\0" \
48 "image=zImage\0" \
49 "console=ttymxc0\0" \
50 "fdt_high=0xffffffff\0" \
51 "initrd_high=0xffffffff\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000052 "fdt_file=undefined\0" \
Peng Fan81590632016-08-11 14:02:57 +080053 "fdt_addr=0x83000000\0" \
54 "boot_fdt=try\0" \
55 "ip_dyn=yes\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} " \
62 "root=${mmcroot}\0" \
63 "loadbootscript=" \
64 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
65 "bootscript=echo Running bootscript from mmc ...; " \
66 "source\0" \
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 ...; " \
70 "run mmcargs; " \
71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 "if run loadfdt; then " \
73 "bootz ${loadaddr} - ${fdt_addr}; " \
74 "else " \
75 "if test ${boot_fdt} = try; then " \
76 "bootz; " \
77 "else " \
78 "echo WARN: Cannot load the DT; " \
79 "fi; " \
80 "fi; " \
81 "else " \
82 "bootz; " \
83 "fi;\0" \
Peng Fan5098eae2019-08-08 09:55:57 +000084 "findfdt="\
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; " \
92 "fi; " \
93 "fi;\0" \
Peng Fan81590632016-08-11 14:02:57 +080094 "netargs=setenv bootargs console=${console},${baudrate} " \
95 "root=/dev/nfs " \
96 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
97 "netboot=echo Booting from net ...; " \
98 "run netargs; " \
99 "if test ${ip_dyn} = yes; then " \
100 "setenv get_cmd dhcp; " \
101 "else " \
102 "setenv get_cmd tftp; " \
103 "fi; " \
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}; " \
108 "else " \
109 "if test ${boot_fdt} = try; then " \
110 "bootz; " \
111 "else " \
112 "echo WARN: Cannot load the DT; " \
113 "fi; " \
114 "fi; " \
115 "else " \
116 "bootz; " \
117 "fi;\0" \
118
119#define CONFIG_BOOTCOMMAND \
Peng Fan5098eae2019-08-08 09:55:57 +0000120 "run findfdt;" \
Peng Fan81590632016-08-11 14:02:57 +0800121 "mmc dev ${mmcdev};" \
122 "mmc dev ${mmcdev}; if mmc rescan; then " \
123 "if run loadbootscript; then " \
124 "run bootscript; " \
125 "else " \
126 "if run loadimage; then " \
127 "run mmcboot; " \
128 "else run netboot; " \
129 "fi; " \
130 "fi; " \
131 "else run netboot; fi"
132
133/* Miscellaneous configurable options */
134#define CONFIG_SYS_MEMTEST_START 0x80000000
135#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000)
136
137#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
138#define CONFIG_SYS_HZ 1000
139
Peng Fan81590632016-08-11 14:02:57 +0800140/* Physical Memory Map */
Peng Fan81590632016-08-11 14:02:57 +0800141#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
142
143#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
144#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
145#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
146
147#define CONFIG_SYS_INIT_SP_OFFSET \
148 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
149#define CONFIG_SYS_INIT_SP_ADDR \
150 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
151
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900152/* environment organization */
Peng Fan81590632016-08-11 14:02:57 +0800153#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
154#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
155#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
156
Peng Fan81590632016-08-11 14:02:57 +0800157#define CONFIG_IMX_THERMAL
158
159#define CONFIG_IOMUX_LPSR
160
161#define CONFIG_SOFT_SPI
162
Peng Fanc9b4e132018-01-03 08:52:03 +0800163#ifdef CONFIG_FSL_QSPI
164#define CONFIG_SYS_FSL_QSPI_AHB
Peng Fanc9b4e132018-01-03 08:52:03 +0800165#define FSL_QSPI_FLASH_NUM 1
166#define FSL_QSPI_FLASH_SIZE SZ_32M
167#endif
168
Peng Fan81590632016-08-11 14:02:57 +0800169#endif