unplugged-kernel/drivers/misc/mediatek/smi/mt6765/smi_port.h

87 lines
3.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2020 MediaTek Inc.
*/
#ifndef __SMI_PORT_H__
#define __SMI_PORT_H__
#define SMI_OSTD_MAX (0x3f)
#define SMI_COMM_MASTER_NUM (4)
#define SMI_LARB_NUM (4)
#define SMI_LARB0_PORT_NUM (8) /* MMSYS */
#define SMI_LARB1_PORT_NUM (11) /* VCODEC */
#define SMI_LARB2_PORT_NUM (12) /* IMGSYS */
#define SMI_LARB3_PORT_NUM (21) /* CAMSYS */
#define SMI_COMM_NUM (1)
#define SMI_DEV_NUM ((SMI_LARB_NUM) + (SMI_COMM_NUM))
static const bool
SMI_COMM_BUS_SEL[SMI_COMM_MASTER_NUM] = {0, 1, 0, 1,};
static const u32
SMI_LARB_L1ARB[SMI_LARB_NUM] = {
0, 1, 2, 3};
static const u8
SMI_LARB_PORT_NUM[SMI_LARB_NUM] = {
8, 11, 12, 21};
#define SMI_LARB_PORT_ID(l, p) (((l) << 16) | ((p) & 0xffff))
#define SMI_DISP_OVL0 SMI_LARB_PORT_ID(0, 0)
#define SMI_DISP_OVL0_2L SMI_LARB_PORT_ID(0, 1)
#define SMI_DISP_RDMA0 SMI_LARB_PORT_ID(0, 2)
#define SMI_DISP_WDMA0 SMI_LARB_PORT_ID(0, 3)
#define SMI_DISP_MDP_RDMA0 SMI_LARB_PORT_ID(0, 4)
#define SMI_DISP_MDP_WDMA0 SMI_LARB_PORT_ID(0, 5)
#define SMI_DISP_MDP_WROT0 SMI_LARB_PORT_ID(0, 6)
#define SMI_DISP_FAKE0 SMI_LARB_PORT_ID(0, 7)
#define SMI_VENC_RCPU SMI_LARB_PORT_ID(1, 0)
#define SMI_VENC_REC SMI_LARB_PORT_ID(1, 1)
#define SMI_VENC_BSDMA SMI_LARB_PORT_ID(1, 2)
#define SMI_VENC_SV_COMV SMI_LARB_PORT_ID(1, 3)
#define SMI_VENC_RD_COMV SMI_LARB_PORT_ID(1, 4)
#define SMI_JPGENC_RDMA SMI_LARB_PORT_ID(1, 5)
#define SMI_JPGENC_BSDMA SMI_LARB_PORT_ID(1, 6)
#define SMI_VENC_CUR_LUMA SMI_LARB_PORT_ID(1, 7)
#define SMI_VENC_CUR_CHROMA SMI_LARB_PORT_ID(1, 8)
#define SMI_VENC_REF_LUMA SMI_LARB_PORT_ID(1, 9)
#define SMI_VENC_REF_CHROMA SMI_LARB_PORT_ID(1, 10)
#define SMI_CAM_IMGI SMI_LARB_PORT_ID(2, 0)
#define SMI_CAM_IMG2O SMI_LARB_PORT_ID(2, 1)
#define SMI_CAM_IMG3O SMI_LARB_PORT_ID(2, 2)
#define SMI_CAM_VIPI SMI_LARB_PORT_ID(2, 3)
#define SMI_CAM_LCEI SMI_LARB_PORT_ID(2, 4)
#define SMI_CAM_FD_RP SMI_LARB_PORT_ID(2, 5)
#define SMI_CAM_FD_WR SMI_LARB_PORT_ID(2, 6)
#define SMI_CAM_FD_RD SMI_LARB_PORT_ID(2, 7)
#define SMI_CAM_DPE_RDMA SMI_LARB_PORT_ID(2, 8)
#define SMI_CAM_DPE_WDMA SMI_LARB_PORT_ID(2, 9)
#define SMI_CAM_RSC_RDMA SMI_LARB_PORT_ID(2, 10)
#define SMI_CAM_RSC_WDMA SMI_LARB_PORT_ID(2, 11)
#define SMI_CAM_IMGO SMI_LARB_PORT_ID(3, 0)
#define SMI_CAM_RRZO SMI_LARB_PORT_ID(3, 1)
#define SMI_CAM_AAO SMI_LARB_PORT_ID(3, 2)
#define SMI_CAM_AFO SMI_LARB_PORT_ID(3, 3)
#define SMI_CAM_LSCI0 SMI_LARB_PORT_ID(3, 4)
#define SMI_CAM_LSCI1 SMI_LARB_PORT_ID(3, 5)
#define SMI_CAM_PDO SMI_LARB_PORT_ID(3, 6)
#define SMI_CAM_BPCI SMI_LARB_PORT_ID(3, 7)
#define SMI_CAM_LSCO SMI_LARB_PORT_ID(3, 8)
#define SMI_CAM_RSSO_A SMI_LARB_PORT_ID(3, 9)
#define SMI_CAM_RSSO_B SMI_LARB_PORT_ID(3, 10)
#define SMI_CAM_UFEO SMI_LARB_PORT_ID(3, 11)
#define SMI_CAM_SOC0 SMI_LARB_PORT_ID(3, 12)
#define SMI_CAM_SOC1 SMI_LARB_PORT_ID(3, 13)
#define SMI_CAM_SOC2 SMI_LARB_PORT_ID(3, 14)
#define SMI_CAM_CCUI SMI_LARB_PORT_ID(3, 15)
#define SMI_CAM_CCUO SMI_LARB_PORT_ID(3, 16)
#define SMI_CAM_CACI SMI_LARB_PORT_ID(3, 17)
#define SMI_CAM_RAWI_A SMI_LARB_PORT_ID(3, 18)
#define SMI_CAM_RAWI_B SMI_LARB_PORT_ID(3, 19)
#define SMI_CAM_CCUG SMI_LARB_PORT_ID(3, 20)
#endif