s5p_goni.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. /*
  2. * Copyright (C) 2009 Samsung Electronics
  3. * Minkyu Kang <mk7.kang@samsung.com>
  4. * Kyungmin Park <kyungmin.park@samsung.com>
  5. *
  6. * Configuation settings for the SAMSUNG Universal (s5pc100) board.
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. /* High Level Configuration Options */
  29. #define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
  30. #define CONFIG_S5P 1 /* which is in a S5P Family */
  31. #define CONFIG_S5PC110 1 /* which is in a S5PC110 */
  32. #define CONFIG_MACH_GONI 1 /* working with Goni */
  33. #include <asm/arch/cpu.h> /* get chip and board defs */
  34. #define CONFIG_ARCH_CPU_INIT
  35. #define CONFIG_DISPLAY_CPUINFO
  36. #define CONFIG_DISPLAY_BOARDINFO
  37. /* input clock of PLL: has 24MHz input clock at S5PC110 */
  38. #define CONFIG_SYS_CLK_FREQ_C110 24000000
  39. /* DRAM Base */
  40. #define CONFIG_SYS_SDRAM_BASE 0x30000000
  41. #define CONFIG_SETUP_MEMORY_TAGS
  42. #define CONFIG_CMDLINE_TAG
  43. #define CONFIG_INITRD_TAG
  44. #define CONFIG_CMDLINE_EDITING
  45. /*
  46. * Size of malloc() pool
  47. * 1MB = 0x100000, 0x100000 = 1024 * 1024
  48. */
  49. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20))
  50. /*
  51. * select serial console configuration
  52. */
  53. #define CONFIG_SERIAL2 1 /* use SERIAL2 */
  54. #define CONFIG_SERIAL_MULTI 1
  55. #define CONFIG_BAUDRATE 115200
  56. /* MMC */
  57. #define CONFIG_GENERIC_MMC
  58. #define CONFIG_MMC
  59. #define CONFIG_SDHCI
  60. #define CONFIG_S5P_SDHCI
  61. /* PWM */
  62. #define CONFIG_PWM 1
  63. /* It should define before config_cmd_default.h */
  64. #define CONFIG_SYS_NO_FLASH 1
  65. /* Command definition */
  66. #include <config_cmd_default.h>
  67. #undef CONFIG_CMD_FPGA
  68. #undef CONFIG_CMD_MISC
  69. #undef CONFIG_CMD_NET
  70. #undef CONFIG_CMD_NFS
  71. #undef CONFIG_CMD_XIMG
  72. #define CONFIG_CMD_CACHE
  73. #define CONFIG_CMD_REGINFO
  74. #define CONFIG_CMD_ONENAND
  75. #define CONFIG_CMD_MTDPARTS
  76. #define CONFIG_CMD_MMC
  77. #define CONFIG_BOOTDELAY 1
  78. #define CONFIG_ZERO_BOOTDELAY_CHECK
  79. #define CONFIG_MTD_DEVICE
  80. #define CONFIG_MTD_PARTITIONS
  81. /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
  82. #define MTDIDS_DEFAULT "onenand0=samsung-onenand"
  83. #define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:1m(bootloader)"\
  84. ",256k(params)"\
  85. ",2816k(config)"\
  86. ",8m(csa)"\
  87. ",7m(kernel)"\
  88. ",1m(log)"\
  89. ",12m(modem)"\
  90. ",60m(qboot)"\
  91. ",-(UBI)\0"
  92. #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
  93. #define CONFIG_BOOTCOMMAND "run ubifsboot"
  94. #define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
  95. #define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext2" \
  96. " ${console} ${meminfo}"
  97. #define CONFIG_COMMON_BOOT "${console} ${meminfo} ${mtdparts}"
  98. #define CONFIG_BOOTARGS "root=/dev/mtdblock8 ubi.mtd=8 ubi.mtd=3 ubi.mtd=6" \
  99. " rootfstype=cramfs " CONFIG_COMMON_BOOT
  100. #define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x100000;" \
  101. " onenand write 0x32008000 0x0 0x100000\0"
  102. #define CONFIG_UBI_MTD " ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6"
  103. #define CONFIG_UBIFS_OPTION "rootflags=bulk_read,no_chk_data_crc"
  104. #define CONFIG_ENV_OVERWRITE
  105. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  106. #define CONFIG_EXTRA_ENV_SETTINGS \
  107. CONFIG_UPDATEB \
  108. "updatek=" \
  109. "onenand erase 0xc00000 0x600000;" \
  110. "onenand write 0x31008000 0xc00000 0x600000\0" \
  111. "updateu=" \
  112. "onenand erase 0x01560000 0x1eaa0000;" \
  113. "onenand write 0x32000000 0x1260000 0x8C0000\0" \
  114. "bootk=" \
  115. "onenand read 0x30007FC0 0xc00000 0x600000;" \
  116. "bootm 0x30007FC0\0" \
  117. "flashboot=" \
  118. "set bootargs root=/dev/mtdblock${bootblock} " \
  119. "rootfstype=${rootfstype}" CONFIG_UBI_MTD " ${opts} " \
  120. "${lcdinfo} " CONFIG_COMMON_BOOT "; run bootk\0" \
  121. "ubifsboot=" \
  122. "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
  123. CONFIG_UBIFS_OPTION CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
  124. CONFIG_COMMON_BOOT "; run bootk\0" \
  125. "tftpboot=" \
  126. "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
  127. CONFIG_UBIFS_OPTION CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
  128. CONFIG_COMMON_BOOT "; tftp 0x30007FC0 uImage; " \
  129. "bootm 0x30007FC0\0" \
  130. "ramboot=" \
  131. "set bootargs " CONFIG_RAMDISK_BOOT \
  132. " initrd=0x33000000,8M ramdisk=8192\0" \
  133. "mmcboot=" \
  134. "set bootargs root=${mmcblk} rootfstype=${rootfstype}" \
  135. CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
  136. CONFIG_COMMON_BOOT "; run bootk\0" \
  137. "boottrace=setenv opts initcall_debug; run bootcmd\0" \
  138. "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
  139. "verify=n\0" \
  140. "rootfstype=cramfs\0" \
  141. "console=" CONFIG_DEFAULT_CONSOLE \
  142. "mtdparts=" MTDPARTS_DEFAULT \
  143. "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
  144. "mmcblk=/dev/mmcblk1p1\0" \
  145. "bootblock=9\0" \
  146. "ubiblock=8\0" \
  147. "ubi=enabled\0" \
  148. "opts=always_resume=1"
  149. /* Miscellaneous configurable options */
  150. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  151. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  152. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  153. #define CONFIG_SYS_PROMPT "Goni # "
  154. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  155. #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
  156. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  157. /* Boot Argument Buffer Size */
  158. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  159. /* memtest works on */
  160. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  161. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000)
  162. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4000000)
  163. #define CONFIG_SYS_HZ 1000
  164. /* valid baudrates */
  165. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  166. /* Stack sizes */
  167. #define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
  168. /* Goni has 3 banks of DRAM, but swap the bank */
  169. #define CONFIG_NR_DRAM_BANKS 3
  170. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */
  171. #define PHYS_SDRAM_1_SIZE (80 << 20) /* 80 MB in Bank #0 */
  172. #define PHYS_SDRAM_2 0x40000000 /* mDDR DMC1 Bank #1 */
  173. #define PHYS_SDRAM_2_SIZE (256 << 20) /* 256 MB in Bank #1 */
  174. #define PHYS_SDRAM_3 0x50000000 /* mDDR DMC2 Bank #2 */
  175. #define PHYS_SDRAM_3_SIZE (128 << 20) /* 128 MB in Bank #2 */
  176. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  177. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 KiB */
  178. /* FLASH and environment organization */
  179. #define CONFIG_ENV_IS_IN_ONENAND 1
  180. #define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB, 0x40000 */
  181. #define CONFIG_ENV_ADDR (1 << 20) /* 1 MB, 0x100000 */
  182. #define CONFIG_USE_ONENAND_BOARD_INIT
  183. #define CONFIG_SAMSUNG_ONENAND 1
  184. #define CONFIG_SYS_ONENAND_BASE 0xB0000000
  185. #define CONFIG_DOS_PARTITION 1
  186. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
  187. #define CONFIG_SYS_CACHELINE_SIZE 64
  188. #define CONFIG_PMIC
  189. #define CONFIG_PMIC_I2C
  190. #define CONFIG_PMIC_MAX8998
  191. #include <asm/arch/gpio.h>
  192. /*
  193. * I2C Settings
  194. */
  195. #define CONFIG_SOFT_I2C_GPIO_SCL s5pc110_gpio_get_nr(j4, 3)
  196. #define CONFIG_SOFT_I2C_GPIO_SDA s5pc110_gpio_get_nr(j4, 0)
  197. #define CONFIG_SOFT_I2C 1
  198. #define CONFIG_SYS_I2C_SPEED 50000
  199. #define CONFIG_I2C_MULTI_BUS
  200. #define CONFIG_SYS_MAX_I2C_BUS 7
  201. #define CONFIG_USB_GADGET
  202. #define CONFIG_USB_GADGET_S3C_UDC_OTG
  203. #define CONFIG_USB_GADGET_DUALSPEED
  204. #endif /* __CONFIG_H */