1 /***************************************************************************
5 * SiI9244 - MHL Transmitter Driver
9 * Copyright (C) (2011, Silicon Image Inc)
13 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation version 2.
21 * This program is distributed ¡°as is¡± WITHOUT ANY WARRANTY of any
23 * kind, whether express or implied; without even the implied warranty
25 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
31 *****************************************************************************/
32 #ifndef __SI_CBUS_REGS_H__
33 #define __SI_CBUS_REGS_H__
35 //------------------------------------------------------------------------------
36 // NOTE: Register addresses are 16 bit values with page and offset combined.
38 // Examples: 0x005 = page 0, offset 0x05
39 // 0x1B6 = page 1, offset 0xB6
40 //------------------------------------------------------------------------------
42 //------------------------------------------------------------------------------
43 // CBUS 0 Registers in Page 12 (0xE6)
44 //------------------------------------------------------------------------------
46 #define CBUSREG_MAX_REG 0xFF
48 #define CBUS_PORT1_OFFSET 0x80
50 #define REG_CBUS_INTR_STATUS_2 0x05 //
51 #define REG_CBUS_INTR_ENABLE_2 0x06 //
53 #define REG_CBUS_SUPPORT 0xC07
54 #define BIT_VS_ENABLE 0x01 // Enable MSC_MSG
55 #define BIT_PING_ENABLE 0x02 // Enable PING to test the presence
57 #define REG_CBUS_INTR_STATUS 0xC08
58 #define BIT_CONNECT_CHG 0x01
59 #define BIT_DDC_ABORT 0x04 // Responder aborted DDC command at translation layer
60 #define BIT_MSC_MSG_RCV 0x08 // Responder sent a VS_MSG packet (response data or command.)
61 #define BIT_MSC_XFR_DONE 0x10 // Responder sent ACK packet (not VS_MSG)
62 #define BIT_MSC_XFR_ABORT 0x20 // Command send aborted on TX side?????
63 #define BIT_MSC_ABORT 0x40 // Responder aborted MSC command at translation layer
64 #define BIT_HEARTBEAT_TIMEOUT 0x80 // Responder stopped sending 'alive' messages.
66 #define REG_CBUS_INTR_ENABLE 0xC09
68 #define REG_DDC_ABORT_REASON 0xC0C
69 #define REG_CBUS_BUS_STATUS 0xC0A
70 #define BIT_BUS_CONNECTED 0x01
71 #define BIT_LA_VAL_CHG 0x02
73 #define REG_PRI_XFR_ABORT_REASON 0xC0D
75 #define REG_CBUS_PRI_FWR_ABORT_REASON 0xC0E
76 #define CBUSABORT_BIT_REQ_MAXFAIL (0x01 << 0)
77 #define CBUSABORT_BIT_PROTOCOL_ERROR (0x01 << 1)
78 #define CBUSABORT_BIT_REQ_TIMEOUT (0x01 << 2)
79 #define CBUSABORT_BIT_UNDEFINED_OPCODE (0x01 << 3)
80 #define CBUSSTATUS_BIT_CONNECTED (0x01 << 6)
81 #define CBUSABORT_BIT_PEER_ABORTED (0x01 << 7)
83 #define REG_CBUS_PRI_START 0xC12
84 #define BIT_TRANSFER_PVT_CMD 0x01
85 #define BIT_SEND_MSC_MSG 0x02
86 #define MSC_START_BIT_MSC_CMD (0x01 << 0)
87 #define MSC_START_BIT_VS_CMD (0x01 << 1)
88 #define MSC_START_BIT_READ_REG (0x01 << 2)
89 #define MSC_START_BIT_WRITE_REG (0x01 << 3)
90 #define MSC_START_BIT_WRITE_BURST (0x01 << 4)
92 #define REG_CBUS_PRI_ADDR_CMD 0xC13
93 #define REG_CBUS_PRI_WR_DATA_1ST 0xC14
94 #define REG_CBUS_PRI_WR_DATA_2ND 0xC15
95 #define REG_CBUS_PRI_RD_DATA_1ST 0xC16
96 #define REG_CBUS_PRI_RD_DATA_2ND 0xC17
99 #define REG_CBUS_PRI_VS_CMD 0xC18
100 #define REG_CBUS_PRI_VS_DATA 0xC19
102 #define REG_MSC_WRITE_BURST_LEN 0xC20 // only for WRITE_BURST
103 #define MSC_REQUESTOR_DONE_NACK (0x01 << 6)
105 #define REG_CBUS_MSC_RETRY_INTERVAL 0x1A // default is 16
106 #define REG_CBUS_DDC_FAIL_LIMIT 0x1C // default is 5
107 #define REG_CBUS_MSC_FAIL_LIMIT 0x1D // default is 5
108 #define REG_CBUS_MSC_INT2_STATUS 0xC1E
109 #define REG_CBUS_MSC_INT2_ENABLE 0xC1F
110 #define MSC_INT2_REQ_WRITE_MSC (0x01 << 0) // Write REG data written.
111 #define MSC_INT2_HEARTBEAT_MAXFAIL (0x01 << 1) // Retry threshold exceeded for sending the Heartbeat
113 #define REG_MSC_WRITE_BURST_LEN 0xC20 // only for WRITE_BURST
115 #define REG_MSC_HEARTBEAT_CONTROL 0xC21 // Periodic heart beat. TX sends GET_REV_ID MSC command
116 #define MSC_HEARTBEAT_PERIOD_MASK 0x0F // bits 3..0
117 #define MSC_HEARTBEAT_FAIL_LIMIT_MASK 0x70 // bits 6..4
118 #define MSC_HEARTBEAT_ENABLE 0x80 // bit 7
120 #define REG_MSC_TIMEOUT_LIMIT 0xC22
121 #define MSC_TIMEOUT_LIMIT_MSB_MASK (0x0F) // default is 1
122 #define MSC_LEGACY_BIT (0x01 << 7) // This should be cleared.
124 #define REG_CBUS_LINK_CONTROL_1 0xC30 //
125 #define REG_CBUS_LINK_CONTROL_2 0xC31 //
126 #define REG_CBUS_LINK_CONTROL_3 0xC32 //
127 #define REG_CBUS_LINK_CONTROL_4 0xC33 //
128 #define REG_CBUS_LINK_CONTROL_5 0xC34 //
129 #define REG_CBUS_LINK_CONTROL_6 0xC35 //
130 #define REG_CBUS_LINK_CONTROL_7 0xC36 //
131 #define REG_CBUS_LINK_STATUS_1 0xC37
132 #define REG_CBUS_LINK_STATUS_2 0xC38
133 #define REG_CBUS_LINK_CONTROL_8 0xC39 //
134 #define REG_CBUS_LINK_CONTROL_9 0xC3A //
135 #define REG_CBUS_LINK_CONTROL_10 0xC3B //
136 #define REG_CBUS_LINK_CONTROL_11 0xC3C //
137 #define REG_CBUS_LINK_CONTROL_12 0xC3D //
140 #define REG_CBUS_LINK_CTRL9_0 0xC3A
141 #define REG_CBUS_LINK_CTRL9_1 0xCBA
143 #define REG_CBUS_DRV_STRENGTH_0 0xC40 //
144 #define REG_CBUS_DRV_STRENGTH_1 0xC41 //
145 #define REG_CBUS_ACK_CONTROL 0xC42 //
146 #define REG_CBUS_CAL_CONTROL 0xC43 // Calibration
148 #define REG_CBUS_SCRATCHPAD_0 0xCC0
149 #define REG_CBUS_DEVICE_CAP_0 0xC80
150 #define REG_CBUS_DEVICE_CAP_1 0xC81
151 #define REG_CBUS_DEVICE_CAP_2 0xC82
152 #define REG_CBUS_DEVICE_CAP_3 0xC83
153 #define REG_CBUS_DEVICE_CAP_4 0xC84
154 #define REG_CBUS_DEVICE_CAP_5 0xC85
155 #define REG_CBUS_DEVICE_CAP_6 0xC86
156 #define REG_CBUS_DEVICE_CAP_7 0xC87
157 #define REG_CBUS_DEVICE_CAP_8 0xC88
158 #define REG_CBUS_DEVICE_CAP_9 0xC89
159 #define REG_CBUS_DEVICE_CAP_A 0xC8A
160 #define REG_CBUS_DEVICE_CAP_B 0xC8B
161 #define REG_CBUS_DEVICE_CAP_C 0xC8C
162 #define REG_CBUS_DEVICE_CAP_D 0xC8D
163 #define REG_CBUS_DEVICE_CAP_E 0xC8E
164 #define REG_CBUS_DEVICE_CAP_F 0xC8F
165 #define REG_CBUS_SET_INT_0 0xCA0
166 #define REG_CBUS_SET_INT_1 0xCA1
167 #define REG_CBUS_SET_INT_2 0xCA2
168 #define REG_CBUS_SET_INT_3 0xCA3
169 #define REG_CBUS_WRITE_STAT_0 0xCB0
170 #define REG_CBUS_WRITE_STAT_1 0xCB1
171 #define REG_CBUS_WRITE_STAT_2 0xCB2
172 #define REG_CBUS_WRITE_STAT_3 0xCB3
174 //------------------------------------------------------------------------------
175 // EDID Registers in Page 9 (0xE0)
176 //------------------------------------------------------------------------------
178 #define REG_CBUS_PORT_SEL_AUTO 0x9E6
179 #define REG_CBUS_PORT_OVWR_MODE 0x9E7
180 #define REG_CBUS_PORT_OVWR_VALUE 0x9E8
182 #define REG_CBUS_DU_MODE 0x9E1
183 #define REG_CBUS_DU_MODE_DELAY 0x00
184 #define REG_CBUS_DU_CNT_5 0x01
185 #define REG_CBUS_DU_CNT_7 0x03
186 #define REG_CBUS_DU_CNT_9 0x05
187 #define REG_CBUS_DU_CNT_11 0x07
188 #endif // __SI_CBUS_REGS_H__