bf533-stamp.h 5.7 KB

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