162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/****************************************************************************/
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci/*
562306a36Sopenharmony_ci *	m523xsim.h -- ColdFire 523x System Integration Module support.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci *	(C) Copyright 2003-2005, Greg Ungerer <gerg@snapgear.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/****************************************************************************/
1162306a36Sopenharmony_ci#ifndef	m523xsim_h
1262306a36Sopenharmony_ci#define	m523xsim_h
1362306a36Sopenharmony_ci/****************************************************************************/
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#define	CPU_NAME		"COLDFIRE(m523x)"
1662306a36Sopenharmony_ci#define	CPU_INSTR_PER_JIFFY	3
1762306a36Sopenharmony_ci#define	MCF_BUSCLK		(MCF_CLK / 2)
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#include <asm/m52xxacr.h>
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci/*
2262306a36Sopenharmony_ci *	Define the 523x SIM register set addresses.
2362306a36Sopenharmony_ci */
2462306a36Sopenharmony_ci#define	MCFICM_INTC0		(MCF_IPSBAR + 0x0c00)	/* Base for Interrupt Ctrl 0 */
2562306a36Sopenharmony_ci#define	MCFICM_INTC1		(MCF_IPSBAR + 0x0d00)	/* Base for Interrupt Ctrl 0 */
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci#define	MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */
2862306a36Sopenharmony_ci#define	MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */
2962306a36Sopenharmony_ci#define	MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */
3062306a36Sopenharmony_ci#define	MCFINTC_IMRL		0x0c		/* Interrupt mask 1-31 */
3162306a36Sopenharmony_ci#define	MCFINTC_INTFRCH		0x10		/* Interrupt force 32-63 */
3262306a36Sopenharmony_ci#define	MCFINTC_INTFRCL		0x14		/* Interrupt force 1-31 */
3362306a36Sopenharmony_ci#define	MCFINTC_IRLR		0x18		/* */
3462306a36Sopenharmony_ci#define	MCFINTC_IACKL		0x19		/* */
3562306a36Sopenharmony_ci#define	MCFINTC_ICR0		0x40		/* Base ICR register */
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#define	MCFINT_VECBASE		64		/* Vector base number */
3862306a36Sopenharmony_ci#define	MCFINT_UART0		13		/* Interrupt number for UART0 */
3962306a36Sopenharmony_ci#define	MCFINT_UART1		14		/* Interrupt number for UART1 */
4062306a36Sopenharmony_ci#define	MCFINT_UART2		15		/* Interrupt number for UART2 */
4162306a36Sopenharmony_ci#define	MCFINT_I2C0		17		/* Interrupt number for I2C */
4262306a36Sopenharmony_ci#define	MCFINT_QSPI		18		/* Interrupt number for QSPI */
4362306a36Sopenharmony_ci#define	MCFINT_FECRX0		23		/* Interrupt number for FEC */
4462306a36Sopenharmony_ci#define	MCFINT_FECTX0		27		/* Interrupt number for FEC */
4562306a36Sopenharmony_ci#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC */
4662306a36Sopenharmony_ci#define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0)
4962306a36Sopenharmony_ci#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1)
5062306a36Sopenharmony_ci#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2)
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0)
5362306a36Sopenharmony_ci#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0)
5462306a36Sopenharmony_ci#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0)
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI)
5762306a36Sopenharmony_ci#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1)
5862306a36Sopenharmony_ci#define	MCF_IRQ_I2C0		(MCFINT_VECBASE + MCFINT_I2C0)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci/*
6162306a36Sopenharmony_ci *	SDRAM configuration registers.
6262306a36Sopenharmony_ci */
6362306a36Sopenharmony_ci#define	MCFSIM_DCR		(MCF_IPSBAR + 0x44)	/* Control */
6462306a36Sopenharmony_ci#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x48)	/* Base address 0 */
6562306a36Sopenharmony_ci#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x4c)	/* Address mask 0 */
6662306a36Sopenharmony_ci#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x50)	/* Base address 1 */
6762306a36Sopenharmony_ci#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x54)	/* Address mask 1 */
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci/*
7062306a36Sopenharmony_ci *  Reset Control Unit (relative to IPSBAR).
7162306a36Sopenharmony_ci */
7262306a36Sopenharmony_ci#define	MCF_RCR			(MCF_IPSBAR + 0x110000)
7362306a36Sopenharmony_ci#define	MCF_RSR			(MCF_IPSBAR + 0x110001)
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */
7662306a36Sopenharmony_ci#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci/*
7962306a36Sopenharmony_ci *  UART module.
8062306a36Sopenharmony_ci */
8162306a36Sopenharmony_ci#define MCFUART_BASE0		(MCF_IPSBAR + 0x200)
8262306a36Sopenharmony_ci#define MCFUART_BASE1		(MCF_IPSBAR + 0x240)
8362306a36Sopenharmony_ci#define MCFUART_BASE2		(MCF_IPSBAR + 0x280)
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci/*
8662306a36Sopenharmony_ci *  FEC ethernet module.
8762306a36Sopenharmony_ci */
8862306a36Sopenharmony_ci#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x1000)
8962306a36Sopenharmony_ci#define	MCFFEC_SIZE0		0x800
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci/*
9262306a36Sopenharmony_ci *  QSPI module.
9362306a36Sopenharmony_ci */
9462306a36Sopenharmony_ci#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340)
9562306a36Sopenharmony_ci#define	MCFQSPI_SIZE		0x40
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci#define	MCFQSPI_CS0		91
9862306a36Sopenharmony_ci#define	MCFQSPI_CS1		92
9962306a36Sopenharmony_ci#define	MCFQSPI_CS2		103
10062306a36Sopenharmony_ci#define	MCFQSPI_CS3		99
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci/*
10362306a36Sopenharmony_ci *  GPIO module.
10462306a36Sopenharmony_ci */
10562306a36Sopenharmony_ci#define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100000)
10662306a36Sopenharmony_ci#define MCFGPIO_PODR_DATAH	(MCF_IPSBAR + 0x100001)
10762306a36Sopenharmony_ci#define MCFGPIO_PODR_DATAL	(MCF_IPSBAR + 0x100002)
10862306a36Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL	(MCF_IPSBAR + 0x100003)
10962306a36Sopenharmony_ci#define MCFGPIO_PODR_BS		(MCF_IPSBAR + 0x100004)
11062306a36Sopenharmony_ci#define MCFGPIO_PODR_CS		(MCF_IPSBAR + 0x100005)
11162306a36Sopenharmony_ci#define MCFGPIO_PODR_SDRAM	(MCF_IPSBAR + 0x100006)
11262306a36Sopenharmony_ci#define MCFGPIO_PODR_FECI2C	(MCF_IPSBAR + 0x100007)
11362306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTH	(MCF_IPSBAR + 0x100008)
11462306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTL	(MCF_IPSBAR + 0x100009)
11562306a36Sopenharmony_ci#define MCFGPIO_PODR_QSPI	(MCF_IPSBAR + 0x10000A)
11662306a36Sopenharmony_ci#define MCFGPIO_PODR_TIMER	(MCF_IPSBAR + 0x10000B)
11762306a36Sopenharmony_ci#define MCFGPIO_PODR_ETPU	(MCF_IPSBAR + 0x10000C)
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci#define MCFGPIO_PDDR_ADDR	(MCF_IPSBAR + 0x100010)
12062306a36Sopenharmony_ci#define MCFGPIO_PDDR_DATAH	(MCF_IPSBAR + 0x100011)
12162306a36Sopenharmony_ci#define MCFGPIO_PDDR_DATAL	(MCF_IPSBAR + 0x100012)
12262306a36Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL	(MCF_IPSBAR + 0x100013)
12362306a36Sopenharmony_ci#define MCFGPIO_PDDR_BS		(MCF_IPSBAR + 0x100014)
12462306a36Sopenharmony_ci#define MCFGPIO_PDDR_CS		(MCF_IPSBAR + 0x100015)
12562306a36Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM	(MCF_IPSBAR + 0x100016)
12662306a36Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C	(MCF_IPSBAR + 0x100017)
12762306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTH	(MCF_IPSBAR + 0x100018)
12862306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTL	(MCF_IPSBAR + 0x100019)
12962306a36Sopenharmony_ci#define MCFGPIO_PDDR_QSPI	(MCF_IPSBAR + 0x10001A)
13062306a36Sopenharmony_ci#define MCFGPIO_PDDR_TIMER	(MCF_IPSBAR + 0x10001B)
13162306a36Sopenharmony_ci#define MCFGPIO_PDDR_ETPU	(MCF_IPSBAR + 0x10001C)
13262306a36Sopenharmony_ci
13362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR	(MCF_IPSBAR + 0x100020)
13462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAH	(MCF_IPSBAR + 0x100021)
13562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAL	(MCF_IPSBAR + 0x100022)
13662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL	(MCF_IPSBAR + 0x100023)
13762306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BS	(MCF_IPSBAR + 0x100024)
13862306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_CS	(MCF_IPSBAR + 0x100025)
13962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM	(MCF_IPSBAR + 0x100026)
14062306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C	(MCF_IPSBAR + 0x100027)
14162306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH	(MCF_IPSBAR + 0x100028)
14262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL	(MCF_IPSBAR + 0x100029)
14362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI	(MCF_IPSBAR + 0x10002A)
14462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMER	(MCF_IPSBAR + 0x10002B)
14562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_ETPU	(MCF_IPSBAR + 0x10002C)
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR	(MCF_IPSBAR + 0x100030)
14862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_DATAH	(MCF_IPSBAR + 0x100031)
14962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_DATAL	(MCF_IPSBAR + 0x100032)
15062306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL	(MCF_IPSBAR + 0x100033)
15162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BS	(MCF_IPSBAR + 0x100034)
15262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_CS	(MCF_IPSBAR + 0x100035)
15362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM	(MCF_IPSBAR + 0x100036)
15462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C	(MCF_IPSBAR + 0x100037)
15562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH	(MCF_IPSBAR + 0x100038)
15662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL	(MCF_IPSBAR + 0x100039)
15762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI	(MCF_IPSBAR + 0x10003A)
15862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TIMER	(MCF_IPSBAR + 0x10003B)
15962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_ETPU	(MCF_IPSBAR + 0x10003C)
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci/*
16262306a36Sopenharmony_ci * PIT timer base addresses.
16362306a36Sopenharmony_ci */
16462306a36Sopenharmony_ci#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x150000)
16562306a36Sopenharmony_ci#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x160000)
16662306a36Sopenharmony_ci#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x170000)
16762306a36Sopenharmony_ci#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x180000)
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ci/*
17062306a36Sopenharmony_ci * EPort
17162306a36Sopenharmony_ci */
17262306a36Sopenharmony_ci#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)
17362306a36Sopenharmony_ci#define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002)
17462306a36Sopenharmony_ci#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)
17562306a36Sopenharmony_ci#define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)
17662306a36Sopenharmony_ci#define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005)
17762306a36Sopenharmony_ci#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci/*
18062306a36Sopenharmony_ci * Generic GPIO support
18162306a36Sopenharmony_ci */
18262306a36Sopenharmony_ci#define MCFGPIO_PODR		MCFGPIO_PODR_ADDR
18362306a36Sopenharmony_ci#define MCFGPIO_PDDR		MCFGPIO_PDDR_ADDR
18462306a36Sopenharmony_ci#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_ADDR
18562306a36Sopenharmony_ci#define MCFGPIO_SETR		MCFGPIO_PPDSDR_ADDR
18662306a36Sopenharmony_ci#define MCFGPIO_CLRR		MCFGPIO_PCLRR_ADDR
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci#define MCFGPIO_PIN_MAX		107
18962306a36Sopenharmony_ci#define MCFGPIO_IRQ_MAX		8
19062306a36Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE
19162306a36Sopenharmony_ci
19262306a36Sopenharmony_ci/*
19362306a36Sopenharmony_ci * Pin Assignment
19462306a36Sopenharmony_ci*/
19562306a36Sopenharmony_ci#define	MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100040)
19662306a36Sopenharmony_ci#define	MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100042)
19762306a36Sopenharmony_ci#define	MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100044)
19862306a36Sopenharmony_ci#define	MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100045)
19962306a36Sopenharmony_ci#define	MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100046)
20062306a36Sopenharmony_ci#define	MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100047)
20162306a36Sopenharmony_ci#define	MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x100048)
20262306a36Sopenharmony_ci#define	MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10004A)
20362306a36Sopenharmony_ci#define	MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10004C)
20462306a36Sopenharmony_ci#define	MCFGPIO_PAR_ETPU	(MCF_IPSBAR + 0x10004E)
20562306a36Sopenharmony_ci
20662306a36Sopenharmony_ci/*
20762306a36Sopenharmony_ci * DMA unit base addresses.
20862306a36Sopenharmony_ci */
20962306a36Sopenharmony_ci#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x100)
21062306a36Sopenharmony_ci#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x140)
21162306a36Sopenharmony_ci#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x180)
21262306a36Sopenharmony_ci#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x1C0)
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci/*
21562306a36Sopenharmony_ci * I2C module.
21662306a36Sopenharmony_ci */
21762306a36Sopenharmony_ci#define	MCFI2C_BASE0		(MCF_IPSBAR + 0x300)
21862306a36Sopenharmony_ci#define	MCFI2C_SIZE0		0x40
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ci/****************************************************************************/
22162306a36Sopenharmony_ci#endif	/* m523xsim_h */
222