at91sam9x5ek.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /*
  2. * Copyright (C) 2012 Atmel Corporation
  3. *
  4. * Configuation settings for the AT91SAM9X5EK board.
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef __CONFIG_H__
  25. #define __CONFIG_H__
  26. #include <asm/hardware.h>
  27. /* ARM asynchronous clock */
  28. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
  29. #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */
  30. #define CONFIG_SYS_HZ 1000
  31. #define CONFIG_AT91SAM9X5EK
  32. #define CONFIG_AT91FAMILY
  33. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  34. #define CONFIG_SETUP_MEMORY_TAGS
  35. #define CONFIG_INITRD_TAG
  36. #define CONFIG_SKIP_LOWLEVEL_INIT
  37. #define CONFIG_BOARD_EARLY_INIT_F
  38. #define CONFIG_DISPLAY_CPUINFO
  39. #define CONFIG_OF_LIBFDT
  40. /* general purpose I/O */
  41. #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
  42. #define CONFIG_AT91_GPIO
  43. /* serial console */
  44. #define CONFIG_ATMEL_USART
  45. #define CONFIG_USART_BASE ATMEL_BASE_DBGU
  46. #define CONFIG_USART_ID ATMEL_ID_SYS
  47. /* LCD */
  48. #define CONFIG_LCD
  49. #define LCD_BPP LCD_COLOR16
  50. #define LCD_OUTPUT_BPP 24
  51. #define CONFIG_LCD_LOGO
  52. #undef LCD_TEST_PATTERN
  53. #define CONFIG_LCD_INFO
  54. #define CONFIG_LCD_INFO_BELOW_LOGO
  55. #define CONFIG_SYS_WHITE_ON_BLACK
  56. #define CONFIG_ATMEL_HLCD
  57. #define CONFIG_ATMEL_LCD_RGB565
  58. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  59. #define CONFIG_BOOTDELAY 3
  60. /*
  61. * BOOTP options
  62. */
  63. #define CONFIG_BOOTP_BOOTFILESIZE
  64. #define CONFIG_BOOTP_BOOTPATH
  65. #define CONFIG_BOOTP_GATEWAY
  66. #define CONFIG_BOOTP_HOSTNAME
  67. /*
  68. * Command line configuration.
  69. */
  70. #include <config_cmd_default.h>
  71. #undef CONFIG_CMD_FPGA
  72. #undef CONFIG_CMD_IMI
  73. #undef CONFIG_CMD_IMLS
  74. #undef CONFIG_CMD_LOADS
  75. #define CONFIG_CMD_PING
  76. #define CONFIG_CMD_DHCP
  77. #define CONFIG_CMD_NAND
  78. #define CONFIG_CMD_SF
  79. #define CONFIG_CMD_MMC
  80. #define CONFIG_CMD_FAT
  81. #define CONFIG_CMD_USB
  82. /*
  83. * define CONFIG_USB_EHCI to enable USB Hi-Speed (aka 2.0)
  84. * NB: in this case, USB 1.1 devices won't be recognized.
  85. */
  86. /* SDRAM */
  87. #define CONFIG_NR_DRAM_BANKS 1
  88. #define CONFIG_SYS_SDRAM_BASE 0x20000000
  89. #define CONFIG_SYS_SDRAM_SIZE 0x08000000 /* 128 megs */
  90. #define CONFIG_SYS_INIT_SP_ADDR \
  91. (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
  92. /* DataFlash */
  93. #ifdef CONFIG_CMD_SF
  94. #define CONFIG_ATMEL_SPI
  95. #define CONFIG_SPI_FLASH
  96. #define CONFIG_SPI_FLASH_ATMEL
  97. #define CONFIG_SF_DEFAULT_SPEED 30000000
  98. #endif
  99. /* no NOR flash */
  100. #define CONFIG_SYS_NO_FLASH
  101. /* NAND flash */
  102. #ifdef CONFIG_CMD_NAND
  103. #define CONFIG_NAND_ATMEL
  104. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  105. #define CONFIG_SYS_NAND_BASE 0x40000000
  106. #define CONFIG_SYS_NAND_DBW_8 1
  107. /* our ALE is AD21 */
  108. #define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
  109. /* our CLE is AD22 */
  110. #define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
  111. #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4
  112. #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5
  113. /* PMECC & PMERRLOC */
  114. #define CONFIG_ATMEL_NAND_HWECC 1
  115. #define CONFIG_ATMEL_NAND_HW_PMECC 1
  116. #define CONFIG_PMECC_CAP 2
  117. #define CONFIG_PMECC_SECTOR_SIZE 512
  118. #define CONFIG_PMECC_INDEX_TABLE_OFFSET 0x8000
  119. #define CONFIG_MTD_DEVICE
  120. #define CONFIG_CMD_MTDPARTS
  121. #define CONFIG_MTD_PARTITIONS
  122. #define CONFIG_RBTREE
  123. #define CONFIG_LZO
  124. #define CONFIG_CMD_UBI
  125. #define CONFIG_CMD_UBIFS
  126. #endif
  127. /* MMC */
  128. #ifdef CONFIG_CMD_MMC
  129. #define CONFIG_MMC
  130. #define CONFIG_GENERIC_MMC
  131. #define CONFIG_GENERIC_ATMEL_MCI
  132. #endif
  133. /* FAT */
  134. #ifdef CONFIG_CMD_FAT
  135. #define CONFIG_DOS_PARTITION
  136. #endif
  137. /* Ethernet */
  138. #define CONFIG_MACB
  139. #define CONFIG_RMII
  140. #define CONFIG_NET_RETRY_COUNT 20
  141. #define CONFIG_MACB_SEARCH_PHY
  142. /* USB */
  143. #ifdef CONFIG_CMD_USB
  144. #ifdef CONFIG_USB_EHCI
  145. #define CONFIG_USB_EHCI_ATMEL
  146. #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
  147. #else
  148. #define CONFIG_USB_OHCI_NEW
  149. #define CONFIG_SYS_USB_OHCI_CPU_INIT
  150. #define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
  151. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9x5"
  152. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
  153. #endif
  154. #define CONFIG_USB_ATMEL
  155. #define CONFIG_USB_STORAGE
  156. #endif
  157. #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
  158. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  159. #define CONFIG_SYS_MEMTEST_END 0x26e00000
  160. #ifdef CONFIG_SYS_USE_NANDFLASH
  161. /* bootstrap + u-boot + env + linux in nandflash */
  162. #define CONFIG_ENV_IS_IN_NAND
  163. #define CONFIG_ENV_OFFSET 0xc0000
  164. #define CONFIG_ENV_OFFSET_REDUND 0x100000
  165. #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
  166. #define CONFIG_BOOTCOMMAND "nand read " \
  167. "0x22000000 0x200000 0x300000; " \
  168. "bootm 0x22000000"
  169. #else
  170. #ifdef CONFIG_SYS_USE_SPIFLASH
  171. /* bootstrap + u-boot + env + linux in spi flash */
  172. #define CONFIG_ENV_IS_IN_SPI_FLASH
  173. #define CONFIG_ENV_OFFSET 0x5000
  174. #define CONFIG_ENV_SIZE 0x3000
  175. #define CONFIG_ENV_SECT_SIZE 0x1000
  176. #define CONFIG_ENV_SPI_MAX_HZ 30000000
  177. #define CONFIG_BOOTCOMMAND "sf probe 0; " \
  178. "sf read 0x22000000 0x100000 0x300000; " \
  179. "bootm 0x22000000"
  180. #endif
  181. #endif
  182. #define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
  183. "mtdparts=atmel_nand:" \
  184. "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
  185. "root=/dev/mtdblock1 rw " \
  186. "rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"
  187. #define CONFIG_BAUDRATE 115200
  188. #define CONFIG_SYS_PROMPT "U-Boot> "
  189. #define CONFIG_SYS_CBSIZE 256
  190. #define CONFIG_SYS_MAXARGS 16
  191. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) \
  192. + 16)
  193. #define CONFIG_SYS_LONGHELP
  194. #define CONFIG_CMDLINE_EDITING
  195. #define CONFIG_AUTO_COMPLETE
  196. #define CONFIG_SYS_HUSH_PARSER
  197. /*
  198. * Size of malloc() pool
  199. */
  200. #define CONFIG_SYS_MALLOC_LEN (512 * 1024 + 0x1000)
  201. #ifdef CONFIG_USE_IRQ
  202. #error CONFIG_USE_IRQ not supported
  203. #endif
  204. #endif