* arch/arm/src/c5471/chip.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_ARM_SRC_C5471_CHIP_H
#define __ARCH_ARM_SRC_C5471_CHIP_H
* Included Files
****************************************************************************/
* Pre-processor Definitions
****************************************************************************/
#define EIM_RAM_START 0xffd00000
#define EIM_CTRL 0xffff0000
#define EIM_STATUS 0xffff0004
#define EIM_CPU_TXBA 0xffff0008
#define EIM_CPU_RXBA 0xffff000c
#define EIM_BUFSIZE 0xffff0010
#define EIM_CPU_FILTER 0xffff0014
#define EIM_CPU_DAHI 0xffff0018
#define EIM_CPU_DALO 0xffff001c
#define EIM_MFVHI 0xffff0020
#define EIM_MFVLO 0xffff0024
#define EIM_MFMHI 0xffff0028
#define EIM_MFMLO 0xffff002c
#define EIM_RXTH 0xffff0030
#define EIM_CPU_RXREADY 0xffff0034
#define EIM_INTEN 0xffff0038
#define EIM_ENET0_TXDESC 0xffff0040
#define EIM_ENET0_RXDESC 0xffff0044
#define EIM_CPU_TXDESC 0xffff0050
#define EIM_CPU_RXDESC 0xffff0054
#define ENET0_MODE 0xffff0100
#define ENET0_BOFFSEED 0xffff0104
#define ENET0_BCOUNT 0xffff0108
#define ENET0_FLWPAUSE 0xffff010c
#define ENET0_FLWCONTROL 0xffff0110
#define ENET0_VTYPE 0xffff0114
#define ENET0_SEISR 0xffff0118
#define ENET0_TXBUFRDY 0xffff011c
#define ENET0_TDBA 0xffff0120
#define ENET0_RDBA 0xffff0124
#define ENET0_PARHI 0xffff0128
#define ENET0_PARLO 0xffff012c
#define ENET0_LARHI 0xffff0130
#define ENET0_LARLO 0xffff0134
#define ENET0_ADRMODE_EN 0xffff0138
#define ENET0_DRP 0xffff013c
#define UART_IRDA_BASE 0xffff0800
#define UART_MODEM_BASE 0xffff1000
#define UARTn_IO_RANGE 0x00000800
#define UART_RHR_OFFS 0x00000000
#define UART_THR_OFFS 0x00000004
#define UART_FCR_OFFS 0x00000008
#define UART_RFCR_OFFS 0x00000008
#define UART_TFCR_OFFS 0x00000008
#define UART_SCR_OFFS 0x0000000c
#define UART_LCR_OFFS 0x00000010
#define UART_LSR_OFFS 0x00000014
#define UART_SSR_OFFS 0x00000018
#define UART_MCR_OFFS 0x0000001c
#define UART_MSR_OFFS 0x00000020
#define UART_IER_OFFS 0x00000024
#define UART_ISR_OFFS 0x00000028
#define UART_EFR_OFFS 0x0000002c
#define UART_XON1_OFFS 0x00000030
#define UART_XON2_OFFS 0x00000034
#define UART_XOFF1_OFFS 0x00000038
#define UART_XOFF2_OFFS 0x0000003c
#define UART_SPR_OFFS 0x00000040
#define UART_DIV_115K_OFFS 0x00000044
#define UART_DIV_BIT_RATE_OFFS 0x00000048
#define UART_TCR_OFFS 0x0000004c
#define UART_TLR_OFFS 0x00000050
#define UART_MDR_OFFS 0x00000054
#define UART_IRDA_MDR1 0xffff0854
#define UART_IRDA_MDR2 0xffff0858
#define UART_IRDA_TXFLL 0xffff085c
#define UART_IRDA_TXFLH 0xffff0860
#define UART_IRDA_RXFLL 0xffff0864
#define UART_IRDA_RXFLH 0xffff0868
#define UART_IRDA_SFLSR 0xffff086c
#define UART_IRDA_SFREGL 0xffff0870
#define UART_IRDA_SFREGH 0xffff0874
#define UART_IRDA_BLR 0xffff0878
#define UART_IRDA_PULSE_WIDTH 0xffff087c
#define UART_IRDA_ACREG 0xffff0880
#define UART_IRDA_PULSE_START 0xffff0884
#define UART_IRDA_RX_W_PTR 0xffff0888
#define UART_IRDA_RX_R_PTR 0xffff088c
#define UART_IRDA_TX_W_PTR 0xffff0890
#define UART_IRDA_TX_R_PTR 0xffff0894
#define UART_IRDA_STATUS_W_PTR 0xffff0898
#define UART_IRDA_STATUS_R_PTR 0xffff089c
#define UART_IRDA_RESUME 0xffff08a0
#define UART_IRDA_MUX 0xffff08a4
#define UART_MODEM_MDR 0xffff1054
#define UART_MODEM_UASR 0xffff1058
#define UART_MODEM_RDPTR_URX 0xffff105c
#define UART_MODEM_WRPTR_URX 0xffff1060
#define UART_MODEM_RDPTR_UTX 0xffff1064
#define UART_MODEM_WRPTR_UTX 0xffff1068
#define UART_RX_FIFO_NOEMPTY 0x00000001
#define UART_SSR_TXFULL 0x00000001
#define UART_LSR_TREF 0x00000020
#define UART_XMIT_FIFO_SIZE 64
#define UART_IRDA_XMIT_FIFO_SIZE 64
#define UART_LCR_BOC 0x00000040
#define UART_LCR_PAREVEN 0x00000010
#define UART_LCR_PARODD 0x00000000
#define UART_LCR_PAREN 0x00000008
#define UART_LCR_PARDIS 0x00000000
#define UART_LCR_2STOP 0x00000004
#define UART_LCR_1STOP 0x00000000
#define UART_LCR_5BITS 0x00000000
#define UART_LCR_6BITS 0x00000001
#define UART_LCR_7BITS 0x00000002
#define UART_LCR_8BITS 0x00000003
#define UART_FCR_FTL 0x00000000
#define UART_FCR_FIFO_EN 0x00000001
#define UART_FCR_TX_CLR 0x00000002
#define UART_FCR_RX_CLR 0x00000004
#define UART_IER_RECVINT 0x00000001
#define UART_IER_XMITINT 0x00000002
#define UART_IER_LINESTSINT 0x00000004
#define UART_IER_MODEMSTSINT 0x00000008
#define UART_IER_XOFFINT 0x00000020
#define UART_IER_RTSINT 0x00000040
#define UART_IER_CTSINT 0x00000080
#define UART_IER_INTMASK 0x000000ff
#define BAUD_115200 0x00000001
#define BAUD_57600 0x00000002
#define BAUD_38400 0x00000003
#define BAUD_19200 0x00000006
#define BAUD_9600 0x0000000C
#define BAUD_4800 0x00000018
#define BAUD_2400 0x00000030
#define BAUD_1200 0x00000060
#define MDR_UART_MODE 0x00000000
#define MDR_SIR_MODE 0x00000001
#define MDR_AUTOBAUDING_MODE 0x00000002
#define MDR_RESET_MODE 0x00000007
#define MAX_SPI 3
#define SPI_REGISTER_BASE 0xffff2000
#define MAX_GIO (35)
#define GIO_REGISTER_BASE 0xffff2800
#define GPIO_IO 0xffff2800
* as an output; reads value on I/O
* pin when I/O is configured as an
* input */
#define GPIO_CIO 0xffff2804
#define GPIO_IRQA 0xffff2808
* determines the behavior when GPIO
* pins configured as input IRQ */
#define GPIO_IRQB 0xffff280c
* pins configured as input IRQ */
#define GPIO_DDIO 0xffff2810
* (detects changes in the I/O pins) */
#define GPIO_EN 0xffff2814
#define KGIO_REGISTER_BASE 0xffff2900
#define KBGPIO_IO 0xffff2900
* when KBGPIO is configured as an
* output; reads value on I/O pin
* when KBGPIO is configured as an
* input */
#define KBGPIO_CIO 0xffff2904
#define KBGPIO_IRQA 0xffff2908
* determines the behavior when
* KBGPIO pins configured as input
* IRQ */
#define KBGPIO_IRQB 0xffff290c
* determines the behavior when
* KBGPIO pins configured as input
* IRQ */
#define KBGPIO_DDIO 0xffff2910
* changes in the KBGPIO pins) */
#define KBGPIO_EN 0xffff2914
* KBGPIOs */
#define C5471_TIMER0_CTRL 0xffff2a00
#define C5471_TIMER0_CNT 0xffff2a04
#define C5471_TIMER1_CTRL 0xffff2b00
#define C5471_TIMER1_CNT 0xffff2b04
#define C5471_TIMER2_CTRL 0xffff2c00
#define C5471_TIMER2_CNT 0xffff2c04
#define HAVE_SRC_IRQ_BIN_REG 0
#define INT_FIRST_IO 0xffff2d00
#define INT_IO_RANGE 0x5C
#define IT_REG 0xffff2d00
#define MASK_IT_REG 0xffff2d04
#define SRC_IRQ_REG 0xffff2d08
#define SRC_FIQ_REG 0xffff2d0c
#define SRC_IRQ_BIN_REG 0xffff2d10
#define INT_CTRL_REG 0xffff2d18
#define ILR_IRQ0_REG 0xffff2d1C
#define ILR_IRQ1_REG 0xffff2d20
#define ILR_IRQ2_REG 0xffff2d24
#define ILR_IRQ3_REG 0xffff2d28
#define ILR_IRQ4_REG 0xffff2d2c
#define ILR_IRQ5_REG 0xffff2d30
#define ILR_IRQ6_REG 0xffff2d34
#define ILR_IRQ7_REG 0xffff2d38
#define ILR_IRQ8_REG 0xffff2d3c
#define ILR_IRQ9_REG 0xffff2d40
#define ILR_IRQ10_REG 0xffff2d44
#define ILR_IRQ11_REG 0xffff2d48
#define ILR_IRQ12_REG 0xffff2d4c
#define ILR_IRQ13_REG 0xffff2d50
#define ILR_IRQ14_REG 0xffff2d54
#define ILR_IRQ15_REG 0xffff2d58
#define CLKM 0xffff2f00
#define CLKM_CTL_RST 0xffff2f10
#define CLKM_RESET 0xffff2f18
#define CLKM_RESET_EIM 0x00000008
#define CLKM_EIM_CLK_STOP 0x00000010
#define CLKM_CTL_RST_LEAD_RESET 0x00000000
#define CLKM_CTL_RST_EXT_RESET 0x00000002
#define MAX_I2C 1
#define DSPRAM_BASE 0xffe00000
#define DSPRAM_END 0xffe03fff
#define DSPMEM_DSP_START 0x2000
#define DSPMEM_DSP_END 0x3fff
#define DSPMEM_ARM_START DSPRAM_BASE
#define DSPMEM_ARM_END DSPRAM_END
* a range of values.
*/
#define DSPMEM_IN_RANGE(addr, start, end) \
((((__u32)(addr)) >= (start)) && (((__u32)(addr)) <= (end)))
* properly word aligned.
*/
#define DSPMEM_ADDR_ALIGNED(addr, cpu) ((((__u32)(addr)) & 1) == 0)
* DSP's API address range.
*/
#define DSPMEM_DSP_ADDR(addr, cpu) \
DSPMEM_IN_RANGE(addr, DSPMEM_DSP_START, DSPMEM_DSP_END)
* ARM's API address range.
*/
#define DSPMEM_ARM_ADDR(addr) \
DSPMEM_IN_RANGE(addr, DSPMEM_ARM_START, DSPMEM_ARM_END)
#define DSPMEM_DSP_TO_ARM(addr, cpu) \
((((__u32)(addr) - DSPMEM_DSP_START) << 1) + DSPMEM_ARM_START)
#define DSPMEM_ARM_TO_DSP(addr) \
((((__u32)(addr) - DSPMEM_ARM_START) >> 1) + DSPMEM_DSP_START)
* Inline Functions
****************************************************************************/
* Public Function Prototypes
****************************************************************************/
#endif