hikey.h 3.3 KB

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