xref: /qemu/include/hw/arm/fsl-imx7.h (revision 45b8b34dfacb14503d6f8692fa450f81175328e6)
1757282adSAndrey Smirnov /*
2757282adSAndrey Smirnov  * Copyright (c) 2018, Impinj, Inc.
3757282adSAndrey Smirnov  *
4757282adSAndrey Smirnov  * i.MX7 SoC definitions
5757282adSAndrey Smirnov  *
6757282adSAndrey Smirnov  * Author: Andrey Smirnov <andrew.smirnov@gmail.com>
7757282adSAndrey Smirnov  *
8757282adSAndrey Smirnov  * This program is free software; you can redistribute it and/or modify
9757282adSAndrey Smirnov  * it under the terms of the GNU General Public License as published by
10757282adSAndrey Smirnov  * the Free Software Foundation; either version 2 of the License, or
11757282adSAndrey Smirnov  * (at your option) any later version.
12757282adSAndrey Smirnov  *
13757282adSAndrey Smirnov  * This program is distributed in the hope that it will be useful,
14757282adSAndrey Smirnov  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15757282adSAndrey Smirnov  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16757282adSAndrey Smirnov  * GNU General Public License for more details.
17757282adSAndrey Smirnov  */
18757282adSAndrey Smirnov 
19757282adSAndrey Smirnov #ifndef FSL_IMX7_H
20757282adSAndrey Smirnov #define FSL_IMX7_H
21757282adSAndrey Smirnov 
2212ec8bd5SPeter Maydell #include "hw/arm/boot.h"
23757282adSAndrey Smirnov #include "hw/cpu/a15mpcore.h"
24757282adSAndrey Smirnov #include "hw/intc/imx_gpcv2.h"
25757282adSAndrey Smirnov #include "hw/misc/imx7_ccm.h"
26757282adSAndrey Smirnov #include "hw/misc/imx7_snvs.h"
27757282adSAndrey Smirnov #include "hw/misc/imx7_gpr.h"
2837f95959SGuenter Roeck #include "hw/watchdog/wdt_imx2.h"
29757282adSAndrey Smirnov #include "hw/gpio/imx_gpio.h"
30757282adSAndrey Smirnov #include "hw/char/imx_serial.h"
31757282adSAndrey Smirnov #include "hw/timer/imx_gpt.h"
32757282adSAndrey Smirnov #include "hw/timer/imx_epit.h"
33757282adSAndrey Smirnov #include "hw/i2c/imx_i2c.h"
34757282adSAndrey Smirnov #include "hw/sd/sdhci.h"
35757282adSAndrey Smirnov #include "hw/ssi/imx_spi.h"
36757282adSAndrey Smirnov #include "hw/net/imx_fec.h"
37757282adSAndrey Smirnov #include "hw/pci-host/designware.h"
38757282adSAndrey Smirnov #include "hw/usb/chipidea.h"
39757282adSAndrey Smirnov #include "cpu.h"
40db1015e9SEduardo Habkost #include "qom/object.h"
41*45b8b34dSJean-Christophe Dubois #include "qemu/units.h"
42757282adSAndrey Smirnov 
43e178113fSMarkus Armbruster #define TYPE_FSL_IMX7 "fsl-imx7"
448063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(FslIMX7State, FSL_IMX7)
45757282adSAndrey Smirnov 
46757282adSAndrey Smirnov enum FslIMX7Configuration {
47757282adSAndrey Smirnov     FSL_IMX7_NUM_CPUS         = 2,
48757282adSAndrey Smirnov     FSL_IMX7_NUM_UARTS        = 7,
49757282adSAndrey Smirnov     FSL_IMX7_NUM_ETHS         = 2,
50757282adSAndrey Smirnov     FSL_IMX7_ETH_NUM_TX_RINGS = 3,
51757282adSAndrey Smirnov     FSL_IMX7_NUM_USDHCS       = 3,
52757282adSAndrey Smirnov     FSL_IMX7_NUM_WDTS         = 4,
53757282adSAndrey Smirnov     FSL_IMX7_NUM_GPTS         = 4,
54757282adSAndrey Smirnov     FSL_IMX7_NUM_IOMUXCS      = 2,
55757282adSAndrey Smirnov     FSL_IMX7_NUM_GPIOS        = 7,
56757282adSAndrey Smirnov     FSL_IMX7_NUM_I2CS         = 4,
57757282adSAndrey Smirnov     FSL_IMX7_NUM_ECSPIS       = 4,
58757282adSAndrey Smirnov     FSL_IMX7_NUM_USBS         = 3,
59757282adSAndrey Smirnov     FSL_IMX7_NUM_ADCS         = 2,
60*45b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_SAIS         = 3,
61*45b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_CANS         = 2,
62*45b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_PWMS         = 4,
63757282adSAndrey Smirnov };
64757282adSAndrey Smirnov 
65db1015e9SEduardo Habkost struct FslIMX7State {
66757282adSAndrey Smirnov     /*< private >*/
67757282adSAndrey Smirnov     DeviceState    parent_obj;
68757282adSAndrey Smirnov 
69757282adSAndrey Smirnov     /*< public >*/
70757282adSAndrey Smirnov     ARMCPU             cpu[FSL_IMX7_NUM_CPUS];
71757282adSAndrey Smirnov     A15MPPrivState     a7mpcore;
72757282adSAndrey Smirnov     IMXGPTState        gpt[FSL_IMX7_NUM_GPTS];
73757282adSAndrey Smirnov     IMXGPIOState       gpio[FSL_IMX7_NUM_GPIOS];
74757282adSAndrey Smirnov     IMX7CCMState       ccm;
75757282adSAndrey Smirnov     IMX7AnalogState    analog;
76757282adSAndrey Smirnov     IMX7SNVSState      snvs;
77757282adSAndrey Smirnov     IMXGPCv2State      gpcv2;
78757282adSAndrey Smirnov     IMXSPIState        spi[FSL_IMX7_NUM_ECSPIS];
79757282adSAndrey Smirnov     IMXI2CState        i2c[FSL_IMX7_NUM_I2CS];
80757282adSAndrey Smirnov     IMXSerialState     uart[FSL_IMX7_NUM_UARTS];
81757282adSAndrey Smirnov     IMXFECState        eth[FSL_IMX7_NUM_ETHS];
82757282adSAndrey Smirnov     SDHCIState         usdhc[FSL_IMX7_NUM_USDHCS];
83757282adSAndrey Smirnov     IMX2WdtState       wdt[FSL_IMX7_NUM_WDTS];
84757282adSAndrey Smirnov     IMX7GPRState       gpr;
85757282adSAndrey Smirnov     ChipideaState      usb[FSL_IMX7_NUM_USBS];
86757282adSAndrey Smirnov     DesignwarePCIEHost pcie;
871f7197deSJean-Christophe Dubois     uint32_t           phy_num[FSL_IMX7_NUM_ETHS];
883b92718bSGuenter Roeck     bool               phy_connected[FSL_IMX7_NUM_ETHS];
89db1015e9SEduardo Habkost };
90757282adSAndrey Smirnov 
91757282adSAndrey Smirnov enum FslIMX7MemoryMap {
92757282adSAndrey Smirnov     FSL_IMX7_MMDC_ADDR            = 0x80000000,
93*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MMDC_SIZE            = (2 * GiB),
94757282adSAndrey Smirnov 
95*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_MEM_ADDR       = 0x60000000,
96*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_MEM_SIZE       = (256 * MiB),
97757282adSAndrey Smirnov 
98*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE1_MEM_ADDR       = 0x40000000,
99*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE1_MEM_SIZE       = (256 * MiB),
100757282adSAndrey Smirnov 
101*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_RX_BUF_ADDR    = 0x34000000,
102*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_RX_BUF_SIZE    = (32 * MiB),
103757282adSAndrey Smirnov 
104*45b8b34dSJean-Christophe Dubois     /* PCIe Peripherals */
105*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_REG_ADDR        = 0x33800000,
106757282adSAndrey Smirnov 
107*45b8b34dSJean-Christophe Dubois     /* MMAP Peripherals */
108*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DMA_APBH_ADDR        = 0x33000000,
109*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DMA_APBH_SIZE        = 0x8000,
110757282adSAndrey Smirnov 
111*45b8b34dSJean-Christophe Dubois     /* GPV configuration */
112*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV6_ADDR            = 0x32600000,
113*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV5_ADDR            = 0x32500000,
114*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV4_ADDR            = 0x32400000,
115*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV3_ADDR            = 0x32300000,
116*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV2_ADDR            = 0x32200000,
117*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV1_ADDR            = 0x32100000,
118*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV0_ADDR            = 0x32000000,
119*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPVn_SIZE            = (1 * MiB),
120757282adSAndrey Smirnov 
121*45b8b34dSJean-Christophe Dubois     /* Arm Peripherals */
122*45b8b34dSJean-Christophe Dubois     FSL_IMX7_A7MPCORE_ADDR        = 0x31000000,
12372465e1eSGuenter Roeck 
124*45b8b34dSJean-Christophe Dubois     /* AIPS-3 Begin */
125757282adSAndrey Smirnov 
126*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ENET2_ADDR           = 0x30BF0000,
127*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ENET1_ADDR           = 0x30BE0000,
128757282adSAndrey Smirnov 
129*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SDMA_ADDR            = 0x30BD0000,
130*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SDMA_SIZE            = (4 * KiB),
131757282adSAndrey Smirnov 
132*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_ADDR             = 0x30BC0000,
133*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_SIZE             = (4 * KiB),
13472465e1eSGuenter Roeck 
135*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI_ADDR            = 0x30BB0000,
136*45b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI_SIZE            = 0x8000,
1376ee51e96SAndrey Smirnov 
138*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SIM2_ADDR            = 0x30BA0000,
139*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SIM1_ADDR            = 0x30B90000,
140*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SIMn_SIZE            = (4 * KiB),
141*45b8b34dSJean-Christophe Dubois 
142*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC3_ADDR          = 0x30B60000,
143*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC2_ADDR          = 0x30B50000,
144*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC1_ADDR          = 0x30B40000,
145*45b8b34dSJean-Christophe Dubois 
146*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USB3_ADDR            = 0x30B30000,
147*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC3_ADDR        = 0x30B30200,
148*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USB2_ADDR            = 0x30B20000,
149*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC2_ADDR        = 0x30B20200,
150*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USB1_ADDR            = 0x30B10000,
151*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC1_ADDR        = 0x30B10200,
152*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISCn_SIZE        = 0x200,
153*45b8b34dSJean-Christophe Dubois 
154*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USB_PL301_ADDR       = 0x30AD0000,
155*45b8b34dSJean-Christophe Dubois     FSL_IMX7_USB_PL301_SIZE       = (64 * KiB),
156*45b8b34dSJean-Christophe Dubois 
157*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE_HS_ADDR    = 0x30AC0000,
158*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE_HS_SIZE    = (64 * KiB),
159*45b8b34dSJean-Christophe Dubois 
160*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MUB_ADDR             = 0x30AB0000,
161*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MUA_ADDR             = 0x30AA0000,
162*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MUn_SIZE             = (KiB),
163*45b8b34dSJean-Christophe Dubois 
164*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART7_ADDR           = 0x30A90000,
165*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART6_ADDR           = 0x30A80000,
166*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART5_ADDR           = 0x30A70000,
167*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART4_ADDR           = 0x30A60000,
168*45b8b34dSJean-Christophe Dubois 
169*45b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C4_ADDR            = 0x30A50000,
170*45b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C3_ADDR            = 0x30A40000,
171*45b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C2_ADDR            = 0x30A30000,
172*45b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C1_ADDR            = 0x30A20000,
173*45b8b34dSJean-Christophe Dubois 
174*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CAN2_ADDR            = 0x30A10000,
175*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CAN1_ADDR            = 0x30A00000,
176*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CANn_SIZE            = (4 * KiB),
177*45b8b34dSJean-Christophe Dubois 
178*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS3_CONF_ADDR      = 0x309F0000,
179*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS3_CONF_SIZE      = (64 * KiB),
180757282adSAndrey Smirnov 
18172465e1eSGuenter Roeck     FSL_IMX7_CAAM_ADDR            = 0x30900000,
182*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_SIZE            = (256 * KiB),
18372465e1eSGuenter Roeck 
184*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SPBA_ADDR            = 0x308F0000,
185*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SPBA_SIZE            = (4 * KiB),
18672465e1eSGuenter Roeck 
187*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI3_ADDR            = 0x308C0000,
188*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI2_ADDR            = 0x308B0000,
189*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI1_ADDR            = 0x308A0000,
190*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SAIn_SIZE            = (4 * KiB),
191757282adSAndrey Smirnov 
192*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART3_ADDR           = 0x30880000,
193757282adSAndrey Smirnov     /*
194757282adSAndrey Smirnov      * Some versions of the reference manual claim that UART2 is @
195757282adSAndrey Smirnov      * 0x30870000, but experiments with HW + DT files in upstream
196757282adSAndrey Smirnov      * Linux kernel show that not to be true and that block is
197673d8215SMichael Tokarev      * actually located @ 0x30890000
198757282adSAndrey Smirnov      */
199757282adSAndrey Smirnov     FSL_IMX7_UART2_ADDR           = 0x30890000,
200*45b8b34dSJean-Christophe Dubois     FSL_IMX7_UART1_ADDR           = 0x30860000,
201757282adSAndrey Smirnov 
202*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI3_ADDR          = 0x30840000,
203*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI2_ADDR          = 0x30830000,
204*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI1_ADDR          = 0x30820000,
205*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPIn_SIZE          = (4 * KiB),
2066f287c70SGuenter Roeck 
207*45b8b34dSJean-Christophe Dubois     /* AIPS-3 End */
208757282adSAndrey Smirnov 
209*45b8b34dSJean-Christophe Dubois     /* AIPS-2 Begin */
210757282adSAndrey Smirnov 
211*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AXI_DEBUG_MON_ADDR   = 0x307E0000,
212*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AXI_DEBUG_MON_SIZE   = (64 * KiB),
213757282adSAndrey Smirnov 
214*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMON2_ADDR        = 0x307D0000,
215*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMON1_ADDR        = 0x307C0000,
216*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMONn_SIZE        = (64 * KiB),
217757282adSAndrey Smirnov 
218*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_ADDR            = 0x307A0000,
219*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_SIZE            = (4 * KiB),
220*45b8b34dSJean-Christophe Dubois 
221*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_PHY_ADDR        = 0x30790000,
222*45b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_PHY_SIZE        = (4 * KiB),
223*45b8b34dSJean-Christophe Dubois 
224*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TZASC_ADDR           = 0x30780000,
225*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TZASC_SIZE           = (64 * KiB),
226*45b8b34dSJean-Christophe Dubois 
227*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_DSI_ADDR        = 0x30760000,
228*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_DSI_SIZE        = (4 * KiB),
229*45b8b34dSJean-Christophe Dubois 
230*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_CSI_ADDR        = 0x30750000,
231*45b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_CSI_SIZE        = 0x4000,
232*45b8b34dSJean-Christophe Dubois 
233*45b8b34dSJean-Christophe Dubois     FSL_IMX7_LCDIF_ADDR           = 0x30730000,
234*45b8b34dSJean-Christophe Dubois     FSL_IMX7_LCDIF_SIZE           = 0x8000,
235*45b8b34dSJean-Christophe Dubois 
236*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CSI_ADDR             = 0x30710000,
237*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CSI_SIZE             = (4 * KiB),
238*45b8b34dSJean-Christophe Dubois 
239*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PXP_ADDR             = 0x30700000,
240*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PXP_SIZE             = 0x4000,
241*45b8b34dSJean-Christophe Dubois 
242*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EPDC_ADDR            = 0x306F0000,
243*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EPDC_SIZE            = (4 * KiB),
244*45b8b34dSJean-Christophe Dubois 
245*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_PHY_ADDR        = 0x306D0000,
246*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_PHY_SIZE        = (4 * KiB),
247*45b8b34dSJean-Christophe Dubois 
248*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_CTRL_ADDR     = 0x306C0000,
249*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_CMP_ADDR      = 0x306B0000,
250*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_RD_ADDR       = 0x306A0000,
251*45b8b34dSJean-Christophe Dubois 
252*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM4_ADDR            = 0x30690000,
253*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM3_ADDR            = 0x30680000,
254*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM2_ADDR            = 0x30670000,
255*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM1_ADDR            = 0x30660000,
256*45b8b34dSJean-Christophe Dubois     FSL_IMX7_PWMn_SIZE            = (4 * KiB),
257*45b8b34dSJean-Christophe Dubois 
258*45b8b34dSJean-Christophe Dubois     FSL_IMX7_FlEXTIMER2_ADDR      = 0x30650000,
259*45b8b34dSJean-Christophe Dubois     FSL_IMX7_FlEXTIMER1_ADDR      = 0x30640000,
260*45b8b34dSJean-Christophe Dubois     FSL_IMX7_FLEXTIMERn_SIZE      = (4 * KiB),
261*45b8b34dSJean-Christophe Dubois 
262*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI4_ADDR          = 0x30630000,
263*45b8b34dSJean-Christophe Dubois 
264*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ADC2_ADDR            = 0x30620000,
265*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ADC1_ADDR            = 0x30610000,
266*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ADCn_SIZE            = (4 * KiB),
267*45b8b34dSJean-Christophe Dubois 
268*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS2_CONF_ADDR      = 0x305F0000,
269*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS2_CONF_SIZE      = (64 * KiB),
270*45b8b34dSJean-Christophe Dubois 
271*45b8b34dSJean-Christophe Dubois     /* AIPS-2 End */
272*45b8b34dSJean-Christophe Dubois 
273*45b8b34dSJean-Christophe Dubois     /* AIPS-1 Begin */
274*45b8b34dSJean-Christophe Dubois 
275*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CSU_ADDR             = 0x303E0000,
276*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CSU_SIZE             = (64 * KiB),
277*45b8b34dSJean-Christophe Dubois 
278*45b8b34dSJean-Christophe Dubois     FSL_IMX7_RDC_ADDR             = 0x303D0000,
279*45b8b34dSJean-Christophe Dubois     FSL_IMX7_RDC_SIZE             = (4 * KiB),
280*45b8b34dSJean-Christophe Dubois 
281*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE2_ADDR      = 0x303C0000,
282*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE1_ADDR      = 0x303B0000,
283*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHOREn_SIZE      = (4 * KiB),
284*45b8b34dSJean-Christophe Dubois 
285*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPC_ADDR             = 0x303A0000,
286*45b8b34dSJean-Christophe Dubois 
287*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SRC_ADDR             = 0x30390000,
288*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SRC_SIZE             = (4 * KiB),
289*45b8b34dSJean-Christophe Dubois 
290*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CCM_ADDR             = 0x30380000,
291*45b8b34dSJean-Christophe Dubois 
292*45b8b34dSJean-Christophe Dubois     FSL_IMX7_SNVS_HP_ADDR         = 0x30370000,
293*45b8b34dSJean-Christophe Dubois 
294*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ANALOG_ADDR          = 0x30360000,
295*45b8b34dSJean-Christophe Dubois 
296*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCOTP_ADDR           = 0x30350000,
297*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCOTP_SIZE           = 0x10000,
298*45b8b34dSJean-Christophe Dubois 
299*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_GPR_ADDR      = 0x30340000,
300*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_GPR_SIZE      = (4 * KiB),
301*45b8b34dSJean-Christophe Dubois 
302*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_ADDR          = 0x30330000,
303*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_SIZE          = (4 * KiB),
304*45b8b34dSJean-Christophe Dubois 
305*45b8b34dSJean-Christophe Dubois     FSL_IMX7_KPP_ADDR             = 0x30320000,
306*45b8b34dSJean-Christophe Dubois     FSL_IMX7_KPP_SIZE             = (4 * KiB),
307*45b8b34dSJean-Christophe Dubois 
308*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ROMCP_ADDR           = 0x30310000,
309*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ROMCP_SIZE           = (4 * KiB),
310*45b8b34dSJean-Christophe Dubois 
311*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT4_ADDR            = 0x30300000,
312*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT3_ADDR            = 0x302F0000,
313*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT2_ADDR            = 0x302E0000,
314*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT1_ADDR            = 0x302D0000,
315*45b8b34dSJean-Christophe Dubois 
316*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_ADDR     = 0x302C0000,
317*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_SIZE     = (4 * KiB),
318*45b8b34dSJean-Christophe Dubois 
319*45b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG4_ADDR           = 0x302B0000,
320*45b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG3_ADDR           = 0x302A0000,
321*45b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG2_ADDR           = 0x30290000,
322*45b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG1_ADDR           = 0x30280000,
323*45b8b34dSJean-Christophe Dubois 
324*45b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_GPR_ADDR = 0x30270000,
325*45b8b34dSJean-Christophe Dubois 
326*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO7_ADDR           = 0x30260000,
327*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO6_ADDR           = 0x30250000,
328*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO5_ADDR           = 0x30240000,
329*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO4_ADDR           = 0x30230000,
330*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO3_ADDR           = 0x30220000,
331*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO2_ADDR           = 0x30210000,
332*45b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO1_ADDR           = 0x30200000,
333*45b8b34dSJean-Christophe Dubois 
334*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS1_CONF_ADDR      = 0x301F0000,
335*45b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS1_CONF_SIZE      = (64 * KiB),
336*45b8b34dSJean-Christophe Dubois 
337757282adSAndrey Smirnov     FSL_IMX7_A7MPCORE_DAP_ADDR    = 0x30000000,
338*45b8b34dSJean-Christophe Dubois     FSL_IMX7_A7MPCORE_DAP_SIZE    = (1 * MiB),
339757282adSAndrey Smirnov 
340*45b8b34dSJean-Christophe Dubois     /* AIPS-1 End */
341757282adSAndrey Smirnov 
342*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_CS0_ADDR         = 0x28000000,
343*45b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_CS0_SIZE         = (128 * MiB),
344f0d877dcSAndrey Smirnov 
345*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_PXP_ADDR       = 0x00940000,
346*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_PXP_SIZE       = (32 * KiB),
347*45b8b34dSJean-Christophe Dubois 
348*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_EPDC_ADDR      = 0x00920000,
349*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_EPDC_SIZE      = (128 * KiB),
350*45b8b34dSJean-Christophe Dubois 
351*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_MEM_ADDR       = 0x00900000,
352*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_MEM_SIZE       = (128 * KiB),
353*45b8b34dSJean-Christophe Dubois 
354*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TCMU_ADDR            = 0x00800000,
355*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TCMU_SIZE            = (32 * KiB),
356*45b8b34dSJean-Christophe Dubois 
357*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TCML_ADDR            = 0x007F8000,
358*45b8b34dSJean-Christophe Dubois     FSL_IMX7_TCML_SIZE            = (32 * KiB),
359*45b8b34dSJean-Christophe Dubois 
360*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_S_ADDR         = 0x00180000,
361*45b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_S_SIZE         = (32 * KiB),
362*45b8b34dSJean-Christophe Dubois 
363*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_MEM_ADDR        = 0x00100000,
364*45b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_MEM_SIZE        = (32 * KiB),
365*45b8b34dSJean-Christophe Dubois 
366*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ROM_ADDR             = 0x00000000,
367*45b8b34dSJean-Christophe Dubois     FSL_IMX7_ROM_SIZE             = (96 * KiB),
368757282adSAndrey Smirnov };
369757282adSAndrey Smirnov 
370757282adSAndrey Smirnov enum FslIMX7IRQs {
371757282adSAndrey Smirnov     FSL_IMX7_USDHC1_IRQ   = 22,
372757282adSAndrey Smirnov     FSL_IMX7_USDHC2_IRQ   = 23,
373757282adSAndrey Smirnov     FSL_IMX7_USDHC3_IRQ   = 24,
374757282adSAndrey Smirnov 
375757282adSAndrey Smirnov     FSL_IMX7_UART1_IRQ    = 26,
376757282adSAndrey Smirnov     FSL_IMX7_UART2_IRQ    = 27,
377757282adSAndrey Smirnov     FSL_IMX7_UART3_IRQ    = 28,
378757282adSAndrey Smirnov     FSL_IMX7_UART4_IRQ    = 29,
379757282adSAndrey Smirnov     FSL_IMX7_UART5_IRQ    = 30,
380757282adSAndrey Smirnov     FSL_IMX7_UART6_IRQ    = 16,
381757282adSAndrey Smirnov 
382757282adSAndrey Smirnov     FSL_IMX7_ECSPI1_IRQ   = 31,
383757282adSAndrey Smirnov     FSL_IMX7_ECSPI2_IRQ   = 32,
384757282adSAndrey Smirnov     FSL_IMX7_ECSPI3_IRQ   = 33,
385757282adSAndrey Smirnov     FSL_IMX7_ECSPI4_IRQ   = 34,
386757282adSAndrey Smirnov 
387757282adSAndrey Smirnov     FSL_IMX7_I2C1_IRQ     = 35,
388757282adSAndrey Smirnov     FSL_IMX7_I2C2_IRQ     = 36,
389757282adSAndrey Smirnov     FSL_IMX7_I2C3_IRQ     = 37,
390757282adSAndrey Smirnov     FSL_IMX7_I2C4_IRQ     = 38,
391757282adSAndrey Smirnov 
392757282adSAndrey Smirnov     FSL_IMX7_USB1_IRQ     = 43,
393757282adSAndrey Smirnov     FSL_IMX7_USB2_IRQ     = 42,
394757282adSAndrey Smirnov     FSL_IMX7_USB3_IRQ     = 40,
395757282adSAndrey Smirnov 
39660c98e72SJean-Christophe Dubois     FSL_IMX7_GPT1_IRQ     = 55,
39760c98e72SJean-Christophe Dubois     FSL_IMX7_GPT2_IRQ     = 54,
39860c98e72SJean-Christophe Dubois     FSL_IMX7_GPT3_IRQ     = 53,
39960c98e72SJean-Christophe Dubois     FSL_IMX7_GPT4_IRQ     = 52,
40060c98e72SJean-Christophe Dubois 
401c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO1_LOW_IRQ  = 64,
402c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO1_HIGH_IRQ = 65,
403c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO2_LOW_IRQ  = 66,
404c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO2_HIGH_IRQ = 67,
405c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO3_LOW_IRQ  = 68,
406c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO3_HIGH_IRQ = 69,
407c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO4_LOW_IRQ  = 70,
408c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO4_HIGH_IRQ = 71,
409c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO5_LOW_IRQ  = 72,
410c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO5_HIGH_IRQ = 73,
411c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO6_LOW_IRQ  = 74,
412c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO6_HIGH_IRQ = 75,
413c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO7_LOW_IRQ  = 76,
414c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO7_HIGH_IRQ = 77,
415c73c2798SJean-Christophe Dubois 
416c4947e64SGuenter Roeck     FSL_IMX7_WDOG1_IRQ    = 78,
417c4947e64SGuenter Roeck     FSL_IMX7_WDOG2_IRQ    = 79,
418c4947e64SGuenter Roeck     FSL_IMX7_WDOG3_IRQ    = 10,
419c4947e64SGuenter Roeck     FSL_IMX7_WDOG4_IRQ    = 109,
420c4947e64SGuenter Roeck 
42101b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTA_IRQ = 125,
42201b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTB_IRQ = 124,
42301b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTC_IRQ = 123,
42401b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTD_IRQ = 122,
425757282adSAndrey Smirnov 
426757282adSAndrey Smirnov     FSL_IMX7_UART7_IRQ    = 126,
427757282adSAndrey Smirnov 
428757282adSAndrey Smirnov #define FSL_IMX7_ENET_IRQ(i, n)  ((n) + ((i) ? 100 : 118))
429757282adSAndrey Smirnov 
430757282adSAndrey Smirnov     FSL_IMX7_MAX_IRQ      = 128,
431757282adSAndrey Smirnov };
432757282adSAndrey Smirnov 
433757282adSAndrey Smirnov #endif /* FSL_IMX7_H */
434