linux/drivers/media/platform/renesas/vsp1/vsp1_regs.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * vsp1_regs.h  --  R-Car VSP1 Registers Definitions
 *
 * Copyright (C) 2013 Renesas Electronics Corporation
 *
 * Contact: Laurent Pinchart ([email protected])
 */

#ifndef __VSP1_REGS_H__
#define __VSP1_REGS_H__

/* -----------------------------------------------------------------------------
 * General Control Registers
 */

#define VI6_CMD(n)
#define VI6_CMD_UPDHDR
#define VI6_CMD_STRCMD

#define VI6_CLK_DCSWT
#define VI6_CLK_DCSWT_CSTPW_MASK
#define VI6_CLK_DCSWT_CSTPW_SHIFT
#define VI6_CLK_DCSWT_CSTRW_MASK
#define VI6_CLK_DCSWT_CSTRW_SHIFT

#define VI6_SRESET
#define VI6_SRESET_SRTS(n)

#define VI6_STATUS
#define VI6_STATUS_FLD_STD(n)
#define VI6_STATUS_SYS_ACT(n)

#define VI6_WPF_IRQ_ENB(n)
#define VI6_WPF_IRQ_ENB_UNDE
#define VI6_WPF_IRQ_ENB_DFEE
#define VI6_WPF_IRQ_ENB_FREE

#define VI6_WPF_IRQ_STA(n)
#define VI6_WPF_IRQ_STA_UND
#define VI6_WPF_IRQ_STA_DFE
#define VI6_WPF_IRQ_STA_FRE

#define VI6_DISP_IRQ_ENB(n)
#define VI6_DISP_IRQ_ENB_DSTE
#define VI6_DISP_IRQ_ENB_MAEE
#define VI6_DISP_IRQ_ENB_LNEE(n)

#define VI6_DISP_IRQ_STA(n)
#define VI6_DISP_IRQ_STA_DST
#define VI6_DISP_IRQ_STA_MAE
#define VI6_DISP_IRQ_STA_LNE(n)

#define VI6_WPF_LINE_COUNT(n)
#define VI6_WPF_LINE_COUNT_MASK

/* -----------------------------------------------------------------------------
 * Display List Control Registers
 */

#define VI6_DL_CTRL
#define VI6_DL_CTRL_AR_WAIT_MASK
#define VI6_DL_CTRL_AR_WAIT_SHIFT
#define VI6_DL_CTRL_DC2
#define VI6_DL_CTRL_DC1
#define VI6_DL_CTRL_DC0
#define VI6_DL_CTRL_CFM0
#define VI6_DL_CTRL_NH0
#define VI6_DL_CTRL_DLE

#define VI6_DL_HDR_ADDR(n)

#define VI6_DL_SWAP
#define VI6_DL_SWAP_LWS
#define VI6_DL_SWAP_WDS
#define VI6_DL_SWAP_BTS

#define VI6_DL_EXT_CTRL(n)
#define VI6_DL_EXT_CTRL_NWE
#define VI6_DL_EXT_CTRL_POLINT_MASK
#define VI6_DL_EXT_CTRL_POLINT_SHIFT
#define VI6_DL_EXT_CTRL_DLPRI
#define VI6_DL_EXT_CTRL_EXPRI
#define VI6_DL_EXT_CTRL_EXT

#define VI6_DL_EXT_AUTOFLD_INT

#define VI6_DL_BODY_SIZE
#define VI6_DL_BODY_SIZE_UPD
#define VI6_DL_BODY_SIZE_BS_MASK
#define VI6_DL_BODY_SIZE_BS_SHIFT

/* -----------------------------------------------------------------------------
 * RPF Control Registers
 */

#define VI6_RPF_OFFSET

#define VI6_RPF_SRC_BSIZE
#define VI6_RPF_SRC_BSIZE_BHSIZE_MASK
#define VI6_RPF_SRC_BSIZE_BHSIZE_SHIFT
#define VI6_RPF_SRC_BSIZE_BVSIZE_MASK
#define VI6_RPF_SRC_BSIZE_BVSIZE_SHIFT

#define VI6_RPF_SRC_ESIZE
#define VI6_RPF_SRC_ESIZE_EHSIZE_MASK
#define VI6_RPF_SRC_ESIZE_EHSIZE_SHIFT
#define VI6_RPF_SRC_ESIZE_EVSIZE_MASK
#define VI6_RPF_SRC_ESIZE_EVSIZE_SHIFT

#define VI6_RPF_INFMT
#define VI6_RPF_INFMT_VIR
#define VI6_RPF_INFMT_CIPM
#define VI6_RPF_INFMT_SPYCS
#define VI6_RPF_INFMT_SPUVS
#define VI6_RPF_INFMT_CEXT_ZERO
#define VI6_RPF_INFMT_CEXT_EXT
#define VI6_RPF_INFMT_CEXT_ONE
#define VI6_RPF_INFMT_CEXT_MASK
#define VI6_RPF_INFMT_RDTM_BT601
#define VI6_RPF_INFMT_RDTM_BT601_EXT
#define VI6_RPF_INFMT_RDTM_BT709
#define VI6_RPF_INFMT_RDTM_BT709_EXT
#define VI6_RPF_INFMT_RDTM_MASK
#define VI6_RPF_INFMT_CSC
#define VI6_RPF_INFMT_RDFMT_MASK
#define VI6_RPF_INFMT_RDFMT_SHIFT

