18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/****************************************************************************/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci *	m527xsim.h -- ColdFire 5270/5271 System Integration Module support.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *	(C) Copyright 2004, Greg Ungerer (gerg@snapgear.com)
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/****************************************************************************/
118c2ecf20Sopenharmony_ci#ifndef	m527xsim_h
128c2ecf20Sopenharmony_ci#define	m527xsim_h
138c2ecf20Sopenharmony_ci/****************************************************************************/
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define	CPU_NAME		"COLDFIRE(m527x)"
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 5270/5271 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 1 */
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 FEC0 */
448c2ecf20Sopenharmony_ci#define	MCFINT_FECTX0		27		/* Interrupt number for FEC0 */
458c2ecf20Sopenharmony_ci#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC0 */
468c2ecf20Sopenharmony_ci#define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#define	MCFINT2_VECBASE		128		/* Vector base number 2 */
498c2ecf20Sopenharmony_ci#define	MCFINT2_FECRX1		23		/* Interrupt number for FEC1 */
508c2ecf20Sopenharmony_ci#define	MCFINT2_FECTX1		27		/* Interrupt number for FEC1 */
518c2ecf20Sopenharmony_ci#define	MCFINT2_FECENTC1	29		/* Interrupt number for FEC1 */
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0)
548c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1)
558c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2)
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0)
588c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0)
598c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0)
608c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECRX1		(MCFINT2_VECBASE + MCFINT2_FECRX1)
618c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECTX1		(MCFINT2_VECBASE + MCFINT2_FECTX1)
628c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECENTC1	(MCFINT2_VECBASE + MCFINT2_FECENTC1)
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI)
658c2ecf20Sopenharmony_ci#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1)
668c2ecf20Sopenharmony_ci#define	MCF_IRQ_I2C0		(MCFINT_VECBASE + MCFINT_I2C0)
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci/*
698c2ecf20Sopenharmony_ci *	SDRAM configuration registers.
708c2ecf20Sopenharmony_ci */
718c2ecf20Sopenharmony_ci#ifdef CONFIG_M5271
728c2ecf20Sopenharmony_ci#define	MCFSIM_DCR		(MCF_IPSBAR + 0x40)	/* Control */
738c2ecf20Sopenharmony_ci#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x48)	/* Base address 0 */
748c2ecf20Sopenharmony_ci#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x4c)	/* Address mask 0 */
758c2ecf20Sopenharmony_ci#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x50)	/* Base address 1 */
768c2ecf20Sopenharmony_ci#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x54)	/* Address mask 1 */
778c2ecf20Sopenharmony_ci#endif
788c2ecf20Sopenharmony_ci#ifdef CONFIG_M5275
798c2ecf20Sopenharmony_ci#define	MCFSIM_DMR		(MCF_IPSBAR + 0x40)	/* Mode */
808c2ecf20Sopenharmony_ci#define	MCFSIM_DCR		(MCF_IPSBAR + 0x44)	/* Control */
818c2ecf20Sopenharmony_ci#define	MCFSIM_DCFG1		(MCF_IPSBAR + 0x48)	/* Configuration 1 */
828c2ecf20Sopenharmony_ci#define	MCFSIM_DCFG2		(MCF_IPSBAR + 0x4c)	/* Configuration 2 */
838c2ecf20Sopenharmony_ci#define	MCFSIM_DBAR0		(MCF_IPSBAR + 0x50)	/* Base address 0 */
848c2ecf20Sopenharmony_ci#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x54)	/* Address mask 0 */
858c2ecf20Sopenharmony_ci#define	MCFSIM_DBAR1		(MCF_IPSBAR + 0x58)	/* Base address 1 */
868c2ecf20Sopenharmony_ci#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x5c)	/* Address mask 1 */
878c2ecf20Sopenharmony_ci#endif
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci/*
908c2ecf20Sopenharmony_ci *	DMA unit base addresses.
918c2ecf20Sopenharmony_ci */
928c2ecf20Sopenharmony_ci#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x100)
938c2ecf20Sopenharmony_ci#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x140)
948c2ecf20Sopenharmony_ci#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x180)
958c2ecf20Sopenharmony_ci#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x1C0)
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci/*
988c2ecf20Sopenharmony_ci *	UART module.
998c2ecf20Sopenharmony_ci */
1008c2ecf20Sopenharmony_ci#define MCFUART_BASE0		(MCF_IPSBAR + 0x200)
1018c2ecf20Sopenharmony_ci#define MCFUART_BASE1		(MCF_IPSBAR + 0x240)
1028c2ecf20Sopenharmony_ci#define MCFUART_BASE2		(MCF_IPSBAR + 0x280)
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci/*
1058c2ecf20Sopenharmony_ci *	FEC ethernet module.
1068c2ecf20Sopenharmony_ci */
1078c2ecf20Sopenharmony_ci#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x1000)
1088c2ecf20Sopenharmony_ci#define	MCFFEC_SIZE0		0x800
1098c2ecf20Sopenharmony_ci#ifdef CONFIG_M5275
1108c2ecf20Sopenharmony_ci#define	MCFFEC_BASE1		(MCF_IPSBAR + 0x1800)
1118c2ecf20Sopenharmony_ci#define	MCFFEC_SIZE1		0x800
1128c2ecf20Sopenharmony_ci#endif
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ci/*
1158c2ecf20Sopenharmony_ci *	QSPI module.
1168c2ecf20Sopenharmony_ci */
1178c2ecf20Sopenharmony_ci#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340)
1188c2ecf20Sopenharmony_ci#define	MCFQSPI_SIZE		0x40
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci#ifdef CONFIG_M5271
1218c2ecf20Sopenharmony_ci#define	MCFQSPI_CS0		91
1228c2ecf20Sopenharmony_ci#define	MCFQSPI_CS1		92
1238c2ecf20Sopenharmony_ci#define	MCFQSPI_CS2		99
1248c2ecf20Sopenharmony_ci#define	MCFQSPI_CS3		103
1258c2ecf20Sopenharmony_ci#endif
1268c2ecf20Sopenharmony_ci#ifdef CONFIG_M5275
1278c2ecf20Sopenharmony_ci#define	MCFQSPI_CS0		59
1288c2ecf20Sopenharmony_ci#define	MCFQSPI_CS1		60
1298c2ecf20Sopenharmony_ci#define	MCFQSPI_CS2		61
1308c2ecf20Sopenharmony_ci#define	MCFQSPI_CS3		62
1318c2ecf20Sopenharmony_ci#endif
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci/*
1348c2ecf20Sopenharmony_ci *	GPIO module.
1358c2ecf20Sopenharmony_ci */
1368c2ecf20Sopenharmony_ci#ifdef CONFIG_M5271
1378c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100000)
1388c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_DATAH	(MCF_IPSBAR + 0x100001)
1398c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_DATAL	(MCF_IPSBAR + 0x100002)
1408c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL	(MCF_IPSBAR + 0x100003)
1418c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BS		(MCF_IPSBAR + 0x100004)
1428c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_CS		(MCF_IPSBAR + 0x100005)
1438c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_SDRAM	(MCF_IPSBAR + 0x100006)
1448c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FECI2C	(MCF_IPSBAR + 0x100007)
1458c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTH	(MCF_IPSBAR + 0x100008)
1468c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTL	(MCF_IPSBAR + 0x100009)
1478c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_QSPI	(MCF_IPSBAR + 0x10000A)
1488c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_TIMER	(MCF_IPSBAR + 0x10000B)
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_ADDR	(MCF_IPSBAR + 0x100010)
1518c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_DATAH	(MCF_IPSBAR + 0x100011)
1528c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_DATAL	(MCF_IPSBAR + 0x100012)
1538c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL	(MCF_IPSBAR + 0x100013)
1548c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BS		(MCF_IPSBAR + 0x100014)
1558c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_CS		(MCF_IPSBAR + 0x100015)
1568c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM	(MCF_IPSBAR + 0x100016)
1578c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C	(MCF_IPSBAR + 0x100017)
1588c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTH	(MCF_IPSBAR + 0x100018)
1598c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTL	(MCF_IPSBAR + 0x100019)
1608c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_QSPI	(MCF_IPSBAR + 0x10001A)
1618c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_TIMER	(MCF_IPSBAR + 0x10001B)
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR	(MCF_IPSBAR + 0x100020)
1648c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAH	(MCF_IPSBAR + 0x100021)
1658c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAL	(MCF_IPSBAR + 0x100022)
1668c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL	(MCF_IPSBAR + 0x100023)
1678c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BS	(MCF_IPSBAR + 0x100024)
1688c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_CS	(MCF_IPSBAR + 0x100025)
1698c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM	(MCF_IPSBAR + 0x100026)
1708c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C	(MCF_IPSBAR + 0x100027)
1718c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH	(MCF_IPSBAR + 0x100028)
1728c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL	(MCF_IPSBAR + 0x100029)
1738c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI	(MCF_IPSBAR + 0x10002A)
1748c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMER	(MCF_IPSBAR + 0x10002B)
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR	(MCF_IPSBAR + 0x100030)
1778c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_DATAH	(MCF_IPSBAR + 0x100031)
1788c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_DATAL	(MCF_IPSBAR + 0x100032)
1798c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL	(MCF_IPSBAR + 0x100033)
1808c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BS	(MCF_IPSBAR + 0x100034)
1818c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_CS	(MCF_IPSBAR + 0x100035)
1828c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM	(MCF_IPSBAR + 0x100036)
1838c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C	(MCF_IPSBAR + 0x100037)
1848c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH	(MCF_IPSBAR + 0x100038)
1858c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL	(MCF_IPSBAR + 0x100039)
1868c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI	(MCF_IPSBAR + 0x10003A)
1878c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_TIMER	(MCF_IPSBAR + 0x10003B)
1888c2ecf20Sopenharmony_ci
1898c2ecf20Sopenharmony_ci/*
1908c2ecf20Sopenharmony_ci * Generic GPIO support
1918c2ecf20Sopenharmony_ci */
1928c2ecf20Sopenharmony_ci#define MCFGPIO_PODR		MCFGPIO_PODR_ADDR
1938c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR		MCFGPIO_PDDR_ADDR
1948c2ecf20Sopenharmony_ci#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_ADDR
1958c2ecf20Sopenharmony_ci#define MCFGPIO_SETR		MCFGPIO_PPDSDR_ADDR
1968c2ecf20Sopenharmony_ci#define MCFGPIO_CLRR		MCFGPIO_PCLRR_ADDR
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci#define MCFGPIO_PIN_MAX		100
1998c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_MAX		8
2008c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci/*
2038c2ecf20Sopenharmony_ci * Port Pin Assignment registers.
2048c2ecf20Sopenharmony_ci */
2058c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100040)
2068c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100042)
2078c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100044)
2088c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100045)
2098c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100046)
2108c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100047)
2118c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x100048)
2128c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10004A)
2138c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10004C)
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci#define UART0_ENABLE_MASK	0x000f
2168c2ecf20Sopenharmony_ci#define UART1_ENABLE_MASK	0x0ff0
2178c2ecf20Sopenharmony_ci#define UART2_ENABLE_MASK	0x3000
2188c2ecf20Sopenharmony_ci#endif /* CONFIG_M5271 */
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci#ifdef CONFIG_M5275
2218c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL	(MCF_IPSBAR + 0x100004)
2228c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100005)
2238c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_CS		(MCF_IPSBAR + 0x100008)
2248c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FEC0H	(MCF_IPSBAR + 0x10000A)
2258c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FEC0L	(MCF_IPSBAR + 0x10000B)
2268c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FECI2C	(MCF_IPSBAR + 0x10000C)
2278c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_QSPI	(MCF_IPSBAR + 0x10000D)
2288c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_SDRAM	(MCF_IPSBAR + 0x10000E)
2298c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_TIMERH	(MCF_IPSBAR + 0x10000F)
2308c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_TIMERL	(MCF_IPSBAR + 0x100010)
2318c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTL	(MCF_IPSBAR + 0x100011)
2328c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FEC1H	(MCF_IPSBAR + 0x100012)
2338c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_FEC1L	(MCF_IPSBAR + 0x100013)
2348c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_BS		(MCF_IPSBAR + 0x100014)
2358c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_IRQ	(MCF_IPSBAR + 0x100015)
2368c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_USBH	(MCF_IPSBAR + 0x100016)
2378c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_USBL	(MCF_IPSBAR + 0x100017)
2388c2ecf20Sopenharmony_ci#define MCFGPIO_PODR_UARTH	(MCF_IPSBAR + 0x100018)
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL	(MCF_IPSBAR + 0x100020)
2418c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_ADDR	(MCF_IPSBAR + 0x100021)
2428c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_CS		(MCF_IPSBAR + 0x100024)
2438c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FEC0H	(MCF_IPSBAR + 0x100026)
2448c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FEC0L	(MCF_IPSBAR + 0x100027)
2458c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C	(MCF_IPSBAR + 0x100028)
2468c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_QSPI	(MCF_IPSBAR + 0x100029)
2478c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM	(MCF_IPSBAR + 0x10002A)
2488c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_TIMERH	(MCF_IPSBAR + 0x10002B)
2498c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_TIMERL	(MCF_IPSBAR + 0x10002C)
2508c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTL	(MCF_IPSBAR + 0x10002D)
2518c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FEC1H	(MCF_IPSBAR + 0x10002E)
2528c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_FEC1L	(MCF_IPSBAR + 0x10002F)
2538c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_BS		(MCF_IPSBAR + 0x100030)
2548c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_IRQ	(MCF_IPSBAR + 0x100031)
2558c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_USBH	(MCF_IPSBAR + 0x100032)
2568c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_USBL	(MCF_IPSBAR + 0x100033)
2578c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR_UARTH	(MCF_IPSBAR + 0x100034)
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL	(MCF_IPSBAR + 0x10003C)
2608c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR	(MCF_IPSBAR + 0x10003D)
2618c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_CS	(MCF_IPSBAR + 0x100040)
2628c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC0H	(MCF_IPSBAR + 0x100042)
2638c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC0L	(MCF_IPSBAR + 0x100043)
2648c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C	(MCF_IPSBAR + 0x100044)
2658c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI	(MCF_IPSBAR + 0x100045)
2668c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM	(MCF_IPSBAR + 0x100046)
2678c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMERH	(MCF_IPSBAR + 0x100047)
2688c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMERL	(MCF_IPSBAR + 0x100048)
2698c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL	(MCF_IPSBAR + 0x100049)
2708c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC1H	(MCF_IPSBAR + 0x10004A)
2718c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC1L	(MCF_IPSBAR + 0x10004B)
2728c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_BS	(MCF_IPSBAR + 0x10004C)
2738c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_IRQ	(MCF_IPSBAR + 0x10004D)
2748c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_USBH	(MCF_IPSBAR + 0x10004E)
2758c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_USBL	(MCF_IPSBAR + 0x10004F)
2768c2ecf20Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH	(MCF_IPSBAR + 0x100050)
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL	(MCF_IPSBAR + 0x100058)
2798c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR	(MCF_IPSBAR + 0x100059)
2808c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_CS	(MCF_IPSBAR + 0x10005C)
2818c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FEC0H	(MCF_IPSBAR + 0x10005E)
2828c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FEC0L	(MCF_IPSBAR + 0x10005F)
2838c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C	(MCF_IPSBAR + 0x100060)
2848c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI	(MCF_IPSBAR + 0x100061)
2858c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM	(MCF_IPSBAR + 0x100062)
2868c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_TIMERH	(MCF_IPSBAR + 0x100063)
2878c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_TIMERL	(MCF_IPSBAR + 0x100064)
2888c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL	(MCF_IPSBAR + 0x100065)
2898c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FEC1H	(MCF_IPSBAR + 0x100066)
2908c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_FEC1L	(MCF_IPSBAR + 0x100067)
2918c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_BS	(MCF_IPSBAR + 0x100068)
2928c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_IRQ	(MCF_IPSBAR + 0x100069)
2938c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_USBH	(MCF_IPSBAR + 0x10006A)
2948c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_USBL	(MCF_IPSBAR + 0x10006B)
2958c2ecf20Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH	(MCF_IPSBAR + 0x10006C)
2968c2ecf20Sopenharmony_ci
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ci/*
2998c2ecf20Sopenharmony_ci * Generic GPIO support
3008c2ecf20Sopenharmony_ci */
3018c2ecf20Sopenharmony_ci#define MCFGPIO_PODR		MCFGPIO_PODR_BUSCTL
3028c2ecf20Sopenharmony_ci#define MCFGPIO_PDDR		MCFGPIO_PDDR_BUSCTL
3038c2ecf20Sopenharmony_ci#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_BUSCTL
3048c2ecf20Sopenharmony_ci#define MCFGPIO_SETR		MCFGPIO_PPDSDR_BUSCTL
3058c2ecf20Sopenharmony_ci#define MCFGPIO_CLRR		MCFGPIO_PCLRR_BUSCTL
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_ci#define MCFGPIO_PIN_MAX		148
3088c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_MAX		8
3098c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ci/*
3128c2ecf20Sopenharmony_ci * Port Pin Assignment registers.
3138c2ecf20Sopenharmony_ci */
3148c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100070)
3158c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100071)
3168c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100072)
3178c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_USB		(MCF_IPSBAR + 0x100076)
3188c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_FEC0HL	(MCF_IPSBAR + 0x100078)
3198c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_FEC1HL	(MCF_IPSBAR + 0x100079)
3208c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10007A)
3218c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x10007C)
3228c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10007E)
3238c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100080)
3248c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100082)
3258c2ecf20Sopenharmony_ci#define MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100084)
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_ci#define UART0_ENABLE_MASK	0x000f
3288c2ecf20Sopenharmony_ci#define UART1_ENABLE_MASK	0x00f0
3298c2ecf20Sopenharmony_ci#define UART2_ENABLE_MASK	0x3f00
3308c2ecf20Sopenharmony_ci#endif /* CONFIG_M5275 */
3318c2ecf20Sopenharmony_ci
3328c2ecf20Sopenharmony_ci/*
3338c2ecf20Sopenharmony_ci * PIT timer base addresses.
3348c2ecf20Sopenharmony_ci */
3358c2ecf20Sopenharmony_ci#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x150000)
3368c2ecf20Sopenharmony_ci#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x160000)
3378c2ecf20Sopenharmony_ci#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x170000)
3388c2ecf20Sopenharmony_ci#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x180000)
3398c2ecf20Sopenharmony_ci
3408c2ecf20Sopenharmony_ci/*
3418c2ecf20Sopenharmony_ci * EPort
3428c2ecf20Sopenharmony_ci */
3438c2ecf20Sopenharmony_ci#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)
3448c2ecf20Sopenharmony_ci#define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002)
3458c2ecf20Sopenharmony_ci#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)
3468c2ecf20Sopenharmony_ci#define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)
3478c2ecf20Sopenharmony_ci#define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005)
3488c2ecf20Sopenharmony_ci#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_ci/*
3518c2ecf20Sopenharmony_ci *  Reset Control Unit (relative to IPSBAR).
3528c2ecf20Sopenharmony_ci */
3538c2ecf20Sopenharmony_ci#define	MCF_RCR			(MCF_IPSBAR + 0x110000)
3548c2ecf20Sopenharmony_ci#define	MCF_RSR			(MCF_IPSBAR + 0x110001)
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_ci#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */
3578c2ecf20Sopenharmony_ci#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */
3588c2ecf20Sopenharmony_ci
3598c2ecf20Sopenharmony_ci/*
3608c2ecf20Sopenharmony_ci * I2C module.
3618c2ecf20Sopenharmony_ci */
3628c2ecf20Sopenharmony_ci#define	MCFI2C_BASE0		(MCF_IPSBAR + 0x300)
3638c2ecf20Sopenharmony_ci#define	MCFI2C_SIZE0		0x40
3648c2ecf20Sopenharmony_ci
3658c2ecf20Sopenharmony_ci/****************************************************************************/
3668c2ecf20Sopenharmony_ci#endif	/* m527xsim_h */
367