Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Freescale i.MX6UL 14x14 EVK board. |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | */ |
| 8 | #ifndef __MX6UL_14X14_EVK_CONFIG_H |
| 9 | #define __MX6UL_14X14_EVK_CONFIG_H |
| 10 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 11 | #include <asm/arch/imx-regs.h> |
| 12 | #include <linux/sizes.h> |
| 13 | #include "mx6_common.h" |
| 14 | #include <asm/imx-common/gpio.h> |
| 15 | |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 16 | #define is_mx6ul_9x9_evk() CONFIG_IS_ENABLED(TARGET_MX6UL_9X9_EVK) |
| 17 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 18 | /* SPL options */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 19 | #include "imx6_spl.h" |
| 20 | |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 21 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
| 22 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 23 | #define CONFIG_DISPLAY_CPUINFO |
| 24 | #define CONFIG_DISPLAY_BOARDINFO |
| 25 | |
| 26 | /* Size of malloc() pool */ |
| 27 | #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) |
| 28 | |
| 29 | #define CONFIG_BOARD_EARLY_INIT_F |
| 30 | #define CONFIG_BOARD_LATE_INIT |
| 31 | |
| 32 | #define CONFIG_MXC_UART |
| 33 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 34 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 35 | /* MMC Configs */ |
| 36 | #ifdef CONFIG_FSL_USDHC |
| 37 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR |
| 38 | |
| 39 | /* NAND pin conflicts with usdhc2 */ |
| 40 | #ifdef CONFIG_NAND_MXS |
| 41 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 42 | #else |
| 43 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 44 | #endif |
| 45 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 46 | #endif |
| 47 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 48 | /* I2C configs */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 49 | #ifdef CONFIG_CMD_I2C |
| 50 | #define CONFIG_SYS_I2C |
| 51 | #define CONFIG_SYS_I2C_MXC |
Albert ARIBAUD \\(3ADEV\\) | eb94387 | 2015-09-21 22:43:38 +0200 | [diff] [blame] | 52 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 53 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 54 | #define CONFIG_SYS_I2C_SPEED 100000 |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 55 | |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 56 | /* PMIC only for 9X9 EVK */ |
| 57 | #define CONFIG_POWER |
| 58 | #define CONFIG_POWER_I2C |
| 59 | #define CONFIG_POWER_PFUZE3000 |
| 60 | #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 |
| 61 | #endif |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 62 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 63 | #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 |
| 64 | |
| 65 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 66 | "script=boot.scr\0" \ |
| 67 | "image=zImage\0" \ |
| 68 | "console=ttymxc0\0" \ |
| 69 | "fdt_high=0xffffffff\0" \ |
| 70 | "initrd_high=0xffffffff\0" \ |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 71 | "fdt_file=undefined\0" \ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 72 | "fdt_addr=0x83000000\0" \ |
| 73 | "boot_fdt=try\0" \ |
| 74 | "ip_dyn=yes\0" \ |
Peng Fan | 60c72b6 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 75 | "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 76 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
| 77 | "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ |
| 78 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 79 | "mmcautodetect=yes\0" \ |
| 80 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 81 | "root=${mmcroot}\0" \ |
| 82 | "loadbootscript=" \ |
| 83 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 84 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 85 | "source\0" \ |
| 86 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 87 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 88 | "mmcboot=echo Booting from mmc ...; " \ |
| 89 | "run mmcargs; " \ |
| 90 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 91 | "if run loadfdt; then " \ |
| 92 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 93 | "else " \ |
| 94 | "if test ${boot_fdt} = try; then " \ |
| 95 | "bootz; " \ |
| 96 | "else " \ |
| 97 | "echo WARN: Cannot load the DT; " \ |
| 98 | "fi; " \ |
| 99 | "fi; " \ |
| 100 | "else " \ |
| 101 | "bootz; " \ |
| 102 | "fi;\0" \ |
| 103 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 104 | "root=/dev/nfs " \ |
| 105 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 106 | "netboot=echo Booting from net ...; " \ |
| 107 | "run netargs; " \ |
| 108 | "if test ${ip_dyn} = yes; then " \ |
| 109 | "setenv get_cmd dhcp; " \ |
| 110 | "else " \ |
| 111 | "setenv get_cmd tftp; " \ |
| 112 | "fi; " \ |
| 113 | "${get_cmd} ${image}; " \ |
| 114 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 115 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 116 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 117 | "else " \ |
| 118 | "if test ${boot_fdt} = try; then " \ |
| 119 | "bootz; " \ |
| 120 | "else " \ |
| 121 | "echo WARN: Cannot load the DT; " \ |
| 122 | "fi; " \ |
| 123 | "fi; " \ |
| 124 | "else " \ |
| 125 | "bootz; " \ |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 126 | "fi;\0" \ |
| 127 | "findfdt="\ |
| 128 | "if test $fdt_file = undefined; then " \ |
| 129 | "if test $board_name = EVK && test $board_rev = 9X9; then " \ |
| 130 | "setenv fdt_file imx6ul-9x9-evk.dtb; fi; " \ |
| 131 | "if test $board_name = EVK && test $board_rev = 14X14; then " \ |
| 132 | "setenv fdt_file imx6ul-14x14-evk.dtb; fi; " \ |
| 133 | "if test $fdt_file = undefined; then " \ |
| 134 | "echo WARNING: Could not determine dtb to use; fi; " \ |
| 135 | "fi;\0" \ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 136 | |
| 137 | #define CONFIG_BOOTCOMMAND \ |
Peng Fan | 5630c98 | 2015-09-06 15:02:34 +0800 | [diff] [blame] | 138 | "run findfdt;" \ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 139 | "mmc dev ${mmcdev};" \ |
| 140 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 141 | "if run loadbootscript; then " \ |
| 142 | "run bootscript; " \ |
| 143 | "else " \ |
| 144 | "if run loadimage; then " \ |
| 145 | "run mmcboot; " \ |
| 146 | "else run netboot; " \ |
| 147 | "fi; " \ |
| 148 | "fi; " \ |
| 149 | "else run netboot; fi" |
| 150 | |
| 151 | /* Miscellaneous configurable options */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 152 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
Peng Fan | a03003a | 2016-01-05 14:03:36 +0800 | [diff] [blame] | 153 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000) |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 154 | |
| 155 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 156 | #define CONFIG_SYS_HZ 1000 |
| 157 | |
| 158 | #define CONFIG_CMDLINE_EDITING |
| 159 | #define CONFIG_STACKSIZE SZ_128K |
| 160 | |
| 161 | /* Physical Memory Map */ |
| 162 | #define CONFIG_NR_DRAM_BANKS 1 |
| 163 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 164 | |
| 165 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 166 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 167 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 168 | |
| 169 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 170 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 171 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 172 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 173 | |
| 174 | /* FLASH and environment organization */ |
| 175 | #define CONFIG_SYS_NO_FLASH |
| 176 | |
| 177 | #define CONFIG_ENV_SIZE SZ_8K |
| 178 | #define CONFIG_ENV_IS_IN_MMC |
| 179 | #define CONFIG_ENV_OFFSET (8 * SZ_64K) |
| 180 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ |
| 181 | #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ |
| 182 | #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ |
| 183 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 184 | #define CONFIG_CMD_BMODE |
| 185 | |
| 186 | #ifndef CONFIG_SYS_DCACHE_OFF |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 187 | #endif |
| 188 | |
Fabio Estevam | 0aa7410 | 2016-02-17 17:32:14 -0200 | [diff] [blame] | 189 | #define CONFIG_FSL_QSPI |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 190 | #ifdef CONFIG_FSL_QSPI |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 191 | #define CONFIG_SPI_FLASH |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 192 | #define CONFIG_SPI_FLASH_BAR |
| 193 | #define CONFIG_SF_DEFAULT_BUS 0 |
| 194 | #define CONFIG_SF_DEFAULT_CS 0 |
| 195 | #define CONFIG_SF_DEFAULT_SPEED 40000000 |
| 196 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 |
Peng Fan | 7eca937 | 2016-01-19 15:13:52 +0800 | [diff] [blame] | 197 | #define CONFIG_SPI_FLASH_STMICRO |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 198 | #define FSL_QSPI_FLASH_NUM 1 |
| 199 | #define FSL_QSPI_FLASH_SIZE SZ_32M |
| 200 | #endif |
| 201 | |
| 202 | /* USB Configs */ |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 203 | #ifdef CONFIG_CMD_USB |
| 204 | #define CONFIG_USB_EHCI |
| 205 | #define CONFIG_USB_EHCI_MX6 |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 206 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 207 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 208 | #define CONFIG_MXC_USB_FLAGS 0 |
| 209 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 210 | #endif |
| 211 | |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 212 | #ifdef CONFIG_CMD_NET |
| 213 | #define CONFIG_FEC_MXC |
| 214 | #define CONFIG_MII |
| 215 | #define CONFIG_FEC_ENET_DEV 1 |
| 216 | |
| 217 | #if (CONFIG_FEC_ENET_DEV == 0) |
| 218 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 219 | #define CONFIG_FEC_MXC_PHYADDR 0x2 |
| 220 | #define CONFIG_FEC_XCV_TYPE RMII |
| 221 | #elif (CONFIG_FEC_ENET_DEV == 1) |
| 222 | #define IMX_FEC_BASE ENET2_BASE_ADDR |
| 223 | #define CONFIG_FEC_MXC_PHYADDR 0x1 |
| 224 | #define CONFIG_FEC_XCV_TYPE RMII |
| 225 | #endif |
| 226 | #define CONFIG_ETHPRIME "FEC" |
| 227 | |
| 228 | #define CONFIG_PHYLIB |
| 229 | #define CONFIG_PHY_MICREL |
Peng Fan | 32cfb35 | 2015-08-12 17:46:52 +0800 | [diff] [blame] | 230 | #endif |
| 231 | |
Adrian Alonso | ce08c36 | 2015-09-02 13:54:13 -0500 | [diff] [blame] | 232 | #define CONFIG_IMX_THERMAL |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 233 | |
Peng Fan | c0eaca2 | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 234 | #ifndef CONFIG_SPL_BUILD |
Peng Fan | 60c72b6 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 235 | #define CONFIG_VIDEO |
| 236 | #ifdef CONFIG_VIDEO |
| 237 | #define CONFIG_CFB_CONSOLE |
| 238 | #define CONFIG_VIDEO_MXS |
| 239 | #define CONFIG_VIDEO_LOGO |
| 240 | #define CONFIG_VIDEO_SW_CURSOR |
| 241 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 242 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 243 | #define CONFIG_SPLASH_SCREEN |
| 244 | #define CONFIG_SPLASH_SCREEN_ALIGN |
| 245 | #define CONFIG_CMD_BMP |
| 246 | #define CONFIG_BMP_16BPP |
| 247 | #define CONFIG_VIDEO_BMP_RLE8 |
| 248 | #define CONFIG_VIDEO_BMP_LOGO |
| 249 | #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR |
| 250 | #endif |
Peng Fan | c0eaca2 | 2016-01-04 12:19:14 +0800 | [diff] [blame] | 251 | #endif |
Peng Fan | 60c72b6 | 2015-10-29 15:54:48 +0800 | [diff] [blame] | 252 | |
Peng Fan | dbf316a | 2015-07-20 19:28:35 +0800 | [diff] [blame] | 253 | #endif |