canyonlands.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. /*
  2. * (C) Copyright 2008
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  18. * MA 02111-1307 USA
  19. */
  20. /************************************************************************
  21. * canyonlands.h - configuration for Canyonlands (460EX)
  22. ***********************************************************************/
  23. #ifndef __CONFIG_H
  24. #define __CONFIG_H
  25. /*-----------------------------------------------------------------------
  26. * High Level Configuration Options
  27. *----------------------------------------------------------------------*/
  28. /*
  29. * This config file is used for Canyonlands (460EX) Glacier (460GT)
  30. * and Arches dual (460GT)
  31. */
  32. #ifdef CONFIG_CANYONLANDS
  33. #define CONFIG_460EX 1 /* Specific PPC460EX */
  34. #define CONFIG_HOSTNAME canyonlands
  35. #else
  36. #define CONFIG_460GT 1 /* Specific PPC460GT */
  37. #ifdef CONFIG_GLACIER
  38. #define CONFIG_HOSTNAME glacier
  39. #else
  40. #define CONFIG_HOSTNAME arches
  41. #define CONFIG_USE_NETDEV eth1
  42. #define CONFIG_BD_NUM_CPUS 2
  43. #endif
  44. #endif
  45. #define CONFIG_440 1
  46. #define CONFIG_4xx 1 /* ... PPC4xx family */
  47. #ifndef CONFIG_SYS_TEXT_BASE
  48. #define CONFIG_SYS_TEXT_BASE 0xFFF80000
  49. #endif
  50. /*
  51. * Include common defines/options for all AMCC eval boards
  52. */
  53. #include "amcc-common.h"
  54. #define CONFIG_SYS_CLK_FREQ 66666667 /* external freq to pll */
  55. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
  56. #define CONFIG_BOARD_EARLY_INIT_R 1 /* Call board_early_init_r */
  57. #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */
  58. #define CONFIG_BOARD_TYPES 1 /* support board types */
  59. /*-----------------------------------------------------------------------
  60. * Base addresses -- Note these are effective addresses where the
  61. * actual resources get mapped (not physical addresses)
  62. *----------------------------------------------------------------------*/
  63. #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped PCI memory */
  64. #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
  65. #define CONFIG_SYS_PCI_TARGBASE CONFIG_SYS_PCI_MEMBASE
  66. #define CONFIG_SYS_PCIE_MEMBASE 0xb0000000 /* mapped PCIe memory */
  67. #define CONFIG_SYS_PCIE_MEMSIZE 0x08000000 /* smallest incr for PCIe port */
  68. #define CONFIG_SYS_PCIE_BASE 0xc4000000 /* PCIe UTL regs */
  69. #define CONFIG_SYS_PCIE0_CFGBASE 0xc0000000
  70. #define CONFIG_SYS_PCIE1_CFGBASE 0xc1000000
  71. #define CONFIG_SYS_PCIE0_XCFGBASE 0xc3000000
  72. #define CONFIG_SYS_PCIE1_XCFGBASE 0xc3001000
  73. /*
  74. * BCSR bits as defined in the Canyonlands board user manual.
  75. */
  76. #define BCSR_USBCTRL_OTG_RST 0x32
  77. #define BCSR_USBCTRL_HOST_RST 0x01
  78. #define BCSR_SELECT_PCIE 0x10
  79. #define CONFIG_SYS_PCIE0_UTLBASE 0xc08010000ULL /* 36bit physical addr */
  80. /* base address of inbound PCIe window */
  81. #define CONFIG_SYS_PCIE_INBOUND_BASE 0x000000000ULL /* 36bit physical addr */
  82. /* EBC stuff */
  83. #if !defined(CONFIG_ARCHES)
  84. #define CONFIG_SYS_BCSR_BASE 0xE1000000
  85. #define CONFIG_SYS_FLASH_BASE 0xFC000000 /* later mapped to this addr */
  86. #define CONFIG_SYS_FLASH_SIZE (64 << 20)
  87. #else
  88. #define CONFIG_SYS_FPGA_BASE 0xE1000000
  89. #define CONFIG_SYS_CPLD_ADDR (CONFIG_SYS_FPGA_BASE + 0x00080000)
  90. #define CONFIG_SYS_CPLD_DATA (CONFIG_SYS_FPGA_BASE + 0x00080002)
  91. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* later mapped to this addr */
  92. #define CONFIG_SYS_FLASH_SIZE (32 << 20)
  93. #endif
  94. #define CONFIG_SYS_NAND_ADDR 0xE0000000
  95. #define CONFIG_SYS_BOOT_BASE_ADDR 0xFF000000 /* EBC Boot Space: 0xFF000000 */
  96. #define CONFIG_SYS_FLASH_BASE_PHYS_H 0x4
  97. #define CONFIG_SYS_FLASH_BASE_PHYS_L 0xCC000000
  98. #define CONFIG_SYS_FLASH_BASE_PHYS (((u64)CONFIG_SYS_FLASH_BASE_PHYS_H << 32) | \
  99. (u64)CONFIG_SYS_FLASH_BASE_PHYS_L)
  100. #define CONFIG_SYS_OCM_BASE 0xE3000000 /* OCM: 64k */
  101. #define CONFIG_SYS_SRAM_BASE 0xE8000000 /* SRAM: 256k */
  102. #define CONFIG_SYS_SRAM_SIZE (256 << 10)
  103. #define CONFIG_SYS_LOCAL_CONF_REGS 0xEF000000
  104. #define CONFIG_SYS_AHB_BASE 0xE2000000 /* internal AHB peripherals */
  105. /*-----------------------------------------------------------------------
  106. * Initial RAM & stack pointer (placed in OCM)
  107. *----------------------------------------------------------------------*/
  108. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */
  109. #define CONFIG_SYS_INIT_RAM_END (4 << 10)
  110. #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */
  111. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  112. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  113. /*-----------------------------------------------------------------------
  114. * Serial Port
  115. *----------------------------------------------------------------------*/
  116. #define CONFIG_CONS_INDEX 1 /* Use UART0 */
  117. /*-----------------------------------------------------------------------
  118. * Environment
  119. *----------------------------------------------------------------------*/
  120. /*
  121. * Define here the location of the environment variables (FLASH).
  122. */
  123. #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
  124. #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  125. #define CONFIG_SYS_NOR_CS 0 /* NOR chip connected to CSx */
  126. #define CONFIG_SYS_NAND_CS 3 /* NAND chip connected to CSx */
  127. #else
  128. #define CONFIG_ENV_IS_IN_NAND 1 /* use NAND for environment vars */
  129. #define CONFIG_SYS_NOR_CS 3 /* NOR chip connected to CSx */
  130. #define CONFIG_SYS_NAND_CS 0 /* NAND chip connected to CSx */
  131. #define CONFIG_ENV_IS_EMBEDDED 1 /* use embedded environment */
  132. #endif
  133. /*
  134. * IPL (Initial Program Loader, integrated inside CPU)
  135. * Will load first 4k from NAND (SPL) into cache and execute it from there.
  136. *
  137. * SPL (Secondary Program Loader)
  138. * Will load special U-Boot version (NUB) from NAND and execute it. This SPL
  139. * has to fit into 4kByte. It sets up the CPU and configures the SDRAM
  140. * controller and the NAND controller so that the special U-Boot image can be
  141. * loaded from NAND to SDRAM.
  142. *
  143. * NUB (NAND U-Boot)
  144. * This NAND U-Boot (NUB) is a special U-Boot version which can be started
  145. * from RAM. Therefore it mustn't (re-)configure the SDRAM controller.
  146. *
  147. * On 440EPx the SPL is copied to SDRAM before the NAND controller is
  148. * set up. While still running from cache, I experienced problems accessing
  149. * the NAND controller. sr - 2006-08-25
  150. *
  151. * This is the first official implementation of booting from 2k page sized
  152. * NAND devices (e.g. Micron 29F2G08AA 256Mbit * 8)
  153. */
  154. #define CONFIG_SYS_NAND_BOOT_SPL_SRC 0xfffff000 /* SPL location */
  155. #define CONFIG_SYS_NAND_BOOT_SPL_SIZE (4 << 10) /* SPL size */
  156. #define CONFIG_SYS_NAND_BOOT_SPL_DST (CONFIG_SYS_OCM_BASE + (12 << 10)) /* Copy SPL here */
  157. #define CONFIG_SYS_NAND_U_BOOT_DST 0x01000000 /* Load NUB to this addr */
  158. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST /* Start NUB from */
  159. /* this addr */
  160. #define CONFIG_SYS_NAND_BOOT_SPL_DELTA (CONFIG_SYS_NAND_BOOT_SPL_SRC - CONFIG_SYS_NAND_BOOT_SPL_DST)
  161. /*
  162. * Define the partitioning of the NAND chip (only RAM U-Boot is needed here)
  163. */
  164. #define CONFIG_SYS_NAND_U_BOOT_OFFS (128 << 10) /* Offset to RAM U-Boot image */
  165. #define CONFIG_SYS_NAND_U_BOOT_SIZE (1 << 20) /* Size of RAM U-Boot image */
  166. /*
  167. * Now the NAND chip has to be defined (no autodetection used!)
  168. */
  169. #define CONFIG_SYS_NAND_PAGE_SIZE (2 << 10) /* NAND chip page size */
  170. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) /* NAND chip block size */
  171. #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / CONFIG_SYS_NAND_PAGE_SIZE)
  172. /* NAND chip page count */
  173. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 /* Location of bad block marker*/
  174. #define CONFIG_SYS_NAND_5_ADDR_CYCLE /* Fifth addr used (<=128MB) */
  175. #define CONFIG_SYS_NAND_ECCSIZE 256
  176. #define CONFIG_SYS_NAND_ECCBYTES 3
  177. #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / CONFIG_SYS_NAND_ECCSIZE)
  178. #define CONFIG_SYS_NAND_OOBSIZE 64
  179. #define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * CONFIG_SYS_NAND_ECCSTEPS)
  180. #define CONFIG_SYS_NAND_ECCPOS {40, 41, 42, 43, 44, 45, 46, 47, \
  181. 48, 49, 50, 51, 52, 53, 54, 55, \
  182. 56, 57, 58, 59, 60, 61, 62, 63}
  183. #ifdef CONFIG_ENV_IS_IN_NAND
  184. /*
  185. * For NAND booting the environment is embedded in the U-Boot image. Please take
  186. * look at the file board/amcc/canyonlands/u-boot-nand.lds for details.
  187. */
  188. #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
  189. #define CONFIG_ENV_OFFSET (CONFIG_SYS_NAND_U_BOOT_OFFS + CONFIG_ENV_SIZE)
  190. #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
  191. #endif
  192. /*-----------------------------------------------------------------------
  193. * FLASH related
  194. *----------------------------------------------------------------------*/
  195. #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
  196. #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
  197. #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Use AMD (Spansion) reset cmd */
  198. #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE}
  199. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  200. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
  201. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  202. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  203. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
  204. #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
  205. #ifdef CONFIG_ENV_IS_IN_FLASH
  206. #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */
  207. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
  208. #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  209. /* Address and size of Redundant Environment Sector */
  210. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE)
  211. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  212. #endif /* CONFIG_ENV_IS_IN_FLASH */
  213. /*-----------------------------------------------------------------------
  214. * NAND-FLASH related
  215. *----------------------------------------------------------------------*/
  216. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  217. #define CONFIG_SYS_NAND_BASE (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
  218. #define CONFIG_SYS_NAND_SELECT_DEVICE 1 /* nand driver supports mutipl. chips */
  219. /*------------------------------------------------------------------------------
  220. * DDR SDRAM
  221. *----------------------------------------------------------------------------*/
  222. #if !defined(CONFIG_NAND_U_BOOT)
  223. #if !defined(CONFIG_ARCHES)
  224. /*
  225. * NAND booting U-Boot version uses a fixed initialization, since the whole
  226. * I2C SPD DIMM autodetection/calibration doesn't fit into the 4k of boot
  227. * code.
  228. */
  229. #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
  230. #define SPD_EEPROM_ADDRESS {0x50, 0x51} /* SPD i2c spd addresses*/
  231. #define CONFIG_DDR_ECC 1 /* with ECC support */
  232. #define CONFIG_DDR_RQDC_FIXED 0x80000038 /* fixed value for RQDC */
  233. #else /* defined(CONFIG_ARCHES) */
  234. #define CONFIG_AUTOCALIB "silent\0" /* default is non-verbose */
  235. #define CONFIG_PPC4xx_DDR_AUTOCALIBRATION /* IBM DDR autocalibration */
  236. #define DEBUG_PPC4xx_DDR_AUTOCALIBRATION /* dynamic DDR autocal debug */
  237. #undef CONFIG_PPC4xx_DDR_METHOD_A
  238. /* DDR1/2 SDRAM Device Control Register Data Values */
  239. /* Memory Queue */
  240. #define CONFIG_SYS_SDRAM_R0BAS 0x0000f000
  241. #define CONFIG_SYS_SDRAM_R1BAS 0x00000000
  242. #define CONFIG_SYS_SDRAM_R2BAS 0x00000000
  243. #define CONFIG_SYS_SDRAM_R3BAS 0x00000000
  244. #define CONFIG_SYS_SDRAM_PLBADDULL 0x00000000
  245. #define CONFIG_SYS_SDRAM_PLBADDUHB 0x00000008
  246. #define CONFIG_SYS_SDRAM_CONF1LL 0x00001080
  247. #define CONFIG_SYS_SDRAM_CONF1HB 0x00001080
  248. #define CONFIG_SYS_SDRAM_CONFPATHB 0x10a68000
  249. /* SDRAM Controller */
  250. #define CONFIG_SYS_SDRAM0_MB0CF 0x00000701
  251. #define CONFIG_SYS_SDRAM0_MB1CF 0x00000000
  252. #define CONFIG_SYS_SDRAM0_MB2CF 0x00000000
  253. #define CONFIG_SYS_SDRAM0_MB3CF 0x00000000
  254. #define CONFIG_SYS_SDRAM0_MCOPT1 0x05322000
  255. #define CONFIG_SYS_SDRAM0_MCOPT2 0x00000000
  256. #define CONFIG_SYS_SDRAM0_MODT0 0x01000000
  257. #define CONFIG_SYS_SDRAM0_MODT1 0x00000000
  258. #define CONFIG_SYS_SDRAM0_MODT2 0x00000000
  259. #define CONFIG_SYS_SDRAM0_MODT3 0x00000000
  260. #define CONFIG_SYS_SDRAM0_CODT 0x00800021
  261. #define CONFIG_SYS_SDRAM0_RTR 0x06180000
  262. #define CONFIG_SYS_SDRAM0_INITPLR0 0xb5380000
  263. #define CONFIG_SYS_SDRAM0_INITPLR1 0x82100400
  264. #define CONFIG_SYS_SDRAM0_INITPLR2 0x80820000
  265. #define CONFIG_SYS_SDRAM0_INITPLR3 0x80830000
  266. #define CONFIG_SYS_SDRAM0_INITPLR4 0x80810040
  267. #define CONFIG_SYS_SDRAM0_INITPLR5 0x80800532
  268. #define CONFIG_SYS_SDRAM0_INITPLR6 0x82100400
  269. #define CONFIG_SYS_SDRAM0_INITPLR7 0x8a080000
  270. #define CONFIG_SYS_SDRAM0_INITPLR8 0x8a080000
  271. #define CONFIG_SYS_SDRAM0_INITPLR9 0x8a080000
  272. #define CONFIG_SYS_SDRAM0_INITPLR10 0x8a080000
  273. #define CONFIG_SYS_SDRAM0_INITPLR11 0x80000432
  274. #define CONFIG_SYS_SDRAM0_INITPLR12 0x808103c0
  275. #define CONFIG_SYS_SDRAM0_INITPLR13 0x80810040
  276. #define CONFIG_SYS_SDRAM0_INITPLR14 0x00000000
  277. #define CONFIG_SYS_SDRAM0_INITPLR15 0x00000000
  278. #define CONFIG_SYS_SDRAM0_RQDC 0x80000038
  279. #define CONFIG_SYS_SDRAM0_RFDC 0x00000257
  280. #define CONFIG_SYS_SDRAM0_RDCC 0x40000000
  281. #define CONFIG_SYS_SDRAM0_DLCR 0x03000091
  282. #define CONFIG_SYS_SDRAM0_CLKTR 0x40000000
  283. #define CONFIG_SYS_SDRAM0_WRDTR 0x82000823
  284. #define CONFIG_SYS_SDRAM0_SDTR1 0x80201000
  285. #define CONFIG_SYS_SDRAM0_SDTR2 0x42204243
  286. #define CONFIG_SYS_SDRAM0_SDTR3 0x090c0d1a
  287. #define CONFIG_SYS_SDRAM0_MMODE 0x00000432
  288. #define CONFIG_SYS_SDRAM0_MEMODE 0x00000004
  289. #endif /* !defined(CONFIG_ARCHES) */
  290. #endif /* !defined(CONFIG_NAND_U_BOOT) */
  291. #define CONFIG_SYS_MBYTES_SDRAM 512 /* 512MB */
  292. /*-----------------------------------------------------------------------
  293. * I2C
  294. *----------------------------------------------------------------------*/
  295. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */
  296. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  297. #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
  298. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  299. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  300. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
  301. /* I2C bootstrap EEPROM */
  302. #if defined(CONFIG_ARCHES)
  303. #define CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR 0x54
  304. #else
  305. #define CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR 0x52
  306. #endif
  307. #define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET 0
  308. #define CONFIG_4xx_CONFIG_BLOCKSIZE 16
  309. /* I2C SYSMON (LM75, AD7414 is almost compatible) */
  310. #define CONFIG_DTT_LM75 1 /* ON Semi's LM75 */
  311. #define CONFIG_DTT_AD7414 1 /* use AD7414 */
  312. #define CONFIG_DTT_SENSORS {0} /* Sensor addresses */
  313. #define CONFIG_SYS_DTT_MAX_TEMP 70
  314. #define CONFIG_SYS_DTT_LOW_TEMP -30
  315. #define CONFIG_SYS_DTT_HYSTERESIS 3
  316. #if defined(CONFIG_ARCHES)
  317. #define CONFIG_SYS_I2C_DTT_ADDR 0x4a /* AD7414 I2C address */
  318. #endif
  319. #if !defined(CONFIG_ARCHES)
  320. /* RTC configuration */
  321. #define CONFIG_RTC_M41T62 1
  322. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  323. #endif
  324. /*-----------------------------------------------------------------------
  325. * Ethernet
  326. *----------------------------------------------------------------------*/
  327. #define CONFIG_IBM_EMAC4_V4 1
  328. #define CONFIG_HAS_ETH0
  329. #define CONFIG_HAS_ETH1
  330. #if !defined(CONFIG_ARCHES)
  331. #define CONFIG_PHY_ADDR 0 /* PHY address, See schematics */
  332. #define CONFIG_PHY1_ADDR 1
  333. /* Only Glacier (460GT) has 4 EMAC interfaces */
  334. #ifdef CONFIG_460GT
  335. #define CONFIG_PHY2_ADDR 2
  336. #define CONFIG_PHY3_ADDR 3
  337. #define CONFIG_HAS_ETH2
  338. #define CONFIG_HAS_ETH3
  339. #endif
  340. #else /* defined(CONFIG_ARCHES) */
  341. #define CONFIG_FIXED_PHY 0xFFFFFFFF
  342. #define CONFIG_PHY_ADDR CONFIG_FIXED_PHY
  343. #define CONFIG_PHY1_ADDR 0
  344. #define CONFIG_PHY2_ADDR 1
  345. #define CONFIG_HAS_ETH2
  346. #define CONFIG_SYS_FIXED_PHY_PORT(devnum, speed, duplex) \
  347. {devnum, speed, duplex}
  348. #define CONFIG_SYS_FIXED_PHY_PORTS \
  349. CONFIG_SYS_FIXED_PHY_PORT(0, 1000, FULL)
  350. #define CONFIG_M88E1112_PHY
  351. /*
  352. * For the GPCS_PHYx_ADDR PHY address, choose some PHY address not
  353. * used by CONFIG_PHYx_ADDR
  354. */
  355. #define CONFIG_GPCS_PHY_ADDR 0xA
  356. #define CONFIG_GPCS_PHY1_ADDR 0xB
  357. #define CONFIG_GPCS_PHY2_ADDR 0xC
  358. #endif /* !defined(CONFIG_ARCHES) */
  359. #define CONFIG_PHY_RESET 1 /* reset phy upon startup */
  360. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  361. #define CONFIG_PHY_DYNAMIC_ANEG 1
  362. /*-----------------------------------------------------------------------
  363. * USB-OHCI
  364. *----------------------------------------------------------------------*/
  365. /* Only Canyonlands (460EX) has USB */
  366. #ifdef CONFIG_460EX
  367. #define CONFIG_USB_OHCI_NEW
  368. #define CONFIG_USB_STORAGE
  369. #undef CONFIG_SYS_OHCI_BE_CONTROLLER /* 460EX has little endian descriptors */
  370. #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS /* 460EX has little endian register */
  371. #define CONFIG_SYS_OHCI_USE_NPS /* force NoPowerSwitching mode */
  372. #define CONFIG_SYS_USB_OHCI_REGS_BASE (CONFIG_SYS_AHB_BASE | 0xd0000)
  373. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ppc440"
  374. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
  375. #define CONFIG_SYS_USB_OHCI_BOARD_INIT
  376. #endif
  377. /*
  378. * Default environment variables
  379. */
  380. #if !defined(CONFIG_ARCHES)
  381. #define CONFIG_EXTRA_ENV_SETTINGS \
  382. CONFIG_AMCC_DEF_ENV \
  383. CONFIG_AMCC_DEF_ENV_POWERPC \
  384. CONFIG_AMCC_DEF_ENV_NOR_UPD \
  385. CONFIG_AMCC_DEF_ENV_NAND_UPD \
  386. "kernel_addr=fc000000\0" \
  387. "fdt_addr=fc1e0000\0" \
  388. "ramdisk_addr=fc200000\0" \
  389. "pciconfighost=1\0" \
  390. "pcie_mode=RP:RP\0" \
  391. ""
  392. #else /* defined(CONFIG_ARCHES) */
  393. #define CONFIG_EXTRA_ENV_SETTINGS \
  394. CONFIG_AMCC_DEF_ENV \
  395. CONFIG_AMCC_DEF_ENV_POWERPC \
  396. CONFIG_AMCC_DEF_ENV_NOR_UPD \
  397. "kernel_addr=fe000000\0" \
  398. "fdt_addr=fe1e0000\0" \
  399. "ramdisk_addr=fe200000\0" \
  400. "pciconfighost=1\0" \
  401. "pcie_mode=RP:RP\0" \
  402. "ethprime=ppc_4xx_eth1\0" \
  403. ""
  404. #endif /* !defined(CONFIG_ARCHES) */
  405. /*
  406. * Commands additional to the ones defined in amcc-common.h
  407. */
  408. #define CONFIG_CMD_CHIP_CONFIG
  409. #if defined(CONFIG_ARCHES)
  410. #define CONFIG_CMD_DTT
  411. #define CONFIG_CMD_PCI
  412. #define CONFIG_CMD_SDRAM
  413. #elif defined(CONFIG_CANYONLANDS)
  414. #define CONFIG_CMD_DATE
  415. #define CONFIG_CMD_DTT
  416. #define CONFIG_CMD_EXT2
  417. #define CONFIG_CMD_FAT
  418. #define CONFIG_CMD_NAND
  419. #define CONFIG_CMD_PCI
  420. #define CONFIG_CMD_SATA
  421. #define CONFIG_CMD_SDRAM
  422. #define CONFIG_CMD_SNTP
  423. #define CONFIG_CMD_USB
  424. #elif defined(CONFIG_GLACIER)
  425. #define CONFIG_CMD_DATE
  426. #define CONFIG_CMD_DTT
  427. #define CONFIG_CMD_NAND
  428. #define CONFIG_CMD_PCI
  429. #define CONFIG_CMD_SDRAM
  430. #define CONFIG_CMD_SNTP
  431. #else
  432. #error "board type not defined"
  433. #endif
  434. /* Partitions */
  435. #define CONFIG_MAC_PARTITION
  436. #define CONFIG_DOS_PARTITION
  437. #define CONFIG_ISO_PARTITION
  438. /*-----------------------------------------------------------------------
  439. * PCI stuff
  440. *----------------------------------------------------------------------*/
  441. /* General PCI */
  442. #define CONFIG_PCI /* include pci support */
  443. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  444. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  445. #define CONFIG_PCI_CONFIG_HOST_BRIDGE
  446. /* Board-specific PCI */
  447. #define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
  448. #undef CONFIG_SYS_PCI_MASTER_INIT
  449. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1014 /* IBM */
  450. #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
  451. #ifdef CONFIG_460GT
  452. #if defined(CONFIG_ARCHES)
  453. /*-----------------------------------------------------------------------
  454. * RapidIO I/O and Registers
  455. *----------------------------------------------------------------------*/
  456. #define CONFIG_RAPIDIO
  457. #define CONFIG_SYS_460GT_SRIO_ERRATA_1
  458. #define SRGPL0_REG_BAR 0x0000000DAA000000ull /* 16MB */
  459. #define SRGPL0_CFG_BAR 0x0000000DAB000000ull /* 16MB */
  460. #define SRGPL0_MNT_BAR 0x0000000DAC000000ull /* 16MB */
  461. #define SRGPL0_MSG_BAR 0x0000000DAD000000ull /* 16MB */
  462. #define SRGPL0_OUT_BAR 0x0000000DB0000000ull /* 256MB */
  463. #define CONFIG_SYS_SRGPL0_REG_BAR 0xAA000000 /* 16MB */
  464. #define CONFIG_SYS_SRGPL0_CFG_BAR 0xAB000000 /* 16MB */
  465. #define CONFIG_SYS_SRGPL0_MNT_BAR 0xAC000000 /* 16MB */
  466. #define CONFIG_SYS_SRGPL0_MSG_BAR 0xAD000000 /* 16MB */
  467. #define CONFIG_SYS_I2ODMA_BASE 0xCF000000
  468. #define CONFIG_SYS_I2ODMA_PHYS_ADDR 0x0000000400100000ull
  469. #define CONFIG_PPC4XX_RAPIDIO_PROMISCUOUS_MODE
  470. #undef CONFIG_PPC4XX_RAPIDIO_DEBUG
  471. #undef CONFIG_PPC4XX_RAPIDIO_IN_BAR_USE_OCM
  472. #define CONFIG_PPC4XX_RAPIDIO_USE_HB_PLB
  473. #undef CONFIG_PPC4XX_RAPIDIO_LOOPBACK
  474. #endif /* CONFIG_ARCHES */
  475. #endif /* CONFIG_460GT */
  476. /*
  477. * SATA driver setup
  478. */
  479. #ifdef CONFIG_CMD_SATA
  480. #define CONFIG_SATA_DWC
  481. #define CONFIG_LIBATA
  482. #define SATA_BASE_ADDR 0xe20d1000 /* PPC460EX SATA Base Address */
  483. #define SATA_DMA_REG_ADDR 0xe20d0800 /* PPC460EX SATA Base Address */
  484. #define CONFIG_SYS_SATA_MAX_DEVICE 1 /* SATA MAX DEVICE */
  485. /* Convert sectorsize to wordsize */
  486. #define ATA_SECTOR_WORDS (ATA_SECT_SIZE/2)
  487. #endif
  488. /*-----------------------------------------------------------------------
  489. * External Bus Controller (EBC) Setup
  490. *----------------------------------------------------------------------*/
  491. /*
  492. * Canyonlands has 64MBytes of NOR FLASH (Spansion 29GL512), but the
  493. * boot EBC mapping only supports a maximum of 16MBytes
  494. * (4.ff00.0000 - 4.ffff.ffff).
  495. * To solve this problem, the FLASH has to get remapped to another
  496. * EBC address which accepts bigger regions:
  497. *
  498. * 0xfc00.0000 -> 4.cc00.0000
  499. *
  500. * Arches has 32MBytes of NOR FLASH (Spansion 29GL256), it will be
  501. * remapped to:
  502. *
  503. * 0xfe00.0000 -> 4.ce00.0000
  504. */
  505. #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
  506. /* Memory Bank 3 (NOR-FLASH) initialization */
  507. #define CONFIG_SYS_EBC_PB3AP 0x10055e00
  508. #define CONFIG_SYS_EBC_PB3CR (CONFIG_SYS_BOOT_BASE_ADDR | 0x9a000)
  509. /* Memory Bank 0 (NAND-FLASH) initialization */
  510. #define CONFIG_SYS_EBC_PB0AP 0x018003c0
  511. #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_NAND_ADDR | 0x1E000) /* BAS=NAND,BS=1MB,BU=R/W,BW=32bit*/
  512. #else
  513. /* Memory Bank 0 (NOR-FLASH) initialization */
  514. #define CONFIG_SYS_EBC_PB0AP 0x10055e00
  515. #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_BOOT_BASE_ADDR | 0x9a000)
  516. #if !defined(CONFIG_ARCHES)
  517. /* Memory Bank 3 (NAND-FLASH) initialization */
  518. #define CONFIG_SYS_EBC_PB3AP 0x018003c0
  519. #define CONFIG_SYS_EBC_PB3CR (CONFIG_SYS_NAND_ADDR | 0x1E000) /* BAS=NAND,BS=1MB,BU=R/W,BW=32bit*/
  520. #endif
  521. #endif /*defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) */
  522. #if !defined(CONFIG_ARCHES)
  523. /* Memory Bank 2 (CPLD) initialization */
  524. #define CONFIG_SYS_EBC_PB2AP 0x00804240
  525. #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_BCSR_BASE | 0x18000) /* BAS=CPLD,BS=1M,BU=RW,BW=32bit */
  526. #else /* defined(CONFIG_ARCHES) */
  527. /* Memory Bank 1 (FPGA) initialization */
  528. #define CONFIG_SYS_EBC_PB1AP 0x7f8ffe80
  529. #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_FPGA_BASE | 0x3a000) /* BAS=FPGA,BS=2MB,BU=R/W,BW=16bit*/
  530. #endif /* !defined(CONFIG_ARCHES) */
  531. #define CONFIG_SYS_EBC_CFG 0xbfc00000
  532. /*
  533. * Arches doesn't use PerCS3 but GPIO43, so let's configure the GPIO
  534. * pin multiplexing correctly
  535. */
  536. #if defined(CONFIG_ARCHES)
  537. #define GPIO43_USE GPIO_SEL /* On Arches this pin is used as GPIO */
  538. #else
  539. #define GPIO43_USE GPIO_ALT1 /* On Glacier this pin is used as ALT1 -> PerCS3 */
  540. #endif
  541. /*
  542. * PPC4xx GPIO Configuration
  543. */
  544. #ifdef CONFIG_460EX
  545. /* 460EX: Use USB configuration */
  546. #define CONFIG_SYS_4xx_GPIO_TABLE { /* Out GPIO Alternate1 Alternate2 Alternate3 */ \
  547. { \
  548. /* GPIO Core 0 */ \
  549. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO0 GMC1TxD(0) USB2HostD(0) */ \
  550. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO1 GMC1TxD(1) USB2HostD(1) */ \
  551. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO2 GMC1TxD(2) USB2HostD(2) */ \
  552. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO3 GMC1TxD(3) USB2HostD(3) */ \
  553. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO4 GMC1TxD(4) USB2HostD(4) */ \
  554. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO5 GMC1TxD(5) USB2HostD(5) */ \
  555. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO6 GMC1TxD(6) USB2HostD(6) */ \
  556. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO7 GMC1TxD(7) USB2HostD(7) */ \
  557. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO8 GMC1RxD(0) USB2OTGD(0) */ \
  558. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO9 GMC1RxD(1) USB2OTGD(1) */ \
  559. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO10 GMC1RxD(2) USB2OTGD(2) */ \
  560. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO11 GMC1RxD(3) USB2OTGD(3) */ \
  561. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO12 GMC1RxD(4) USB2OTGD(4) */ \
  562. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO13 GMC1RxD(5) USB2OTGD(5) */ \
  563. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO14 GMC1RxD(6) USB2OTGD(6) */ \
  564. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO15 GMC1RxD(7) USB2OTGD(7) */ \
  565. {GPIO0_BASE, GPIO_IN , GPIO_SEL, GPIO_OUT_0}, /* GPIO16 GMC1TxER USB2HostStop */ \
  566. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO17 GMC1CD USB2HostNext */ \
  567. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO18 GMC1RxER USB2HostDir */ \
  568. {GPIO0_BASE, GPIO_IN, GPIO_SEL, GPIO_OUT_0}, /* GPIO19 GMC1TxEN USB2OTGStop */ \
  569. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO20 GMC1CRS USB2OTGNext */ \
  570. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO21 GMC1RxDV USB2OTGDir */ \
  571. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO22 NFRDY */ \
  572. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO23 NFREN */ \
  573. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO24 NFWEN */ \
  574. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO25 NFCLE */ \
  575. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO26 NFALE */ \
  576. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO27 IRQ(0) */ \
  577. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO28 IRQ(1) */ \
  578. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO29 IRQ(2) */ \
  579. {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO30 PerPar0 DMAReq2 IRQ(7)*/ \
  580. {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO31 PerPar1 DMAAck2 IRQ(8)*/ \
  581. }, \
  582. { \
  583. /* GPIO Core 1 */ \
  584. {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO32 PerPar2 EOT2/TC2 IRQ(9)*/ \
  585. {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO33 PerPar3 DMAReq3 IRQ(4)*/ \
  586. {GPIO1_BASE, GPIO_OUT, GPIO_ALT3, GPIO_OUT_1}, /* GPIO34 UART0_DCD_N UART1_DSR_CTS_N UART2_SOUT*/ \
  587. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO35 UART0_8PIN_DSR_N UART1_RTS_DTR_N UART2_SIN*/ \
  588. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO36 UART0_8PIN_CTS_N DMAAck3 UART3_SIN*/ \
  589. {GPIO1_BASE, GPIO_BI , GPIO_ALT2, GPIO_OUT_0}, /* GPIO37 UART0_RTS_N EOT3/TC3 UART3_SOUT*/ \
  590. {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO38 UART0_DTR_N UART1_SOUT */ \
  591. {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO39 UART0_RI_N UART1_SIN */ \
  592. {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO40 IRQ(3) */ \
  593. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO41 CS(1) */ \
  594. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO42 CS(2) */ \
  595. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO43 CS(3) DMAReq1 IRQ(10)*/ \
  596. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO44 CS(4) DMAAck1 IRQ(11)*/ \
  597. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO45 CS(5) EOT/TC1 IRQ(12)*/ \
  598. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO46 PerAddr(5) DMAReq0 IRQ(13)*/ \
  599. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO47 PerAddr(6) DMAAck0 IRQ(14)*/ \
  600. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO48 PerAddr(7) EOT/TC0 IRQ(15)*/ \
  601. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO49 Unselect via TraceSelect Bit */ \
  602. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO50 Unselect via TraceSelect Bit */ \
  603. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO51 Unselect via TraceSelect Bit */ \
  604. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO52 Unselect via TraceSelect Bit */ \
  605. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO53 Unselect via TraceSelect Bit */ \
  606. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO54 Unselect via TraceSelect Bit */ \
  607. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO55 Unselect via TraceSelect Bit */ \
  608. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO56 Unselect via TraceSelect Bit */ \
  609. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO57 Unselect via TraceSelect Bit */ \
  610. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO58 Unselect via TraceSelect Bit */ \
  611. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO59 Unselect via TraceSelect Bit */ \
  612. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO60 Unselect via TraceSelect Bit */ \
  613. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO61 Unselect via TraceSelect Bit */ \
  614. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO62 Unselect via TraceSelect Bit */ \
  615. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO63 Unselect via TraceSelect Bit */ \
  616. } \
  617. }
  618. #else
  619. /* 460GT: Use EMAC2+3 configuration */
  620. #define CONFIG_SYS_4xx_GPIO_TABLE { /* Out GPIO Alternate1 Alternate2 Alternate3 */ \
  621. { \
  622. /* GPIO Core 0 */ \
  623. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO0 GMC1TxD(0) USB2HostD(0) */ \
  624. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO1 GMC1TxD(1) USB2HostD(1) */ \
  625. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO2 GMC1TxD(2) USB2HostD(2) */ \
  626. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO3 GMC1TxD(3) USB2HostD(3) */ \
  627. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO4 GMC1TxD(4) USB2HostD(4) */ \
  628. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO5 GMC1TxD(5) USB2HostD(5) */ \
  629. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO6 GMC1TxD(6) USB2HostD(6) */ \
  630. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO7 GMC1TxD(7) USB2HostD(7) */ \
  631. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO8 GMC1RxD(0) USB2OTGD(0) */ \
  632. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO9 GMC1RxD(1) USB2OTGD(1) */ \
  633. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO10 GMC1RxD(2) USB2OTGD(2) */ \
  634. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO11 GMC1RxD(3) USB2OTGD(3) */ \
  635. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO12 GMC1RxD(4) USB2OTGD(4) */ \
  636. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO13 GMC1RxD(5) USB2OTGD(5) */ \
  637. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO14 GMC1RxD(6) USB2OTGD(6) */ \
  638. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO15 GMC1RxD(7) USB2OTGD(7) */ \
  639. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO16 GMC1TxER USB2HostStop */ \
  640. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO17 GMC1CD USB2HostNext */ \
  641. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO18 GMC1RxER USB2HostDir */ \
  642. {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO19 GMC1TxEN USB2OTGStop */ \
  643. {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO20 GMC1CRS USB2OTGNext */ \
  644. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO21 GMC1RxDV USB2OTGDir */ \
  645. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO22 NFRDY */ \
  646. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO23 NFREN */ \
  647. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO24 NFWEN */ \
  648. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO25 NFCLE */ \
  649. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO26 NFALE */ \
  650. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO27 IRQ(0) */ \
  651. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO28 IRQ(1) */ \
  652. {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO29 IRQ(2) */ \
  653. {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO30 PerPar0 DMAReq2 IRQ(7)*/ \
  654. {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO31 PerPar1 DMAAck2 IRQ(8)*/ \
  655. }, \
  656. { \
  657. /* GPIO Core 1 */ \
  658. {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO32 PerPar2 EOT2/TC2 IRQ(9)*/ \
  659. {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO33 PerPar3 DMAReq3 IRQ(4)*/ \
  660. {GPIO1_BASE, GPIO_OUT, GPIO_ALT3, GPIO_OUT_1}, /* GPIO34 UART0_DCD_N UART1_DSR_CTS_N UART2_SOUT*/ \
  661. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO35 UART0_8PIN_DSR_N UART1_RTS_DTR_N UART2_SIN*/ \
  662. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO36 UART0_8PIN_CTS_N DMAAck3 UART3_SIN*/ \
  663. {GPIO1_BASE, GPIO_BI , GPIO_ALT2, GPIO_OUT_0}, /* GPIO37 UART0_RTS_N EOT3/TC3 UART3_SOUT*/ \
  664. {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO38 UART0_DTR_N UART1_SOUT */ \
  665. {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO39 UART0_RI_N UART1_SIN */ \
  666. {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO40 IRQ(3) */ \
  667. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO41 CS(1) */ \
  668. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO42 CS(2) */ \
  669. {GPIO1_BASE, GPIO_OUT, GPIO43_USE, GPIO_OUT_0},/* GPIO43 CS(3) DMAReq1 IRQ(10)*/ \
  670. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO44 CS(4) DMAAck1 IRQ(11)*/ \
  671. {GPIO1_BASE, GPIO_IN , GPIO_ALT3, GPIO_OUT_0}, /* GPIO45 CS(5) EOT/TC1 IRQ(12)*/ \
  672. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO46 PerAddr(5) DMAReq0 IRQ(13)*/ \
  673. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO47 PerAddr(6) DMAAck0 IRQ(14)*/ \
  674. {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO48 PerAddr(7) EOT/TC0 IRQ(15)*/ \
  675. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO49 Unselect via TraceSelect Bit */ \
  676. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO50 Unselect via TraceSelect Bit */ \
  677. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO51 Unselect via TraceSelect Bit */ \
  678. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO52 Unselect via TraceSelect Bit */ \
  679. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO53 Unselect via TraceSelect Bit */ \
  680. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO54 Unselect via TraceSelect Bit */ \
  681. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO55 Unselect via TraceSelect Bit */ \
  682. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO56 Unselect via TraceSelect Bit */ \
  683. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO57 Unselect via TraceSelect Bit */ \
  684. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO58 Unselect via TraceSelect Bit */ \
  685. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO59 Unselect via TraceSelect Bit */ \
  686. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO60 Unselect via TraceSelect Bit */ \
  687. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO61 Unselect via TraceSelect Bit */ \
  688. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO62 Unselect via TraceSelect Bit */ \
  689. {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO63 Unselect via TraceSelect Bit */ \
  690. } \
  691. }
  692. #endif
  693. #endif /* __CONFIG_H */