162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/****************************************************************************/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* 562306a36Sopenharmony_ci * m5206sim.h -- ColdFire 5206 System Integration Module support. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * (C) Copyright 1999, Greg Ungerer (gerg@snapgear.com) 862306a36Sopenharmony_ci * (C) Copyright 2000, Lineo Inc. (www.lineo.com) 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/****************************************************************************/ 1262306a36Sopenharmony_ci#ifndef m5206sim_h 1362306a36Sopenharmony_ci#define m5206sim_h 1462306a36Sopenharmony_ci/****************************************************************************/ 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define CPU_NAME "COLDFIRE(m5206)" 1762306a36Sopenharmony_ci#define CPU_INSTR_PER_JIFFY 3 1862306a36Sopenharmony_ci#define MCF_BUSCLK MCF_CLK 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#include <asm/m52xxacr.h> 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* 2362306a36Sopenharmony_ci * Define the 5206 SIM register set addresses. 2462306a36Sopenharmony_ci */ 2562306a36Sopenharmony_ci#define MCFSIM_SIMR (MCF_MBAR + 0x03) /* SIM Config reg */ 2662306a36Sopenharmony_ci#define MCFSIM_ICR1 (MCF_MBAR + 0x14) /* Intr Ctrl reg 1 */ 2762306a36Sopenharmony_ci#define MCFSIM_ICR2 (MCF_MBAR + 0x15) /* Intr Ctrl reg 2 */ 2862306a36Sopenharmony_ci#define MCFSIM_ICR3 (MCF_MBAR + 0x16) /* Intr Ctrl reg 3 */ 2962306a36Sopenharmony_ci#define MCFSIM_ICR4 (MCF_MBAR + 0x17) /* Intr Ctrl reg 4 */ 3062306a36Sopenharmony_ci#define MCFSIM_ICR5 (MCF_MBAR + 0x18) /* Intr Ctrl reg 5 */ 3162306a36Sopenharmony_ci#define MCFSIM_ICR6 (MCF_MBAR + 0x19) /* Intr Ctrl reg 6 */ 3262306a36Sopenharmony_ci#define MCFSIM_ICR7 (MCF_MBAR + 0x1a) /* Intr Ctrl reg 7 */ 3362306a36Sopenharmony_ci#define MCFSIM_ICR8 (MCF_MBAR + 0x1b) /* Intr Ctrl reg 8 */ 3462306a36Sopenharmony_ci#define MCFSIM_ICR9 (MCF_MBAR + 0x1c) /* Intr Ctrl reg 9 */ 3562306a36Sopenharmony_ci#define MCFSIM_ICR10 (MCF_MBAR + 0x1d) /* Intr Ctrl reg 10 */ 3662306a36Sopenharmony_ci#define MCFSIM_ICR11 (MCF_MBAR + 0x1e) /* Intr Ctrl reg 11 */ 3762306a36Sopenharmony_ci#define MCFSIM_ICR12 (MCF_MBAR + 0x1f) /* Intr Ctrl reg 12 */ 3862306a36Sopenharmony_ci#define MCFSIM_ICR13 (MCF_MBAR + 0x20) /* Intr Ctrl reg 13 */ 3962306a36Sopenharmony_ci#ifdef CONFIG_M5206e 4062306a36Sopenharmony_ci#define MCFSIM_ICR14 (MCF_MBAR + 0x21) /* Intr Ctrl reg 14 */ 4162306a36Sopenharmony_ci#define MCFSIM_ICR15 (MCF_MBAR + 0x22) /* Intr Ctrl reg 15 */ 4262306a36Sopenharmony_ci#endif 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define MCFSIM_IMR (MCF_MBAR + 0x36) /* Interrupt Mask */ 4562306a36Sopenharmony_ci#define MCFSIM_IPR (MCF_MBAR + 0x3a) /* Interrupt Pending */ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define MCFSIM_RSR (MCF_MBAR + 0x40) /* Reset Status */ 4862306a36Sopenharmony_ci#define MCFSIM_SYPCR (MCF_MBAR + 0x41) /* System Protection */ 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define MCFSIM_SWIVR (MCF_MBAR + 0x42) /* SW Watchdog intr */ 5162306a36Sopenharmony_ci#define MCFSIM_SWSR (MCF_MBAR + 0x43) /* SW Watchdog srv */ 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#define MCFSIM_DCRR (MCF_MBAR + 0x46) /* DRAM Refresh reg (r/w) */ 5462306a36Sopenharmony_ci#define MCFSIM_DCTR (MCF_MBAR + 0x4a) /* DRAM Timing reg (r/w) */ 5562306a36Sopenharmony_ci#define MCFSIM_DAR0 (MCF_MBAR + 0x4c) /* DRAM 0 Address reg(r/w) */ 5662306a36Sopenharmony_ci#define MCFSIM_DMR0 (MCF_MBAR + 0x50) /* DRAM 0 Mask reg (r/w) */ 5762306a36Sopenharmony_ci#define MCFSIM_DCR0 (MCF_MBAR + 0x57) /* DRAM 0 Control reg (r/w) */ 5862306a36Sopenharmony_ci#define MCFSIM_DAR1 (MCF_MBAR + 0x58) /* DRAM 1 Address reg (r/w) */ 5962306a36Sopenharmony_ci#define MCFSIM_DMR1 (MCF_MBAR + 0x5c) /* DRAM 1 Mask reg (r/w) */ 6062306a36Sopenharmony_ci#define MCFSIM_DCR1 (MCF_MBAR + 0x63) /* DRAM 1 Control reg (r/w) */ 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define MCFSIM_CSAR0 (MCF_MBAR + 0x64) /* CS 0 Address reg */ 6362306a36Sopenharmony_ci#define MCFSIM_CSMR0 (MCF_MBAR + 0x68) /* CS 0 Mask reg */ 6462306a36Sopenharmony_ci#define MCFSIM_CSCR0 (MCF_MBAR + 0x6e) /* CS 0 Control reg */ 6562306a36Sopenharmony_ci#define MCFSIM_CSAR1 (MCF_MBAR + 0x70) /* CS 1 Address reg */ 6662306a36Sopenharmony_ci#define MCFSIM_CSMR1 (MCF_MBAR + 0x74) /* CS 1 Mask reg */ 6762306a36Sopenharmony_ci#define MCFSIM_CSCR1 (MCF_MBAR + 0x7a) /* CS 1 Control reg */ 6862306a36Sopenharmony_ci#define MCFSIM_CSAR2 (MCF_MBAR + 0x7c) /* CS 2 Address reg */ 6962306a36Sopenharmony_ci#define MCFSIM_CSMR2 (MCF_MBAR + 0x80) /* CS 2 Mask reg */ 7062306a36Sopenharmony_ci#define MCFSIM_CSCR2 (MCF_MBAR + 0x86) /* CS 2 Control reg */ 7162306a36Sopenharmony_ci#define MCFSIM_CSAR3 (MCF_MBAR + 0x88) /* CS 3 Address reg */ 7262306a36Sopenharmony_ci#define MCFSIM_CSMR3 (MCF_MBAR + 0x8c) /* CS 3 Mask reg */ 7362306a36Sopenharmony_ci#define MCFSIM_CSCR3 (MCF_MBAR + 0x92) /* CS 3 Control reg */ 7462306a36Sopenharmony_ci#define MCFSIM_CSAR4 (MCF_MBAR + 0x94) /* CS 4 Address reg */ 7562306a36Sopenharmony_ci#define MCFSIM_CSMR4 (MCF_MBAR + 0x98) /* CS 4 Mask reg */ 7662306a36Sopenharmony_ci#define MCFSIM_CSCR4 (MCF_MBAR + 0x9e) /* CS 4 Control reg */ 7762306a36Sopenharmony_ci#define MCFSIM_CSAR5 (MCF_MBAR + 0xa0) /* CS 5 Address reg */ 7862306a36Sopenharmony_ci#define MCFSIM_CSMR5 (MCF_MBAR + 0xa4) /* CS 5 Mask reg */ 7962306a36Sopenharmony_ci#define MCFSIM_CSCR5 (MCF_MBAR + 0xaa) /* CS 5 Control reg */ 8062306a36Sopenharmony_ci#define MCFSIM_CSAR6 (MCF_MBAR + 0xac) /* CS 6 Address reg */ 8162306a36Sopenharmony_ci#define MCFSIM_CSMR6 (MCF_MBAR + 0xb0) /* CS 6 Mask reg */ 8262306a36Sopenharmony_ci#define MCFSIM_CSCR6 (MCF_MBAR + 0xb6) /* CS 6 Control reg */ 8362306a36Sopenharmony_ci#define MCFSIM_CSAR7 (MCF_MBAR + 0xb8) /* CS 7 Address reg */ 8462306a36Sopenharmony_ci#define MCFSIM_CSMR7 (MCF_MBAR + 0xbc) /* CS 7 Mask reg */ 8562306a36Sopenharmony_ci#define MCFSIM_CSCR7 (MCF_MBAR + 0xc2) /* CS 7 Control reg */ 8662306a36Sopenharmony_ci#define MCFSIM_DMCR (MCF_MBAR + 0xc6) /* Default control */ 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#ifdef CONFIG_M5206e 8962306a36Sopenharmony_ci#define MCFSIM_PAR (MCF_MBAR + 0xca) /* Pin Assignment */ 9062306a36Sopenharmony_ci#else 9162306a36Sopenharmony_ci#define MCFSIM_PAR (MCF_MBAR + 0xcb) /* Pin Assignment */ 9262306a36Sopenharmony_ci#endif 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci#define MCFTIMER_BASE1 (MCF_MBAR + 0x100) /* Base of TIMER1 */ 9562306a36Sopenharmony_ci#define MCFTIMER_BASE2 (MCF_MBAR + 0x120) /* Base of TIMER2 */ 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */ 9862306a36Sopenharmony_ci#define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */ 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define MCFDMA_BASE0 (MCF_MBAR + 0x200) /* Base address DMA 0 */ 10162306a36Sopenharmony_ci#define MCFDMA_BASE1 (MCF_MBAR + 0x240) /* Base address DMA 1 */ 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci#if defined(CONFIG_NETtel) 10462306a36Sopenharmony_ci#define MCFUART_BASE0 (MCF_MBAR + 0x180) /* Base address UART0 */ 10562306a36Sopenharmony_ci#define MCFUART_BASE1 (MCF_MBAR + 0x140) /* Base address UART1 */ 10662306a36Sopenharmony_ci#else 10762306a36Sopenharmony_ci#define MCFUART_BASE0 (MCF_MBAR + 0x140) /* Base address UART0 */ 10862306a36Sopenharmony_ci#define MCFUART_BASE1 (MCF_MBAR + 0x180) /* Base address UART1 */ 10962306a36Sopenharmony_ci#endif 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci/* 11262306a36Sopenharmony_ci * Define system peripheral IRQ usage. 11362306a36Sopenharmony_ci */ 11462306a36Sopenharmony_ci#define MCF_IRQ_I2C0 29 /* I2C, Level 5 */ 11562306a36Sopenharmony_ci#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 11662306a36Sopenharmony_ci#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 11762306a36Sopenharmony_ci#define MCF_IRQ_UART0 73 /* UART0 */ 11862306a36Sopenharmony_ci#define MCF_IRQ_UART1 74 /* UART1 */ 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci/* 12162306a36Sopenharmony_ci * Generic GPIO 12262306a36Sopenharmony_ci */ 12362306a36Sopenharmony_ci#define MCFGPIO_PIN_MAX 8 12462306a36Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE -1 12562306a36Sopenharmony_ci#define MCFGPIO_IRQ_MAX -1 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_ci/* 12862306a36Sopenharmony_ci * Some symbol defines for the Parallel Port Pin Assignment Register 12962306a36Sopenharmony_ci */ 13062306a36Sopenharmony_ci#ifdef CONFIG_M5206e 13162306a36Sopenharmony_ci#define MCFSIM_PAR_DREQ0 0x100 /* Set to select DREQ0 input */ 13262306a36Sopenharmony_ci /* Clear to select T0 input */ 13362306a36Sopenharmony_ci#define MCFSIM_PAR_DREQ1 0x200 /* Select DREQ1 input */ 13462306a36Sopenharmony_ci /* Clear to select T0 output */ 13562306a36Sopenharmony_ci#endif 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci/* 13862306a36Sopenharmony_ci * Some symbol defines for the Interrupt Control Register 13962306a36Sopenharmony_ci */ 14062306a36Sopenharmony_ci#define MCFSIM_SWDICR MCFSIM_ICR8 /* Watchdog timer ICR */ 14162306a36Sopenharmony_ci#define MCFSIM_TIMER1ICR MCFSIM_ICR9 /* Timer 1 ICR */ 14262306a36Sopenharmony_ci#define MCFSIM_TIMER2ICR MCFSIM_ICR10 /* Timer 2 ICR */ 14362306a36Sopenharmony_ci#define MCFSIM_I2CICR MCFSIM_ICR11 /* I2C ICR */ 14462306a36Sopenharmony_ci#define MCFSIM_UART1ICR MCFSIM_ICR12 /* UART 1 ICR */ 14562306a36Sopenharmony_ci#define MCFSIM_UART2ICR MCFSIM_ICR13 /* UART 2 ICR */ 14662306a36Sopenharmony_ci#ifdef CONFIG_M5206e 14762306a36Sopenharmony_ci#define MCFSIM_DMA1ICR MCFSIM_ICR14 /* DMA 1 ICR */ 14862306a36Sopenharmony_ci#define MCFSIM_DMA2ICR MCFSIM_ICR15 /* DMA 2 ICR */ 14962306a36Sopenharmony_ci#endif 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci/* 15262306a36Sopenharmony_ci * I2C Controller 15362306a36Sopenharmony_ci*/ 15462306a36Sopenharmony_ci#define MCFI2C_BASE0 (MCF_MBAR + 0x1e0) 15562306a36Sopenharmony_ci#define MCFI2C_SIZE0 0x40 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci/****************************************************************************/ 15862306a36Sopenharmony_ci#endif /* m5206sim_h */ 159