blob: b9f25cf0fcc423d3f3d0b8ab612f4911810e2abc [file] [log] [blame]
Peng Fan186585c2016-12-11 19:24:37 +08001/*
2 * Copyright 2013-2016 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6SL EVK board.
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12#include "mx6_common.h"
13
14#ifdef CONFIG_SECURE_BOOT
15#ifndef CONFIG_CSF_SIZE
16#define CONFIG_CSF_SIZE 0x4000
17#endif
18#endif
19
20/* Size of malloc() pool */
21#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
22
23#define CONFIG_BOARD_EARLY_INIT_F
24#define CONFIG_BOARD_LATE_INIT
25
26#define CONFIG_MXC_UART
27#define CONFIG_MXC_UART_BASE UART1_BASE
28
29/* I2C Configs */
30#ifdef CONFIG_CMD_I2C
31#define CONFIG_SYS_I2C_MXC
32#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
33#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
34#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
35#define CONFIG_SYS_I2C_SPEED 100000
36#endif
37
38#define CONFIG_EXTRA_ENV_SETTINGS \
39 "epdc_waveform=epdc_splash.bin\0" \
40 "script=boot.scr\0" \
41 "image=zImage\0" \
42 "console=ttymxc0\0" \
43 "fdt_high=0xffffffff\0" \
44 "initrd_high=0xffffffff\0" \
45 "fdt_file=imx6sll-evk.dtb\0" \
46 "fdt_addr=0x83000000\0" \
47 "boot_fdt=try\0" \
48 "ip_dyn=yes\0" \
49 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
50 "mmcpart=1\0" \
51 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
52 "mmcautodetect=yes\0" \
53 "mmcargs=setenv bootargs console=${console},${baudrate} " \
54 "root=${mmcroot}\0" \
55 "loadbootscript=" \
56 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
57 "bootscript=echo Running bootscript from mmc ...; " \
58 "source\0" \
59 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
60 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
61 "mmcboot=echo Booting from mmc ...; " \
62 "run mmcargs; " \
63 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
64 "if run loadfdt; then " \
65 "bootz ${loadaddr} - ${fdt_addr}; " \
66 "else " \
67 "if test ${boot_fdt} = try; then " \
68 "bootz; " \
69 "else " \
70 "echo WARN: Cannot load the DT; " \
71 "fi; " \
72 "fi; " \
73 "else " \
74 "bootz; " \
75 "fi;\0" \
76 "netargs=setenv bootargs console=${console},${baudrate} " \
77 "root=/dev/nfs " \
78 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
79 "netboot=echo Booting from net ...; " \
80 "usb start; " \
81 "run netargs; " \
82 "if test ${ip_dyn} = yes; then " \
83 "setenv get_cmd dhcp; " \
84 "else " \
85 "setenv get_cmd tftp; " \
86 "fi; " \
87 "${get_cmd} ${image}; " \
88 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
89 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
90 "bootz ${loadaddr} - ${fdt_addr}; " \
91 "else " \
92 "if test ${boot_fdt} = try; then " \
93 "bootz; " \
94 "else " \
95 "echo WARN: Cannot load the DT; " \
96 "fi; " \
97 "fi; " \
98 "else " \
99 "bootz; " \
100 "fi;\0"
101
102#define CONFIG_BOOTCOMMAND \
103 "mmc dev ${mmcdev};" \
104 "mmc dev ${mmcdev}; if mmc rescan; then " \
105 "if run loadbootscript; then " \
106 "run bootscript; " \
107 "else " \
108 "if run loadimage; then " \
109 "run mmcboot; " \
110 "else run netboot; " \
111 "fi; " \
112 "fi; " \
113 "else run netboot; fi"
114
115/* Miscellaneous configurable options */
116#define CONFIG_SYS_MEMTEST_START 0x80000000
117#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_128M)
118
119#define CONFIG_STACKSIZE SZ_128K
120
121/* Physical Memory Map */
122#define CONFIG_NR_DRAM_BANKS 1
123#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
124#define PHYS_SDRAM_SIZE SZ_2G
125
126#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
127#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
128#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
129
130#define CONFIG_SYS_INIT_SP_OFFSET \
131 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
132#define CONFIG_SYS_INIT_SP_ADDR \
133 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
134
135/* Environment organization */
136#define CONFIG_ENV_SIZE SZ_8K
137#define CONFIG_SYS_MMC_ENV_PART 0 /* user partition */
138#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
139
140#define CONFIG_ENV_OFFSET (12 * SZ_64K)
141#define CONFIG_ENV_IS_IN_MMC
142
143/* MMC Configs */
144#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
145#define CONFIG_SYS_FSL_USDHC_NUM 3
146#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
147
148#define CONFIG_IMX_THERMAL
149
150#define CONFIG_IOMUX_LPSR
151
152#endif /* __CONFIG_H */