18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/****************************************************************************/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci *	m5272sim.h -- ColdFire 5272 System Integration Module support.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *	(C) Copyright 1999, Greg Ungerer (gerg@snapgear.com)
88c2ecf20Sopenharmony_ci * 	(C) Copyright 2000, Lineo Inc. (www.lineo.com)
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/****************************************************************************/
128c2ecf20Sopenharmony_ci#ifndef	m5272sim_h
138c2ecf20Sopenharmony_ci#define	m5272sim_h
148c2ecf20Sopenharmony_ci/****************************************************************************/
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define	CPU_NAME		"COLDFIRE(m5272)"
178c2ecf20Sopenharmony_ci#define	CPU_INSTR_PER_JIFFY	3
188c2ecf20Sopenharmony_ci#define	MCF_BUSCLK		MCF_CLK
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#include <asm/m52xxacr.h>
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/*
238c2ecf20Sopenharmony_ci *	Define the 5272 SIM register set addresses.
248c2ecf20Sopenharmony_ci */
258c2ecf20Sopenharmony_ci#define	MCFSIM_SCR		(MCF_MBAR + 0x04)	/* SIM Config reg */
268c2ecf20Sopenharmony_ci#define	MCFSIM_SPR		(MCF_MBAR + 0x06)	/* System Protection */
278c2ecf20Sopenharmony_ci#define	MCFSIM_PMR		(MCF_MBAR + 0x08)	/* Power Management */
288c2ecf20Sopenharmony_ci#define	MCFSIM_APMR		(MCF_MBAR + 0x0e)	/* Active Low Power */
298c2ecf20Sopenharmony_ci#define	MCFSIM_DIR		(MCF_MBAR + 0x10)	/* Device Identity */
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define	MCFSIM_ICR1		(MCF_MBAR + 0x20)	/* Intr Ctrl reg 1 */
328c2ecf20Sopenharmony_ci#define	MCFSIM_ICR2		(MCF_MBAR + 0x24)	/* Intr Ctrl reg 2 */
338c2ecf20Sopenharmony_ci#define	MCFSIM_ICR3		(MCF_MBAR + 0x28)	/* Intr Ctrl reg 3 */
348c2ecf20Sopenharmony_ci#define	MCFSIM_ICR4		(MCF_MBAR + 0x2c)	/* Intr Ctrl reg 4 */
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#define	MCFSIM_ISR		(MCF_MBAR + 0x30)	/* Intr Source */
378c2ecf20Sopenharmony_ci#define	MCFSIM_PITR		(MCF_MBAR + 0x34)	/* Intr Transition */
388c2ecf20Sopenharmony_ci#define	MCFSIM_PIWR		(MCF_MBAR + 0x38)	/* Intr Wakeup */
398c2ecf20Sopenharmony_ci#define	MCFSIM_PIVR		(MCF_MBAR + 0x3f)	/* Intr Vector */
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#define	MCFSIM_WRRR		(MCF_MBAR + 0x280)	/* Watchdog reference */
428c2ecf20Sopenharmony_ci#define	MCFSIM_WIRR		(MCF_MBAR + 0x284)	/* Watchdog interrupt */
438c2ecf20Sopenharmony_ci#define	MCFSIM_WCR		(MCF_MBAR + 0x288)	/* Watchdog counter */
448c2ecf20Sopenharmony_ci#define	MCFSIM_WER		(MCF_MBAR + 0x28c)	/* Watchdog event */
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR0		(MCF_MBAR + 0x40)	/* CS0 Base Address */
478c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR0		(MCF_MBAR + 0x44)	/* CS0 Option */
488c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR1		(MCF_MBAR + 0x48)	/* CS1 Base Address */
498c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR1		(MCF_MBAR + 0x4c)	/* CS1 Option */
508c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR2		(MCF_MBAR + 0x50)	/* CS2 Base Address */
518c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR2		(MCF_MBAR + 0x54)	/* CS2 Option */
528c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR3		(MCF_MBAR + 0x58)	/* CS3 Base Address */
538c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR3		(MCF_MBAR + 0x5c)	/* CS3 Option */
548c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR4		(MCF_MBAR + 0x60)	/* CS4 Base Address */
558c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR4		(MCF_MBAR + 0x64)	/* CS4 Option */
568c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR5		(MCF_MBAR + 0x68)	/* CS5 Base Address */
578c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR5		(MCF_MBAR + 0x6c)	/* CS5 Option */
588c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR6		(MCF_MBAR + 0x70)	/* CS6 Base Address */
598c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR6		(MCF_MBAR + 0x74)	/* CS6 Option */
608c2ecf20Sopenharmony_ci#define	MCFSIM_CSBR7		(MCF_MBAR + 0x78)	/* CS7 Base Address */
618c2ecf20Sopenharmony_ci#define	MCFSIM_CSOR7		(MCF_MBAR + 0x7c)	/* CS7 Option */
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci#define	MCFSIM_SDCR		(MCF_MBAR + 0x180)	/* SDRAM Config */
648c2ecf20Sopenharmony_ci#define	MCFSIM_SDTR		(MCF_MBAR + 0x184)	/* SDRAM Timing */
658c2ecf20Sopenharmony_ci#define	MCFSIM_DCAR0		(MCF_MBAR + 0x4c)	/* DRAM 0 Address */
668c2ecf20Sopenharmony_ci#define	MCFSIM_DCMR0		(MCF_MBAR + 0x50)	/* DRAM 0 Mask */
678c2ecf20Sopenharmony_ci#define	MCFSIM_DCCR0		(MCF_MBAR + 0x57)	/* DRAM 0 Control */
688c2ecf20Sopenharmony_ci#define	MCFSIM_DCAR1		(MCF_MBAR + 0x58)	/* DRAM 1 Address */
698c2ecf20Sopenharmony_ci#define	MCFSIM_DCMR1		(MCF_MBAR + 0x5c)	/* DRAM 1 Mask reg */
708c2ecf20Sopenharmony_ci#define	MCFSIM_DCCR1		(MCF_MBAR + 0x63)	/* DRAM 1 Control */
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define	MCFUART_BASE0		(MCF_MBAR + 0x100) /* Base address UART0 */
738c2ecf20Sopenharmony_ci#define	MCFUART_BASE1		(MCF_MBAR + 0x140) /* Base address UART1 */
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci#define	MCFSIM_PACNT		(MCF_MBAR + 0x80) /* Port A Control (r/w) */
768c2ecf20Sopenharmony_ci#define	MCFSIM_PADDR		(MCF_MBAR + 0x84) /* Port A Direction (r/w) */
778c2ecf20Sopenharmony_ci#define	MCFSIM_PADAT		(MCF_MBAR + 0x86) /* Port A Data (r/w) */
788c2ecf20Sopenharmony_ci#define	MCFSIM_PBCNT		(MCF_MBAR + 0x88) /* Port B Control (r/w) */
798c2ecf20Sopenharmony_ci#define	MCFSIM_PBDDR		(MCF_MBAR + 0x8c) /* Port B Direction (r/w) */
808c2ecf20Sopenharmony_ci#define	MCFSIM_PBDAT		(MCF_MBAR + 0x8e) /* Port B Data (r/w) */
818c2ecf20Sopenharmony_ci#define	MCFSIM_PCDDR		(MCF_MBAR + 0x94) /* Port C Direction (r/w) */
828c2ecf20Sopenharmony_ci#define	MCFSIM_PCDAT		(MCF_MBAR + 0x96) /* Port C Data (r/w) */
838c2ecf20Sopenharmony_ci#define	MCFSIM_PDCNT		(MCF_MBAR + 0x98) /* Port D Control (r/w) */
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci#define	MCFDMA_BASE0		(MCF_MBAR + 0xe0) /* Base address DMA 0 */
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci#define	MCFTIMER_BASE1		(MCF_MBAR + 0x200) /* Base address TIMER1 */
888c2ecf20Sopenharmony_ci#define	MCFTIMER_BASE2		(MCF_MBAR + 0x220) /* Base address TIMER2 */
898c2ecf20Sopenharmony_ci#define	MCFTIMER_BASE3		(MCF_MBAR + 0x240) /* Base address TIMER4 */
908c2ecf20Sopenharmony_ci#define	MCFTIMER_BASE4		(MCF_MBAR + 0x260) /* Base address TIMER3 */
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci#define	MCFFEC_BASE0		(MCF_MBAR + 0x840) /* Base FEC ethernet */
938c2ecf20Sopenharmony_ci#define	MCFFEC_SIZE0		0x1d0
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci/*
968c2ecf20Sopenharmony_ci *	Define system peripheral IRQ usage.
978c2ecf20Sopenharmony_ci */
988c2ecf20Sopenharmony_ci#define	MCFINT_VECBASE		64		/* Base of interrupts */
998c2ecf20Sopenharmony_ci#define	MCF_IRQ_SPURIOUS	64		/* User Spurious */
1008c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT1		65		/* External Interrupt 1 */
1018c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT2		66		/* External Interrupt 2 */
1028c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT3		67		/* External Interrupt 3 */
1038c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT4		68		/* External Interrupt 4 */
1048c2ecf20Sopenharmony_ci#define	MCF_IRQ_TIMER1		69		/* Timer 1 */
1058c2ecf20Sopenharmony_ci#define	MCF_IRQ_TIMER2		70		/* Timer 2 */
1068c2ecf20Sopenharmony_ci#define	MCF_IRQ_TIMER3		71		/* Timer 3 */
1078c2ecf20Sopenharmony_ci#define	MCF_IRQ_TIMER4		72		/* Timer 4 */
1088c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART0		73		/* UART 0 */
1098c2ecf20Sopenharmony_ci#define	MCF_IRQ_UART1		74		/* UART 1 */
1108c2ecf20Sopenharmony_ci#define	MCF_IRQ_PLIP		75		/* PLIC 2Khz Periodic */
1118c2ecf20Sopenharmony_ci#define	MCF_IRQ_PLIA		76		/* PLIC Asynchronous */
1128c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB0		77		/* USB Endpoint 0 */
1138c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB1		78		/* USB Endpoint 1 */
1148c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB2		79		/* USB Endpoint 2 */
1158c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB3		80		/* USB Endpoint 3 */
1168c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB4		81		/* USB Endpoint 4 */
1178c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB5		82		/* USB Endpoint 5 */
1188c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB6		83		/* USB Endpoint 6 */
1198c2ecf20Sopenharmony_ci#define	MCF_IRQ_USB7		84		/* USB Endpoint 7 */
1208c2ecf20Sopenharmony_ci#define	MCF_IRQ_DMA		85		/* DMA Controller */
1218c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECRX0		86		/* Ethernet Receiver */
1228c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECTX0		87		/* Ethernet Transmitter */
1238c2ecf20Sopenharmony_ci#define	MCF_IRQ_FECENTC0	88		/* Ethernet Non-Time Critical */
1248c2ecf20Sopenharmony_ci#define	MCF_IRQ_QSPI		89		/* Queued Serial Interface */
1258c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT5		90		/* External Interrupt 5 */
1268c2ecf20Sopenharmony_ci#define	MCF_IRQ_EINT6		91		/* External Interrupt 6 */
1278c2ecf20Sopenharmony_ci#define	MCF_IRQ_SWTO		92		/* Software Watchdog */
1288c2ecf20Sopenharmony_ci#define	MCFINT_VECMAX		95		/* Maxmum interrupt */
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci#define	MCF_IRQ_TIMER		MCF_IRQ_TIMER1
1318c2ecf20Sopenharmony_ci#define	MCF_IRQ_PROFILER	MCF_IRQ_TIMER2
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci/*
1348c2ecf20Sopenharmony_ci * Generic GPIO support
1358c2ecf20Sopenharmony_ci */
1368c2ecf20Sopenharmony_ci#define MCFGPIO_PIN_MAX		48
1378c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_MAX		-1
1388c2ecf20Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE	-1
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci/****************************************************************************/
1418c2ecf20Sopenharmony_ci#endif	/* m5272sim_h */
142