mt6779-larb-port.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2019 MediaTek Inc.
  4. * Author: Chao Hao <[email protected]>
  5. */
  6. #ifndef _DT_BINDINGS_MEMORY_MT6779_LARB_PORT_H_
  7. #define _DT_BINDINGS_MEMORY_MT6779_LARB_PORT_H_
  8. #include <dt-bindings/memory/mtk-memory-port.h>
  9. #define M4U_LARB0_ID 0
  10. #define M4U_LARB1_ID 1
  11. #define M4U_LARB2_ID 2
  12. #define M4U_LARB3_ID 3
  13. #define M4U_LARB4_ID 4
  14. #define M4U_LARB5_ID 5
  15. #define M4U_LARB6_ID 6
  16. #define M4U_LARB7_ID 7
  17. #define M4U_LARB8_ID 8
  18. #define M4U_LARB9_ID 9
  19. #define M4U_LARB10_ID 10
  20. #define M4U_LARB11_ID 11
  21. /* larb0 */
  22. #define M4U_PORT_DISP_POSTMASK0 MTK_M4U_ID(M4U_LARB0_ID, 0)
  23. #define M4U_PORT_DISP_OVL0_HDR MTK_M4U_ID(M4U_LARB0_ID, 1)
  24. #define M4U_PORT_DISP_OVL1_HDR MTK_M4U_ID(M4U_LARB0_ID, 2)
  25. #define M4U_PORT_DISP_OVL0 MTK_M4U_ID(M4U_LARB0_ID, 3)
  26. #define M4U_PORT_DISP_OVL1 MTK_M4U_ID(M4U_LARB0_ID, 4)
  27. #define M4U_PORT_DISP_PVRIC0 MTK_M4U_ID(M4U_LARB0_ID, 5)
  28. #define M4U_PORT_DISP_RDMA0 MTK_M4U_ID(M4U_LARB0_ID, 6)
  29. #define M4U_PORT_DISP_WDMA0 MTK_M4U_ID(M4U_LARB0_ID, 7)
  30. #define M4U_PORT_DISP_FAKE0 MTK_M4U_ID(M4U_LARB0_ID, 8)
  31. /* larb1 */
  32. #define M4U_PORT_DISP_OVL0_2L_HDR MTK_M4U_ID(M4U_LARB1_ID, 0)
  33. #define M4U_PORT_DISP_OVL1_2L_HDR MTK_M4U_ID(M4U_LARB1_ID, 1)
  34. #define M4U_PORT_DISP_OVL0_2L MTK_M4U_ID(M4U_LARB1_ID, 2)
  35. #define M4U_PORT_DISP_OVL1_2L MTK_M4U_ID(M4U_LARB1_ID, 3)
  36. #define M4U_PORT_DISP_RDMA1 MTK_M4U_ID(M4U_LARB1_ID, 4)
  37. #define M4U_PORT_MDP_PVRIC0 MTK_M4U_ID(M4U_LARB1_ID, 5)
  38. #define M4U_PORT_MDP_PVRIC1 MTK_M4U_ID(M4U_LARB1_ID, 6)
  39. #define M4U_PORT_MDP_RDMA0 MTK_M4U_ID(M4U_LARB1_ID, 7)
  40. #define M4U_PORT_MDP_RDMA1 MTK_M4U_ID(M4U_LARB1_ID, 8)
  41. #define M4U_PORT_MDP_WROT0_R MTK_M4U_ID(M4U_LARB1_ID, 9)
  42. #define M4U_PORT_MDP_WROT0_W MTK_M4U_ID(M4U_LARB1_ID, 10)
  43. #define M4U_PORT_MDP_WROT1_R MTK_M4U_ID(M4U_LARB1_ID, 11)
  44. #define M4U_PORT_MDP_WROT1_W MTK_M4U_ID(M4U_LARB1_ID, 12)
  45. #define M4U_PORT_DISP_FAKE1 MTK_M4U_ID(M4U_LARB1_ID, 13)
  46. /* larb2-VDEC */
  47. #define M4U_PORT_HW_VDEC_MC_EXT MTK_M4U_ID(M4U_LARB2_ID, 0)
  48. #define M4U_PORT_HW_VDEC_UFO_EXT MTK_M4U_ID(M4U_LARB2_ID, 1)
  49. #define M4U_PORT_HW_VDEC_PP_EXT MTK_M4U_ID(M4U_LARB2_ID, 2)
  50. #define M4U_PORT_HW_VDEC_PRED_RD_EXT MTK_M4U_ID(M4U_LARB2_ID, 3)
  51. #define M4U_PORT_HW_VDEC_PRED_WR_EXT MTK_M4U_ID(M4U_LARB2_ID, 4)
  52. #define M4U_PORT_HW_VDEC_PPWRAP_EXT MTK_M4U_ID(M4U_LARB2_ID, 5)
  53. #define M4U_PORT_HW_VDEC_TILE_EXT MTK_M4U_ID(M4U_LARB2_ID, 6)
  54. #define M4U_PORT_HW_VDEC_VLD_EXT MTK_M4U_ID(M4U_LARB2_ID, 7)
  55. #define M4U_PORT_HW_VDEC_VLD2_EXT MTK_M4U_ID(M4U_LARB2_ID, 8)
  56. #define M4U_PORT_HW_VDEC_AVC_MV_EXT MTK_M4U_ID(M4U_LARB2_ID, 9)
  57. #define M4U_PORT_HW_VDEC_UFO_ENC_EXT MTK_M4U_ID(M4U_LARB2_ID, 10)
  58. #define M4U_PORT_HW_VDEC_RG_CTRL_DMA_EXT MTK_M4U_ID(M4U_LARB2_ID, 11)
  59. /* larb3-VENC */
  60. #define M4U_PORT_VENC_RCPU MTK_M4U_ID(M4U_LARB3_ID, 0)
  61. #define M4U_PORT_VENC_REC MTK_M4U_ID(M4U_LARB3_ID, 1)
  62. #define M4U_PORT_VENC_BSDMA MTK_M4U_ID(M4U_LARB3_ID, 2)
  63. #define M4U_PORT_VENC_SV_COMV MTK_M4U_ID(M4U_LARB3_ID, 3)
  64. #define M4U_PORT_VENC_RD_COMV MTK_M4U_ID(M4U_LARB3_ID, 4)
  65. #define M4U_PORT_VENC_NBM_RDMA MTK_M4U_ID(M4U_LARB3_ID, 5)
  66. #define M4U_PORT_VENC_NBM_RDMA_LITE MTK_M4U_ID(M4U_LARB3_ID, 6)
  67. #define M4U_PORT_JPGENC_Y_RDMA MTK_M4U_ID(M4U_LARB3_ID, 7)
  68. #define M4U_PORT_JPGENC_C_RDMA MTK_M4U_ID(M4U_LARB3_ID, 8)
  69. #define M4U_PORT_JPGENC_Q_TABLE MTK_M4U_ID(M4U_LARB3_ID, 9)
  70. #define M4U_PORT_JPGENC_BSDMA MTK_M4U_ID(M4U_LARB3_ID, 10)
  71. #define M4U_PORT_JPGDEC_WDMA MTK_M4U_ID(M4U_LARB3_ID, 11)
  72. #define M4U_PORT_JPGDEC_BSDMA MTK_M4U_ID(M4U_LARB3_ID, 12)
  73. #define M4U_PORT_VENC_NBM_WDMA MTK_M4U_ID(M4U_LARB3_ID, 13)
  74. #define M4U_PORT_VENC_NBM_WDMA_LITE MTK_M4U_ID(M4U_LARB3_ID, 14)
  75. #define M4U_PORT_VENC_CUR_LUMA MTK_M4U_ID(M4U_LARB3_ID, 15)
  76. #define M4U_PORT_VENC_CUR_CHROMA MTK_M4U_ID(M4U_LARB3_ID, 16)
  77. #define M4U_PORT_VENC_REF_LUMA MTK_M4U_ID(M4U_LARB3_ID, 17)
  78. #define M4U_PORT_VENC_REF_CHROMA MTK_M4U_ID(M4U_LARB3_ID, 18)
  79. /* larb4-dummy */
  80. /* larb5-IMG */
  81. #define M4U_PORT_IMGI_D1 MTK_M4U_ID(M4U_LARB5_ID, 0)
  82. #define M4U_PORT_IMGBI_D1 MTK_M4U_ID(M4U_LARB5_ID, 1)
  83. #define M4U_PORT_DMGI_D1 MTK_M4U_ID(M4U_LARB5_ID, 2)
  84. #define M4U_PORT_DEPI_D1 MTK_M4U_ID(M4U_LARB5_ID, 3)
  85. #define M4U_PORT_LCEI_D1 MTK_M4U_ID(M4U_LARB5_ID, 4)
  86. #define M4U_PORT_SMTI_D1 MTK_M4U_ID(M4U_LARB5_ID, 5)
  87. #define M4U_PORT_SMTO_D2 MTK_M4U_ID(M4U_LARB5_ID, 6)
  88. #define M4U_PORT_SMTO_D1 MTK_M4U_ID(M4U_LARB5_ID, 7)
  89. #define M4U_PORT_CRZO_D1 MTK_M4U_ID(M4U_LARB5_ID, 8)
  90. #define M4U_PORT_IMG3O_D1 MTK_M4U_ID(M4U_LARB5_ID, 9)
  91. #define M4U_PORT_VIPI_D1 MTK_M4U_ID(M4U_LARB5_ID, 10)
  92. #define M4U_PORT_WPE_RDMA1 MTK_M4U_ID(M4U_LARB5_ID, 11)
  93. #define M4U_PORT_WPE_RDMA0 MTK_M4U_ID(M4U_LARB5_ID, 12)
  94. #define M4U_PORT_WPE_WDMA MTK_M4U_ID(M4U_LARB5_ID, 13)
  95. #define M4U_PORT_TIMGO_D1 MTK_M4U_ID(M4U_LARB5_ID, 14)
  96. #define M4U_PORT_MFB_RDMA0 MTK_M4U_ID(M4U_LARB5_ID, 15)
  97. #define M4U_PORT_MFB_RDMA1 MTK_M4U_ID(M4U_LARB5_ID, 16)
  98. #define M4U_PORT_MFB_RDMA2 MTK_M4U_ID(M4U_LARB5_ID, 17)
  99. #define M4U_PORT_MFB_RDMA3 MTK_M4U_ID(M4U_LARB5_ID, 18)
  100. #define M4U_PORT_MFB_WDMA MTK_M4U_ID(M4U_LARB5_ID, 19)
  101. #define M4U_PORT_RESERVE1 MTK_M4U_ID(M4U_LARB5_ID, 20)
  102. #define M4U_PORT_RESERVE2 MTK_M4U_ID(M4U_LARB5_ID, 21)
  103. #define M4U_PORT_RESERVE3 MTK_M4U_ID(M4U_LARB5_ID, 22)
  104. #define M4U_PORT_RESERVE4 MTK_M4U_ID(M4U_LARB5_ID, 23)
  105. #define M4U_PORT_RESERVE5 MTK_M4U_ID(M4U_LARB5_ID, 24)
  106. #define M4U_PORT_RESERVE6 MTK_M4U_ID(M4U_LARB5_ID, 25)
  107. /* larb6-IMG-VPU */
  108. #define M4U_PORT_IMG_IPUO MTK_M4U_ID(M4U_LARB6_ID, 0)
  109. #define M4U_PORT_IMG_IPU3O MTK_M4U_ID(M4U_LARB6_ID, 1)
  110. #define M4U_PORT_IMG_IPUI MTK_M4U_ID(M4U_LARB6_ID, 2)
  111. /* larb7-DVS */
  112. #define M4U_PORT_DVS_RDMA MTK_M4U_ID(M4U_LARB7_ID, 0)
  113. #define M4U_PORT_DVS_WDMA MTK_M4U_ID(M4U_LARB7_ID, 1)
  114. #define M4U_PORT_DVP_RDMA MTK_M4U_ID(M4U_LARB7_ID, 2)
  115. #define M4U_PORT_DVP_WDMA MTK_M4U_ID(M4U_LARB7_ID, 3)
  116. /* larb8-IPESYS */
  117. #define M4U_PORT_FDVT_RDA MTK_M4U_ID(M4U_LARB8_ID, 0)
  118. #define M4U_PORT_FDVT_RDB MTK_M4U_ID(M4U_LARB8_ID, 1)
  119. #define M4U_PORT_FDVT_WRA MTK_M4U_ID(M4U_LARB8_ID, 2)
  120. #define M4U_PORT_FDVT_WRB MTK_M4U_ID(M4U_LARB8_ID, 3)
  121. #define M4U_PORT_FE_RD0 MTK_M4U_ID(M4U_LARB8_ID, 4)
  122. #define M4U_PORT_FE_RD1 MTK_M4U_ID(M4U_LARB8_ID, 5)
  123. #define M4U_PORT_FE_WR0 MTK_M4U_ID(M4U_LARB8_ID, 6)
  124. #define M4U_PORT_FE_WR1 MTK_M4U_ID(M4U_LARB8_ID, 7)
  125. #define M4U_PORT_RSC_RDMA0 MTK_M4U_ID(M4U_LARB8_ID, 8)
  126. #define M4U_PORT_RSC_WDMA MTK_M4U_ID(M4U_LARB8_ID, 9)
  127. /* larb9-CAM */
  128. #define M4U_PORT_CAM_IMGO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 0)
  129. #define M4U_PORT_CAM_RRZO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 1)
  130. #define M4U_PORT_CAM_LSCI_R1_C MTK_M4U_ID(M4U_LARB9_ID, 2)
  131. #define M4U_PORT_CAM_BPCI_R1_C MTK_M4U_ID(M4U_LARB9_ID, 3)
  132. #define M4U_PORT_CAM_YUVO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 4)
  133. #define M4U_PORT_CAM_UFDI_R2_C MTK_M4U_ID(M4U_LARB9_ID, 5)
  134. #define M4U_PORT_CAM_RAWI_R2_C MTK_M4U_ID(M4U_LARB9_ID, 6)
  135. #define M4U_PORT_CAM_RAWI_R5_C MTK_M4U_ID(M4U_LARB9_ID, 7)
  136. #define M4U_PORT_CAM_CAMSV_1 MTK_M4U_ID(M4U_LARB9_ID, 8)
  137. #define M4U_PORT_CAM_CAMSV_2 MTK_M4U_ID(M4U_LARB9_ID, 9)
  138. #define M4U_PORT_CAM_CAMSV_3 MTK_M4U_ID(M4U_LARB9_ID, 10)
  139. #define M4U_PORT_CAM_CAMSV_4 MTK_M4U_ID(M4U_LARB9_ID, 11)
  140. #define M4U_PORT_CAM_CAMSV_5 MTK_M4U_ID(M4U_LARB9_ID, 12)
  141. #define M4U_PORT_CAM_CAMSV_6 MTK_M4U_ID(M4U_LARB9_ID, 13)
  142. #define M4U_PORT_CAM_AAO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 14)
  143. #define M4U_PORT_CAM_AFO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 15)
  144. #define M4U_PORT_CAM_FLKO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 16)
  145. #define M4U_PORT_CAM_LCESO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 17)
  146. #define M4U_PORT_CAM_CRZO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 18)
  147. #define M4U_PORT_CAM_LTMSO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 19)
  148. #define M4U_PORT_CAM_RSSO_R1_C MTK_M4U_ID(M4U_LARB9_ID, 20)
  149. #define M4U_PORT_CAM_CCUI MTK_M4U_ID(M4U_LARB9_ID, 21)
  150. #define M4U_PORT_CAM_CCUO MTK_M4U_ID(M4U_LARB9_ID, 22)
  151. #define M4U_PORT_CAM_FAKE MTK_M4U_ID(M4U_LARB9_ID, 23)
  152. /* larb10-CAM_A */
  153. #define M4U_PORT_CAM_IMGO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 0)
  154. #define M4U_PORT_CAM_RRZO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 1)
  155. #define M4U_PORT_CAM_LSCI_R1_A MTK_M4U_ID(M4U_LARB10_ID, 2)
  156. #define M4U_PORT_CAM_BPCI_R1_A MTK_M4U_ID(M4U_LARB10_ID, 3)
  157. #define M4U_PORT_CAM_YUVO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 4)
  158. #define M4U_PORT_CAM_UFDI_R2_A MTK_M4U_ID(M4U_LARB10_ID, 5)
  159. #define M4U_PORT_CAM_RAWI_R2_A MTK_M4U_ID(M4U_LARB10_ID, 6)
  160. #define M4U_PORT_CAM_RAWI_R5_A MTK_M4U_ID(M4U_LARB10_ID, 7)
  161. #define M4U_PORT_CAM_IMGO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 8)
  162. #define M4U_PORT_CAM_RRZO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 9)
  163. #define M4U_PORT_CAM_LSCI_R1_B MTK_M4U_ID(M4U_LARB10_ID, 10)
  164. #define M4U_PORT_CAM_BPCI_R1_B MTK_M4U_ID(M4U_LARB10_ID, 11)
  165. #define M4U_PORT_CAM_YUVO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 12)
  166. #define M4U_PORT_CAM_UFDI_R2_B MTK_M4U_ID(M4U_LARB10_ID, 13)
  167. #define M4U_PORT_CAM_RAWI_R2_B MTK_M4U_ID(M4U_LARB10_ID, 14)
  168. #define M4U_PORT_CAM_RAWI_R5_B MTK_M4U_ID(M4U_LARB10_ID, 15)
  169. #define M4U_PORT_CAM_CAMSV_0 MTK_M4U_ID(M4U_LARB10_ID, 16)
  170. #define M4U_PORT_CAM_AAO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 17)
  171. #define M4U_PORT_CAM_AFO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 18)
  172. #define M4U_PORT_CAM_FLKO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 19)
  173. #define M4U_PORT_CAM_LCESO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 20)
  174. #define M4U_PORT_CAM_CRZO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 21)
  175. #define M4U_PORT_CAM_AAO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 22)
  176. #define M4U_PORT_CAM_AFO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 23)
  177. #define M4U_PORT_CAM_FLKO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 24)
  178. #define M4U_PORT_CAM_LCESO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 25)
  179. #define M4U_PORT_CAM_CRZO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 26)
  180. #define M4U_PORT_CAM_LTMSO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 27)
  181. #define M4U_PORT_CAM_RSSO_R1_A MTK_M4U_ID(M4U_LARB10_ID, 28)
  182. #define M4U_PORT_CAM_LTMSO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 29)
  183. #define M4U_PORT_CAM_RSSO_R1_B MTK_M4U_ID(M4U_LARB10_ID, 30)
  184. /* larb11-CAM-VPU */
  185. #define M4U_PORT_CAM_IPUO MTK_M4U_ID(M4U_LARB11_ID, 0)
  186. #define M4U_PORT_CAM_IPU2O MTK_M4U_ID(M4U_LARB11_ID, 1)
  187. #define M4U_PORT_CAM_IPU3O MTK_M4U_ID(M4U_LARB11_ID, 2)
  188. #define M4U_PORT_CAM_IPUI MTK_M4U_ID(M4U_LARB11_ID, 3)
  189. #define M4U_PORT_CAM_IPU2I MTK_M4U_ID(M4U_LARB11_ID, 4)
  190. #endif