linux/drivers/media/pci/bt8xx/bt848.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
    bt848.h - Bt848 register offsets

    Copyright (C) 1996,97,98 Ralph Metzler ([email protected])

*/

#ifndef _BT848_H_
#define _BT848_H_

#ifndef PCI_VENDOR_ID_BROOKTREE
#define PCI_VENDOR_ID_BROOKTREE
#endif
#ifndef PCI_DEVICE_ID_BT848
#define PCI_DEVICE_ID_BT848
#endif
#ifndef PCI_DEVICE_ID_BT849
#define PCI_DEVICE_ID_BT849
#endif
#ifndef PCI_DEVICE_ID_FUSION879
#define PCI_DEVICE_ID_FUSION879
#endif

#ifndef PCI_DEVICE_ID_BT878
#define PCI_DEVICE_ID_BT878
#endif
#ifndef PCI_DEVICE_ID_BT879
#define PCI_DEVICE_ID_BT879
#endif

/* Brooktree 848 registers */

#define BT848_DSTATUS
#define BT848_DSTATUS_PRES
#define BT848_DSTATUS_HLOC
#define BT848_DSTATUS_FIELD
#define BT848_DSTATUS_NUML
#define BT848_DSTATUS_CSEL
#define BT848_DSTATUS_PLOCK
#define BT848_DSTATUS_LOF
#define BT848_DSTATUS_COF

#define BT848_IFORM
#define BT848_IFORM_HACTIVE
#define BT848_IFORM_MUXSEL
#define BT848_IFORM_MUX0
#define BT848_IFORM_MUX1
#define BT848_IFORM_MUX2
#define BT848_IFORM_XTSEL
#define BT848_IFORM_XT0
#define BT848_IFORM_XT1
#define BT848_IFORM_XTAUTO
#define BT848_IFORM_XTBOTH
#define BT848_IFORM_NTSC
#define BT848_IFORM_NTSC_J
#define BT848_IFORM_PAL_BDGHI
#define BT848_IFORM_PAL_M
#define BT848_IFORM_PAL_N
#define BT848_IFORM_SECAM
#define BT848_IFORM_PAL_NC
#define BT848_IFORM_AUTO
#define BT848_IFORM_NORM

#define BT848_TDEC
#define BT848_TDEC_DEC_FIELD
#define BT848_TDEC_FLDALIGN
#define BT848_TDEC_DEC_RAT

#define BT848_E_CROP
#define BT848_O_CROP

#define BT848_E_VDELAY_LO
#define BT848_O_VDELAY_LO

#define BT848_E_VACTIVE_LO
#define BT848_O_VACTIVE_LO

#define BT848_E_HDELAY_LO
#define BT848_O_HDELAY_LO

#define BT848_E_HACTIVE_LO
#define BT848_O_HACTIVE_LO

#define BT848_E_HSCALE_HI
#define BT848_O_HSCALE_HI

#define BT848_E_HSCALE_LO
#define BT848_O_HSCALE_LO

#define BT848_BRIGHT

#define BT848_E_CONTROL
#define BT848_O_CONTROL
#define BT848_CONTROL_LNOTCH
#define BT848_CONTROL_COMP
#define BT848_CONTROL_LDEC
#define BT848_CONTROL_CBSENSE
#define BT848_CONTROL_CON_MSB
#define BT848_CONTROL_SAT_U_MSB
#define BT848_CONTROL_SAT_V_MSB

#define BT848_CONTRAST_LO
#define BT848_SAT_U_LO
#define BT848_SAT_V_LO
#define BT848_HUE

#define BT848_E_SCLOOP
#define BT848_O_SCLOOP
#define BT848_SCLOOP_CAGC
#define BT848_SCLOOP_CKILL
#define BT848_SCLOOP_HFILT_AUTO
#define BT848_SCLOOP_HFILT_CIF
#define BT848_SCLOOP_HFILT_QCIF
#define BT848_SCLOOP_HFILT_ICON

#define BT848_SCLOOP_PEAK
#define BT848_SCLOOP_HFILT_MINP
#define BT848_SCLOOP_HFILT_MEDP
#define BT848_SCLOOP_HFILT_MAXP


#define BT848_OFORM
#define BT848_OFORM_RANGE
#define BT848_OFORM_CORE0
#define BT848_OFORM_CORE8
#define BT848_OFORM_CORE16
#define BT848_OFORM_CORE32

#define BT848_E_VSCALE_HI
#define BT848_O_VSCALE_HI
#define BT848_VSCALE_YCOMB
#define BT848_VSCALE_COMB
#define BT848_VSCALE_INT
#define BT848_VSCALE_HI

