1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) 2015, Savoir-faire Linux Inc. 4 * 5 * Derived from MX51EVK code by 6 * Guennadi Liakhovetski <lg@denx.de> 7 * Freescale Semiconductor, Inc. 8 * 9 * Configuration settings for the TS4800 Board 10 */ 11 12 #ifndef __CONFIG_H 13 #define __CONFIG_H 14 15 /* High Level Configuration Options */ 16 17 #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 2nd stage bootloader */ 18 19 #define CONFIG_HW_WATCHDOG 20 21 #define CONFIG_MACH_TYPE MACH_TYPE_TS48XX 22 23 /* text base address used when linking */ 24 25 #include <asm/arch/imx-regs.h> 26 27 /* enable passing of ATAGs */ 28 #define CONFIG_CMDLINE_TAG 29 #define CONFIG_SETUP_MEMORY_TAGS 30 #define CONFIG_INITRD_TAG 31 #define CONFIG_REVISION_TAG 32 33 /* 34 * Size of malloc() pool 35 */ 36 #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) 37 38 /* 39 * Hardware drivers 40 */ 41 42 #define CONFIG_MXC_UART 43 #define CONFIG_MXC_UART_BASE UART1_BASE 44 45 /* 46 * SPI Configs 47 * */ 48 #define CONFIG_HARD_SPI /* puts SPI: ready */ 49 50 /* 51 * MMC Configs 52 * */ 53 #define CONFIG_SYS_FSL_ESDHC_ADDR MMC_SDHC1_BASE_ADDR 54 55 /* 56 * Eth Configs 57 */ 58 #define CONFIG_MII 59 #define CONFIG_PHY_SMSC 60 61 #define CONFIG_FEC_MXC 62 #define IMX_FEC_BASE FEC_BASE_ADDR 63 #define CONFIG_ETHPRIME "FEC" 64 #define CONFIG_FEC_MXC_PHYADDR 0 65 66 /* allow to overwrite serial and ethaddr */ 67 #define CONFIG_ENV_OVERWRITE /* disable vendor parameters protection (serial#, ethaddr) */ 68 69 /*********************************************************** 70 * Command definition 71 ***********************************************************/ 72 73 /* Environment variables */ 74 75 76 #define CONFIG_LOADADDR 0x91000000 /* loadaddr env var */ 77 78 #define CONFIG_EXTRA_ENV_SETTINGS \ 79 "script=boot.scr\0" \ 80 "image=zImage\0" \ 81 "fdt_file=imx51-ts4800.dtb\0" \ 82 "fdt_addr=0x90fe0000\0" \ 83 "mmcdev=0\0" \ 84 "mmcpart=2\0" \ 85 "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ 86 "mmcargs=setenv bootargs root=${mmcroot}\0" \ 87 "addtty=setenv bootargs ${bootargs} console=ttymxc0,${baudrate}\0" \ 88 "loadbootscript=" \ 89 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 90 "bootscript=echo Running bootscript from mmc ...; " \ 91 "source\0" \ 92 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image};\0" \ 93 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 94 "mmcboot=echo Booting from mmc ...; " \ 95 "run mmcargs addtty; " \ 96 "if run loadfdt; then " \ 97 "bootz ${loadaddr} - ${fdt_addr}; " \ 98 "else " \ 99 "echo ERR: cannot load FDT; " \ 100 "fi; " 101 102 103 #define CONFIG_BOOTCOMMAND \ 104 "mmc dev ${mmcdev}; if mmc rescan; then " \ 105 "if run loadbootscript; then " \ 106 "run bootscript; " \ 107 "else " \ 108 "if run loadimage; then " \ 109 "run mmcboot; " \ 110 "fi; " \ 111 "fi; " \ 112 "fi; " 113 114 /* 115 * Miscellaneous configurable options 116 */ 117 118 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 119 120 /*----------------------------------------------------------------------- 121 * Physical Memory Map 122 */ 123 #define CONFIG_NR_DRAM_BANKS 1 124 #define PHYS_SDRAM_1 CSD0_BASE_ADDR 125 #define PHYS_SDRAM_1_SIZE (256 * 1024 * 1024) 126 127 #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1) 128 #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR) 129 #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE) 130 131 #define CONFIG_SYS_INIT_SP_OFFSET \ 132 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 133 #define CONFIG_SYS_INIT_SP_ADDR \ 134 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 135 136 /* Low level init */ 137 #define CONFIG_SYS_DDR_CLKSEL 0 138 #define CONFIG_SYS_CLKTL_CBCDR 0x59E35100 139 #define CONFIG_SYS_MAIN_PWR_ON 140 141 /*----------------------------------------------------------------------- 142 * Environment organization 143 */ 144 145 #define CONFIG_ENV_OFFSET (6 * 64 * 1024) 146 #define CONFIG_ENV_SIZE (8 * 1024) 147 #define CONFIG_SYS_MMC_ENV_DEV 0 148 149 #endif 150