31 #define TFP410_VID 0x014C
32 #define TFP410_DID 0x0410
34 #define TFP410_VID_LO 0x00
35 #define TFP410_VID_HI 0x01
36 #define TFP410_DID_LO 0x02
37 #define TFP410_DID_HI 0x03
38 #define TFP410_REV 0x04
40 #define TFP410_CTL_1 0x08
41 #define TFP410_CTL_1_TDIS (1<<6)
42 #define TFP410_CTL_1_VEN (1<<5)
43 #define TFP410_CTL_1_HEN (1<<4)
44 #define TFP410_CTL_1_DSEL (1<<3)
45 #define TFP410_CTL_1_BSEL (1<<2)
46 #define TFP410_CTL_1_EDGE (1<<1)
47 #define TFP410_CTL_1_PD (1<<0)
49 #define TFP410_CTL_2 0x09
50 #define TFP410_CTL_2_VLOW (1<<7)
51 #define TFP410_CTL_2_MSEL_MASK (0x7<<4)
52 #define TFP410_CTL_2_MSEL (1<<4)
53 #define TFP410_CTL_2_TSEL (1<<3)
54 #define TFP410_CTL_2_RSEN (1<<2)
55 #define TFP410_CTL_2_HTPLG (1<<1)
56 #define TFP410_CTL_2_MDI (1<<0)
58 #define TFP410_CTL_3 0x0A
59 #define TFP410_CTL_3_DK_MASK (0x7<<5)
60 #define TFP410_CTL_3_DK (1<<5)
61 #define TFP410_CTL_3_DKEN (1<<4)
62 #define TFP410_CTL_3_CTL_MASK (0x7<<1)
63 #define TFP410_CTL_3_CTL (1<<1)
65 #define TFP410_USERCFG 0x0B
67 #define TFP410_DE_DLY 0x32
69 #define TFP410_DE_CTL 0x33
70 #define TFP410_DE_CTL_DEGEN (1<<6)
71 #define TFP410_DE_CTL_VSPOL (1<<5)
72 #define TFP410_DE_CTL_HSPOL (1<<4)
73 #define TFP410_DE_CTL_DEDLY8 (1<<0)
75 #define TFP410_DE_TOP 0x34
77 #define TFP410_DE_CNT_LO 0x36
78 #define TFP410_DE_CNT_HI 0x37
80 #define TFP410_DE_LIN_LO 0x38
81 #define TFP410_DE_LIN_HI 0x39
83 #define TFP410_H_RES_LO 0x3A
84 #define TFP410_H_RES_HI 0x3B
86 #define TFP410_V_RES_LO 0x3C
87 #define TFP410_V_RES_HI 0x3D
124 DRM_DEBUG_KMS(
"Unable to read register 0x%02x from %s:%02x.\n",
149 DRM_DEBUG_KMS(
"Unable to write register 0x%02x to %s:%d.\n",
160 if (tfp410_readb(dvo, addr+0, &ch1) &&
161 tfp410_readb(dvo, addr+1, &ch2))
162 return ((ch2 << 8) & 0xFF00) | (ch1 & 0x00FF);
184 DRM_DEBUG_KMS(
"tfp410 not detected got VID %X: from %s "
191 DRM_DEBUG_KMS(
"tfp410 not detected got DID %X: from %s "
270 DRM_LOG_KMS(
"TFP410_REV: 0x%02X\n", val);
272 DRM_LOG_KMS(
"TFP410_CTL1: 0x%02X\n", val);
274 DRM_LOG_KMS(
"TFP410_CTL2: 0x%02X\n", val);
276 DRM_LOG_KMS(
"TFP410_CTL3: 0x%02X\n", val);
278 DRM_LOG_KMS(
"TFP410_USERCFG: 0x%02X\n", val);
280 DRM_LOG_KMS(
"TFP410_DE_DLY: 0x%02X\n", val);
282 DRM_LOG_KMS(
"TFP410_DE_CTL: 0x%02X\n", val);
284 DRM_LOG_KMS(
"TFP410_DE_TOP: 0x%02X\n", val);
287 DRM_LOG_KMS(
"TFP410_DE_CNT: 0x%02X%02X\n", val2, val);
290 DRM_LOG_KMS(
"TFP410_DE_LIN: 0x%02X%02X\n", val2, val);
293 DRM_LOG_KMS(
"TFP410_H_RES: 0x%02X%02X\n", val2, val);
296 DRM_LOG_KMS(
"TFP410_V_RES: 0x%02X%02X\n", val2, val);
311 .detect = tfp410_detect,
312 .mode_valid = tfp410_mode_valid,
313 .mode_set = tfp410_mode_set,
315 .get_hw_state = tfp410_get_hw_state,
316 .dump_regs = tfp410_dump_regs,
317 .destroy = tfp410_destroy,