meson64.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuration for Amlogic Meson 64bits SoCs
  4. * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com>
  5. */
  6. #ifndef __MESON64_CONFIG_H
  7. #define __MESON64_CONFIG_H
  8. /* Generic Interrupt Controller Definitions */
  9. #if (defined(CONFIG_MESON_AXG) || defined(CONFIG_MESON_G12A))
  10. #define GICD_BASE 0xffc01000
  11. #define GICC_BASE 0xffc02000
  12. #else /* MESON GXL and GXBB */
  13. #define GICD_BASE 0xc4301000
  14. #define GICC_BASE 0xc4302000
  15. #endif
  16. /* For splashscreen */
  17. #ifdef CONFIG_DM_VIDEO
  18. #define STDOUT_CFG "vidconsole,serial"
  19. #else
  20. #define STDOUT_CFG "serial"
  21. #endif
  22. #ifdef CONFIG_USB_KEYBOARD
  23. #define STDIN_CFG "usbkbd,serial"
  24. #else
  25. #define STDIN_CFG "serial"
  26. #endif
  27. #define CONFIG_CPU_ARMV8
  28. #define CONFIG_REMAKE_ELF
  29. #define CONFIG_SYS_MAXARGS 32
  30. #ifndef CONFIG_SYS_MALLOC_LEN
  31. #define CONFIG_SYS_MALLOC_LEN (32 << 20)
  32. #endif
  33. #define CONFIG_SYS_CBSIZE 1024
  34. #define CONFIG_SYS_SDRAM_BASE 0
  35. #define CONFIG_SYS_INIT_SP_ADDR 0x20000000
  36. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE
  37. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64 MiB */
  38. /* ROM USB boot support, auto-execute boot.scr at scriptaddr */
  39. #define BOOTENV_DEV_ROMUSB(devtypeu, devtypel, instance) \
  40. "bootcmd_romusb=" \
  41. "if test \"${boot_source}\" = \"usb\" && " \
  42. "test -n \"${scriptaddr}\"; then " \
  43. "echo '(ROM USB boot)'; " \
  44. "source ${scriptaddr}; " \
  45. "fi\0"
  46. #define BOOTENV_DEV_NAME_ROMUSB(devtypeu, devtypel, instance) \
  47. "romusb "
  48. #ifdef CONFIG_CMD_USB
  49. #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
  50. #else
  51. #define BOOT_TARGET_DEVICES_USB(func)
  52. #endif
  53. #ifdef CONFIG_CMD_NVME
  54. #define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
  55. #else
  56. #define BOOT_TARGET_NVME(func)
  57. #endif
  58. #ifndef BOOT_TARGET_DEVICES
  59. #define BOOT_TARGET_DEVICES(func) \
  60. func(ROMUSB, romusb, na) \
  61. func(MMC, mmc, 0) \
  62. func(MMC, mmc, 1) \
  63. func(MMC, mmc, 2) \
  64. BOOT_TARGET_DEVICES_USB(func) \
  65. BOOT_TARGET_NVME(func) \
  66. func(PXE, pxe, na) \
  67. func(DHCP, dhcp, na)
  68. #endif
  69. #include <config_distro_bootcmd.h>
  70. #ifndef CONFIG_EXTRA_ENV_SETTINGS
  71. #define CONFIG_EXTRA_ENV_SETTINGS \
  72. "stdin=" STDIN_CFG "\0" \
  73. "stdout=" STDOUT_CFG "\0" \
  74. "stderr=" STDOUT_CFG "\0" \
  75. "kernel_comp_addr_r=0x0d080000\0" \
  76. "kernel_comp_size=0x2000000\0" \
  77. "fdt_addr_r=0x08008000\0" \
  78. "scriptaddr=0x08000000\0" \
  79. "kernel_addr_r=0x08080000\0" \
  80. "pxefile_addr_r=0x01080000\0" \
  81. "fdtoverlay_addr_r=0x01000000\0" \
  82. "ramdisk_addr_r=0x13000000\0" \
  83. "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
  84. BOOTENV
  85. #endif
  86. #endif /* __MESON64_CONFIG_H */