1 /* 2 * Copyright (C) 2016 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 __MX6ULLEVK_CONFIG_H 9 #define __MX6ULLEVK_CONFIG_H 10 11 12 #include <asm/arch/imx-regs.h> 13 #include <linux/sizes.h> 14 #include "mx6_common.h" 15 #include <asm/imx-common/gpio.h> 16 17 #ifdef CONFIG_SECURE_BOOT 18 #ifndef CONFIG_CSF_SIZE 19 #define CONFIG_CSF_SIZE 0x4000 20 #endif 21 #endif 22 23 #define PHYS_SDRAM_SIZE SZ_512M 24 25 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG 26 27 /* Size of malloc() pool */ 28 #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) 29 30 #define CONFIG_BOARD_EARLY_INIT_F 31 #define CONFIG_BOARD_LATE_INIT 32 33 #define CONFIG_MXC_GPIO 34 35 #define CONFIG_MXC_UART 36 #define CONFIG_MXC_UART_BASE UART1_BASE 37 38 /* MMC Configs */ 39 #ifdef CONFIG_FSL_USDHC 40 #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR 41 42 /* NAND pin conflicts with usdhc2 */ 43 #ifdef CONFIG_SYS_USE_NAND 44 #define CONFIG_SYS_FSL_USDHC_NUM 1 45 #else 46 #define CONFIG_SYS_FSL_USDHC_NUM 2 47 #endif 48 #endif 49 50 /* I2C configs */ 51 #ifdef CONFIG_CMD_I2C 52 #define CONFIG_SYS_I2C_MXC 53 #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 54 #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 55 #define CONFIG_SYS_I2C_SPEED 100000 56 #endif 57 58 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 59 60 #define CONFIG_EXTRA_ENV_SETTINGS \ 61 "script=boot.scr\0" \ 62 "image=zImage\0" \ 63 "console=ttymxc0\0" \ 64 "fdt_high=0xffffffff\0" \ 65 "initrd_high=0xffffffff\0" \ 66 "fdt_file=imx6ull-14x14-evk.dtb\0" \ 67 "fdt_addr=0x83000000\0" \ 68 "boot_fdt=try\0" \ 69 "ip_dyn=yes\0" \ 70 "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" \ 71 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 72 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ 73 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ 74 "mmcautodetect=yes\0" \ 75 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 76 "root=${mmcroot}\0" \ 77 "loadbootscript=" \ 78 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 79 "bootscript=echo Running bootscript from mmc ...; " \ 80 "source\0" \ 81 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 82 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 83 "mmcboot=echo Booting from mmc ...; " \ 84 "run mmcargs; " \ 85 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 86 "if run loadfdt; then " \ 87 "bootz ${loadaddr} - ${fdt_addr}; " \ 88 "else " \ 89 "if test ${boot_fdt} = try; then " \ 90 "bootz; " \ 91 "else " \ 92 "echo WARN: Cannot load the DT; " \ 93 "fi; " \ 94 "fi; " \ 95 "else " \ 96 "bootz; " \ 97 "fi;\0" \ 98 "netargs=setenv bootargs console=${console},${baudrate} " \ 99 "root=/dev/nfs " \ 100 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 101 "netboot=echo Booting from net ...; " \ 102 "run netargs; " \ 103 "if test ${ip_dyn} = yes; then " \ 104 "setenv get_cmd dhcp; " \ 105 "else " \ 106 "setenv get_cmd tftp; " \ 107 "fi; " \ 108 "${get_cmd} ${image}; " \ 109 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 110 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ 111 "bootz ${loadaddr} - ${fdt_addr}; " \ 112 "else " \ 113 "if test ${boot_fdt} = try; then " \ 114 "bootz; " \ 115 "else " \ 116 "echo WARN: Cannot load the DT; " \ 117 "fi; " \ 118 "fi; " \ 119 "else " \ 120 "bootz; " \ 121 "fi;\0" \ 122 123 #define CONFIG_BOOTCOMMAND \ 124 "mmc dev ${mmcdev};" \ 125 "mmc dev ${mmcdev}; if mmc rescan; then " \ 126 "if run loadbootscript; then " \ 127 "run bootscript; " \ 128 "else " \ 129 "if run loadimage; then " \ 130 "run mmcboot; " \ 131 "else run netboot; " \ 132 "fi; " \ 133 "fi; " \ 134 "else run netboot; fi" 135 136 /* Miscellaneous configurable options */ 137 #define CONFIG_SYS_MEMTEST_START 0x80000000 138 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000) 139 140 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 141 #define CONFIG_SYS_HZ 1000 142 143 #define CONFIG_STACKSIZE SZ_128K 144 145 /* Physical Memory Map */ 146 #define CONFIG_NR_DRAM_BANKS 1 147 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 148 149 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 150 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 151 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 152 153 #define CONFIG_SYS_INIT_SP_OFFSET \ 154 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 155 #define CONFIG_SYS_INIT_SP_ADDR \ 156 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 157 158 /* FLASH and environment organization */ 159 #define CONFIG_SYS_NO_FLASH 160 161 #define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ 162 #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ 163 #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ 164 165 #define CONFIG_ENV_IS_IN_MMC 166 #define CONFIG_ENV_SIZE SZ_8K 167 #define CONFIG_ENV_OFFSET (12 * SZ_64K) 168 169 #define CONFIG_CMD_BMODE 170 171 #define CONFIG_IMX_THERMAL 172 173 #define CONFIG_IOMUX_LPSR 174 175 #define CONFIG_SOFT_SPI 176 177 #endif 178