linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Realtek RTL28xxU DVB USB driver
 *
 * Copyright (C) 2009 Antti Palosaari <[email protected]>
 * Copyright (C) 2011 Antti Palosaari <[email protected]>
 */

#ifndef RTL28XXU_H
#define RTL28XXU_H

#include <linux/platform_device.h>

#include "dvb_usb.h"

#include "rtl2830.h"
#include "rtl2832.h"
#include "rtl2832_sdr.h"
#include "mn88472.h"
#include "mn88473.h"
#include "cxd2841er.h"

#include "qt1010.h"
#include "mt2060.h"
#include "mxl5005s.h"
#include "fc0012.h"
#include "fc0013.h"
#include "e4000.h"
#include "fc2580.h"
#include "tua9001.h"
#include "r820t.h"
#include "si2168.h"
#include "si2157.h"

/*
 * USB commands
 * (usb_control_msg() index parameter)
 */

#define DEMOD
#define USB
#define SYS
#define I2C
#define I2C_DA

#define CMD_WR_FLAG
#define CMD_DEMOD_RD
#define CMD_DEMOD_WR
#define CMD_USB_RD
#define CMD_USB_WR
#define CMD_SYS_RD
#define CMD_IR_RD
#define CMD_IR_WR
#define CMD_SYS_WR
#define CMD_I2C_RD
#define CMD_I2C_WR
#define CMD_I2C_DA_RD
#define CMD_I2C_DA_WR


struct rtl28xxu_dev {};

enum rtl28xxu_chip_id {};

/* XXX: Hack. This must be keep sync with rtl2832 demod driver. */
enum rtl28xxu_tuner {};

struct rtl28xxu_req {};

struct rtl28xxu_reg_val {};

struct rtl28xxu_reg_val_mask {};

/*
 * memory map
 *
 * 0x0000 DEMOD : demodulator
 * 0x2000 USB   : SIE, USB endpoint, debug, DMA
 * 0x3000 SYS   : system
 * 0xfc00 RC    : remote controller (not RTL2831U)
 */

/*
 * USB registers
 */
/* SIE Control Registers */
#define USB_SYSCTL
#define USB_SYSCTL_0
#define USB_SYSCTL_1
#define USB_SYSCTL_2
#define USB_SYSCTL_3
#define USB_IRQSTAT
#define USB_IRQEN
#define USB_CTRL
#define USB_STAT
#define USB_DEVADDR
#define USB_TEST
#define USB_FRAME_NUMBER
#define USB_FIFO_ADDR
#define USB_FIFO_CMD
#define USB_FIFO_DATA
/* Endpoint Registers */
#define EP0_SETUPA
#define EP0_SETUPB
#define USB_EP0_CFG
#define USB_EP0_CTL
#define USB_EP0_STAT
#define USB_EP0_IRQSTAT
#define USB_EP0_IRQEN
#define USB_EP0_MAXPKT
#define USB_EP0_BC
#define USB_EPA_CFG
#define USB_EPA_CFG_0
#define USB_EPA_CFG_1
#define USB_EPA_CFG_2
#define USB_EPA_CFG_3
#define USB_EPA_CTL
#define USB_EPA_CTL_0
#define USB_EPA_CTL_1
#define USB_EPA_CTL_2
#define USB_EPA_CTL_3
#define USB_EPA_STAT
#define USB_EPA_IRQSTAT
#define USB_EPA_IRQEN
#define USB_EPA_MAXPKT
#define USB_EPA_MAXPKT_0
#define USB_EPA_MAXPKT_1
#define USB_EPA_MAXPKT_2
#define USB_EPA_MAXPKT_3
#define USB_EPA_FIFO_CFG
#define USB_EPA_FIFO_CFG_0
#define USB_EPA_FIFO_CFG_1
#define USB_EPA_FIFO_CFG_2
#define USB_EPA_FIFO_CFG_3
/* Debug Registers */
#define USB_PHYTSTDIS
#define USB_TOUT_VAL
#define USB_VDRCTRL
#define USB_VSTAIN
#define USB_VLOADM
#define USB_VSTAOUT
#define USB_UTMI_TST
#define USB_UTMI_STATUS
#define USB_TSTCTL
#define USB_TSTCTL2
#define USB_PID_FORCE
#define USB_PKTERR_CNT
#define USB_RXERR_CNT
#define USB_MEM_BIST
#define USB_SLBBIST
#define USB_CNTTEST
#define USB_PHYTST
#define USB_DBGIDX
#define USB_DBGMUX

/*
 * SYS registers
 */
/* demod control registers */
#define SYS_SYS0
#define SYS_DEMOD_CTL
/* GPIO registers */
#define SYS_GPIO_OUT_VAL
#define SYS_GPIO_IN_VAL
#define SYS_GPIO_OUT_EN
#define SYS_SYS1
#define SYS_GPIO_DIR
#define SYS_SYSINTE
#define SYS_SYSINTS
#define SYS_GPIO_CFG0
#define SYS_SYS2
#define SYS_GPIO_CFG1
#define SYS_DEMOD_CTL1

/* IrDA registers */
#define SYS_IRRC_PSR
#define SYS_IRRC_PER
#define SYS_IRRC_SF
#define SYS_IRRC_DPIR
#define SYS_IRRC_CR
#define SYS_IRRC_RP
#define SYS_IRRC_SR
/* I2C master registers */
#define SYS_I2CCR
#define SYS_I2CMCR
#define SYS_I2CMSTR
#define SYS_I2CMSR
#define SYS_I2CMFR

/*
 * IR registers
 */
#define IR_RX_BUF
#define IR_RX_IE
#define IR_RX_IF
#define IR_RX_CTRL
#define IR_RX_CFG
#define IR_MAX_DURATION0
#define IR_MAX_DURATION1
#define IR_IDLE_LEN0
#define IR_IDLE_LEN1
#define IR_GLITCH_LEN
#define IR_RX_BUF_CTRL
#define IR_RX_BUF_DATA
#define IR_RX_BC
#define IR_RX_CLK
#define IR_RX_C_COUNT_L
#define IR_RX_C_COUNT_H
#define IR_SUSPEND_CTRL
#define IR_ERR_TOL_CTRL
#define IR_UNIT_LEN
#define IR_ERR_TOL_LEN
#define IR_MAX_H_TOL_LEN
#define IR_MAX_L_TOL_LEN
#define IR_MASK_CTRL
#define IR_MASK_DATA
#define IR_RES_MASK_ADDR
#define IR_RES_MASK_T_LEN

#endif