u8500_href.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2009
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. /*
  25. * High Level Configuration Options
  26. * (easy to change)
  27. */
  28. #define CONFIG_U8500
  29. #define CONFIG_L2_OFF
  30. #define CONFIG_SYS_MEMTEST_START 0x00000000
  31. #define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF
  32. #define CONFIG_SYS_HZ 1000 /* must be 1000 */
  33. #define CONFIG_BOARD_EARLY_INIT_F
  34. #define CONFIG_BOARD_LATE_INIT
  35. /*
  36. * Size of malloc() pool
  37. */
  38. #ifdef CONFIG_BOOT_SRAM
  39. #define CONFIG_ENV_SIZE (32*1024)
  40. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 64*1024)
  41. #else
  42. #define CONFIG_ENV_SIZE (128*1024)
  43. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256*1024)
  44. #endif
  45. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */
  46. /*
  47. * PL011 Configuration
  48. */
  49. #define CONFIG_PL011_SERIAL
  50. #define CONFIG_PL011_SERIAL_RLCR
  51. #define CONFIG_PL011_SERIAL_FLUSH_ON_INIT
  52. /*
  53. * U8500 UART registers base for 3 serial devices
  54. */
  55. #define CFG_UART0_BASE 0x80120000
  56. #define CFG_UART1_BASE 0x80121000
  57. #define CFG_UART2_BASE 0x80007000
  58. #define CFG_SERIAL0 CFG_UART0_BASE
  59. #define CFG_SERIAL1 CFG_UART1_BASE
  60. #define CFG_SERIAL2 CFG_UART2_BASE
  61. #define CONFIG_PL011_CLOCK 38400000
  62. #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1, \
  63. (void *)CFG_SERIAL2 }
  64. #define CONFIG_CONS_INDEX 2
  65. #define CONFIG_BAUDRATE 115200
  66. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  67. /*
  68. * Devices and file systems
  69. */
  70. #define CONFIG_MMC
  71. #define CONFIG_GENERIC_MMC
  72. #define CONFIG_DOS_PARTITION
  73. /*
  74. * Commands
  75. */
  76. #define CONFIG_CMD_MEMORY
  77. #define CONFIG_CMD_BOOTD
  78. #define CONFIG_CMD_BDI
  79. #define CONFIG_CMD_IMI
  80. #define CONFIG_CMD_MISC
  81. #define CONFIG_CMD_RUN
  82. #define CONFIG_CMD_ECHO
  83. #define CONFIG_CMD_CONSOLE
  84. #define CONFIG_CMD_LOADS
  85. #define CONFIG_CMD_LOADB
  86. #define CONFIG_CMD_MMC
  87. #define CONFIG_CMD_FAT
  88. #define CONFIG_CMD_EXT2
  89. #define CONFIG_CMD_SOURCE
  90. #define CONFIG_CMD_I2C
  91. #ifndef CONFIG_BOOTDELAY
  92. #define CONFIG_BOOTDELAY 1
  93. #endif
  94. #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */
  95. #undef CONFIG_BOOTARGS
  96. #define CONFIG_BOOTCOMMAND "run emmcboot"
  97. #define CONFIG_EXTRA_ENV_SETTINGS \
  98. "verify=n\0" \
  99. "loadaddr=0x00100000\0" \
  100. "console=ttyAMA2,115200n8\0" \
  101. "memargs256=mem=96M@0 mem_modem=32M@96M mem=30M@128M " \
  102. "pmem=22M@158M pmem_hwb=44M@180M mem_mali=32@224M\0" \
  103. "memargs512=mem=96M@0 mem_modem=32M@96M mem=44M@128M " \
  104. "pmem=22M@172M mem=30M@194M mem_mali=32M@224M " \
  105. "pmem_hwb=54M@256M mem=202M@310M\0" \
  106. "commonargs=setenv bootargs cachepolicy=writealloc noinitrd " \
  107. "init=init " \
  108. "board_id=${board_id} " \
  109. "logo.${logo} " \
  110. "startup_graphics=${startup_graphics}\0" \
  111. "emmcargs=setenv bootargs ${bootargs} " \
  112. "root=/dev/mmcblk0p2 " \
  113. "rootdelay=1\0" \
  114. "addcons=setenv bootargs ${bootargs} " \
  115. "console=${console}\0" \
  116. "emmcboot=echo Booting from eMMC ...; " \
  117. "run commonargs emmcargs addcons memargs;" \
  118. "mmc read 0 ${loadaddr} 0xA0000 0x4000;" \
  119. "bootm ${loadaddr}\0" \
  120. "flash=mmc init 1;fatload mmc 1 ${loadaddr} flash.scr;" \
  121. "source ${loadaddr}\0" \
  122. "loaduimage=mmc init 1;fatload mmc 1 ${loadaddr} uImage\0" \
  123. "usbtty=cdc_acm\0" \
  124. "stdout=serial,usbtty\0" \
  125. "stdin=serial,usbtty\0" \
  126. "stderr=serial,usbtty\0"
  127. /*
  128. * Miscellaneous configurable options
  129. */
  130. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  131. #define CONFIG_SYS_PROMPT "U8500 $ " /* Monitor Command Prompt */
  132. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  133. /* Print Buffer Size */
  134. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
  135. + sizeof(CONFIG_SYS_PROMPT) + 16)
  136. #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
  137. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */
  138. #undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */
  139. #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
  140. #define CONFIG_SYS_LOADS_BAUD_CHANGE
  141. #define CONFIG_SYS_HUSH_PARSER
  142. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  143. #define CONFIG_CMDLINE_EDITING
  144. #define CONFIG_SETUP_MEMORY_TAGS 2
  145. #define CONFIG_INITRD_TAG
  146. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  147. /*
  148. * I2C
  149. */
  150. #define CONFIG_U8500_I2C
  151. #undef CONFIG_HARD_I2C /* I2C with hardware support */
  152. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  153. #define CONFIG_I2C_MULTI_BUS
  154. #define CONFIG_SYS_I2C_SPEED 100000
  155. #define CONFIG_SYS_I2C_SLAVE 0 /* slave addr of controller */
  156. #define CONFIG_SYS_U8500_I2C0_BASE 0x80004000
  157. #define CONFIG_SYS_U8500_I2C1_BASE 0x80122000
  158. #define CONFIG_SYS_U8500_I2C2_BASE 0x80128000
  159. #define CONFIG_SYS_U8500_I2C3_BASE 0x80110000
  160. #define CONFIG_SYS_U8500_I2C_BUS_MAX 4
  161. #define CONFIG_SYS_I2C_GPIOE_ADDR 0x42 /* GPIO expander chip addr */
  162. #define CONFIG_TC35892_GPIO
  163. /*
  164. * Stack sizes
  165. *
  166. * The stack sizes are set up in start.S using the settings below
  167. */
  168. #ifdef CONFIG_USE_IRQ
  169. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  170. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  171. #endif
  172. /*
  173. * Physical Memory Map
  174. */
  175. #define CONFIG_NR_DRAM_BANKS 1
  176. #define PHYS_SDRAM_1 0x00000000 /* DDR-SDRAM Bank #1 */
  177. #define PHYS_SDRAM_SIZE_1 0x20000000 /* 512 MB */
  178. /*
  179. * additions for new relocation code
  180. */
  181. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  182. #define CONFIG_SYS_INIT_RAM_SIZE 0x100000
  183. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
  184. CONFIG_SYS_INIT_RAM_SIZE - \
  185. GENERATED_GBL_DATA_SIZE)
  186. #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  187. /* landing address before relocation */
  188. #ifndef CONFIG_SYS_TEXT_BASE
  189. #define CONFIG_SYS_TEXT_BASE 0x0
  190. #endif
  191. /*
  192. * MMC related configs
  193. * NB Only externa SD slot is currently supported
  194. */
  195. #define MMC_BLOCK_SIZE 512
  196. #define CONFIG_ARM_PL180_MMCI
  197. #define CONFIG_ARM_PL180_MMCI_BASE 0x80126000 /* MMC base for 8500 */
  198. #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
  199. #define CONFIG_MMC_DEV_NUM 1
  200. #define CONFIG_CMD_ENV
  201. #define CONFIG_CMD_SAVEENV /* CMD_ENV is obsolete but used in env_emmc.c */
  202. #define CONFIG_ENV_IS_IN_MMC
  203. #define CONFIG_ENV_OFFSET 0x13F80000
  204. #define CONFIG_SYS_MMC_ENV_DEV 0 /* SLOT2: eMMC */
  205. /*
  206. * FLASH and environment organization
  207. */
  208. #define CONFIG_SYS_NO_FLASH
  209. /*
  210. * base register values for U8500
  211. */
  212. #define CFG_PRCMU_BASE 0x80157000 /* Power, reset and clock
  213. management unit */
  214. #define CFG_FSMC_BASE 0x80000000 /* FSMC Controller */
  215. #endif /* __CONFIG_H */