blob: 7e3a5c7cf3bb81da52fd10ce8e1e6d8033e0a842 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fan55a42b32016-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 Fan55a42b32016-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 Babic552a8482017-06-29 10:16:06 +020014#include <asm/mach-imx/gpio.h>
Peng Fan55a42b32016-08-11 14:02:57 +080015
Peng Fan55a42b32016-08-11 14:02:57 +080016#define PHYS_SDRAM_SIZE SZ_512M
17
Peng Fan55a42b32016-08-11 14:02:57 +080018/* Size of malloc() pool */
19#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
20
Peng Fan55a42b32016-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 Fan1d293e62019-08-08 09:55:57 +000052 "fdt_file=undefined\0" \
Peng Fan55a42b32016-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 Fan1d293e62019-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 Fan55a42b32016-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 Fan1d293e62019-08-08 09:55:57 +0000120 "run findfdt;" \
Peng Fan55a42b32016-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 */
Peng Fan55a42b32016-08-11 14:02:57 +0800134
135#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
136#define CONFIG_SYS_HZ 1000
137
Peng Fan55a42b32016-08-11 14:02:57 +0800138/* Physical Memory Map */
Peng Fan55a42b32016-08-11 14:02:57 +0800139#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
140
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
144
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)
149
Masahiro Yamadae856bdc2017-02-11 22:43:54 +0900150/* environment organization */
Peng Fan55a42b32016-08-11 14:02:57 +0800151#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
152#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
153#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */
154
Peng Fan55a42b32016-08-11 14:02:57 +0800155#define CONFIG_IMX_THERMAL
156
157#define CONFIG_IOMUX_LPSR
158
159#define CONFIG_SOFT_SPI
160
Fabio Estevam03279b72020-02-03 14:23:58 -0300161#ifdef CONFIG_CMD_NET
162#define CONFIG_FEC_ENET_DEV 1
163#if (CONFIG_FEC_ENET_DEV == 0)
164#define CONFIG_ETHPRIME "eth0"
165#elif (CONFIG_FEC_ENET_DEV == 1)
166#define CONFIG_ETHPRIME "eth1"
167#endif
168#endif
169
Peng Fan55a42b32016-08-11 14:02:57 +0800170#endif