icureg.h revision 1.3 1 /* $NetBSD: icureg.h,v 1.3 2001/04/16 09:55:56 sato Exp $ */
2
3 /*-
4 * Copyright (c) 1999 Shin Takemura. All rights reserved.
5 * Copyright (c) 1999-2001 SATO Kazumi. All rights reserved.
6 * Copyright (c) 1999 PocketBSD Project. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the PocketBSD project
19 * and its contributors.
20 * 4. Neither the name of the project nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 */
37
38 /*
39 * ICU (Interrupt Control UNIT) Registers definitions
40 * start 0x0B000080 (vr4102/4111/4121)
41 * start 0x0F000080 (vr4122)
42 */
43 #define SYSINT1_REG_W 0x000 /* Level1 System intr reg 1 */
44 #define MSYSINT1_REG_W 0x00c /* Level1 Mask System intr reg 1 */
45
46 #define SYSINT1_INT15 (1<<15)
47 #define SYSINT1_INT14 (1<<14)
48 #define SYSINT1_INT13 (1<<13)
49 #define SYSINT1_DOZEPIU (1<<13) /* PIU intr during Suspend */
50 #define SYSINT1_INT12 (1<<12)
51 #define SYSINT1_CLKRUN (1<<12) /* CLKRUN intr (=vr4122) */
52 #define SYSINT1_INT11 (1<<11)
53 #define SYSINT1_SOFT (1<<11) /* Software intr */
54 #define SYSINT1_INT10 (1<<10)
55 #define SYSINT1_WRBERR (1<<10) /* Bus error intr (4102 <=,<= 4121)*/
56 #define SYSINT1_INT9 (1<<9)
57 #define SYSINT1_SIU (1<<9) /* SIU intr */
58 #define SYSINT1_INT8 (1<<8)
59 #define SYSINT1_GIU (1<<8) /* GIU intr */
60 #define SYSINT1_INT7 (1<<7)
61 #define SYSINT1_KIU (1<<7) /* KIU intr (4102 <=,<= 4121)*/
62 #define SYSINT1_INT6 (1<<6)
63 #define SYSINT1_AIU (1<<6) /* AIU intr (4102 <=,<= 4121)*/
64 #define SYSINT1_INT5 (1<<5)
65 #define SYSINT1_PIU (1<<5) /* PIU intr (4102 <=,<= 4121)*/
66 #define SYSINT1_INT4 (1<<4)
67 #define SYSINT1_INT3 (1<<3)
68 #define SYSINT1_ETIMER (1<<3) /* ETIMER intr */
69 #define SYSINT1_INT2 (1<<2)
70 #define SYSINT1_RTCL1 (1<<2) /* RTClong1 intr */
71 #define SYSINT1_INT1 (1<<1)
72 #define SYSINT1_POWER (1<<1) /* PowerSW intr */
73 #define SYSINT1_INT0 (1<<0)
74 #define SYSINT1_BAT (1<<0) /* Battery intr */
75
76
77 #define ICUPIUINT_REG_W 0x002 /* Level2 PIU intr reg */
78 #define MPIUINT_REG_W 0x00e /* Level2 Mask PIU intr reg */
79
80 #define PIUINT_PADCMD (1<<6) /* PIU command scan intr */
81 #define PIUINT_PADADP (1<<5) /* PIU AD port scan intr */
82 #define PIUINT_PADPAGE1 (1<<4) /* PIU data page 1 intr */
83 #define PIUINT_PADPAGE0 (1<<3) /* PIU data page 0 intr */
84 #define PIUINT_PADLOST (1<<2) /* A/D data timeout intr */
85 #define PIUINT_PENCHG (1) /* Touch Panel contact intr */
86
87 #define AIUINT_REG_W 0x004 /* Level2 AIU intr reg */
88 #define MAIUINT_REG_W 0x010 /* Level2 Mask AIU intr reg */
89
90 #define AIUINT_INTMEND (1<<11) /* Audio input DMA buffer 2 page */
91 #define AIUINT_INTM (1<<10) /* Audio input DMA buffer 1 page */
92 #define AIUINT_INTMIDLE (1<<9) /* Audio input idle intr */
93 #define AIUINT_INTMST (1<<8) /* Audio input receive completion intr */
94 #define AIUINT_INTSEND (1<<3) /* Audio output buffer 2 page */
95 #define AIUINT_INTS (1<<2) /* Audio output buffer 1 page */
96 #define AIUINT_INTSIDLE (1<<1) /* Audio output idle intr */
97
98
99 #define KIUINT_REG_W 0x006 /* Level2 KIU intr reg */
100 #define MKIUINT_REG_W 0x012 /* Level2 Mask KIU intr reg */
101
102 #define KIUINT_KDATLOST (1<<2) /* Key scan data lost */
103 #define KIUINT_KDATRDY (1<<1) /* Key scan data complete */
104 #define KIUINT_SCANINT (1) /* Key input detect intr */
105
106
107 #define GIUINT_L_REG_W 0x008 /* Level2 GIU intr reg Low */
108 #define MGIUINT_L_REG_W 0x014 /* Level2 Mask GIU intr reg Low */
109
110 #define GIUINT_GPIO15 (1<<15) /* GPIO 15 */
111 #define GIUINT_GPIO14 (1<<14) /* GPIO 14 */
112 #define GIUINT_GPIO13 (1<<13) /* GPIO 13 */
113 #define GIUINT_GPIO12 (1<<12) /* GPIO 12 */
114 #define GIUINT_GPIO11 (1<<11) /* GPIO 11 */
115 #define GIUINT_GPIO10 (1<<10) /* GPIO 10 */
116 #define GIUINT_GPIO9 (1<<9) /* GPIO 9 */
117 #define GIUINT_GPIO8 (1<<8) /* GPIO 8 */
118 #define GIUINT_GPIO7 (1<<7) /* GPIO 7 */
119 #define GIUINT_GPIO6 (1<<6) /* GPIO 6 */
120 #define GIUINT_GPIO5 (1<<5) /* GPIO 5 */
121 #define GIUINT_GPIO4 (1<<4) /* GPIO 4 */
122 #define GIUINT_GPIO3 (1<<3) /* GPIO 3 */
123 #define GIUINT_GPIO2 (1<<2) /* GPIO 2 */
124 #define GIUINT_GPIO1 (1<<1) /* GPIO 1 */
125 #define GIUINT_GPIO0 (1) /* GPIO 0 */
126
127
128 #define DSIUINT_REG_W 0x00a /* Level2 DSIU intr reg */
129 #define MDSIUINT_REG_W 0x016 /* Level2 Mask DSIU intr reg */
130
131 #define DSIUINT_DCTS (1<<11) /* DCTS# change */
132 #define DSIUINT_SER0 (1<<10) /* Debug serial receive error */
133 #define DSIUINT_SR0 (1<<9) /* Debug serial receive */
134 #define DSIUINT_ST0 (1<<8) /* Debug serial transmit */
135
136 #define NMI_REG_W 0x018 /* NMI reg */
137
138 #define LOWBATT_NMIORINT (1) /* Low battery type */
139 #define LOWBATT_INT0 (1) /* Low battery int 0 */
140 #define LOWBATT_NMI (0) /* Low battery NMI */
141
142
143 #define SOFTINT_REG_W 0x01a /* Software intr reg */
144
145 #define SOFTINT_MASK3 (1<<3) /* Softint3 mask */
146 #define SOFTINT_SET3 (1<<3) /* Softint3 set */
147 #define SOFTINT_CLEAR3 (0<<3) /* Softint3 clear */
148
149 #define SOFTINT_MASK2 (1<<2) /* Softint2 mask */
150 #define SOFTINT_SET2 (1<<2) /* Softint2 set */
151 #define SOFTINT_CLEAR2 (0<<2) /* Softint2 clear */
152
153 #define SOFTINT_MASK1 (1<<1) /* Softint1 mask */
154 #define SOFTINT_SET1 (1<<1) /* Softint1 set */
155 #define SOFTINT_CLEAR1 (0<<1) /* Softint1 clear */
156
157 #define SOFTINT_MASK0 (1) /* Softint0 mask */
158 #define SOFTINT_SET0 (1) /* Softint0 set */
159 #define SOFTINT_CLEAR0 (0) /* Softint0 clear */
160
161
162 #define SYSINT2_REG_W 0x180 /* Level1 System intr reg 2 */
163 #define MSYSINT2_REG_W 0x186 /* Level1 Mask System intr reg 2 */
164 #define VR4102_SYSINT2_REG_W 0x180 /* Level1 System intr reg 2 */
165 #define VR4102_MSYSINT2_REG_W 0x186 /* Level1 Mask System intr reg 2 */
166 #define VR4122_SYSINT2_REG_W 0x020 /* Level1 System intr reg 2 */
167 #define VR4122_MSYSINT2_REG_W 0x026 /* Level1 Mask System intr reg 2 */
168
169 #define SYSINT2_INT31 (1<<15)
170 #define SYSINT2_INT30 (1<<14)
171 #define SYSINT2_INT29 (1<<13)
172 #define SYSINT2_INT28 (1<<12)
173 #define SYSINT2_INT27 (1<<11)
174 #define SYSINT2_INT26 (1<<10)
175 #define SYSINT2_INT25 (1<<9)
176 #define SYSINT2_BCU (1<<9) /* BCU intr (=vr4122) */
177 #define SYSINT2_INT24 (1<<8)
178 #define SYSINT2_CSI (1<<8) /* CSI intr (=vr4122) */
179 #define SYSINT2_INT23 (1<<7)
180 #define SYSINT2_SCU (1<<7) /* SCU intr (=vr4122) */
181 #define SYSINT2_INT22 (1<<6)
182 #define SYSINT2_PCI (1<<6) /* PCI intr (=vr4122) */
183 #define SYSINT2_DSIU (1<<5) /* DSUI intr */
184 #define SYSINT2_FIR (1<<4) /* FIR intr */
185 #define SYSINT2_TCLK (1<<3) /* TClock Counter intr */
186 #define SYSINT2_HSP (1<<2) /* HSP intr (4122>=4102)*/
187 #define SYSINT2_LED (1<<1) /* LED intr */
188 #define SYSINT2_RTCL2 (1<<0) /* RTCLong2 intr */
189
190
191 #define GIUINT_H_REG_W 0x182 /* Level2 GIU intr reg High */
192 #define MGIUINT_H_REG_W 0x188 /* Level2 Mask GIU intr reg High */
193 #define VR4102_GIUINT_H_REG_W 0x182 /* Level2 GIU intr reg High */
194 #define VR4102_MGIUINT_H_REG_W 0x188 /* Level2 Mask GIU intr reg High */
195 #define VR4122_GIUINT_H_REG_W 0x022 /* Level2 GIU intr reg High */
196 #define VR4122_MGIUINT_H_REG_W 0x028 /* Level2 Mask GIU intr reg High */
197
198 #define GIUINT_GPIO31 (1<<15) /* GPIO 31 */
199 #define GIUINT_GPIO30 (1<<14) /* GPIO 30 */
200 #define GIUINT_GPIO29 (1<<13) /* GPIO 29 */
201 #define GIUINT_GPIO28 (1<<12) /* GPIO 28 */
202 #define GIUINT_GPIO27 (1<<11) /* GPIO 27 */
203 #define GIUINT_GPIO26 (1<<10) /* GPIO 26 */
204 #define GIUINT_GPIO25 (1<<9) /* GPIO 25 */
205 #define GIUINT_GPIO24 (1<<8) /* GPIO 24 */
206 #define GIUINT_GPIO23 (1<<7) /* GPIO 23 */
207 #define GIUINT_GPIO22 (1<<6) /* GPIO 22 */
208 #define GIUINT_GPIO21 (1<<5) /* GPIO 21 */
209 #define GIUINT_GPIO20 (1<<4) /* GPIO 20 */
210 #define GIUINT_GPIO19 (1<<3) /* GPIO 19 */
211 #define GIUINT_GPIO18 (1<<2) /* GPIO 18 */
212 #define GIUINT_GPIO17 (1<<1) /* GPIO 17 */
213 #define GIUINT_GPIO16 (1) /* GPIO 16 */
214
215
216 #define FIRINT_REG_W 0x184 /* Level2 FIR intr reg */
217 #define MFIRINT_REG_W 0x18a /* Level2 Mask FIR intr reg */
218 #define VR4102_FIRINT_REG_W 0x184 /* Level2 FIR intr reg */
219 #define VR4102_MFIRINT_REG_W 0x18a /* Level2 Mask FIR intr reg */
220 #define VR4122_FIRINT_REG_W 0x024 /* Level2 FIR intr reg */
221 #define VR4122_MFIRINT_REG_W 0x02a /* Level2 Mask FIR intr reg */
222
223 #define FIRINT_FIR (1<<4) /* FIR intr */
224 #define FIRINT_RECV2 (1<<3) /* FIR DMA buf recv buffer2 */
225 #define FIRINT_TRNS2 (1<<2) /* FIR DMA buf transmit buffer2 */
226 #define FIRINT_RECV1 (1<<1) /* FIR DMA buf recv buffer1 */
227 #define FIRINT_TRNS1 (1) /* FIR DMA buf transmit buffer1 */
228
229 #define PCIINT_REG_W 0x2c /* Level2 PCI intr reg */
230 #define MPCIINT_REG_W 0x32 /* Level2 PCI intr mask */
231 #define VR4122_PCIINT_REG_W 0x2c /* Level2 PCI intr reg */
232 #define VR4122_MPCIINT_REG_W 0x32 /* Level2 PCI intr mask */
233 #define PCIINT_INT0 (1) /* PCI INT 0 */
234
235 #define SCUINT_REG_W 0x2e /* Level2 SCU intr reg */
236 #define MSCUINT_REG_W 0x34 /* Level2 SCU intr mask */
237 #define VR4122_SCUINT_REG_W 0x2e /* Level2 SCU intr reg */
238 #define VR4122_MSCUINT_REG_W 0x34 /* Level2 SCU intr mask */
239 #define SCUINT_INT0 (1) /* SCU INT 0 */
240
241 #define CSIINT_REG_W 0x30 /* Level2 CSI intr reg */
242 #define MCSIINT_REG_W 0x36 /* Level2 CSI intr mask */
243 #define VR4122_CSIINT_REG_W 0x30 /* Level2 CSI intr reg */
244 #define VR4122_MCSIINT_REG_W 0x36 /* Level2 CSI intr mask */
245 #define CSIINT_TRPAGE2 (1<<6) /* DMA send page 2 intr */
246 #define CSIINT_TRPAGE1 (1<<5) /* DMA send page 1 intr */
247 #define CSIINT_TREND (1<<4) /* send every data intr */
248 #define CSIINT_TREMPTY (1<<3) /* send FIFO empty intr */
249 #define CSIINT_RCPAGE2 (1<<2) /* DMA recv page 2 intr */
250 #define CSIINT_RCPAGE1 (1<<1) /* DMA recv page 1 intr */
251 #define CSIINT_RCOVER (1) /* recv FIFO overrun intr */
252
253 #define BCUINT_REG_W 0x38 /* Level2 BCU intr reg */
254 #define MBCUINT_REG_W 0x3a /* Level2 BCU intr mask */
255 #define VR4122_BCUINT_REG_W 0x38 /* Level2 BCU intr reg */
256 #define VR4122_MBCUINT_REG_W 0x3a /* Level2 BCU intr mask */
257 #define BCUINT_INT (1) /* BCU INT */
258
259 /* END icureg.h */
260