TQM834x.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2005
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. */
  6. /*
  7. * TQM8349 board configuration file
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. /*
  12. * High Level Configuration Options
  13. */
  14. #define CONFIG_E300 1 /* E300 Family */
  15. /* board pre init: do not call, nothing to do */
  16. /* detect the number of flash banks */
  17. /*
  18. * DDR Setup
  19. */
  20. /* DDR is system memory*/
  21. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  22. #define DDR_CASLAT_25 /* CASLAT set to 2.5 */
  23. #undef CONFIG_DDR_ECC /* only for ECC DDR module */
  24. #undef CONFIG_SPD_EEPROM /* do not use SPD EEPROM for DDR setup */
  25. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  26. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  27. #define CONFIG_SYS_MEMTEST_END 0x00100000
  28. /*
  29. * FLASH on the Local Bus
  30. */
  31. #undef CONFIG_SYS_FLASH_CHECKSUM
  32. #define CONFIG_SYS_FLASH_BASE 0x80000000 /* start of FLASH */
  33. #define CONFIG_SYS_FLASH_SIZE 8 /* FLASH size in MB */
  34. #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sectors */
  35. /*
  36. * FLASH bank number detection
  37. */
  38. /*
  39. * When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, the actual number of
  40. * Flash banks has to be determined at runtime and stored in a gloabl variable
  41. * tqm834x_num_flash_banks. The value of CONFIG_SYS_MAX_FLASH_BANKS_DETECT is
  42. * only used instead of CONFIG_SYS_MAX_FLASH_BANKS to allocate the array
  43. * flash_info, and should be made sufficiently large to accomodate the number
  44. * of banks that might actually be detected. Since most (all?) Flash related
  45. * functions use CONFIG_SYS_MAX_FLASH_BANKS as the number of actual banks on
  46. * the board, it is defined as tqm834x_num_flash_banks.
  47. */
  48. #define CONFIG_SYS_MAX_FLASH_BANKS_DETECT 2
  49. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max sectors per device */
  50. /* disable remaining mappings */
  51. #define CONFIG_SYS_BR1_PRELIM 0x00000000
  52. #define CONFIG_SYS_OR1_PRELIM 0x00000000
  53. #define CONFIG_SYS_BR2_PRELIM 0x00000000
  54. #define CONFIG_SYS_OR2_PRELIM 0x00000000
  55. #define CONFIG_SYS_BR3_PRELIM 0x00000000
  56. #define CONFIG_SYS_OR3_PRELIM 0x00000000
  57. /*
  58. * Monitor config
  59. */
  60. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  61. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  62. # define CONFIG_SYS_RAMBOOT
  63. #else
  64. # undef CONFIG_SYS_RAMBOOT
  65. #endif
  66. #define CONFIG_SYS_INIT_RAM_LOCK 1
  67. #define CONFIG_SYS_INIT_RAM_ADDR 0x20000000 /* Initial RAM address */
  68. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM*/
  69. #define CONFIG_SYS_GBL_DATA_OFFSET \
  70. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  71. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  72. /* Reserve 384 kB = 3 sect. for Mon */
  73. #define CONFIG_SYS_MONITOR_LEN (384 * 1024)
  74. /* Reserve 512 kB for malloc */
  75. #define CONFIG_SYS_MALLOC_LEN (512 * 1024)
  76. /*
  77. * Serial Port
  78. */
  79. #define CONFIG_SYS_NS16550_SERIAL
  80. #define CONFIG_SYS_NS16550_REG_SIZE 1
  81. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  82. #define CONFIG_SYS_BAUDRATE_TABLE \
  83. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  84. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
  85. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
  86. /*
  87. * I2C
  88. */
  89. #define CONFIG_SYS_I2C
  90. #define CONFIG_SYS_I2C_FSL
  91. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  92. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  93. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  94. /* I2C EEPROM, configuration for onboard EEPROMs 24C256 and 24C32 */
  95. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* 1010000x */
  96. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16 bit */
  97. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* 32 bytes/write */
  98. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 /* 10ms +/- 20% */
  99. /* I2C RTC */
  100. #define CONFIG_RTC_DS1337 /* use ds1337 rtc via i2c */
  101. #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */
  102. /*
  103. * TSEC
  104. */
  105. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  106. #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
  107. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  108. #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC2_OFFSET)
  109. #if defined(CONFIG_TSEC_ENET)
  110. #define CONFIG_TSEC1 1
  111. #define CONFIG_TSEC1_NAME "TSEC0"
  112. #define CONFIG_TSEC2 1
  113. #define CONFIG_TSEC2_NAME "TSEC1"
  114. #define TSEC1_PHY_ADDR 2
  115. #define TSEC2_PHY_ADDR 1
  116. #define TSEC1_PHYIDX 0
  117. #define TSEC2_PHYIDX 0
  118. #define TSEC1_FLAGS TSEC_GIGABIT
  119. #define TSEC2_FLAGS TSEC_GIGABIT
  120. /* Options are: TSEC[0-1] */
  121. #define CONFIG_ETHPRIME "TSEC0"
  122. #endif /* CONFIG_TSEC_ENET */
  123. #if defined(CONFIG_PCI)
  124. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  125. /* PCI1 host bridge */
  126. #define CONFIG_SYS_PCI1_MEM_BASE 0x90000000
  127. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  128. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  129. #define CONFIG_SYS_PCI1_MMIO_BASE \
  130. (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE)
  131. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  132. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  133. #define CONFIG_SYS_PCI1_IO_BASE 0xe2000000
  134. #define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE
  135. #define CONFIG_SYS_PCI1_IO_SIZE 0x1000000 /* 16M */
  136. #undef CONFIG_EEPRO100
  137. #define CONFIG_EEPRO100
  138. #undef CONFIG_TULIP
  139. #if !defined(CONFIG_PCI_PNP)
  140. #define PCI_ENET0_IOADDR CONFIG_SYS_PCI1_IO_BASE
  141. #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI1_MEM_BASE
  142. #define PCI_IDSEL_NUMBER 0x1c /* slot0 (IDSEL) = 28 */
  143. #endif
  144. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  145. #endif /* CONFIG_PCI */
  146. /*
  147. * Environment
  148. */
  149. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  150. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  151. /*
  152. * BOOTP options
  153. */
  154. #define CONFIG_BOOTP_BOOTFILESIZE
  155. /*
  156. * Miscellaneous configurable options
  157. */
  158. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  159. #undef CONFIG_WATCHDOG /* watchdog disabled */
  160. /*
  161. * For booting Linux, the board info and command line data
  162. * have to be in the first 256 MB of memory, since this is
  163. * the maximum mapped by the Linux kernel during initialization.
  164. */
  165. /* Initial Memory map for Linux */
  166. #define CONFIG_SYS_BOOTMAPSZ (256 << 20)
  167. /* System IO Config */
  168. #define CONFIG_SYS_SICRH 0
  169. #define CONFIG_SYS_SICRL SICRL_LDP_A
  170. /* PCI */
  171. #ifdef CONFIG_PCI
  172. #define CONFIG_PCI_INDIRECT_BRIDGE
  173. #endif
  174. #if defined(CONFIG_CMD_KGDB)
  175. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  176. #endif
  177. /*
  178. * Environment Configuration
  179. */
  180. /* default location for tftp and bootm */
  181. #define CONFIG_LOADADDR 400000
  182. #define CONFIG_EXTRA_ENV_SETTINGS \
  183. "netdev=eth0\0" \
  184. "hostname=tqm834x\0" \
  185. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  186. "nfsroot=${serverip}:${rootpath}\0" \
  187. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  188. "addip=setenv bootargs ${bootargs} " \
  189. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  190. ":${hostname}:${netdev}:off panic=1\0" \
  191. "addcons=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \
  192. "flash_nfs_old=run nfsargs addip addcons;" \
  193. "bootm ${kernel_addr}\0" \
  194. "flash_nfs=run nfsargs addip addcons;" \
  195. "bootm ${kernel_addr} - ${fdt_addr}\0" \
  196. "flash_self_old=run ramargs addip addcons;" \
  197. "bootm ${kernel_addr} ${ramdisk_addr}\0" \
  198. "flash_self=run ramargs addip addcons;" \
  199. "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
  200. "net_nfs_old=tftp 400000 ${bootfile};" \
  201. "run nfsargs addip addcons;bootm\0" \
  202. "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \
  203. "tftp ${fdt_addr_r} ${fdt_file}; " \
  204. "run nfsargs addip addcons; " \
  205. "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
  206. "rootpath=/opt/eldk/ppc_6xx\0" \
  207. "bootfile=tqm834x/uImage\0" \
  208. "fdtfile=tqm834x/tqm834x.dtb\0" \
  209. "kernel_addr_r=400000\0" \
  210. "fdt_addr_r=600000\0" \
  211. "ramdisk_addr_r=800000\0" \
  212. "kernel_addr=800C0000\0" \
  213. "fdt_addr=800A0000\0" \
  214. "ramdisk_addr=80300000\0" \
  215. "u-boot=tqm834x/u-boot.bin\0" \
  216. "load=tftp 200000 ${u-boot}\0" \
  217. "update=protect off 80000000 +${filesize};" \
  218. "era 80000000 +${filesize};" \
  219. "cp.b 200000 80000000 ${filesize}\0" \
  220. "upd=run load update\0" \
  221. ""
  222. #define CONFIG_BOOTCOMMAND "run flash_self"
  223. /*
  224. * JFFS2 partitions
  225. */
  226. /* mtdparts command line support */
  227. /* default mtd partition table */
  228. #endif /* __CONFIG_H */