blob: a38ce4d09777512512f20523cce990e791826070 [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_BASE UART1_BASE
17
18/* I2C Configs */
19#ifdef CONFIG_CMD_I2C
20#define CONFIG_SYS_I2C_MXC
21#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
22#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
23#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
24#define CONFIG_SYS_I2C_SPEED 100000
25#endif
26
27#define CONFIG_EXTRA_ENV_SETTINGS \
28 "epdc_waveform=epdc_splash.bin\0" \
29 "script=boot.scr\0" \
30 "image=zImage\0" \
31 "console=ttymxc0\0" \
32 "fdt_high=0xffffffff\0" \
33 "initrd_high=0xffffffff\0" \
34 "fdt_file=imx6sll-evk.dtb\0" \
35 "fdt_addr=0x83000000\0" \
36 "boot_fdt=try\0" \
37 "ip_dyn=yes\0" \
38 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
39 "mmcpart=1\0" \
40 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
41 "mmcautodetect=yes\0" \
42 "mmcargs=setenv bootargs console=${console},${baudrate} " \
43 "root=${mmcroot}\0" \
44 "loadbootscript=" \
45 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
46 "bootscript=echo Running bootscript from mmc ...; " \
47 "source\0" \
48 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
49 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
50 "mmcboot=echo Booting from mmc ...; " \
51 "run mmcargs; " \
52 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
53 "if run loadfdt; then " \
54 "bootz ${loadaddr} - ${fdt_addr}; " \
55 "else " \
56 "if test ${boot_fdt} = try; then " \
57 "bootz; " \
58 "else " \
59 "echo WARN: Cannot load the DT; " \
60 "fi; " \
61 "fi; " \
62 "else " \
63 "bootz; " \
64 "fi;\0" \
65 "netargs=setenv bootargs console=${console},${baudrate} " \
66 "root=/dev/nfs " \
67 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
68 "netboot=echo Booting from net ...; " \
69 "usb start; " \
70 "run netargs; " \
71 "if test ${ip_dyn} = yes; then " \
72 "setenv get_cmd dhcp; " \
73 "else " \
74 "setenv get_cmd tftp; " \
75 "fi; " \
76 "${get_cmd} ${image}; " \
77 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
78 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
79 "bootz ${loadaddr} - ${fdt_addr}; " \
80 "else " \
81 "if test ${boot_fdt} = try; then " \
82 "bootz; " \
83 "else " \
84 "echo WARN: Cannot load the DT; " \
85 "fi; " \
86 "fi; " \
87 "else " \
88 "bootz; " \
89 "fi;\0"
90
91#define CONFIG_BOOTCOMMAND \
92 "mmc dev ${mmcdev};" \
93 "mmc dev ${mmcdev}; if mmc rescan; then " \
94 "if run loadbootscript; then " \
95 "run bootscript; " \
96 "else " \
97 "if run loadimage; then " \
98 "run mmcboot; " \
99 "else run netboot; " \
100 "fi; " \
101 "fi; " \
102 "else run netboot; fi"
103
104/* Miscellaneous configurable options */
Peng Fan186585c2016-12-11 19:24:37 +0800105
Peng Fan186585c2016-12-11 19:24:37 +0800106/* Physical Memory Map */
Peng Fan186585c2016-12-11 19:24:37 +0800107#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
108#define PHYS_SDRAM_SIZE SZ_2G
109
110#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
111#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
112#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
113
114#define CONFIG_SYS_INIT_SP_OFFSET \
115 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
116#define CONFIG_SYS_INIT_SP_ADDR \
117 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
118
119/* Environment organization */
Peng Fan186585c2016-12-11 19:24:37 +0800120#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
121
Peng Fan186585c2016-12-11 19:24:37 +0800122/* MMC Configs */
123#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
124#define CONFIG_SYS_FSL_USDHC_NUM 3
Peng Fan186585c2016-12-11 19:24:37 +0800125
Peng Fan186585c2016-12-11 19:24:37 +0800126#define CONFIG_IOMUX_LPSR
127
Peng Fand85131e2016-12-22 17:06:44 +0800128/* USB Configs */
129#ifdef CONFIG_CMD_USB
Peng Fand85131e2016-12-22 17:06:44 +0800130#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
131#endif
132
Simon Glassfb64e362020-05-10 11:40:09 -0600133#include <linux/stringify.h>
Peng Fan186585c2016-12-11 19:24:37 +0800134#endif /* __CONFIG_H */