hsdk.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2017 Synopsys, Inc. All rights reserved.
  4. */
  5. #ifndef _CONFIG_HSDK_H_
  6. #define _CONFIG_HSDK_H_
  7. #include <linux/sizes.h>
  8. /*
  9. * CPU configuration
  10. */
  11. #define NR_CPUS 4
  12. #define ARC_PERIPHERAL_BASE 0xF0000000
  13. #define ARC_DWMMC_BASE (ARC_PERIPHERAL_BASE + 0xA000)
  14. #define ARC_DWGMAC_BASE (ARC_PERIPHERAL_BASE + 0x18000)
  15. /*
  16. * Memory configuration
  17. */
  18. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  19. #define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
  20. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  21. #define CONFIG_SYS_SDRAM_SIZE SZ_1G
  22. #define CONFIG_SYS_INIT_SP_ADDR \
  23. (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
  24. #define CONFIG_SYS_MALLOC_LEN SZ_2M
  25. #define CONFIG_SYS_BOOTM_LEN SZ_128M
  26. #define CONFIG_SYS_LOAD_ADDR 0x82000000
  27. /*
  28. * UART configuration
  29. */
  30. #define CONFIG_SYS_NS16550_SERIAL
  31. #define CONFIG_SYS_NS16550_CLK 33330000
  32. #define CONFIG_SYS_NS16550_MEM32
  33. /*
  34. * Ethernet PHY configuration
  35. */
  36. /*
  37. * USB 1.1 configuration
  38. */
  39. #define CONFIG_USB_OHCI_NEW
  40. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
  41. /*
  42. * Environment settings
  43. */
  44. #define CONFIG_EXTRA_ENV_SETTINGS \
  45. "upgrade=if mmc rescan && " \
  46. "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
  47. "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \
  48. "\"Fail to upgrade.\n" \
  49. "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \
  50. "; fi\0" \
  51. "core_dccm_0=0x10\0" \
  52. "core_dccm_1=0x6\0" \
  53. "core_dccm_2=0x10\0" \
  54. "core_dccm_3=0x6\0" \
  55. "core_iccm_0=0x10\0" \
  56. "core_iccm_1=0x6\0" \
  57. "core_iccm_2=0x10\0" \
  58. "core_iccm_3=0x6\0" \
  59. "core_mask=0xF\0" \
  60. "dcache_ena=0x1\0" \
  61. "icache_ena=0x1\0" \
  62. "non_volatile_limit=0xE\0" \
  63. "hsdk_hs34=setenv core_mask 0x2; setenv icache_ena 0x0; \
  64. setenv dcache_ena 0x0; setenv core_iccm_1 0x7; \
  65. setenv core_dccm_1 0x8; setenv non_volatile_limit 0x0;\0" \
  66. "hsdk_hs36=setenv core_mask 0x1; setenv icache_ena 0x1; \
  67. setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
  68. setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
  69. "hsdk_hs36_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
  70. setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
  71. setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
  72. "hsdk_hs38=setenv core_mask 0x1; setenv icache_ena 0x1; \
  73. setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
  74. setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE;\0" \
  75. "hsdk_hs38_ccm=setenv core_mask 0x2; setenv icache_ena 0x1; \
  76. setenv dcache_ena 0x1; setenv core_iccm_1 0x7; \
  77. setenv core_dccm_1 0x8; setenv non_volatile_limit 0xE;\0" \
  78. "hsdk_hs38x2=setenv core_mask 0x3; setenv icache_ena 0x1; \
  79. setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
  80. setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
  81. setenv core_iccm_1 0x6; setenv core_dccm_1 0x6;\0" \
  82. "hsdk_hs38x3=setenv core_mask 0x7; setenv icache_ena 0x1; \
  83. setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
  84. setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
  85. setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
  86. setenv core_iccm_2 0x10; setenv core_dccm_2 0x10;\0" \
  87. "hsdk_hs38x4=setenv core_mask 0xF; setenv icache_ena 0x1; \
  88. setenv dcache_ena 0x1; setenv core_iccm_0 0x10; \
  89. setenv core_dccm_0 0x10; setenv non_volatile_limit 0xE; \
  90. setenv core_iccm_1 0x6; setenv core_dccm_1 0x6; \
  91. setenv core_iccm_2 0x10; setenv core_dccm_2 0x10; \
  92. setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
  93. /*
  94. * Environment configuration
  95. */
  96. #define CONFIG_BOOTFILE "uImage"
  97. #define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
  98. /* Cli configuration */
  99. #define CONFIG_SYS_CBSIZE SZ_2K
  100. /*
  101. * Callback configuration
  102. */
  103. #define CONFIG_BOARD_LATE_INIT
  104. #endif /* _CONFIG_HSDK_H_ */