bf537-srv1.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /*
  2. * U-boot - Configuration file for CSP Minotaur board
  3. *
  4. * Thu Oct 25 15:30:44 CEST 2007 <hackfin@section5.ch>
  5. * Minotaur config, brushed up for official uClinux dist.
  6. * Parallel flash support disabled, SPI flash boot command
  7. * added ('run flashboot').
  8. *
  9. * Flash image map:
  10. *
  11. * 0x00000000 u-boot bootstrap
  12. * 0x00010000 environment
  13. * 0x00020000 u-boot code
  14. * 0x00030000 uImage.initramfs
  15. *
  16. */
  17. #ifndef __CONFIG_BF537_SRV1_H__
  18. #define __CONFIG_BF537_SRV1_H__
  19. #include <asm/config-pre.h>
  20. /*
  21. * Processor Settings
  22. */
  23. #define CONFIG_BFIN_CPU bf537-0.2
  24. #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_SPI_MASTER
  25. /*
  26. * Clock Settings
  27. * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
  28. * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
  29. */
  30. /* CONFIG_CLKIN_HZ is any value in Hz */
  31. #define CONFIG_CLKIN_HZ 22118400
  32. /* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */
  33. /* 1 = CLKIN / 2 */
  34. #define CONFIG_CLKIN_HALF 0
  35. /* PLL_BYPASS controls the BYPASS bit in PLL_CTL 0 = do not bypass */
  36. /* 1 = bypass PLL */
  37. #define CONFIG_PLL_BYPASS 0
  38. /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
  39. /* Values can range from 0-63 (where 0 means 64) */
  40. #define CONFIG_VCO_MULT 20
  41. /* CCLK_DIV controls the core clock divider */
  42. /* Values can be 1, 2, 4, or 8 ONLY */
  43. #define CONFIG_CCLK_DIV 1
  44. /* SCLK_DIV controls the system clock divider */
  45. /* Values can range from 1-15 */
  46. #define CONFIG_SCLK_DIV 5
  47. /*
  48. * Memory Settings
  49. */
  50. #define CONFIG_MEM_SIZE 32
  51. #define CONFIG_MEM_ADD_WDTH 9
  52. #define CONFIG_EBIU_SDRRC_VAL 0x2ac
  53. #define CONFIG_EBIU_SDGCTL_VAL 0x91110d
  54. #define CONFIG_EBIU_AMGCTL_VAL 0xFF
  55. #define CONFIG_EBIU_AMBCTL0_VAL 0x7BB07BB0
  56. #define CONFIG_EBIU_AMBCTL1_VAL 0xFFC27BB0
  57. #define CONFIG_SYS_MONITOR_LEN (256 << 10)
  58. #define CONFIG_SYS_MALLOC_LEN (384 << 10)
  59. /*
  60. * Network Settings
  61. */
  62. #ifndef __ADSPBF534__
  63. #define CONFIG_BFIN_MAC
  64. #define CONFIG_NETCONSOLE 1
  65. #define CONFIG_NET_MULTI 1
  66. #endif
  67. #ifdef CONFIG_BFIN_MAC
  68. #define CONFIG_IPADDR 192.168.0.15
  69. #define CONFIG_NETMASK 255.255.255.0
  70. #define CONFIG_GATEWAYIP 192.168.0.1
  71. #define CONFIG_SERVERIP 192.168.0.2
  72. #define CONFIG_HOSTNAME bf537-srv1
  73. #endif
  74. #define CONFIG_SYS_AUTOLOAD "no"
  75. #define CONFIG_ROOTPATH /romfs
  76. /* Use a fixed MAC address for booting up. Firstboot linux
  77. * must fetch a valid MAC from the production server. */
  78. #define CONFIG_ETHADDR 02:80:ad:20:31:42
  79. /*
  80. * Flash Settings
  81. */
  82. /* We don't have a parallel flash chip there */
  83. #define CONFIG_SYS_NO_FLASH
  84. /*
  85. * SPI Settings
  86. */
  87. #define CONFIG_BFIN_SPI
  88. #define CONFIG_ENV_SPI_MAX_HZ 30000000
  89. #define CONFIG_SF_DEFAULT_HZ 30000000
  90. #define CONFIG_SPI_FLASH
  91. #define CONFIG_SPI_FLASH_STMICRO
  92. /*
  93. * Env Storage Settings
  94. */
  95. #define CONFIG_ENV_IS_IN_SPI_FLASH
  96. #define CONFIG_ENV_OFFSET 0x10000
  97. #define CONFIG_ENV_SIZE 0x10000
  98. #define CONFIG_ENV_SECT_SIZE 0x10000
  99. #define ENV_IS_EMBEDDED_CUSTOM
  100. /*
  101. * I2C settings
  102. */
  103. #define CONFIG_BFIN_TWI_I2C 1
  104. #define CONFIG_HARD_I2C 1
  105. #define CONFIG_SYS_I2C_SPEED 50000
  106. #define CONFIG_SYS_I2C_SLAVE 0
  107. /*
  108. * Misc Settings
  109. */
  110. #define CONFIG_SYS_LONGHELP 1
  111. #define CONFIG_CMDLINE_EDITING 1
  112. #define CONFIG_ENV_OVERWRITE 1
  113. #define CONFIG_MISC_INIT_R
  114. #define CONFIG_BAUDRATE 115200
  115. #define CONFIG_UART_CONSOLE 0
  116. #define CONFIG_PANIC_HANG 1
  117. #define CONFIG_RTC_BFIN 1
  118. #define CONFIG_BOOT_RETRY_TIME -1
  119. #define CONFIG_LOADS_ECHO 1
  120. #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
  121. # define CONFIG_BOOTDELAY -1
  122. #else
  123. # define CONFIG_BOOTDELAY 5
  124. #endif
  125. #include <config_cmd_default.h>
  126. #ifdef CONFIG_BFIN_MAC
  127. # define CONFIG_CMD_DHCP
  128. # define CONFIG_CMD_PING
  129. #else
  130. # undef CONFIG_CMD_NET
  131. #endif
  132. #define CONFIG_CMD_BOOTLDR
  133. #define CONFIG_CMD_CACHE
  134. #define CONFIG_CMD_DATE
  135. #define CONFIG_CMD_ELF
  136. #undef CONFIG_CMD_FLASH
  137. #define CONFIG_CMD_I2C
  138. #undef CONFIG_CMD_IMLS
  139. #define CONFIG_CMD_SF
  140. #define CONFIG_BOOTCOMMAND "run flashboot"
  141. #define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw"
  142. #define CONFIG_SYS_PROMPT "srv1> "
  143. #define BOOT_ENV_SETTINGS \
  144. "update=tftpboot $(loadaddr) u-boot.ldr;" \
  145. "sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
  146. "sf erase 0 0x30000;" \
  147. "sf write $(loadaddr) 0 $(filesize)" \
  148. "flashboot=sf read 0x1000000 0x30000 0x320000;" \
  149. "bootm 0x1000000\0"
  150. #ifdef CONFIG_BFIN_MAC
  151. # define NETWORK_ENV_SETTINGS \
  152. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  153. "nfsroot=$(serverip):$(rootpath)\0" \
  154. "addip=setenv bootargs $(bootargs) " \
  155. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
  156. ":$(hostname):eth0:off\0" \
  157. "ramboot=tftpboot $(loadaddr) linux;" \
  158. "run ramargs;run addip;bootelf\0" \
  159. "nfsboot=tftpboot $(loadaddr) linux;" \
  160. "run nfsargs;run addip;bootelf\0"
  161. #else
  162. # define NETWORK_ENV_SETTINGS
  163. #endif
  164. #define CONFIG_EXTRA_ENV_SETTINGS \
  165. NETWORK_ENV_SETTINGS \
  166. "ramargs=setenv bootargs " CONFIG_BOOTARGS "\0" \
  167. BOOT_ENV_SETTINGS
  168. #endif