John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2009 |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
| 10 | /* |
| 11 | * High Level Configuration Options |
| 12 | * (easy to change) |
| 13 | */ |
| 14 | #define CONFIG_U8500 |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 15 | |
| 16 | #define CONFIG_SYS_MEMTEST_START 0x00000000 |
| 17 | #define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 18 | |
| 19 | #define CONFIG_BOARD_EARLY_INIT_F |
Helmut Raiger | d5a184b | 2011-10-20 04:19:47 +0000 | [diff] [blame] | 20 | #define CONFIG_BOARD_LATE_INIT |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * Size of malloc() pool |
| 24 | */ |
| 25 | #ifdef CONFIG_BOOT_SRAM |
| 26 | #define CONFIG_ENV_SIZE (32*1024) |
| 27 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 64*1024) |
| 28 | #else |
| 29 | #define CONFIG_ENV_SIZE (128*1024) |
| 30 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256*1024) |
| 31 | #endif |
| 32 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */ |
| 33 | |
| 34 | /* |
| 35 | * PL011 Configuration |
| 36 | */ |
| 37 | #define CONFIG_PL011_SERIAL |
| 38 | #define CONFIG_PL011_SERIAL_RLCR |
| 39 | #define CONFIG_PL011_SERIAL_FLUSH_ON_INIT |
| 40 | |
| 41 | /* |
| 42 | * U8500 UART registers base for 3 serial devices |
| 43 | */ |
| 44 | #define CFG_UART0_BASE 0x80120000 |
| 45 | #define CFG_UART1_BASE 0x80121000 |
| 46 | #define CFG_UART2_BASE 0x80007000 |
| 47 | #define CFG_SERIAL0 CFG_UART0_BASE |
| 48 | #define CFG_SERIAL1 CFG_UART1_BASE |
| 49 | #define CFG_SERIAL2 CFG_UART2_BASE |
| 50 | #define CONFIG_PL011_CLOCK 38400000 |
| 51 | #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1, \ |
| 52 | (void *)CFG_SERIAL2 } |
| 53 | #define CONFIG_CONS_INDEX 2 |
| 54 | #define CONFIG_BAUDRATE 115200 |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 55 | |
| 56 | /* |
| 57 | * Devices and file systems |
| 58 | */ |
| 59 | #define CONFIG_MMC |
| 60 | #define CONFIG_GENERIC_MMC |
| 61 | #define CONFIG_DOS_PARTITION |
| 62 | |
| 63 | /* |
| 64 | * Commands |
| 65 | */ |
| 66 | #define CONFIG_CMD_MEMORY |
| 67 | #define CONFIG_CMD_BOOTD |
| 68 | #define CONFIG_CMD_BDI |
| 69 | #define CONFIG_CMD_IMI |
| 70 | #define CONFIG_CMD_MISC |
| 71 | #define CONFIG_CMD_RUN |
| 72 | #define CONFIG_CMD_ECHO |
| 73 | #define CONFIG_CMD_CONSOLE |
| 74 | #define CONFIG_CMD_LOADS |
| 75 | #define CONFIG_CMD_LOADB |
| 76 | #define CONFIG_CMD_MMC |
| 77 | #define CONFIG_CMD_FAT |
| 78 | #define CONFIG_CMD_EXT2 |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 79 | #define CONFIG_CMD_SOURCE |
| 80 | #define CONFIG_CMD_I2C |
| 81 | |
| 82 | #ifndef CONFIG_BOOTDELAY |
| 83 | #define CONFIG_BOOTDELAY 1 |
| 84 | #endif |
| 85 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ |
| 86 | |
| 87 | #undef CONFIG_BOOTARGS |
| 88 | #define CONFIG_BOOTCOMMAND "run emmcboot" |
| 89 | |
| 90 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 91 | "verify=n\0" \ |
| 92 | "loadaddr=0x00100000\0" \ |
| 93 | "console=ttyAMA2,115200n8\0" \ |
| 94 | "memargs256=mem=96M@0 mem_modem=32M@96M mem=30M@128M " \ |
| 95 | "pmem=22M@158M pmem_hwb=44M@180M mem_mali=32@224M\0" \ |
| 96 | "memargs512=mem=96M@0 mem_modem=32M@96M mem=44M@128M " \ |
| 97 | "pmem=22M@172M mem=30M@194M mem_mali=32M@224M " \ |
| 98 | "pmem_hwb=54M@256M mem=202M@310M\0" \ |
| 99 | "commonargs=setenv bootargs cachepolicy=writealloc noinitrd " \ |
| 100 | "init=init " \ |
| 101 | "board_id=${board_id} " \ |
| 102 | "logo.${logo} " \ |
| 103 | "startup_graphics=${startup_graphics}\0" \ |
| 104 | "emmcargs=setenv bootargs ${bootargs} " \ |
| 105 | "root=/dev/mmcblk0p2 " \ |
| 106 | "rootdelay=1\0" \ |
| 107 | "addcons=setenv bootargs ${bootargs} " \ |
| 108 | "console=${console}\0" \ |
| 109 | "emmcboot=echo Booting from eMMC ...; " \ |
| 110 | "run commonargs emmcargs addcons memargs;" \ |
| 111 | "mmc read 0 ${loadaddr} 0xA0000 0x4000;" \ |
| 112 | "bootm ${loadaddr}\0" \ |
| 113 | "flash=mmc init 1;fatload mmc 1 ${loadaddr} flash.scr;" \ |
| 114 | "source ${loadaddr}\0" \ |
| 115 | "loaduimage=mmc init 1;fatload mmc 1 ${loadaddr} uImage\0" \ |
| 116 | "usbtty=cdc_acm\0" \ |
| 117 | "stdout=serial,usbtty\0" \ |
| 118 | "stdin=serial,usbtty\0" \ |
| 119 | "stderr=serial,usbtty\0" |
| 120 | |
| 121 | /* |
| 122 | * Miscellaneous configurable options |
| 123 | */ |
| 124 | |
| 125 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 126 | #define CONFIG_SYS_PROMPT "U8500 $ " /* Monitor Command Prompt */ |
| 127 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 128 | |
| 129 | /* Print Buffer Size */ |
| 130 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ |
| 131 | + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 132 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
| 133 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */ |
| 134 | |
| 135 | #undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */ |
| 136 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ |
| 137 | #define CONFIG_SYS_LOADS_BAUD_CHANGE |
| 138 | |
| 139 | #define CONFIG_SYS_HUSH_PARSER |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 140 | #define CONFIG_CMDLINE_EDITING |
| 141 | |
| 142 | #define CONFIG_SETUP_MEMORY_TAGS 2 |
| 143 | #define CONFIG_INITRD_TAG |
| 144 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
| 145 | |
| 146 | /* |
| 147 | * I2C |
| 148 | */ |
| 149 | #define CONFIG_U8500_I2C |
| 150 | #undef CONFIG_HARD_I2C /* I2C with hardware support */ |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 151 | #define CONFIG_I2C_MULTI_BUS |
| 152 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 153 | #define CONFIG_SYS_I2C_SLAVE 0 /* slave addr of controller */ |
| 154 | #define CONFIG_SYS_U8500_I2C0_BASE 0x80004000 |
| 155 | #define CONFIG_SYS_U8500_I2C1_BASE 0x80122000 |
| 156 | #define CONFIG_SYS_U8500_I2C2_BASE 0x80128000 |
| 157 | #define CONFIG_SYS_U8500_I2C3_BASE 0x80110000 |
| 158 | #define CONFIG_SYS_U8500_I2C_BUS_MAX 4 |
| 159 | |
| 160 | #define CONFIG_SYS_I2C_GPIOE_ADDR 0x42 /* GPIO expander chip addr */ |
| 161 | #define CONFIG_TC35892_GPIO |
John Rigby | 25a3362 | 2011-04-19 10:42:42 +0000 | [diff] [blame] | 162 | |
| 163 | /* |
| 164 | * Physical Memory Map |
| 165 | */ |
| 166 | #define CONFIG_NR_DRAM_BANKS 1 |
| 167 | #define PHYS_SDRAM_1 0x00000000 /* DDR-SDRAM Bank #1 */ |
| 168 | #define PHYS_SDRAM_SIZE_1 0x20000000 /* 512 MB */ |
| 169 | |
| 170 | /* |
| 171 | * additions for new relocation code |
| 172 | */ |
| 173 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 174 | #define CONFIG_SYS_INIT_RAM_SIZE 0x100000 |
| 175 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \ |
| 176 | CONFIG_SYS_INIT_RAM_SIZE - \ |
| 177 | GENERATED_GBL_DATA_SIZE) |
| 178 | #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET |
| 179 | |
| 180 | /* landing address before relocation */ |
| 181 | #ifndef CONFIG_SYS_TEXT_BASE |
| 182 | #define CONFIG_SYS_TEXT_BASE 0x0 |
| 183 | #endif |
| 184 | |
| 185 | /* |
| 186 | * MMC related configs |
| 187 | * NB Only externa SD slot is currently supported |
| 188 | */ |
| 189 | #define MMC_BLOCK_SIZE 512 |
| 190 | #define CONFIG_ARM_PL180_MMCI |
| 191 | #define CONFIG_ARM_PL180_MMCI_BASE 0x80126000 /* MMC base for 8500 */ |
| 192 | #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000 |
| 193 | #define CONFIG_MMC_DEV_NUM 1 |
| 194 | |
| 195 | #define CONFIG_CMD_ENV |
| 196 | #define CONFIG_CMD_SAVEENV /* CMD_ENV is obsolete but used in env_emmc.c */ |
| 197 | #define CONFIG_ENV_IS_IN_MMC |
| 198 | #define CONFIG_ENV_OFFSET 0x13F80000 |
| 199 | #define CONFIG_SYS_MMC_ENV_DEV 0 /* SLOT2: eMMC */ |
| 200 | |
| 201 | /* |
| 202 | * FLASH and environment organization |
| 203 | */ |
| 204 | #define CONFIG_SYS_NO_FLASH |
| 205 | |
| 206 | /* |
| 207 | * base register values for U8500 |
| 208 | */ |
| 209 | #define CFG_PRCMU_BASE 0x80157000 /* Power, reset and clock |
| 210 | management unit */ |
| 211 | #define CFG_FSMC_BASE 0x80000000 /* FSMC Controller */ |
| 212 | |
| 213 | #endif /* __CONFIG_H */ |