at91-sama5_common.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Common part of configuration settings for the AT91 SAMA5 board.
  4. *
  5. * Copyright (C) 2015 Atmel Corporation
  6. * Josh Wu <josh.wu@atmel.com>
  7. */
  8. #ifndef __AT91_SAMA5_COMMON_H
  9. #define __AT91_SAMA5_COMMON_H
  10. /* ARM asynchronous clock */
  11. #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
  12. #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
  13. #ifndef CONFIG_SPL_BUILD
  14. #define CONFIG_SKIP_LOWLEVEL_INIT
  15. #endif
  16. /* general purpose I/O */
  17. #ifndef CONFIG_DM_GPIO
  18. #define CONFIG_AT91_GPIO
  19. #endif
  20. /*
  21. * BOOTP options
  22. */
  23. #define CONFIG_BOOTP_BOOTFILESIZE
  24. /*
  25. * Command line configuration.
  26. */
  27. #ifdef CONFIG_SD_BOOT
  28. #ifdef CONFIG_ENV_IS_IN_MMC
  29. #define CONFIG_SYS_MMC_ENV_DEV 0
  30. #endif
  31. #define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \
  32. "setenv dtb_name at91-${board_name}.dtb; " \
  33. "fi; " \
  34. "fatload mmc 0:1 0x21000000 ${dtb_name}; " \
  35. "fatload mmc 0:1 0x22000000 zImage; " \
  36. "bootz 0x22000000 - 0x21000000"
  37. #else
  38. #ifdef CONFIG_NAND_BOOT
  39. /* u-boot env in nand flash */
  40. #define CONFIG_BOOTCOMMAND "nand read 0x21000000 0x180000 0x80000;" \
  41. "nand read 0x22000000 0x200000 0x600000;" \
  42. "bootz 0x22000000 - 0x21000000"
  43. #elif CONFIG_SPI_BOOT
  44. /* u-boot env in serial flash, by default is bus 0 and cs 0 */
  45. #define CONFIG_BOOTCOMMAND "sf probe 0; " \
  46. "sf read 0x21000000 0x60000 0xc000; " \
  47. "sf read 0x22000000 0x6c000 0x394000; " \
  48. "bootz 0x22000000 - 0x21000000"
  49. #elif CONFIG_QSPI_BOOT
  50. #define CONFIG_BOOTCOMMAND "sf probe 0; " \
  51. "sf read 0x21000000 0x180000 0x80000; " \
  52. "sf read 0x22000000 0x200000 0x600000; " \
  53. "bootz 0x22000000 - 0x21000000"
  54. #endif
  55. #endif
  56. /* Size of malloc() pool */
  57. #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)
  58. #endif