18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
48c2ecf20Sopenharmony_ci * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * This contains hardware definitions that are common between i.MX21 and
78c2ecf20Sopenharmony_ci * i.MX27.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef __MACH_MX2x_H__
118c2ecf20Sopenharmony_ci#define __MACH_MX2x_H__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* The following addresses are common between i.MX21 and i.MX27 */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/* Register offsets */
168c2ecf20Sopenharmony_ci#define MX2x_AIPI_BASE_ADDR		0x10000000
178c2ecf20Sopenharmony_ci#define MX2x_AIPI_SIZE			SZ_1M
188c2ecf20Sopenharmony_ci#define MX2x_DMA_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x01000)
198c2ecf20Sopenharmony_ci#define MX2x_WDOG_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x02000)
208c2ecf20Sopenharmony_ci#define MX2x_GPT1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x03000)
218c2ecf20Sopenharmony_ci#define MX2x_GPT2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x04000)
228c2ecf20Sopenharmony_ci#define MX2x_GPT3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x05000)
238c2ecf20Sopenharmony_ci#define MX2x_PWM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x06000)
248c2ecf20Sopenharmony_ci#define MX2x_RTC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x07000)
258c2ecf20Sopenharmony_ci#define MX2x_KPP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x08000)
268c2ecf20Sopenharmony_ci#define MX2x_OWIRE_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x09000)
278c2ecf20Sopenharmony_ci#define MX2x_UART1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0a000)
288c2ecf20Sopenharmony_ci#define MX2x_UART2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0b000)
298c2ecf20Sopenharmony_ci#define MX2x_UART3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0c000)
308c2ecf20Sopenharmony_ci#define MX2x_UART4_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0d000)
318c2ecf20Sopenharmony_ci#define MX2x_CSPI1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0e000)
328c2ecf20Sopenharmony_ci#define MX2x_CSPI2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0f000)
338c2ecf20Sopenharmony_ci#define MX2x_SSI1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x10000)
348c2ecf20Sopenharmony_ci#define MX2x_SSI2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x11000)
358c2ecf20Sopenharmony_ci#define MX2x_I2C_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x12000)
368c2ecf20Sopenharmony_ci#define MX2x_SDHC1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x13000)
378c2ecf20Sopenharmony_ci#define MX2x_SDHC2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x14000)
388c2ecf20Sopenharmony_ci#define MX2x_GPIO_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x15000)
398c2ecf20Sopenharmony_ci#define MX2x_AUDMUX_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x16000)
408c2ecf20Sopenharmony_ci#define MX2x_CSPI3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x17000)
418c2ecf20Sopenharmony_ci#define MX2x_LCDC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x21000)
428c2ecf20Sopenharmony_ci#define MX2x_SLCDC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x22000)
438c2ecf20Sopenharmony_ci#define MX2x_USBOTG_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x24000)
448c2ecf20Sopenharmony_ci#define MX2x_EMMA_PP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x26000)
458c2ecf20Sopenharmony_ci#define MX2x_EMMA_PRP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x26400)
468c2ecf20Sopenharmony_ci#define MX2x_CCM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x27000)
478c2ecf20Sopenharmony_ci#define MX2x_SYSCTRL_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x27800)
488c2ecf20Sopenharmony_ci#define MX2x_JAM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x3e000)
498c2ecf20Sopenharmony_ci#define MX2x_MAX_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x3f000)
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define MX2x_AVIC_BASE_ADDR		0x10040000
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define MX2x_SAHB1_BASE_ADDR		0x80000000
548c2ecf20Sopenharmony_ci#define MX2x_SAHB1_SIZE			SZ_1M
558c2ecf20Sopenharmony_ci#define MX2x_CSI_BASE_ADDR			(MX2x_SAHB1_BASE_ADDR + 0x0000)
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci/* fixed interrupt numbers */
588c2ecf20Sopenharmony_ci#include <asm/irq.h>
598c2ecf20Sopenharmony_ci#define MX2x_INT_CSPI3		(NR_IRQS_LEGACY + 6)
608c2ecf20Sopenharmony_ci#define MX2x_INT_GPIO		(NR_IRQS_LEGACY + 8)
618c2ecf20Sopenharmony_ci#define MX2x_INT_SDHC2		(NR_IRQS_LEGACY + 10)
628c2ecf20Sopenharmony_ci#define MX2x_INT_SDHC1		(NR_IRQS_LEGACY + 11)
638c2ecf20Sopenharmony_ci#define MX2x_INT_I2C		(NR_IRQS_LEGACY + 12)
648c2ecf20Sopenharmony_ci#define MX2x_INT_SSI2		(NR_IRQS_LEGACY + 13)
658c2ecf20Sopenharmony_ci#define MX2x_INT_SSI1		(NR_IRQS_LEGACY + 14)
668c2ecf20Sopenharmony_ci#define MX2x_INT_CSPI2		(NR_IRQS_LEGACY + 15)
678c2ecf20Sopenharmony_ci#define MX2x_INT_CSPI1		(NR_IRQS_LEGACY + 16)
688c2ecf20Sopenharmony_ci#define MX2x_INT_UART4		(NR_IRQS_LEGACY + 17)
698c2ecf20Sopenharmony_ci#define MX2x_INT_UART3		(NR_IRQS_LEGACY + 18)
708c2ecf20Sopenharmony_ci#define MX2x_INT_UART2		(NR_IRQS_LEGACY + 19)
718c2ecf20Sopenharmony_ci#define MX2x_INT_UART1		(NR_IRQS_LEGACY + 20)
728c2ecf20Sopenharmony_ci#define MX2x_INT_KPP		(NR_IRQS_LEGACY + 21)
738c2ecf20Sopenharmony_ci#define MX2x_INT_RTC		(NR_IRQS_LEGACY + 22)
748c2ecf20Sopenharmony_ci#define MX2x_INT_PWM		(NR_IRQS_LEGACY + 23)
758c2ecf20Sopenharmony_ci#define MX2x_INT_GPT3		(NR_IRQS_LEGACY + 24)
768c2ecf20Sopenharmony_ci#define MX2x_INT_GPT2		(NR_IRQS_LEGACY + 25)
778c2ecf20Sopenharmony_ci#define MX2x_INT_GPT1		(NR_IRQS_LEGACY + 26)
788c2ecf20Sopenharmony_ci#define MX2x_INT_WDOG		(NR_IRQS_LEGACY + 27)
798c2ecf20Sopenharmony_ci#define MX2x_INT_PCMCIA		(NR_IRQS_LEGACY + 28)
808c2ecf20Sopenharmony_ci#define MX2x_INT_NANDFC		(NR_IRQS_LEGACY + 29)
818c2ecf20Sopenharmony_ci#define MX2x_INT_CSI		(NR_IRQS_LEGACY + 31)
828c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH0		(NR_IRQS_LEGACY + 32)
838c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH1		(NR_IRQS_LEGACY + 33)
848c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH2		(NR_IRQS_LEGACY + 34)
858c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH3		(NR_IRQS_LEGACY + 35)
868c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH4		(NR_IRQS_LEGACY + 36)
878c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH5		(NR_IRQS_LEGACY + 37)
888c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH6		(NR_IRQS_LEGACY + 38)
898c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH7		(NR_IRQS_LEGACY + 39)
908c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH8		(NR_IRQS_LEGACY + 40)
918c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH9		(NR_IRQS_LEGACY + 41)
928c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH10	(NR_IRQS_LEGACY + 42)
938c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH11	(NR_IRQS_LEGACY + 43)
948c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH12	(NR_IRQS_LEGACY + 44)
958c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH13	(NR_IRQS_LEGACY + 45)
968c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH14	(NR_IRQS_LEGACY + 46)
978c2ecf20Sopenharmony_ci#define MX2x_INT_DMACH15	(NR_IRQS_LEGACY + 47)
988c2ecf20Sopenharmony_ci#define MX2x_INT_EMMAPRP	(NR_IRQS_LEGACY + 51)
998c2ecf20Sopenharmony_ci#define MX2x_INT_EMMAPP		(NR_IRQS_LEGACY + 52)
1008c2ecf20Sopenharmony_ci#define MX2x_INT_SLCDC		(NR_IRQS_LEGACY + 60)
1018c2ecf20Sopenharmony_ci#define MX2x_INT_LCDC		(NR_IRQS_LEGACY + 61)
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci/* fixed DMA request numbers */
1048c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI3_RX	1
1058c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI3_TX	2
1068c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_EXT	3
1078c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SDHC2	6
1088c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SDHC1	7
1098c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_RX0	8
1108c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_TX0	9
1118c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_RX1	10
1128c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_TX1	11
1138c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_RX0	12
1148c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_TX0	13
1158c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_RX1	14
1168c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_TX1	15
1178c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI2_RX	16
1188c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI2_TX	17
1198c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI1_RX	18
1208c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSPI1_TX	19
1218c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART4_RX	20
1228c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART4_TX	21
1238c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART3_RX	22
1248c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART3_TX	23
1258c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART2_RX	24
1268c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART2_TX	25
1278c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART1_RX	26
1288c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_UART1_TX	27
1298c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSI_STAT	30
1308c2ecf20Sopenharmony_ci#define MX2x_DMA_REQ_CSI_RX	31
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci#endif /* ifndef __MACH_MX2x_H__ */
133