#define VI6_RPF_DSWAP
#define VI6_RPF_DSWAP_A_LLS
#define VI6_RPF_DSWAP_A_LWS
#define VI6_RPF_DSWAP_A_WDS
#define VI6_RPF_DSWAP_A_BTS
#define VI6_RPF_DSWAP_P_LLS
#define VI6_RPF_DSWAP_P_LWS
#define VI6_RPF_DSWAP_P_WDS
#define VI6_RPF_DSWAP_P_BTS

#define VI6_RPF_LOC
#define VI6_RPF_LOC_HCOORD_MASK
#define VI6_RPF_LOC_HCOORD_SHIFT
#define VI6_RPF_LOC_VCOORD_MASK
#define VI6_RPF_LOC_VCOORD_SHIFT

#define VI6_RPF_ALPH_SEL
#define VI6_RPF_ALPH_SEL_ASEL_PACKED
#define VI6_RPF_ALPH_SEL_ASEL_8B_PLANE
#define VI6_RPF_ALPH_SEL_ASEL_SELECT
#define VI6_RPF_ALPH_SEL_ASEL_1B_PLANE
#define VI6_RPF_ALPH_SEL_ASEL_FIXED
#define VI6_RPF_ALPH_SEL_ASEL_MASK
#define VI6_RPF_ALPH_SEL_ASEL_SHIFT
#define VI6_RPF_ALPH_SEL_IROP_MASK
#define VI6_RPF_ALPH_SEL_IROP_SHIFT
#define VI6_RPF_ALPH_SEL_BSEL
#define VI6_RPF_ALPH_SEL_AEXT_ZERO
#define VI6_RPF_ALPH_SEL_AEXT_EXT
#define VI6_RPF_ALPH_SEL_AEXT_ONE
#define VI6_RPF_ALPH_SEL_AEXT_MASK
#define VI6_RPF_ALPH_SEL_ALPHA1_MASK
#define VI6_RPF_ALPH_SEL_ALPHA1_SHIFT
#define VI6_RPF_ALPH_SEL_ALPHA0_MASK
#define VI6_RPF_ALPH_SEL_ALPHA0_SHIFT

#define VI6_RPF_VRTCOL_SET
#define VI6_RPF_VRTCOL_SET_LAYA_MASK
#define VI6_RPF_VRTCOL_SET_LAYA_SHIFT
#define VI6_RPF_VRTCOL_SET_LAYR_MASK
#define VI6_RPF_VRTCOL_SET_LAYR_SHIFT
#define VI6_RPF_VRTCOL_SET_LAYG_MASK
#define VI6_RPF_VRTCOL_SET_LAYG_SHIFT
#define VI6_RPF_VRTCOL_SET_LAYB_MASK
#define VI6_RPF_VRTCOL_SET_LAYB_SHIFT

#define VI6_RPF_MSK_CTRL
#define VI6_RPF_MSK_CTRL_MSK_EN
#define VI6_RPF_MSK_CTRL_MGR_MASK
#define VI6_RPF_MSK_CTRL_MGR_SHIFT
#define VI6_RPF_MSK_CTRL_MGG_MASK
#define VI6_RPF_MSK_CTRL_MGG_SHIFT
#define VI6_RPF_MSK_CTRL_MGB_MASK
#define VI6_RPF_MSK_CTRL_MGB_SHIFT

#define VI6_RPF_MSK_SET0
#define VI6_RPF_MSK_SET1
#define VI6_RPF_MSK_SET_MSA_MASK
#define VI6_RPF_MSK_SET_MSA_SHIFT
#define VI6_RPF_MSK_SET_MSR_MASK
#define VI6_RPF_MSK_SET_MSR_SHIFT
#define VI6_RPF_MSK_SET_MSG_MASK
#define VI6_RPF_MSK_SET_MSG_SHIFT
#define VI6_RPF_MSK_SET_MSB_MASK
#define VI6_RPF_MSK_SET_MSB_SHIFT

#define VI6_RPF_CKEY_CTRL
#define VI6_RPF_CKEY_CTRL_CV
#define VI6_RPF_CKEY_CTRL_SAPE1
#define VI6_RPF_CKEY_CTRL_SAPE0

#define VI6_RPF_CKEY_SET0
#define VI6_RPF_CKEY_SET1
#define VI6_RPF_CKEY_SET_AP_MASK
#define VI6_RPF_CKEY_SET_AP_SHIFT
#define VI6_RPF_CKEY_SET_R_MASK
#define VI6_RPF_CKEY_SET_R_SHIFT
#define VI6_RPF_CKEY_SET_GY_MASK
#define VI6_RPF_CKEY_SET_GY_SHIFT
#define VI6_RPF_CKEY_SET_B_MASK
#define VI6_RPF_CKEY_SET_B_SHIFT

#define VI6_RPF_SRCM_PSTRIDE
#define VI6_RPF_SRCM_PSTRIDE_Y_SHIFT
#define VI6_RPF_SRCM_PSTRIDE_C_SHIFT

#define VI6_RPF_SRCM_ASTRIDE
#define VI6_RPF_SRCM_PSTRIDE_A_SHIFT

