hikey.h 2.5 KB

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