meson64.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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)
  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 CONFIG_VIDEO_BMP_RLE8
  19. #define CONFIG_BMP_16BPP
  20. #define CONFIG_BMP_24BPP
  21. #define CONFIG_BMP_32BPP
  22. #define CONFIG_SPLASH_SCREEN
  23. #define CONFIG_SPLASH_SCREEN_ALIGN
  24. #define STDOUT_CFG "vidconsole,serial"
  25. #else
  26. #define STDOUT_CFG "serial"
  27. #endif
  28. #ifdef CONFIG_USB_KEYBOARD
  29. #define STDIN_CFG "usbkbd,serial"
  30. #else
  31. #define STDIN_CFG "serial"
  32. #endif
  33. #define CONFIG_CPU_ARMV8
  34. #define CONFIG_REMAKE_ELF
  35. #define CONFIG_SYS_MAXARGS 32
  36. #define CONFIG_SYS_MALLOC_LEN (32 << 20)
  37. #define CONFIG_SYS_CBSIZE 1024
  38. #define CONFIG_SYS_SDRAM_BASE 0
  39. #define CONFIG_SYS_INIT_SP_ADDR 0x20000000
  40. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE
  41. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64 MiB */
  42. /* ROM USB boot support, auto-execute boot.scr at scriptaddr */
  43. #define BOOTENV_DEV_ROMUSB(devtypeu, devtypel, instance) \
  44. "bootcmd_romusb=" \
  45. "if test \"${boot_source}\" = \"usb\" && " \
  46. "test -n \"${scriptaddr}\"; then " \
  47. "echo '(ROM USB boot)'; " \
  48. "source ${scriptaddr}; " \
  49. "fi\0"
  50. #define BOOTENV_DEV_NAME_ROMUSB(devtypeu, devtypel, instance) \
  51. "romusb "
  52. #ifdef CONFIG_CMD_USB
  53. #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
  54. #else
  55. #define BOOT_TARGET_DEVICES_USB(func)
  56. #endif
  57. #ifndef BOOT_TARGET_DEVICES
  58. #define BOOT_TARGET_DEVICES(func) \
  59. func(ROMUSB, romusb, na) \
  60. func(MMC, mmc, 0) \
  61. func(MMC, mmc, 1) \
  62. func(MMC, mmc, 2) \
  63. BOOT_TARGET_DEVICES_USB(func) \
  64. func(PXE, pxe, na) \
  65. func(DHCP, dhcp, na)
  66. #endif
  67. #ifndef CONFIG_EXTRA_ENV_SETTINGS
  68. #define CONFIG_EXTRA_ENV_SETTINGS \
  69. "stdin=" STDIN_CFG "\0" \
  70. "stdout=" STDOUT_CFG "\0" \
  71. "stderr=" STDOUT_CFG "\0" \
  72. "fdt_addr_r=0x08008000\0" \
  73. "scriptaddr=0x08000000\0" \
  74. "kernel_addr_r=0x08080000\0" \
  75. "pxefile_addr_r=0x01080000\0" \
  76. "ramdisk_addr_r=0x13000000\0" \
  77. "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
  78. BOOTENV
  79. #endif
  80. #include <config_distro_bootcmd.h>
  81. #endif /* __MESON64_CONFIG_H */