Merge branch '2020-05-18-reduce-size-of-common.h'
[platform/kernel/u-boot.git] / include / configs / mx6sllevk.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2013-2016 Freescale Semiconductor, Inc.
4  *
5  * Configuration settings for the Freescale i.MX6SL EVK board.
6  */
7
8 #ifndef __CONFIG_H
9 #define __CONFIG_H
10
11 #include "mx6_common.h"
12
13 /* Size of malloc() pool */
14 #define CONFIG_SYS_MALLOC_LEN           (16 * SZ_1M)
15
16 #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
107 /* Physical Memory Map */
108 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
109 #define PHYS_SDRAM_SIZE                 SZ_2G
110
111 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
112 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
113 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
114
115 #define CONFIG_SYS_INIT_SP_OFFSET \
116         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
117 #define CONFIG_SYS_INIT_SP_ADDR \
118         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
119
120 /* Environment organization */
121 #define CONFIG_SYS_MMC_ENV_PART         0   /* user partition */
122 #define CONFIG_MMCROOT                  "/dev/mmcblk0p2"  /* USDHC1 */
123
124 /* MMC Configs */
125 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC1_BASE_ADDR
126 #define CONFIG_SYS_FSL_USDHC_NUM        3
127 #define CONFIG_SYS_MMC_ENV_DEV          0   /* USDHC1 */
128
129 #define CONFIG_IMX_THERMAL
130
131 #define CONFIG_IOMUX_LPSR
132
133 /* USB Configs */
134 #ifdef CONFIG_CMD_USB
135 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
136 #endif
137
138 #include <linux/stringify.h>
139 #endif                          /* __CONFIG_H */