linux/drivers/staging/sm750fb/ddk750_sii164.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef DDK750_SII164_H__
#define DDK750_SII164_H__

#define USE_DVICHIP

/* Hot Plug detection mode structure */
enum sii164_hot_plug_mode {};

/* Silicon Image SiI164 chip prototype */
long sii164_init_chip(unsigned char edgeSelect,
		      unsigned char busSelect,
		      unsigned char dualEdgeClkSelect,
		      unsigned char hsyncEnable,
		      unsigned char vsyncEnable,
		      unsigned char deskewEnable,
		      unsigned char deskewSetting,
		      unsigned char continuousSyncEnable,
		      unsigned char pllFilterEnable,
		      unsigned char pllFilterValue);

unsigned short sii164_get_vendor_id(void);
unsigned short sii164GetDeviceID(void);

#ifdef SII164_FULL_FUNCTIONS
void sii164ResetChip(void);
char *sii164GetChipString(void);
void sii164SetPower(unsigned char powerUp);
void sii164EnableHotPlugDetection(unsigned char enableHotPlug);
unsigned char sii164IsConnected(void);
unsigned char sii164CheckInterrupt(void);
void sii164ClearInterrupt(void);
#endif
/*
 * below register definition is used for
 * Silicon Image SiI164 DVI controller chip
 */
/*
 * Vendor ID registers
 */
#define SII164_VENDOR_ID_LOW
#define SII164_VENDOR_ID_HIGH

/*
 * Device ID registers
 */
#define SII164_DEVICE_ID_LOW
#define SII164_DEVICE_ID_HIGH

/*
 * Device Revision
 */
#define SII164_DEVICE_REVISION

/*
 * Frequency Limitation registers
 */
#define SII164_FREQUENCY_LIMIT_LOW
#define SII164_FREQUENCY_LIMIT_HIGH

/*
 * Power Down and Input Signal Configuration registers
 */
#define SII164_CONFIGURATION

/* Power down (PD) */
#define SII164_CONFIGURATION_POWER_DOWN
#define SII164_CONFIGURATION_POWER_NORMAL
#define SII164_CONFIGURATION_POWER_MASK

/* Input Edge Latch Select (EDGE) */
#define SII164_CONFIGURATION_LATCH_FALLING
#define SII164_CONFIGURATION_LATCH_RISING

/* Bus Select (BSEL) */
#define SII164_CONFIGURATION_BUS_12BITS
#define SII164_CONFIGURATION_BUS_24BITS

/* Dual Edge Clock Select (DSEL) */
#define SII164_CONFIGURATION_CLOCK_SINGLE
#define SII164_CONFIGURATION_CLOCK_DUAL

/* Horizontal Sync Enable (HEN) */
#define SII164_CONFIGURATION_HSYNC_FORCE_LOW
#define SII164_CONFIGURATION_HSYNC_AS_IS

/* Vertical Sync Enable (VEN) */
#define SII164_CONFIGURATION_VSYNC_FORCE_LOW
#define SII164_CONFIGURATION_VSYNC_AS_IS

/*
 * Detection registers
 */
#define SII164_DETECT

/* Monitor Detect Interrupt (MDI) */
#define SII164_DETECT_MONITOR_STATE_CHANGE
#define SII164_DETECT_MONITOR_STATE_NO_CHANGE
#define SII164_DETECT_MONITOR_STATE_CLEAR
#define SII164_DETECT_MONITOR_STATE_MASK

/* Hot Plug detect Input (HTPLG) */
#define SII164_DETECT_HOT_PLUG_STATUS_OFF
#define SII164_DETECT_HOT_PLUG_STATUS_ON
#define SII164_DETECT_HOT_PLUG_STATUS_MASK

/* Receiver Sense (RSEN) */
#define SII164_DETECT_RECEIVER_SENSE_NOT_DETECTED
#define SII164_DETECT_RECEIVER_SENSE_DETECTED

/* Interrupt Generation Method (TSEL) */
#define SII164_DETECT_INTERRUPT_BY_RSEN_PIN
#define SII164_DETECT_INTERRUPT_BY_HTPLG_PIN
#define SII164_DETECT_INTERRUPT_MASK

/* Monitor Sense Output (MSEN) */
#define SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH
#define SII164_DETECT_MONITOR_SENSE_OUTPUT_MDI
#define SII164_DETECT_MONITOR_SENSE_OUTPUT_RSEN
#define SII164_DETECT_MONITOR_SENSE_OUTPUT_HTPLG
#define SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG

/*
 * Skewing registers
 */
#define SII164_DESKEW

/* General Purpose Input (CTL[3:1]) */
#define SII164_DESKEW_GENERAL_PURPOSE_INPUT_MASK

/* De-skewing Enable bit (DKEN) */
#define SII164_DESKEW_DISABLE
#define SII164_DESKEW_ENABLE

/* De-skewing Setting (DK[3:1])*/
#define SII164_DESKEW_1_STEP
#define SII164_DESKEW_2_STEP
#define SII164_DESKEW_3_STEP
#define SII164_DESKEW_4_STEP
#define SII164_DESKEW_5_STEP
#define SII164_DESKEW_6_STEP
#define SII164_DESKEW_7_STEP
#define SII164_DESKEW_8_STEP

/*
 * User Configuration Data registers (CFG 7:0)
 */
#define SII164_USER_CONFIGURATION

/*
 * PLL registers
 */
#define SII164_PLL

/* PLL Filter Value (PLLF) */
#define SII164_PLL_FILTER_VALUE_MASK

/* PLL Filter Enable (PFEN) */
#define SII164_PLL_FILTER_DISABLE
#define SII164_PLL_FILTER_ENABLE

/* Sync Continuous (SCNT) */
#define SII164_PLL_FILTER_SYNC_CONTINUOUS_DISABLE
#define SII164_PLL_FILTER_SYNC_CONTINUOUS_ENABLE

#endif