18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/****************************************************************************/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci *	m523xsim.h -- ColdFire 523x System Integration Module support.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *	(C) Copyright 2003-2005, Greg Ungerer <gerg@snapgear.com>
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/****************************************************************************/
118c2ecf20Sopenharmony_ci#ifndef	m523xsim_h
128c2ecf20Sopenharmony_ci#define	m523xsim_h
138c2ecf20Sopenharmony_ci/****************************************************************************/
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define	CPU_NAME		"COLDFIRE(m523x)"
168c2ecf20Sopenharmony_ci#define	CPU_INSTR_PER_JIFFY	3
178c2ecf20Sopenharmony_ci#define	MCF_BUSCLK		(MCF_CLK / 2)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#include <asm/m52xxacr.h>
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci/*
228c2ecf20Sopenharmony_ci *	Define the 523x SIM register set addresses.
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_ci#define	MCFICM_INTC0		(MCF_IPSBAR + 0x0c00)	/* Base for Interrupt Ctrl 0 */
258c2ecf20Sopenharmony_ci#define	MCFICM_INTC1		(MCF_IPSBAR + 0x0d00)	/* Base for Interrupt Ctrl 0 */
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define	MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */
288c2ecf20Sopenharmony_ci#define	MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */
298c2ecf20Sopenharmony_ci#define	MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */
308c2ecf20Sopenharmony_ci#define	MCFINTC_IMRL		0x0c		/* Interrupt mask 1-31 */
318c2ecf20Sopenharmony_ci#define	MCFINTC_INTFRCH		0x10		/* Interrupt force 32-63 */
328c2ecf20Sopenharmony_ci#define	MCFINTC_INTFRCL		0x14		/* Interrupt force 1-31 */
338c2ecf20Sopenharmony_ci#define	MCFINTC_IRLR		0x18		/* */
348c2ecf20Sopenharmony_ci#define	MCFINTC_IACKL		0x19		/* */
358c2ecf20Sopenharmony_ci#define	MCFINTC_ICR0		0x40		/* Base ICR register */
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#define	MCFINT_VECBASE		64		/* Vector base number */
388c2ecf20Sopenharmony_ci#define	MCFINT_UART0		13		/* Interrupt number for UART0 */
398c2ecf20Sopenharmony_ci#define	MCFINT_UART1		14		/* Interrupt number for UART1 */
408c2ecf20Sopenharmony_ci#define	MCFINT_UART2		15		/* Interrupt number for UART2 */
418c2ecf20Sopenharmony_ci#define	MCFINT_I2C0		17		/* Interrupt number for I2C */
428c2ecf20Sopenharmony_ci#define	MCFINT_QSPI		18		/* Interrupt number for QSPI */
438c2ecf20Sopenharmony_ci#define	MCFINT_FECRX0		23		/* Interrupt number for FEC */
448c2ecf20Sopenharmony_ci#define	MCFINT_FECTX0		27		/* Interrupt number for FEC */
458c2ecf20Sopenharmony_ci#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC */
468c2ecf20Sopenharmony_ci#define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0)
498c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1)
508c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2)
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0)
538c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0)
548c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0)
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI)
578c2ecf20Sopenharmony_ci#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1)
588c2ecf20Sopenharmony_ci#define	MCF_IRQ_I2C0		(MCFINT_VECBASE + MCFINT_I2C0)
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci/*
618c2ecf20Sopenharmony_ci *	SDRAM configuration registers.
628c2ecf20Sopenharmony_ci */
638c2ecf20Sopenharmony_ci#define	MCFSIM_DCR		(MCF_IPSBAR + 0x44)	/* Control */
648c2ecf20Sopenharmony_ci#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x48)	/* Base address 0 */
658c2ecf20Sopenharmony_ci#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x4c)	/* Address mask 0 */
668c2ecf20Sopenharmony_ci#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x50)	/* Base address 1 */
678c2ecf20Sopenharmony_ci#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x54)	/* Address mask 1 */
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci/*
708c2ecf20Sopenharmony_ci *  Reset Control Unit (relative to IPSBAR).
718c2ecf20Sopenharmony_ci */
728c2ecf20Sopenharmony_ci#define	MCF_RCR			(MCF_IPSBAR + 0x110000)
738c2ecf20Sopenharmony_ci#define	MCF_RSR			(MCF_IPSBAR + 0x110001)
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */
768c2ecf20Sopenharmony_ci#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci/*
798c2ecf20Sopenharmony_ci *  UART module.
808c2ecf20Sopenharmony_ci */
818c2ecf20Sopenharmony_ci#define MCFUART_BASE0		(MCF_IPSBAR + 0x200)
828c2ecf20Sopenharmony_ci#define MCFUART_BASE1		(MCF_IPSBAR + 0x240)
838c2ecf20Sopenharmony_ci#define MCFUART_BASE2		(MCF_IPSBAR + 0x280)
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci/*
868c2ecf20Sopenharmony_ci *  FEC ethernet module.
878c2ecf20Sopenharmony_ci */
888c2ecf20Sopenharmony_ci#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x1000)
898c2ecf20Sopenharmony_ci#define	MCFFEC_SIZE0		0x800
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci/*
928c2ecf20Sopenharmony_ci *  QSPI module.
938c2ecf20Sopenharmony_ci */
948c2ecf20Sopenharmony_ci#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340)
958c2ecf20Sopenharmony_ci#define	MCFQSPI_SIZE		0x40
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci#define	MCFQSPI_CS0		91
988c2ecf20Sopenharmony_ci#define	MCFQSPI_CS1		92
998c2ecf20Sopenharmony_ci#define	MCFQSPI_CS2		103
1008c2ecf20Sopenharmony_ci#define	MCFQSPI_CS3		99
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci/*
1038c2ecf20Sopenharmony_ci *  GPIO module.
1048c2ecf20Sopenharmony_ci */
1058c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100000)
1068c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_DATAH	(MCF_IPSBAR + 0x100001)
1078c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_DATAL	(MCF_IPSBAR + 0x100002)
1088c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL	(MCF_IPSBAR + 0x100003)
1098c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BS		(MCF_IPSBAR + 0x100004)
1108c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_CS		(MCF_IPSBAR + 0x100005)
1118c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_SDRAM	(MCF_IPSBAR + 0x100006)
1128c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FECI2C	(MCF_IPSBAR + 0x100007)
1138c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTH	(MCF_IPSBAR + 0x100008)
1148c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTL	(MCF_IPSBAR + 0x100009)
1158c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_QSPI	(MCF_IPSBAR + 0x10000A)
1168c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_TIMER	(MCF_IPSBAR + 0x10000B)
1178c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_ETPU	(MCF_IPSBAR + 0x10000C)
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_ADDR	(MCF_IPSBAR + 0x100010)
1208c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_DATAH	(MCF_IPSBAR + 0x100011)
1218c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_DATAL	(MCF_IPSBAR + 0x100012)
1228c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL	(MCF_IPSBAR + 0x100013)
1238c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BS		(MCF_IPSBAR + 0x100014)
1248c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_CS		(MCF_IPSBAR + 0x100015)
1258c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM	(MCF_IPSBAR + 0x100016)
1268c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C	(MCF_IPSBAR + 0x100017)
1278c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTH	(MCF_IPSBAR + 0x100018)
1288c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTL	(MCF_IPSBAR + 0x100019)
1298c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_QSPI	(MCF_IPSBAR + 0x10001A)
1308c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_TIMER	(MCF_IPSBAR + 0x10001B)
1318c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_ETPU	(MCF_IPSBAR + 0x10001C)
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR	(MCF_IPSBAR + 0x100020)
1348c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAH	(MCF_IPSBAR + 0x100021)
1358c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAL	(MCF_IPSBAR + 0x100022)
1368c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL	(MCF_IPSBAR + 0x100023)
1378c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BS	(MCF_IPSBAR + 0x100024)
1388c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_CS	(MCF_IPSBAR + 0x100025)
1398c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM	(MCF_IPSBAR + 0x100026)
1408c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C	(MCF_IPSBAR + 0x100027)
1418c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH	(MCF_IPSBAR + 0x100028)
1428c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL	(MCF_IPSBAR + 0x100029)
1438c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI	(MCF_IPSBAR + 0x10002A)
1448c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMER	(MCF_IPSBAR + 0x10002B)
1458c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_ETPU	(MCF_IPSBAR + 0x10002C)
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR	(MCF_IPSBAR + 0x100030)
1488c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_DATAH	(MCF_IPSBAR + 0x100031)
1498c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_DATAL	(MCF_IPSBAR + 0x100032)
1508c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL	(MCF_IPSBAR + 0x100033)
1518c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BS	(MCF_IPSBAR + 0x100034)
1528c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_CS	(MCF_IPSBAR + 0x100035)
1538c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM	(MCF_IPSBAR + 0x100036)
1548c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C	(MCF_IPSBAR + 0x100037)
1558c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH	(MCF_IPSBAR + 0x100038)
1568c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL	(MCF_IPSBAR + 0x100039)
1578c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI	(MCF_IPSBAR + 0x10003A)
1588c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_TIMER	(MCF_IPSBAR + 0x10003B)
1598c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_ETPU	(MCF_IPSBAR + 0x10003C)
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci/*
1628c2ecf20Sopenharmony_ci * PIT timer base addresses.
1638c2ecf20Sopenharmony_ci */
1648c2ecf20Sopenharmony_ci#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x150000)
1658c2ecf20Sopenharmony_ci#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x160000)
1668c2ecf20Sopenharmony_ci#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x170000)
1678c2ecf20Sopenharmony_ci#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x180000)
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci/*
1708c2ecf20Sopenharmony_ci * EPort
1718c2ecf20Sopenharmony_ci */
1728c2ecf20Sopenharmony_ci#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)
1738c2ecf20Sopenharmony_ci#define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002)
1748c2ecf20Sopenharmony_ci#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)
1758c2ecf20Sopenharmony_ci#define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)
1768c2ecf20Sopenharmony_ci#define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005)
1778c2ecf20Sopenharmony_ci#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ci/*
1808c2ecf20Sopenharmony_ci * Generic GPIO support
1818c2ecf20Sopenharmony_ci */
1828c2ecf20Sopenharmony_ci#define MCFGPIO_PODR		MCFGPIO_PODR_ADDR
1838c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR		MCFGPIO_PDDR_ADDR
1848c2ecf20Sopenharmony_ci#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_ADDR
1858c2ecf20Sopenharmony_ci#define MCFGPIO_SETR		MCFGPIO_PPDSDR_ADDR
1868c2ecf20Sopenharmony_ci#define MCFGPIO_CLRR		MCFGPIO_PCLRR_ADDR
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci#define MCFGPIO_PIN_MAX		107
1898c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_MAX		8
1908c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci/*
1938c2ecf20Sopenharmony_ci * Pin Assignment
1948c2ecf20Sopenharmony_ci*/
1958c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100040)
1968c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100042)
1978c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100044)
1988c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100045)
1998c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100046)
2008c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100047)
2018c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x100048)
2028c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10004A)
2038c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10004C)
2048c2ecf20Sopenharmony_ci#define	MCFGPIO_PAR_ETPU	(MCF_IPSBAR + 0x10004E)
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_ci/*
2078c2ecf20Sopenharmony_ci * DMA unit base addresses.
2088c2ecf20Sopenharmony_ci */
2098c2ecf20Sopenharmony_ci#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x100)
2108c2ecf20Sopenharmony_ci#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x140)
2118c2ecf20Sopenharmony_ci#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x180)
2128c2ecf20Sopenharmony_ci#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x1C0)
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ci/*
2158c2ecf20Sopenharmony_ci * I2C module.
2168c2ecf20Sopenharmony_ci */
2178c2ecf20Sopenharmony_ci#define	MCFI2C_BASE0		(MCF_IPSBAR + 0x300)
2188c2ecf20Sopenharmony_ci#define	MCFI2C_SIZE0		0x40
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci/****************************************************************************/
2218c2ecf20Sopenharmony_ci#endif	/* m523xsim_h */
222