162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
462306a36Sopenharmony_ci * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * This contains hardware definitions that are common between i.MX21 and
762306a36Sopenharmony_ci * i.MX27.
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __MACH_MX2x_H__
1162306a36Sopenharmony_ci#define __MACH_MX2x_H__
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* The following addresses are common between i.MX21 and i.MX27 */
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/* Register offsets */
1662306a36Sopenharmony_ci#define MX2x_AIPI_BASE_ADDR		0x10000000
1762306a36Sopenharmony_ci#define MX2x_AIPI_SIZE			SZ_1M
1862306a36Sopenharmony_ci#define MX2x_DMA_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x01000)
1962306a36Sopenharmony_ci#define MX2x_WDOG_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x02000)
2062306a36Sopenharmony_ci#define MX2x_GPT1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x03000)
2162306a36Sopenharmony_ci#define MX2x_GPT2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x04000)
2262306a36Sopenharmony_ci#define MX2x_GPT3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x05000)
2362306a36Sopenharmony_ci#define MX2x_PWM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x06000)
2462306a36Sopenharmony_ci#define MX2x_RTC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x07000)
2562306a36Sopenharmony_ci#define MX2x_KPP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x08000)
2662306a36Sopenharmony_ci#define MX2x_OWIRE_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x09000)
2762306a36Sopenharmony_ci#define MX2x_UART1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0a000)
2862306a36Sopenharmony_ci#define MX2x_UART2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0b000)
2962306a36Sopenharmony_ci#define MX2x_UART3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0c000)
3062306a36Sopenharmony_ci#define MX2x_UART4_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0d000)
3162306a36Sopenharmony_ci#define MX2x_CSPI1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0e000)
3262306a36Sopenharmony_ci#define MX2x_CSPI2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x0f000)
3362306a36Sopenharmony_ci#define MX2x_SSI1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x10000)
3462306a36Sopenharmony_ci#define MX2x_SSI2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x11000)
3562306a36Sopenharmony_ci#define MX2x_I2C_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x12000)
3662306a36Sopenharmony_ci#define MX2x_SDHC1_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x13000)
3762306a36Sopenharmony_ci#define MX2x_SDHC2_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x14000)
3862306a36Sopenharmony_ci#define MX2x_GPIO_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x15000)
3962306a36Sopenharmony_ci#define MX2x_AUDMUX_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x16000)
4062306a36Sopenharmony_ci#define MX2x_CSPI3_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x17000)
4162306a36Sopenharmony_ci#define MX2x_LCDC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x21000)
4262306a36Sopenharmony_ci#define MX2x_SLCDC_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x22000)
4362306a36Sopenharmony_ci#define MX2x_USBOTG_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x24000)
4462306a36Sopenharmony_ci#define MX2x_EMMA_PP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x26000)
4562306a36Sopenharmony_ci#define MX2x_EMMA_PRP_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x26400)
4662306a36Sopenharmony_ci#define MX2x_CCM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x27000)
4762306a36Sopenharmony_ci#define MX2x_SYSCTRL_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x27800)
4862306a36Sopenharmony_ci#define MX2x_JAM_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x3e000)
4962306a36Sopenharmony_ci#define MX2x_MAX_BASE_ADDR			(MX2x_AIPI_BASE_ADDR + 0x3f000)
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci#define MX2x_AVIC_BASE_ADDR		0x10040000
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define MX2x_SAHB1_BASE_ADDR		0x80000000
5462306a36Sopenharmony_ci#define MX2x_SAHB1_SIZE			SZ_1M
5562306a36Sopenharmony_ci#define MX2x_CSI_BASE_ADDR			(MX2x_SAHB1_BASE_ADDR + 0x0000)
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci/* fixed interrupt numbers */
5862306a36Sopenharmony_ci#include <asm/irq.h>
5962306a36Sopenharmony_ci#define MX2x_INT_CSPI3		(NR_IRQS_LEGACY + 6)
6062306a36Sopenharmony_ci#define MX2x_INT_GPIO		(NR_IRQS_LEGACY + 8)
6162306a36Sopenharmony_ci#define MX2x_INT_SDHC2		(NR_IRQS_LEGACY + 10)
6262306a36Sopenharmony_ci#define MX2x_INT_SDHC1		(NR_IRQS_LEGACY + 11)
6362306a36Sopenharmony_ci#define MX2x_INT_I2C		(NR_IRQS_LEGACY + 12)
6462306a36Sopenharmony_ci#define MX2x_INT_SSI2		(NR_IRQS_LEGACY + 13)
6562306a36Sopenharmony_ci#define MX2x_INT_SSI1		(NR_IRQS_LEGACY + 14)
6662306a36Sopenharmony_ci#define MX2x_INT_CSPI2		(NR_IRQS_LEGACY + 15)
6762306a36Sopenharmony_ci#define MX2x_INT_CSPI1		(NR_IRQS_LEGACY + 16)
6862306a36Sopenharmony_ci#define MX2x_INT_UART4		(NR_IRQS_LEGACY + 17)
6962306a36Sopenharmony_ci#define MX2x_INT_UART3		(NR_IRQS_LEGACY + 18)
7062306a36Sopenharmony_ci#define MX2x_INT_UART2		(NR_IRQS_LEGACY + 19)
7162306a36Sopenharmony_ci#define MX2x_INT_UART1		(NR_IRQS_LEGACY + 20)
7262306a36Sopenharmony_ci#define MX2x_INT_KPP		(NR_IRQS_LEGACY + 21)
7362306a36Sopenharmony_ci#define MX2x_INT_RTC		(NR_IRQS_LEGACY + 22)
7462306a36Sopenharmony_ci#define MX2x_INT_PWM		(NR_IRQS_LEGACY + 23)
7562306a36Sopenharmony_ci#define MX2x_INT_GPT3		(NR_IRQS_LEGACY + 24)
7662306a36Sopenharmony_ci#define MX2x_INT_GPT2		(NR_IRQS_LEGACY + 25)
7762306a36Sopenharmony_ci#define MX2x_INT_GPT1		(NR_IRQS_LEGACY + 26)
7862306a36Sopenharmony_ci#define MX2x_INT_WDOG		(NR_IRQS_LEGACY + 27)
7962306a36Sopenharmony_ci#define MX2x_INT_PCMCIA		(NR_IRQS_LEGACY + 28)
8062306a36Sopenharmony_ci#define MX2x_INT_NANDFC		(NR_IRQS_LEGACY + 29)
8162306a36Sopenharmony_ci#define MX2x_INT_CSI		(NR_IRQS_LEGACY + 31)
8262306a36Sopenharmony_ci#define MX2x_INT_DMACH0		(NR_IRQS_LEGACY + 32)
8362306a36Sopenharmony_ci#define MX2x_INT_DMACH1		(NR_IRQS_LEGACY + 33)
8462306a36Sopenharmony_ci#define MX2x_INT_DMACH2		(NR_IRQS_LEGACY + 34)
8562306a36Sopenharmony_ci#define MX2x_INT_DMACH3		(NR_IRQS_LEGACY + 35)
8662306a36Sopenharmony_ci#define MX2x_INT_DMACH4		(NR_IRQS_LEGACY + 36)
8762306a36Sopenharmony_ci#define MX2x_INT_DMACH5		(NR_IRQS_LEGACY + 37)
8862306a36Sopenharmony_ci#define MX2x_INT_DMACH6		(NR_IRQS_LEGACY + 38)
8962306a36Sopenharmony_ci#define MX2x_INT_DMACH7		(NR_IRQS_LEGACY + 39)
9062306a36Sopenharmony_ci#define MX2x_INT_DMACH8		(NR_IRQS_LEGACY + 40)
9162306a36Sopenharmony_ci#define MX2x_INT_DMACH9		(NR_IRQS_LEGACY + 41)
9262306a36Sopenharmony_ci#define MX2x_INT_DMACH10	(NR_IRQS_LEGACY + 42)
9362306a36Sopenharmony_ci#define MX2x_INT_DMACH11	(NR_IRQS_LEGACY + 43)
9462306a36Sopenharmony_ci#define MX2x_INT_DMACH12	(NR_IRQS_LEGACY + 44)
9562306a36Sopenharmony_ci#define MX2x_INT_DMACH13	(NR_IRQS_LEGACY + 45)
9662306a36Sopenharmony_ci#define MX2x_INT_DMACH14	(NR_IRQS_LEGACY + 46)
9762306a36Sopenharmony_ci#define MX2x_INT_DMACH15	(NR_IRQS_LEGACY + 47)
9862306a36Sopenharmony_ci#define MX2x_INT_EMMAPRP	(NR_IRQS_LEGACY + 51)
9962306a36Sopenharmony_ci#define MX2x_INT_EMMAPP		(NR_IRQS_LEGACY + 52)
10062306a36Sopenharmony_ci#define MX2x_INT_SLCDC		(NR_IRQS_LEGACY + 60)
10162306a36Sopenharmony_ci#define MX2x_INT_LCDC		(NR_IRQS_LEGACY + 61)
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci/* fixed DMA request numbers */
10462306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI3_RX	1
10562306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI3_TX	2
10662306a36Sopenharmony_ci#define MX2x_DMA_REQ_EXT	3
10762306a36Sopenharmony_ci#define MX2x_DMA_REQ_SDHC2	6
10862306a36Sopenharmony_ci#define MX2x_DMA_REQ_SDHC1	7
10962306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_RX0	8
11062306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_TX0	9
11162306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_RX1	10
11262306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI2_TX1	11
11362306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_RX0	12
11462306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_TX0	13
11562306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_RX1	14
11662306a36Sopenharmony_ci#define MX2x_DMA_REQ_SSI1_TX1	15
11762306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI2_RX	16
11862306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI2_TX	17
11962306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI1_RX	18
12062306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSPI1_TX	19
12162306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART4_RX	20
12262306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART4_TX	21
12362306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART3_RX	22
12462306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART3_TX	23
12562306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART2_RX	24
12662306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART2_TX	25
12762306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART1_RX	26
12862306a36Sopenharmony_ci#define MX2x_DMA_REQ_UART1_TX	27
12962306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSI_STAT	30
13062306a36Sopenharmony_ci#define MX2x_DMA_REQ_CSI_RX	31
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci#endif /* ifndef __MACH_MX2x_H__ */
133