board.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-01-30 lizhirui first version
  9. */
  10. #ifndef BOARD_H__
  11. #define BOARD_H__
  12. #include "rtconfig.h"
  13. #include "mem_layout.h"
  14. #include "irq_num.h"
  15. /*
  16. * K230 Memory Map
  17. *
  18. * See K230 Technical Reference Manual, chapter 1.5 Address Space mapping
  19. */
  20. #define SRAM_BASE_ADDR (0x80200000UL)
  21. #define SRAM_IO_SIZE (0x00200000UL)
  22. #define KPU_BASE_ADDR (0x80400000UL)
  23. #define KPU_IO_SIZE (0x00000800UL)
  24. #define FFT_BASE_ADDR (0x80400800UL)
  25. #define FFT_IO_SIZE (0x00000400UL)
  26. #define AI2D_BASE_ADDR (0x80400C00UL)
  27. #define AI2D_IO_SIZE (0x00000400UL)
  28. #define GSDMA_BASE_ADDR (0x80800000UL)
  29. #define GSDMA_IO_SIZE (0x00004000UL)
  30. #define DMA_BASE_ADDR (0x80804000UL)
  31. #define DMA_IO_SIZE (0x00004000UL)
  32. #define DECOMP_BASE_ADDR (0x80808000UL)
  33. #define DECOMP_IO_SIZE (0x00004000UL)
  34. #define NON_AI2D_BASE_ADDR (0x8080C000UL)
  35. #define NON_AI2D_IO_SIZE (0x00004000UL)
  36. #define ISP_BASE_ADDR (0x90000000UL)
  37. #define ISP_IO_SIZE (0x00008000UL)
  38. #define DEWARP_BASE_ADDR (0x90008000UL)
  39. #define DEWARP_IO_SIZE (0x00001000UL)
  40. #define CSI_BASE_ADDR (0x90009000UL)
  41. #define CSI_IO_SIZE (0x00002000UL)
  42. #define VPU_BASE_ADDR (0x90400000UL)
  43. #define VPU_IO_SIZE (0x00010000UL)
  44. /*2.5D*/
  45. #define TAAH_GPU_BASE_ADDR (0x90800000UL)
  46. #define TAAH_GPU_IO_SIZE (0x00040000UL)
  47. #define VO_BASE_ADDR (0x90840000UL)
  48. #define VO_IO_SIZE (0x00010000UL)
  49. #define DSI_BASE_ADDR (0x90850000UL)
  50. #define DSI_IO_SIZE (0x00001000UL)
  51. #define GPU_ENGINE_BASE_ADDR (0x90A00000UL)
  52. #define GPU_ENGINE_IO_SIZE (0x00000800UL)
  53. #define PMU_BASE_ADDR (0x91000000UL)
  54. #define PMU_IO_SIZE (0x00000C00UL)
  55. #define RTC_BASE_ADDR (0x91000C00UL)
  56. #define RTC_IO_SIZE (0x00000400UL)
  57. #define CMU_BASE_ADDR (0x91100000UL)
  58. #define CMU_IO_SIZE (0x00001000UL)
  59. #define RMU_BASE_ADDR (0x91101000UL)
  60. #define RMU_IO_SIZE (0x00001000UL)
  61. #define BOOT_BASE_ADDR (0x91102000UL)
  62. #define BOOT_IO_SIZE (0x00001000UL)
  63. #define PWR_BASE_ADDR (0x91103000UL)
  64. #define PWR_IO_SIZE (0x00001000UL)
  65. #define MAILBOX_BASE_ADDR (0x91104000UL)
  66. #define MAILBOX_IO_SIZE (0x00001000UL)
  67. #define IOMUX_BASE_ADDR (0x91105000UL)
  68. #define IOMUX_IO_SIZE (0x00000800UL)
  69. #define HW_TIMER_BASE_ADDR (0x91105800UL)
  70. #define HW_TIMER_IO_SIZE (0x00000800UL)
  71. #define WDT0_BASE_ADDR (0x91106000UL)
  72. #define WDT0_IO_SIZE (0x00000800UL)
  73. #define WDT1_BASE_ADDR (0x91106800UL)
  74. #define WDT1_IO_SIZE (0x00000800UL)
  75. #define TS_BASE_ADDR (0x91107000UL)
  76. #define TS_IO_SIZE (0x00000800UL)
  77. #define HDI_BASE_ADDR (0x91107800UL)
  78. #define HDI_IO_SIZE (0x00000800UL)
  79. #define STC_BASE_ADDR (0x91108000UL)
  80. #define STC_IO_SIZE (0x00001000UL)
  81. #define BOOTROM_BASE_ADDR (0x91200000UL)
  82. #define BOOTROM_IO_SIZE (0x00010000UL)
  83. #define SECURITY_BASE_ADDR (0x91210000UL)
  84. #define SECURITY_IO_SIZE (0x00008000UL)
  85. #define UART0_BASE_ADDR (0x91400000UL)
  86. #define UART0_IO_SIZE (0x00001000UL)
  87. #define UART1_BASE_ADDR (0x91401000UL)
  88. #define UART1_IO_SIZE (0x00001000UL)
  89. #define UART2_BASE_ADDR (0x91402000UL)
  90. #define UART2_IO_SIZE (0x00001000UL)
  91. #define UART3_BASE_ADDR (0x91403000UL)
  92. #define UART3_IO_SIZE (0x00001000UL)
  93. #define UART4_BASE_ADDR (0x91404000UL)
  94. #define UART4_IO_SIZE (0x00001000UL)
  95. #define I2C0_BASE_ADDR (0x91405000UL)
  96. #define I2C0_IO_SIZE (0x00001000UL)
  97. #define I2C1_BASE_ADDR (0x91406000UL)
  98. #define I2C1_IO_SIZE (0x00001000UL)
  99. #define I2C2_BASE_ADDR (0x91407000UL)
  100. #define I2C2_IO_SIZE (0x00001000UL)
  101. #define I2C3_BASE_ADDR (0x91408000UL)
  102. #define I2C3_IO_SIZE (0x00001000UL)
  103. #define I2C4_BASE_ADDR (0x91409000UL)
  104. #define I2C4_IO_SIZE (0x00001000UL)
  105. #define PWM_BASE_ADDR (0x9140A000UL)
  106. #define PWM_IO_SIZE (0x00001000UL)
  107. #define GPIO0_BASE_ADDR (0x9140B000UL)
  108. #define GPIO0_IO_SIZE (0x00001000UL)
  109. #define GPIO1_BASE_ADDR (0x9140C000UL)
  110. #define GPIO1_IO_SIZE (0x00001000UL)
  111. #define ADC_BASE_ADDR (0x9140D000UL)
  112. #define ADC_IO_SIZE (0x00001000UL)
  113. #define CODEC_BASE_ADDR (0x9140E000UL)
  114. #define CODEC_IO_SIZE (0x00001000UL)
  115. #define AUDIO_BASE_ADDR (0x9140F000UL)
  116. #define AUDIO_IO_SIZE (0x00001000UL)
  117. #define USB2_BASE_ADDR (0x91500000UL)
  118. #define USB2_IO_SIZE (0x00080000UL)
  119. #define SD_HC_BASE_ADDR (0x91580000UL)
  120. #define SD_HC_IO_SIZE (0x00002000UL)
  121. #define SPI_QOPI_BASE_ADDR (0x91582000UL)
  122. #define SPI_QOPI_IO_SIZE (0x00002000UL)
  123. #define SPI_OPI_BASE_ADDR (0x91584000UL)
  124. #define SPI_OPI_IO_SIZE (0x00001000UL)
  125. #define HI_SYS_CONFIG_BASE_ADDR (0x91585000UL)
  126. #define HI_SYS_CONFIG_IO_SIZE (0x00000400UL)
  127. #define DDRC_CONF_BASE_ADDR (0x98000000UL)
  128. #define DDRC_CONF_IO_SIZE (0x02000000UL)
  129. #define SPI_XIP_FLASH_BASE_ADDR (0xC0000000UL)
  130. #define SPI_XIP_FLASH_IO_SIZE (0x08000000UL)
  131. #define IO_SPACE_BASE_ADDR (KPU_BASE_ADDR)
  132. #define TIMER_CLK_FREQ (27000000)
  133. #endif // BOARD_H__