hikey.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2015 Linaro
  4. *
  5. * Peter Griffin <peter.griffin@linaro.org>
  6. *
  7. * Configuration for HiKey 96boards CE. Parts were derived from other ARM
  8. * configurations.
  9. */
  10. #ifndef __HIKEY_H
  11. #define __HIKEY_H
  12. #include <linux/sizes.h>
  13. #define CONFIG_POWER
  14. #define CONFIG_POWER_HI6553
  15. #define CONFIG_REMAKE_ELF
  16. #define CONFIG_SYS_BOOTM_LEN SZ_64M
  17. /* Physical Memory Map */
  18. /* CONFIG_SYS_TEXT_BASE needs to align with where ATF loads bl33.bin */
  19. #define PHYS_SDRAM_1 0x00000000
  20. /* 1008 MB (the last 16Mb are secured for TrustZone by ATF*/
  21. #define PHYS_SDRAM_1_SIZE 0x3EFFFFFF
  22. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  23. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000
  24. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
  25. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x80000)
  26. /* Generic Timer Definitions */
  27. #define COUNTER_FREQUENCY 19000000
  28. /* Generic Interrupt Controller Definitions */
  29. #define GICD_BASE 0xf6801000
  30. #define GICC_BASE 0xf6802000
  31. /* Size of malloc() pool */
  32. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_8M)
  33. #ifdef CONFIG_CMD_USB
  34. #define CONFIG_USB_DWC2_REG_ADDR 0xF72C0000
  35. /*#define CONFIG_DWC2_DFLT_SPEED_FULL*/
  36. #define CONFIG_DWC2_ENABLE_DYNAMIC_FIFO
  37. #endif
  38. #define CONFIG_HIKEY_GPIO
  39. /* Command line configuration */
  40. /* BOOTP options */
  41. #define CONFIG_BOOTP_BOOTFILESIZE
  42. /* Initial environment variables */
  43. /*
  44. * Defines where the kernel and FDT will be put in RAM
  45. */
  46. #define BOOT_TARGET_DEVICES(func) \
  47. func(USB, usb, 0) \
  48. func(MMC, mmc, 1) \
  49. func(DHCP, dhcp, na)
  50. #include <config_distro_bootcmd.h>
  51. #define CONFIG_EXTRA_ENV_SETTINGS \
  52. "kernel_name=Image\0" \
  53. "kernel_addr_r=0x00080000\0" \
  54. "fdtfile=hi6220-hikey.dtb\0" \
  55. "fdt_addr_r=0x02000000\0" \
  56. "fdt_high=0xffffffffffffffff\0" \
  57. "initrd_high=0xffffffffffffffff\0" \
  58. BOOTENV
  59. /* Preserve environment on eMMC */
  60. #define CONFIG_SYS_MMC_ENV_DEV 0 /* Use eMMC */
  61. #define CONFIG_SYS_MMC_ENV_PART 2 /* Use Boot1 partition */
  62. /* Monitor Command Prompt */
  63. #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
  64. #define CONFIG_SYS_MAXARGS 64 /* max command args */
  65. #endif /* __HIKEY_H */