xref: /openbmc/linux/drivers/media/pci/cx23885/cx23885-reg.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*c942fddfSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2b285192aSMauro Carvalho Chehab /*
3b285192aSMauro Carvalho Chehab  *  Driver for the Conexant CX23885 PCIe bridge
4b285192aSMauro Carvalho Chehab  *
5b285192aSMauro Carvalho Chehab  *  Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
6b285192aSMauro Carvalho Chehab  */
7b285192aSMauro Carvalho Chehab 
8b285192aSMauro Carvalho Chehab #ifndef _CX23885_REG_H_
9b285192aSMauro Carvalho Chehab #define _CX23885_REG_H_
10b285192aSMauro Carvalho Chehab 
11b285192aSMauro Carvalho Chehab /*
12b285192aSMauro Carvalho Chehab Address Map
13b285192aSMauro Carvalho Chehab 0x00000000 -> 0x00009000   TX SRAM  (Fifos)
14b285192aSMauro Carvalho Chehab 0x00010000 -> 0x00013c00   RX SRAM  CMDS + CDT
15b285192aSMauro Carvalho Chehab 
16b285192aSMauro Carvalho Chehab EACH CMDS struct is 0x80 bytes long
17b285192aSMauro Carvalho Chehab 
18b285192aSMauro Carvalho Chehab DMAx_PTR1 = 0x03040 address of first cluster
19b285192aSMauro Carvalho Chehab DMAx_PTR2 = 0x10600 address of the CDT
20b285192aSMauro Carvalho Chehab DMAx_CNT1 = cluster size in (bytes >> 4) -1
21b285192aSMauro Carvalho Chehab DMAx_CNT2 = total cdt size for all entries >> 3
22b285192aSMauro Carvalho Chehab 
23b285192aSMauro Carvalho Chehab Cluster Descriptor entry = 4 DWORDS
24b285192aSMauro Carvalho Chehab  DWORD 0 -> ptr to cluster
25b285192aSMauro Carvalho Chehab  DWORD 1 Reserved
26b285192aSMauro Carvalho Chehab  DWORD 2 Reserved
27b285192aSMauro Carvalho Chehab  DWORD 3 Reserved
28b285192aSMauro Carvalho Chehab 
29b285192aSMauro Carvalho Chehab Channel manager Data Structure entry = 20 DWORD
30b285192aSMauro Carvalho Chehab   0  IntialProgramCounterLow
31b285192aSMauro Carvalho Chehab   1  IntialProgramCounterHigh
32b285192aSMauro Carvalho Chehab   2  ClusterDescriptorTableBase
33b285192aSMauro Carvalho Chehab   3  ClusterDescriptorTableSize
34b285192aSMauro Carvalho Chehab   4  InstructionQueueBase
35b285192aSMauro Carvalho Chehab   5  InstructionQueueSize
36b285192aSMauro Carvalho Chehab ...  Reserved
37b285192aSMauro Carvalho Chehab  19  Reserved
38b285192aSMauro Carvalho Chehab */
39b285192aSMauro Carvalho Chehab 
40b285192aSMauro Carvalho Chehab /* Risc Instructions */
41b285192aSMauro Carvalho Chehab #define RISC_CNT_INC		 0x00010000
42b285192aSMauro Carvalho Chehab #define RISC_CNT_RESET		 0x00030000
43b285192aSMauro Carvalho Chehab #define RISC_IRQ1		 0x01000000
44b285192aSMauro Carvalho Chehab #define RISC_IRQ2		 0x02000000
45b285192aSMauro Carvalho Chehab #define RISC_EOL		 0x04000000
46b285192aSMauro Carvalho Chehab #define RISC_SOL		 0x08000000
47b285192aSMauro Carvalho Chehab #define RISC_WRITE		 0x10000000
48b285192aSMauro Carvalho Chehab #define RISC_SKIP		 0x20000000
49b285192aSMauro Carvalho Chehab #define RISC_JUMP		 0x70000000
50b285192aSMauro Carvalho Chehab #define RISC_SYNC		 0x80000000
51b285192aSMauro Carvalho Chehab #define RISC_RESYNC		 0x80008000
52b285192aSMauro Carvalho Chehab #define RISC_READ		 0x90000000
53b285192aSMauro Carvalho Chehab #define RISC_WRITERM		 0xB0000000
54b285192aSMauro Carvalho Chehab #define RISC_WRITECM		 0xC0000000
55b285192aSMauro Carvalho Chehab #define RISC_WRITECR		 0xD0000000
56b285192aSMauro Carvalho Chehab #define RISC_WRITEC		 0x50000000
57b285192aSMauro Carvalho Chehab #define RISC_READC		 0xA0000000
58b285192aSMauro Carvalho Chehab 
59b285192aSMauro Carvalho Chehab 
60b285192aSMauro Carvalho Chehab /* Audio and Video Core */
61b285192aSMauro Carvalho Chehab #define HOST_REG1		0x00000000
62b285192aSMauro Carvalho Chehab #define HOST_REG2		0x00000001
63b285192aSMauro Carvalho Chehab #define HOST_REG3		0x00000002
64b285192aSMauro Carvalho Chehab 
65b285192aSMauro Carvalho Chehab /* Chip Configuration Registers */
66b285192aSMauro Carvalho Chehab #define CHIP_CTRL		0x00000100
67b285192aSMauro Carvalho Chehab #define AFE_CTRL		0x00000104
68b285192aSMauro Carvalho Chehab #define VID_PLL_INT_POST	0x00000108
69b285192aSMauro Carvalho Chehab #define VID_PLL_FRAC		0x0000010C
70b285192aSMauro Carvalho Chehab #define AUX_PLL_INT_POST	0x00000110
71b285192aSMauro Carvalho Chehab #define AUX_PLL_FRAC		0x00000114
72b285192aSMauro Carvalho Chehab #define SYS_PLL_INT_POST	0x00000118
73b285192aSMauro Carvalho Chehab #define SYS_PLL_FRAC		0x0000011C
74b285192aSMauro Carvalho Chehab #define PIN_CTRL		0x00000120
75b285192aSMauro Carvalho Chehab #define AUD_IO_CTRL		0x00000124
76b285192aSMauro Carvalho Chehab #define AUD_LOCK1		0x00000128
77b285192aSMauro Carvalho Chehab #define AUD_LOCK2		0x0000012C
78b285192aSMauro Carvalho Chehab #define POWER_CTRL		0x00000130
79b285192aSMauro Carvalho Chehab #define AFE_DIAG_CTRL1		0x00000134
80b285192aSMauro Carvalho Chehab #define AFE_DIAG_CTRL3		0x0000013C
81b285192aSMauro Carvalho Chehab #define PLL_DIAG_CTRL		0x00000140
82b285192aSMauro Carvalho Chehab #define AFE_CLK_OUT_CTRL	0x00000144
83b285192aSMauro Carvalho Chehab #define DLL1_DIAG_CTRL		0x0000015C
84b285192aSMauro Carvalho Chehab 
85b285192aSMauro Carvalho Chehab /* GPIO[23:19] Output Enable */
86b285192aSMauro Carvalho Chehab #define GPIO2_OUT_EN_REG	0x00000160
87b285192aSMauro Carvalho Chehab /* GPIO[23:19] Data Registers */
88b285192aSMauro Carvalho Chehab #define GPIO2			0x00000164
89b285192aSMauro Carvalho Chehab 
90b285192aSMauro Carvalho Chehab #define IFADC_CTRL		0x00000180
91b285192aSMauro Carvalho Chehab 
92b285192aSMauro Carvalho Chehab /* Infrared Remote Registers */
93b285192aSMauro Carvalho Chehab #define IR_CNTRL_REG	0x00000200
94b285192aSMauro Carvalho Chehab #define IR_TXCLK_REG	0x00000204
95b285192aSMauro Carvalho Chehab #define IR_RXCLK_REG	0x00000208
96b285192aSMauro Carvalho Chehab #define IR_CDUTY_REG	0x0000020C
97b285192aSMauro Carvalho Chehab #define IR_STAT_REG	0x00000210
98b285192aSMauro Carvalho Chehab #define IR_IRQEN_REG	0x00000214
99b285192aSMauro Carvalho Chehab #define IR_FILTR_REG	0x00000218
100b285192aSMauro Carvalho Chehab #define IR_FIFO_REG	0x0000023C
101b285192aSMauro Carvalho Chehab 
102b285192aSMauro Carvalho Chehab /* Video Decoder Registers */
103b285192aSMauro Carvalho Chehab #define MODE_CTRL		0x00000400
104b285192aSMauro Carvalho Chehab #define OUT_CTRL1		0x00000404
105b285192aSMauro Carvalho Chehab #define OUT_CTRL2		0x00000408
106b285192aSMauro Carvalho Chehab #define GEN_STAT		0x0000040C
107b285192aSMauro Carvalho Chehab #define INT_STAT_MASK		0x00000410
108b285192aSMauro Carvalho Chehab #define LUMA_CTRL		0x00000414
109b285192aSMauro Carvalho Chehab #define HSCALE_CTRL		0x00000418
110b285192aSMauro Carvalho Chehab #define VSCALE_CTRL		0x0000041C
111b285192aSMauro Carvalho Chehab #define CHROMA_CTRL		0x00000420
112b285192aSMauro Carvalho Chehab #define VBI_LINE_CTRL1		0x00000424
113b285192aSMauro Carvalho Chehab #define VBI_LINE_CTRL2		0x00000428
114b285192aSMauro Carvalho Chehab #define VBI_LINE_CTRL3		0x0000042C
115b285192aSMauro Carvalho Chehab #define VBI_LINE_CTRL4		0x00000430
116b285192aSMauro Carvalho Chehab #define VBI_LINE_CTRL5		0x00000434
117b285192aSMauro Carvalho Chehab #define VBI_FC_CFG		0x00000438
118b285192aSMauro Carvalho Chehab #define VBI_MISC_CFG1		0x0000043C
119b285192aSMauro Carvalho Chehab #define VBI_MISC_CFG2		0x00000440
120b285192aSMauro Carvalho Chehab #define VBI_PAY1		0x00000444
121b285192aSMauro Carvalho Chehab #define VBI_PAY2		0x00000448
122b285192aSMauro Carvalho Chehab #define VBI_CUST1_CFG1		0x0000044C
123b285192aSMauro Carvalho Chehab #define VBI_CUST1_CFG2		0x00000450
124b285192aSMauro Carvalho Chehab #define VBI_CUST1_CFG3		0x00000454
125b285192aSMauro Carvalho Chehab #define VBI_CUST2_CFG1		0x00000458
126b285192aSMauro Carvalho Chehab #define VBI_CUST2_CFG2		0x0000045C
127b285192aSMauro Carvalho Chehab #define VBI_CUST2_CFG3		0x00000460
128b285192aSMauro Carvalho Chehab #define VBI_CUST3_CFG1		0x00000464
129b285192aSMauro Carvalho Chehab #define VBI_CUST3_CFG2		0x00000468
130b285192aSMauro Carvalho Chehab #define VBI_CUST3_CFG3		0x0000046C
131b285192aSMauro Carvalho Chehab #define HORIZ_TIM_CTRL		0x00000470
132b285192aSMauro Carvalho Chehab #define VERT_TIM_CTRL		0x00000474
133b285192aSMauro Carvalho Chehab #define SRC_COMB_CFG		0x00000478
134b285192aSMauro Carvalho Chehab #define CHROMA_VBIOFF_CFG	0x0000047C
135b285192aSMauro Carvalho Chehab #define FIELD_COUNT		0x00000480
136b285192aSMauro Carvalho Chehab #define MISC_TIM_CTRL		0x00000484
137b285192aSMauro Carvalho Chehab #define DFE_CTRL1		0x00000488
138b285192aSMauro Carvalho Chehab #define DFE_CTRL2		0x0000048C
139b285192aSMauro Carvalho Chehab #define DFE_CTRL3		0x00000490
140b285192aSMauro Carvalho Chehab #define PLL_CTRL		0x00000494
141b285192aSMauro Carvalho Chehab #define HTL_CTRL		0x00000498
142b285192aSMauro Carvalho Chehab #define COMB_CTRL		0x0000049C
143b285192aSMauro Carvalho Chehab #define CRUSH_CTRL		0x000004A0
144b285192aSMauro Carvalho Chehab #define SOFT_RST_CTRL		0x000004A4
145b285192aSMauro Carvalho Chehab #define CX885_VERSION		0x000004B4
146b285192aSMauro Carvalho Chehab #define VBI_PASS_CTRL		0x000004BC
147b285192aSMauro Carvalho Chehab 
148b285192aSMauro Carvalho Chehab /* Audio Decoder Registers */
149b285192aSMauro Carvalho Chehab /* 8051 Configuration */
150b285192aSMauro Carvalho Chehab #define DL_CTL		0x00000800
151b285192aSMauro Carvalho Chehab #define STD_DET_STATUS	0x00000804
152b285192aSMauro Carvalho Chehab #define STD_DET_CTL	0x00000808
153b285192aSMauro Carvalho Chehab #define DW8051_INT	0x0000080C
154b285192aSMauro Carvalho Chehab #define GENERAL_CTL	0x00000810
155b285192aSMauro Carvalho Chehab #define AAGC_CTL	0x00000814
156b285192aSMauro Carvalho Chehab #define DEMATRIX_CTL	0x000008CC
157b285192aSMauro Carvalho Chehab #define PATH1_CTL1	0x000008D0
158b285192aSMauro Carvalho Chehab #define PATH1_VOL_CTL	0x000008D4
159b285192aSMauro Carvalho Chehab #define PATH1_EQ_CTL	0x000008D8
160b285192aSMauro Carvalho Chehab #define PATH1_SC_CTL	0x000008DC
161b285192aSMauro Carvalho Chehab #define PATH2_CTL1	0x000008E0
162b285192aSMauro Carvalho Chehab #define PATH2_VOL_CTL	0x000008E4
163b285192aSMauro Carvalho Chehab #define PATH2_EQ_CTL	0x000008E8
164b285192aSMauro Carvalho Chehab #define PATH2_SC_CTL	0x000008EC
165b285192aSMauro Carvalho Chehab 
166b285192aSMauro Carvalho Chehab /* Sample Rate Converter */
167b285192aSMauro Carvalho Chehab #define SRC_CTL		0x000008F0
168b285192aSMauro Carvalho Chehab #define SRC_LF_COEF	0x000008F4
169b285192aSMauro Carvalho Chehab #define SRC1_CTL	0x000008F8
170b285192aSMauro Carvalho Chehab #define SRC2_CTL	0x000008FC
171b285192aSMauro Carvalho Chehab #define SRC3_CTL	0x00000900
172b285192aSMauro Carvalho Chehab #define SRC4_CTL	0x00000904
173b285192aSMauro Carvalho Chehab #define SRC5_CTL	0x00000908
174b285192aSMauro Carvalho Chehab #define SRC6_CTL	0x0000090C
175b285192aSMauro Carvalho Chehab #define BAND_OUT_SEL	0x00000910
176b285192aSMauro Carvalho Chehab #define I2S_N_CTL	0x00000914
177b285192aSMauro Carvalho Chehab #define I2S_OUT_CTL	0x00000918
178b285192aSMauro Carvalho Chehab #define AUTOCONFIG_REG	0x000009C4
179b285192aSMauro Carvalho Chehab 
180b285192aSMauro Carvalho Chehab /* Audio ADC Registers */
181b285192aSMauro Carvalho Chehab #define DSM_CTRL1	0x00000000
182b285192aSMauro Carvalho Chehab #define DSM_CTRL2	0x00000001
183b285192aSMauro Carvalho Chehab #define CHP_EN_CTRL	0x00000002
184b285192aSMauro Carvalho Chehab #define CHP_CLK_CTRL1	0x00000004
185b285192aSMauro Carvalho Chehab #define CHP_CLK_CTRL2	0x00000005
186b285192aSMauro Carvalho Chehab #define BG_REF_CTRL	0x00000006
187b285192aSMauro Carvalho Chehab #define SD2_SW_CTRL1	0x00000008
188b285192aSMauro Carvalho Chehab #define SD2_SW_CTRL2	0x00000009
189b285192aSMauro Carvalho Chehab #define SD2_BIAS_CTRL	0x0000000A
190b285192aSMauro Carvalho Chehab #define AMP_BIAS_CTRL	0x0000000C
191b285192aSMauro Carvalho Chehab #define CH_PWR_CTRL1	0x0000000E
192b285192aSMauro Carvalho Chehab #define FLD_CH_SEL      (1 << 3)
193b285192aSMauro Carvalho Chehab #define CH_PWR_CTRL2	0x0000000F
194b285192aSMauro Carvalho Chehab #define DSM_STATUS1	0x00000010
195b285192aSMauro Carvalho Chehab #define DSM_STATUS2	0x00000011
196b285192aSMauro Carvalho Chehab #define DIG_CTL1	0x00000012
197b285192aSMauro Carvalho Chehab #define DIG_CTL2	0x00000013
198b285192aSMauro Carvalho Chehab #define I2S_TX_CFG	0x0000001A
199b285192aSMauro Carvalho Chehab 
200b285192aSMauro Carvalho Chehab #define DEV_CNTRL2	0x00040000
201b285192aSMauro Carvalho Chehab 
202b285192aSMauro Carvalho Chehab #define PCI_MSK_IR        (1 << 28)
203b285192aSMauro Carvalho Chehab #define PCI_MSK_AV_CORE   (1 << 27)
204b285192aSMauro Carvalho Chehab #define PCI_MSK_GPIO1     (1 << 24)
205b285192aSMauro Carvalho Chehab #define PCI_MSK_GPIO0     (1 << 23)
206b285192aSMauro Carvalho Chehab #define PCI_MSK_APB_DMA   (1 << 12)
207b285192aSMauro Carvalho Chehab #define PCI_MSK_AL_WR     (1 << 11)
208b285192aSMauro Carvalho Chehab #define PCI_MSK_AL_RD     (1 << 10)
209b285192aSMauro Carvalho Chehab #define PCI_MSK_RISC_WR   (1 <<  9)
210b285192aSMauro Carvalho Chehab #define PCI_MSK_RISC_RD   (1 <<  8)
211b285192aSMauro Carvalho Chehab #define PCI_MSK_AUD_EXT   (1 <<  4)
212b285192aSMauro Carvalho Chehab #define PCI_MSK_AUD_INT   (1 <<  3)
213b285192aSMauro Carvalho Chehab #define PCI_MSK_VID_C     (1 <<  2)
214b285192aSMauro Carvalho Chehab #define PCI_MSK_VID_B     (1 <<  1)
215b285192aSMauro Carvalho Chehab #define PCI_MSK_VID_A      1
216b285192aSMauro Carvalho Chehab #define PCI_INT_MSK	0x00040010
217b285192aSMauro Carvalho Chehab 
218b285192aSMauro Carvalho Chehab #define PCI_INT_STAT	0x00040014
219b285192aSMauro Carvalho Chehab #define PCI_INT_MSTAT	0x00040018
220b285192aSMauro Carvalho Chehab 
221b285192aSMauro Carvalho Chehab #define VID_A_INT_MSK	0x00040020
222b285192aSMauro Carvalho Chehab #define VID_A_INT_STAT	0x00040024
223b285192aSMauro Carvalho Chehab #define VID_A_INT_MSTAT	0x00040028
224b285192aSMauro Carvalho Chehab #define VID_A_INT_SSTAT	0x0004002C
225b285192aSMauro Carvalho Chehab 
226b285192aSMauro Carvalho Chehab #define VID_B_INT_MSK	0x00040030
227b285192aSMauro Carvalho Chehab #define VID_B_MSK_BAD_PKT     (1 << 20)
228b285192aSMauro Carvalho Chehab #define VID_B_MSK_VBI_OPC_ERR (1 << 17)
229b285192aSMauro Carvalho Chehab #define VID_B_MSK_OPC_ERR     (1 << 16)
230b285192aSMauro Carvalho Chehab #define VID_B_MSK_VBI_SYNC    (1 << 13)
231b285192aSMauro Carvalho Chehab #define VID_B_MSK_SYNC        (1 << 12)
232b285192aSMauro Carvalho Chehab #define VID_B_MSK_VBI_OF      (1 <<  9)
233b285192aSMauro Carvalho Chehab #define VID_B_MSK_OF          (1 <<  8)
234b285192aSMauro Carvalho Chehab #define VID_B_MSK_VBI_RISCI2  (1 <<  5)
235b285192aSMauro Carvalho Chehab #define VID_B_MSK_RISCI2      (1 <<  4)
236b285192aSMauro Carvalho Chehab #define VID_B_MSK_VBI_RISCI1  (1 <<  1)
237b285192aSMauro Carvalho Chehab #define VID_B_MSK_RISCI1       1
238b285192aSMauro Carvalho Chehab #define VID_B_INT_STAT	0x00040034
239b285192aSMauro Carvalho Chehab #define VID_B_INT_MSTAT	0x00040038
240b285192aSMauro Carvalho Chehab #define VID_B_INT_SSTAT	0x0004003C
241b285192aSMauro Carvalho Chehab 
242b285192aSMauro Carvalho Chehab #define VID_B_MSK_BAD_PKT (1 << 20)
243b285192aSMauro Carvalho Chehab #define VID_B_MSK_OPC_ERR (1 << 16)
244b285192aSMauro Carvalho Chehab #define VID_B_MSK_SYNC    (1 << 12)
245b285192aSMauro Carvalho Chehab #define VID_B_MSK_OF      (1 <<  8)
246b285192aSMauro Carvalho Chehab #define VID_B_MSK_RISCI2  (1 <<  4)
247b285192aSMauro Carvalho Chehab #define VID_B_MSK_RISCI1   1
248b285192aSMauro Carvalho Chehab 
249b285192aSMauro Carvalho Chehab #define VID_C_MSK_BAD_PKT (1 << 20)
250b285192aSMauro Carvalho Chehab #define VID_C_MSK_OPC_ERR (1 << 16)
251b285192aSMauro Carvalho Chehab #define VID_C_MSK_SYNC    (1 << 12)
252b285192aSMauro Carvalho Chehab #define VID_C_MSK_OF      (1 <<  8)
253b285192aSMauro Carvalho Chehab #define VID_C_MSK_RISCI2  (1 <<  4)
254b285192aSMauro Carvalho Chehab #define VID_C_MSK_RISCI1   1
255b285192aSMauro Carvalho Chehab 
256b285192aSMauro Carvalho Chehab /* A superset for testing purposes */
257b285192aSMauro Carvalho Chehab #define VID_BC_MSK_BAD_PKT (1 << 20)
258b285192aSMauro Carvalho Chehab #define VID_BC_MSK_OPC_ERR (1 << 16)
259b285192aSMauro Carvalho Chehab #define VID_BC_MSK_SYNC    (1 << 12)
260b285192aSMauro Carvalho Chehab #define VID_BC_MSK_OF      (1 <<  8)
261b285192aSMauro Carvalho Chehab #define VID_BC_MSK_VBI_RISCI2 (1 <<  5)
262b285192aSMauro Carvalho Chehab #define VID_BC_MSK_RISCI2  (1 <<  4)
263b285192aSMauro Carvalho Chehab #define VID_BC_MSK_VBI_RISCI1 (1 <<  1)
264b285192aSMauro Carvalho Chehab #define VID_BC_MSK_RISCI1   1
265b285192aSMauro Carvalho Chehab 
266b285192aSMauro Carvalho Chehab #define VID_C_INT_MSK	0x00040040
267b285192aSMauro Carvalho Chehab #define VID_C_INT_STAT	0x00040044
268b285192aSMauro Carvalho Chehab #define VID_C_INT_MSTAT	0x00040048
269b285192aSMauro Carvalho Chehab #define VID_C_INT_SSTAT	0x0004004C
270b285192aSMauro Carvalho Chehab 
271b285192aSMauro Carvalho Chehab #define AUDIO_INT_INT_MSK	0x00040050
272b285192aSMauro Carvalho Chehab #define AUDIO_INT_INT_STAT	0x00040054
273b285192aSMauro Carvalho Chehab #define AUDIO_INT_INT_MSTAT	0x00040058
274b285192aSMauro Carvalho Chehab #define AUDIO_INT_INT_SSTAT	0x0004005C
275b285192aSMauro Carvalho Chehab 
276b285192aSMauro Carvalho Chehab #define AUDIO_EXT_INT_MSK	0x00040060
277b285192aSMauro Carvalho Chehab #define AUDIO_EXT_INT_STAT	0x00040064
278b285192aSMauro Carvalho Chehab #define AUDIO_EXT_INT_MSTAT	0x00040068
279b285192aSMauro Carvalho Chehab #define AUDIO_EXT_INT_SSTAT	0x0004006C
280b285192aSMauro Carvalho Chehab 
28195f408bbSBrad Love /* Bits [7:0] set in both TC_REQ and TC_REQ_SET
28295f408bbSBrad Love  * indicate a stall in the RISC engine for a
28395f408bbSBrad Love  * particular rider traffic class. This causes
28495f408bbSBrad Love  * the 885 and 888 bridges (unknown about 887)
28595f408bbSBrad Love  * to become inoperable. Setting bits in
28695f408bbSBrad Love  * TC_REQ_SET resets the corresponding bits
28795f408bbSBrad Love  * in TC_REQ (and TC_REQ_SET) allowing
28895f408bbSBrad Love  * operation to continue.
28995f408bbSBrad Love  */
29095f408bbSBrad Love #define TC_REQ		0x00040090
29195f408bbSBrad Love #define TC_REQ_SET	0x00040094
29295f408bbSBrad Love 
293b285192aSMauro Carvalho Chehab #define RDR_CFG0	0x00050000
294b285192aSMauro Carvalho Chehab #define RDR_CFG1	0x00050004
295b285192aSMauro Carvalho Chehab #define RDR_CFG2	0x00050008
296b285192aSMauro Carvalho Chehab #define RDR_RDRCTL1	0x0005030c
297b285192aSMauro Carvalho Chehab #define RDR_TLCTL0	0x00050318
298b285192aSMauro Carvalho Chehab 
299b285192aSMauro Carvalho Chehab /* APB DMAC Current Buffer Pointer */
300b285192aSMauro Carvalho Chehab #define DMA1_PTR1	0x00100000
301b285192aSMauro Carvalho Chehab #define DMA2_PTR1	0x00100004
302b285192aSMauro Carvalho Chehab #define DMA3_PTR1	0x00100008
303b285192aSMauro Carvalho Chehab #define DMA4_PTR1	0x0010000C
304b285192aSMauro Carvalho Chehab #define DMA5_PTR1	0x00100010
305b285192aSMauro Carvalho Chehab #define DMA6_PTR1	0x00100014
306b285192aSMauro Carvalho Chehab #define DMA7_PTR1	0x00100018
307b285192aSMauro Carvalho Chehab #define DMA8_PTR1	0x0010001C
308b285192aSMauro Carvalho Chehab 
309b285192aSMauro Carvalho Chehab /* APB DMAC Current Table Pointer */
310b285192aSMauro Carvalho Chehab #define DMA1_PTR2	0x00100040
311b285192aSMauro Carvalho Chehab #define DMA2_PTR2	0x00100044
312b285192aSMauro Carvalho Chehab #define DMA3_PTR2	0x00100048
313b285192aSMauro Carvalho Chehab #define DMA4_PTR2	0x0010004C
314b285192aSMauro Carvalho Chehab #define DMA5_PTR2	0x00100050
315b285192aSMauro Carvalho Chehab #define DMA6_PTR2	0x00100054
316b285192aSMauro Carvalho Chehab #define DMA7_PTR2	0x00100058
317b285192aSMauro Carvalho Chehab #define DMA8_PTR2	0x0010005C
318b285192aSMauro Carvalho Chehab 
319b285192aSMauro Carvalho Chehab /* APB DMAC Buffer Limit */
320b285192aSMauro Carvalho Chehab #define DMA1_CNT1	0x00100080
321b285192aSMauro Carvalho Chehab #define DMA2_CNT1	0x00100084
322b285192aSMauro Carvalho Chehab #define DMA3_CNT1	0x00100088
323b285192aSMauro Carvalho Chehab #define DMA4_CNT1	0x0010008C
324b285192aSMauro Carvalho Chehab #define DMA5_CNT1	0x00100090
325b285192aSMauro Carvalho Chehab #define DMA6_CNT1	0x00100094
326b285192aSMauro Carvalho Chehab #define DMA7_CNT1	0x00100098
327b285192aSMauro Carvalho Chehab #define DMA8_CNT1	0x0010009C
328b285192aSMauro Carvalho Chehab 
329b285192aSMauro Carvalho Chehab /* APB DMAC Table Size */
330b285192aSMauro Carvalho Chehab #define DMA1_CNT2	0x001000C0
331b285192aSMauro Carvalho Chehab #define DMA2_CNT2	0x001000C4
332b285192aSMauro Carvalho Chehab #define DMA3_CNT2	0x001000C8
333b285192aSMauro Carvalho Chehab #define DMA4_CNT2	0x001000CC
334b285192aSMauro Carvalho Chehab #define DMA5_CNT2	0x001000D0
335b285192aSMauro Carvalho Chehab #define DMA6_CNT2	0x001000D4
336b285192aSMauro Carvalho Chehab #define DMA7_CNT2	0x001000D8
337b285192aSMauro Carvalho Chehab #define DMA8_CNT2	0x001000DC
338b285192aSMauro Carvalho Chehab 
339b285192aSMauro Carvalho Chehab /* Timer Counters */
340b285192aSMauro Carvalho Chehab #define TM_CNT_LDW	0x00110000
341b285192aSMauro Carvalho Chehab #define TM_CNT_UW	0x00110004
342b285192aSMauro Carvalho Chehab #define TM_LMT_LDW	0x00110008
343b285192aSMauro Carvalho Chehab #define TM_LMT_UW	0x0011000C
344b285192aSMauro Carvalho Chehab 
345b285192aSMauro Carvalho Chehab /* GPIO */
346b285192aSMauro Carvalho Chehab #define GP0_IO		0x00110010
347b285192aSMauro Carvalho Chehab #define GPIO_ISM	0x00110014
348b285192aSMauro Carvalho Chehab #define SOFT_RESET	0x0011001C
349b285192aSMauro Carvalho Chehab 
350b285192aSMauro Carvalho Chehab /* GPIO (417 Microsoftcontroller) RW Data */
351b285192aSMauro Carvalho Chehab #define MC417_RWD	0x00110020
352b285192aSMauro Carvalho Chehab 
353b285192aSMauro Carvalho Chehab /* GPIO (417 Microsoftcontroller) Output Enable, Low Active */
354b285192aSMauro Carvalho Chehab #define MC417_OEN	0x00110024
355b285192aSMauro Carvalho Chehab #define MC417_CTL	0x00110028
356b285192aSMauro Carvalho Chehab #define ALT_PIN_OUT_SEL 0x0011002C
357b285192aSMauro Carvalho Chehab #define CLK_DELAY	0x00110048
358b285192aSMauro Carvalho Chehab #define PAD_CTRL	0x0011004C
359b285192aSMauro Carvalho Chehab 
360b285192aSMauro Carvalho Chehab /* Video A Interface */
361b285192aSMauro Carvalho Chehab #define VID_A_GPCNT		0x00130020
362b285192aSMauro Carvalho Chehab #define VBI_A_GPCNT		0x00130024
363b285192aSMauro Carvalho Chehab #define VID_A_GPCNT_CTL		0x00130030
364b285192aSMauro Carvalho Chehab #define VBI_A_GPCNT_CTL		0x00130034
365b285192aSMauro Carvalho Chehab #define VID_A_DMA_CTL		0x00130040
366b285192aSMauro Carvalho Chehab #define VID_A_VIP_CTRL		0x00130080
367b285192aSMauro Carvalho Chehab #define VID_A_PIXEL_FRMT	0x00130084
368b285192aSMauro Carvalho Chehab #define VID_A_VBI_CTRL		0x00130088
369b285192aSMauro Carvalho Chehab 
370b285192aSMauro Carvalho Chehab /* Video B Interface */
371b285192aSMauro Carvalho Chehab #define VID_B_DMA		0x00130100
372b285192aSMauro Carvalho Chehab #define VBI_B_DMA		0x00130108
373b285192aSMauro Carvalho Chehab #define VID_B_GPCNT		0x00130120
374b285192aSMauro Carvalho Chehab #define VBI_B_GPCNT		0x00130124
375b285192aSMauro Carvalho Chehab #define VID_B_GPCNT_CTL		0x00130134
376b285192aSMauro Carvalho Chehab #define VBI_B_GPCNT_CTL		0x00130138
377b285192aSMauro Carvalho Chehab #define VID_B_DMA_CTL		0x00130140
378b285192aSMauro Carvalho Chehab #define VID_B_SRC_SEL		0x00130144
379b285192aSMauro Carvalho Chehab #define VID_B_LNGTH		0x00130150
380b285192aSMauro Carvalho Chehab #define VID_B_HW_SOP_CTL	0x00130154
381b285192aSMauro Carvalho Chehab #define VID_B_GEN_CTL		0x00130158
382b285192aSMauro Carvalho Chehab #define VID_B_BD_PKT_STATUS	0x0013015C
383b285192aSMauro Carvalho Chehab #define VID_B_SOP_STATUS	0x00130160
384b285192aSMauro Carvalho Chehab #define VID_B_FIFO_OVFL_STAT	0x00130164
385b285192aSMauro Carvalho Chehab #define VID_B_VLD_MISC		0x00130168
386b285192aSMauro Carvalho Chehab #define VID_B_TS_CLK_EN		0x0013016C
387b285192aSMauro Carvalho Chehab #define VID_B_VIP_CTRL		0x00130180
388b285192aSMauro Carvalho Chehab #define VID_B_PIXEL_FRMT	0x00130184
389b285192aSMauro Carvalho Chehab 
390b285192aSMauro Carvalho Chehab /* Video C Interface */
39195f408bbSBrad Love #define VID_C_DMA		0x00130200
39295f408bbSBrad Love #define VBI_C_DMA		0x00130208
393b285192aSMauro Carvalho Chehab #define VID_C_GPCNT		0x00130220
394b285192aSMauro Carvalho Chehab #define VID_C_GPCNT_CTL		0x00130230
395b285192aSMauro Carvalho Chehab #define VBI_C_GPCNT_CTL		0x00130234
396b285192aSMauro Carvalho Chehab #define VID_C_DMA_CTL		0x00130240
397b285192aSMauro Carvalho Chehab #define VID_C_LNGTH		0x00130250
398b285192aSMauro Carvalho Chehab #define VID_C_HW_SOP_CTL	0x00130254
399b285192aSMauro Carvalho Chehab #define VID_C_GEN_CTL		0x00130258
400b285192aSMauro Carvalho Chehab #define VID_C_BD_PKT_STATUS	0x0013025C
401b285192aSMauro Carvalho Chehab #define VID_C_SOP_STATUS	0x00130260
402b285192aSMauro Carvalho Chehab #define VID_C_FIFO_OVFL_STAT	0x00130264
403b285192aSMauro Carvalho Chehab #define VID_C_VLD_MISC		0x00130268
404b285192aSMauro Carvalho Chehab #define VID_C_TS_CLK_EN		0x0013026C
405b285192aSMauro Carvalho Chehab 
406b285192aSMauro Carvalho Chehab /* Internal Audio Interface */
407b285192aSMauro Carvalho Chehab #define AUD_INT_A_GPCNT		0x00140020
408b285192aSMauro Carvalho Chehab #define AUD_INT_B_GPCNT		0x00140024
409b285192aSMauro Carvalho Chehab #define AUD_INT_A_GPCNT_CTL	0x00140030
410b285192aSMauro Carvalho Chehab #define AUD_INT_B_GPCNT_CTL	0x00140034
411b285192aSMauro Carvalho Chehab #define AUD_INT_DMA_CTL		0x00140040
412b285192aSMauro Carvalho Chehab #define AUD_INT_A_LNGTH		0x00140050
413b285192aSMauro Carvalho Chehab #define AUD_INT_B_LNGTH		0x00140054
414b285192aSMauro Carvalho Chehab #define AUD_INT_A_MODE		0x00140058
415b285192aSMauro Carvalho Chehab #define AUD_INT_B_MODE		0x0014005C
416b285192aSMauro Carvalho Chehab 
417b285192aSMauro Carvalho Chehab /* External Audio Interface */
418b285192aSMauro Carvalho Chehab #define AUD_EXT_DMA		0x00140100
419b285192aSMauro Carvalho Chehab #define AUD_EXT_GPCNT		0x00140120
420b285192aSMauro Carvalho Chehab #define AUD_EXT_GPCNT_CTL	0x00140130
421b285192aSMauro Carvalho Chehab #define AUD_EXT_DMA_CTL		0x00140140
422b285192aSMauro Carvalho Chehab #define AUD_EXT_LNGTH		0x00140150
423b285192aSMauro Carvalho Chehab #define AUD_EXT_A_MODE		0x00140158
424b285192aSMauro Carvalho Chehab 
425b285192aSMauro Carvalho Chehab /* I2C Bus 1 */
426b285192aSMauro Carvalho Chehab #define I2C1_ADDR	0x00180000
427b285192aSMauro Carvalho Chehab #define I2C1_WDATA	0x00180004
428b285192aSMauro Carvalho Chehab #define I2C1_CTRL	0x00180008
429b285192aSMauro Carvalho Chehab #define I2C1_RDATA	0x0018000C
430b285192aSMauro Carvalho Chehab #define I2C1_STAT	0x00180010
431b285192aSMauro Carvalho Chehab 
432b285192aSMauro Carvalho Chehab /* I2C Bus 2 */
433b285192aSMauro Carvalho Chehab #define I2C2_ADDR	0x00190000
434b285192aSMauro Carvalho Chehab #define I2C2_WDATA	0x00190004
435b285192aSMauro Carvalho Chehab #define I2C2_CTRL	0x00190008
436b285192aSMauro Carvalho Chehab #define I2C2_RDATA	0x0019000C
437b285192aSMauro Carvalho Chehab #define I2C2_STAT	0x00190010
438b285192aSMauro Carvalho Chehab 
439b285192aSMauro Carvalho Chehab /* I2C Bus 3 */
440b285192aSMauro Carvalho Chehab #define I2C3_ADDR	0x001A0000
441b285192aSMauro Carvalho Chehab #define I2C3_WDATA	0x001A0004
442b285192aSMauro Carvalho Chehab #define I2C3_CTRL	0x001A0008
443b285192aSMauro Carvalho Chehab #define I2C3_RDATA	0x001A000C
444b285192aSMauro Carvalho Chehab #define I2C3_STAT	0x001A0010
445b285192aSMauro Carvalho Chehab 
446b285192aSMauro Carvalho Chehab /* UART */
447b285192aSMauro Carvalho Chehab #define UART_CTL	0x001B0000
448b285192aSMauro Carvalho Chehab #define UART_BRD	0x001B0004
449b285192aSMauro Carvalho Chehab #define UART_ISR	0x001B000C
450b285192aSMauro Carvalho Chehab #define UART_CNT	0x001B0010
451b285192aSMauro Carvalho Chehab 
452b285192aSMauro Carvalho Chehab #endif /* _CX23885_REG_H_ */
453