s32v234evb.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2015-2016 Freescale Semiconductor, Inc.
  4. *
  5. * Configuration settings for the Freescale S32V234 EVB board.
  6. */
  7. #ifndef __CONFIG_H
  8. #define __CONFIG_H
  9. #include <asm/arch/imx-regs.h>
  10. #define CONFIG_S32V234
  11. /* Config GIC */
  12. #define CONFIG_GICV2
  13. #define GICD_BASE 0x7D001000
  14. #define GICC_BASE 0x7D002000
  15. #define CONFIG_REMAKE_ELF
  16. #undef CONFIG_RUN_FROM_IRAM_ONLY
  17. #define CONFIG_RUN_FROM_DDR1
  18. #undef CONFIG_RUN_FROM_DDR0
  19. /* Run by default from DDR1 */
  20. #ifdef CONFIG_RUN_FROM_DDR0
  21. #define DDR_BASE_ADDR 0x80000000
  22. #else
  23. #define DDR_BASE_ADDR 0xC0000000
  24. #endif
  25. #define CONFIG_MACH_TYPE 4146
  26. #define CONFIG_SKIP_LOWLEVEL_INIT
  27. /* Config CACHE */
  28. #define CONFIG_CMD_CACHE
  29. #define CONFIG_SYS_FULL_VA
  30. /* Enable passing of ATAGs */
  31. #define CONFIG_CMDLINE_TAG
  32. /* SMP Spin Table Definitions */
  33. #define CPU_RELEASE_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
  34. /* Generic Timer Definitions */
  35. #define COUNTER_FREQUENCY (1000000000) /* 1000MHz */
  36. #define CONFIG_SYS_FSL_ERRATUM_A008585
  37. /* Size of malloc() pool */
  38. #ifdef CONFIG_RUN_FROM_IRAM_ONLY
  39. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1 * 1024 * 1024)
  40. #else
  41. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
  42. #endif
  43. #define LINFLEXUART_BASE LINFLEXD0_BASE_ADDR
  44. #define CONFIG_DEBUG_UART_LINFLEXUART
  45. #define CONFIG_DEBUG_UART_BASE LINFLEXUART_BASE
  46. /* Allow to overwrite serial and ethaddr */
  47. #define CONFIG_ENV_OVERWRITE
  48. #define CONFIG_SYS_UART_PORT (1)
  49. #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC_BASE_ADDR
  50. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  51. #define CONFIG_CMD_MMC
  52. /* #define CONFIG_CMD_EXT2 EXT2 Support */
  53. #if 0
  54. /* Ethernet config */
  55. #define CONFIG_CMD_MII
  56. #define CONFIG_FEC_MXC
  57. #define IMX_FEC_BASE ENET_BASE_ADDR
  58. #define CONFIG_FEC_XCV_TYPE RMII
  59. #define CONFIG_FEC_MXC_PHYADDR 0
  60. #endif
  61. #if 0 /* Disable until the FLASH will be implemented */
  62. #define CONFIG_SYS_USE_NAND
  63. #endif
  64. #ifdef CONFIG_SYS_USE_NAND
  65. /* Nand Flash Configs */
  66. #define CONFIG_JFFS2_NAND
  67. #define MTD_NAND_FSL_NFC_SWECC 1
  68. #define CONFIG_NAND_FSL_NFC
  69. #define CONFIG_SYS_NAND_BASE 0x400E0000
  70. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  71. #define NAND_MAX_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
  72. #define CONFIG_SYS_NAND_SELECT_DEVICE
  73. #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
  74. #endif
  75. #define CONFIG_LOADADDR 0xC307FFC0
  76. #define CONFIG_EXTRA_ENV_SETTINGS \
  77. "boot_scripts=boot.scr.uimg boot.scr\0" \
  78. "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
  79. "console=ttyLF0,115200\0" \
  80. "fdt_file=s32v234-evb.dtb\0" \
  81. "fdt_high=0xffffffff\0" \
  82. "initrd_high=0xffffffff\0" \
  83. "fdt_addr_r=0xC2000000\0" \
  84. "kernel_addr_r=0xC307FFC0\0" \
  85. "ramdisk_addr_r=0xC4000000\0" \
  86. "ramdisk=rootfs.uimg\0"\
  87. "ip_dyn=yes\0" \
  88. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  89. "update_sd_firmware_filename=u-boot.imx\0" \
  90. "update_sd_firmware=" \
  91. "if test ${ip_dyn} = yes; then " \
  92. "setenv get_cmd dhcp; " \
  93. "else " \
  94. "setenv get_cmd tftp; " \
  95. "fi; " \
  96. "if mmc dev ${mmcdev}; then " \
  97. "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  98. "setexpr fw_sz ${filesize} / 0x200; " \
  99. "setexpr fw_sz ${fw_sz} + 1; " \
  100. "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  101. "fi; " \
  102. "fi\0" \
  103. "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr} ${ramdisk}\0" \
  104. "jtagboot=echo Booting using jtag...; " \
  105. "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
  106. "jtagsdboot=echo Booting loading Linux with ramdisk from SD...; " \
  107. "run loaduimage; run loadramdisk; run loadfdt;"\
  108. "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
  109. "boot_net_usb_start=true\0" \
  110. BOOTENV
  111. #define BOOT_TARGET_DEVICES(func) \
  112. func(MMC, mmc, 1) \
  113. func(MMC, mmc, 0) \
  114. func(DHCP, dhcp, na)
  115. #define CONFIG_BOOTCOMMAND \
  116. "run distro_bootcmd"
  117. #include <config_distro_bootcmd.h>
  118. /* Miscellaneous configurable options */
  119. #define CONFIG_SYS_PROMPT "=> "
  120. #define CONFIG_SYS_MEMTEST_START (DDR_BASE_ADDR)
  121. #define CONFIG_SYS_MEMTEST_END (DDR_BASE_ADDR + 0x7C00000)
  122. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  123. #define CONFIG_SYS_HZ 1000
  124. #ifdef CONFIG_RUN_FROM_IRAM_ONLY
  125. #define CONFIG_SYS_MALLOC_BASE (DDR_BASE_ADDR)
  126. #endif
  127. #if 0
  128. /* Configure PXE */
  129. #define CONFIG_BOOTP_PXE_CLIENTARCH 0x100
  130. #endif
  131. /* Physical memory map */
  132. /* EVB board has 2x256 MB DDR chips, DDR0 and DDR1, u-boot is using just one */
  133. #define PHYS_SDRAM (DDR_BASE_ADDR)
  134. #define PHYS_SDRAM_SIZE (256 * 1024 * 1024)
  135. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  136. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  137. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  138. #define CONFIG_SYS_INIT_SP_OFFSET \
  139. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  140. #define CONFIG_SYS_INIT_SP_ADDR \
  141. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  142. /* environment organization */
  143. #define CONFIG_SYS_MMC_ENV_DEV 0
  144. #define CONFIG_BOOTP_BOOTFILESIZE
  145. #endif