meson64.h 2.3 KB

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