ocotea.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * (C) Copyright 2004 Paul Reynolds <PaulReynolds@lhsolutions.com>
  3. *
  4. * (C) Copyright 2005
  5. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. /************************************************************************
  26. * 1 March 2004 Travis B. Sawyer <tsawyer@sandburst.com>
  27. * Adapted to current Das U-Boot source
  28. ***********************************************************************/
  29. /************************************************************************
  30. * OCOTEA.h - configuration for AMCC 440GX Ref (Ocotea)
  31. ***********************************************************************/
  32. #ifndef __CONFIG_H
  33. #define __CONFIG_H
  34. /*-----------------------------------------------------------------------
  35. * High Level Configuration Options
  36. *----------------------------------------------------------------------*/
  37. #define CONFIG_OCOTEA 1 /* Board is ebony */
  38. #define CONFIG_440GX 1 /* Specifc GX support */
  39. #define CONFIG_440 1 /* ... PPC440 family */
  40. #define CONFIG_4xx 1 /* ... PPC4xx family */
  41. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */
  42. #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
  43. /*
  44. * Include common defines/options for all AMCC eval boards
  45. */
  46. #define CONFIG_HOSTNAME ocotea
  47. #include "amcc-common.h"
  48. /*-----------------------------------------------------------------------
  49. * Base addresses -- Note these are effective addresses where the
  50. * actual resources get mapped (not physical addresses)
  51. *----------------------------------------------------------------------*/
  52. #define CONFIG_SYS_FLASH_BASE 0xff800000 /* start of FLASH */
  53. #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
  54. #define CONFIG_SYS_PERIPHERAL_BASE 0xe0000000 /* internal peripherals */
  55. #define CONFIG_SYS_ISRAM_BASE 0xc0000000 /* internal SRAM */
  56. #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
  57. #define CONFIG_SYS_FPGA_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x08300000)
  58. #define CONFIG_SYS_NVRAM_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
  59. /*-----------------------------------------------------------------------
  60. * Initial RAM & stack pointer (placed in internal SRAM)
  61. *----------------------------------------------------------------------*/
  62. #define CONFIG_SYS_TEMP_STACK_OCM 1
  63. #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE
  64. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */
  65. #define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */
  66. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */
  67. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  68. #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
  69. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR
  70. /*-----------------------------------------------------------------------
  71. * Serial Port
  72. *----------------------------------------------------------------------*/
  73. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  74. #define CONFIG_SYS_EXT_SERIAL_CLOCK (1843200 * 6) /* Ext clk @ 11.059 MHz */
  75. /*-----------------------------------------------------------------------
  76. * Environment
  77. *----------------------------------------------------------------------*/
  78. /*
  79. * Define here the location of the environment variables (FLASH or NVRAM).
  80. * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
  81. * supported for backward compatibility.
  82. */
  83. #if 1
  84. #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  85. #else
  86. #define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
  87. #endif
  88. /*-----------------------------------------------------------------------
  89. * NVRAM/RTC
  90. *
  91. * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
  92. * The DS1743 code assumes this condition (i.e. -- it assumes the base
  93. * address for the RTC registers is:
  94. *
  95. * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE
  96. *
  97. *----------------------------------------------------------------------*/
  98. #define CONFIG_SYS_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
  99. #define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
  100. #ifdef CONFIG_ENV_IS_IN_NVRAM
  101. #define CONFIG_ENV_SIZE 0x1000 /* Size of Environment vars */
  102. #define CONFIG_ENV_ADDR \
  103. (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)
  104. #endif /* CONFIG_ENV_IS_IN_NVRAM */
  105. /*-----------------------------------------------------------------------
  106. * FLASH related
  107. *----------------------------------------------------------------------*/
  108. #define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */
  109. #define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */
  110. #undef CONFIG_SYS_FLASH_CHECKSUM
  111. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  112. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  113. #define CONFIG_SYS_FLASH_ADDR0 0x5555
  114. #define CONFIG_SYS_FLASH_ADDR1 0x2aaa
  115. #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
  116. #ifdef CONFIG_ENV_IS_IN_FLASH
  117. #define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
  118. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
  119. #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  120. /* Address and size of Redundant Environment Sector */
  121. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
  122. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  123. #endif /* CONFIG_ENV_IS_IN_FLASH */
  124. /*-----------------------------------------------------------------------
  125. * DDR SDRAM
  126. *----------------------------------------------------------------------*/
  127. #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
  128. #define SPD_EEPROM_ADDRESS {0x53,0x52} /* SPD i2c spd addresses */
  129. #define CONFIG_PROG_SDRAM_TLB 1 /* setup SDRAM TLB's dynamically*/
  130. /*-----------------------------------------------------------------------
  131. * I2C
  132. *----------------------------------------------------------------------*/
  133. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  134. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  135. #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
  136. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  137. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  138. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
  139. /*
  140. * Default environment variables
  141. */
  142. #define CONFIG_EXTRA_ENV_SETTINGS \
  143. CONFIG_AMCC_DEF_ENV \
  144. CONFIG_AMCC_DEF_ENV_PPC \
  145. CONFIG_AMCC_DEF_ENV_NOR_UPD \
  146. "kernel_addr=fff00000\0" \
  147. "ramdisk_addr=fff10000\0" \
  148. ""
  149. #define CONFIG_PHY_ADDR 1 /* PHY address, See schematics */
  150. #define CONFIG_PHY1_ADDR 2
  151. #define CONFIG_PHY2_ADDR 0x10
  152. #define CONFIG_PHY3_ADDR 0x18
  153. #define CONFIG_HAS_ETH0
  154. #define CONFIG_HAS_ETH1
  155. #define CONFIG_HAS_ETH2
  156. #define CONFIG_HAS_ETH3
  157. #define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */
  158. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  159. #define CONFIG_PHY_RESET 1 /* reset phy upon startup */
  160. #define CONFIG_PHY_RESET_DELAY 1000
  161. /*
  162. * Commands additional to the ones defined in amcc-common.h
  163. */
  164. #define CONFIG_CMD_DATE
  165. #define CONFIG_CMD_PCI
  166. #define CONFIG_CMD_SDRAM
  167. #define CONFIG_CMD_SNTP
  168. /*-----------------------------------------------------------------------
  169. * PCI stuff
  170. *-----------------------------------------------------------------------
  171. */
  172. /* General PCI */
  173. #define CONFIG_PCI /* include pci support */
  174. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  175. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  176. #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
  177. /* Board-specific PCI */
  178. #define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
  179. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
  180. #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
  181. #endif /* __CONFIG_H */