#define VI6_RPF_SRCM_ADDR_Y
#define VI6_RPF_SRCM_ADDR_C0
#define VI6_RPF_SRCM_ADDR_C1
#define VI6_RPF_SRCM_ADDR_AI

#define VI6_RPF_MULT_ALPHA
#define VI6_RPF_MULT_ALPHA_A_MMD_NONE
#define VI6_RPF_MULT_ALPHA_A_MMD_RATIO
#define VI6_RPF_MULT_ALPHA_P_MMD_NONE
#define VI6_RPF_MULT_ALPHA_P_MMD_RATIO
#define VI6_RPF_MULT_ALPHA_P_MMD_IMAGE
#define VI6_RPF_MULT_ALPHA_P_MMD_BOTH
#define VI6_RPF_MULT_ALPHA_RATIO_MASK
#define VI6_RPF_MULT_ALPHA_RATIO_SHIFT

#define VI6_RPF_EXT_INFMT0
#define VI6_RPF_EXT_INFMT0_F2B
#define VI6_RPF_EXT_INFMT0_IPBD_Y_8
#define VI6_RPF_EXT_INFMT0_IPBD_Y_10
#define VI6_RPF_EXT_INFMT0_IPBD_Y_12
#define VI6_RPF_EXT_INFMT0_IPBD_C_8
#define VI6_RPF_EXT_INFMT0_IPBD_C_10
#define VI6_RPF_EXT_INFMT0_IPBD_C_12
#define VI6_RPF_EXT_INFMT0_BYPP_M1_RGB10

#define VI6_RPF_EXT_INFMT1
#define VI6_RPF_EXT_INFMT1_PACK_CPOS(a, b, c, d)

#define VI6_RPF_EXT_INFMT2
#define VI6_RPF_EXT_INFMT2_PACK_CLEN(a, b, c, d)

#define VI6_RPF_BRDITH_CTRL
#define VI6_RPF_BRDITH_CTRL_ODE
#define VI6_RPF_BRDITH_CTRL_CBRM

/* -----------------------------------------------------------------------------
 * WPF Control Registers
 */

#define VI6_WPF_OFFSET

#define VI6_WPF_SRCRPF
#define VI6_WPF_SRCRPF_VIRACT_DIS
#define VI6_WPF_SRCRPF_VIRACT_SUB
#define VI6_WPF_SRCRPF_VIRACT_MST
#define VI6_WPF_SRCRPF_VIRACT_MASK
#define VI6_WPF_SRCRPF_VIRACT2_DIS
#define VI6_WPF_SRCRPF_VIRACT2_SUB
#define VI6_WPF_SRCRPF_VIRACT2_MST
#define VI6_WPF_SRCRPF_VIRACT2_MASK
#define VI6_WPF_SRCRPF_RPF_ACT_DIS(n)
#define VI6_WPF_SRCRPF_RPF_ACT_SUB(n)
#define VI6_WPF_SRCRPF_RPF_ACT_MST(n)
#define VI6_WPF_SRCRPF_RPF_ACT_MASK(n)

#define VI6_WPF_HSZCLIP
#define VI6_WPF_VSZCLIP
#define VI6_WPF_SZCLIP_EN
#define VI6_WPF_SZCLIP_OFST_MASK
#define VI6_WPF_SZCLIP_OFST_SHIFT
#define VI6_WPF_SZCLIP_SIZE_MASK
#define VI6_WPF_SZCLIP_SIZE_SHIFT

#define VI6_WPF_OUTFMT
#define VI6_WPF_OUTFMT_PDV_MASK
#define VI6_WPF_OUTFMT_PDV_SHIFT
#define VI6_WPF_OUTFMT_PXA
#define VI6_WPF_OUTFMT_ROT
#define VI6_WPF_OUTFMT_HFLP
#define VI6_WPF_OUTFMT_FLP
#define VI6_WPF_OUTFMT_SPYCS
#define VI6_WPF_OUTFMT_SPUVS
#define VI6_WPF_OUTFMT_DITH_DIS
#define VI6_WPF_OUTFMT_DITH_EN
#define VI6_WPF_OUTFMT_DITH_MASK
#define VI6_WPF_OUTFMT_WRTM_BT601
#define VI6_WPF_OUTFMT_WRTM_BT601_EXT
#define VI6_WPF_OUTFMT_WRTM_BT709
#define VI6_WPF_OUTFMT_WRTM_BT709_EXT
#define VI6_WPF_OUTFMT_WRTM_MASK
#define VI6_WPF_OUTFMT_CSC
#define VI6_WPF_OUTFMT_WRFMT_MASK
#define VI6_WPF_OUTFMT_WRFMT_SHIFT

#define VI6_WPF_DSWAP
#define VI6_WPF_DSWAP_P_LLS
#define VI6_WPF_DSWAP_P_LWS
#define VI6_WPF_DSWAP_P_WDS
#define VI6_WPF_DSWAP_P_BTS

