162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/****************************************************************************/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* 562306a36Sopenharmony_ci * m528xsim.h -- ColdFire 5280/5282 System Integration Module support. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * (C) Copyright 2003, Greg Ungerer (gerg@snapgear.com) 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/****************************************************************************/ 1162306a36Sopenharmony_ci#ifndef m528xsim_h 1262306a36Sopenharmony_ci#define m528xsim_h 1362306a36Sopenharmony_ci/****************************************************************************/ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define CPU_NAME "COLDFIRE(m528x)" 1662306a36Sopenharmony_ci#define CPU_INSTR_PER_JIFFY 3 1762306a36Sopenharmony_ci#define MCF_BUSCLK MCF_CLK 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#include <asm/m52xxacr.h> 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* 2262306a36Sopenharmony_ci * Define the 5280/5282 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 55 /* 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 + 0x00000044) /* Control */ 6462306a36Sopenharmony_ci#define MCFSIM_DACR0 (MCF_IPSBAR + 0x00000048) /* Base address 0 */ 6562306a36Sopenharmony_ci#define MCFSIM_DMR0 (MCF_IPSBAR + 0x0000004c) /* Address mask 0 */ 6662306a36Sopenharmony_ci#define MCFSIM_DACR1 (MCF_IPSBAR + 0x00000050) /* Base address 1 */ 6762306a36Sopenharmony_ci#define MCFSIM_DMR1 (MCF_IPSBAR + 0x00000054) /* Address mask 1 */ 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* 7062306a36Sopenharmony_ci * DMA unit base addresses. 7162306a36Sopenharmony_ci */ 7262306a36Sopenharmony_ci#define MCFDMA_BASE0 (MCF_IPSBAR + 0x00000100) 7362306a36Sopenharmony_ci#define MCFDMA_BASE1 (MCF_IPSBAR + 0x00000140) 7462306a36Sopenharmony_ci#define MCFDMA_BASE2 (MCF_IPSBAR + 0x00000180) 7562306a36Sopenharmony_ci#define MCFDMA_BASE3 (MCF_IPSBAR + 0x000001C0) 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci/* 7862306a36Sopenharmony_ci * UART module. 7962306a36Sopenharmony_ci */ 8062306a36Sopenharmony_ci#define MCFUART_BASE0 (MCF_IPSBAR + 0x00000200) 8162306a36Sopenharmony_ci#define MCFUART_BASE1 (MCF_IPSBAR + 0x00000240) 8262306a36Sopenharmony_ci#define MCFUART_BASE2 (MCF_IPSBAR + 0x00000280) 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci/* 8562306a36Sopenharmony_ci * FEC ethernet module. 8662306a36Sopenharmony_ci */ 8762306a36Sopenharmony_ci#define MCFFEC_BASE0 (MCF_IPSBAR + 0x00001000) 8862306a36Sopenharmony_ci#define MCFFEC_SIZE0 0x800 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci/* 9162306a36Sopenharmony_ci * QSPI module. 9262306a36Sopenharmony_ci */ 9362306a36Sopenharmony_ci#define MCFQSPI_BASE (MCF_IPSBAR + 0x340) 9462306a36Sopenharmony_ci#define MCFQSPI_SIZE 0x40 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci#define MCFQSPI_CS0 147 9762306a36Sopenharmony_ci#define MCFQSPI_CS1 148 9862306a36Sopenharmony_ci#define MCFQSPI_CS2 149 9962306a36Sopenharmony_ci#define MCFQSPI_CS3 150 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci/* 10262306a36Sopenharmony_ci * GPIO registers 10362306a36Sopenharmony_ci */ 10462306a36Sopenharmony_ci#define MCFGPIO_PODR_A (MCF_IPSBAR + 0x00100000) 10562306a36Sopenharmony_ci#define MCFGPIO_PODR_B (MCF_IPSBAR + 0x00100001) 10662306a36Sopenharmony_ci#define MCFGPIO_PODR_C (MCF_IPSBAR + 0x00100002) 10762306a36Sopenharmony_ci#define MCFGPIO_PODR_D (MCF_IPSBAR + 0x00100003) 10862306a36Sopenharmony_ci#define MCFGPIO_PODR_E (MCF_IPSBAR + 0x00100004) 10962306a36Sopenharmony_ci#define MCFGPIO_PODR_F (MCF_IPSBAR + 0x00100005) 11062306a36Sopenharmony_ci#define MCFGPIO_PODR_G (MCF_IPSBAR + 0x00100006) 11162306a36Sopenharmony_ci#define MCFGPIO_PODR_H (MCF_IPSBAR + 0x00100007) 11262306a36Sopenharmony_ci#define MCFGPIO_PODR_J (MCF_IPSBAR + 0x00100008) 11362306a36Sopenharmony_ci#define MCFGPIO_PODR_DD (MCF_IPSBAR + 0x00100009) 11462306a36Sopenharmony_ci#define MCFGPIO_PODR_EH (MCF_IPSBAR + 0x0010000A) 11562306a36Sopenharmony_ci#define MCFGPIO_PODR_EL (MCF_IPSBAR + 0x0010000B) 11662306a36Sopenharmony_ci#define MCFGPIO_PODR_AS (MCF_IPSBAR + 0x0010000C) 11762306a36Sopenharmony_ci#define MCFGPIO_PODR_QS (MCF_IPSBAR + 0x0010000D) 11862306a36Sopenharmony_ci#define MCFGPIO_PODR_SD (MCF_IPSBAR + 0x0010000E) 11962306a36Sopenharmony_ci#define MCFGPIO_PODR_TC (MCF_IPSBAR + 0x0010000F) 12062306a36Sopenharmony_ci#define MCFGPIO_PODR_TD (MCF_IPSBAR + 0x00100010) 12162306a36Sopenharmony_ci#define MCFGPIO_PODR_UA (MCF_IPSBAR + 0x00100011) 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define MCFGPIO_PDDR_A (MCF_IPSBAR + 0x00100014) 12462306a36Sopenharmony_ci#define MCFGPIO_PDDR_B (MCF_IPSBAR + 0x00100015) 12562306a36Sopenharmony_ci#define MCFGPIO_PDDR_C (MCF_IPSBAR + 0x00100016) 12662306a36Sopenharmony_ci#define MCFGPIO_PDDR_D (MCF_IPSBAR + 0x00100017) 12762306a36Sopenharmony_ci#define MCFGPIO_PDDR_E (MCF_IPSBAR + 0x00100018) 12862306a36Sopenharmony_ci#define MCFGPIO_PDDR_F (MCF_IPSBAR + 0x00100019) 12962306a36Sopenharmony_ci#define MCFGPIO_PDDR_G (MCF_IPSBAR + 0x0010001A) 13062306a36Sopenharmony_ci#define MCFGPIO_PDDR_H (MCF_IPSBAR + 0x0010001B) 13162306a36Sopenharmony_ci#define MCFGPIO_PDDR_J (MCF_IPSBAR + 0x0010001C) 13262306a36Sopenharmony_ci#define MCFGPIO_PDDR_DD (MCF_IPSBAR + 0x0010001D) 13362306a36Sopenharmony_ci#define MCFGPIO_PDDR_EH (MCF_IPSBAR + 0x0010001E) 13462306a36Sopenharmony_ci#define MCFGPIO_PDDR_EL (MCF_IPSBAR + 0x0010001F) 13562306a36Sopenharmony_ci#define MCFGPIO_PDDR_AS (MCF_IPSBAR + 0x00100020) 13662306a36Sopenharmony_ci#define MCFGPIO_PDDR_QS (MCF_IPSBAR + 0x00100021) 13762306a36Sopenharmony_ci#define MCFGPIO_PDDR_SD (MCF_IPSBAR + 0x00100022) 13862306a36Sopenharmony_ci#define MCFGPIO_PDDR_TC (MCF_IPSBAR + 0x00100023) 13962306a36Sopenharmony_ci#define MCFGPIO_PDDR_TD (MCF_IPSBAR + 0x00100024) 14062306a36Sopenharmony_ci#define MCFGPIO_PDDR_UA (MCF_IPSBAR + 0x00100025) 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_A (MCF_IPSBAR + 0x00100028) 14362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_B (MCF_IPSBAR + 0x00100029) 14462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_C (MCF_IPSBAR + 0x0010002A) 14562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_D (MCF_IPSBAR + 0x0010002B) 14662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_E (MCF_IPSBAR + 0x0010002C) 14762306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_F (MCF_IPSBAR + 0x0010002D) 14862306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_G (MCF_IPSBAR + 0x0010002E) 14962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_H (MCF_IPSBAR + 0x0010002F) 15062306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_J (MCF_IPSBAR + 0x00100030) 15162306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_DD (MCF_IPSBAR + 0x00100031) 15262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_EH (MCF_IPSBAR + 0x00100032) 15362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_EL (MCF_IPSBAR + 0x00100033) 15462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_AS (MCF_IPSBAR + 0x00100034) 15562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_QS (MCF_IPSBAR + 0x00100035) 15662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_SD (MCF_IPSBAR + 0x00100036) 15762306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TC (MCF_IPSBAR + 0x00100037) 15862306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TD (MCF_IPSBAR + 0x00100038) 15962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UA (MCF_IPSBAR + 0x00100039) 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_A (MCF_IPSBAR + 0x0010003C) 16262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_B (MCF_IPSBAR + 0x0010003D) 16362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_C (MCF_IPSBAR + 0x0010003E) 16462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_D (MCF_IPSBAR + 0x0010003F) 16562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_E (MCF_IPSBAR + 0x00100040) 16662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_F (MCF_IPSBAR + 0x00100041) 16762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_G (MCF_IPSBAR + 0x00100042) 16862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_H (MCF_IPSBAR + 0x00100043) 16962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_J (MCF_IPSBAR + 0x00100044) 17062306a36Sopenharmony_ci#define MCFGPIO_PCLRR_DD (MCF_IPSBAR + 0x00100045) 17162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_EH (MCF_IPSBAR + 0x00100046) 17262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_EL (MCF_IPSBAR + 0x00100047) 17362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_AS (MCF_IPSBAR + 0x00100048) 17462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_QS (MCF_IPSBAR + 0x00100049) 17562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_SD (MCF_IPSBAR + 0x0010004A) 17662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TC (MCF_IPSBAR + 0x0010004B) 17762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TD (MCF_IPSBAR + 0x0010004C) 17862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UA (MCF_IPSBAR + 0x0010004D) 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci#define MCFGPIO_PBCDPAR (MCF_IPSBAR + 0x00100050) 18162306a36Sopenharmony_ci#define MCFGPIO_PFPAR (MCF_IPSBAR + 0x00100051) 18262306a36Sopenharmony_ci#define MCFGPIO_PEPAR (MCF_IPSBAR + 0x00100052) 18362306a36Sopenharmony_ci#define MCFGPIO_PJPAR (MCF_IPSBAR + 0x00100054) 18462306a36Sopenharmony_ci#define MCFGPIO_PSDPAR (MCF_IPSBAR + 0x00100055) 18562306a36Sopenharmony_ci#define MCFGPIO_PASPAR (MCF_IPSBAR + 0x00100056) 18662306a36Sopenharmony_ci#define MCFGPIO_PEHLPAR (MCF_IPSBAR + 0x00100058) 18762306a36Sopenharmony_ci#define MCFGPIO_PQSPAR (MCF_IPSBAR + 0x00100059) 18862306a36Sopenharmony_ci#define MCFGPIO_PTCPAR (MCF_IPSBAR + 0x0010005A) 18962306a36Sopenharmony_ci#define MCFGPIO_PTDPAR (MCF_IPSBAR + 0x0010005B) 19062306a36Sopenharmony_ci#define MCFGPIO_PUAPAR (MCF_IPSBAR + 0x0010005C) 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci/* 19362306a36Sopenharmony_ci * PIT timer base addresses. 19462306a36Sopenharmony_ci */ 19562306a36Sopenharmony_ci#define MCFPIT_BASE1 (MCF_IPSBAR + 0x00150000) 19662306a36Sopenharmony_ci#define MCFPIT_BASE2 (MCF_IPSBAR + 0x00160000) 19762306a36Sopenharmony_ci#define MCFPIT_BASE3 (MCF_IPSBAR + 0x00170000) 19862306a36Sopenharmony_ci#define MCFPIT_BASE4 (MCF_IPSBAR + 0x00180000) 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* 20162306a36Sopenharmony_ci * Edge Port registers 20262306a36Sopenharmony_ci */ 20362306a36Sopenharmony_ci#define MCFEPORT_EPPAR (MCF_IPSBAR + 0x00130000) 20462306a36Sopenharmony_ci#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x00130002) 20562306a36Sopenharmony_ci#define MCFEPORT_EPIER (MCF_IPSBAR + 0x00130003) 20662306a36Sopenharmony_ci#define MCFEPORT_EPDR (MCF_IPSBAR + 0x00130004) 20762306a36Sopenharmony_ci#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x00130005) 20862306a36Sopenharmony_ci#define MCFEPORT_EPFR (MCF_IPSBAR + 0x00130006) 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ci/* 21162306a36Sopenharmony_ci * Queued ADC registers 21262306a36Sopenharmony_ci */ 21362306a36Sopenharmony_ci#define MCFQADC_PORTQA (MCF_IPSBAR + 0x00190006) 21462306a36Sopenharmony_ci#define MCFQADC_PORTQB (MCF_IPSBAR + 0x00190007) 21562306a36Sopenharmony_ci#define MCFQADC_DDRQA (MCF_IPSBAR + 0x00190008) 21662306a36Sopenharmony_ci#define MCFQADC_DDRQB (MCF_IPSBAR + 0x00190009) 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ci/* 21962306a36Sopenharmony_ci * General Purpose Timers registers 22062306a36Sopenharmony_ci */ 22162306a36Sopenharmony_ci#define MCFGPTA_GPTPORT (MCF_IPSBAR + 0x001A001D) 22262306a36Sopenharmony_ci#define MCFGPTA_GPTDDR (MCF_IPSBAR + 0x001A001E) 22362306a36Sopenharmony_ci#define MCFGPTB_GPTPORT (MCF_IPSBAR + 0x001B001D) 22462306a36Sopenharmony_ci#define MCFGPTB_GPTDDR (MCF_IPSBAR + 0x001B001E) 22562306a36Sopenharmony_ci/* 22662306a36Sopenharmony_ci * 22762306a36Sopenharmony_ci * definitions for generic gpio support 22862306a36Sopenharmony_ci * 22962306a36Sopenharmony_ci */ 23062306a36Sopenharmony_ci#define MCFGPIO_PODR MCFGPIO_PODR_A /* port output data */ 23162306a36Sopenharmony_ci#define MCFGPIO_PDDR MCFGPIO_PDDR_A /* port data direction */ 23262306a36Sopenharmony_ci#define MCFGPIO_PPDR MCFGPIO_PPDSDR_A/* port pin data */ 23362306a36Sopenharmony_ci#define MCFGPIO_SETR MCFGPIO_PPDSDR_A/* set output */ 23462306a36Sopenharmony_ci#define MCFGPIO_CLRR MCFGPIO_PCLRR_A /* clr output */ 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ci#define MCFGPIO_IRQ_MAX 8 23762306a36Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE 23862306a36Sopenharmony_ci#define MCFGPIO_PIN_MAX 180 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci/* 24162306a36Sopenharmony_ci * Reset Control Unit (relative to IPSBAR). 24262306a36Sopenharmony_ci */ 24362306a36Sopenharmony_ci#define MCF_RCR (MCF_IPSBAR + 0x110000) 24462306a36Sopenharmony_ci#define MCF_RSR (MCF_IPSBAR + 0x110001) 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ci#define MCF_RCR_SWRESET 0x80 /* Software reset bit */ 24762306a36Sopenharmony_ci#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ 24862306a36Sopenharmony_ci 24962306a36Sopenharmony_ci/* 25062306a36Sopenharmony_ci * I2C module 25162306a36Sopenharmony_ci */ 25262306a36Sopenharmony_ci#define MCFI2C_BASE0 (MCF_IPSBAR + 0x300) 25362306a36Sopenharmony_ci#define MCFI2C_SIZE0 0x40 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci/****************************************************************************/ 25662306a36Sopenharmony_ci#endif /* m528xsim_h */ 257