xref: /openbmc/linux/arch/m68k/include/asm/m5206sim.h (revision b2441318)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
249148020SSam Ravnborg /****************************************************************************/
349148020SSam Ravnborg 
449148020SSam Ravnborg /*
549148020SSam Ravnborg  *	m5206sim.h -- ColdFire 5206 System Integration Module support.
649148020SSam Ravnborg  *
749148020SSam Ravnborg  *	(C) Copyright 1999, Greg Ungerer (gerg@snapgear.com)
849148020SSam Ravnborg  * 	(C) Copyright 2000, Lineo Inc. (www.lineo.com)
949148020SSam Ravnborg  */
1049148020SSam Ravnborg 
1149148020SSam Ravnborg /****************************************************************************/
1249148020SSam Ravnborg #ifndef	m5206sim_h
1349148020SSam Ravnborg #define	m5206sim_h
1449148020SSam Ravnborg /****************************************************************************/
1549148020SSam Ravnborg 
167fc82b65SGreg Ungerer #define	CPU_NAME		"COLDFIRE(m5206)"
17733f31b7SGreg Ungerer #define	CPU_INSTR_PER_JIFFY	3
18ce3de78aSGreg Ungerer #define	MCF_BUSCLK		MCF_CLK
1949148020SSam Ravnborg 
20a12cf0a8SGreg Ungerer #include <asm/m52xxacr.h>
21a12cf0a8SGreg Ungerer 
2249148020SSam Ravnborg /*
2349148020SSam Ravnborg  *	Define the 5206 SIM register set addresses.
2449148020SSam Ravnborg  */
25c986a3d5SGreg Ungerer #define	MCFSIM_SIMR		(MCF_MBAR + 0x03)	/* SIM Config reg */
26c986a3d5SGreg Ungerer #define	MCFSIM_ICR1		(MCF_MBAR + 0x14)	/* Intr Ctrl reg 1 */
27c986a3d5SGreg Ungerer #define	MCFSIM_ICR2		(MCF_MBAR + 0x15)	/* Intr Ctrl reg 2 */
28c986a3d5SGreg Ungerer #define	MCFSIM_ICR3		(MCF_MBAR + 0x16)	/* Intr Ctrl reg 3 */
29c986a3d5SGreg Ungerer #define	MCFSIM_ICR4		(MCF_MBAR + 0x17)	/* Intr Ctrl reg 4 */
30c986a3d5SGreg Ungerer #define	MCFSIM_ICR5		(MCF_MBAR + 0x18)	/* Intr Ctrl reg 5 */
31c986a3d5SGreg Ungerer #define	MCFSIM_ICR6		(MCF_MBAR + 0x19)	/* Intr Ctrl reg 6 */
32c986a3d5SGreg Ungerer #define	MCFSIM_ICR7		(MCF_MBAR + 0x1a)	/* Intr Ctrl reg 7 */
33c986a3d5SGreg Ungerer #define	MCFSIM_ICR8		(MCF_MBAR + 0x1b)	/* Intr Ctrl reg 8 */
34c986a3d5SGreg Ungerer #define	MCFSIM_ICR9		(MCF_MBAR + 0x1c)	/* Intr Ctrl reg 9 */
35c986a3d5SGreg Ungerer #define	MCFSIM_ICR10		(MCF_MBAR + 0x1d)	/* Intr Ctrl reg 10 */
36c986a3d5SGreg Ungerer #define	MCFSIM_ICR11		(MCF_MBAR + 0x1e)	/* Intr Ctrl reg 11 */
37c986a3d5SGreg Ungerer #define	MCFSIM_ICR12		(MCF_MBAR + 0x1f)	/* Intr Ctrl reg 12 */
38c986a3d5SGreg Ungerer #define	MCFSIM_ICR13		(MCF_MBAR + 0x20)	/* Intr Ctrl reg 13 */
3949148020SSam Ravnborg #ifdef CONFIG_M5206e
40c986a3d5SGreg Ungerer #define	MCFSIM_ICR14		(MCF_MBAR + 0x21)	/* Intr Ctrl reg 14 */
41c986a3d5SGreg Ungerer #define	MCFSIM_ICR15		(MCF_MBAR + 0x22)	/* Intr Ctrl reg 15 */
4249148020SSam Ravnborg #endif
4349148020SSam Ravnborg 
446a3a786dSGreg Ungerer #define	MCFSIM_IMR		(MCF_MBAR + 0x36)	/* Interrupt Mask */
456a3a786dSGreg Ungerer #define	MCFSIM_IPR		(MCF_MBAR + 0x3a)	/* Interrupt Pending */
4649148020SSam Ravnborg 
47e1e362dcSGreg Ungerer #define	MCFSIM_RSR		(MCF_MBAR + 0x40)	/* Reset Status */
48e1e362dcSGreg Ungerer #define	MCFSIM_SYPCR		(MCF_MBAR + 0x41)	/* System Protection */
4949148020SSam Ravnborg 
50660b73e3SGreg Ungerer #define	MCFSIM_SWIVR		(MCF_MBAR + 0x42)	/* SW Watchdog intr */
51660b73e3SGreg Ungerer #define	MCFSIM_SWSR		(MCF_MBAR + 0x43)	/* SW Watchdog srv */
5249148020SSam Ravnborg 
536a92e198SGreg Ungerer #define	MCFSIM_DCRR		(MCF_MBAR + 0x46) /* DRAM Refresh reg (r/w) */
546a92e198SGreg Ungerer #define	MCFSIM_DCTR		(MCF_MBAR + 0x4a) /* DRAM Timing reg (r/w) */
556a92e198SGreg Ungerer #define	MCFSIM_DAR0		(MCF_MBAR + 0x4c) /* DRAM 0 Address reg(r/w) */
566a92e198SGreg Ungerer #define	MCFSIM_DMR0		(MCF_MBAR + 0x50) /* DRAM 0 Mask reg (r/w) */
576a92e198SGreg Ungerer #define	MCFSIM_DCR0		(MCF_MBAR + 0x57) /* DRAM 0 Control reg (r/w) */
586a92e198SGreg Ungerer #define	MCFSIM_DAR1		(MCF_MBAR + 0x58) /* DRAM 1 Address reg (r/w) */
596a92e198SGreg Ungerer #define	MCFSIM_DMR1		(MCF_MBAR + 0x5c) /* DRAM 1 Mask reg (r/w) */
606a92e198SGreg Ungerer #define	MCFSIM_DCR1		(MCF_MBAR + 0x63) /* DRAM 1 Control reg (r/w) */
6149148020SSam Ravnborg 
621419ea3bSGreg Ungerer #define	MCFSIM_CSAR0		(MCF_MBAR + 0x64)	/* CS 0 Address reg */
631419ea3bSGreg Ungerer #define	MCFSIM_CSMR0		(MCF_MBAR + 0x68)	/* CS 0 Mask reg */
641419ea3bSGreg Ungerer #define	MCFSIM_CSCR0		(MCF_MBAR + 0x6e)	/* CS 0 Control reg */
651419ea3bSGreg Ungerer #define	MCFSIM_CSAR1		(MCF_MBAR + 0x70)	/* CS 1 Address reg */
661419ea3bSGreg Ungerer #define	MCFSIM_CSMR1		(MCF_MBAR + 0x74)	/* CS 1 Mask reg */
671419ea3bSGreg Ungerer #define	MCFSIM_CSCR1		(MCF_MBAR + 0x7a)	/* CS 1 Control reg */
681419ea3bSGreg Ungerer #define	MCFSIM_CSAR2		(MCF_MBAR + 0x7c)	/* CS 2 Address reg */
691419ea3bSGreg Ungerer #define	MCFSIM_CSMR2		(MCF_MBAR + 0x80)	/* CS 2 Mask reg */
701419ea3bSGreg Ungerer #define	MCFSIM_CSCR2		(MCF_MBAR + 0x86)	/* CS 2 Control reg */
711419ea3bSGreg Ungerer #define	MCFSIM_CSAR3		(MCF_MBAR + 0x88)	/* CS 3 Address reg */
721419ea3bSGreg Ungerer #define	MCFSIM_CSMR3		(MCF_MBAR + 0x8c)	/* CS 3 Mask reg */
731419ea3bSGreg Ungerer #define	MCFSIM_CSCR3		(MCF_MBAR + 0x92)	/* CS 3 Control reg */
741419ea3bSGreg Ungerer #define	MCFSIM_CSAR4		(MCF_MBAR + 0x94)	/* CS 4 Address reg */
751419ea3bSGreg Ungerer #define	MCFSIM_CSMR4		(MCF_MBAR + 0x98)	/* CS 4 Mask reg */
761419ea3bSGreg Ungerer #define	MCFSIM_CSCR4		(MCF_MBAR + 0x9e)	/* CS 4 Control reg */
771419ea3bSGreg Ungerer #define	MCFSIM_CSAR5		(MCF_MBAR + 0xa0)	/* CS 5 Address reg */
781419ea3bSGreg Ungerer #define	MCFSIM_CSMR5		(MCF_MBAR + 0xa4)	/* CS 5 Mask reg */
791419ea3bSGreg Ungerer #define	MCFSIM_CSCR5		(MCF_MBAR + 0xaa)	/* CS 5 Control reg */
801419ea3bSGreg Ungerer #define	MCFSIM_CSAR6		(MCF_MBAR + 0xac)	/* CS 6 Address reg */
811419ea3bSGreg Ungerer #define	MCFSIM_CSMR6		(MCF_MBAR + 0xb0)	/* CS 6 Mask reg */
821419ea3bSGreg Ungerer #define	MCFSIM_CSCR6		(MCF_MBAR + 0xb6)	/* CS 6 Control reg */
831419ea3bSGreg Ungerer #define	MCFSIM_CSAR7		(MCF_MBAR + 0xb8)	/* CS 7 Address reg */
841419ea3bSGreg Ungerer #define	MCFSIM_CSMR7		(MCF_MBAR + 0xbc)	/* CS 7 Mask reg */
851419ea3bSGreg Ungerer #define	MCFSIM_CSCR7		(MCF_MBAR + 0xc2)	/* CS 7 Control reg */
861419ea3bSGreg Ungerer #define	MCFSIM_DMCR		(MCF_MBAR + 0xc6)	/* Default control */
8749148020SSam Ravnborg 
8849148020SSam Ravnborg #ifdef CONFIG_M5206e
89a45f56b2SGreg Ungerer #define	MCFSIM_PAR		(MCF_MBAR + 0xca)	/* Pin Assignment */
9049148020SSam Ravnborg #else
91a45f56b2SGreg Ungerer #define	MCFSIM_PAR		(MCF_MBAR + 0xcb)	/* Pin Assignment */
9249148020SSam Ravnborg #endif
9349148020SSam Ravnborg 
9458f0ac98SGreg Ungerer #define	MCFTIMER_BASE1		(MCF_MBAR + 0x100)	/* Base of TIMER1 */
9558f0ac98SGreg Ungerer #define	MCFTIMER_BASE2		(MCF_MBAR + 0x120)	/* Base of TIMER2 */
9658f0ac98SGreg Ungerer 
97bc25b057Ssfking@fdwdc.com #define	MCFSIM_PADDR		(MCF_MBAR + 0x1c5)	/* Parallel Direction (r/w) */
98bc25b057Ssfking@fdwdc.com #define	MCFSIM_PADAT		(MCF_MBAR + 0x1c9)	/* Parallel Port Value (r/w) */
9949148020SSam Ravnborg 
100babc08b7SGreg Ungerer #define	MCFDMA_BASE0		(MCF_MBAR + 0x200)	/* Base address DMA 0 */
101babc08b7SGreg Ungerer #define	MCFDMA_BASE1		(MCF_MBAR + 0x240)	/* Base address DMA 1 */
102babc08b7SGreg Ungerer 
10357015421SGreg Ungerer #if defined(CONFIG_NETtel)
1048400ca32SGreg Ungerer #define	MCFUART_BASE0		(MCF_MBAR + 0x180)	/* Base address UART0 */
1058400ca32SGreg Ungerer #define	MCFUART_BASE1		(MCF_MBAR + 0x140)	/* Base address UART1 */
10657015421SGreg Ungerer #else
1078400ca32SGreg Ungerer #define	MCFUART_BASE0		(MCF_MBAR + 0x140)	/* Base address UART0 */
1088400ca32SGreg Ungerer #define	MCFUART_BASE1		(MCF_MBAR + 0x180)	/* Base address UART1 */
10957015421SGreg Ungerer #endif
11057015421SGreg Ungerer 
11149148020SSam Ravnborg /*
11204b75b10SGreg Ungerer  *	Define system peripheral IRQ usage.
11304b75b10SGreg Ungerer  */
1142d24b532SSteven King #define	MCF_IRQ_I2C0		29		/* I2C, Level 5 */
11504b75b10SGreg Ungerer #define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */
11604b75b10SGreg Ungerer #define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */
1178400ca32SGreg Ungerer #define	MCF_IRQ_UART0		73		/* UART0 */
1188400ca32SGreg Ungerer #define	MCF_IRQ_UART1		74		/* UART1 */
11904b75b10SGreg Ungerer 
12004b75b10SGreg Ungerer /*
121bc25b057Ssfking@fdwdc.com  *	Generic GPIO
122bc25b057Ssfking@fdwdc.com  */
123bc25b057Ssfking@fdwdc.com #define MCFGPIO_PIN_MAX		8
124bc25b057Ssfking@fdwdc.com #define MCFGPIO_IRQ_VECBASE	-1
125bc25b057Ssfking@fdwdc.com #define MCFGPIO_IRQ_MAX		-1
12604b75b10SGreg Ungerer 
127bc25b057Ssfking@fdwdc.com /*
12849148020SSam Ravnborg  *	Some symbol defines for the Parallel Port Pin Assignment Register
12949148020SSam Ravnborg  */
13049148020SSam Ravnborg #ifdef CONFIG_M5206e
13149148020SSam Ravnborg #define MCFSIM_PAR_DREQ0        0x100           /* Set to select DREQ0 input */
13249148020SSam Ravnborg                                                 /* Clear to select T0 input */
13349148020SSam Ravnborg #define MCFSIM_PAR_DREQ1        0x200           /* Select DREQ1 input */
13449148020SSam Ravnborg                                                 /* Clear to select T0 output */
13549148020SSam Ravnborg #endif
13649148020SSam Ravnborg 
13749148020SSam Ravnborg /*
13849148020SSam Ravnborg  *	Some symbol defines for the Interrupt Control Register
13949148020SSam Ravnborg  */
14049148020SSam Ravnborg #define	MCFSIM_SWDICR		MCFSIM_ICR8	/* Watchdog timer ICR */
14149148020SSam Ravnborg #define	MCFSIM_TIMER1ICR	MCFSIM_ICR9	/* Timer 1 ICR */
14249148020SSam Ravnborg #define	MCFSIM_TIMER2ICR	MCFSIM_ICR10	/* Timer 2 ICR */
1432d24b532SSteven King #define	MCFSIM_I2CICR		MCFSIM_ICR11	/* I2C ICR */
14449148020SSam Ravnborg #define	MCFSIM_UART1ICR		MCFSIM_ICR12	/* UART 1 ICR */
14549148020SSam Ravnborg #define	MCFSIM_UART2ICR		MCFSIM_ICR13	/* UART 2 ICR */
14649148020SSam Ravnborg #ifdef CONFIG_M5206e
14749148020SSam Ravnborg #define	MCFSIM_DMA1ICR		MCFSIM_ICR14	/* DMA 1 ICR */
14849148020SSam Ravnborg #define	MCFSIM_DMA2ICR		MCFSIM_ICR15	/* DMA 2 ICR */
14949148020SSam Ravnborg #endif
15049148020SSam Ravnborg 
1512d24b532SSteven King /*
1522d24b532SSteven King  * I2C Controller
1532d24b532SSteven King */
1542d24b532SSteven King #define MCFI2C_BASE0		(MCF_MBAR + 0x1e0)
1552d24b532SSteven King #define MCFI2C_SIZE0		0x40
1562d24b532SSteven King 
15749148020SSam Ravnborg /****************************************************************************/
15849148020SSam Ravnborg #endif	/* m5206sim_h */
159