]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
47f73504 PF |
2 | /* |
3 | * Copyright 2013-2016 Freescale Semiconductor, Inc. | |
4 | * | |
5 | * Configuration settings for the Freescale i.MX6SL EVK board. | |
47f73504 PF |
6 | */ |
7 | ||
8 | #ifndef __CONFIG_H | |
9 | #define __CONFIG_H | |
10 | ||
11 | #include "mx6_common.h" | |
12 | ||
47f73504 PF |
13 | /* Size of malloc() pool */ |
14 | #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) | |
15 | ||
47f73504 PF |
16 | #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 */ | |
47f73504 PF |
24 | #endif |
25 | ||
26 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
27 | "epdc_waveform=epdc_splash.bin\0" \ | |
28 | "script=boot.scr\0" \ | |
29 | "image=zImage\0" \ | |
30 | "console=ttymxc0\0" \ | |
31 | "fdt_high=0xffffffff\0" \ | |
32 | "initrd_high=0xffffffff\0" \ | |
33 | "fdt_file=imx6sll-evk.dtb\0" \ | |
34 | "fdt_addr=0x83000000\0" \ | |
35 | "boot_fdt=try\0" \ | |
36 | "ip_dyn=yes\0" \ | |
37 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ | |
38 | "mmcpart=1\0" \ | |
39 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ | |
40 | "mmcautodetect=yes\0" \ | |
41 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ | |
42 | "root=${mmcroot}\0" \ | |
43 | "loadbootscript=" \ | |
44 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | |
45 | "bootscript=echo Running bootscript from mmc ...; " \ | |
46 | "source\0" \ | |
47 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ | |
48 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | |
49 | "mmcboot=echo Booting from mmc ...; " \ | |
50 | "run mmcargs; " \ | |
51 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
52 | "if run loadfdt; then " \ | |
53 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
54 | "else " \ | |
55 | "if test ${boot_fdt} = try; then " \ | |
56 | "bootz; " \ | |
57 | "else " \ | |
58 | "echo WARN: Cannot load the DT; " \ | |
59 | "fi; " \ | |
60 | "fi; " \ | |
61 | "else " \ | |
62 | "bootz; " \ | |
63 | "fi;\0" \ | |
64 | "netargs=setenv bootargs console=${console},${baudrate} " \ | |
65 | "root=/dev/nfs " \ | |
66 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ | |
67 | "netboot=echo Booting from net ...; " \ | |
68 | "usb start; " \ | |
69 | "run netargs; " \ | |
70 | "if test ${ip_dyn} = yes; then " \ | |
71 | "setenv get_cmd dhcp; " \ | |
72 | "else " \ | |
73 | "setenv get_cmd tftp; " \ | |
74 | "fi; " \ | |
75 | "${get_cmd} ${image}; " \ | |
76 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
77 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | |
78 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
79 | "else " \ | |
80 | "if test ${boot_fdt} = try; then " \ | |
81 | "bootz; " \ | |
82 | "else " \ | |
83 | "echo WARN: Cannot load the DT; " \ | |
84 | "fi; " \ | |
85 | "fi; " \ | |
86 | "else " \ | |
87 | "bootz; " \ | |
88 | "fi;\0" | |
89 | ||
90 | #define CONFIG_BOOTCOMMAND \ | |
91 | "mmc dev ${mmcdev};" \ | |
92 | "mmc dev ${mmcdev}; if mmc rescan; then " \ | |
93 | "if run loadbootscript; then " \ | |
94 | "run bootscript; " \ | |
95 | "else " \ | |
96 | "if run loadimage; then " \ | |
97 | "run mmcboot; " \ | |
98 | "else run netboot; " \ | |
99 | "fi; " \ | |
100 | "fi; " \ | |
101 | "else run netboot; fi" | |
102 | ||
103 | /* Miscellaneous configurable options */ | |
47f73504 | 104 | |
47f73504 | 105 | /* Physical Memory Map */ |
47f73504 PF |
106 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
107 | #define PHYS_SDRAM_SIZE SZ_2G | |
108 | ||
109 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM | |
110 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
111 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
112 | ||
113 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
114 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
115 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
116 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
117 | ||
118 | /* Environment organization */ | |
47f73504 PF |
119 | #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ |
120 | ||
47f73504 PF |
121 | /* MMC Configs */ |
122 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR | |
123 | #define CONFIG_SYS_FSL_USDHC_NUM 3 | |
47f73504 | 124 | |
47f73504 PF |
125 | #define CONFIG_IOMUX_LPSR |
126 | ||
1f1745c6 PF |
127 | /* USB Configs */ |
128 | #ifdef CONFIG_CMD_USB | |
1f1745c6 PF |
129 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
130 | #endif | |
131 | ||
1af3c7f4 | 132 | #include <linux/stringify.h> |
47f73504 | 133 | #endif /* __CONFIG_H */ |