hikey.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. /* MMU Definitions */
  19. #define CONFIG_SYS_CACHELINE_SIZE 64
  20. #define CONFIG_IDENT_STRING "hikey"
  21. #define CONFIG_BOARD_EARLY_INIT_F
  22. /* Physical Memory Map */
  23. /* CONFIG_SYS_TEXT_BASE needs to align with where ATF loads bl33.bin */
  24. #define CONFIG_SYS_TEXT_BASE 0x35000000
  25. #define CONFIG_NR_DRAM_BANKS 6
  26. #define PHYS_SDRAM_1 0x00000000
  27. /* 1008 MB (the last 16Mb are secured for TrustZone by ATF*/
  28. #define PHYS_SDRAM_1_SIZE 0x3EFFFFFF
  29. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  30. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000
  31. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
  32. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x80000)
  33. /* Generic Timer Definitions */
  34. #define COUNTER_FREQUENCY 19000000
  35. /* Generic Interrupt Controller Definitions */
  36. #define GICD_BASE 0xf6801000
  37. #define GICC_BASE 0xf6802000
  38. /* Size of malloc() pool */
  39. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_8M)
  40. /* Serial port PL010/PL011 through the device model */
  41. #define CONFIG_PL01X_SERIAL
  42. #define CONFIG_BAUDRATE 115200
  43. #ifdef CONFIG_CMD_USB
  44. #define CONFIG_USB_DWC2
  45. #define CONFIG_USB_DWC2_REG_ADDR 0xF72C0000
  46. /*#define CONFIG_DWC2_DFLT_SPEED_FULL*/
  47. #define CONFIG_DWC2_ENABLE_DYNAMIC_FIFO
  48. #define CONFIG_USB_STORAGE
  49. #define CONFIG_USB_HOST_ETHER
  50. #define CONFIG_USB_ETHER_SMSC95XX
  51. #define CONFIG_USB_ETHER_ASIX
  52. #define CONFIG_MISC_INIT_R
  53. #endif
  54. #define CONFIG_HIKEY_GPIO
  55. /* SD/MMC configuration */
  56. #define CONFIG_GENERIC_MMC
  57. #define CONFIG_MMC
  58. #define CONFIG_DWMMC
  59. #define CONFIG_HIKEY_DWMMC
  60. #define CONFIG_BOUNCE_BUFFER
  61. #define CONFIG_FS_EXT4
  62. /* Command line configuration */
  63. #define CONFIG_MENU
  64. #define CONFIG_CMD_UNZIP
  65. #define CONFIG_CMD_ENV
  66. #define CONFIG_MTD_PARTITIONS
  67. /* BOOTP options */
  68. #define CONFIG_BOOTP_BOOTFILESIZE
  69. #include <config_distro_defaults.h>
  70. /* Initial environment variables */
  71. /*
  72. * Defines where the kernel and FDT will be put in RAM
  73. */
  74. /* Assume we boot with root on the seventh partition of eMMC */
  75. #define CONFIG_BOOTARGS "console=ttyAMA0,115200n8 root=/dev/mmcblk0p9 rw"
  76. #define BOOT_TARGET_DEVICES(func) \
  77. func(USB, usb, 0) \
  78. func(MMC, mmc, 1) \
  79. func(DHCP, dhcp, na)
  80. #include <config_distro_bootcmd.h>
  81. #define CONFIG_EXTRA_ENV_SETTINGS \
  82. "kernel_name=Image\0" \
  83. "kernel_addr_r=0x00080000\0" \
  84. "fdtfile=hi6220-hikey.dtb\0" \
  85. "fdt_addr_r=0x02000000\0" \
  86. "fdt_high=0xffffffffffffffff\0" \
  87. "initrd_high=0xffffffffffffffff\0" \
  88. BOOTENV
  89. /* Preserve environment on sd card */
  90. #define CONFIG_COMMAND_HISTORY
  91. #define CONFIG_ENV_SIZE 0x1000
  92. #define CONFIG_ENV_IS_IN_FAT
  93. #define FAT_ENV_INTERFACE "mmc"
  94. #define FAT_ENV_DEVICE_AND_PART "1:1"
  95. #define FAT_ENV_FILE "uboot.env"
  96. #define CONFIG_FAT_WRITE
  97. #define CONFIG_ENV_VARS_UBOOT_CONFIG
  98. /* Monitor Command Prompt */
  99. #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
  100. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  101. sizeof(CONFIG_SYS_PROMPT) + 16)
  102. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  103. #define CONFIG_SYS_LONGHELP
  104. #define CONFIG_CMDLINE_EDITING
  105. #define CONFIG_SYS_MAXARGS 64 /* max command args */
  106. #define CONFIG_SYS_NO_FLASH
  107. #endif /* __HIKEY_H */