#define VI6_WPF_RNDCTRL
#define VI6_WPF_RNDCTRL_CBRM
#define VI6_WPF_RNDCTRL_ABRM_TRUNC
#define VI6_WPF_RNDCTRL_ABRM_ROUND
#define VI6_WPF_RNDCTRL_ABRM_THRESH
#define VI6_WPF_RNDCTRL_ABRM_MASK
#define VI6_WPF_RNDCTRL_ATHRESH_MASK
#define VI6_WPF_RNDCTRL_ATHRESH_SHIFT
#define VI6_WPF_RNDCTRL_CLMD_FULL
#define VI6_WPF_RNDCTRL_CLMD_CLIP
#define VI6_WPF_RNDCTRL_CLMD_EXT
#define VI6_WPF_RNDCTRL_CLMD_MASK

#define VI6_WPF_ROT_CTRL
#define VI6_WPF_ROT_CTRL_LN16
#define VI6_WPF_ROT_CTRL_LMEM_WD_MASK
#define VI6_WPF_ROT_CTRL_LMEM_WD_SHIFT

#define VI6_WPF_DSTM_STRIDE_Y
#define VI6_WPF_DSTM_STRIDE_C
#define VI6_WPF_DSTM_ADDR_Y
#define VI6_WPF_DSTM_ADDR_C0
#define VI6_WPF_DSTM_ADDR_C1

#define VI6_WPF_WRBCK_CTRL(n)
#define VI6_WPF_WRBCK_CTRL_WBMD

/* -----------------------------------------------------------------------------
 * UIF Control Registers
 */

#define VI6_UIF_OFFSET

#define VI6_UIF_DISCOM_DOCMCR
#define VI6_UIF_DISCOM_DOCMCR_CMPRU
#define VI6_UIF_DISCOM_DOCMCR_CMPR

#define VI6_UIF_DISCOM_DOCMSTR
#define VI6_UIF_DISCOM_DOCMSTR_CMPPRE
#define VI6_UIF_DISCOM_DOCMSTR_CMPST

#define VI6_UIF_DISCOM_DOCMCLSTR
#define VI6_UIF_DISCOM_DOCMCLSTR_CMPCLPRE
#define VI6_UIF_DISCOM_DOCMCLSTR_CMPCLST

#define VI6_UIF_DISCOM_DOCMIENR
#define VI6_UIF_DISCOM_DOCMIENR_CMPPREIEN
#define VI6_UIF_DISCOM_DOCMIENR_CMPIEN

#define VI6_UIF_DISCOM_DOCMMDR
#define VI6_UIF_DISCOM_DOCMMDR_INTHRH(n)

#define VI6_UIF_DISCOM_DOCMPMR
#define VI6_UIF_DISCOM_DOCMPMR_CMPDFF(n)
#define VI6_UIF_DISCOM_DOCMPMR_CMPDFA(n)
#define VI6_UIF_DISCOM_DOCMPMR_CMPDAUF
#define VI6_UIF_DISCOM_DOCMPMR_SEL(n)

#define VI6_UIF_DISCOM_DOCMECRCR
#define VI6_UIF_DISCOM_DOCMCCRCR
#define VI6_UIF_DISCOM_DOCMSPXR
#define VI6_UIF_DISCOM_DOCMSPYR
#define VI6_UIF_DISCOM_DOCMSZXR
#define VI6_UIF_DISCOM_DOCMSZYR

/* -----------------------------------------------------------------------------
 * DPR Control Registers
 */

#define VI6_DPR_RPF_ROUTE(n)

#define VI6_DPR_WPF_FPORCH(n)
#define VI6_DPR_WPF_FPORCH_FP_WPFN

#define VI6_DPR_SRU_ROUTE
#define VI6_DPR_UDS_ROUTE(n)
#define VI6_DPR_LUT_ROUTE
#define VI6_DPR_CLU_ROUTE
#define VI6_DPR_HST_ROUTE
#define VI6_DPR_HSI_ROUTE
#define VI6_DPR_BRU_ROUTE
#define VI6_DPR_ILV_BRS_ROUTE
#define VI6_DPR_ROUTE_BRSSEL
#define VI6_DPR_ROUTE_FXA_MASK
#define VI6_DPR_ROUTE_FXA_SHIFT
#define VI6_DPR_ROUTE_FP_MASK
#define VI6_DPR_ROUTE_FP_SHIFT
#define VI6_DPR_ROUTE_RT_MASK
#define VI6_DPR_ROUTE_RT_SHIFT

#define VI6_DPR_HGO_SMPPT
#define VI6_DPR_HGT_SMPPT
#define VI6_DPR_SMPPT_TGW_MASK
#define VI6_DPR_SMPPT_TGW_SHIFT
#define VI6_DPR_SMPPT_PT_MASK
#define VI6_DPR_SMPPT_PT_SHIFT

#define VI6_DPR_UIF_ROUTE(n)

#define VI6_DPR_NODE_RPF(n)
#define VI6_DPR_NODE_UIF(n)
#define VI6_DPR_NODE_SRU
#define VI6_DPR_NODE_UDS(n)
#define VI6_DPR_NODE_LUT
#define VI6_DPR_NODE_BRU_IN(n)
#define VI6_DPR_NODE_BRU_OUT
#define VI6_DPR_NODE_CLU
#define VI6_DPR_NODE_HST
#define VI6_DPR_NODE_HSI
#define VI6_DPR_NODE_BRS_IN(n)
#define VI6_DPR_NODE_LIF
#define VI6_DPR_NODE_WPF(n)
#define VI6_DPR_NODE_UNUSED

