16625ffb9SYong Wu /* SPDX-License-Identifier: GPL-2.0-only */ 26625ffb9SYong Wu /* 36625ffb9SYong Wu * Copyright (c) 2022 MediaTek Inc. 46625ffb9SYong Wu * Author: Yong Wu <yong.wu@mediatek.com> 56625ffb9SYong Wu */ 66625ffb9SYong Wu #ifndef _DT_BINDINGS_MEMORY_MT8195_LARB_PORT_H_ 76625ffb9SYong Wu #define _DT_BINDINGS_MEMORY_MT8195_LARB_PORT_H_ 86625ffb9SYong Wu 96625ffb9SYong Wu #include <dt-bindings/memory/mtk-memory-port.h> 106625ffb9SYong Wu 116625ffb9SYong Wu /* 126625ffb9SYong Wu * MM IOMMU supports 16GB dma address. We separate it to four ranges: 136625ffb9SYong Wu * 0 ~ 4G; 4G ~ 8G; 8G ~ 12G; 12G ~ 16G, we could adjust these masters 146625ffb9SYong Wu * locate in anyone region. BUT: 156625ffb9SYong Wu * a) Make sure all the ports inside a larb are in one range. 166625ffb9SYong Wu * b) The iova of any master can NOT cross the 4G/8G/12G boundary. 176625ffb9SYong Wu * 186625ffb9SYong Wu * This is the suggested mapping in this SoC: 196625ffb9SYong Wu * 206625ffb9SYong Wu * modules dma-address-region larbs-ports 216625ffb9SYong Wu * disp 0 ~ 4G larb0/1/2/3 226625ffb9SYong Wu * vcodec 4G ~ 8G larb19/20/21/22/23/24 236625ffb9SYong Wu * cam/mdp 8G ~ 12G the other larbs. 246625ffb9SYong Wu * N/A 12G ~ 16G 256625ffb9SYong Wu * CCU0 0x24000_0000 ~ 0x243ff_ffff larb18: port 0/1 266625ffb9SYong Wu * CCU1 0x24400_0000 ~ 0x247ff_ffff larb18: port 2/3 276625ffb9SYong Wu * 286625ffb9SYong Wu * This SoC have two IOMMU HWs, this is the detailed connected information: 296625ffb9SYong Wu * iommu-vdo: larb0/2/5/7/9/10/11/13/17/19/21/24/25/28 306625ffb9SYong Wu * iommu-vpp: larb1/3/4/6/8/12/14/16/18/20/22/23/26/27 316625ffb9SYong Wu */ 326625ffb9SYong Wu 336625ffb9SYong Wu /* MM IOMMU ports */ 346625ffb9SYong Wu /* larb0 */ 356625ffb9SYong Wu #define M4U_PORT_L0_DISP_RDMA0 MTK_M4U_ID(0, 0) 366625ffb9SYong Wu #define M4U_PORT_L0_DISP_WDMA0 MTK_M4U_ID(0, 1) 376625ffb9SYong Wu #define M4U_PORT_L0_DISP_OVL0_RDMA0 MTK_M4U_ID(0, 2) 386625ffb9SYong Wu #define M4U_PORT_L0_DISP_OVL0_RDMA1 MTK_M4U_ID(0, 3) 396625ffb9SYong Wu #define M4U_PORT_L0_DISP_OVL0_HDR MTK_M4U_ID(0, 4) 406625ffb9SYong Wu #define M4U_PORT_L0_DISP_FAKE0 MTK_M4U_ID(0, 5) 416625ffb9SYong Wu 426625ffb9SYong Wu /* larb1 */ 436625ffb9SYong Wu #define M4U_PORT_L1_DISP_RDMA0 MTK_M4U_ID(1, 0) 446625ffb9SYong Wu #define M4U_PORT_L1_DISP_WDMA0 MTK_M4U_ID(1, 1) 456625ffb9SYong Wu #define M4U_PORT_L1_DISP_OVL0_RDMA0 MTK_M4U_ID(1, 2) 466625ffb9SYong Wu #define M4U_PORT_L1_DISP_OVL0_RDMA1 MTK_M4U_ID(1, 3) 476625ffb9SYong Wu #define M4U_PORT_L1_DISP_OVL0_HDR MTK_M4U_ID(1, 4) 486625ffb9SYong Wu #define M4U_PORT_L1_DISP_FAKE0 MTK_M4U_ID(1, 5) 496625ffb9SYong Wu 506625ffb9SYong Wu /* larb2 */ 516625ffb9SYong Wu #define M4U_PORT_L2_MDP_RDMA0 MTK_M4U_ID(2, 0) 526625ffb9SYong Wu #define M4U_PORT_L2_MDP_RDMA2 MTK_M4U_ID(2, 1) 536625ffb9SYong Wu #define M4U_PORT_L2_MDP_RDMA4 MTK_M4U_ID(2, 2) 546625ffb9SYong Wu #define M4U_PORT_L2_MDP_RDMA6 MTK_M4U_ID(2, 3) 556625ffb9SYong Wu #define M4U_PORT_L2_DISP_FAKE1 MTK_M4U_ID(2, 4) 566625ffb9SYong Wu 576625ffb9SYong Wu /* larb3 */ 586625ffb9SYong Wu #define M4U_PORT_L3_MDP_RDMA1 MTK_M4U_ID(3, 0) 596625ffb9SYong Wu #define M4U_PORT_L3_MDP_RDMA3 MTK_M4U_ID(3, 1) 606625ffb9SYong Wu #define M4U_PORT_L3_MDP_RDMA5 MTK_M4U_ID(3, 2) 616625ffb9SYong Wu #define M4U_PORT_L3_MDP_RDMA7 MTK_M4U_ID(3, 3) 626625ffb9SYong Wu #define M4U_PORT_L3_HDR_DS MTK_M4U_ID(3, 4) 636625ffb9SYong Wu #define M4U_PORT_L3_HDR_ADL MTK_M4U_ID(3, 5) 646625ffb9SYong Wu #define M4U_PORT_L3_DISP_FAKE1 MTK_M4U_ID(3, 6) 656625ffb9SYong Wu 666625ffb9SYong Wu /* larb4 */ 676625ffb9SYong Wu #define M4U_PORT_L4_MDP_RDMA MTK_M4U_ID(4, 0) 686625ffb9SYong Wu #define M4U_PORT_L4_MDP_FG MTK_M4U_ID(4, 1) 696625ffb9SYong Wu #define M4U_PORT_L4_MDP_OVL MTK_M4U_ID(4, 2) 706625ffb9SYong Wu #define M4U_PORT_L4_MDP_WROT MTK_M4U_ID(4, 3) 716625ffb9SYong Wu #define M4U_PORT_L4_FAKE MTK_M4U_ID(4, 4) 726625ffb9SYong Wu 736625ffb9SYong Wu /* larb5 */ 746625ffb9SYong Wu #define M4U_PORT_L5_SVPP1_MDP_RDMA MTK_M4U_ID(5, 0) 756625ffb9SYong Wu #define M4U_PORT_L5_SVPP1_MDP_FG MTK_M4U_ID(5, 1) 766625ffb9SYong Wu #define M4U_PORT_L5_SVPP1_MDP_OVL MTK_M4U_ID(5, 2) 776625ffb9SYong Wu #define M4U_PORT_L5_SVPP1_MDP_WROT MTK_M4U_ID(5, 3) 786625ffb9SYong Wu #define M4U_PORT_L5_SVPP2_MDP_RDMA MTK_M4U_ID(5, 4) 796625ffb9SYong Wu #define M4U_PORT_L5_SVPP2_MDP_FG MTK_M4U_ID(5, 5) 806625ffb9SYong Wu #define M4U_PORT_L5_SVPP2_MDP_WROT MTK_M4U_ID(5, 6) 816625ffb9SYong Wu #define M4U_PORT_L5_FAKE MTK_M4U_ID(5, 7) 826625ffb9SYong Wu 836625ffb9SYong Wu /* larb6 */ 846625ffb9SYong Wu #define M4U_PORT_L6_SVPP3_MDP_RDMA MTK_M4U_ID(6, 0) 856625ffb9SYong Wu #define M4U_PORT_L6_SVPP3_MDP_FG MTK_M4U_ID(6, 1) 866625ffb9SYong Wu #define M4U_PORT_L6_SVPP3_MDP_WROT MTK_M4U_ID(6, 2) 876625ffb9SYong Wu #define M4U_PORT_L6_FAKE MTK_M4U_ID(6, 3) 886625ffb9SYong Wu 896625ffb9SYong Wu /* larb7 */ 906625ffb9SYong Wu #define M4U_PORT_L7_IMG_WPE_RDMA0 MTK_M4U_ID(7, 0) 916625ffb9SYong Wu #define M4U_PORT_L7_IMG_WPE_RDMA1 MTK_M4U_ID(7, 1) 926625ffb9SYong Wu #define M4U_PORT_L7_IMG_WPE_WDMA0 MTK_M4U_ID(7, 2) 936625ffb9SYong Wu 946625ffb9SYong Wu /* larb8 */ 956625ffb9SYong Wu #define M4U_PORT_L8_IMG_WPE_RDMA0 MTK_M4U_ID(8, 0) 966625ffb9SYong Wu #define M4U_PORT_L8_IMG_WPE_RDMA1 MTK_M4U_ID(8, 1) 976625ffb9SYong Wu #define M4U_PORT_L8_IMG_WPE_WDMA0 MTK_M4U_ID(8, 2) 986625ffb9SYong Wu 996625ffb9SYong Wu /* larb9 */ 1006625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGI_T1_A MTK_M4U_ID(9, 0) 1016625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGBI_T1_A MTK_M4U_ID(9, 1) 1026625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGCI_T1_A MTK_M4U_ID(9, 2) 1036625ffb9SYong Wu #define M4U_PORT_L9_IMG_SMTI_T1_A MTK_M4U_ID(9, 3) 1046625ffb9SYong Wu #define M4U_PORT_L9_IMG_TNCSTI_T1_A MTK_M4U_ID(9, 4) 1056625ffb9SYong Wu #define M4U_PORT_L9_IMG_TNCSTI_T4_A MTK_M4U_ID(9, 5) 1066625ffb9SYong Wu #define M4U_PORT_L9_IMG_YUVO_T1_A MTK_M4U_ID(9, 6) 1076625ffb9SYong Wu #define M4U_PORT_L9_IMG_TIMGO_T1_A MTK_M4U_ID(9, 7) 1086625ffb9SYong Wu #define M4U_PORT_L9_IMG_YUVO_T2_A MTK_M4U_ID(9, 8) 1096625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGI_T1_B MTK_M4U_ID(9, 9) 1106625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGBI_T1_B MTK_M4U_ID(9, 10) 1116625ffb9SYong Wu #define M4U_PORT_L9_IMG_IMGCI_T1_B MTK_M4U_ID(9, 11) 1126625ffb9SYong Wu #define M4U_PORT_L9_IMG_YUVO_T5_A MTK_M4U_ID(9, 12) 1136625ffb9SYong Wu #define M4U_PORT_L9_IMG_SMTI_T1_B MTK_M4U_ID(9, 13) 1146625ffb9SYong Wu #define M4U_PORT_L9_IMG_TNCSO_T1_A MTK_M4U_ID(9, 14) 1156625ffb9SYong Wu #define M4U_PORT_L9_IMG_SMTO_T1_A MTK_M4U_ID(9, 15) 1166625ffb9SYong Wu #define M4U_PORT_L9_IMG_TNCSTO_T1_A MTK_M4U_ID(9, 16) 1176625ffb9SYong Wu #define M4U_PORT_L9_IMG_YUVO_T2_B MTK_M4U_ID(9, 17) 1186625ffb9SYong Wu #define M4U_PORT_L9_IMG_YUVO_T5_B MTK_M4U_ID(9, 18) 1196625ffb9SYong Wu #define M4U_PORT_L9_IMG_SMTO_T1_B MTK_M4U_ID(9, 19) 1206625ffb9SYong Wu 1216625ffb9SYong Wu /* larb10 */ 1226625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMGI_D1_A MTK_M4U_ID(10, 0) 1236625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMGCI_D1_A MTK_M4U_ID(10, 1) 1246625ffb9SYong Wu #define M4U_PORT_L10_IMG_DEPI_D1_A MTK_M4U_ID(10, 2) 1256625ffb9SYong Wu #define M4U_PORT_L10_IMG_DMGI_D1_A MTK_M4U_ID(10, 3) 1266625ffb9SYong Wu #define M4U_PORT_L10_IMG_VIPI_D1_A MTK_M4U_ID(10, 4) 1276625ffb9SYong Wu #define M4U_PORT_L10_IMG_TNRWI_D1_A MTK_M4U_ID(10, 5) 1286625ffb9SYong Wu #define M4U_PORT_L10_IMG_RECI_D1_A MTK_M4U_ID(10, 6) 1296625ffb9SYong Wu #define M4U_PORT_L10_IMG_SMTI_D1_A MTK_M4U_ID(10, 7) 1306625ffb9SYong Wu #define M4U_PORT_L10_IMG_SMTI_D6_A MTK_M4U_ID(10, 8) 1316625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGI_P1_A MTK_M4U_ID(10, 9) 1326625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGBI_P1_A MTK_M4U_ID(10, 10) 1336625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGCI_P1_A MTK_M4U_ID(10, 11) 1346625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGI_P1_B MTK_M4U_ID(10, 12) 1356625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGBI_P1_B MTK_M4U_ID(10, 13) 1366625ffb9SYong Wu #define M4U_PORT_L10_IMG_PIMGCI_P1_B MTK_M4U_ID(10, 14) 1376625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMG3O_D1_A MTK_M4U_ID(10, 15) 1386625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMG4O_D1_A MTK_M4U_ID(10, 16) 1396625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMG3CO_D1_A MTK_M4U_ID(10, 17) 1406625ffb9SYong Wu #define M4U_PORT_L10_IMG_FEO_D1_A MTK_M4U_ID(10, 18) 1416625ffb9SYong Wu #define M4U_PORT_L10_IMG_IMG2O_D1_A MTK_M4U_ID(10, 19) 1426625ffb9SYong Wu #define M4U_PORT_L10_IMG_TNRWO_D1_A MTK_M4U_ID(10, 20) 1436625ffb9SYong Wu #define M4U_PORT_L10_IMG_SMTO_D1_A MTK_M4U_ID(10, 21) 1446625ffb9SYong Wu #define M4U_PORT_L10_IMG_WROT_P1_A MTK_M4U_ID(10, 22) 1456625ffb9SYong Wu #define M4U_PORT_L10_IMG_WROT_P1_B MTK_M4U_ID(10, 23) 1466625ffb9SYong Wu 1476625ffb9SYong Wu /* larb11 */ 1486625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_EIS_RDMA0_A MTK_M4U_ID(11, 0) 1496625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_EIS_RDMA1_A MTK_M4U_ID(11, 1) 1506625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_EIS_WDMA0_A MTK_M4U_ID(11, 2) 1516625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_TNR_RDMA0_A MTK_M4U_ID(11, 3) 1526625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_TNR_RDMA1_A MTK_M4U_ID(11, 4) 1536625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_TNR_WDMA0_A MTK_M4U_ID(11, 5) 1546625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_EIS_CQ0_A MTK_M4U_ID(11, 6) 1556625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_EIS_CQ1_A MTK_M4U_ID(11, 7) 1566625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_TNR_CQ0_A MTK_M4U_ID(11, 8) 1576625ffb9SYong Wu #define M4U_PORT_L11_IMG_WPE_TNR_CQ1_A MTK_M4U_ID(11, 9) 1586625ffb9SYong Wu 1596625ffb9SYong Wu /* larb12 */ 1606625ffb9SYong Wu #define M4U_PORT_L12_IMG_FDVT_RDA MTK_M4U_ID(12, 0) 1616625ffb9SYong Wu #define M4U_PORT_L12_IMG_FDVT_RDB MTK_M4U_ID(12, 1) 1626625ffb9SYong Wu #define M4U_PORT_L12_IMG_FDVT_WRA MTK_M4U_ID(12, 2) 1636625ffb9SYong Wu #define M4U_PORT_L12_IMG_FDVT_WRB MTK_M4U_ID(12, 3) 1646625ffb9SYong Wu #define M4U_PORT_L12_IMG_ME_RDMA MTK_M4U_ID(12, 4) 1656625ffb9SYong Wu #define M4U_PORT_L12_IMG_ME_WDMA MTK_M4U_ID(12, 5) 1666625ffb9SYong Wu #define M4U_PORT_L12_IMG_DVS_RDMA MTK_M4U_ID(12, 6) 1676625ffb9SYong Wu #define M4U_PORT_L12_IMG_DVS_WDMA MTK_M4U_ID(12, 7) 1686625ffb9SYong Wu #define M4U_PORT_L12_IMG_DVP_RDMA MTK_M4U_ID(12, 8) 1696625ffb9SYong Wu #define M4U_PORT_L12_IMG_DVP_WDMA MTK_M4U_ID(12, 9) 1706625ffb9SYong Wu 1716625ffb9SYong Wu /* larb13 */ 1726625ffb9SYong Wu #define M4U_PORT_L13_CAM_CAMSV_CQI_E1 MTK_M4U_ID(13, 0) 1736625ffb9SYong Wu #define M4U_PORT_L13_CAM_CAMSV_CQI_E2 MTK_M4U_ID(13, 1) 1746625ffb9SYong Wu #define M4U_PORT_L13_CAM_GCAMSV_A_IMGO_0 MTK_M4U_ID(13, 2) 1756625ffb9SYong Wu #define M4U_PORT_L13_CAM_SCAMSV_A_IMGO_0 MTK_M4U_ID(13, 3) 1766625ffb9SYong Wu #define M4U_PORT_L13_CAM_GCAMSV_B_IMGO_0 MTK_M4U_ID(13, 4) 1776625ffb9SYong Wu #define M4U_PORT_L13_CAM_GCAMSV_B_IMGO_1 MTK_M4U_ID(13, 5) 1786625ffb9SYong Wu #define M4U_PORT_L13_CAM_GCAMSV_A_UFEO_0 MTK_M4U_ID(13, 6) 1796625ffb9SYong Wu #define M4U_PORT_L13_CAM_GCAMSV_B_UFEO_0 MTK_M4U_ID(13, 7) 1806625ffb9SYong Wu #define M4U_PORT_L13_CAM_PDAI_0 MTK_M4U_ID(13, 8) 1816625ffb9SYong Wu #define M4U_PORT_L13_CAM_FAKE MTK_M4U_ID(13, 9) 1826625ffb9SYong Wu 1836625ffb9SYong Wu /* larb14 */ 1846625ffb9SYong Wu #define M4U_PORT_L14_CAM_GCAMSV_A_IMGO_1 MTK_M4U_ID(14, 0) 1856625ffb9SYong Wu #define M4U_PORT_L14_CAM_SCAMSV_A_IMGO_1 MTK_M4U_ID(14, 1) 1866625ffb9SYong Wu #define M4U_PORT_L14_CAM_GCAMSV_B_IMGO_0 MTK_M4U_ID(14, 2) 1876625ffb9SYong Wu #define M4U_PORT_L14_CAM_GCAMSV_B_IMGO_1 MTK_M4U_ID(14, 3) 1886625ffb9SYong Wu #define M4U_PORT_L14_CAM_SCAMSV_B_IMGO_0 MTK_M4U_ID(14, 4) 1896625ffb9SYong Wu #define M4U_PORT_L14_CAM_SCAMSV_B_IMGO_1 MTK_M4U_ID(14, 5) 1906625ffb9SYong Wu #define M4U_PORT_L14_CAM_IPUI MTK_M4U_ID(14, 6) 1916625ffb9SYong Wu #define M4U_PORT_L14_CAM_IPU2I MTK_M4U_ID(14, 7) 1926625ffb9SYong Wu #define M4U_PORT_L14_CAM_IPUO MTK_M4U_ID(14, 8) 1936625ffb9SYong Wu #define M4U_PORT_L14_CAM_IPU2O MTK_M4U_ID(14, 9) 1946625ffb9SYong Wu #define M4U_PORT_L14_CAM_IPU3O MTK_M4U_ID(14, 10) 1956625ffb9SYong Wu #define M4U_PORT_L14_CAM_GCAMSV_A_UFEO_1 MTK_M4U_ID(14, 11) 1966625ffb9SYong Wu #define M4U_PORT_L14_CAM_GCAMSV_B_UFEO_1 MTK_M4U_ID(14, 12) 1976625ffb9SYong Wu #define M4U_PORT_L14_CAM_PDAI_1 MTK_M4U_ID(14, 13) 1986625ffb9SYong Wu #define M4U_PORT_L14_CAM_PDAO MTK_M4U_ID(14, 14) 1996625ffb9SYong Wu 2006625ffb9SYong Wu /* larb15: null */ 2016625ffb9SYong Wu 2026625ffb9SYong Wu /* larb16 */ 2036625ffb9SYong Wu #define M4U_PORT_L16_CAM_IMGO_R1 MTK_M4U_ID(16, 0) 2046625ffb9SYong Wu #define M4U_PORT_L16_CAM_CQI_R1 MTK_M4U_ID(16, 1) 2056625ffb9SYong Wu #define M4U_PORT_L16_CAM_CQI_R2 MTK_M4U_ID(16, 2) 2066625ffb9SYong Wu #define M4U_PORT_L16_CAM_BPCI_R1 MTK_M4U_ID(16, 3) 2076625ffb9SYong Wu #define M4U_PORT_L16_CAM_LSCI_R1 MTK_M4U_ID(16, 4) 2086625ffb9SYong Wu #define M4U_PORT_L16_CAM_RAWI_R2 MTK_M4U_ID(16, 5) 2096625ffb9SYong Wu #define M4U_PORT_L16_CAM_RAWI_R3 MTK_M4U_ID(16, 6) 2106625ffb9SYong Wu #define M4U_PORT_L16_CAM_UFDI_R2 MTK_M4U_ID(16, 7) 2116625ffb9SYong Wu #define M4U_PORT_L16_CAM_UFDI_R3 MTK_M4U_ID(16, 8) 2126625ffb9SYong Wu #define M4U_PORT_L16_CAM_RAWI_R4 MTK_M4U_ID(16, 9) 2136625ffb9SYong Wu #define M4U_PORT_L16_CAM_RAWI_R5 MTK_M4U_ID(16, 10) 2146625ffb9SYong Wu #define M4U_PORT_L16_CAM_AAI_R1 MTK_M4U_ID(16, 11) 2156625ffb9SYong Wu #define M4U_PORT_L16_CAM_FHO_R1 MTK_M4U_ID(16, 12) 2166625ffb9SYong Wu #define M4U_PORT_L16_CAM_AAO_R1 MTK_M4U_ID(16, 13) 2176625ffb9SYong Wu #define M4U_PORT_L16_CAM_TSFSO_R1 MTK_M4U_ID(16, 14) 2186625ffb9SYong Wu #define M4U_PORT_L16_CAM_FLKO_R1 MTK_M4U_ID(16, 15) 2196625ffb9SYong Wu 2206625ffb9SYong Wu /* larb17 */ 2216625ffb9SYong Wu #define M4U_PORT_L17_CAM_YUVO_R1 MTK_M4U_ID(17, 0) 2226625ffb9SYong Wu #define M4U_PORT_L17_CAM_YUVO_R3 MTK_M4U_ID(17, 1) 2236625ffb9SYong Wu #define M4U_PORT_L17_CAM_YUVCO_R1 MTK_M4U_ID(17, 2) 2246625ffb9SYong Wu #define M4U_PORT_L17_CAM_YUVO_R2 MTK_M4U_ID(17, 3) 2256625ffb9SYong Wu #define M4U_PORT_L17_CAM_RZH1N2TO_R1 MTK_M4U_ID(17, 4) 2266625ffb9SYong Wu #define M4U_PORT_L17_CAM_DRZS4NO_R1 MTK_M4U_ID(17, 5) 2276625ffb9SYong Wu #define M4U_PORT_L17_CAM_TNCSO_R1 MTK_M4U_ID(17, 6) 2286625ffb9SYong Wu 2296625ffb9SYong Wu /* larb18 */ 2306625ffb9SYong Wu #define M4U_PORT_L18_CAM_CCUI MTK_M4U_ID(18, 0) 2316625ffb9SYong Wu #define M4U_PORT_L18_CAM_CCUO MTK_M4U_ID(18, 1) 2326625ffb9SYong Wu #define M4U_PORT_L18_CAM_CCUI2 MTK_M4U_ID(18, 2) 2336625ffb9SYong Wu #define M4U_PORT_L18_CAM_CCUO2 MTK_M4U_ID(18, 3) 2346625ffb9SYong Wu 2356625ffb9SYong Wu /* larb19 */ 2366625ffb9SYong Wu #define M4U_PORT_L19_VENC_RCPU MTK_M4U_ID(19, 0) 2376625ffb9SYong Wu #define M4U_PORT_L19_VENC_REC MTK_M4U_ID(19, 1) 2386625ffb9SYong Wu #define M4U_PORT_L19_VENC_BSDMA MTK_M4U_ID(19, 2) 2396625ffb9SYong Wu #define M4U_PORT_L19_VENC_SV_COMV MTK_M4U_ID(19, 3) 2406625ffb9SYong Wu #define M4U_PORT_L19_VENC_RD_COMV MTK_M4U_ID(19, 4) 2416625ffb9SYong Wu #define M4U_PORT_L19_VENC_NBM_RDMA MTK_M4U_ID(19, 5) 2426625ffb9SYong Wu #define M4U_PORT_L19_VENC_NBM_RDMA_LITE MTK_M4U_ID(19, 6) 2436625ffb9SYong Wu #define M4U_PORT_L19_JPGENC_Y_RDMA MTK_M4U_ID(19, 7) 2446625ffb9SYong Wu #define M4U_PORT_L19_JPGENC_C_RDMA MTK_M4U_ID(19, 8) 2456625ffb9SYong Wu #define M4U_PORT_L19_JPGENC_Q_TABLE MTK_M4U_ID(19, 9) 2466625ffb9SYong Wu #define M4U_PORT_L19_VENC_SUB_W_LUMA MTK_M4U_ID(19, 10) 2476625ffb9SYong Wu #define M4U_PORT_L19_VENC_FCS_NBM_RDMA MTK_M4U_ID(19, 11) 2486625ffb9SYong Wu #define M4U_PORT_L19_JPGENC_BSDMA MTK_M4U_ID(19, 12) 2496625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_WDMA0 MTK_M4U_ID(19, 13) 2506625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_BSDMA0 MTK_M4U_ID(19, 14) 2516625ffb9SYong Wu #define M4U_PORT_L19_VENC_NBM_WDMA MTK_M4U_ID(19, 15) 2526625ffb9SYong Wu #define M4U_PORT_L19_VENC_NBM_WDMA_LITE MTK_M4U_ID(19, 16) 2536625ffb9SYong Wu #define M4U_PORT_L19_VENC_FCS_NBM_WDMA MTK_M4U_ID(19, 17) 2546625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_WDMA1 MTK_M4U_ID(19, 18) 2556625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_BSDMA1 MTK_M4U_ID(19, 19) 2566625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_BUFF_OFFSET1 MTK_M4U_ID(19, 20) 2576625ffb9SYong Wu #define M4U_PORT_L19_JPGDEC_BUFF_OFFSET0 MTK_M4U_ID(19, 21) 2586625ffb9SYong Wu #define M4U_PORT_L19_VENC_CUR_LUMA MTK_M4U_ID(19, 22) 2596625ffb9SYong Wu #define M4U_PORT_L19_VENC_CUR_CHROMA MTK_M4U_ID(19, 23) 2606625ffb9SYong Wu #define M4U_PORT_L19_VENC_REF_LUMA MTK_M4U_ID(19, 24) 2616625ffb9SYong Wu #define M4U_PORT_L19_VENC_REF_CHROMA MTK_M4U_ID(19, 25) 2626625ffb9SYong Wu #define M4U_PORT_L19_VENC_SUB_R_CHROMA MTK_M4U_ID(19, 26) 2636625ffb9SYong Wu 2646625ffb9SYong Wu /* larb20 */ 2656625ffb9SYong Wu #define M4U_PORT_L20_VENC_RCPU MTK_M4U_ID(20, 0) 2666625ffb9SYong Wu #define M4U_PORT_L20_VENC_REC MTK_M4U_ID(20, 1) 2676625ffb9SYong Wu #define M4U_PORT_L20_VENC_BSDMA MTK_M4U_ID(20, 2) 2686625ffb9SYong Wu #define M4U_PORT_L20_VENC_SV_COMV MTK_M4U_ID(20, 3) 2696625ffb9SYong Wu #define M4U_PORT_L20_VENC_RD_COMV MTK_M4U_ID(20, 4) 2706625ffb9SYong Wu #define M4U_PORT_L20_VENC_NBM_RDMA MTK_M4U_ID(20, 5) 2716625ffb9SYong Wu #define M4U_PORT_L20_VENC_NBM_RDMA_LITE MTK_M4U_ID(20, 6) 2726625ffb9SYong Wu #define M4U_PORT_L20_JPGENC_Y_RDMA MTK_M4U_ID(20, 7) 2736625ffb9SYong Wu #define M4U_PORT_L20_JPGENC_C_RDMA MTK_M4U_ID(20, 8) 2746625ffb9SYong Wu #define M4U_PORT_L20_JPGENC_Q_TABLE MTK_M4U_ID(20, 9) 2756625ffb9SYong Wu #define M4U_PORT_L20_VENC_SUB_W_LUMA MTK_M4U_ID(20, 10) 2766625ffb9SYong Wu #define M4U_PORT_L20_VENC_FCS_NBM_RDMA MTK_M4U_ID(20, 11) 2776625ffb9SYong Wu #define M4U_PORT_L20_JPGENC_BSDMA MTK_M4U_ID(20, 12) 2786625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_WDMA0 MTK_M4U_ID(20, 13) 2796625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_BSDMA0 MTK_M4U_ID(20, 14) 2806625ffb9SYong Wu #define M4U_PORT_L20_VENC_NBM_WDMA MTK_M4U_ID(20, 15) 2816625ffb9SYong Wu #define M4U_PORT_L20_VENC_NBM_WDMA_LITE MTK_M4U_ID(20, 16) 2826625ffb9SYong Wu #define M4U_PORT_L20_VENC_FCS_NBM_WDMA MTK_M4U_ID(20, 17) 2836625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_WDMA1 MTK_M4U_ID(20, 18) 2846625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_BSDMA1 MTK_M4U_ID(20, 19) 2856625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_BUFF_OFFSET1 MTK_M4U_ID(20, 20) 2866625ffb9SYong Wu #define M4U_PORT_L20_JPGDEC_BUFF_OFFSET0 MTK_M4U_ID(20, 21) 2876625ffb9SYong Wu #define M4U_PORT_L20_VENC_CUR_LUMA MTK_M4U_ID(20, 22) 2886625ffb9SYong Wu #define M4U_PORT_L20_VENC_CUR_CHROMA MTK_M4U_ID(20, 23) 2896625ffb9SYong Wu #define M4U_PORT_L20_VENC_REF_LUMA MTK_M4U_ID(20, 24) 2906625ffb9SYong Wu #define M4U_PORT_L20_VENC_REF_CHROMA MTK_M4U_ID(20, 25) 2916625ffb9SYong Wu #define M4U_PORT_L20_VENC_SUB_R_CHROMA MTK_M4U_ID(20, 26) 2926625ffb9SYong Wu 2936625ffb9SYong Wu /* larb21 */ 2946625ffb9SYong Wu #define M4U_PORT_L21_VDEC_MC_EXT MTK_M4U_ID(21, 0) 2956625ffb9SYong Wu #define M4U_PORT_L21_VDEC_UFO_EXT MTK_M4U_ID(21, 1) 2966625ffb9SYong Wu #define M4U_PORT_L21_VDEC_PP_EXT MTK_M4U_ID(21, 2) 2976625ffb9SYong Wu #define M4U_PORT_L21_VDEC_PRED_RD_EXT MTK_M4U_ID(21, 3) 2986625ffb9SYong Wu #define M4U_PORT_L21_VDEC_PRED_WR_EXT MTK_M4U_ID(21, 4) 2996625ffb9SYong Wu #define M4U_PORT_L21_VDEC_PPWRAP_EXT MTK_M4U_ID(21, 5) 3006625ffb9SYong Wu #define M4U_PORT_L21_VDEC_TILE_EXT MTK_M4U_ID(21, 6) 3016625ffb9SYong Wu #define M4U_PORT_L21_VDEC_VLD_EXT MTK_M4U_ID(21, 7) 3026625ffb9SYong Wu #define M4U_PORT_L21_VDEC_VLD2_EXT MTK_M4U_ID(21, 8) 3036625ffb9SYong Wu #define M4U_PORT_L21_VDEC_AVC_MV_EXT MTK_M4U_ID(21, 9) 3046625ffb9SYong Wu 3056625ffb9SYong Wu /* larb22 */ 3066625ffb9SYong Wu #define M4U_PORT_L22_VDEC_MC_EXT MTK_M4U_ID(22, 0) 3076625ffb9SYong Wu #define M4U_PORT_L22_VDEC_UFO_EXT MTK_M4U_ID(22, 1) 3086625ffb9SYong Wu #define M4U_PORT_L22_VDEC_PP_EXT MTK_M4U_ID(22, 2) 3096625ffb9SYong Wu #define M4U_PORT_L22_VDEC_PRED_RD_EXT MTK_M4U_ID(22, 3) 3106625ffb9SYong Wu #define M4U_PORT_L22_VDEC_PRED_WR_EXT MTK_M4U_ID(22, 4) 3116625ffb9SYong Wu #define M4U_PORT_L22_VDEC_PPWRAP_EXT MTK_M4U_ID(22, 5) 3126625ffb9SYong Wu #define M4U_PORT_L22_VDEC_TILE_EXT MTK_M4U_ID(22, 6) 3136625ffb9SYong Wu #define M4U_PORT_L22_VDEC_VLD_EXT MTK_M4U_ID(22, 7) 3146625ffb9SYong Wu #define M4U_PORT_L22_VDEC_VLD2_EXT MTK_M4U_ID(22, 8) 3156625ffb9SYong Wu #define M4U_PORT_L22_VDEC_AVC_MV_EXT MTK_M4U_ID(22, 9) 3166625ffb9SYong Wu 3176625ffb9SYong Wu /* larb23 */ 3186625ffb9SYong Wu #define M4U_PORT_L23_VDEC_UFO_ENC_EXT MTK_M4U_ID(23, 0) 3196625ffb9SYong Wu #define M4U_PORT_L23_VDEC_RDMA_EXT MTK_M4U_ID(23, 1) 3206625ffb9SYong Wu 3216625ffb9SYong Wu /* larb24 */ 3226625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_VLD_EXT MTK_M4U_ID(24, 0) 3236625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_VLD2_EXT MTK_M4U_ID(24, 1) 3246625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_AVC_MC_EXT MTK_M4U_ID(24, 2) 3256625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_PRED_RD_EXT MTK_M4U_ID(24, 3) 3266625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_TILE_EXT MTK_M4U_ID(24, 4) 3276625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT0_WDMA_EXT MTK_M4U_ID(24, 5) 3286625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_VLD_EXT MTK_M4U_ID(24, 6) 3296625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_VLD2_EXT MTK_M4U_ID(24, 7) 3306625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_AVC_MC_EXT MTK_M4U_ID(24, 8) 3316625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_PRED_RD_EXT MTK_M4U_ID(24, 9) 3326625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_TILE_EXT MTK_M4U_ID(24, 10) 3336625ffb9SYong Wu #define M4U_PORT_L24_VDEC_LAT1_WDMA_EXT MTK_M4U_ID(24, 11) 3346625ffb9SYong Wu 3356625ffb9SYong Wu /* larb25 */ 3366625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_LSCI_M1 MTK_M4U_ID(25, 0) 3376625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_CQI_M1 MTK_M4U_ID(25, 1) 3386625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_CQI_M2 MTK_M4U_ID(25, 2) 3396625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_IMGO_M1 MTK_M4U_ID(25, 3) 3406625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_IMGBO_M1 MTK_M4U_ID(25, 4) 3416625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_LSCI_M1 MTK_M4U_ID(25, 5) 3426625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_CQI_M1 MTK_M4U_ID(25, 6) 3436625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_CQI_M2 MTK_M4U_ID(25, 7) 3446625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_IMGO_M1 MTK_M4U_ID(25, 8) 3456625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_IMGBO_M1 MTK_M4U_ID(25, 9) 3466625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW0_AFO_M1 MTK_M4U_ID(25, 10) 3476625ffb9SYong Wu #define M4U_PORT_L25_CAM_MRAW2_AFO_M1 MTK_M4U_ID(25, 11) 3486625ffb9SYong Wu 3496625ffb9SYong Wu /* larb26 */ 3506625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_LSCI_M1 MTK_M4U_ID(26, 0) 3516625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_CQI_M1 MTK_M4U_ID(26, 1) 3526625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_CQI_M2 MTK_M4U_ID(26, 2) 3536625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_IMGO_M1 MTK_M4U_ID(26, 3) 3546625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_IMGBO_M1 MTK_M4U_ID(26, 4) 3556625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_LSCI_M1 MTK_M4U_ID(26, 5) 3566625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_CQI_M1 MTK_M4U_ID(26, 6) 3576625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_CQI_M2 MTK_M4U_ID(26, 7) 3586625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_IMGO_M1 MTK_M4U_ID(26, 8) 3596625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_IMGBO_M1 MTK_M4U_ID(26, 9) 3606625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW1_AFO_M1 MTK_M4U_ID(26, 10) 3616625ffb9SYong Wu #define M4U_PORT_L26_CAM_MRAW3_AFO_M1 MTK_M4U_ID(26, 11) 3626625ffb9SYong Wu 3636625ffb9SYong Wu /* larb27 */ 3646625ffb9SYong Wu #define M4U_PORT_L27_CAM_IMGO_R1 MTK_M4U_ID(27, 0) 3656625ffb9SYong Wu #define M4U_PORT_L27_CAM_CQI_R1 MTK_M4U_ID(27, 1) 3666625ffb9SYong Wu #define M4U_PORT_L27_CAM_CQI_R2 MTK_M4U_ID(27, 2) 3676625ffb9SYong Wu #define M4U_PORT_L27_CAM_BPCI_R1 MTK_M4U_ID(27, 3) 3686625ffb9SYong Wu #define M4U_PORT_L27_CAM_LSCI_R1 MTK_M4U_ID(27, 4) 3696625ffb9SYong Wu #define M4U_PORT_L27_CAM_RAWI_R2 MTK_M4U_ID(27, 5) 3706625ffb9SYong Wu #define M4U_PORT_L27_CAM_RAWI_R3 MTK_M4U_ID(27, 6) 3716625ffb9SYong Wu #define M4U_PORT_L27_CAM_UFDI_R2 MTK_M4U_ID(27, 7) 3726625ffb9SYong Wu #define M4U_PORT_L27_CAM_UFDI_R3 MTK_M4U_ID(27, 8) 3736625ffb9SYong Wu #define M4U_PORT_L27_CAM_RAWI_R4 MTK_M4U_ID(27, 9) 3746625ffb9SYong Wu #define M4U_PORT_L27_CAM_RAWI_R5 MTK_M4U_ID(27, 10) 3756625ffb9SYong Wu #define M4U_PORT_L27_CAM_AAI_R1 MTK_M4U_ID(27, 11) 3766625ffb9SYong Wu #define M4U_PORT_L27_CAM_FHO_R1 MTK_M4U_ID(27, 12) 3776625ffb9SYong Wu #define M4U_PORT_L27_CAM_AAO_R1 MTK_M4U_ID(27, 13) 3786625ffb9SYong Wu #define M4U_PORT_L27_CAM_TSFSO_R1 MTK_M4U_ID(27, 14) 3796625ffb9SYong Wu #define M4U_PORT_L27_CAM_FLKO_R1 MTK_M4U_ID(27, 15) 3806625ffb9SYong Wu 3816625ffb9SYong Wu /* larb28 */ 3826625ffb9SYong Wu #define M4U_PORT_L28_CAM_YUVO_R1 MTK_M4U_ID(28, 0) 3836625ffb9SYong Wu #define M4U_PORT_L28_CAM_YUVO_R3 MTK_M4U_ID(28, 1) 3846625ffb9SYong Wu #define M4U_PORT_L28_CAM_YUVCO_R1 MTK_M4U_ID(28, 2) 3856625ffb9SYong Wu #define M4U_PORT_L28_CAM_YUVO_R2 MTK_M4U_ID(28, 3) 3866625ffb9SYong Wu #define M4U_PORT_L28_CAM_RZH1N2TO_R1 MTK_M4U_ID(28, 4) 3876625ffb9SYong Wu #define M4U_PORT_L28_CAM_DRZS4NO_R1 MTK_M4U_ID(28, 5) 3886625ffb9SYong Wu #define M4U_PORT_L28_CAM_TNCSO_R1 MTK_M4U_ID(28, 6) 3896625ffb9SYong Wu 390*dc1d9934SYong Wu /* Infra iommu ports */ 391*dc1d9934SYong Wu /* PCIe1: read: BIT16; write BIT17. */ 392*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_PCIE1 MTK_IFAIOMMU_PERI_ID(16) 393*dc1d9934SYong Wu /* PCIe0: read: BIT18; write BIT19. */ 394*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_PCIE0 MTK_IFAIOMMU_PERI_ID(18) 395*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P3_R MTK_IFAIOMMU_PERI_ID(20) 396*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P3_W MTK_IFAIOMMU_PERI_ID(21) 397*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P2_R MTK_IFAIOMMU_PERI_ID(22) 398*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P2_W MTK_IFAIOMMU_PERI_ID(23) 399*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P1_1_R MTK_IFAIOMMU_PERI_ID(24) 400*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P1_1_W MTK_IFAIOMMU_PERI_ID(25) 401*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P1_0_R MTK_IFAIOMMU_PERI_ID(26) 402*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_P1_0_W MTK_IFAIOMMU_PERI_ID(27) 403*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB2_R MTK_IFAIOMMU_PERI_ID(28) 404*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB2_W MTK_IFAIOMMU_PERI_ID(29) 405*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_R MTK_IFAIOMMU_PERI_ID(30) 406*dc1d9934SYong Wu #define IOMMU_PORT_INFRA_SSUSB_W MTK_IFAIOMMU_PERI_ID(31) 407*dc1d9934SYong Wu 4086625ffb9SYong Wu #endif 409