at91sam9261ek.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * (C) Copyright 2007-2008
  3. * Stelian Pop <stelian@popies.net>
  4. * Lead Tech Design <www.leadtechdesign.com>
  5. *
  6. * Configuation settings for the AT91SAM9261EK board.
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. #ifndef __CONFIG_H
  11. #define __CONFIG_H
  12. /* ARM asynchronous clock */
  13. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
  14. #define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
  15. #ifdef CONFIG_AT91SAM9G10
  16. #define CONFIG_AT91SAM9G10EK /* It's an Atmel AT91SAM9G10 EK*/
  17. #else
  18. #define CONFIG_AT91SAM9261EK /* It's an Atmel AT91SAM9261 EK*/
  19. #endif
  20. #include <asm/hardware.h>
  21. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  22. #define CONFIG_SETUP_MEMORY_TAGS
  23. #define CONFIG_INITRD_TAG
  24. #define CONFIG_SKIP_LOWLEVEL_INIT
  25. #define CONFIG_ATMEL_LEGACY
  26. #define CONFIG_SYS_TEXT_BASE 0x21f00000
  27. /*
  28. * Hardware drivers
  29. */
  30. /* LCD */
  31. #define LCD_BPP LCD_COLOR8
  32. #define CONFIG_LCD_LOGO
  33. #undef LCD_TEST_PATTERN
  34. #define CONFIG_LCD_INFO
  35. #define CONFIG_LCD_INFO_BELOW_LOGO
  36. #define CONFIG_ATMEL_LCD
  37. #ifdef CONFIG_AT91SAM9261EK
  38. #define CONFIG_ATMEL_LCD_BGR555
  39. #endif
  40. /*
  41. * BOOTP options
  42. */
  43. #define CONFIG_BOOTP_BOOTFILESIZE
  44. #define CONFIG_BOOTP_BOOTPATH
  45. #define CONFIG_BOOTP_GATEWAY
  46. #define CONFIG_BOOTP_HOSTNAME
  47. /* SDRAM */
  48. #define CONFIG_NR_DRAM_BANKS 1
  49. #define CONFIG_SYS_SDRAM_BASE 0x20000000
  50. #define CONFIG_SYS_SDRAM_SIZE 0x04000000
  51. #define CONFIG_SYS_INIT_SP_ADDR \
  52. (ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
  53. /* NAND flash */
  54. #ifdef CONFIG_CMD_NAND
  55. #define CONFIG_NAND_ATMEL
  56. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  57. #define CONFIG_SYS_NAND_BASE 0x40000000
  58. #define CONFIG_SYS_NAND_DBW_8
  59. /* our ALE is AD22 */
  60. #define CONFIG_SYS_NAND_MASK_ALE (1 << 22)
  61. /* our CLE is AD21 */
  62. #define CONFIG_SYS_NAND_MASK_CLE (1 << 21)
  63. #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
  64. #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC15
  65. #endif
  66. /* Ethernet */
  67. #define CONFIG_DRIVER_DM9000
  68. #define CONFIG_DM9000_BASE 0x30000000
  69. #define DM9000_IO CONFIG_DM9000_BASE
  70. #define DM9000_DATA (CONFIG_DM9000_BASE + 4)
  71. #define CONFIG_DM9000_USE_16BIT
  72. #define CONFIG_DM9000_NO_SROM
  73. #define CONFIG_NET_RETRY_COUNT 20
  74. #define CONFIG_RESET_PHY_R
  75. /* USB */
  76. #define CONFIG_USB_ATMEL
  77. #define CONFIG_USB_ATMEL_CLK_SEL_PLLB
  78. #define CONFIG_USB_OHCI_NEW
  79. #define CONFIG_SYS_USB_OHCI_CPU_INIT
  80. #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9261_UHP_BASE */
  81. #ifdef CONFIG_AT91SAM9G10EK
  82. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9g10"
  83. #else
  84. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9261"
  85. #endif
  86. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
  87. #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
  88. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  89. #define CONFIG_SYS_MEMTEST_END 0x23e00000
  90. #ifdef CONFIG_SYS_USE_DATAFLASH_CS0
  91. /* bootstrap + u-boot + env + linux in dataflash on CS0 */
  92. #define CONFIG_ENV_OFFSET 0x4200
  93. #define CONFIG_ENV_SIZE 0x4200
  94. #define CONFIG_ENV_SECT_SIZE 0x210
  95. #define CONFIG_ENV_SPI_MAX_HZ 15000000
  96. #define CONFIG_BOOTCOMMAND "sf probe 0; " \
  97. "sf read 0x22000000 0x84000 0x294000; " \
  98. "bootm 0x22000000"
  99. #elif CONFIG_SYS_USE_DATAFLASH_CS3
  100. /* bootstrap + u-boot + env + linux in dataflash on CS3 */
  101. #define CONFIG_ENV_OFFSET 0x4200
  102. #define CONFIG_ENV_SIZE 0x4200
  103. #define CONFIG_ENV_SECT_SIZE 0x210
  104. #define CONFIG_ENV_SPI_MAX_HZ 15000000
  105. #define CONFIG_BOOTCOMMAND "sf probe 0:3; " \
  106. "sf read 0x22000000 0x84000 0x294000; " \
  107. "bootm 0x22000000"
  108. #else /* CONFIG_SYS_USE_NANDFLASH */
  109. /* bootstrap + u-boot + env + linux in nandflash */
  110. #define CONFIG_ENV_OFFSET 0x120000
  111. #define CONFIG_ENV_OFFSET_REDUND 0x100000
  112. #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
  113. #define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 0x300000; bootm"
  114. #endif
  115. #define CONFIG_SYS_LONGHELP
  116. #define CONFIG_CMDLINE_EDITING
  117. #define CONFIG_AUTO_COMPLETE
  118. /*
  119. * Size of malloc() pool
  120. */
  121. #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
  122. #endif