/* -----------------------------------------------------------------------------
 * SRU Control Registers
 */

#define VI6_SRU_CTRL0
#define VI6_SRU_CTRL0_PARAM0_MASK
#define VI6_SRU_CTRL0_PARAM0_SHIFT
#define VI6_SRU_CTRL0_PARAM1_MASK
#define VI6_SRU_CTRL0_PARAM1_SHIFT
#define VI6_SRU_CTRL0_MODE_UPSCALE
#define VI6_SRU_CTRL0_PARAM2
#define VI6_SRU_CTRL0_PARAM3
#define VI6_SRU_CTRL0_PARAM4
#define VI6_SRU_CTRL0_EN

#define VI6_SRU_CTRL1
#define VI6_SRU_CTRL1_PARAM5

#define VI6_SRU_CTRL2
#define VI6_SRU_CTRL2_PARAM6_SHIFT
#define VI6_SRU_CTRL2_PARAM7_SHIFT
#define VI6_SRU_CTRL2_PARAM8_SHIFT

/* -----------------------------------------------------------------------------
 * UDS Control Registers
 */

#define VI6_UDS_OFFSET

#define VI6_UDS_CTRL
#define VI6_UDS_CTRL_AMD
#define VI6_UDS_CTRL_FMD
#define VI6_UDS_CTRL_BLADV
#define VI6_UDS_CTRL_AON
#define VI6_UDS_CTRL_ATHON
#define VI6_UDS_CTRL_BC
#define VI6_UDS_CTRL_NE_A
#define VI6_UDS_CTRL_NE_RCR
#define VI6_UDS_CTRL_NE_GY
#define VI6_UDS_CTRL_NE_BCB
#define VI6_UDS_CTRL_AMDSLH
#define VI6_UDS_CTRL_TDIPC

#define VI6_UDS_SCALE
#define VI6_UDS_SCALE_HMANT_MASK
#define VI6_UDS_SCALE_HMANT_SHIFT
#define VI6_UDS_SCALE_HFRAC_MASK
#define VI6_UDS_SCALE_HFRAC_SHIFT
#define VI6_UDS_SCALE_VMANT_MASK
#define VI6_UDS_SCALE_VMANT_SHIFT
#define VI6_UDS_SCALE_VFRAC_MASK
#define VI6_UDS_SCALE_VFRAC_SHIFT

#define VI6_UDS_ALPTH
#define VI6_UDS_ALPTH_TH1_MASK
#define VI6_UDS_ALPTH_TH1_SHIFT
#define VI6_UDS_ALPTH_TH0_MASK
#define VI6_UDS_ALPTH_TH0_SHIFT

#define VI6_UDS_ALPVAL
#define VI6_UDS_ALPVAL_VAL2_MASK
#define VI6_UDS_ALPVAL_VAL2_SHIFT
#define VI6_UDS_ALPVAL_VAL1_MASK
#define VI6_UDS_ALPVAL_VAL1_SHIFT
#define VI6_UDS_ALPVAL_VAL0_MASK
#define VI6_UDS_ALPVAL_VAL0_SHIFT

#define VI6_UDS_PASS_BWIDTH
#define VI6_UDS_PASS_BWIDTH_H_MASK
#define VI6_UDS_PASS_BWIDTH_H_SHIFT
#define VI6_UDS_PASS_BWIDTH_V_MASK
#define VI6_UDS_PASS_BWIDTH_V_SHIFT

#define VI6_UDS_HPHASE
#define VI6_UDS_HPHASE_HSTP_MASK
#define VI6_UDS_HPHASE_HSTP_SHIFT
#define VI6_UDS_HPHASE_HEDP_MASK
#define VI6_UDS_HPHASE_HEDP_SHIFT

#define VI6_UDS_IPC
#define VI6_UDS_IPC_FIELD
#define VI6_UDS_IPC_VEDP_MASK
#define VI6_UDS_IPC_VEDP_SHIFT

#define VI6_UDS_HSZCLIP
#define VI6_UDS_HSZCLIP_HCEN
#define VI6_UDS_HSZCLIP_HCL_OFST_MASK
#define VI6_UDS_HSZCLIP_HCL_OFST_SHIFT
#define VI6_UDS_HSZCLIP_HCL_SIZE_MASK
#define VI6_UDS_HSZCLIP_HCL_SIZE_SHIFT

#define VI6_UDS_CLIP_SIZE
#define VI6_UDS_CLIP_SIZE_HSIZE_MASK
#define VI6_UDS_CLIP_SIZE_HSIZE_SHIFT
#define VI6_UDS_CLIP_SIZE_VSIZE_MASK
#define VI6_UDS_CLIP_SIZE_VSIZE_SHIFT

#define VI6_UDS_FILL_COLOR
#define VI6_UDS_FILL_COLOR_RFILC_MASK
#define VI6_UDS_FILL_COLOR_RFILC_SHIFT
#define VI6_UDS_FILL_COLOR_GFILC_MASK
#define VI6_UDS_FILL_COLOR_GFILC_SHIFT
#define VI6_UDS_FILL_COLOR_BFILC_MASK
#define VI6_UDS_FILL_COLOR_BFILC_SHIFT

/* -----------------------------------------------------------------------------
 * LUT Control Registers
 */

