blob: 0befbff94dbcf72a4d73635f496656e072366c33 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fan47f73502016-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 Fan47f73502016-12-11 19:24:37 +08006 */
7
8#ifndef __CONFIG_H
9#define __CONFIG_H
10
11#include "mx6_common.h"
12
Peng Fan47f73502016-12-11 19:24:37 +080013/* Size of malloc() pool */
14#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
15
Peng Fan47f73502016-12-11 19:24:37 +080016#define CONFIG_MXC_UART_BASE UART1_BASE
17
Peng Fan47f73502016-12-11 19:24:37 +080018#define CONFIG_EXTRA_ENV_SETTINGS \
19 "epdc_waveform=epdc_splash.bin\0" \
20 "script=boot.scr\0" \
21 "image=zImage\0" \
22 "console=ttymxc0\0" \
23 "fdt_high=0xffffffff\0" \
24 "initrd_high=0xffffffff\0" \
25 "fdt_file=imx6sll-evk.dtb\0" \
26 "fdt_addr=0x83000000\0" \
27 "boot_fdt=try\0" \
28 "ip_dyn=yes\0" \
29 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
30 "mmcpart=1\0" \
31 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
32 "mmcautodetect=yes\0" \
33 "mmcargs=setenv bootargs console=${console},${baudrate} " \
34 "root=${mmcroot}\0" \
35 "loadbootscript=" \
36 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
37 "bootscript=echo Running bootscript from mmc ...; " \
38 "source\0" \
39 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
40 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
41 "mmcboot=echo Booting from mmc ...; " \
42 "run mmcargs; " \
43 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
44 "if run loadfdt; then " \
45 "bootz ${loadaddr} - ${fdt_addr}; " \
46 "else " \
47 "if test ${boot_fdt} = try; then " \
48 "bootz; " \
49 "else " \
50 "echo WARN: Cannot load the DT; " \
51 "fi; " \
52 "fi; " \
53 "else " \
54 "bootz; " \
55 "fi;\0" \
56 "netargs=setenv bootargs console=${console},${baudrate} " \
57 "root=/dev/nfs " \
58 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
59 "netboot=echo Booting from net ...; " \
60 "usb start; " \
61 "run netargs; " \
62 "if test ${ip_dyn} = yes; then " \
63 "setenv get_cmd dhcp; " \
64 "else " \
65 "setenv get_cmd tftp; " \
66 "fi; " \
67 "${get_cmd} ${image}; " \
68 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
69 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
70 "bootz ${loadaddr} - ${fdt_addr}; " \
71 "else " \
72 "if test ${boot_fdt} = try; then " \
73 "bootz; " \
74 "else " \
75 "echo WARN: Cannot load the DT; " \
76 "fi; " \
77 "fi; " \
78 "else " \
79 "bootz; " \
80 "fi;\0"
81
82#define CONFIG_BOOTCOMMAND \
83 "mmc dev ${mmcdev};" \
84 "mmc dev ${mmcdev}; if mmc rescan; then " \
85 "if run loadbootscript; then " \
86 "run bootscript; " \
87 "else " \
88 "if run loadimage; then " \
89 "run mmcboot; " \
90 "else run netboot; " \
91 "fi; " \
92 "fi; " \
93 "else run netboot; fi"
94
95/* Miscellaneous configurable options */
Peng Fan47f73502016-12-11 19:24:37 +080096
Peng Fan47f73502016-12-11 19:24:37 +080097/* Physical Memory Map */
Peng Fan47f73502016-12-11 19:24:37 +080098#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
99#define PHYS_SDRAM_SIZE SZ_2G
100
101#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
102#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
103#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
104
105#define CONFIG_SYS_INIT_SP_OFFSET \
106 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
107#define CONFIG_SYS_INIT_SP_ADDR \
108 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
109
110/* Environment organization */
Peng Fan47f73502016-12-11 19:24:37 +0800111#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
112
Peng Fan47f73502016-12-11 19:24:37 +0800113/* MMC Configs */
114#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
115#define CONFIG_SYS_FSL_USDHC_NUM 3
Peng Fan47f73502016-12-11 19:24:37 +0800116
Peng Fan47f73502016-12-11 19:24:37 +0800117#define CONFIG_IOMUX_LPSR
118
Peng Fan1f1745c2016-12-22 17:06:44 +0800119/* USB Configs */
120#ifdef CONFIG_CMD_USB
Peng Fan1f1745c2016-12-22 17:06:44 +0800121#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
122#endif
123
Simon Glass1af3c7f2020-05-10 11:40:09 -0600124#include <linux/stringify.h>
Peng Fan47f73502016-12-11 19:24:37 +0800125#endif /* __CONFIG_H */