18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef __MACH_MX3x_H__
88c2ecf20Sopenharmony_ci#define __MACH_MX3x_H__
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/*
118c2ecf20Sopenharmony_ci * MX31 memory map:
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * Virt		Phys		Size	What
148c2ecf20Sopenharmony_ci * ---------------------------------------------------------------------------
158c2ecf20Sopenharmony_ci * FC000000	43F00000	1M	AIPS 1
168c2ecf20Sopenharmony_ci * FC100000	50000000	1M	SPBA
178c2ecf20Sopenharmony_ci * FC200000	53F00000	1M	AIPS 2
188c2ecf20Sopenharmony_ci * FC500000	60000000	128M	ROMPATCH
198c2ecf20Sopenharmony_ci * FC400000	68000000	128M	AVIC
208c2ecf20Sopenharmony_ci *         	70000000	256M	IPU (MAX M2)
218c2ecf20Sopenharmony_ci *         	80000000	256M	CSD0 SDRAM/DDR
228c2ecf20Sopenharmony_ci *         	90000000	256M	CSD1 SDRAM/DDR
238c2ecf20Sopenharmony_ci *         	A0000000	128M	CS0 Flash
248c2ecf20Sopenharmony_ci *         	A8000000	128M	CS1 Flash
258c2ecf20Sopenharmony_ci *         	B0000000	32M	CS2
268c2ecf20Sopenharmony_ci *         	B2000000	32M	CS3
278c2ecf20Sopenharmony_ci * F4000000	B4000000	32M	CS4
288c2ecf20Sopenharmony_ci *         	B6000000	32M	CS5
298c2ecf20Sopenharmony_ci * FC320000	B8000000	64K	NAND, SDRAM, WEIM, M3IF, EMI controllers
308c2ecf20Sopenharmony_ci *         	C0000000	64M	PCMCIA/CF
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/*
348c2ecf20Sopenharmony_ci * L2CC
358c2ecf20Sopenharmony_ci */
368c2ecf20Sopenharmony_ci#define MX3x_L2CC_BASE_ADDR		0x30000000
378c2ecf20Sopenharmony_ci#define MX3x_L2CC_SIZE			SZ_1M
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci/*
408c2ecf20Sopenharmony_ci * AIPS 1
418c2ecf20Sopenharmony_ci */
428c2ecf20Sopenharmony_ci#define MX3x_AIPS1_BASE_ADDR		0x43f00000
438c2ecf20Sopenharmony_ci#define MX3x_AIPS1_SIZE			SZ_1M
448c2ecf20Sopenharmony_ci#define MX3x_MAX_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x04000)
458c2ecf20Sopenharmony_ci#define MX3x_EVTMON_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x08000)
468c2ecf20Sopenharmony_ci#define MX3x_CLKCTL_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x0c000)
478c2ecf20Sopenharmony_ci#define MX3x_ETB_SLOT4_BASE_ADDR		(MX3x_AIPS1_BASE_ADDR + 0x10000)
488c2ecf20Sopenharmony_ci#define MX3x_ETB_SLOT5_BASE_ADDR		(MX3x_AIPS1_BASE_ADDR + 0x14000)
498c2ecf20Sopenharmony_ci#define MX3x_ECT_CTIO_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x18000)
508c2ecf20Sopenharmony_ci#define MX3x_I2C_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x80000)
518c2ecf20Sopenharmony_ci#define MX3x_I2C3_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x84000)
528c2ecf20Sopenharmony_ci#define MX3x_UART1_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x90000)
538c2ecf20Sopenharmony_ci#define MX3x_UART2_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x94000)
548c2ecf20Sopenharmony_ci#define MX3x_I2C2_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x98000)
558c2ecf20Sopenharmony_ci#define MX3x_OWIRE_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0x9c000)
568c2ecf20Sopenharmony_ci#define MX3x_SSI1_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xa0000)
578c2ecf20Sopenharmony_ci#define MX3x_CSPI1_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xa4000)
588c2ecf20Sopenharmony_ci#define MX3x_KPP_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xa8000)
598c2ecf20Sopenharmony_ci#define MX3x_IOMUXC_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xac000)
608c2ecf20Sopenharmony_ci#define MX3x_ECT_IP1_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xb8000)
618c2ecf20Sopenharmony_ci#define MX3x_ECT_IP2_BASE_ADDR			(MX3x_AIPS1_BASE_ADDR + 0xbc000)
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci/*
648c2ecf20Sopenharmony_ci * SPBA global module enabled #0
658c2ecf20Sopenharmony_ci */
668c2ecf20Sopenharmony_ci#define MX3x_SPBA0_BASE_ADDR		0x50000000
678c2ecf20Sopenharmony_ci#define MX3x_SPBA0_SIZE			SZ_1M
688c2ecf20Sopenharmony_ci#define MX3x_UART3_BASE_ADDR			(MX3x_SPBA0_BASE_ADDR + 0x0c000)
698c2ecf20Sopenharmony_ci#define MX3x_CSPI2_BASE_ADDR			(MX3x_SPBA0_BASE_ADDR + 0x10000)
708c2ecf20Sopenharmony_ci#define MX3x_SSI2_BASE_ADDR			(MX3x_SPBA0_BASE_ADDR + 0x14000)
718c2ecf20Sopenharmony_ci#define MX3x_ATA_DMA_BASE_ADDR			(MX3x_SPBA0_BASE_ADDR + 0x20000)
728c2ecf20Sopenharmony_ci#define MX3x_MSHC1_BASE_ADDR			(MX3x_SPBA0_BASE_ADDR + 0x24000)
738c2ecf20Sopenharmony_ci#define MX3x_SPBA_CTRL_BASE_ADDR		(MX3x_SPBA0_BASE_ADDR + 0x3c000)
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci/*
768c2ecf20Sopenharmony_ci * AIPS 2
778c2ecf20Sopenharmony_ci */
788c2ecf20Sopenharmony_ci#define MX3x_AIPS2_BASE_ADDR		0x53f00000
798c2ecf20Sopenharmony_ci#define MX3x_AIPS2_SIZE			SZ_1M
808c2ecf20Sopenharmony_ci#define MX3x_CCM_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0x80000)
818c2ecf20Sopenharmony_ci#define MX3x_GPT1_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0x90000)
828c2ecf20Sopenharmony_ci#define MX3x_EPIT1_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0x94000)
838c2ecf20Sopenharmony_ci#define MX3x_EPIT2_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0x98000)
848c2ecf20Sopenharmony_ci#define MX3x_GPIO3_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xa4000)
858c2ecf20Sopenharmony_ci#define MX3x_SCC_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xac000)
868c2ecf20Sopenharmony_ci#define MX3x_RNGA_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xb0000)
878c2ecf20Sopenharmony_ci#define MX3x_IPU_CTRL_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xc0000)
888c2ecf20Sopenharmony_ci#define MX3x_AUDMUX_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xc4000)
898c2ecf20Sopenharmony_ci#define MX3x_GPIO1_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xcc000)
908c2ecf20Sopenharmony_ci#define MX3x_GPIO2_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xd0000)
918c2ecf20Sopenharmony_ci#define MX3x_SDMA_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xd4000)
928c2ecf20Sopenharmony_ci#define MX3x_RTC_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xd8000)
938c2ecf20Sopenharmony_ci#define MX3x_WDOG_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xdc000)
948c2ecf20Sopenharmony_ci#define MX3x_PWM_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xe0000)
958c2ecf20Sopenharmony_ci#define MX3x_RTIC_BASE_ADDR			(MX3x_AIPS2_BASE_ADDR + 0xec000)
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci/*
988c2ecf20Sopenharmony_ci * ROMP and AVIC
998c2ecf20Sopenharmony_ci */
1008c2ecf20Sopenharmony_ci#define MX3x_ROMP_BASE_ADDR		0x60000000
1018c2ecf20Sopenharmony_ci#define MX3x_ROMP_SIZE			SZ_1M
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci#define MX3x_AVIC_BASE_ADDR		0x68000000
1048c2ecf20Sopenharmony_ci#define MX3x_AVIC_SIZE			SZ_1M
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci/*
1078c2ecf20Sopenharmony_ci * Memory regions and CS
1088c2ecf20Sopenharmony_ci */
1098c2ecf20Sopenharmony_ci#define MX3x_IPU_MEM_BASE_ADDR		0x70000000
1108c2ecf20Sopenharmony_ci#define MX3x_CSD0_BASE_ADDR		0x80000000
1118c2ecf20Sopenharmony_ci#define MX3x_CSD1_BASE_ADDR		0x90000000
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci#define MX3x_CS0_BASE_ADDR		0xa0000000
1148c2ecf20Sopenharmony_ci#define MX3x_CS1_BASE_ADDR		0xa8000000
1158c2ecf20Sopenharmony_ci#define MX3x_CS2_BASE_ADDR		0xb0000000
1168c2ecf20Sopenharmony_ci#define MX3x_CS3_BASE_ADDR		0xb2000000
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci#define MX3x_CS4_BASE_ADDR		0xb4000000
1198c2ecf20Sopenharmony_ci#define MX3x_CS4_BASE_ADDR_VIRT		0xf6000000
1208c2ecf20Sopenharmony_ci#define MX3x_CS4_SIZE			SZ_32M
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci#define MX3x_CS5_BASE_ADDR		0xb6000000
1238c2ecf20Sopenharmony_ci#define MX3x_CS5_BASE_ADDR_VIRT		0xf8000000
1248c2ecf20Sopenharmony_ci#define MX3x_CS5_SIZE			SZ_32M
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci/*
1278c2ecf20Sopenharmony_ci * NAND, SDRAM, WEIM, M3IF, EMI controllers
1288c2ecf20Sopenharmony_ci */
1298c2ecf20Sopenharmony_ci#define MX3x_X_MEMC_BASE_ADDR		0xb8000000
1308c2ecf20Sopenharmony_ci#define MX3x_X_MEMC_SIZE		SZ_64K
1318c2ecf20Sopenharmony_ci#define MX3x_ESDCTL_BASE_ADDR			(MX3x_X_MEMC_BASE_ADDR + 0x1000)
1328c2ecf20Sopenharmony_ci#define MX3x_WEIM_BASE_ADDR			(MX3x_X_MEMC_BASE_ADDR + 0x2000)
1338c2ecf20Sopenharmony_ci#define MX3x_M3IF_BASE_ADDR			(MX3x_X_MEMC_BASE_ADDR + 0x3000)
1348c2ecf20Sopenharmony_ci#define MX3x_EMI_CTL_BASE_ADDR			(MX3x_X_MEMC_BASE_ADDR + 0x4000)
1358c2ecf20Sopenharmony_ci#define MX3x_PCMCIA_CTL_BASE_ADDR		MX3x_EMI_CTL_BASE_ADDR
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci#define MX3x_PCMCIA_MEM_BASE_ADDR	0xbc000000
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci/*
1408c2ecf20Sopenharmony_ci * Interrupt numbers
1418c2ecf20Sopenharmony_ci */
1428c2ecf20Sopenharmony_ci#include <asm/irq.h>
1438c2ecf20Sopenharmony_ci#define MX3x_INT_I2C3		(NR_IRQS_LEGACY + 3)
1448c2ecf20Sopenharmony_ci#define MX3x_INT_I2C2		(NR_IRQS_LEGACY + 4)
1458c2ecf20Sopenharmony_ci#define MX3x_INT_RTIC		(NR_IRQS_LEGACY + 6)
1468c2ecf20Sopenharmony_ci#define MX3x_INT_I2C		(NR_IRQS_LEGACY + 10)
1478c2ecf20Sopenharmony_ci#define MX3x_INT_CSPI2		(NR_IRQS_LEGACY + 13)
1488c2ecf20Sopenharmony_ci#define MX3x_INT_CSPI1		(NR_IRQS_LEGACY + 14)
1498c2ecf20Sopenharmony_ci#define MX3x_INT_ATA		(NR_IRQS_LEGACY + 15)
1508c2ecf20Sopenharmony_ci#define MX3x_INT_UART3		(NR_IRQS_LEGACY + 18)
1518c2ecf20Sopenharmony_ci#define MX3x_INT_IIM		(NR_IRQS_LEGACY + 19)
1528c2ecf20Sopenharmony_ci#define MX3x_INT_RNGA		(NR_IRQS_LEGACY + 22)
1538c2ecf20Sopenharmony_ci#define MX3x_INT_EVTMON		(NR_IRQS_LEGACY + 23)
1548c2ecf20Sopenharmony_ci#define MX3x_INT_KPP		(NR_IRQS_LEGACY + 24)
1558c2ecf20Sopenharmony_ci#define MX3x_INT_RTC		(NR_IRQS_LEGACY + 25)
1568c2ecf20Sopenharmony_ci#define MX3x_INT_PWM		(NR_IRQS_LEGACY + 26)
1578c2ecf20Sopenharmony_ci#define MX3x_INT_EPIT2		(NR_IRQS_LEGACY + 27)
1588c2ecf20Sopenharmony_ci#define MX3x_INT_EPIT1		(NR_IRQS_LEGACY + 28)
1598c2ecf20Sopenharmony_ci#define MX3x_INT_GPT		(NR_IRQS_LEGACY + 29)
1608c2ecf20Sopenharmony_ci#define MX3x_INT_POWER_FAIL	(NR_IRQS_LEGACY + 30)
1618c2ecf20Sopenharmony_ci#define MX3x_INT_UART2		(NR_IRQS_LEGACY + 32)
1628c2ecf20Sopenharmony_ci#define MX3x_INT_NANDFC		(NR_IRQS_LEGACY + 33)
1638c2ecf20Sopenharmony_ci#define MX3x_INT_SDMA		(NR_IRQS_LEGACY + 34)
1648c2ecf20Sopenharmony_ci#define MX3x_INT_MSHC1		(NR_IRQS_LEGACY + 39)
1658c2ecf20Sopenharmony_ci#define MX3x_INT_IPU_ERR	(NR_IRQS_LEGACY + 41)
1668c2ecf20Sopenharmony_ci#define MX3x_INT_IPU_SYN	(NR_IRQS_LEGACY + 42)
1678c2ecf20Sopenharmony_ci#define MX3x_INT_UART1		(NR_IRQS_LEGACY + 45)
1688c2ecf20Sopenharmony_ci#define MX3x_INT_ECT		(NR_IRQS_LEGACY + 48)
1698c2ecf20Sopenharmony_ci#define MX3x_INT_SCC_SCM	(NR_IRQS_LEGACY + 49)
1708c2ecf20Sopenharmony_ci#define MX3x_INT_SCC_SMN	(NR_IRQS_LEGACY + 50)
1718c2ecf20Sopenharmony_ci#define MX3x_INT_GPIO2		(NR_IRQS_LEGACY + 51)
1728c2ecf20Sopenharmony_ci#define MX3x_INT_GPIO1		(NR_IRQS_LEGACY + 52)
1738c2ecf20Sopenharmony_ci#define MX3x_INT_WDOG		(NR_IRQS_LEGACY + 55)
1748c2ecf20Sopenharmony_ci#define MX3x_INT_GPIO3		(NR_IRQS_LEGACY + 56)
1758c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_POWER	(NR_IRQS_LEGACY + 58)
1768c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_TEMPER	(NR_IRQS_LEGACY + 59)
1778c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_SENSOR60	(NR_IRQS_LEGACY + 60)
1788c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_SENSOR61	(NR_IRQS_LEGACY + 61)
1798c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_WDOG	(NR_IRQS_LEGACY + 62)
1808c2ecf20Sopenharmony_ci#define MX3x_INT_EXT_TV		(NR_IRQS_LEGACY + 63)
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ci#define MX3x_PROD_SIGNATURE		0x1	/* For MX31 */
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci#endif /* ifndef __MACH_MX3x_H__ */
185