1 /* 2 * Copyright 2013-2016 Freescale Semiconductor, Inc. 3 * 4 * Configuration settings for the Freescale i.MX6SL EVK board. 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __CONFIG_H 10 #define __CONFIG_H 11 12 #include "mx6_common.h" 13 14 #ifdef CONFIG_SECURE_BOOT 15 #ifndef CONFIG_CSF_SIZE 16 #define CONFIG_CSF_SIZE 0x4000 17 #endif 18 #endif 19 20 /* Size of malloc() pool */ 21 #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) 22 23 #define CONFIG_MXC_UART 24 #define CONFIG_MXC_UART_BASE UART1_BASE 25 26 /* I2C Configs */ 27 #ifdef CONFIG_CMD_I2C 28 #define CONFIG_SYS_I2C_MXC 29 #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ 30 #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ 31 #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ 32 #define CONFIG_SYS_I2C_SPEED 100000 33 #endif 34 35 #define CONFIG_EXTRA_ENV_SETTINGS \ 36 "epdc_waveform=epdc_splash.bin\0" \ 37 "script=boot.scr\0" \ 38 "image=zImage\0" \ 39 "console=ttymxc0\0" \ 40 "fdt_high=0xffffffff\0" \ 41 "initrd_high=0xffffffff\0" \ 42 "fdt_file=imx6sll-evk.dtb\0" \ 43 "fdt_addr=0x83000000\0" \ 44 "boot_fdt=try\0" \ 45 "ip_dyn=yes\0" \ 46 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ 47 "mmcpart=1\0" \ 48 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ 49 "mmcautodetect=yes\0" \ 50 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 51 "root=${mmcroot}\0" \ 52 "loadbootscript=" \ 53 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 54 "bootscript=echo Running bootscript from mmc ...; " \ 55 "source\0" \ 56 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 57 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 58 "mmcboot=echo Booting from mmc ...; " \ 59 "run mmcargs; " \ 60 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 61 "if run loadfdt; then " \ 62 "bootz ${loadaddr} - ${fdt_addr}; " \ 63 "else " \ 64 "if test ${boot_fdt} = try; then " \ 65 "bootz; " \ 66 "else " \ 67 "echo WARN: Cannot load the DT; " \ 68 "fi; " \ 69 "fi; " \ 70 "else " \ 71 "bootz; " \ 72 "fi;\0" \ 73 "netargs=setenv bootargs console=${console},${baudrate} " \ 74 "root=/dev/nfs " \ 75 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 76 "netboot=echo Booting from net ...; " \ 77 "usb start; " \ 78 "run netargs; " \ 79 "if test ${ip_dyn} = yes; then " \ 80 "setenv get_cmd dhcp; " \ 81 "else " \ 82 "setenv get_cmd tftp; " \ 83 "fi; " \ 84 "${get_cmd} ${image}; " \ 85 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 86 "if ${get_cmd} ${fdt_addr} ${fdt_file}; 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 99 #define CONFIG_BOOTCOMMAND \ 100 "mmc dev ${mmcdev};" \ 101 "mmc dev ${mmcdev}; if mmc rescan; then " \ 102 "if run loadbootscript; then " \ 103 "run bootscript; " \ 104 "else " \ 105 "if run loadimage; then " \ 106 "run mmcboot; " \ 107 "else run netboot; " \ 108 "fi; " \ 109 "fi; " \ 110 "else run netboot; fi" 111 112 /* Miscellaneous configurable options */ 113 #define CONFIG_SYS_MEMTEST_START 0x80000000 114 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_128M) 115 116 /* Physical Memory Map */ 117 #define CONFIG_NR_DRAM_BANKS 1 118 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 119 #define PHYS_SDRAM_SIZE SZ_2G 120 121 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 122 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 123 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 124 125 #define CONFIG_SYS_INIT_SP_OFFSET \ 126 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 127 #define CONFIG_SYS_INIT_SP_ADDR \ 128 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 129 130 /* Environment organization */ 131 #define CONFIG_ENV_SIZE SZ_8K 132 #define CONFIG_SYS_MMC_ENV_PART 0 /* user partition */ 133 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ 134 135 #define CONFIG_ENV_OFFSET (12 * SZ_64K) 136 137 /* MMC Configs */ 138 #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR 139 #define CONFIG_SYS_FSL_USDHC_NUM 3 140 #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */ 141 142 #define CONFIG_IMX_THERMAL 143 144 #define CONFIG_IOMUX_LPSR 145 146 /* USB Configs */ 147 #ifdef CONFIG_CMD_USB 148 #define CONFIG_USB_HOST_ETHER 149 #define CONFIG_USB_ETHER_ASIX 150 #define CONFIG_USB_ETHER_RTL8152 151 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 152 #endif 153 154 #endif /* __CONFIG_H */ 155