mt6768-larb-port.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Copyright (c) 2015-2016 MediaTek Inc.
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 as
  5. * published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _DTS_IOMMU_PORT_MT6768_H_
  13. #define _DTS_IOMMU_PORT_MT6768_H_
  14. #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port))
  15. /* Local arbiter ID */
  16. #define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0xf)
  17. /* PortID within the local arbiter */
  18. #define MTK_M4U_TO_PORT(id) ((id) & 0x1f)
  19. #define MTK_IOMMU_LARB_NR (5)
  20. /* larb0 -- 8*/
  21. #define M4U_PORT_DISP_OVL0 MTK_M4U_ID(0, 0)
  22. #define M4U_PORT_DISP_2L_OVL0_LARB0 MTK_M4U_ID(0, 1)
  23. #define M4U_PORT_DISP_RDMA0 MTK_M4U_ID(0, 2)
  24. #define M4U_PORT_DISP_WDMA0 MTK_M4U_ID(0, 3)
  25. #define M4U_PORT_MDP_RDMA0 MTK_M4U_ID(0, 4)
  26. #define M4U_PORT_MDP_WDMA0 MTK_M4U_ID(0, 5)
  27. #define M4U_PORT_MDP_WROT0 MTK_M4U_ID(0, 6)
  28. #define M4U_PORT_DISP_FAKE0 MTK_M4U_ID(0, 7)
  29. /* larb1 -- 9*/
  30. #define M4U_PORT_HW_VDEC_MC_EXT MTK_M4U_ID(1, 0)
  31. #define M4U_PORT_HW_VDEC_PP_EXT MTK_M4U_ID(1, 1)
  32. #define M4U_PORT_HW_VDEC_VLD_EXT MTK_M4U_ID(1, 2)
  33. #define M4U_PORT_HW_VDEC_VLD2_EXT MTK_M4U_ID(1, 3)
  34. #define M4U_PORT_HW_VDEC_AVC_MV_EXT MTK_M4U_ID(1, 4)
  35. #define M4U_PORT_HW_VDEC_PRED_RD_EXT MTK_M4U_ID(1, 5)
  36. #define M4U_PORT_HW_VDEC_PRED_WR_EXT MTK_M4U_ID(1, 6)
  37. #define M4U_PORT_HW_VDEC_PPWRAP_EXT MTK_M4U_ID(1, 7)
  38. #define M4U_PORT_HW_VDEC_TILE_EXT MTK_M4U_ID(1, 8)
  39. /* larb2 -- 12*/
  40. #define M4U_PORT_CAM_IMGI MTK_M4U_ID(2, 0)
  41. #define M4U_PORT_CAM_IMG2O MTK_M4U_ID(2, 1)
  42. #define M4U_PORT_CAM_IMG3O MTK_M4U_ID(2, 2)
  43. #define M4U_PORT_CAM_VIPI MTK_M4U_ID(2, 3)
  44. #define M4U_PORT_CAM_LCEI MTK_M4U_ID(2, 4)
  45. #define M4U_PORT_CAM_FD_RP MTK_M4U_ID(2, 5)
  46. #define M4U_PORT_CAM_FD_WR MTK_M4U_ID(2, 6)
  47. #define M4U_PORT_CAM_FD_RB MTK_M4U_ID(2, 7)
  48. #define M4U_PORT_CAM_DPE_RDMA MTK_M4U_ID(2, 8)
  49. #define M4U_PORT_CAM_DPE_WDMA MTK_M4U_ID(2, 9)
  50. #define M4U_PORT_CAM_RSC_RDMA MTK_M4U_ID(2, 10)
  51. #define M4U_PORT_CAM_RSC_WDMA MTK_M4U_ID(2, 11)
  52. /*larb3 -- 21*/
  53. #define M4U_PORT_CAM_IMGO MTK_M4U_ID(3, 0)
  54. #define M4U_PORT_CAM_RRZO MTK_M4U_ID(3, 1)
  55. #define M4U_PORT_CAM_AAO MTK_M4U_ID(3, 2)
  56. #define M4U_PORT_CAM_AFO MTK_M4U_ID(3, 3)
  57. #define M4U_PORT_CAM_LSCI0 MTK_M4U_ID(3, 4)
  58. #define M4U_PORT_CAM_LSCI1 MTK_M4U_ID(3, 5)
  59. #define M4U_PORT_CAM_PDO MTK_M4U_ID(3, 6)
  60. #define M4U_PORT_CAM_BPCI MTK_M4U_ID(3, 7)
  61. #define M4U_PORT_CAM_LCSO MTK_M4U_ID(3, 8)
  62. #define M4U_PORT_CAM_RSSO_A MTK_M4U_ID(3, 9)
  63. #define M4U_PORT_CAM_RSSO_B MTK_M4U_ID(3, 10)
  64. #define M4U_PORT_CAM_UFEO MTK_M4U_ID(3, 11)
  65. #define M4U_PORT_CAM_SOC0 MTK_M4U_ID(3, 12)
  66. #define M4U_PORT_CAM_SOC1 MTK_M4U_ID(3, 13)
  67. #define M4U_PORT_CAM_SOC2 MTK_M4U_ID(3, 14)
  68. #define M4U_PORT_CAM_CCUI MTK_M4U_ID(3, 15)
  69. #define M4U_PORT_CAM_CCUO MTK_M4U_ID(3, 16)
  70. #define M4U_PORT_CAM_CACI MTK_M4U_ID(3, 17)
  71. #define M4U_PORT_CAM_RAWI_A MTK_M4U_ID(3, 18)
  72. #define M4U_PORT_CAM_RAWI_B MTK_M4U_ID(3, 19)
  73. #define M4U_PORT_CAM_CCUG MTK_M4U_ID(3, 20)
  74. /*larb4 -- 11*/
  75. #define M4U_PORT_VENC_RCPU MTK_M4U_ID(4, 0)
  76. #define M4U_PORT_VENC_REC MTK_M4U_ID(4, 1)
  77. #define M4U_PORT_VENC_BSDMA MTK_M4U_ID(4, 2)
  78. #define M4U_PORT_VENC_SV_COMV MTK_M4U_ID(4, 3)
  79. #define M4U_PORT_VENC_RD_COMV MTK_M4U_ID(4, 4)
  80. #define M4U_PORT_JPGENC_RDMA MTK_M4U_ID(4, 5)
  81. #define M4U_PORT_JPGENC_BSDMA MTK_M4U_ID(4, 6)
  82. #define M4U_PORT_VENC_CUR_LUMA MTK_M4U_ID(4, 7)
  83. #define M4U_PORT_VENC_CUR_CHROMA MTK_M4U_ID(4, 8)
  84. #define M4U_PORT_VENC_REF_LUMA MTK_M4U_ID(4, 9)
  85. #define M4U_PORT_VENC_REF_CHROMA MTK_M4U_ID(4, 10)
  86. #define M4U_PORT_UNKNOWN (M4U_PORT_VENC_REF_CHROMA + 1)
  87. #define M4U_PORT_NR (61)
  88. /* for pusedo ccu device */
  89. #define CCU_PSEUDO_LARBID (MTK_IOMMU_LARB_NR + 1)
  90. #define MISC_PSEUDO_LARBID (MTK_IOMMU_LARB_NR + 2)
  91. #endif