#define BT848_E_VSCALE_LO
#define BT848_O_VSCALE_LO
#define BT848_TEST
#define BT848_ADELAY
#define BT848_BDELAY

#define BT848_ADC
#define BT848_ADC_RESERVED
#define BT848_ADC_SYNC_T
#define BT848_ADC_AGC_EN
#define BT848_ADC_CLK_SLEEP
#define BT848_ADC_Y_SLEEP
#define BT848_ADC_C_SLEEP
#define BT848_ADC_CRUSH

#define BT848_WC_UP
#define BT848_WC_DOWN

#define BT848_E_VTC
#define BT848_O_VTC
#define BT848_VTC_HSFMT
#define BT848_VTC_VFILT_2TAP
#define BT848_VTC_VFILT_3TAP
#define BT848_VTC_VFILT_4TAP
#define BT848_VTC_VFILT_5TAP

#define BT848_SRESET

#define BT848_COLOR_FMT
#define BT848_COLOR_FMT_O_RGB32
#define BT848_COLOR_FMT_O_RGB24
#define BT848_COLOR_FMT_O_RGB16
#define BT848_COLOR_FMT_O_RGB15
#define BT848_COLOR_FMT_O_YUY2
#define BT848_COLOR_FMT_O_BtYUV
#define BT848_COLOR_FMT_O_Y8
#define BT848_COLOR_FMT_O_RGB8
#define BT848_COLOR_FMT_O_YCrCb422
#define BT848_COLOR_FMT_O_YCrCb411
#define BT848_COLOR_FMT_O_RAW
#define BT848_COLOR_FMT_E_RGB32
#define BT848_COLOR_FMT_E_RGB24
#define BT848_COLOR_FMT_E_RGB16
#define BT848_COLOR_FMT_E_RGB15
#define BT848_COLOR_FMT_E_YUY2
#define BT848_COLOR_FMT_E_BtYUV
#define BT848_COLOR_FMT_E_Y8
#define BT848_COLOR_FMT_E_RGB8
#define BT848_COLOR_FMT_E_YCrCb422
#define BT848_COLOR_FMT_E_YCrCb411
#define BT848_COLOR_FMT_E_RAW

#define BT848_COLOR_FMT_RGB32
#define BT848_COLOR_FMT_RGB24
#define BT848_COLOR_FMT_RGB16
#define BT848_COLOR_FMT_RGB15
#define BT848_COLOR_FMT_YUY2
#define BT848_COLOR_FMT_BtYUV
#define BT848_COLOR_FMT_Y8
#define BT848_COLOR_FMT_RGB8
#define BT848_COLOR_FMT_YCrCb422
#define BT848_COLOR_FMT_YCrCb411
#define BT848_COLOR_FMT_RAW

#define BT848_VTOTAL_LO
#define BT848_VTOTAL_HI

#define BT848_COLOR_CTL
#define BT848_COLOR_CTL_EXT_FRMRATE
#define BT848_COLOR_CTL_COLOR_BARS
#define BT848_COLOR_CTL_RGB_DED
#define BT848_COLOR_CTL_GAMMA
#define BT848_COLOR_CTL_WSWAP_ODD
#define BT848_COLOR_CTL_WSWAP_EVEN
#define BT848_COLOR_CTL_BSWAP_ODD
#define BT848_COLOR_CTL_BSWAP_EVEN

#define BT848_CAP_CTL
#define BT848_CAP_CTL_DITH_FRAME
#define BT848_CAP_CTL_CAPTURE_VBI_ODD
#define BT848_CAP_CTL_CAPTURE_VBI_EVEN
#define BT848_CAP_CTL_CAPTURE_ODD
#define BT848_CAP_CTL_CAPTURE_EVEN

#define BT848_VBI_PACK_SIZE

#define BT848_VBI_PACK_DEL
#define BT848_VBI_PACK_DEL_VBI_HDELAY
#define BT848_VBI_PACK_DEL_EXT_FRAME
#define BT848_VBI_PACK_DEL_VBI_PKT_HI


#define BT848_INT_STAT
#define BT848_INT_MASK

#define BT848_INT_ETBF

#define BT848_RISC_VIDEO
#define BT848_RISC_TOP
#define BT848_RISC_VBI

#define BT848_INT_RISCS
#define BT848_INT_RISCS_VIDEO
#define BT848_INT_RISCS_TOP
#define BT848_INT_RISCS_VBI

