blackstamp.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * U-Boot - Configuration file for BlackStamp board
  3. * Configuration by Ben Matthews for UR LLE using bf533-stamp.h
  4. * as a template
  5. * See http://blackfin.uclinux.org/gf/project/blackstamp/
  6. */
  7. #ifndef __CONFIG_BLACKSTAMP_H__
  8. #define __CONFIG_BLACKSTAMP_H__
  9. #include <asm/config-pre.h>
  10. /*
  11. * Debugging: Set these options if you're having problems
  12. */
  13. /*
  14. * #define CONFIG_DEBUG_EARLY_SERIAL
  15. * #define DEBUG
  16. * #define CONFIG_DEBUG_DUMP
  17. * #define CONFIG_DEBUG_DUMP_SYMS
  18. */
  19. #define CONFIG_PANIC_HANG 0
  20. /* CPU Options
  21. * Be sure to set the Silicon Revision Correctly
  22. */
  23. #define CONFIG_BFIN_CPU bf532-0.5
  24. #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_SPI_MASTER
  25. /*
  26. * Board settings
  27. */
  28. #define CONFIG_SMC91111 1
  29. #define CONFIG_SMC91111_BASE 0x20300300
  30. /* FLASH/ETHERNET uses the same address range
  31. * Depending on what you have the CPLD doing
  32. * this probably isn't needed
  33. */
  34. #define SHARED_RESOURCES 1
  35. /* Is I2C bit-banged? */
  36. /*
  37. * Clock Settings
  38. * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
  39. * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
  40. */
  41. /* CONFIG_CLKIN_HZ is any value in Hz */
  42. #define CONFIG_CLKIN_HZ 25000000
  43. /* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */
  44. /* 1 = CLKIN / 2 */
  45. #define CONFIG_CLKIN_HALF 0
  46. /* PLL_BYPASS controls the BYPASS bit in PLL_CTL 0 = do not bypass */
  47. /* 1 = bypass PLL */
  48. #define CONFIG_PLL_BYPASS 0
  49. /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
  50. /* Values can range from 0-63 (where 0 means 64) */
  51. #define CONFIG_VCO_MULT 16
  52. /* CCLK_DIV controls the core clock divider */
  53. /* Values can be 1, 2, 4, or 8 ONLY */
  54. #define CONFIG_CCLK_DIV 1
  55. /* SCLK_DIV controls the system clock divider */
  56. /* Values can range from 1-15 */
  57. #define CONFIG_SCLK_DIV 3
  58. /*
  59. * Network settings
  60. */
  61. #ifdef CONFIG_SMC91111
  62. #define CONFIG_IPADDR 192.168.0.15
  63. #define CONFIG_NETMASK 255.255.255.0
  64. #define CONFIG_GATEWAYIP 192.168.0.1
  65. #define CONFIG_SERVERIP 192.168.0.2
  66. #define CONFIG_HOSTNAME blackstamp
  67. #define CONFIG_ROOTPATH "/checkout/uClinux-dist/romfs"
  68. #define CONFIG_SYS_AUTOLOAD "no"
  69. #endif
  70. #define CONFIG_ENV_IS_IN_SPI_FLASH
  71. #define CONFIG_ENV_OFFSET 0x40000
  72. #define CONFIG_ENV_SIZE 0x2000
  73. #define CONFIG_ENV_SECT_SIZE 0x40000
  74. /*
  75. * SDRAM settings & memory map
  76. */
  77. #define CONFIG_MEM_SIZE 64 /* 128, 64, 32, 16 */
  78. #define CONFIG_MEM_ADD_WDTH 10 /* 8, 9, 10, 11 */
  79. #define CONFIG_SYS_MONITOR_LEN (256 << 10)
  80. #define CONFIG_SYS_MALLOC_LEN (384 << 10)
  81. /*
  82. * Command settings
  83. */
  84. #define CONFIG_SYS_LONGHELP 1
  85. #define CONFIG_CMDLINE_EDITING 1
  86. #define CONFIG_AUTO_COMPLETE 1
  87. #define CONFIG_ENV_OVERWRITE 1
  88. #define CONFIG_CMD_BOOTLDR
  89. #define CONFIG_CMD_CPLBINFO
  90. #define CONFIG_CMD_DATE
  91. #define CONFIG_BOOTCOMMAND "run ramboot"
  92. #define CONFIG_BOOTARGS \
  93. "root=/dev/mtdblock0 rw " \
  94. "clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
  95. "earlyprintk=" \
  96. "serial," \
  97. "uart" __stringify(CONFIG_UART_CONSOLE) "," \
  98. __stringify(CONFIG_BAUDRATE) " " \
  99. "console=ttyBF0," __stringify(CONFIG_BAUDRATE)
  100. #if defined(CONFIG_CMD_NET)
  101. # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
  102. # define UBOOT_ENV_FILE "u-boot.bin"
  103. # else
  104. # define UBOOT_ENV_FILE "u-boot.ldr"
  105. # endif
  106. # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
  107. # ifdef CONFIG_SPI
  108. # define UBOOT_ENV_UPDATE \
  109. "eeprom write $(loadaddr) 0x0 $(filesize)"
  110. # else
  111. # define UBOOT_ENV_UPDATE \
  112. "sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
  113. "sf erase 0 0x40000;" \
  114. "sf write $(loadaddr) 0 $(filesize)"
  115. # endif
  116. # else
  117. # define UBOOT_ENV_UPDATE \
  118. "protect off 0x20000000 0x2003FFFF;" \
  119. "erase 0x20000000 0x2003FFFF;" \
  120. "cp.b $(loadaddr) 0x20000000 $(filesize)"
  121. # endif
  122. # define NETWORK_ENV_SETTINGS \
  123. "ubootfile=" UBOOT_ENV_FILE "\0" \
  124. "update=" \
  125. "tftp $(loadaddr) $(ubootfile);" \
  126. UBOOT_ENV_UPDATE \
  127. "\0" \
  128. "addip=set bootargs $(bootargs) " \
  129. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
  130. "$(hostname):eth0:off" \
  131. "\0" \
  132. "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
  133. "ramboot=" \
  134. "tftp $(loadaddr) uImage;" \
  135. "run ramargs;" \
  136. "run addip;" \
  137. "bootm" \
  138. "\0" \
  139. "nfsargs=set bootargs " \
  140. "root=/dev/nfs rw " \
  141. "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
  142. "\0" \
  143. "nfsboot=" \
  144. "tftp $(loadaddr) vmImage;" \
  145. "run nfsargs;" \
  146. "run addip;" \
  147. "bootm" \
  148. "\0"
  149. #else
  150. # define NETWORK_ENV_SETTINGS
  151. #endif
  152. /*
  153. * Console settings
  154. */
  155. #define CONFIG_BAUDRATE 57600
  156. #define CONFIG_LOADS_ECHO 1
  157. #define CONFIG_UART_CONSOLE 0
  158. #define CONFIG_BFIN_SERIAL
  159. /*
  160. * I2C settings
  161. * By default PF2 is used as SDA and PF3 as SCL on the Stamp board
  162. * Located on the expansion connector on pins 86/85
  163. * Note these pins are arbitrarily chosen because we aren't using
  164. * them yet. You can (and probably should) change these values!
  165. */
  166. #ifdef CONFIG_SYS_I2C_SOFT
  167. #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF9
  168. #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF8
  169. #define CONFIG_SYS_I2C_SOFT_SPEED 50000
  170. #define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE
  171. #endif
  172. /*
  173. * Miscellaneous configurable options
  174. */
  175. #define CONFIG_RTC_BFIN 1
  176. /*
  177. * Serial Flash Infomation
  178. */
  179. #define CONFIG_BFIN_SPI
  180. /* For the M25P64 SCK Should be Kept < 15Mhz */
  181. #define CONFIG_ENV_SPI_MAX_HZ 15000000
  182. #define CONFIG_SF_DEFAULT_SPEED 15000000
  183. /*
  184. * FLASH organization and environment definitions
  185. */
  186. #define CONFIG_EBIU_AMGCTL_VAL 0xFF
  187. #define CONFIG_EBIU_AMBCTL0_VAL 0xBBC3BBC3
  188. #define CONFIG_EBIU_AMBCTL1_VAL 0x99B39983
  189. #define CONFIG_EBIU_SDRRC_VAL 0x268
  190. #define CONFIG_EBIU_SDGCTL_VAL 0x911109
  191. /* Even though Rev C boards have Parallel Flash
  192. * We aren't supporting it. Newer versions of the
  193. * hardware don't support Parallel Flash at all.
  194. */
  195. #define CONFIG_SYS_NO_FLASH
  196. #undef CONFIG_CMD_JFFS2
  197. #endif