blob: 9701ed34d2340f6c57fbe0787f950353357bb0ba [file] [log] [blame]
Greg Ungerer910ce392005-09-09 09:32:14 +10001/****************************************************************************/
2
3/*
4 * m523xsim.h -- ColdFire 523x System Integration Module support.
5 *
6 * (C) Copyright 2003-2005, Greg Ungerer <gerg@snapgear.com>
7 */
8
9/****************************************************************************/
10#ifndef m523xsim_h
11#define m523xsim_h
12/****************************************************************************/
13
Greg Ungerer733f31b2010-11-02 17:40:37 +100014#define CPU_NAME "COLDFIRE(m523x)"
15#define CPU_INSTR_PER_JIFFY 3
Greg Ungerer910ce392005-09-09 09:32:14 +100016
Greg Ungerera12cf0a2010-11-09 10:12:29 +100017#include <asm/m52xxacr.h>
18
Greg Ungerer910ce392005-09-09 09:32:14 +100019/*
20 * Define the 523x SIM register set addresses.
21 */
Greg Ungerer254eef72011-03-05 22:17:17 +100022#define MCFICM_INTC0 (MCF_IPSBAR + 0x0c00) /* Base for Interrupt Ctrl 0 */
23#define MCFICM_INTC1 (MCF_IPSBAR + 0x0d00) /* Base for Interrupt Ctrl 0 */
24
Greg Ungerer910ce392005-09-09 09:32:14 +100025#define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */
26#define MCFINTC_IPRL 0x04 /* Interrupt pending 1-31 */
27#define MCFINTC_IMRH 0x08 /* Interrupt mask 32-63 */
28#define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */
29#define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */
30#define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */
31#define MCFINTC_IRLR 0x18 /* */
32#define MCFINTC_IACKL 0x19 /* */
33#define MCFINTC_ICR0 0x40 /* Base ICR register */
34
35#define MCFINT_VECBASE 64 /* Vector base number */
36#define MCFINT_UART0 13 /* Interrupt number for UART0 */
37#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */
38#define MCFINT_QSPI 18 /* Interrupt number for QSPI */
39
40/*
41 * SDRAM configuration registers.
42 */
43#define MCFSIM_DCR 0x44 /* SDRAM control */
44#define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */
45#define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */
46#define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */
47#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */
48
Greg Ungerer55b33f32009-04-30 22:58:35 +100049/*
50 * Reset Controll Unit (relative to IPSBAR).
51 */
52#define MCF_RCR 0x110000
53#define MCF_RSR 0x110001
54
55#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
56#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
57
Greg Ungerer57015422010-11-03 12:50:30 +100058/*
59 * UART module.
60 */
61#define MCFUART_BASE1 0x200 /* Base address of UART1 */
62#define MCFUART_BASE2 0x240 /* Base address of UART2 */
63#define MCFUART_BASE3 0x280 /* Base address of UART3 */
64
sfking@fdwdc.coma03ce7d2009-06-19 18:11:04 -070065#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
66#define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
67#define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002)
68#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003)
69#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004)
70#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005)
71#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006)
72#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007)
73#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008)
74#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009)
75#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A)
76#define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B)
77#define MCFGPIO_PODR_ETPU (MCF_IPSBAR + 0x10000C)
78
79#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010)
80#define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011)
81#define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012)
82#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013)
83#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014)
84#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015)
85#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016)
86#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017)
87#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018)
88#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019)
89#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A)
90#define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B)
91#define MCFGPIO_PDDR_ETPU (MCF_IPSBAR + 0x10001C)
92
93#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020)
94#define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021)
95#define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022)
96#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023)
97#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024)
98#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025)
99#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026)
100#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027)
101#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028)
102#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029)
103#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A)
104#define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B)
105#define MCFGPIO_PPDSDR_ETPU (MCF_IPSBAR + 0x10002C)
106
107#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030)
108#define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031)
109#define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032)
110#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033)
111#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034)
112#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035)
113#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036)
114#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037)
115#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038)
116#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039)
117#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A)
118#define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B)
119#define MCFGPIO_PCLRR_ETPU (MCF_IPSBAR + 0x10003C)
120
121/*
122 * EPort
123 */
124
125#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002)
126#define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004)
127#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005)
128
129/*
130 * Generic GPIO support
131 */
132#define MCFGPIO_PODR MCFGPIO_PODR_ADDR
133#define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR
134#define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR
135#define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR
136#define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR
137
138#define MCFGPIO_PIN_MAX 107
139#define MCFGPIO_IRQ_MAX 8
140#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE
141
Steven King91d60412010-01-22 12:43:03 -0800142/*
143 * Pin Assignment
144*/
145#define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A)
146#define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C)
Greg Ungerer910ce392005-09-09 09:32:14 +1000147/****************************************************************************/
148#endif /* m523xsim_h */