s32v234evb.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. /* Enable passing of ATAGs */
  28. #define CONFIG_CMDLINE_TAG
  29. /* SMP Spin Table Definitions */
  30. #define CPU_RELEASE_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
  31. /* Generic Timer Definitions */
  32. #define COUNTER_FREQUENCY (1000000000) /* 1000MHz */
  33. #define CONFIG_SYS_FSL_ERRATUM_A008585
  34. /* Size of malloc() pool */
  35. #ifdef CONFIG_RUN_FROM_IRAM_ONLY
  36. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1 * 1024 * 1024)
  37. #else
  38. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
  39. #endif
  40. #define LINFLEXUART_BASE LINFLEXD0_BASE_ADDR
  41. #define CONFIG_DEBUG_UART_LINFLEXUART
  42. #define CONFIG_DEBUG_UART_BASE LINFLEXUART_BASE
  43. /* Allow to overwrite serial and ethaddr */
  44. #define CONFIG_ENV_OVERWRITE
  45. #define CONFIG_SYS_UART_PORT (1)
  46. #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC_BASE_ADDR
  47. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  48. #if 0
  49. /* Ethernet config */
  50. #define CONFIG_FEC_MXC
  51. #define IMX_FEC_BASE ENET_BASE_ADDR
  52. #define CONFIG_FEC_XCV_TYPE RMII
  53. #define CONFIG_FEC_MXC_PHYADDR 0
  54. #endif
  55. #if 0 /* Disable until the FLASH will be implemented */
  56. #define CONFIG_SYS_USE_NAND
  57. #endif
  58. #ifdef CONFIG_SYS_USE_NAND
  59. /* Nand Flash Configs */
  60. #define CONFIG_JFFS2_NAND
  61. #define MTD_NAND_FSL_NFC_SWECC 1
  62. #define CONFIG_NAND_FSL_NFC
  63. #define CONFIG_SYS_NAND_BASE 0x400E0000
  64. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  65. #define NAND_MAX_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
  66. #define CONFIG_SYS_NAND_SELECT_DEVICE
  67. #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
  68. #endif
  69. #define CONFIG_LOADADDR 0xC307FFC0
  70. #define CONFIG_EXTRA_ENV_SETTINGS \
  71. "boot_scripts=boot.scr.uimg boot.scr\0" \
  72. "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
  73. "console=ttyLF0,115200\0" \
  74. "fdt_file=s32v234-evb.dtb\0" \
  75. "fdt_high=0xffffffff\0" \
  76. "initrd_high=0xffffffff\0" \
  77. "fdt_addr_r=0xC2000000\0" \
  78. "kernel_addr_r=0xC307FFC0\0" \
  79. "ramdisk_addr_r=0xC4000000\0" \
  80. "ramdisk=rootfs.uimg\0"\
  81. "ip_dyn=yes\0" \
  82. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  83. "update_sd_firmware_filename=u-boot.imx\0" \
  84. "update_sd_firmware=" \
  85. "if test ${ip_dyn} = yes; then " \
  86. "setenv get_cmd dhcp; " \
  87. "else " \
  88. "setenv get_cmd tftp; " \
  89. "fi; " \
  90. "if mmc dev ${mmcdev}; then " \
  91. "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  92. "setexpr fw_sz ${filesize} / 0x200; " \
  93. "setexpr fw_sz ${fw_sz} + 1; " \
  94. "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  95. "fi; " \
  96. "fi\0" \
  97. "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr} ${ramdisk}\0" \
  98. "jtagboot=echo Booting using jtag...; " \
  99. "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
  100. "jtagsdboot=echo Booting loading Linux with ramdisk from SD...; " \
  101. "run loaduimage; run loadramdisk; run loadfdt;"\
  102. "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
  103. "boot_net_usb_start=true\0" \
  104. BOOTENV
  105. #define BOOT_TARGET_DEVICES(func) \
  106. func(MMC, mmc, 1) \
  107. func(MMC, mmc, 0) \
  108. func(DHCP, dhcp, na)
  109. #define CONFIG_BOOTCOMMAND \
  110. "run distro_bootcmd"
  111. #include <config_distro_bootcmd.h>
  112. #include <linux/stringify.h>
  113. /* Miscellaneous configurable options */
  114. #define CONFIG_SYS_PROMPT "=> "
  115. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  116. #define CONFIG_SYS_HZ 1000
  117. #ifdef CONFIG_RUN_FROM_IRAM_ONLY
  118. #define CONFIG_SYS_MALLOC_BASE (DDR_BASE_ADDR)
  119. #endif
  120. /* Physical memory map */
  121. /* EVB board has 2x256 MB DDR chips, DDR0 and DDR1, u-boot is using just one */
  122. #define PHYS_SDRAM (DDR_BASE_ADDR)
  123. #define PHYS_SDRAM_SIZE (256 * 1024 * 1024)
  124. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  125. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  126. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  127. #define CONFIG_SYS_INIT_SP_OFFSET \
  128. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  129. #define CONFIG_SYS_INIT_SP_ADDR \
  130. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  131. /* environment organization */
  132. #define CONFIG_SYS_MMC_ENV_DEV 0
  133. #define CONFIG_BOOTP_BOOTFILESIZE
  134. #endif