1/**************************************************************************
2
3 Copyright 2006 Dave Airlie <airlied@linux.ie>
4
5Permission is hereby granted, free of charge, to any person obtaining a
6copy of this software and associated documentation files (the "Software"),
7to deal in the Software without restriction, including without limitation
8on the rights to use, copy, modify, merge, publish, distribute, sub
9license, and/or sell copies of the Software, and to permit persons to whom
10the Software is furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice (including the next
13paragraph) shall be included in all copies or substantial portions of the
14Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
20DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
22USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24**************************************************************************/
25
26#ifndef CH7xxx_REG_H
27#define CH7xxx_REG_H
28
29#define CH7xxx_REG_VID 0x4a
30#define CH7xxx_REG_DID 0x4b
31
32#define CH7011_VID 0x83 /* 7010 as well */
33#define CH7009A_VID 0x84
34#define CH7009B_VID 0x85
35#define CH7301_VID 0x95
36
37#define CH7xxx_VID 0x84
38#define CH7xxx_DID 0x17
39
40#define CH7xxx_NUM_REGS 0x4c
41
42#define CH7xxx_CM 0x1C
43#define CH7xxx_CM_XCM (1<<0)
44#define CH7xxx_CM_MCP (1<<2)
45#define CH7xxx_INPUT_CLOCK 0x1D
46#define CH7xxx_GPIO 0x1E
47#define CH7xxx_GPIO_HPIR (1<<3)
48#define CH7xxx_IDF 0x1F
49
50#define CH7xxx_IDF_HSP (1<<3)
51#define CH7xxx_IDF_VSP (1<<4)
52
53#define CH7xxx_CONNECTION_DETECT 0x20
54#define CH7xxx_CDET_DVI (1<<5)
55
56#define CH7301_DAC_CNTL 0x21
57#define CH7301_HOTPLUG 0x23
58#define CH7xxx_TCTL 0x31
59#define CH7xxx_TVCO 0x32
60#define CH7xxx_TPCP 0x33
61#define CH7xxx_TPD 0x34
62#define CH7xxx_TPVT 0x35
63#define CH7xxx_TLPF 0x36
64#define CH7xxx_TCT 0x37
65#define CH7301_TEST_PATTERN 0x48
66#define CH7xxx_PM 0x49
67
68#define CH7xxx_PM_FPD (1<<0)
69#define CH7301_PM_DACPD0 (1<<1)
70#define CH7301_PM_DACPD1 (1<<2)
71#define CH7301_PM_DACPD2 (1<<3)
72#define CH7xxx_PM_DVIL (1<<6)
73#define CH7xxx_PM_DVIP (1<<7)
74
75#define CH7301_SYNC_POLARITY 0x56
76
77#define CH7301_SYNC_RGB_YUV (1<<0)
78#define CH7301_SYNC_POL_DVI (1<<5)
79
80#endif
81