1 #ifndef CYGONCE_HAL_TRITON_H
2 #define CYGONCE_HAL_TRITON_H
4 /*=============================================================================
8 // HAL Description of PXA250PXA255 control registers
9 // and ARM memory control in general.
11 //#####ECOSGPLCOPYRIGHTBEGIN####
12 //## -------------------------------------------
13 //## This file is part of eCos, the Embedded Configurable Operating System.
14 //## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
16 //## eCos is free software; you can redistribute it and/or modify it under
17 //## the terms of the GNU General Public License as published by the Free
18 //## Software Foundation; either version 2 or (at your option) any later version.
20 //## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21 //## WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 //## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 //## for more details.
25 //## You should have received a copy of the GNU General Public License along
26 //## with eCos; if not, write to the Free Software Foundation, Inc.,
27 //## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29 //## As a special exception, if other files instantiate templates or use macros
30 //## or inline functions from this file, or you compile this file and link it
31 //## with other works to produce a work based on this file, this file does not
32 //## by itself cause the resulting work to be covered by the GNU General Public
33 //## License. However the source code for this file must still be made available
34 //## in accordance with section (3) of the GNU General Public License.
36 //## This exception does not invalidate any other reasons why a work based on
37 //## this file might be covered by the GNU General Public License.
39 //## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40 //## at http://sources.redhat.com/ecos/ecos-license/
41 //## -------------------------------------------
42 //#####ECOSGPLCOPYRIGHTEND####
43 //=============================================================================
44 //#####DESCRIPTIONBEGIN####
46 // Author(s): usteinkohl
47 // Contributors: usteinkohl
48 // Date: 14th January 2003
49 // Purpose: Intel PXA250/PXA255 register and Ka-Ro TRITON hardware descriptions
51 // Usage: #include <cyg/hal/hal_triton.h>
53 //####DESCRIPTIONEND####
55 //===========================================================================*/
61 #include <pkgconf/system.h> // System-wide configuration info
63 #define BOOT_ROM 0x00000000 /* Boot ROM (Flash) */
64 #define SDRAM_B0 0xA0000000 /* 64 MByte of SDRAM Bank 0 */
66 #define BOOTFLASHSIZE 0x2000000 /* BOOT FLASH - 32 Mbytes */
67 #define SDRAMBANK0SIZE 0x2000000 /* SDRAM bank 0 - 32 Mbytes */
69 /* On-Board Ethernet (physical addrs) */
70 #if (TRITON_STK==2) /* use onboard ethernet controller */
71 #define SMC91C111_ETH_IOBASE 0x04000300 /* I/O base */
72 #define IRQ_GPIO_ETH CYGNUM_HAL_INTERRUPT_GPIO4
74 #define SMC91C111_ETH_IOBASE 0x21800000 /* I/O base */
75 #define IRQ_GPIO_ETH CYGNUM_HAL_INTERRUPT_GPIO0
77 #error: unknown starter kit type
80 #define I2C_PCF8574_DEVADR (0x40)
82 #define CS8900A_ETH_IOBASE 0x04000300 /* I/O base */
83 #define IRQ_GPIO_CS8900A CYGNUM_HAL_INTERRUPT_GPIO4
86 typedef struct pin_i2c_t_tag {
91 #define __REG(x) ((volatile unsigned long *)(x))
93 // i2c function prototypes
95 cyg_int32 write_i2c_pcf8574(cyg_uint8 device_adr, cyg_uint8 dat_value);
96 cyg_int32 read_i2c_pcf8574(cyg_uint8 device_adr);
98 void init_i2c_pp(void); /* init i2c par. port */
100 void triton_program_new_stack(void *func);
102 void pin_i2c_setup(pin_i2c_t *pin_data);
103 void bus_out(pin_i2c_t *pin_data, unsigned char pdata);
104 int bus_in(pin_i2c_t *pin_data);
105 void i2c_start(pin_i2c_t *pin_data);
106 void i2c_stop(pin_i2c_t *pin_data);
107 int i2c_read_ack(pin_i2c_t *pin_data);
108 void i2c_write_ack(pin_i2c_t *pin_data);
109 void i2c_write_nack(pin_i2c_t *pin_data);
110 void i2c_slave_addr(pin_i2c_t *pin_data, unsigned char dev, unsigned char mode);
111 void i2c_read(pin_i2c_t *pin_data, unsigned char *res);
112 void i2c_write(pin_i2c_t *pin_data, unsigned char val);
114 int se_read(pin_i2c_t *pin_data, unsigned char addr, unsigned char dev_address, unsigned int numb, char *dat);
115 int se_write(pin_i2c_t *pin_data, unsigned char addr,unsigned char dev_address, unsigned char val);
117 int ltc1663_write(pin_i2c_t *pin_data, unsigned char dev_address, unsigned char command, unsigned short val);
119 int set_alternate_function(unsigned char gpio_nr, unsigned char function_code);
120 int set_pin_dir(unsigned char pin_no, unsigned char io_code); /* 0=input 1=output */
121 int set_pin(unsigned char pin_no);
122 int get_pin_status(unsigned char pin_no);
123 int clear_pin(unsigned char pin_no);
124 int set_rising_edge(unsigned char pin_no, unsigned char io_code); /* 0= disable 1= enable */
125 int set_falling_edge(unsigned char pin_no, unsigned char io_code); /* 0= disable 1= enable */
126 int clear_edge(unsigned char pin_no);
127 int detect_edge(unsigned char pin_no);
129 void reset_cp_dac(void);
136 // Memory Controller 0x48000000
137 #define MDCNFG __REG(0x48000000) // SDRAM configuration register 0
138 #define MDREFR __REG(0x48000004) // SDRAM refresh control register
139 #define MSC0 __REG(0x48000008) // Static memory control register 0
140 #define MSC1 __REG(0x4800000C) // Static memory control register 1
141 #define MSC2 __REG(0x48000010) // Static memory control register 2
142 #define MECR __REG(0x48000014) // Expansion memory (PCMCIA / Compact Flash) bus configuration register
143 #define SXLCR __REG(0x48000018) // LCR value to be written to SDRAM-Timing Synchronous Flash
144 #define SXCNFG __REG(0x4800001C) // Synchronous static memory control register
145 #define FLYCNFG __REG(0x48000020) // Fly by DMA DVAL assert and deassert times
146 #define SXMRS __REG(0x48000024) // MRS value to be written to Synchronous Flash or SMROM
147 #define MCMEM0 __REG(0x48000028) // Card interface Common Memory Space Socket 0 Timing Configuration
148 #define MCMEM1 __REG(0x4800002C) // Card interface Common Memory Space Socket 1 Timing Configuration
149 #define MCATT0 __REG(0x48000030) // Card interface Attribute Space Socket 0 Timing Configuration
150 #define MCATT1 __REG(0x48000034) // Card interface Attribute Space Socket 1 Timing Configuration
151 #define MCIO0 __REG(0x48000038) // Card interface I/O Space Socket 0 Timing Configuration
152 #define MCIO1 __REG(0x4800003C) // Card interface I/O Space Socket 1 Timing Configuration
153 #define MDMRS __REG(0x48000040) // MRS value to be written to SDRAM
154 #define MDMRSLP __REG(0x48000058) // extended MRS value to be written to SDRAM
156 #define BOOTDEF __REG(0x48000044) // Read-Only Boot-time register. Contains BOOT_SEL and PKG_SEL values.
157 // LCD Controller 0x44000000
158 #define LCCR0 __REG(0x44000000) // LCD controller control register 0
159 #define LCCR1 __REG(0x44000004) // LCD controller control register 1
160 #define LCCR2 __REG(0x44000008) // LCD controller control register 2
161 #define LCCR3 __REG(0x4400000C) // LCD controller control register 3
162 #define FDADR0 __REG(0x44000200) // DMA channel 0 frame descriptor address register
163 #define FSADR0 __REG(0x44000204) // DMA channel 0 frame source address register
164 #define FIDR0 __REG(0x44000208) // DMA channel 0 frame ID register
165 #define LDCMD0 __REG(0x4400020C) // DMA channel 0 command register
166 #define FDADR1 __REG(0x44000210) // DMA channel 1 frame descriptor address register
167 #define FSADR1 __REG(0x44000214) // DMA channel 1 frame source address register
168 #define FIDR1 __REG(0x44000218) // DMA channel 1 frame ID register
169 #define LDCMD1 __REG(0x4400021C) // DMA channel 1 command register
170 #define FBR0 __REG(0x44000020) // DMA channel 0 frame branch register
171 #define FBR1 __REG(0x44000024) // DMA channel 1 frame branch register
172 #define LCSR __REG(0x44000038) // LCD controller status register
173 #define LIIDR __REG(0x4400003C) // LCD controller interrupt ID register
174 #define TRGBR __REG(0x44000040) // TMED RGB Seed Register
175 #define TCR __REG(0x44000044) // TMED Control Register
176 // DMA Controller 0x40000000
177 #define DCSR0 __REG(0x40000000) // DMA Control / Status Register for Channel 0
178 #define DCSR1 __REG(0x40000004) // DMA Control / Status Register for Channel 1
179 #define DCSR2 __REG(0x40000008) // DMA Control / Status Register for Channel 2
180 #define DCSR3 __REG(0x4000000c) // DMA Control / Status Register for Channel 3
181 #define DCSR4 __REG(0x40000010) // DMA Control / Status Register for Channel 4
182 #define DCSR5 __REG(0x40000014) // DMA Control / Status Register for Channel 5
183 #define DCSR6 __REG(0x40000018) // DMA Control / Status Register for Channel 6
184 #define DCSR7 __REG(0x4000001c) // DMA Control / Status Register for Channel 7
185 #define DCSR8 __REG(0x40000020) // DMA Control / Status Register for Channel 8
186 #define DCSR9 __REG(0x40000024) // DMA Control / Status Register for Channel 9
187 #define DCSR10 __REG(0x40000028) // DMA Control / Status Register for Channel 10
188 #define DCSR11 __REG(0x4000002c) // DMA Control / Status Register for Channel 11
189 #define DCSR12 __REG(0x40000030) // DMA Control / Status Register for Channel 12
190 #define DCSR13 __REG(0x40000034) // DMA Control / Status Register for Channel 13
191 #define DCSR14 __REG(0x40000038) // DMA Control / Status Register for Channel 14
192 #define DCSR15 __REG(0x4000003c) // DMA Control / Status Register for Channel 15
193 #define DINT __REG(0x400000f0) // DMA Interrupt Register
194 #define DRCMR0 __REG(0x40000100) // Request to Channel Map Register for DREQ 0 (companion chip request 0)
195 #define DRCMR1 __REG(0x40000104) // Request to Channel Map Register for DREQ 1 (companion chip request 1)
196 #define DRCMR2 __REG(0x40000108) // Request to Channel Map Register for I2S receive Request
197 #define DRCMR3 __REG(0x4000010c) // Request to Channel Map Register for I2S transmit Request
198 #define DRCMR4 __REG(0x40000110) // Request to Channel Map Register for BTUART receive Request
199 #define DRCMR5 __REG(0x40000114) // Request to Channel Map Register for BTUART transmit Request.
200 #define DRCMR6 __REG(0x40000118) // Request to Channel Map Register for FFUART receive Request
201 #define DRCMR7 __REG(0x4000011c) // Request to Channel Map Register for FFUART transmit Request
202 #define DRCMR8 __REG(0x40000120) // Request to Channel Map Register for AC97 microphone Request
203 #define DRCMR9 __REG(0x40000124) // Request to Channel Map Register for AC97 modem receive Request
204 #define DRCMR10 __REG(0x40000128) // Request to Channel Map Register for AC97 modem transmit Request
205 #define DRCMR11 __REG(0x4000012c) // Request to Channel Map Register for AC97 audio receive Request
206 #define DRCMR12 __REG(0x40000130) // Request to Channel Map Register for AC97 audio transmit Request
207 #define DRCMR13 __REG(0x40000134) // Request to Channel Map Register for SSP receive Request
208 #define DRCMR14 __REG(0x40000138) // Request to Channel Map Register for SSP transmit Request
209 #define DRCMR15 __REG(0x4000013c) // Reserved
210 #define DRCMR16 __REG(0x40000140) // Reserved
211 #define DRCMR17 __REG(0x40000144) // Request to Channel Map Register for ICP receive Request
212 #define DRCMR18 __REG(0x40000148) // Request to Channel Map Register for ICP transmit Request
213 #define DRCMR19 __REG(0x4000014c) // Request to Channel Map Register for STUART receive Request
214 #define DRCMR20 __REG(0x40000150) // Request to Channel Map Register for STUART transmit Request
215 #define DRCMR21 __REG(0x40000154) // Request to Channel Map Register for MMC receive Request
216 #define DRCMR22 __REG(0x40000158) // Request to Channel Map Register for MMC transmit Request
217 #define DRCMR23 __REG(0x4000015c) // RESERVED
218 #define DRCMR24 __REG(0x40000160) // RESERVED
219 #define DRCMR25 __REG(0x40000164) // Request to Channel Map Register for USB endpoint 1 Request
220 #define DRCMR26 __REG(0x40000168) // Request to Channel Map Register for USB endpoint 2 Request
221 #define DRCMR27 __REG(0x4000016C) // Request to Channel Map Register for USB endpoint 3 Request
222 #define DRCMR28 __REG(0x40000170) // Request to Channel Map Register for USB endpoint 4 Request
223 #define DRCMR29 __REG(0x40000174) // RESERVED
224 #define DRCMR30 __REG(0x40000178) // Request to Channel Map Register for USB endpoint 6 Request
225 #define DRCMR31 __REG(0x4000017C) // Request to Channel Map Register for USB endpoint 7 Request
226 #define DRCMR32 __REG(0x40000180) // Request to Channel Map Register for USB endpoint 8 Request
227 #define DRCMR33 __REG(0x40000184) // Request to Channel Map Register for USB endpoint 9 Request
228 #define DRCMR34 __REG(0x40000188) // RESERVED
229 #define DRCMR35 __REG(0x4000018C) // Request to Channel Map Register for USB endpoint 11 Request
230 #define DRCMR36 __REG(0x40000190) // Request to Channel Map Register for USB endpoint 12 Request
231 #define DRCMR37 __REG(0x40000194) // Request to Channel Map Register for USB endpoint 13 Request
232 #define DRCMR38 __REG(0x40000198) // Request to Channel Map Register for USB endpoint 14 Request
233 #define DRCMR39 __REG(0x4000019C) // RESERVED
234 #define DDADR0 __REG(0x40000200) // DMA Descriptor Address Register channel 0
235 #define DSADR0 __REG(0x40000204) // DMA Source Address Register channel 0
236 #define DTADR0 __REG(0x40000208) // DMA Target Address Register channel 0
237 #define DCMD0 __REG(0x4000020C) // DMA Command Address Register channel 0
238 #define DDADR1 __REG(0x40000210) // DMA Descriptor Address Register channel 1
239 #define DSADR1 __REG(0x40000214) // DMA Source Address Register channel 1
240 #define DTADR1 __REG(0x40000218) // DMA Target Address Register channel 1
241 #define DCMD1 __REG(0x4000021C) // DMA Command Address Register channel 1
242 #define DDADR2 __REG(0x40000220) // DMA Descriptor Address Register channel 2
243 #define DSADR2 __REG(0x40000224) // DMA Source Address Register channel 2
244 #define DTADR2 __REG(0x40000228) // DMA Target Address Register channel 2
245 #define DCMD2 __REG(0x4000022C) // DMA Command Address Register channel 2
246 #define DDADR3 __REG(0x40000230) // DMA Descriptor Address Register channel 3
247 #define DSADR3 __REG(0x40000234) // DMA Source Address Register channel 3
248 #define DTADR3 __REG(0x40000238) // DMA Target Address Register channel 3
249 #define DCMD3 __REG(0x4000023C) // DMA Command Address Register channel 3
250 #define DDADR4 __REG(0x40000240) // DMA Descriptor Address Register channel 4
251 #define DSADR4 __REG(0x40000244) // DMA Source Address Register channel 4
252 #define DTADR4 __REG(0x40000248) // DMA Target Address Register channel 4
253 #define DCMD4 __REG(0x4000024C) // DMA Command Address Register channel 4
254 #define DDADR5 __REG(0x40000250) // DMA Descriptor Address Register channel 5
255 #define DSADR5 __REG(0x40000254) // DMA Source Address Register channel 5
256 #define DTADR5 __REG(0x40000258) // DMA Target Address Register channel 5
257 #define DCMD5 __REG(0x4000025C) // DMA Command Address Register channel 5
258 #define DDADR6 __REG(0x40000260) // DMA Descriptor Address Register channel 6
259 #define DSADR6 __REG(0x40000264) // DMA Source Address Register channel 6
260 #define DTADR6 __REG(0x40000268) // DMA Target Address Register channel 6
261 #define DCMD6 __REG(0x4000026C) // DMA Command Address Register channel 6
262 #define DDADR7 __REG(0x40000270) // DMA Descriptor Address Register channel 7
263 #define DSADR7 __REG(0x40000274) // DMA Source Address Register channel 7
264 #define DTADR7 __REG(0x40000278) // DMA Target Address Register channel 7
265 #define DCMD7 __REG(0x4000027C) // DMA Command Address Register channel 7
266 #define DDADR8 __REG(0x40000280) // DMA Descriptor Address Register channel 8
267 #define DSADR8 __REG(0x40000284) // DMA Source Address Register channel 8
268 #define DTADR8 __REG(0x40000288) // DMA Target Address Register channel 8
269 #define DCMD8 __REG(0x4000028C) // DMA Command Address Register channel 8
270 #define DDADR9 __REG(0x40000290) // DMA Descriptor Address Register channel 9
271 #define DSADR9 __REG(0x40000294) // DMA Source Address Register channel 9
272 #define DTADR9 __REG(0x40000298) // DMA Target Address Register channel 9
273 #define DCMD9 __REG(0x4000029C) // DMA Command Address Register channel 9
274 #define DDADR10 __REG(0x400002a0) // DMA Descriptor Address Register channel 10
275 #define DSADR10 __REG(0x400002a4) // DMA Source Address Register channel 10
276 #define DTADR10 __REG(0x400002a8) // DMA Target Address Register channel 10
277 #define DCMD10 __REG(0x400002aC) // DMA Command Address Register channel 10
278 #define DDADR11 __REG(0x400002b0) // DMA Descriptor Address Register channel 11
279 #define DSADR11 __REG(0x400002b4) // DMA Source Address Register channel 11
280 #define DTADR11 __REG(0x400002b8) // DMA Target Address Register channel 11
281 #define DCMD11 __REG(0x400002bC) // DMA Command Address Register channel 11
282 #define DDADR12 __REG(0x400002c0) // DMA Descriptor Address Register channel 12
283 #define DSADR12 __REG(0x400002c4) // DMA Source Address Register channel 12
284 #define DTADR12 __REG(0x400002c8) // DMA Target Address Register channel 12
285 #define DCMD12 __REG(0x400002cC) // DMA Command Address Register channel 12
286 #define DDADR13 __REG(0x400002d0) // DMA Descriptor Address Register channel 13
287 #define DSADR13 __REG(0x400002d4) // DMA Source Address Register channel 13
288 #define DTADR13 __REG(0x400002d8) // DMA Target Address Register channel 13
289 #define DCMD13 __REG(0x400002dC) // DMA Command Address Register channel 13
290 #define DDADR14 __REG(0x400002e0) // DMA Descriptor Address Register channel 14
291 #define DSADR14 __REG(0x400002e4) // DMA Source Address Register channel 14
292 #define DTADR14 __REG(0x400002e8) // DMA Target Address Register channel 14
293 #define DCMD14 __REG(0x400002eC) // DMA Command Address Register channel 14
294 #define DDADR15 __REG(0x400002f0) // DMA Descriptor Address Register channel 15
295 #define DSADR15 __REG(0x400002f4) // DMA Source Address Register channel 15
296 #define DTADR15 __REG(0x400002f8) // DMA Target Address Register channel 15
297 #define DCMD15 __REG(0x400002fC) // DMA Command Address Register channel 15
298 // Full Function UART
299 #define FFRBR __REG(0x40100000) // Receive Buffer Register (read only)
300 #define FFTHR __REG(0x40100000) // Transmit Holding Register (write only)
301 #define FFIER __REG(0x40100004) // Interrupt Enable Register (read/write)
302 #define FFIIR __REG(0x40100008) // Interrupt ID Register (read only)
303 #define FFFCR __REG(0x40100008) // FIFO Control Register (write only)
304 #define FFLCR __REG(0x4010000C) // Line Control Register (read/write)
305 #define FFMCR __REG(0x40100010) // Modem Control Register (read/write)
306 #define FFLSR __REG(0x40100014) // Line Status Register (read only)
307 #define FFMSR __REG(0x40100018) // Modem Status Register (read only)
308 #define FFSPR __REG(0x4010001C) // Scratch Pad Register (read/write)
309 #define FFDLL __REG(0x40100000) // baud divisor lower byte (read/write)
310 #define FFDLH __REG(0x40100004) // baud divisor higher byte (read/write)
311 #define FFISR __REG(0x40100020) // slow Infrared Select Register (read/write)
313 #define BTRBR __REG(0x40200000) // Receive Buffer Register (read only)
314 #define BTTHR __REG(0x40200000) // Transmit Holding Register (write only)
315 #define BTIER __REG(0x40200004) // Interrupt Enable Register (read/write)
316 #define BTIIR __REG(0x40200008) // Interrupt ID Register (read only)
317 #define BTFCR __REG(0x40200008) // FIFO Control Register (write only)
318 #define BTLCR __REG(0x4020000C) // Line Control Register (read/write)
319 #define BTMCR __REG(0x40200010) // Modem Control Register (read/write)
320 #define BTLSR __REG(0x40200014) // Line Status Register (read only)
321 #define BTMSR __REG(0x40200018) // Modem Status Register (read only)
322 #define BTSPR __REG(0x4020001C) // Scratch Pad Register (read/write)
323 #define BTDLL __REG(0x40200000) // baud divisor lower byte (read/write)
324 #define BTDLH __REG(0x40200004) // baud divisor higher byte (read/write)
325 #define BTISR __REG(0x40200020) // slow Infrared Select Register (read/write)
327 #define STRBR __REG(0x40700000) // Receive Buffer Register (read only)
328 #define STTHR __REG(0x40700000) // Transmit Holding Register (write only)
329 #define STIER __REG(0x40700004) // Interrupt Enable Register (read/write)
330 #define STIIR __REG(0x40700008) // Interrupt ID Register (read only)
331 #define STFCR __REG(0x40700008) // FIFO Control Register (write only)
332 #define STLCR __REG(0x4070000C) // Line Control Register (read/write)
333 #define STMCR __REG(0x40700010) // Modem Control Register (read/write)
334 #define STLSR __REG(0x40700014) // Line Status Register (read only)
335 #define STMSR __REG(0x40700018) // Reserved
336 #define STSPR __REG(0x4070001C) // Scratch Pad Register (read/write)
337 #define STDLL __REG(0x40700000) // baud divisor lower byte (read/write)
338 #define STDLH __REG(0x40700004) // baud divisor higher byte (read/write)
339 #define STISR __REG(0x40700020) // slow Infrared Select Register (read/write)
341 #define IBMR __REG(0x40301680) // I2C Bus Monitor Register - IBMR
342 #define IDBR __REG(0x40301688) // I2C Data Buffer Register - IDBR
343 #define ICR __REG(0x40301690) // I2C Control Register - ICR
344 #define ISR __REG(0x40301698) // I2C Status Register - ISR
345 #define ISAR __REG(0x403016A0) // I2C Slave Address Register - ISAR
346 //#define ICCR __REG(0x403016A8) // I2C Clock Count Register - ICCR
348 #define SACR0 __REG(0x40400000) // Global Control Register
349 #define SACR1 __REG(0x40400004) // Serial Audio I2S/MSB-Justified Control Register
350 // - 0x4040-0008 ) // Reserved
351 #define SASR0 __REG(0x4040000C) // Serial Audio I2S/MSB-Justified Interface and FIFO Status Register
352 // - 0x4040-0010 ) // Reserved
353 #define SAIMR __REG(0x40400014) // Serial Audio Interrupt Mask Register
354 #define SAICR __REG(0x40400018) // Serial Audio Interrupt Clear Register
357 // Reserved 0x4040-0058 -
358 #define SAITR __REG(0x4040005C) // Serial Audio Interrupt Test Register
359 #define SADIV __REG(0x40400060) // "Audio clock divider register. See section Section 12.3,
\93Serial Audio Clocks and Sampling Frequencies
\94 on page 12-7."
360 // - 0x4040-0064 Reserved
362 // Reserved 0x4040-007C -
363 #define SADR __REG(0x40400080) // Serial Audio Data Register (TX and RX FIFO access register).
364 // - 0x4040-0084 to 0x404F-FFFF Reserved
366 #define POCR __REG(0x40500000) // PCM Out Control Register
367 #define PICR __REG(0x40500004) // PCM In Control Register
368 #define MCCR __REG(0x40500008) // Mic In Control Register
369 #define GCR __REG(0x4050000C) // Global Control Register
370 #define POSR __REG(0x40500010) // PCM Out Status Register
371 #define PISR __REG(0x40500014) // PCM In Status Register
372 #define MCSR __REG(0x40500018) // Mic In Status Register
373 #define GSR __REG(0x4050001C) // Global Status Register
374 #define CAR __REG(0x40500020) // CODEC Access Register
375 // - 0x4050-0024 through 0x4050-003C Reserved
376 #define PCDR __REG(0x40500040) // PCM FIFO Data Register
377 // - 0x4050-0044 through 0x4050-005C Reserved
378 #define MCDR __REG(0x40500060) // Mic-in FIFO Data Register
379 // - 0x4050-0064 through 0x4050-00FC Reserved
380 #define MOCR __REG(0x40500100) // MODEM Out Control Register
381 // - 0x4050-0104 Reserved
382 #define MICR __REG(0x40500108) // MODEM In Control Register
383 // - 0x4050-010C Reserved
384 #define MOSR __REG(0x40500110) // MODEM Out Status Register
385 // - 0x4050-0114 Reserved
386 #define MISR __REG(0x40500118) // MODEM In Status Register
387 // - 0x4050-011C through 0x4050-013C Reserved
388 #define MODR __REG(0x40500140) // MODEM FIFO Data Register
389 // - 0x4050-0144 through 0x4050-01FC Reserved
390 // __REG(0x4050-0200 through 0x4050-02FC)
391 // with all in increments of 0x00004 Primary Audio CODEC registers
392 // __REG(0x4050-0300 through 0x4050-03FC)
393 // with all in increments of 0x00004 Secondary Audio CODEC registers
395 // with all in increments of 0x0000-0004 Primary MODEM CODEC registers
397 // with all in increments of 0x00004 Secondary MODEM CODEC registers
399 #define UDCCR __REG(0x40600000) // UDC control register
400 #define UDCCS0 __REG(0x40600010) // UDC Endpoint 0 Control/Status Register
401 #define UDCCS1 __REG(0x40600014) // UDC Endpoint 1 (IN) Control/Status Register
402 #define UDCCS2 __REG(0x40600018) // UDC Endpoint 2 (OUT) Control/Status Register
403 #define UDCCS3 __REG(0x4060001C) // UDC Endpoint 3 (IN) Control/Status Register
404 #define UDCCS4 __REG(0x40600020) // UDC Endpoint 4 (OUT) Control/Status Register
405 #define UDCCS5 __REG(0x40600024) // UDC Endpoint 5 (Interrupt) Control/Status Register
406 #define UDCCS6 __REG(0x40600028) // UDC Endpoint 6 (IN) Control/Status Register
407 #define UDCCS7 __REG(0x4060002C) // UDC Endpoint 7 (OUT) Control/Status Register
408 #define UDCCS8 __REG(0x40600030) // UDC Endpoint 8 (IN) Control/Status Register
409 #define UDCCS9 __REG(0x40600034) // UDC Endpoint 9 (OUT) Control/Status Register
410 #define UDCCS10 __REG(0x40600038) // UDC Endpoint 10 (Interrupt) Control/Status Register
411 #define UDCCS11 __REG(0x4060003C) // UDC Endpoint 11 (IN) Control/Status Register
412 #define UDCCS12 __REG(0x40600040) // UDC Endpoint 12 (OUT) Control/Status Register
413 #define UDCCS13 __REG(0x40600044) // UDC Endpoint 13 (IN) Control/Status Register
414 #define UDCCS14 __REG(0x40600048) // UDC Endpoint 14 (OUT) Control/Status Register
415 #define UDCCS15 __REG(0x4060004C) // UDC Endpoint 15 (Interrupt) Control/Status Register
416 #define UFNRH __REG(0x40600060) // UDC Frame Number Register High
417 #define UFNRL __REG(0x40600064) // UDC Frame Number Register Low
418 #define UDDR0 __REG(0x40600080) // UDC Endpoint 0 Data Register
419 #define UDDR1 __REG(0x40600100) // UDC Endpoint 1 Data Register
420 #define UDDR2 __REG(0x406001C0) // UDC Endpoint 2 Data Register
421 #define UDDR3 __REG(0x40600200) // UDC Endpoint 3 Data Register
422 #define UDDR4 __REG(0x40600400) // UDC Endpoint 4 Data Register
423 #define UDDR5 __REG(0x406000A0) // UDC Endpoint 5 Data Register
424 #define UDDR6 __REG(0x40600600) // UDC Endpoint 6 Data Register
425 #define UDDR7 __REG(0x40600680) // UDC Endpoint 7 Data Register
426 #define UDDR8 __REG(0x40600700) // UDC Endpoint 8 Data Register
427 #define UDDR9 __REG(0x40600A00) // UDC Endpoint 9 Data Register
428 #define UDDR10 __REG(0x406000C0) // UDC Endpoint 10 Data Register
429 #define UDDR11 __REG(0x40600B00) // UDC Endpoint 11 Data Register
430 #define UDDR12 __REG(0x40600B80) // UDC Endpoint 12 Data Register
431 #define UDDR13 __REG(0x40600C00) // UDC Endpoint 13 Data Register
432 #define UDDR14 __REG(0x40600E00) // UDC Endpoint 14 Data Register
433 #define UDDR15 __REG(0x406000E0) // UDC Endpoint 15 Data Register
434 #define UICR0 __REG(0x40600050) // UDC Interrupt Control Register 0
435 #define UICR1 __REG(0x40600054) // UDC Interrupt Control Register 1
436 #define USIR0 __REG(0x40600058) // UDC Status Interrupt Register 0
437 #define USIR1 __REG(0x4060005C) // UDC Status Interrupt Register 1
439 #define ICCR0 __REG(0x40800000) // ICP control register 0
440 #define ICCR1 __REG(0x40800004) // ICP control register 1
441 #define ICCR2 __REG(0x40800008) // ICP control register 2
442 #define ICDR __REG(0x4080000C) // ICP data register
443 //
\97 0h 40800010 ) // Reserved
444 #define ICSR0 __REG(0x40800014) // ICP status register 0
445 #define ICSR1 __REG(0x40800018) // ICP status register 1
446 //
\97 0h 4080001C - 0h 4080 FFFF Reserved
448 #define RCNR __REG(0x40900000) //RTC count register
449 #define RTAR __REG(0x40900004) //RTC alarm register
450 #define RTSR __REG(0x40900008) //RTC status register
451 #define RTTR __REG(0x4090000C) //RTC timer trim register
454 #define OSMR0 __REG(0x40A00000) // OS timer match registers<3:0>
455 #define OSMR1 __REG(0x40A00004) //
456 #define OSMR2 __REG(0x40A00008) //
457 #define OSMR3 __REG(0x40A0000C) //
458 #define OSCR __REG(0x40A00010) // OS timer counter register
459 #define OSSR __REG(0x40A00014) // OS timer status register
460 #define OWER __REG(0x40A00018) // OS timer watchdog enable register
461 #define OIER __REG(0x40A0001C) // OS timer interrupt enable register
463 #define PWMCTRL0 __REG(0x40B00000) // PWM 0 Control Register
464 #define PWDUTY0 __REG(0x40B00004) // PWM 0 Duty Cycle Register
465 #define PERVAL0 __REG(0x40B00008) // PWM 0 Period Control Register
467 #define PWMCTRL1 __REG(0x40C00000) // PWM 1 Control Register
468 #define PWDUTY1 __REG(0x40C00004) // PWM 1 Duty Cycle Register
469 #define PERVAL1 __REG(0x40C00008) // PWM 1 Period Control Register
471 #define ICIP __REG(0x40D00000) // Interrupt controller IRQ pending register
472 #define ICMR __REG(0x40D00004) // Interrupt controller mask register
473 #define ICLR __REG(0x40D00008) // Interrupt controller level register
474 #define ICFP __REG(0x40D0000C) // Interrupt controller FIQ pending register
475 #define ICPR __REG(0x40D00010) // Interrupt controller pending register
476 #define ICCR __REG(0x40D00014) // Interrupt controller control register
478 #define GPLRx __REG(0x40E00000) // GPIO pin-level register GPIO<31:0>
479 #define GPLRy __REG(0x40E00004) // GPIO pin-level register GPIO<63:32>
480 #define GPLRz __REG(0x40E00008) // GPIO pin-level register GPIO<80:64>
481 #define GPDRx __REG(0x40E0000C) // GPIO pin direction register GPIO<31:0>
482 #define GPDRy __REG(0x40E00010) // GPIO pin direction register GPIO<63:32>
483 #define GPDRz __REG(0x40E00014) // GPIO pin direction register GPIO<80:64>
484 #define GPSRx __REG(0x40E00018) // GPIO pin output set register GPIO<31:0>
485 #define GPSRy __REG(0x40E0001C) // GPIO pin output set register GPIO<63:32>
486 #define GPSRz __REG(0x40E00020) // GPIO pin output set register GPIO<80:64>
487 #define GPCRx __REG(0x40E00024) // GPIO pin output clear register GPIO<31:0>
488 #define GPCRy __REG(0x40E00028) // GPIO pin output clear register GPIO <63:32>
489 #define GPCRz __REG(0x40E0002C) // GPIO pin output clear register GPIO <80:64>
490 #define GRERx __REG(0x40E00030) // GPIO rising-edge detect register GPIO<31:0>
491 #define GRERy __REG(0x40E00034) // GPIO rising-edge detect register GPIO<63:32>
492 #define GRERz __REG(0x40E00038) // GPIO rising-edge detect register GPIO<80:64>
493 #define GFERx __REG(0x40E0003C) // GPIO falling-edge detect register GPIO<31:0>
494 #define GFERy __REG(0x40E00040) // GPIO falling-edge detect register GPIO<63:32>
495 #define GFERz __REG(0x40E00044) // GPIO falling-edge detect register GPIO<80:64>
496 #define GEDRx __REG(0x40E00048) // GPIO edge detect status register GPIO<31:0>
497 #define GEDRy __REG(0x40E0004C) // GPIO edge detect status register GPIO<63:32>
498 #define GEDRz __REG(0x40E00050) // GPIO edge detect status register GPIO<80:64>
499 #define GAFR0x __REG(0x40E00054) // GPIO alternate function select register GPIO<15:0>
500 #define GAFR1x __REG(0x40E00058) // GPIO alternate function select register GPIO<31:16>
501 #define GAFR0y __REG(0x40E0005C) // GPIO alternate function select register GPIO<47:32>
502 #define GAFR1y __REG(0x40E00060) // GPIO alternate function select register GPIO<63:48>
503 #define GAFR0z __REG(0x40E00064) // GPIO alternate function select register GPIO<79:64>
504 #define GAFR1z __REG(0x40E00068) // GPIO alternate function select register GPIO<80:84>
506 // Power Manager and Reset Control
507 #define PMCR __REG(0x40F00000) // Power Manager Control register
508 #define PSSR __REG(0x40F00004) // Power Manager Sleep Status register
509 #define PSPR __REG(0x40F00008) // Power Manager Scratch Pad register
510 #define PWER __REG(0x40F0000C) // Power Manager Wake-up Enable register
511 #define PRER __REG(0x40F00010) // Power Manager GPIO Rising-edge Detect Enable register
512 #define PFER __REG(0x40F00014) // Power Manager GPIO Falling-edge Detect Enable register
513 #define PEDR __REG(0x40F00018) // Power Manager GPIO Edge Detect Status register
514 #define PCFR __REG(0x40F0001C) // Power Manager General Configuration register
515 #define PGSRx __REG(0x40F00020) // Power Manager GPIO Sleep State register for GP[31-0]
516 #define PGSRy __REG(0x40F00024) // Power Manager GPIO Sleep State register for GP[63-32]
517 #define PGSRz __REG(0x40F00028) // Power Manager GPIO Sleep State register for GP[84-64]
518 // - 0x40F0002C Reserved
519 // - 0x40F0002C Reserved
520 #define RCSR __REG(0x40F00030) // Reset controller status register
521 // - 0x40F00034 - 0x40FFFFF Reserved
523 #define CCCR __REG(0x41300000) // Core Clock Configuration Register
524 #define CKEN __REG(0x41300004) // Clock Enable Register
525 #define OSCC __REG(0x41300008) // Oscillator Configuration Register
526 // -- 0x4130000C - 0x413FFFF Reserved
528 #define SSCR0 __REG(0x41000000) // SSP Control Register 0
529 #define SSCR1 __REG(0x41000004) // SSP Control Register 1
530 #define SSSR __REG(0x41000008) // SSP Status Register
531 #define SSITR __REG(0x4100000C) // SSP Interrupt Test Register
532 #define SSDR __REG(0x41000010) // SSP Data Write Register/SSP Data Read Register
533 // -- 0x41000014 - 0x410F FFFF Reserved
535 #define MMCSTRPCL __REG(0x41100000) // Control to start and stop MMC clock
536 #define MMCSTAT __REG(0x41100004) // MMC status register (read only)
537 #define MMCCLKRT __REG(0x41100008) // MMC clock rate
538 #define MMCSPI __REG(0x4110000c) // SPI mode control bits
539 #define MMCCMDAT __REG(0x41100010) // Command/response/data sequence control
540 #define MMCRESTO __REG(0x41100014) // Expected response time out
541 #define MMCRDTO __REG(0x41100018) // Expected data read time out
542 #define MMCBLKLEN __REG(0x4110001c) // Block length of data transaction
543 #define MMCNOB __REG(0x41100020) // "Number of blocks, for block mode"
544 #define MMCPRTBUF __REG(0x41100024) // Partial MMC_TXFIFO FIFO written
545 #define MMCIMASK __REG(0x41100028) // Interrupt Mask
546 #define MMCIREG __REG(0x4110002c) // Interrupt Register (read only)
547 #define MMCCMD __REG(0x41100030) // Index of current command
548 #define MMCARGH __REG(0x41100034) // MSW part of the current command argument
549 #define MMCARGL __REG(0x41100038) // LSW part of the current command argument
550 #define MMCRES __REG(0x4110003c) // Response FIFO (read only)
551 #define MMCRXFIFO __REG(0x41100040) // Receive FIFO (read only)
552 #define MMCTXFIFO __REG(0x41100044) // Transmit FIFO (write only)
554 #define ADCD __REG(0x41200000) // ADC Data Register
555 #define ADCS __REG(0x41200004) // ADC Control Register
556 #define ADCE __REG(0x41200008) // ADC Enable Register
557 #define ADCTSC __REG(0x4120000C) // ADC Touch Screen Control Register
558 #define ADCTSS1 __REG(0x41200010) // ADC Touch Screen Setup Register 1
559 #define ADCTSS2 __REG(0x41200014) // ADC Touch Screen Setup Register 2
560 // -- 0x41200018 - 0x412FFFF Reserved
562 /* I2C register definitions */
563 /* some bit masks of register ICR */
564 #define ICR_START 0x00000001
565 #define ICR_STOP 0x00000002
566 #define ICR_ACKNAK 0x00000004
567 #define ICR_TB 0x00000008
568 #define ICR_MA 0x00000010
569 #define ICR_SCLE 0x00000020
570 #define ICR_IUE 0x00000040
571 #define ICR_GCD 0x00000080
572 #define ICR_ITEIE 0x00000100
573 #define ICR_IRFIE 0x00000200
574 #define ICR_BEIE 0x00000400
575 #define ICR_SSDIE 0x00000800
576 #define ICR_ALDIE 0x00001000
577 #define ICR_SADIE 0x00002000
578 #define ICR_UR 0x00004000
579 #define ICR_FM 0x00008000
581 /* some bit masks of register ISR */
582 #define ISR_RWM 0x00000001
583 #define ISR_ACKNACK 0x00000002
584 #define ISR_UB 0x00000004
585 #define ISR_IBB 0x00000008
586 #define ISR_SSD 0x00000010
587 #define ISR_ALD 0x00000020
588 #define ISR_ITE 0x00000040
589 #define ISR_IRF 0x00000080
590 #define ISR_GCAD 0x00000100
591 #define ISR_SAD 0x00000200
592 #define ISR_BED 0x00000400
594 #define OSSR_TIMER0 (0x1 << 0)
595 #define OSSR_TIMER1 (0x1 << 1)
596 #define OSSR_TIMER2 (0x1 << 2)
597 #define OSSR_TIMER3 (0x1 << 3)
599 #define OIER_TIMER0 (0x1 << 0)
600 #define OIER_TIMER1 (0x1 << 1)
601 #define OIER_TIMER2 (0x1 << 2)
602 #define OIER_TIMER3 (0x1 << 3)
604 #define OWER_WME (0x1 << 0)