#define VI6_LUT_CTRL
#define VI6_LUT_CTRL_EN

/* -----------------------------------------------------------------------------
 * CLU Control Registers
 */

#define VI6_CLU_CTRL
#define VI6_CLU_CTRL_AAI
#define VI6_CLU_CTRL_MVS
#define VI6_CLU_CTRL_AX1I_2D
#define VI6_CLU_CTRL_AX2I_2D
#define VI6_CLU_CTRL_OS0_2D
#define VI6_CLU_CTRL_OS1_2D
#define VI6_CLU_CTRL_OS2_2D
#define VI6_CLU_CTRL_M2D
#define VI6_CLU_CTRL_EN

/* -----------------------------------------------------------------------------
 * HST Control Registers
 */

#define VI6_HST_CTRL
#define VI6_HST_CTRL_EN

/* -----------------------------------------------------------------------------
 * HSI Control Registers
 */

#define VI6_HSI_CTRL
#define VI6_HSI_CTRL_EN

/* -----------------------------------------------------------------------------
 * BRS and BRU Control Registers
 */

#define VI6_ROP_NOP
#define VI6_ROP_AND
#define VI6_ROP_AND_REV
#define VI6_ROP_COPY
#define VI6_ROP_AND_INV
#define VI6_ROP_CLEAR
#define VI6_ROP_XOR
#define VI6_ROP_OR
#define VI6_ROP_NOR
#define VI6_ROP_EQUIV
#define VI6_ROP_INVERT
#define VI6_ROP_OR_REV
#define VI6_ROP_COPY_INV
#define VI6_ROP_OR_INV
#define VI6_ROP_NAND
#define VI6_ROP_SET

#define VI6_BRU_BASE
#define VI6_BRS_BASE

#define VI6_BRU_INCTRL
#define VI6_BRU_INCTRL_NRM
#define VI6_BRU_INCTRL_DnON
#define VI6_BRU_INCTRL_DITHn_OFF
#define VI6_BRU_INCTRL_DITHn_18BPP
#define VI6_BRU_INCTRL_DITHn_16BPP
#define VI6_BRU_INCTRL_DITHn_15BPP
#define VI6_BRU_INCTRL_DITHn_12BPP
#define VI6_BRU_INCTRL_DITHn_8BPP
#define VI6_BRU_INCTRL_DITHn_MASK
#define VI6_BRU_INCTRL_DITHn_SHIFT

#define VI6_BRU_VIRRPF_SIZE
#define VI6_BRU_VIRRPF_SIZE_HSIZE_MASK
#define VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT
#define VI6_BRU_VIRRPF_SIZE_VSIZE_MASK
#define VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT

#define VI6_BRU_VIRRPF_LOC
#define VI6_BRU_VIRRPF_LOC_HCOORD_MASK
#define VI6_BRU_VIRRPF_LOC_HCOORD_SHIFT
#define VI6_BRU_VIRRPF_LOC_VCOORD_MASK
#define VI6_BRU_VIRRPF_LOC_VCOORD_SHIFT

#define VI6_BRU_VIRRPF_COL
#define VI6_BRU_VIRRPF_COL_A_MASK
#define VI6_BRU_VIRRPF_COL_A_SHIFT
#define VI6_BRU_VIRRPF_COL_RCR_MASK
#define VI6_BRU_VIRRPF_COL_RCR_SHIFT
#define VI6_BRU_VIRRPF_COL_GY_MASK
#define VI6_BRU_VIRRPF_COL_GY_SHIFT
#define VI6_BRU_VIRRPF_COL_BCB_MASK
#define VI6_BRU_VIRRPF_COL_BCB_SHIFT

#define VI6_BRU_CTRL(n)
#define VI6_BRU_CTRL_RBC
#define VI6_BRU_CTRL_DSTSEL_BRUIN(n)
#define VI6_BRU_CTRL_DSTSEL_VRPF
#define VI6_BRU_CTRL_DSTSEL_MASK
#define VI6_BRU_CTRL_SRCSEL_BRUIN(n)
#define VI6_BRU_CTRL_SRCSEL_VRPF
#define VI6_BRU_CTRL_SRCSEL_MASK
#define VI6_BRU_CTRL_CROP(rop)
#define VI6_BRU_CTRL_CROP_MASK
#define VI6_BRU_CTRL_AROP(rop)
#define VI6_BRU_CTRL_AROP_MASK

