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