bf533-stamp.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /*
  2. * U-boot - Configuration file for BF533 STAMP board
  3. */
  4. #ifndef __CONFIG_BF533_STAMP_H__
  5. #define __CONFIG_BF533_STAMP_H__
  6. #include <asm/config-pre.h>
  7. /*
  8. * Processor Settings
  9. */
  10. #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_BYPASS
  11. /*
  12. * Clock Settings
  13. * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
  14. * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
  15. */
  16. /* CONFIG_CLKIN_HZ is any value in Hz */
  17. #define CONFIG_CLKIN_HZ 11059200
  18. /* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */
  19. /* 1 = CLKIN / 2 */
  20. #define CONFIG_CLKIN_HALF 0
  21. /* PLL_BYPASS controls the BYPASS bit in PLL_CTL 0 = do not bypass */
  22. /* 1 = bypass PLL */
  23. #define CONFIG_PLL_BYPASS 0
  24. /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
  25. /* Values can range from 0-63 (where 0 means 64) */
  26. #define CONFIG_VCO_MULT 45
  27. /* CCLK_DIV controls the core clock divider */
  28. /* Values can be 1, 2, 4, or 8 ONLY */
  29. #define CONFIG_CCLK_DIV 1
  30. /* SCLK_DIV controls the system clock divider */
  31. /* Values can range from 1-15 */
  32. #define CONFIG_SCLK_DIV 6 /* note: 1.2 boards can go faster */
  33. /*
  34. * Memory Settings
  35. */
  36. #define CONFIG_MEM_ADD_WDTH 11
  37. #define CONFIG_MEM_SIZE 128
  38. #define CONFIG_EBIU_SDRRC_VAL 0x268
  39. #define CONFIG_EBIU_SDGCTL_VAL 0x911109
  40. #define CONFIG_EBIU_AMGCTL_VAL 0xFF
  41. #define CONFIG_EBIU_AMBCTL0_VAL 0xBBC3BBC3
  42. #define CONFIG_EBIU_AMBCTL1_VAL 0x99B39983
  43. #define CONFIG_SYS_MONITOR_LEN (256 * 1024)
  44. #define CONFIG_SYS_MALLOC_LEN (384 * 1024)
  45. /*
  46. * Network Settings
  47. */
  48. #define ADI_CMDS_NETWORK 1
  49. #define CONFIG_NET_MULTI
  50. #define CONFIG_SMC91111 1
  51. #define CONFIG_SMC91111_BASE 0x20300300
  52. #define SMC91111_EEPROM_INIT() \
  53. do { \
  54. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF1 | PF0); \
  55. bfin_write_FIO_FLAG_C(PF1); \
  56. bfin_write_FIO_FLAG_S(PF0); \
  57. SSYNC(); \
  58. } while (0)
  59. #define CONFIG_HOSTNAME bf533-stamp
  60. /* Uncomment next line to use fixed MAC address */
  61. /* #define CONFIG_ETHADDR 02:80:ad:20:31:b8 */
  62. /*
  63. * Flash Settings
  64. */
  65. #define CONFIG_FLASH_CFI_DRIVER
  66. #define CONFIG_SYS_FLASH_BASE 0x20000000
  67. #define CONFIG_SYS_FLASH_CFI
  68. #define CONFIG_SYS_FLASH_CFI_AMD_RESET
  69. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  70. #define CONFIG_SYS_MAX_FLASH_SECT 67
  71. /*
  72. * SPI Settings
  73. */
  74. #define CONFIG_BFIN_SPI
  75. #define CONFIG_ENV_SPI_MAX_HZ 30000000
  76. #define CONFIG_SF_DEFAULT_SPEED 30000000
  77. #define CONFIG_SPI_FLASH
  78. #define CONFIG_SPI_FLASH_ALL
  79. /*
  80. * Env Storage Settings
  81. */
  82. #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
  83. #define CONFIG_ENV_IS_IN_SPI_FLASH
  84. #define CONFIG_ENV_OFFSET 0x10000
  85. #define CONFIG_ENV_SIZE 0x2000
  86. #define CONFIG_ENV_SECT_SIZE 0x10000
  87. #else
  88. #define CONFIG_ENV_IS_IN_FLASH
  89. #define CONFIG_ENV_OFFSET 0x4000
  90. #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
  91. #define CONFIG_ENV_SIZE 0x2000
  92. #define CONFIG_ENV_SECT_SIZE 0x2000
  93. #endif
  94. #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
  95. #define ENV_IS_EMBEDDED
  96. #else
  97. #define CONFIG_ENV_IS_EMBEDDED_IN_LDR
  98. #endif
  99. #ifdef ENV_IS_EMBEDDED
  100. /* WARNING - the following is hand-optimized to fit within
  101. * the sector before the environment sector. If it throws
  102. * an error during compilation remove an object here to get
  103. * it linked after the configuration sector.
  104. */
  105. # define LDS_BOARD_TEXT \
  106. arch/blackfin/cpu/traps.o (.text .text.*); \
  107. arch/blackfin/cpu/interrupt.o (.text .text.*); \
  108. arch/blackfin/cpu/serial.o (.text .text.*); \
  109. common/dlmalloc.o (.text .text.*); \
  110. lib/crc32.o (.text .text.*); \
  111. . = DEFINED(env_offset) ? env_offset : .; \
  112. common/env_embedded.o (.text .text.*);
  113. #endif
  114. /*
  115. * I2C Settings
  116. */
  117. #define CONFIG_SOFT_I2C
  118. #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF3
  119. #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF2
  120. /*
  121. * Compact Flash / IDE / ATA Settings
  122. */
  123. /* Enabled below option for CF support */
  124. /* #define CONFIG_STAMP_CF */
  125. #if defined(CONFIG_STAMP_CF)
  126. #define CONFIG_MISC_INIT_R
  127. #define CONFIG_DOS_PARTITION 1
  128. #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */
  129. #undef CONFIG_IDE_LED /* no led for ide supported */
  130. #undef CONFIG_IDE_RESET /* no reset for ide supported */
  131. #define CONFIG_SYS_IDE_MAXBUS 1
  132. #define CONFIG_SYS_IDE_MAXDEVICE (CONFIG_SYS_IDE_MAXBUS * 1)
  133. #define CONFIG_SYS_ATA_BASE_ADDR 0x20200000
  134. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
  135. #define CONFIG_SYS_ATA_DATA_OFFSET 0x0020 /* data I/O */
  136. #define CONFIG_SYS_ATA_REG_OFFSET 0x0020 /* normal register accesses */
  137. #define CONFIG_SYS_ATA_ALT_OFFSET 0x0007 /* alternate registers */
  138. #define CONFIG_SYS_ATA_STRIDE 2
  139. #undef CONFIG_EBIU_AMBCTL1_VAL
  140. #define CONFIG_EBIU_AMBCTL1_VAL 0x99B3ffc2
  141. #endif
  142. /*
  143. * Misc Settings
  144. */
  145. #define CONFIG_RTC_BFIN
  146. #define CONFIG_UART_CONSOLE 0
  147. /* FLASH/ETHERNET uses the same async bank */
  148. #define SHARED_RESOURCES 1
  149. /* define to enable boot progress via leds */
  150. /* #define CONFIG_SHOW_BOOT_PROGRESS */
  151. /* define to enable run status via led */
  152. /* #define CONFIG_STATUS_LED */
  153. #ifdef CONFIG_STATUS_LED
  154. #define CONFIG_GPIO_LED
  155. #define CONFIG_BOARD_SPECIFIC_LED
  156. /* use LED0 to indicate booting/alive */
  157. #define STATUS_LED_BOOT 0
  158. #define STATUS_LED_BIT GPIO_PF2
  159. #define STATUS_LED_STATE STATUS_LED_ON
  160. #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 4)
  161. /* use LED1 to indicate crash */
  162. #define STATUS_LED_CRASH 1
  163. #define STATUS_LED_BIT1 GPIO_PF3
  164. #define STATUS_LED_STATE1 STATUS_LED_ON
  165. #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
  166. /* #define STATUS_LED_BIT2 GPIO_PF4 */
  167. #endif
  168. /* define to enable splash screen support */
  169. /* #define CONFIG_VIDEO */
  170. /*
  171. * Pull in common ADI header for remaining command/environment setup
  172. */
  173. #include <configs/bfin_adi_common.h>
  174. #endif