#define VI6_BRU_BLD(n)
#define VI6_BRU_BLD_CBES
#define VI6_BRU_BLD_CCMDX_DST_A
#define VI6_BRU_BLD_CCMDX_255_DST_A
#define VI6_BRU_BLD_CCMDX_SRC_A
#define VI6_BRU_BLD_CCMDX_255_SRC_A
#define VI6_BRU_BLD_CCMDX_COEFX
#define VI6_BRU_BLD_CCMDX_MASK
#define VI6_BRU_BLD_CCMDY_DST_A
#define VI6_BRU_BLD_CCMDY_255_DST_A
#define VI6_BRU_BLD_CCMDY_SRC_A
#define VI6_BRU_BLD_CCMDY_255_SRC_A
#define VI6_BRU_BLD_CCMDY_COEFY
#define VI6_BRU_BLD_CCMDY_MASK
#define VI6_BRU_BLD_CCMDY_SHIFT
#define VI6_BRU_BLD_ABES
#define VI6_BRU_BLD_ACMDX_DST_A
#define VI6_BRU_BLD_ACMDX_255_DST_A
#define VI6_BRU_BLD_ACMDX_SRC_A
#define VI6_BRU_BLD_ACMDX_255_SRC_A
#define VI6_BRU_BLD_ACMDX_COEFX
#define VI6_BRU_BLD_ACMDX_MASK
#define VI6_BRU_BLD_ACMDY_DST_A
#define VI6_BRU_BLD_ACMDY_255_DST_A
#define VI6_BRU_BLD_ACMDY_SRC_A
#define VI6_BRU_BLD_ACMDY_255_SRC_A
#define VI6_BRU_BLD_ACMDY_COEFY
#define VI6_BRU_BLD_ACMDY_MASK
#define VI6_BRU_BLD_COEFX_MASK
#define VI6_BRU_BLD_COEFX_SHIFT
#define VI6_BRU_BLD_COEFY_MASK
#define VI6_BRU_BLD_COEFY_SHIFT

#define VI6_BRU_ROP
#define VI6_BRU_ROP_DSTSEL_BRUIN(n)
#define VI6_BRU_ROP_DSTSEL_VRPF
#define VI6_BRU_ROP_DSTSEL_MASK
#define VI6_BRU_ROP_CROP(rop)
#define VI6_BRU_ROP_CROP_MASK
#define VI6_BRU_ROP_AROP(rop)
#define VI6_BRU_ROP_AROP_MASK

/* -----------------------------------------------------------------------------
 * HGO Control Registers
 */

#define VI6_HGO_OFFSET
#define VI6_HGO_OFFSET_HOFFSET_SHIFT
#define VI6_HGO_OFFSET_VOFFSET_SHIFT
#define VI6_HGO_SIZE
#define VI6_HGO_SIZE_HSIZE_SHIFT
#define VI6_HGO_SIZE_VSIZE_SHIFT
#define VI6_HGO_MODE
#define VI6_HGO_MODE_STEP
#define VI6_HGO_MODE_MAXRGB
#define VI6_HGO_MODE_OFSB_R
#define VI6_HGO_MODE_OFSB_G
#define VI6_HGO_MODE_OFSB_B
#define VI6_HGO_MODE_HRATIO_SHIFT
#define VI6_HGO_MODE_VRATIO_SHIFT
#define VI6_HGO_LB_TH
#define VI6_HGO_LBn_H(n)
#define VI6_HGO_LBn_V(n)
#define VI6_HGO_R_HISTO(n)
#define VI6_HGO_R_MAXMIN
#define VI6_HGO_R_SUM
#define VI6_HGO_R_LB_DET
#define VI6_HGO_G_HISTO(n)
#define VI6_HGO_G_MAXMIN
#define VI6_HGO_G_SUM
#define VI6_HGO_G_LB_DET
#define VI6_HGO_B_HISTO(n)
#define VI6_HGO_B_MAXMIN
#define VI6_HGO_B_SUM
#define VI6_HGO_B_LB_DET
#define VI6_HGO_EXT_HIST_ADDR
#define VI6_HGO_EXT_HIST_DATA
#define VI6_HGO_REGRST
#define VI6_HGO_REGRST_RCLEA

/* -----------------------------------------------------------------------------
 * HGT Control Registers
 */

#define VI6_HGT_OFFSET
#define VI6_HGT_OFFSET_HOFFSET_SHIFT
#define VI6_HGT_OFFSET_VOFFSET_SHIFT
#define VI6_HGT_SIZE
#define VI6_HGT_SIZE_HSIZE_SHIFT
#define VI6_HGT_SIZE_VSIZE_SHIFT
#define VI6_HGT_MODE
#define VI6_HGT_MODE_HRATIO_SHIFT
#define VI6_HGT_MODE_VRATIO_SHIFT
#define VI6_HGT_HUE_AREA(n)
#define VI6_HGT_HUE_AREA_LOWER_SHIFT
#define VI6_HGT_HUE_AREA_UPPER_SHIFT
#define VI6_HGT_LB_TH
#define VI6_HGT_LBn_H(n)
#define VI6_HGT_LBn_V(n)
#define VI6_HGT_HISTO(m, n)
#define VI6_HGT_MAXMIN
#define VI6_HGT_SUM
#define VI6_HGT_LB_DET
#define VI6_HGT_REGRST
#define VI6_HGT_REGRST_RCLEA

/* -----------------------------------------------------------------------------
 * LIF Control Registers
 */

#define VI6_LIF_OFFSET

#define VI6_LIF_CTRL
#define VI6_LIF_CTRL_OBTH_MASK
#define VI6_LIF_CTRL_OBTH_SHIFT
#define VI6_LIF_CTRL_CFMT
#define VI6_LIF_CTRL_REQSEL
#define VI6_LIF_CTRL_LIF_EN

#define VI6_LIF_CSBTH
#define VI6_LIF_CSBTH_HBTH_MASK
#define VI6_LIF_CSBTH_HBTH_SHIFT
#define VI6_LIF_CSBTH_LBTH_MASK
#define VI6_LIF_CSBTH_LBTH_SHIFT

