162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/****************************************************************************/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* 562306a36Sopenharmony_ci * m527xsim.h -- ColdFire 5270/5271 System Integration Module support. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * (C) Copyright 2004, Greg Ungerer (gerg@snapgear.com) 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/****************************************************************************/ 1162306a36Sopenharmony_ci#ifndef m527xsim_h 1262306a36Sopenharmony_ci#define m527xsim_h 1362306a36Sopenharmony_ci/****************************************************************************/ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define CPU_NAME "COLDFIRE(m527x)" 1662306a36Sopenharmony_ci#define CPU_INSTR_PER_JIFFY 3 1762306a36Sopenharmony_ci#define MCF_BUSCLK (MCF_CLK / 2) 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#include <asm/m52xxacr.h> 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* 2262306a36Sopenharmony_ci * Define the 5270/5271 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 1 */ 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 FEC0 */ 4462306a36Sopenharmony_ci#define MCFINT_FECTX0 27 /* Interrupt number for FEC0 */ 4562306a36Sopenharmony_ci#define MCFINT_FECENTC0 29 /* Interrupt number for FEC0 */ 4662306a36Sopenharmony_ci#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */ 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#define MCFINT2_VECBASE 128 /* Vector base number 2 */ 4962306a36Sopenharmony_ci#define MCFINT2_FECRX1 23 /* Interrupt number for FEC1 */ 5062306a36Sopenharmony_ci#define MCFINT2_FECTX1 27 /* Interrupt number for FEC1 */ 5162306a36Sopenharmony_ci#define MCFINT2_FECENTC1 29 /* Interrupt number for FEC1 */ 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0) 5462306a36Sopenharmony_ci#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1) 5562306a36Sopenharmony_ci#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0) 5862306a36Sopenharmony_ci#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0) 5962306a36Sopenharmony_ci#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0) 6062306a36Sopenharmony_ci#define MCF_IRQ_FECRX1 (MCFINT2_VECBASE + MCFINT2_FECRX1) 6162306a36Sopenharmony_ci#define MCF_IRQ_FECTX1 (MCFINT2_VECBASE + MCFINT2_FECTX1) 6262306a36Sopenharmony_ci#define MCF_IRQ_FECENTC1 (MCFINT2_VECBASE + MCFINT2_FECENTC1) 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI) 6562306a36Sopenharmony_ci#define MCF_IRQ_PIT1 (MCFINT_VECBASE + MCFINT_PIT1) 6662306a36Sopenharmony_ci#define MCF_IRQ_I2C0 (MCFINT_VECBASE + MCFINT_I2C0) 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci/* 6962306a36Sopenharmony_ci * SDRAM configuration registers. 7062306a36Sopenharmony_ci */ 7162306a36Sopenharmony_ci#ifdef CONFIG_M5271 7262306a36Sopenharmony_ci#define MCFSIM_DCR (MCF_IPSBAR + 0x40) /* Control */ 7362306a36Sopenharmony_ci#define MCFSIM_DACR0 (MCF_IPSBAR + 0x48) /* Base address 0 */ 7462306a36Sopenharmony_ci#define MCFSIM_DMR0 (MCF_IPSBAR + 0x4c) /* Address mask 0 */ 7562306a36Sopenharmony_ci#define MCFSIM_DACR1 (MCF_IPSBAR + 0x50) /* Base address 1 */ 7662306a36Sopenharmony_ci#define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ 7762306a36Sopenharmony_ci#endif 7862306a36Sopenharmony_ci#ifdef CONFIG_M5275 7962306a36Sopenharmony_ci#define MCFSIM_DMR (MCF_IPSBAR + 0x40) /* Mode */ 8062306a36Sopenharmony_ci#define MCFSIM_DCR (MCF_IPSBAR + 0x44) /* Control */ 8162306a36Sopenharmony_ci#define MCFSIM_DCFG1 (MCF_IPSBAR + 0x48) /* Configuration 1 */ 8262306a36Sopenharmony_ci#define MCFSIM_DCFG2 (MCF_IPSBAR + 0x4c) /* Configuration 2 */ 8362306a36Sopenharmony_ci#define MCFSIM_DBAR0 (MCF_IPSBAR + 0x50) /* Base address 0 */ 8462306a36Sopenharmony_ci#define MCFSIM_DMR0 (MCF_IPSBAR + 0x54) /* Address mask 0 */ 8562306a36Sopenharmony_ci#define MCFSIM_DBAR1 (MCF_IPSBAR + 0x58) /* Base address 1 */ 8662306a36Sopenharmony_ci#define MCFSIM_DMR1 (MCF_IPSBAR + 0x5c) /* Address mask 1 */ 8762306a36Sopenharmony_ci#endif 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci/* 9062306a36Sopenharmony_ci * DMA unit base addresses. 9162306a36Sopenharmony_ci */ 9262306a36Sopenharmony_ci#define MCFDMA_BASE0 (MCF_IPSBAR + 0x100) 9362306a36Sopenharmony_ci#define MCFDMA_BASE1 (MCF_IPSBAR + 0x140) 9462306a36Sopenharmony_ci#define MCFDMA_BASE2 (MCF_IPSBAR + 0x180) 9562306a36Sopenharmony_ci#define MCFDMA_BASE3 (MCF_IPSBAR + 0x1C0) 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci/* 9862306a36Sopenharmony_ci * UART module. 9962306a36Sopenharmony_ci */ 10062306a36Sopenharmony_ci#define MCFUART_BASE0 (MCF_IPSBAR + 0x200) 10162306a36Sopenharmony_ci#define MCFUART_BASE1 (MCF_IPSBAR + 0x240) 10262306a36Sopenharmony_ci#define MCFUART_BASE2 (MCF_IPSBAR + 0x280) 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci/* 10562306a36Sopenharmony_ci * FEC ethernet module. 10662306a36Sopenharmony_ci */ 10762306a36Sopenharmony_ci#define MCFFEC_BASE0 (MCF_IPSBAR + 0x1000) 10862306a36Sopenharmony_ci#define MCFFEC_SIZE0 0x800 10962306a36Sopenharmony_ci#ifdef CONFIG_M5275 11062306a36Sopenharmony_ci#define MCFFEC_BASE1 (MCF_IPSBAR + 0x1800) 11162306a36Sopenharmony_ci#define MCFFEC_SIZE1 0x800 11262306a36Sopenharmony_ci#endif 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci/* 11562306a36Sopenharmony_ci * QSPI module. 11662306a36Sopenharmony_ci */ 11762306a36Sopenharmony_ci#define MCFQSPI_BASE (MCF_IPSBAR + 0x340) 11862306a36Sopenharmony_ci#define MCFQSPI_SIZE 0x40 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci#ifdef CONFIG_M5271 12162306a36Sopenharmony_ci#define MCFQSPI_CS0 91 12262306a36Sopenharmony_ci#define MCFQSPI_CS1 92 12362306a36Sopenharmony_ci#define MCFQSPI_CS2 99 12462306a36Sopenharmony_ci#define MCFQSPI_CS3 103 12562306a36Sopenharmony_ci#endif 12662306a36Sopenharmony_ci#ifdef CONFIG_M5275 12762306a36Sopenharmony_ci#define MCFQSPI_CS0 59 12862306a36Sopenharmony_ci#define MCFQSPI_CS1 60 12962306a36Sopenharmony_ci#define MCFQSPI_CS2 61 13062306a36Sopenharmony_ci#define MCFQSPI_CS3 62 13162306a36Sopenharmony_ci#endif 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci/* 13462306a36Sopenharmony_ci * GPIO module. 13562306a36Sopenharmony_ci */ 13662306a36Sopenharmony_ci#ifdef CONFIG_M5271 13762306a36Sopenharmony_ci#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) 13862306a36Sopenharmony_ci#define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) 13962306a36Sopenharmony_ci#define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) 14062306a36Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100003) 14162306a36Sopenharmony_ci#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100004) 14262306a36Sopenharmony_ci#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100005) 14362306a36Sopenharmony_ci#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x100006) 14462306a36Sopenharmony_ci#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x100007) 14562306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100008) 14662306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100009) 14762306a36Sopenharmony_ci#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000A) 14862306a36Sopenharmony_ci#define MCFGPIO_PODR_TIMER (MCF_IPSBAR + 0x10000B) 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100010) 15162306a36Sopenharmony_ci#define MCFGPIO_PDDR_DATAH (MCF_IPSBAR + 0x100011) 15262306a36Sopenharmony_ci#define MCFGPIO_PDDR_DATAL (MCF_IPSBAR + 0x100012) 15362306a36Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100013) 15462306a36Sopenharmony_ci#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100014) 15562306a36Sopenharmony_ci#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100015) 15662306a36Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x100016) 15762306a36Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100017) 15862306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100018) 15962306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x100019) 16062306a36Sopenharmony_ci#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x10001A) 16162306a36Sopenharmony_ci#define MCFGPIO_PDDR_TIMER (MCF_IPSBAR + 0x10001B) 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x100020) 16462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAH (MCF_IPSBAR + 0x100021) 16562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_DATAL (MCF_IPSBAR + 0x100022) 16662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x100023) 16762306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x100024) 16862306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100025) 16962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100026) 17062306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100027) 17162306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100028) 17262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100029) 17362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x10002A) 17462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMER (MCF_IPSBAR + 0x10002B) 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100030) 17762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_DATAH (MCF_IPSBAR + 0x100031) 17862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_DATAL (MCF_IPSBAR + 0x100032) 17962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100033) 18062306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100034) 18162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x100035) 18262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100036) 18362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100037) 18462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x100038) 18562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100039) 18662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x10003A) 18762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TIMER (MCF_IPSBAR + 0x10003B) 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci/* 19062306a36Sopenharmony_ci * Generic GPIO support 19162306a36Sopenharmony_ci */ 19262306a36Sopenharmony_ci#define MCFGPIO_PODR MCFGPIO_PODR_ADDR 19362306a36Sopenharmony_ci#define MCFGPIO_PDDR MCFGPIO_PDDR_ADDR 19462306a36Sopenharmony_ci#define MCFGPIO_PPDR MCFGPIO_PPDSDR_ADDR 19562306a36Sopenharmony_ci#define MCFGPIO_SETR MCFGPIO_PPDSDR_ADDR 19662306a36Sopenharmony_ci#define MCFGPIO_CLRR MCFGPIO_PCLRR_ADDR 19762306a36Sopenharmony_ci 19862306a36Sopenharmony_ci#define MCFGPIO_PIN_MAX 100 19962306a36Sopenharmony_ci#define MCFGPIO_IRQ_MAX 8 20062306a36Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci/* 20362306a36Sopenharmony_ci * Port Pin Assignment registers. 20462306a36Sopenharmony_ci */ 20562306a36Sopenharmony_ci#define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100040) 20662306a36Sopenharmony_ci#define MCFGPIO_PAR_BUSCTL (MCF_IPSBAR + 0x100042) 20762306a36Sopenharmony_ci#define MCFGPIO_PAR_BS (MCF_IPSBAR + 0x100044) 20862306a36Sopenharmony_ci#define MCFGPIO_PAR_CS (MCF_IPSBAR + 0x100045) 20962306a36Sopenharmony_ci#define MCFGPIO_PAR_SDRAM (MCF_IPSBAR + 0x100046) 21062306a36Sopenharmony_ci#define MCFGPIO_PAR_FECI2C (MCF_IPSBAR + 0x100047) 21162306a36Sopenharmony_ci#define MCFGPIO_PAR_UART (MCF_IPSBAR + 0x100048) 21262306a36Sopenharmony_ci#define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A) 21362306a36Sopenharmony_ci#define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C) 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci#define UART0_ENABLE_MASK 0x000f 21662306a36Sopenharmony_ci#define UART1_ENABLE_MASK 0x0ff0 21762306a36Sopenharmony_ci#define UART2_ENABLE_MASK 0x3000 21862306a36Sopenharmony_ci#endif /* CONFIG_M5271 */ 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci#ifdef CONFIG_M5275 22162306a36Sopenharmony_ci#define MCFGPIO_PODR_BUSCTL (MCF_IPSBAR + 0x100004) 22262306a36Sopenharmony_ci#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100005) 22362306a36Sopenharmony_ci#define MCFGPIO_PODR_CS (MCF_IPSBAR + 0x100008) 22462306a36Sopenharmony_ci#define MCFGPIO_PODR_FEC0H (MCF_IPSBAR + 0x10000A) 22562306a36Sopenharmony_ci#define MCFGPIO_PODR_FEC0L (MCF_IPSBAR + 0x10000B) 22662306a36Sopenharmony_ci#define MCFGPIO_PODR_FECI2C (MCF_IPSBAR + 0x10000C) 22762306a36Sopenharmony_ci#define MCFGPIO_PODR_QSPI (MCF_IPSBAR + 0x10000D) 22862306a36Sopenharmony_ci#define MCFGPIO_PODR_SDRAM (MCF_IPSBAR + 0x10000E) 22962306a36Sopenharmony_ci#define MCFGPIO_PODR_TIMERH (MCF_IPSBAR + 0x10000F) 23062306a36Sopenharmony_ci#define MCFGPIO_PODR_TIMERL (MCF_IPSBAR + 0x100010) 23162306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTL (MCF_IPSBAR + 0x100011) 23262306a36Sopenharmony_ci#define MCFGPIO_PODR_FEC1H (MCF_IPSBAR + 0x100012) 23362306a36Sopenharmony_ci#define MCFGPIO_PODR_FEC1L (MCF_IPSBAR + 0x100013) 23462306a36Sopenharmony_ci#define MCFGPIO_PODR_BS (MCF_IPSBAR + 0x100014) 23562306a36Sopenharmony_ci#define MCFGPIO_PODR_IRQ (MCF_IPSBAR + 0x100015) 23662306a36Sopenharmony_ci#define MCFGPIO_PODR_USBH (MCF_IPSBAR + 0x100016) 23762306a36Sopenharmony_ci#define MCFGPIO_PODR_USBL (MCF_IPSBAR + 0x100017) 23862306a36Sopenharmony_ci#define MCFGPIO_PODR_UARTH (MCF_IPSBAR + 0x100018) 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci#define MCFGPIO_PDDR_BUSCTL (MCF_IPSBAR + 0x100020) 24162306a36Sopenharmony_ci#define MCFGPIO_PDDR_ADDR (MCF_IPSBAR + 0x100021) 24262306a36Sopenharmony_ci#define MCFGPIO_PDDR_CS (MCF_IPSBAR + 0x100024) 24362306a36Sopenharmony_ci#define MCFGPIO_PDDR_FEC0H (MCF_IPSBAR + 0x100026) 24462306a36Sopenharmony_ci#define MCFGPIO_PDDR_FEC0L (MCF_IPSBAR + 0x100027) 24562306a36Sopenharmony_ci#define MCFGPIO_PDDR_FECI2C (MCF_IPSBAR + 0x100028) 24662306a36Sopenharmony_ci#define MCFGPIO_PDDR_QSPI (MCF_IPSBAR + 0x100029) 24762306a36Sopenharmony_ci#define MCFGPIO_PDDR_SDRAM (MCF_IPSBAR + 0x10002A) 24862306a36Sopenharmony_ci#define MCFGPIO_PDDR_TIMERH (MCF_IPSBAR + 0x10002B) 24962306a36Sopenharmony_ci#define MCFGPIO_PDDR_TIMERL (MCF_IPSBAR + 0x10002C) 25062306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTL (MCF_IPSBAR + 0x10002D) 25162306a36Sopenharmony_ci#define MCFGPIO_PDDR_FEC1H (MCF_IPSBAR + 0x10002E) 25262306a36Sopenharmony_ci#define MCFGPIO_PDDR_FEC1L (MCF_IPSBAR + 0x10002F) 25362306a36Sopenharmony_ci#define MCFGPIO_PDDR_BS (MCF_IPSBAR + 0x100030) 25462306a36Sopenharmony_ci#define MCFGPIO_PDDR_IRQ (MCF_IPSBAR + 0x100031) 25562306a36Sopenharmony_ci#define MCFGPIO_PDDR_USBH (MCF_IPSBAR + 0x100032) 25662306a36Sopenharmony_ci#define MCFGPIO_PDDR_USBL (MCF_IPSBAR + 0x100033) 25762306a36Sopenharmony_ci#define MCFGPIO_PDDR_UARTH (MCF_IPSBAR + 0x100034) 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BUSCTL (MCF_IPSBAR + 0x10003C) 26062306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_ADDR (MCF_IPSBAR + 0x10003D) 26162306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_CS (MCF_IPSBAR + 0x100040) 26262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC0H (MCF_IPSBAR + 0x100042) 26362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC0L (MCF_IPSBAR + 0x100043) 26462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FECI2C (MCF_IPSBAR + 0x100044) 26562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_QSPI (MCF_IPSBAR + 0x100045) 26662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_SDRAM (MCF_IPSBAR + 0x100046) 26762306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMERH (MCF_IPSBAR + 0x100047) 26862306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_TIMERL (MCF_IPSBAR + 0x100048) 26962306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTL (MCF_IPSBAR + 0x100049) 27062306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC1H (MCF_IPSBAR + 0x10004A) 27162306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_FEC1L (MCF_IPSBAR + 0x10004B) 27262306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_BS (MCF_IPSBAR + 0x10004C) 27362306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_IRQ (MCF_IPSBAR + 0x10004D) 27462306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_USBH (MCF_IPSBAR + 0x10004E) 27562306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_USBL (MCF_IPSBAR + 0x10004F) 27662306a36Sopenharmony_ci#define MCFGPIO_PPDSDR_UARTH (MCF_IPSBAR + 0x100050) 27762306a36Sopenharmony_ci 27862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BUSCTL (MCF_IPSBAR + 0x100058) 27962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_ADDR (MCF_IPSBAR + 0x100059) 28062306a36Sopenharmony_ci#define MCFGPIO_PCLRR_CS (MCF_IPSBAR + 0x10005C) 28162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FEC0H (MCF_IPSBAR + 0x10005E) 28262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FEC0L (MCF_IPSBAR + 0x10005F) 28362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FECI2C (MCF_IPSBAR + 0x100060) 28462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_QSPI (MCF_IPSBAR + 0x100061) 28562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_SDRAM (MCF_IPSBAR + 0x100062) 28662306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TIMERH (MCF_IPSBAR + 0x100063) 28762306a36Sopenharmony_ci#define MCFGPIO_PCLRR_TIMERL (MCF_IPSBAR + 0x100064) 28862306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTL (MCF_IPSBAR + 0x100065) 28962306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FEC1H (MCF_IPSBAR + 0x100066) 29062306a36Sopenharmony_ci#define MCFGPIO_PCLRR_FEC1L (MCF_IPSBAR + 0x100067) 29162306a36Sopenharmony_ci#define MCFGPIO_PCLRR_BS (MCF_IPSBAR + 0x100068) 29262306a36Sopenharmony_ci#define MCFGPIO_PCLRR_IRQ (MCF_IPSBAR + 0x100069) 29362306a36Sopenharmony_ci#define MCFGPIO_PCLRR_USBH (MCF_IPSBAR + 0x10006A) 29462306a36Sopenharmony_ci#define MCFGPIO_PCLRR_USBL (MCF_IPSBAR + 0x10006B) 29562306a36Sopenharmony_ci#define MCFGPIO_PCLRR_UARTH (MCF_IPSBAR + 0x10006C) 29662306a36Sopenharmony_ci 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci/* 29962306a36Sopenharmony_ci * Generic GPIO support 30062306a36Sopenharmony_ci */ 30162306a36Sopenharmony_ci#define MCFGPIO_PODR MCFGPIO_PODR_BUSCTL 30262306a36Sopenharmony_ci#define MCFGPIO_PDDR MCFGPIO_PDDR_BUSCTL 30362306a36Sopenharmony_ci#define MCFGPIO_PPDR MCFGPIO_PPDSDR_BUSCTL 30462306a36Sopenharmony_ci#define MCFGPIO_SETR MCFGPIO_PPDSDR_BUSCTL 30562306a36Sopenharmony_ci#define MCFGPIO_CLRR MCFGPIO_PCLRR_BUSCTL 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define MCFGPIO_PIN_MAX 148 30862306a36Sopenharmony_ci#define MCFGPIO_IRQ_MAX 8 30962306a36Sopenharmony_ci#define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci/* 31262306a36Sopenharmony_ci * Port Pin Assignment registers. 31362306a36Sopenharmony_ci */ 31462306a36Sopenharmony_ci#define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100070) 31562306a36Sopenharmony_ci#define MCFGPIO_PAR_CS (MCF_IPSBAR + 0x100071) 31662306a36Sopenharmony_ci#define MCFGPIO_PAR_BUSCTL (MCF_IPSBAR + 0x100072) 31762306a36Sopenharmony_ci#define MCFGPIO_PAR_USB (MCF_IPSBAR + 0x100076) 31862306a36Sopenharmony_ci#define MCFGPIO_PAR_FEC0HL (MCF_IPSBAR + 0x100078) 31962306a36Sopenharmony_ci#define MCFGPIO_PAR_FEC1HL (MCF_IPSBAR + 0x100079) 32062306a36Sopenharmony_ci#define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10007A) 32162306a36Sopenharmony_ci#define MCFGPIO_PAR_UART (MCF_IPSBAR + 0x10007C) 32262306a36Sopenharmony_ci#define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10007E) 32362306a36Sopenharmony_ci#define MCFGPIO_PAR_SDRAM (MCF_IPSBAR + 0x100080) 32462306a36Sopenharmony_ci#define MCFGPIO_PAR_FECI2C (MCF_IPSBAR + 0x100082) 32562306a36Sopenharmony_ci#define MCFGPIO_PAR_BS (MCF_IPSBAR + 0x100084) 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci#define UART0_ENABLE_MASK 0x000f 32862306a36Sopenharmony_ci#define UART1_ENABLE_MASK 0x00f0 32962306a36Sopenharmony_ci#define UART2_ENABLE_MASK 0x3f00 33062306a36Sopenharmony_ci#endif /* CONFIG_M5275 */ 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci/* 33362306a36Sopenharmony_ci * PIT timer base addresses. 33462306a36Sopenharmony_ci */ 33562306a36Sopenharmony_ci#define MCFPIT_BASE1 (MCF_IPSBAR + 0x150000) 33662306a36Sopenharmony_ci#define MCFPIT_BASE2 (MCF_IPSBAR + 0x160000) 33762306a36Sopenharmony_ci#define MCFPIT_BASE3 (MCF_IPSBAR + 0x170000) 33862306a36Sopenharmony_ci#define MCFPIT_BASE4 (MCF_IPSBAR + 0x180000) 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci/* 34162306a36Sopenharmony_ci * EPort 34262306a36Sopenharmony_ci */ 34362306a36Sopenharmony_ci#define MCFEPORT_EPPAR (MCF_IPSBAR + 0x130000) 34462306a36Sopenharmony_ci#define MCFEPORT_EPDDR (MCF_IPSBAR + 0x130002) 34562306a36Sopenharmony_ci#define MCFEPORT_EPIER (MCF_IPSBAR + 0x130003) 34662306a36Sopenharmony_ci#define MCFEPORT_EPDR (MCF_IPSBAR + 0x130004) 34762306a36Sopenharmony_ci#define MCFEPORT_EPPDR (MCF_IPSBAR + 0x130005) 34862306a36Sopenharmony_ci#define MCFEPORT_EPFR (MCF_IPSBAR + 0x130006) 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci/* 35162306a36Sopenharmony_ci * Reset Control Unit (relative to IPSBAR). 35262306a36Sopenharmony_ci */ 35362306a36Sopenharmony_ci#define MCF_RCR (MCF_IPSBAR + 0x110000) 35462306a36Sopenharmony_ci#define MCF_RSR (MCF_IPSBAR + 0x110001) 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci#define MCF_RCR_SWRESET 0x80 /* Software reset bit */ 35762306a36Sopenharmony_ci#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ci/* 36062306a36Sopenharmony_ci * I2C module. 36162306a36Sopenharmony_ci */ 36262306a36Sopenharmony_ci#define MCFI2C_BASE0 (MCF_IPSBAR + 0x300) 36362306a36Sopenharmony_ci#define MCFI2C_SIZE0 0x40 36462306a36Sopenharmony_ci 36562306a36Sopenharmony_ci/****************************************************************************/ 36662306a36Sopenharmony_ci#endif /* m527xsim_h */ 367