davinci_schmoogie.h 6.5 KB

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