s5pc210_universal.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2010 Samsung Electronics
  4. * Minkyu Kang <mk7.kang@samsung.com>
  5. *
  6. * Configuation settings for the SAMSUNG Universal (EXYNOS4210) board.
  7. */
  8. #ifndef __CONFIG_UNIVERSAL_H
  9. #define __CONFIG_UNIVERSAL_H
  10. #include <configs/exynos4-common.h>
  11. #define CONFIG_TIZEN /* TIZEN lib */
  12. /* Keep L2 Cache Disabled */
  13. #define CONFIG_SYS_L2CACHE_OFF 1
  14. /* Universal has 2 banks of DRAM */
  15. #define CONFIG_SYS_SDRAM_BASE 0x40000000
  16. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
  17. #define SDRAM_BANK_SIZE (256 << 20) /* 256 MB */
  18. #define CONFIG_BOOTCOMMAND "run mmcboot"
  19. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \
  20. - GENERATED_GBL_DATA_SIZE)
  21. #define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */
  22. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  23. /* memtest works on */
  24. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4800000)
  25. /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
  26. #define NORMAL_MTDPARTS_DEFAULT CONFIG_MTDPARTS_DEFAULT
  27. #define MBRPARTS_DEFAULT "20M(permanent)"\
  28. ",20M(boot)"\
  29. ",1G(system)"\
  30. ",100M(swap)"\
  31. ",-(UMS)\0"
  32. #define CONFIG_ENV_UBI_MTD " ubi.mtd=${ubiblock} ubi.mtd=4 ubi.mtd=7"
  33. #define CONFIG_BOOTBLOCK "10"
  34. #define CONFIG_UBIBLOCK "9"
  35. #define CONFIG_ENV_UBIFS_OPTION " rootflags=bulk_read,no_chk_data_crc "
  36. #define CONFIG_ENV_FLASHBOOT CONFIG_ENV_UBI_MTD CONFIG_ENV_UBIFS_OPTION \
  37. "${mtdparts}"
  38. #define CONFIG_ENV_COMMON_BOOT "${console} ${meminfo}"
  39. #define CONFIG_EXTRA_ENV_SETTINGS \
  40. "updateb=" \
  41. "onenand erase 0x0 0x100000;" \
  42. "onenand write 0x42008000 0x0 0x100000\0" \
  43. "updatek=" \
  44. "onenand erase 0xc00000 0x500000;" \
  45. "onenand write 0x41008000 0xc00000 0x500000\0" \
  46. "bootk=" \
  47. "run loaduimage; bootm 0x40007FC0\0" \
  48. "updatebackup=" \
  49. "mmc dev 0 2; mmc write 0 0x42100000 0 0x200;" \
  50. "mmc dev 0 0\0" \
  51. "updatebootb=" \
  52. "mmc read 0 0x42100000 0x80 0x200; run updatebackup\0" \
  53. "lpj=lpj=3981312\0" \
  54. "ubifsboot=" \
  55. "set bootargs root=ubi0!rootfs rootfstype=ubifs ${lpj} " \
  56. CONFIG_ENV_FLASHBOOT " ${opts} ${lcdinfo} " \
  57. CONFIG_ENV_COMMON_BOOT "; run bootk\0" \
  58. "tftpboot=" \
  59. "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
  60. CONFIG_ENV_FLASHBOOT " ${opts} ${lcdinfo} " \
  61. CONFIG_ENV_COMMON_BOOT \
  62. "; tftp 0x40007FC0 uImage; bootm 0x40007FC0\0" \
  63. "nfsboot=" \
  64. "set bootargs root=/dev/nfs rw " \
  65. "nfsroot=${nfsroot},nolock,tcp " \
  66. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  67. "${netmask}:generic:usb0:off " CONFIG_ENV_COMMON_BOOT \
  68. "; run bootk\0" \
  69. "ramfsboot=" \
  70. "set bootargs root=/dev/ram0 rw rootfstype=ext2 " \
  71. "${console} ${meminfo} " \
  72. "initrd=0x43000000,8M ramdisk=8192\0" \
  73. "mmcboot=" \
  74. "set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
  75. "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \
  76. "run loaduimage; bootm 0x40007FC0\0" \
  77. "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
  78. "boottrace=setenv opts initcall_debug; run bootcmd\0" \
  79. "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
  80. "verify=n\0" \
  81. "rootfstype=ext4\0" \
  82. "console=console=ttySAC1,115200n8\0" \
  83. "mtdparts=" CONFIG_MTDPARTS_DEFAULT \
  84. "mbrparts=" MBRPARTS_DEFAULT \
  85. "meminfo=crashkernel=32M@0x50000000\0" \
  86. "nfsroot=/nfsroot/arm\0" \
  87. "bootblock=" CONFIG_BOOTBLOCK "\0" \
  88. "ubiblock=" CONFIG_UBIBLOCK" \0" \
  89. "ubi=enabled\0" \
  90. "loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage\0" \
  91. "mmcdev=0\0" \
  92. "mmcbootpart=2\0" \
  93. "mmcrootpart=3\0" \
  94. "opts=always_resume=1"
  95. #define CONFIG_USE_ONENAND_BOARD_INIT
  96. #define CONFIG_SAMSUNG_ONENAND
  97. #define CONFIG_SYS_ONENAND_BASE 0x0C000000
  98. #define CONFIG_USB_GADGET_DWC2_OTG_PHY
  99. /*
  100. * SPI Settings
  101. */
  102. #define CONFIG_SOFT_SPI
  103. #ifndef __ASSEMBLY__
  104. void universal_spi_scl(int bit);
  105. void universal_spi_sda(int bit);
  106. int universal_spi_read(void);
  107. #endif
  108. /* Common misc for Samsung */
  109. #define CONFIG_MISC_COMMON
  110. /* Download menu - Samsung common */
  111. #define CONFIG_LCD_MENU
  112. /* Download menu - definitions for check keys */
  113. #ifndef __ASSEMBLY__
  114. #define KEY_PWR_PMIC_NAME "MAX8998_PMIC"
  115. #define KEY_PWR_STATUS_REG MAX8998_REG_STATUS1
  116. #define KEY_PWR_STATUS_MASK (1 << 7)
  117. #define KEY_PWR_INTERRUPT_REG MAX8998_REG_IRQ1
  118. #define KEY_PWR_INTERRUPT_MASK (1 << 7)
  119. #define KEY_VOL_UP_GPIO EXYNOS4_GPIO_X20
  120. #define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21
  121. #endif /* __ASSEMBLY__ */
  122. /* LCD console */
  123. #define LCD_BPP LCD_COLOR16
  124. /*
  125. * LCD Settings
  126. */
  127. #define CONFIG_LD9040
  128. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
  129. #endif /* __CONFIG_H */