162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
462306a36Sopenharmony_ci * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef __DVI_H__
962306a36Sopenharmony_ci#define __DVI_H__
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/*Definition TMDS Device ID register*/
1262306a36Sopenharmony_ci#define     VT1632_DEVICE_ID_REG        0x02
1362306a36Sopenharmony_ci#define     VT1632_DEVICE_ID            0x92
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#define     GET_DVI_SIZE_BY_SYSTEM_BIOS     0x01
1662306a36Sopenharmony_ci#define     GET_DVI_SIZE_BY_VGA_BIOS        0x02
1762306a36Sopenharmony_ci#define     GET_DVI_SZIE_BY_HW_STRAPPING    0x03
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci/* Definition DVI Panel ID*/
2062306a36Sopenharmony_ci/* Resolution: 640x480,   Channel: single, Dithering: Enable */
2162306a36Sopenharmony_ci#define     DVI_PANEL_ID0_640X480       0x00
2262306a36Sopenharmony_ci/* Resolution: 800x600,   Channel: single, Dithering: Enable */
2362306a36Sopenharmony_ci#define     DVI_PANEL_ID1_800x600       0x01
2462306a36Sopenharmony_ci/* Resolution: 1024x768,  Channel: single, Dithering: Enable */
2562306a36Sopenharmony_ci#define     DVI_PANEL_ID1_1024x768      0x02
2662306a36Sopenharmony_ci/* Resolution: 1280x768,  Channel: single, Dithering: Enable */
2762306a36Sopenharmony_ci#define     DVI_PANEL_ID1_1280x768      0x03
2862306a36Sopenharmony_ci/* Resolution: 1280x1024, Channel: dual,   Dithering: Enable */
2962306a36Sopenharmony_ci#define     DVI_PANEL_ID1_1280x1024     0x04
3062306a36Sopenharmony_ci/* Resolution: 1400x1050, Channel: dual,   Dithering: Enable */
3162306a36Sopenharmony_ci#define     DVI_PANEL_ID1_1400x1050     0x05
3262306a36Sopenharmony_ci/* Resolution: 1600x1200, Channel: dual,   Dithering: Enable */
3362306a36Sopenharmony_ci#define     DVI_PANEL_ID1_1600x1200     0x06
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci/* Define the version of EDID*/
3662306a36Sopenharmony_ci#define     EDID_VERSION_1      1
3762306a36Sopenharmony_ci#define     EDID_VERSION_2      2
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#define     DEV_CONNECT_DVI     0x01
4062306a36Sopenharmony_ci#define     DEV_CONNECT_HDMI    0x02
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciint viafb_dvi_sense(void);
4362306a36Sopenharmony_civoid viafb_dvi_disable(void);
4462306a36Sopenharmony_civoid viafb_dvi_enable(void);
4562306a36Sopenharmony_cibool viafb_tmds_trasmitter_identify(void);
4662306a36Sopenharmony_civoid viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
4762306a36Sopenharmony_ci	struct tmds_setting_information *tmds_setting);
4862306a36Sopenharmony_civoid viafb_dvi_set_mode(const struct fb_var_screeninfo *var,
4962306a36Sopenharmony_ci	u16 cxres, u16 cyres, int iga);
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci#endif /* __DVI_H__ */
52