mx7ulp_evk.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2016 Freescale Semiconductor, Inc.
  4. *
  5. * Configuration settings for the Freescale i.MX7ULP EVK board.
  6. */
  7. #ifndef __MX7ULP_EVK_CONFIG_H
  8. #define __MX7ULP_EVK_CONFIG_H
  9. #include <linux/sizes.h>
  10. #include <asm/arch/imx-regs.h>
  11. #define CONFIG_BOARD_POSTCLK_INIT
  12. #define CONFIG_SYS_BOOTM_LEN 0x1000000
  13. #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
  14. #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
  15. #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
  16. #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
  17. /* Using ULP WDOG for reset */
  18. #define WDOG_BASE_ADDR WDG1_RBASE
  19. #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
  20. #define CONFIG_INITRD_TAG
  21. #define CONFIG_CMDLINE_TAG
  22. #define CONFIG_SETUP_MEMORY_TAGS
  23. /*#define CONFIG_REVISION_TAG*/
  24. /* Size of malloc() pool */
  25. #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
  26. /* UART */
  27. #define LPUART_BASE LPUART4_RBASE
  28. /* allow to overwrite serial and ethaddr */
  29. #define CONFIG_ENV_OVERWRITE
  30. #define CONFIG_SYS_CACHELINE_SIZE 64
  31. /* Miscellaneous configurable options */
  32. #define CONFIG_SYS_PROMPT "=> "
  33. #define CONFIG_SYS_CBSIZE 512
  34. #define CONFIG_SYS_MAXARGS 256
  35. /* Physical Memory Map */
  36. #define PHYS_SDRAM 0x60000000
  37. #define PHYS_SDRAM_SIZE SZ_1G
  38. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  39. #define CONFIG_LOADADDR 0x60800000
  40. #define CONFIG_EXTRA_ENV_SETTINGS \
  41. "script=boot.scr\0" \
  42. "image=zImage\0" \
  43. "console=ttyLP0\0" \
  44. "fdt_high=0xffffffff\0" \
  45. "initrd_high=0xffffffff\0" \
  46. "fdt_file=imx7ulp-evk.dtb\0" \
  47. "fdt_addr=0x63000000\0" \
  48. "boot_fdt=try\0" \
  49. "earlycon=lpuart32,0x402D0010\0" \
  50. "ip_dyn=yes\0" \
  51. "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
  52. "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
  53. "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
  54. "mmcautodetect=yes\0" \
  55. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  56. "root=${mmcroot}\0" \
  57. "loadbootscript=" \
  58. "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  59. "bootscript=echo Running bootscript from mmc ...; " \
  60. "source\0" \
  61. "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  62. "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  63. "mmcboot=echo Booting from mmc ...; " \
  64. "run mmcargs; " \
  65. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  66. "if run loadfdt; then " \
  67. "bootz ${loadaddr} - ${fdt_addr}; " \
  68. "else " \
  69. "if test ${boot_fdt} = try; then " \
  70. "bootz; " \
  71. "else " \
  72. "echo WARN: Cannot load the DT; " \
  73. "fi; " \
  74. "fi; " \
  75. "else " \
  76. "bootz; " \
  77. "fi;\0" \
  78. "netargs=setenv bootargs console=${console},${baudrate} " \
  79. "root=/dev/nfs " \
  80. "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  81. "netboot=echo Booting from net ...; " \
  82. "run netargs; " \
  83. "if test ${ip_dyn} = yes; then " \
  84. "setenv get_cmd dhcp; " \
  85. "else " \
  86. "setenv get_cmd tftp; " \
  87. "fi; " \
  88. "usb start; "\
  89. "${get_cmd} ${image}; " \
  90. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  91. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  92. "bootz ${loadaddr} - ${fdt_addr}; " \
  93. "else " \
  94. "if test ${boot_fdt} = try; then " \
  95. "bootz; " \
  96. "else " \
  97. "echo WARN: Cannot load the DT; " \
  98. "fi; " \
  99. "fi; " \
  100. "else " \
  101. "bootz; " \
  102. "fi;\0" \
  103. #define CONFIG_BOOTCOMMAND \
  104. "mmc dev ${mmcdev}; if mmc rescan; then " \
  105. "if run loadbootscript; then " \
  106. "run bootscript; " \
  107. "else " \
  108. "if run loadimage; then " \
  109. "run mmcboot; " \
  110. "fi; " \
  111. "fi; " \
  112. "fi"
  113. #define CONFIG_SYS_HZ 1000
  114. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  115. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  116. #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
  117. #define CONFIG_SYS_INIT_SP_OFFSET \
  118. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  119. #define CONFIG_SYS_INIT_SP_ADDR \
  120. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  121. #endif /* __CONFIG_H */