m53menlo.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Menlosystems M53Menlo configuration
  4. * Copyright (C) 2012-2017 Marek Vasut <marex@denx.de>
  5. * Copyright (C) 2014-2017 Olaf Mandel <o.mandel@menlosystems.com>
  6. */
  7. #ifndef __M53MENLO_CONFIG_H__
  8. #define __M53MENLO_CONFIG_H__
  9. #include <asm/arch/imx-regs.h>
  10. #define CONFIG_REVISION_TAG
  11. #define CONFIG_SYS_FSL_CLK
  12. #define CONFIG_TIMESTAMP /* Print image info with timestamp */
  13. /*
  14. * Memory configurations
  15. */
  16. #define PHYS_SDRAM_1 CSD0_BASE_ADDR
  17. #define PHYS_SDRAM_1_SIZE (gd->bd->bi_dram[0].size)
  18. #define PHYS_SDRAM_2 CSD1_BASE_ADDR
  19. #define PHYS_SDRAM_2_SIZE (gd->bd->bi_dram[1].size)
  20. #define PHYS_SDRAM_SIZE (gd->ram_size)
  21. #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
  22. #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
  23. #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
  24. #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
  25. #define CONFIG_SYS_INIT_SP_OFFSET \
  26. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  27. #define CONFIG_SYS_INIT_SP_ADDR \
  28. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  29. /*
  30. * U-Boot general configurations
  31. */
  32. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
  33. #define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
  34. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  35. /* Boot argument buffer size */
  36. /*
  37. * Serial Driver
  38. */
  39. #define CONFIG_MXC_UART_BASE UART1_BASE
  40. /*
  41. * MMC Driver
  42. */
  43. #ifdef CONFIG_CMD_MMC
  44. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  45. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  46. #endif
  47. /*
  48. * NAND
  49. */
  50. #ifdef CONFIG_CMD_NAND
  51. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  52. #define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR_AXI
  53. #define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR_AXI
  54. #define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR
  55. #define CONFIG_SYS_NAND_LARGEPAGE
  56. #define CONFIG_MXC_NAND_HWECC
  57. /* Environment is in NAND */
  58. #define CONFIG_ENV_RANGE (0x00080000) /* 512 KiB */
  59. #endif
  60. /*
  61. * Ethernet on SOC (FEC)
  62. */
  63. #ifdef CONFIG_CMD_NET
  64. #define CONFIG_FEC_MXC
  65. #define IMX_FEC_BASE FEC_BASE_ADDR
  66. #define CONFIG_FEC_MXC_PHYADDR 0x0
  67. #define CONFIG_MII
  68. #define CONFIG_DISCOVER_PHY
  69. #define CONFIG_FEC_XCV_TYPE RMII
  70. #define CONFIG_ETHPRIME "FEC0"
  71. #endif
  72. /*
  73. * I2C
  74. */
  75. #ifdef CONFIG_CMD_I2C
  76. #define CONFIG_SYS_I2C
  77. #define CONFIG_SYS_I2C_MXC
  78. #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
  79. #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
  80. #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
  81. #define CONFIG_SYS_RTC_BUS_NUM 1 /* I2C2 */
  82. #endif
  83. /*
  84. * RTC
  85. */
  86. #ifdef CONFIG_CMD_DATE
  87. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  88. #define CONFIG_SYS_M41T11_BASE_YEAR 2000
  89. #endif
  90. /*
  91. * USB
  92. */
  93. #ifdef CONFIG_CMD_USB
  94. #define CONFIG_MXC_USB_PORT 1
  95. #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
  96. #define CONFIG_MXC_USB_FLAGS 0
  97. #endif
  98. /*
  99. * SATA
  100. */
  101. #ifdef CONFIG_CMD_SATA
  102. #define CONFIG_SYS_SATA_MAX_DEVICE 1
  103. #define CONFIG_DWC_AHSATA_PORT_ID 0
  104. #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_BASE_ADDR
  105. #define CONFIG_LBA48
  106. #endif
  107. /*
  108. * LCD
  109. */
  110. #define CONFIG_VIDEO_LOGO
  111. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)
  112. /* LVDS display */
  113. #define CONFIG_SYS_LDB_CLOCK 33260000
  114. #define CONFIG_IMX_VIDEO_SKIP
  115. /* IIM Fuses */
  116. #define CONFIG_FSL_IIM
  117. /* Watchdog */
  118. /*
  119. * Boot Linux
  120. */
  121. #define CONFIG_CMDLINE_TAG
  122. #define CONFIG_INITRD_TAG
  123. #define CONFIG_REVISION_TAG
  124. #define CONFIG_SETUP_MEMORY_TAGS
  125. #define CONFIG_BOOTFILE "boot/fitImage"
  126. #define CONFIG_LOADADDR 0x70800000
  127. #define CONFIG_BOOTCOMMAND "run mmc_mmc"
  128. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  129. /*
  130. * NAND SPL
  131. */
  132. #define CONFIG_SPL_TARGET "u-boot-with-nand-spl.imx"
  133. #define CONFIG_SPL_PAD_TO 0x8000
  134. #define CONFIG_SPL_STACK 0x70004000
  135. #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO
  136. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  137. #define CONFIG_SYS_NAND_OOBSIZE 64
  138. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  139. #define CONFIG_SYS_NAND_SIZE (256 * 1024 * 1024)
  140. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
  141. /*
  142. * Extra Environments
  143. */
  144. #define CONFIG_HOSTNAME "m53menlo"
  145. #define CONFIG_EXTRA_ENV_SETTINGS \
  146. "consdev=ttymxc0\0" \
  147. "baudrate=115200\0" \
  148. "bootscript=boot.scr\0" \
  149. "mmcdev=0\0" \
  150. "mmcpart=1\0" \
  151. "rootpath=/srv/\0" \
  152. "kernel_addr_r=0x72000000\0" \
  153. "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
  154. "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
  155. "netdev=eth0\0" \
  156. "splashsource=mmc_fs\0" \
  157. "splashfile=boot/usplash.bmp.gz\0" \
  158. "splashimage=0x88000000\0" \
  159. "splashpos=m,m\0" \
  160. "stdout=serial,vidconsole\0" \
  161. "stderr=serial,vidconsole\0" \
  162. "addcons=" \
  163. "setenv bootargs ${bootargs} " \
  164. "console=${consdev},${baudrate}\0" \
  165. "addip=" \
  166. "setenv bootargs ${bootargs} " \
  167. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  168. ":${hostname}:${netdev}:off\0" \
  169. "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
  170. "addmisc=" \
  171. "setenv bootargs ${bootargs} ${miscargs}\0" \
  172. "addargs=run addcons addmisc addmtd\0" \
  173. "mmcload=" \
  174. "mmc rescan ; load mmc ${mmcdev}:${mmcpart} " \
  175. "${kernel_addr_r} ${bootfile}\0" \
  176. "miscargs=nohlt panic=1\0" \
  177. "mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rw " \
  178. "rootwait\0" \
  179. "mmc_mmc=" \
  180. "run mmcload mmcargs addargs ; " \
  181. "bootm ${kernel_addr_r}\0" \
  182. "netload=tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
  183. "net_nfs=" \
  184. "run netload nfsargs addip addargs ; " \
  185. "bootm ${kernel_addr_r}\0" \
  186. "nfsargs=" \
  187. "setenv bootargs root=/dev/nfs rw " \
  188. "nfsroot=${serverip}:${rootpath}${hostname},v3,tcp\0" \
  189. "try_bootscript=" \
  190. "mmc rescan;" \
  191. "if test -e mmc 0:1 ${bootscript} ; then " \
  192. "if load mmc 0:1 ${kernel_addr_r} ${bootscript};" \
  193. "then ; " \
  194. "echo Running bootscript... ; " \
  195. "source ${kernel_addr_r} ; " \
  196. "fi ; " \
  197. "fi\0"
  198. #if defined(CONFIG_SPL_BUILD)
  199. #undef CONFIG_WATCHDOG
  200. #define CONFIG_HW_WATCHDOG
  201. #endif
  202. #endif /* __M53MENLO_CONFIG_H__ */