/* $NetBSD: pxa2x0reg.h,v 1.9 2006/04/10 04:13:58 simonb Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. * Written by Hiroyuki Bessho for Genetec Corporation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed for the NetBSD Project by * Genetec Corporation. * 4. The name of Genetec Corporation may not be used to endorse or * promote products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ /* * Intel PXA2[15]0 processor is XScale based integrated CPU * * Reference: * Intel(r) PXA250 and PXA210 Application Processors * Developer's Manual * (278522-001.pdf) */ #ifndef _ARM_XSCALE_PXAREG_H_ #define _ARM_XSCALE_PXAREG_H_ #ifndef _LOCORE #include /* for uint32_t */ #endif /* * Chip select domains */ #define PXA2X0_CS0_START 0x00000000 #define PXA2X0_CS1_START 0x04000000 #define PXA2X0_CS2_START 0x08000000 #define PXA2X0_CS3_START 0x0c000000 #define PXA2X0_CS4_START 0x10000000 #define PXA2X0_CS5_START 0x14000000 #define PXA2X0_CS_SIZE 0x04000000 #define PXA2X0_PCMCIA_SLOT0 0x20000000 #define PXA2X0_PCMCIA_SLOT1 0x30000000 #define PXA2X0_PERIPH_START 0x40000000 /* #define PXA2X0_MEMCTL_START 0x48000000 */ #define PXA270_PERIPH_END 0x530fffff #define PXA250_PERIPH_END 0x480fffff #define PXA2X0_PERIPH_OFFSET 0xa8000000 #define PXA2X0_SDRAM0_START 0xa0000000 #define PXA2X0_SDRAM1_START 0xa4000000 #define PXA2X0_SDRAM2_START 0xa8000000 #define PXA2X0_SDRAM3_START 0xac000000 #define PXA2X0_SDRAM_BANKS 4 #define PXA2X0_SDRAM_BANK_SIZE 0x04000000 /* * Physical address of integrated peripherals */ #define PXA2X0_DMAC_BASE 0x40000000 #define PXA2X0_DMAC_SIZE 0x300 #define PXA2X0_FFUART_BASE 0x40100000 /* Full Function UART */ #define PXA2X0_FFUART_SIZE 0x20 #define PXA2X0_BTUART_BASE 0x40200000 /* Bluetooth UART */ #define PXA2X0_BTUART_SIZE 0x24 #define PXA2X0_I2C_BASE 0x40300000 #define PXA2X0_I2C_SIZE 0x000016a4 #define PXA2X0_I2S_BASE 0x40400000 #define PXA2X0_AC97_BASE 0x40500000 #define PXA2X0_AC97_SIZE 0x600 #define PXA2X0_USBDC_BASE 0x40600000 /* USB Client */ #define PXA2X0_USBDC_SIZE 0x0e04 #define PXA2X0_STUART_BASE 0x40700000 /* Standard UART */ #define PXA2X0_STUART_SIZE 0x24 #define PXA2X0_ICP_BASE 0x40800000 #define PXA2X0_RTC_BASE 0x40900000 #define PXA2X0_RTC_SIZE 0x10 #define PXA2X0_OST_BASE 0x40a00000 /* OS Timer */ #define PXA2X0_OST_SIZE 0x20 #define PXA2X0_PWM0_BASE 0x40b00000 #define PXA2X0_PWM1_BASE 0x40c00000 #define PXA2X0_INTCTL_BASE 0x40d00000 /* Interrupt controller */ #define PXA2X0_INTCTL_SIZE 0x20 #define PXA2X0_GPIO_BASE 0x40e00000 #define PXA270_GPIO_SIZE 0x150 #define PXA250_GPIO_SIZE 0x70 #define PXA2X0_POWMAN_BASE 0x40f00000 /* Power management */ #define PXA2X0_SSP_BASE 0x41000000 #define PXA2X0_MMC_BASE 0x41100000 /* MultiMediaCard */ #define PXA2X0_MMC_SIZE 0x48 #define PXA2X0_CLKMAN_BASE 0x41300000 /* Clock Manager */ #define PXA2X0_CLKMAN_SIZE 12 #define PXA2X0_HWUART_BASE 0x41600000 /* Hardware UART */ #define PXA2X0_HWUART_SIZE 0x30 #define PXA2X0_LCDC_BASE 0x44000000 /* LCD Controller */ #define PXA2X0_LCDC_SIZE 0x220 #define PXA2X0_MEMCTL_BASE 0x48000000 /* Memory Controller */ #define PXA2X0_MEMCTL_SIZE 0x48 #define PXA2X0_USBH_BASE 0x4c000000 /* USB Host controller */ #define PXA2X0_USBH_SIZE 0x70 /* Internal SRAM storage. PXA27x only */ #define PXA270_SRAM0_START 0x5c000000 #define PXA270_SRAM1_START 0x5c010000 #define PXA270_SRAM2_START 0x5c020000 #define PXA270_SRAM3_START 0x5c030000 #define PXA270_SRAM_BANKS 4 #define PXA270_SRAM_BANK_SIZE 0x00010000 /* width of interrupt controller */ #define ICU_LEN 32 /* but [0..7,15,16] is not used */ #define ICU_INT_HWMASK 0xffffff00 #define PXA250_IRQ_MIN 8 /* 0..7 are not used by integrated peripherals */ #define PXA270_IRQ_MIN 0 #define PXA2X0_INT_USBH1 3 /* USB host (OHCI) */ #define PXA2X0_INT_HWUART 7 #define PXA2X0_INT_GPIO0 8 #define PXA2X0_INT_GPIO1 9 #define PXA2X0_INT_GPION 10 /* irq from GPIO[2..80] */ #define PXA2X0_INT_USB 11 #define PXA2X0_INT_PMU 12 #define PXA2X0_INT_I2S 13 #define PXA2X0_INT_AC97 14 #define PXA2X0_INT_LCD 17 #define PXA2X0_INT_I2C 18 #define PXA2X0_INT_ICP 19 #define PXA2X0_INT_STUART 20 #define PXA2X0_INT_BTUART 21 #define PXA2X0_INT_FFUART 22 #define PXA2X0_INT_MMC 23 #define PXA2X0_INT_SSP 24 #define PXA2X0_INT_DMA 25 #define PXA2X0_INT_OST0 26 #define PXA2X0_INT_OST1 27 #define PXA2X0_INT_OST2 28 #define PXA2X0_INT_OST3 29 #define PXA2X0_INT_RTCHZ 30 #define PXA2X0_INT_ALARM 31 /* RTC Alarm interrupt */ /* DMAC */ #define DMAC_N_CHANNELS 16 #define DMAC_N_PRIORITIES 3 #define DMAC_DCSR(n) ((n)*4) #define DCSR_BUSERRINTR (1<<0) /* bus error interrupt */ #define DCSR_STARTINTR (1<<1) /* start interrupt */ #define DCSR_ENDINTR (1<<2) /* end interrupt */ #define DCSR_STOPSTATE (1<<3) /* channel is not running */ #define DCSR_REQPEND (1<<8) /* request pending */ #define DCSR_STOPIRQEN (1<<29) /* stop interrupt enable */ #define DCSR_NODESCFETCH (1<<30) /* no-descriptor fetch mode */ #define DCSR_RUN (1<<31) #define DMAC_DINT 0x00f0 /* DAM interrupt */ #define DMAC_DINT_MASK 0xffffu #define DMAC_DRCMR(n) (0x100+(n)*4) /* Channel map register */ #define DRCMR_CHLNUM 0x0f /* channel number */ #define DRCMR_MAPVLD (1<<7) /* map valid */ #define DMAC_DDADR(n) (0x0200+(n)*16) #define DDADR_STOP (1<<0) #define DMAC_DSADR(n) (0x0204+(n)*16) #define DMAC_DTADR(n) (0x0208+(n)*16) #define DMAC_DCMD(n) (0x020c+(n)*16) #define DCMD_LENGTH_MASK 0x1fff #define DCMD_WIDTH_SHIFT 14 #define DCMD_WIDTH_0 (0<