linux/drivers/video/fbdev/mb862xx/mb862xx_reg.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Fujitsu MB862xx Graphics Controller Registers/Bits
 */

#ifndef _MB862XX_REG_H
#define _MB862XX_REG_H

#define MB862XX_MMIO_BASE
#define MB862XX_MMIO_HIGH_BASE
#define MB862XX_I2C_BASE
#define MB862XX_DISP_BASE
#define MB862XX_CAP_BASE
#define MB862XX_DRAW_BASE
#define MB862XX_GEO_BASE
#define MB862XX_PIO_BASE
#define MB862XX_MMIO_SIZE

/* Host interface/pio registers */
#define GC_IST
#define GC_IMASK
#define GC_SRST
#define GC_CCF
#define GC_RSW
#define GC_CID
#define GC_REVISION

#define GC_CCF_CGE_100
#define GC_CCF_CGE_133
#define GC_CCF_CGE_166
#define GC_CCF_COT_100
#define GC_CCF_COT_133
#define GC_CID_CNAME_MSK
#define GC_CID_VERSION_MSK

/* define enabled interrupts hereby */
#define GC_INT_EN

/* Memory interface mode register */
#define GC_MMR

/* Display Controller registers */
#define GC_DCM0
#define GC_HTP
#define GC_HDB_HDP
#define GC_VSW_HSW_HSP
#define GC_VTR
#define GC_VDP_VSP
#define GC_WY_WX
#define GC_WH_WW
#define GC_L0M
#define GC_L0OA0
#define GC_L0DA0
#define GC_L0DY_L0DX
#define GC_L1M
#define GC_L1DA
#define GC_DCM1
#define GC_L0EM
#define GC_L0WY_L0WX
#define GC_L0WH_L0WW
#define GC_L1EM
#define GC_L1WY_L1WX
#define GC_L1WH_L1WW
#define GC_DLS
#define GC_DCM2
#define GC_DCM3
#define GC_CPM_CUTC
#define GC_CUOA0
#define GC_CUY0_CUX0
#define GC_CUOA1
#define GC_CUY1_CUX1
#define GC_L0PAL0

#define GC_CPM_CEN0
#define GC_CPM_CEN1
#define GC_DCM1_DEN
#define GC_DCM1_L1E
#define GC_L1M_16
#define GC_L1M_YC
#define GC_L1M_CS

#define GC_DCM01_ESY
#define GC_DCM01_SC
#define GC_DCM01_RESV
#define GC_DCM01_CKS
#define GC_DCM01_L0E
#define GC_DCM01_DEN
#define GC_L0M_L0C_8
#define GC_L0M_L0C_16
#define GC_L0EM_L0EC_24
#define GC_L0M_L0W_UNIT
#define GC_L1EM_DM

#define GC_DISP_REFCLK_400

/* I2C */
#define GC_I2C_BSR
#define GC_I2C_BCR
#define GC_I2C_CCR
#define GC_I2C_ADR
#define GC_I2C_DAR

#define I2C_DISABLE
#define I2C_STOP
#define I2C_START
#define I2C_REPEATED_START
#define I2C_CLOCK_AND_ENABLE
#define I2C_READY
#define I2C_INT
#define I2C_INTE
#define I2C_ACK
#define I2C_BER
#define I2C_BEIE
#define I2C_TRX
#define I2C_LRB

/* Capture registers and bits */
#define GC_CAP_VCM
#define GC_CAP_CSC
#define GC_CAP_VCS
#define GC_CAP_CBM
#define GC_CAP_CBOA
#define GC_CAP_CBLA
#define GC_CAP_IMG_START
#define GC_CAP_IMG_END
#define GC_CAP_CMSS
#define GC_CAP_CMDS

#define GC_VCM_VIE
#define GC_VCM_CM
#define GC_VCM_VS_PAL
#define GC_CBM_OO
#define GC_CBM_HRV
#define GC_CBM_CBST

/* Carmine specific */
#define MB86297_DRAW_BASE
#define MB86297_DISP0_BASE
#define MB86297_DISP1_BASE
#define MB86297_WRBACK_BASE
#define MB86297_CAP0_BASE
#define MB86297_CAP1_BASE
#define MB86297_DRAMCTRL_BASE
#define MB86297_CTRL_BASE
#define MB86297_I2C_BASE

#define GC_CTRL_STATUS
#define GC_CTRL_INT_MASK
#define GC_CTRL_CLK_ENABLE
#define GC_CTRL_SOFT_RST

#define GC_CTRL_CLK_EN_DRAM
#define GC_CTRL_CLK_EN_2D3D
#define GC_CTRL_CLK_EN_DISP0
#define GC_CTRL_CLK_EN_DISP1

#define GC_2D3D_REV
#define GC_RE_REVISION

/* define enabled interrupts hereby */
#define GC_CARMINE_INT_EN

/* DRAM controller */
#define GC_DCTL_MODE_ADD
#define GC_DCTL_SETTIME1_EMODE
#define GC_DCTL_REFRESH_SETTIME2
#define GC_DCTL_RSV0_STATES
#define GC_DCTL_RSV2_RSV1
#define GC_DCTL_DDRIF2_DDRIF1
#define GC_DCTL_IOCONT1_IOCONT0

#define GC_DCTL_STATES_MSK
#define GC_DCTL_INIT_WAIT_CNT
#define GC_DCTL_INIT_WAIT_INTERVAL

/* DRAM ctrl values for Carmine PCI Eval. board */
#define GC_EVB_DCTL_MODE_ADD
#define GC_EVB_DCTL_MODE_ADD_AFT_RST
#define GC_EVB_DCTL_SETTIME1_EMODE
#define GC_EVB_DCTL_REFRESH_SETTIME2
#define GC_EVB_DCTL_RSV0_STATES
#define GC_EVB_DCTL_RSV0_STATES_AFT_RST
#define GC_EVB_DCTL_RSV2_RSV1
#define GC_EVB_DCTL_DDRIF2_DDRIF1
#define GC_EVB_DCTL_IOCONT1_IOCONT0

#define GC_DISP_REFCLK_533

#endif