#define BT848_INT_RISC_EN
#define BT848_INT_RACK
#define BT848_INT_FIELD
#define BT848_INT_SCERR
#define BT848_INT_OCERR
#define BT848_INT_PABORT
#define BT848_INT_RIPERR
#define BT848_INT_PPERR
#define BT848_INT_FDSR
#define BT848_INT_FTRGT
#define BT848_INT_FBUS
#define BT848_INT_RISCI
#define BT848_INT_GPINT
#define BT848_INT_I2CDONE
#define BT848_INT_VPRES
#define BT848_INT_HLOCK
#define BT848_INT_OFLOW
#define BT848_INT_HSYNC
#define BT848_INT_VSYNC
#define BT848_INT_FMTCHG


#define BT848_GPIO_DMA_CTL
#define BT848_GPIO_DMA_CTL_GPINTC
#define BT848_GPIO_DMA_CTL_GPINTI
#define BT848_GPIO_DMA_CTL_GPWEC
#define BT848_GPIO_DMA_CTL_GPIOMODE
#define BT848_GPIO_DMA_CTL_GPCLKMODE
#define BT848_GPIO_DMA_CTL_PLTP23_4
#define BT848_GPIO_DMA_CTL_PLTP23_8
#define BT848_GPIO_DMA_CTL_PLTP23_16
#define BT848_GPIO_DMA_CTL_PLTP23_32
#define BT848_GPIO_DMA_CTL_PLTP1_4
#define BT848_GPIO_DMA_CTL_PLTP1_8
#define BT848_GPIO_DMA_CTL_PLTP1_16
#define BT848_GPIO_DMA_CTL_PLTP1_32
#define BT848_GPIO_DMA_CTL_PKTP_4
#define BT848_GPIO_DMA_CTL_PKTP_8
#define BT848_GPIO_DMA_CTL_PKTP_16
#define BT848_GPIO_DMA_CTL_PKTP_32
#define BT848_GPIO_DMA_CTL_RISC_ENABLE
#define BT848_GPIO_DMA_CTL_FIFO_ENABLE

#define BT848_I2C
#define BT878_I2C_MODE
#define BT878_I2C_RATE
#define BT878_I2C_NOSTOP
#define BT878_I2C_NOSTART
#define BT848_I2C_DIV
#define BT848_I2C_SYNC
#define BT848_I2C_W3B
#define BT848_I2C_SCL
#define BT848_I2C_SDA

#define BT848_RISC_STRT_ADD
#define BT848_GPIO_OUT_EN
#define BT848_GPIO_REG_INP
#define BT848_RISC_COUNT
#define BT848_GPIO_DATA


/* Bt848 RISC commands */

/* only for the SYNC RISC command */
#define BT848_FIFO_STATUS_FM1
#define BT848_FIFO_STATUS_FM3
#define BT848_FIFO_STATUS_SOL
#define BT848_FIFO_STATUS_EOL4
#define BT848_FIFO_STATUS_EOL3
#define BT848_FIFO_STATUS_EOL2
#define BT848_FIFO_STATUS_EOL1
#define BT848_FIFO_STATUS_VRE
#define BT848_FIFO_STATUS_VRO
#define BT848_FIFO_STATUS_PXV

#define BT848_RISC_RESYNC

/* WRITE and SKIP */
/* disable which bytes of each DWORD */
#define BT848_RISC_BYTE0
#define BT848_RISC_BYTE1
#define BT848_RISC_BYTE2
#define BT848_RISC_BYTE3
#define BT848_RISC_BYTE_ALL
#define BT848_RISC_BYTE_NONE
/* cause RISCI */
#define BT848_RISC_IRQ
/* RISC command is last one in this line */
#define BT848_RISC_EOL
/* RISC command is first one in this line */
#define BT848_RISC_SOL

#define BT848_RISC_WRITE
#define BT848_RISC_SKIP
#define BT848_RISC_WRITEC
#define BT848_RISC_JUMP
#define BT848_RISC_SYNC

#define BT848_RISC_WRITE123
#define BT848_RISC_SKIP123
#define BT848_RISC_WRITE1S23


/* Bt848A and higher only !! */
#define BT848_TGLB
#define BT848_TGCTRL
#define BT848_FCAP
#define BT848_PLL_F_LO
#define BT848_PLL_F_HI

#define BT848_PLL_XCI
#define BT848_PLL_X
#define BT848_PLL_C

#define BT848_DVSIF

/* Bt878 register */

#define BT878_DEVCTRL
#define BT878_EN_TBFX
#define BT878_EN_VSFX

#endif