pmdra.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /*
  2. * Copyright (C) 2008 Prodrive BV <pieter.voorthijsen@prodrive.nl>
  3. *
  4. * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef __CONFIG_H
  22. #define __CONFIG_H
  23. #include <asm/sizes.h>
  24. /*=======*/
  25. /* Board */
  26. /*=======*/
  27. #define CFG_PMDRA
  28. #define CFG_NAND_LARGEPAGE
  29. /*===================*/
  30. /* SoC Configuration */
  31. /*===================*/
  32. #define CONFIG_ARM926EJS /* arm926ejs CPU core */
  33. #define CONFIG_SYS_CLK_FREQ ((CFG_HZ_CLOCK * (CFG_DAVINCI_PLL1_PLLM + 1))/2)
  34. #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */
  35. #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */
  36. #define CFG_HZ 1000
  37. #define CFG_DAVINCI_PINMUX_0 0x00000c1f
  38. #define CFG_DAVINCI_WAITCFG 0x10000000
  39. #define CFG_DAVINCI_ACFG2 0x00460385 /* NOR CE Config */
  40. #define CFG_DAVINCI_ACFG3 0x0822218c /* NAND CE Config */
  41. #define CFG_DAVINCI_ACFG4 0x3ffffffd
  42. #define CFG_DAVINCI_ACFG5 0x3ffffffd
  43. #define CFG_DAVINCI_NANDCE 3 /* Use CE3 for NAND */
  44. #define CFG_DAVINCI_DDRCTL 0x50006405 /* DDR timing config */
  45. #define CFG_DAVINCI_SDREF 0x000005c3
  46. #define CFG_DAVINCI_SDCFG 0x00178832 /* 8 banks , CAS = 4*/
  47. #define CFG_DAVINCI_SDTIM0 0x28923211
  48. #define CFG_DAVINCI_SDTIM1 0x0016c722
  49. #define CFG_DAVINCI_MMARG_BRF0 0x00444400
  50. /* DM6446 = 0x15, DM6441 = 0x12, DM6441_LV = 0x0e */
  51. #define CFG_DAVINCI_PLL1_PLLM 0x12
  52. #define CFG_DAVINCI_PLL2_PLLM 0x17 /* 162 MHz */
  53. #define CFG_DAVINCI_PLL2_DIV1 0x0b /* 54 MHz */
  54. #define CFG_DAVINCI_PLL2_DIV2 0x01
  55. /*====================================================*/
  56. /* EEPROM definitions for Atmel 24C256BN SEEPROM chip */
  57. /* on Sonata/DV_EVM board. No EEPROM on schmoogie. */
  58. /*====================================================*/
  59. #define CFG_I2C_EEPROM_ADDR_LEN 2
  60. #define CFG_I2C_EEPROM_ADDR 0x50
  61. #define CFG_EEPROM_PAGE_WRITE_BITS 6
  62. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20
  63. /*=============*/
  64. /* Memory Info */
  65. /*=============*/
  66. #define CFG_MALLOC_LEN (0x10000 + 128*1024) /* malloc() len */
  67. #define CFG_GBL_DATA_SIZE 128 /* reserved for initial data */
  68. #define CFG_MEMTEST_START 0x80000000 /* memtest start address */
  69. #define CFG_MEMTEST_END 0x81000000 /* 16MB RAM test */
  70. #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
  71. #define CONFIG_STACKSIZE (256*1024) /* regular stack */
  72. #define PHYS_SDRAM_1 0x80000000 /* DDR Start */
  73. #define PHYS_SDRAM_1_SIZE 0x10000000 /* DDR size 256MB */
  74. #define DDR_8BANKS /* 8-bank DDR2 (256MB) */
  75. /*====================*/
  76. /* Serial Driver info */
  77. /*====================*/
  78. #define CFG_NS16550
  79. #define CFG_NS16550_SERIAL
  80. #define CFG_NS16550_REG_SIZE 4 /* NS16550 register size */
  81. #define CFG_NS16550_COM1 0x01c20000 /* Base address of UART0 */
  82. #define CFG_NS16550_COM2 0x01c20800 /* Base address of UART2 */
  83. #define CFG_NS16550_CLK 27000000 /* Input clock to NS16550 */
  84. #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
  85. #define CONFIG_BAUDRATE 115200 /* Default baud rate */
  86. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  87. /*===================*/
  88. /* I2C Configuration */
  89. /*===================*/
  90. #define CONFIG_HARD_I2C
  91. #define CONFIG_DRIVER_DAVINCI_I2C
  92. #define CFG_I2C_SPEED 50000 /* 100Kbps won't work, silicon bug */
  93. #define CFG_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */
  94. /*==================================*/
  95. /* Network & Ethernet Configuration */
  96. /*==================================*/
  97. #define CONFIG_DRIVER_TI_EMAC
  98. #define CONFIG_MII
  99. #define CONFIG_BOOTP_DEFAULT
  100. #define CONFIG_BOOTP_DNS
  101. #define CONFIG_BOOTP_DNS2
  102. #define CONFIG_BOOTP_SEND_HOSTNAME
  103. #define CONFIG_NET_RETRY_COUNT 10
  104. /*=====================*/
  105. /* Flash & Environment */
  106. /*=====================*/
  107. #define CFG_USE_NAND
  108. #define CFG_NAND_BASE 0x04000000
  109. #undef CFG_NAND_HW_ECC
  110. #define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
  111. #define NAND_MAX_CHIPS 1
  112. #define DEF_BOOTM ""
  113. #define CFG_ENV_IS_IN_FLASH 1
  114. #define CFG_FLASH_CFI_DRIVER
  115. #define CFG_FLASH_CFI
  116. #define CFG_MAX_FLASH_BANKS 1 /* max number of flash banks */
  117. #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x40000)
  118. #define CFG_ENV_OFFSET (CFG_ENV_ADDR)
  119. #define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster)*/
  120. #define PHYS_FLASH_1 0x02000000 /* CS2 Base address */
  121. #define CFG_FLASH_BASE PHYS_FLASH_1 /* Flash Base for U-Boot */
  122. #define PHYS_FLASH_SIZE 0x2000000 /* Flash size 32MB */
  123. #define CFG_MAX_FLASH_SECT (PHYS_FLASH_SIZE/CFG_FLASH_SECT_SZ)
  124. #define CFG_ENV_SECT_SIZE CFG_FLASH_SECT_SZ /* Env sector Size */
  125. #define CFG_FLASH_SECT_SZ 0x20000 /* 128KB sect size INTEL Flash */
  126. #define CFG_FLASH_PROTECTION 1
  127. /*==============================*/
  128. /* U-Boot general configuration */
  129. /*==============================*/
  130. #undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */
  131. #define CONFIG_MISC_INIT_R
  132. #define CONFIG_BOOTFILE "uImage" /* Boot file name */
  133. #define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */
  134. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  135. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print buffer sz */
  136. #define CFG_MAXARGS 16 /* max number of command args */
  137. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  138. #define CFG_LOAD_ADDR 0x80700000 /* default Linux kernel load address */
  139. #define CONFIG_VERSION_VARIABLE
  140. #define CONFIG_AUTO_COMPLETE /* Won't work with hush so far, may be later */
  141. #define CFG_HUSH_PARSER
  142. #define CFG_PROMPT_HUSH_PS2 "> "
  143. #define CONFIG_CMDLINE_EDITING
  144. #define CFG_LONGHELP
  145. #define CONFIG_CRC32_VERIFY
  146. #define CONFIG_MX_CYCLIC
  147. #define CONFIG_ENV_OVERWRITE
  148. /*===================*/
  149. /* Linux Information */
  150. /*===================*/
  151. #define LINUX_BOOT_PARAM_ADDR 0x80000100
  152. #define CONFIG_CMDLINE_TAG
  153. #define CONFIG_SETUP_MEMORY_TAGS
  154. #define CONFIG_BOOTDELAY 2
  155. #define CONFIG_BOOTARGS \
  156. "mem=120M console=ttyS0,115200n8 root=/dev/hda1 rw noinitrd ip=dhcp"
  157. #define CONFIG_BOOTCOMMAND "run nand"
  158. #define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=00:11:22:33:44:55\n"
  159. /*=================*/
  160. /* U-Boot commands */
  161. /*=================*/
  162. #include <config_cmd_default.h>
  163. #define CONFIG_CMD_ASKENV
  164. #define CONFIG_CMD_DHCP
  165. #define CONFIG_CMD_DIAG
  166. #define CONFIG_CMD_I2C
  167. #define CONFIG_CMD_MII
  168. #define CONFIG_CMD_PING
  169. #define CONFIG_CMD_SAVES
  170. #define CONFIG_CMD_EEPROM
  171. #undef CONFIG_CMD_BDI
  172. #undef CONFIG_CMD_FPGA
  173. #undef CONFIG_CMD_SETGETDCR
  174. #define CONFIG_CMD_FLASH
  175. #undef CONFIG_CMD_IMLS
  176. #define CONFIG_CMD_NAND
  177. /*=======================*/
  178. /* KGDB support (if any) */
  179. /*=======================*/
  180. #ifdef CONFIG_CMD_KGDB
  181. #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
  182. #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
  183. #endif
  184. #endif /* __CONFIG_H */