#define VI6_LIF_LBA
#define VI6_LIF_LBA_LBA0
#define VI6_LIF_LBA_LBA1_MASK
#define VI6_LIF_LBA_LBA1_SHIFT

/* -----------------------------------------------------------------------------
 * Security Control Registers
 */

#define VI6_SECURITY_CTRL0
#define VI6_SECURITY_CTRL1

/* -----------------------------------------------------------------------------
 * IP Version Registers
 */

#define VI6_IP_VERSION
#define VI6_IP_VERSION_MASK
#define VI6_IP_VERSION_MODEL_MASK
#define VI6_IP_VERSION_MODEL_VSPS_H2
#define VI6_IP_VERSION_MODEL_VSPR_H2
#define VI6_IP_VERSION_MODEL_VSPD_GEN2
#define VI6_IP_VERSION_MODEL_VSPS_M2
#define VI6_IP_VERSION_MODEL_VSPS_V2H
#define VI6_IP_VERSION_MODEL_VSPD_V2H
#define VI6_IP_VERSION_MODEL_VSPI_GEN3
#define VI6_IP_VERSION_MODEL_VSPBD_GEN3
#define VI6_IP_VERSION_MODEL_VSPBC_GEN3
#define VI6_IP_VERSION_MODEL_VSPD_GEN3
#define VI6_IP_VERSION_MODEL_VSPD_V3
#define VI6_IP_VERSION_MODEL_VSPDL_GEN3
#define VI6_IP_VERSION_MODEL_VSPBS_GEN3
#define VI6_IP_VERSION_MODEL_VSPD_GEN4
/* RZ/G2L SoCs have no version register, So use 0x80 as the model version */
#define VI6_IP_VERSION_MODEL_VSPD_RZG2L

#define VI6_IP_VERSION_SOC_MASK
#define VI6_IP_VERSION_SOC_H2
#define VI6_IP_VERSION_SOC_V2H
#define VI6_IP_VERSION_SOC_V3M
#define VI6_IP_VERSION_SOC_M2
#define VI6_IP_VERSION_SOC_M3W
#define VI6_IP_VERSION_SOC_V3H
#define VI6_IP_VERSION_SOC_H3
#define VI6_IP_VERSION_SOC_D3
#define VI6_IP_VERSION_SOC_M3N
#define VI6_IP_VERSION_SOC_E3
#define VI6_IP_VERSION_SOC_V3U
#define VI6_IP_VERSION_SOC_V4H
/* RZ/G2L SoCs have no version register, So use 0x80 for SoC Identification */
#define VI6_IP_VERSION_SOC_RZG2L

#define VI6_IP_VERSION_VSP_SW

/* -----------------------------------------------------------------------------
 * RPF CLUT Registers
 */

#define VI6_CLUT_TABLE

/* -----------------------------------------------------------------------------
 * 1D LUT Registers
 */

#define VI6_LUT_TABLE

/* -----------------------------------------------------------------------------
 * 3D LUT Registers
 */

#define VI6_CLU_ADDR
#define VI6_CLU_DATA

/* -----------------------------------------------------------------------------
 * Formats
 */

#define VI6_FMT_RGB_332
#define VI6_FMT_XRGB_4444
#define VI6_FMT_RGBX_4444
#define VI6_FMT_XRGB_1555
#define VI6_FMT_RGBX_5551
#define VI6_FMT_RGB_565
#define VI6_FMT_AXRGB_86666
#define VI6_FMT_RGBXA_66668
#define VI6_FMT_XRGBA_66668
#define VI6_FMT_ARGBX_86666
#define VI6_FMT_AXRXGXB_8262626
#define VI6_FMT_XRXGXBA_2626268
#define VI6_FMT_ARXGXBX_8626262
#define VI6_FMT_RXGXBXA_6262628
#define VI6_FMT_XRGB_6666
#define VI6_FMT_RGBX_6666
#define VI6_FMT_XRXGXB_262626
#define VI6_FMT_RXGXBX_626262
#define VI6_FMT_ARGB_8888
#define VI6_FMT_RGBA_8888
#define VI6_FMT_RGB_888
#define VI6_FMT_XRGXGB_763763
#define VI6_FMT_XXRGB_86666
#define VI6_FMT_BGR_888
#define VI6_FMT_ARGB_4444
#define VI6_FMT_RGBA_4444
#define VI6_FMT_ARGB_1555
#define VI6_FMT_RGBA_5551
#define VI6_FMT_ABGR_4444
#define VI6_FMT_BGRA_4444
#define VI6_FMT_ABGR_1555
#define VI6_FMT_BGRA_5551
#define VI6_FMT_XBXGXR_262626
#define VI6_FMT_ABGR_8888
#define VI6_FMT_XXRGB_88565
#define VI6_FMT_RGB10_RGB10A2_A2RGB10

#define VI6_FMT_Y_UV_444
#define VI6_FMT_Y_UV_422
#define VI6_FMT_Y_UV_420
#define VI6_FMT_YUV_444
#define VI6_FMT_YUYV_422
#define VI6_FMT_YYUV_422
#define VI6_FMT_YUV_420
#define VI6_FMT_Y_U_V_444
#define VI6_FMT_Y_U_V_422
#define VI6_FMT_Y_U_V_420

#endif /* __VSP1_REGS_H__ */