xref: /qemu/include/hw/arm/fsl-imx7.h (revision 12517bc978e62ce19df0160ad2ef229169a567b2)
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"
28*12517bc9SJean-Christophe Dubois #include "hw/misc/imx7_src.h"
2937f95959SGuenter Roeck #include "hw/watchdog/wdt_imx2.h"
30757282adSAndrey Smirnov #include "hw/gpio/imx_gpio.h"
31757282adSAndrey Smirnov #include "hw/char/imx_serial.h"
32757282adSAndrey Smirnov #include "hw/timer/imx_gpt.h"
33757282adSAndrey Smirnov #include "hw/timer/imx_epit.h"
34757282adSAndrey Smirnov #include "hw/i2c/imx_i2c.h"
35757282adSAndrey Smirnov #include "hw/sd/sdhci.h"
36757282adSAndrey Smirnov #include "hw/ssi/imx_spi.h"
37757282adSAndrey Smirnov #include "hw/net/imx_fec.h"
38757282adSAndrey Smirnov #include "hw/pci-host/designware.h"
39757282adSAndrey Smirnov #include "hw/usb/chipidea.h"
40757282adSAndrey Smirnov #include "cpu.h"
41db1015e9SEduardo Habkost #include "qom/object.h"
4245b8b34dSJean-Christophe Dubois #include "qemu/units.h"
43757282adSAndrey Smirnov 
44e178113fSMarkus Armbruster #define TYPE_FSL_IMX7 "fsl-imx7"
458063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(FslIMX7State, FSL_IMX7)
46757282adSAndrey Smirnov 
47757282adSAndrey Smirnov enum FslIMX7Configuration {
48757282adSAndrey Smirnov     FSL_IMX7_NUM_CPUS         = 2,
49757282adSAndrey Smirnov     FSL_IMX7_NUM_UARTS        = 7,
50757282adSAndrey Smirnov     FSL_IMX7_NUM_ETHS         = 2,
51757282adSAndrey Smirnov     FSL_IMX7_ETH_NUM_TX_RINGS = 3,
52757282adSAndrey Smirnov     FSL_IMX7_NUM_USDHCS       = 3,
53757282adSAndrey Smirnov     FSL_IMX7_NUM_WDTS         = 4,
54757282adSAndrey Smirnov     FSL_IMX7_NUM_GPTS         = 4,
55757282adSAndrey Smirnov     FSL_IMX7_NUM_IOMUXCS      = 2,
56757282adSAndrey Smirnov     FSL_IMX7_NUM_GPIOS        = 7,
57757282adSAndrey Smirnov     FSL_IMX7_NUM_I2CS         = 4,
58757282adSAndrey Smirnov     FSL_IMX7_NUM_ECSPIS       = 4,
59757282adSAndrey Smirnov     FSL_IMX7_NUM_USBS         = 3,
60757282adSAndrey Smirnov     FSL_IMX7_NUM_ADCS         = 2,
6145b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_SAIS         = 3,
6245b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_CANS         = 2,
6345b8b34dSJean-Christophe Dubois     FSL_IMX7_NUM_PWMS         = 4,
64757282adSAndrey Smirnov };
65757282adSAndrey Smirnov 
66db1015e9SEduardo Habkost struct FslIMX7State {
67757282adSAndrey Smirnov     /*< private >*/
68757282adSAndrey Smirnov     DeviceState    parent_obj;
69757282adSAndrey Smirnov 
70757282adSAndrey Smirnov     /*< public >*/
71757282adSAndrey Smirnov     ARMCPU             cpu[FSL_IMX7_NUM_CPUS];
72757282adSAndrey Smirnov     A15MPPrivState     a7mpcore;
73757282adSAndrey Smirnov     IMXGPTState        gpt[FSL_IMX7_NUM_GPTS];
74757282adSAndrey Smirnov     IMXGPIOState       gpio[FSL_IMX7_NUM_GPIOS];
75757282adSAndrey Smirnov     IMX7CCMState       ccm;
76757282adSAndrey Smirnov     IMX7AnalogState    analog;
77757282adSAndrey Smirnov     IMX7SNVSState      snvs;
78*12517bc9SJean-Christophe Dubois     IMX7SRCState       src;
79757282adSAndrey Smirnov     IMXGPCv2State      gpcv2;
80757282adSAndrey Smirnov     IMXSPIState        spi[FSL_IMX7_NUM_ECSPIS];
81757282adSAndrey Smirnov     IMXI2CState        i2c[FSL_IMX7_NUM_I2CS];
82757282adSAndrey Smirnov     IMXSerialState     uart[FSL_IMX7_NUM_UARTS];
83757282adSAndrey Smirnov     IMXFECState        eth[FSL_IMX7_NUM_ETHS];
84757282adSAndrey Smirnov     SDHCIState         usdhc[FSL_IMX7_NUM_USDHCS];
85757282adSAndrey Smirnov     IMX2WdtState       wdt[FSL_IMX7_NUM_WDTS];
86757282adSAndrey Smirnov     IMX7GPRState       gpr;
87757282adSAndrey Smirnov     ChipideaState      usb[FSL_IMX7_NUM_USBS];
88757282adSAndrey Smirnov     DesignwarePCIEHost pcie;
89736988a0SJean-Christophe Dubois     MemoryRegion       rom;
90736988a0SJean-Christophe Dubois     MemoryRegion       caam;
91736988a0SJean-Christophe Dubois     MemoryRegion       ocram;
92736988a0SJean-Christophe Dubois     MemoryRegion       ocram_epdc;
93736988a0SJean-Christophe Dubois     MemoryRegion       ocram_pxp;
94736988a0SJean-Christophe Dubois     MemoryRegion       ocram_s;
95736988a0SJean-Christophe Dubois 
961f7197deSJean-Christophe Dubois     uint32_t           phy_num[FSL_IMX7_NUM_ETHS];
973b92718bSGuenter Roeck     bool               phy_connected[FSL_IMX7_NUM_ETHS];
98db1015e9SEduardo Habkost };
99757282adSAndrey Smirnov 
100757282adSAndrey Smirnov enum FslIMX7MemoryMap {
101757282adSAndrey Smirnov     FSL_IMX7_MMDC_ADDR            = 0x80000000,
10245b8b34dSJean-Christophe Dubois     FSL_IMX7_MMDC_SIZE            = (2 * GiB),
103757282adSAndrey Smirnov 
10445b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_MEM_ADDR       = 0x60000000,
10545b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_MEM_SIZE       = (256 * MiB),
106757282adSAndrey Smirnov 
10745b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE1_MEM_ADDR       = 0x40000000,
10845b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE1_MEM_SIZE       = (256 * MiB),
109757282adSAndrey Smirnov 
11045b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_RX_BUF_ADDR    = 0x34000000,
11145b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI1_RX_BUF_SIZE    = (32 * MiB),
112757282adSAndrey Smirnov 
11345b8b34dSJean-Christophe Dubois     /* PCIe Peripherals */
11445b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_REG_ADDR        = 0x33800000,
115757282adSAndrey Smirnov 
11645b8b34dSJean-Christophe Dubois     /* MMAP Peripherals */
11745b8b34dSJean-Christophe Dubois     FSL_IMX7_DMA_APBH_ADDR        = 0x33000000,
11845b8b34dSJean-Christophe Dubois     FSL_IMX7_DMA_APBH_SIZE        = 0x8000,
119757282adSAndrey Smirnov 
12045b8b34dSJean-Christophe Dubois     /* GPV configuration */
12145b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV6_ADDR            = 0x32600000,
12245b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV5_ADDR            = 0x32500000,
12345b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV4_ADDR            = 0x32400000,
12445b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV3_ADDR            = 0x32300000,
12545b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV2_ADDR            = 0x32200000,
12645b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV1_ADDR            = 0x32100000,
12745b8b34dSJean-Christophe Dubois     FSL_IMX7_GPV0_ADDR            = 0x32000000,
12845b8b34dSJean-Christophe Dubois     FSL_IMX7_GPVn_SIZE            = (1 * MiB),
129757282adSAndrey Smirnov 
13045b8b34dSJean-Christophe Dubois     /* Arm Peripherals */
13145b8b34dSJean-Christophe Dubois     FSL_IMX7_A7MPCORE_ADDR        = 0x31000000,
13272465e1eSGuenter Roeck 
13345b8b34dSJean-Christophe Dubois     /* AIPS-3 Begin */
134757282adSAndrey Smirnov 
13545b8b34dSJean-Christophe Dubois     FSL_IMX7_ENET2_ADDR           = 0x30BF0000,
13645b8b34dSJean-Christophe Dubois     FSL_IMX7_ENET1_ADDR           = 0x30BE0000,
137757282adSAndrey Smirnov 
13845b8b34dSJean-Christophe Dubois     FSL_IMX7_SDMA_ADDR            = 0x30BD0000,
13945b8b34dSJean-Christophe Dubois     FSL_IMX7_SDMA_SIZE            = (4 * KiB),
140757282adSAndrey Smirnov 
14145b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_ADDR             = 0x30BC0000,
14245b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_SIZE             = (4 * KiB),
14372465e1eSGuenter Roeck 
14445b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI_ADDR            = 0x30BB0000,
14545b8b34dSJean-Christophe Dubois     FSL_IMX7_QSPI_SIZE            = 0x8000,
1466ee51e96SAndrey Smirnov 
14745b8b34dSJean-Christophe Dubois     FSL_IMX7_SIM2_ADDR            = 0x30BA0000,
14845b8b34dSJean-Christophe Dubois     FSL_IMX7_SIM1_ADDR            = 0x30B90000,
14945b8b34dSJean-Christophe Dubois     FSL_IMX7_SIMn_SIZE            = (4 * KiB),
15045b8b34dSJean-Christophe Dubois 
15145b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC3_ADDR          = 0x30B60000,
15245b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC2_ADDR          = 0x30B50000,
15345b8b34dSJean-Christophe Dubois     FSL_IMX7_USDHC1_ADDR          = 0x30B40000,
15445b8b34dSJean-Christophe Dubois 
15545b8b34dSJean-Christophe Dubois     FSL_IMX7_USB3_ADDR            = 0x30B30000,
15645b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC3_ADDR        = 0x30B30200,
15745b8b34dSJean-Christophe Dubois     FSL_IMX7_USB2_ADDR            = 0x30B20000,
15845b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC2_ADDR        = 0x30B20200,
15945b8b34dSJean-Christophe Dubois     FSL_IMX7_USB1_ADDR            = 0x30B10000,
16045b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISC1_ADDR        = 0x30B10200,
16145b8b34dSJean-Christophe Dubois     FSL_IMX7_USBMISCn_SIZE        = 0x200,
16245b8b34dSJean-Christophe Dubois 
16345b8b34dSJean-Christophe Dubois     FSL_IMX7_USB_PL301_ADDR       = 0x30AD0000,
16445b8b34dSJean-Christophe Dubois     FSL_IMX7_USB_PL301_SIZE       = (64 * KiB),
16545b8b34dSJean-Christophe Dubois 
16645b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE_HS_ADDR    = 0x30AC0000,
16745b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE_HS_SIZE    = (64 * KiB),
16845b8b34dSJean-Christophe Dubois 
16945b8b34dSJean-Christophe Dubois     FSL_IMX7_MUB_ADDR             = 0x30AB0000,
17045b8b34dSJean-Christophe Dubois     FSL_IMX7_MUA_ADDR             = 0x30AA0000,
17145b8b34dSJean-Christophe Dubois     FSL_IMX7_MUn_SIZE             = (KiB),
17245b8b34dSJean-Christophe Dubois 
17345b8b34dSJean-Christophe Dubois     FSL_IMX7_UART7_ADDR           = 0x30A90000,
17445b8b34dSJean-Christophe Dubois     FSL_IMX7_UART6_ADDR           = 0x30A80000,
17545b8b34dSJean-Christophe Dubois     FSL_IMX7_UART5_ADDR           = 0x30A70000,
17645b8b34dSJean-Christophe Dubois     FSL_IMX7_UART4_ADDR           = 0x30A60000,
17745b8b34dSJean-Christophe Dubois 
17845b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C4_ADDR            = 0x30A50000,
17945b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C3_ADDR            = 0x30A40000,
18045b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C2_ADDR            = 0x30A30000,
18145b8b34dSJean-Christophe Dubois     FSL_IMX7_I2C1_ADDR            = 0x30A20000,
18245b8b34dSJean-Christophe Dubois 
18345b8b34dSJean-Christophe Dubois     FSL_IMX7_CAN2_ADDR            = 0x30A10000,
18445b8b34dSJean-Christophe Dubois     FSL_IMX7_CAN1_ADDR            = 0x30A00000,
18545b8b34dSJean-Christophe Dubois     FSL_IMX7_CANn_SIZE            = (4 * KiB),
18645b8b34dSJean-Christophe Dubois 
18745b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS3_CONF_ADDR      = 0x309F0000,
18845b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS3_CONF_SIZE      = (64 * KiB),
189757282adSAndrey Smirnov 
19072465e1eSGuenter Roeck     FSL_IMX7_CAAM_ADDR            = 0x30900000,
19145b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_SIZE            = (256 * KiB),
19272465e1eSGuenter Roeck 
19345b8b34dSJean-Christophe Dubois     FSL_IMX7_SPBA_ADDR            = 0x308F0000,
19445b8b34dSJean-Christophe Dubois     FSL_IMX7_SPBA_SIZE            = (4 * KiB),
19572465e1eSGuenter Roeck 
19645b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI3_ADDR            = 0x308C0000,
19745b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI2_ADDR            = 0x308B0000,
19845b8b34dSJean-Christophe Dubois     FSL_IMX7_SAI1_ADDR            = 0x308A0000,
19945b8b34dSJean-Christophe Dubois     FSL_IMX7_SAIn_SIZE            = (4 * KiB),
200757282adSAndrey Smirnov 
20145b8b34dSJean-Christophe Dubois     FSL_IMX7_UART3_ADDR           = 0x30880000,
202757282adSAndrey Smirnov     /*
203757282adSAndrey Smirnov      * Some versions of the reference manual claim that UART2 is @
204757282adSAndrey Smirnov      * 0x30870000, but experiments with HW + DT files in upstream
205757282adSAndrey Smirnov      * Linux kernel show that not to be true and that block is
206673d8215SMichael Tokarev      * actually located @ 0x30890000
207757282adSAndrey Smirnov      */
208757282adSAndrey Smirnov     FSL_IMX7_UART2_ADDR           = 0x30890000,
20945b8b34dSJean-Christophe Dubois     FSL_IMX7_UART1_ADDR           = 0x30860000,
210757282adSAndrey Smirnov 
21145b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI3_ADDR          = 0x30840000,
21245b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI2_ADDR          = 0x30830000,
21345b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI1_ADDR          = 0x30820000,
21445b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPIn_SIZE          = (4 * KiB),
2156f287c70SGuenter Roeck 
21645b8b34dSJean-Christophe Dubois     /* AIPS-3 End */
217757282adSAndrey Smirnov 
21845b8b34dSJean-Christophe Dubois     /* AIPS-2 Begin */
219757282adSAndrey Smirnov 
22045b8b34dSJean-Christophe Dubois     FSL_IMX7_AXI_DEBUG_MON_ADDR   = 0x307E0000,
22145b8b34dSJean-Christophe Dubois     FSL_IMX7_AXI_DEBUG_MON_SIZE   = (64 * KiB),
222757282adSAndrey Smirnov 
22345b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMON2_ADDR        = 0x307D0000,
22445b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMON1_ADDR        = 0x307C0000,
22545b8b34dSJean-Christophe Dubois     FSL_IMX7_PERFMONn_SIZE        = (64 * KiB),
226757282adSAndrey Smirnov 
22745b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_ADDR            = 0x307A0000,
22845b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_SIZE            = (4 * KiB),
22945b8b34dSJean-Christophe Dubois 
23045b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_PHY_ADDR        = 0x30790000,
23145b8b34dSJean-Christophe Dubois     FSL_IMX7_DDRC_PHY_SIZE        = (4 * KiB),
23245b8b34dSJean-Christophe Dubois 
23345b8b34dSJean-Christophe Dubois     FSL_IMX7_TZASC_ADDR           = 0x30780000,
23445b8b34dSJean-Christophe Dubois     FSL_IMX7_TZASC_SIZE           = (64 * KiB),
23545b8b34dSJean-Christophe Dubois 
23645b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_DSI_ADDR        = 0x30760000,
23745b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_DSI_SIZE        = (4 * KiB),
23845b8b34dSJean-Christophe Dubois 
23945b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_CSI_ADDR        = 0x30750000,
24045b8b34dSJean-Christophe Dubois     FSL_IMX7_MIPI_CSI_SIZE        = 0x4000,
24145b8b34dSJean-Christophe Dubois 
24245b8b34dSJean-Christophe Dubois     FSL_IMX7_LCDIF_ADDR           = 0x30730000,
24345b8b34dSJean-Christophe Dubois     FSL_IMX7_LCDIF_SIZE           = 0x8000,
24445b8b34dSJean-Christophe Dubois 
24545b8b34dSJean-Christophe Dubois     FSL_IMX7_CSI_ADDR             = 0x30710000,
24645b8b34dSJean-Christophe Dubois     FSL_IMX7_CSI_SIZE             = (4 * KiB),
24745b8b34dSJean-Christophe Dubois 
24845b8b34dSJean-Christophe Dubois     FSL_IMX7_PXP_ADDR             = 0x30700000,
24945b8b34dSJean-Christophe Dubois     FSL_IMX7_PXP_SIZE             = 0x4000,
25045b8b34dSJean-Christophe Dubois 
25145b8b34dSJean-Christophe Dubois     FSL_IMX7_EPDC_ADDR            = 0x306F0000,
25245b8b34dSJean-Christophe Dubois     FSL_IMX7_EPDC_SIZE            = (4 * KiB),
25345b8b34dSJean-Christophe Dubois 
25445b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_PHY_ADDR        = 0x306D0000,
25545b8b34dSJean-Christophe Dubois     FSL_IMX7_PCIE_PHY_SIZE        = (4 * KiB),
25645b8b34dSJean-Christophe Dubois 
25745b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_CTRL_ADDR     = 0x306C0000,
25845b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_CMP_ADDR      = 0x306B0000,
25945b8b34dSJean-Christophe Dubois     FSL_IMX7_SYSCNT_RD_ADDR       = 0x306A0000,
26045b8b34dSJean-Christophe Dubois 
26145b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM4_ADDR            = 0x30690000,
26245b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM3_ADDR            = 0x30680000,
26345b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM2_ADDR            = 0x30670000,
26445b8b34dSJean-Christophe Dubois     FSL_IMX7_PWM1_ADDR            = 0x30660000,
26545b8b34dSJean-Christophe Dubois     FSL_IMX7_PWMn_SIZE            = (4 * KiB),
26645b8b34dSJean-Christophe Dubois 
26745b8b34dSJean-Christophe Dubois     FSL_IMX7_FlEXTIMER2_ADDR      = 0x30650000,
26845b8b34dSJean-Christophe Dubois     FSL_IMX7_FlEXTIMER1_ADDR      = 0x30640000,
26945b8b34dSJean-Christophe Dubois     FSL_IMX7_FLEXTIMERn_SIZE      = (4 * KiB),
27045b8b34dSJean-Christophe Dubois 
27145b8b34dSJean-Christophe Dubois     FSL_IMX7_ECSPI4_ADDR          = 0x30630000,
27245b8b34dSJean-Christophe Dubois 
27345b8b34dSJean-Christophe Dubois     FSL_IMX7_ADC2_ADDR            = 0x30620000,
27445b8b34dSJean-Christophe Dubois     FSL_IMX7_ADC1_ADDR            = 0x30610000,
27545b8b34dSJean-Christophe Dubois     FSL_IMX7_ADCn_SIZE            = (4 * KiB),
27645b8b34dSJean-Christophe Dubois 
27745b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS2_CONF_ADDR      = 0x305F0000,
27845b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS2_CONF_SIZE      = (64 * KiB),
27945b8b34dSJean-Christophe Dubois 
28045b8b34dSJean-Christophe Dubois     /* AIPS-2 End */
28145b8b34dSJean-Christophe Dubois 
28245b8b34dSJean-Christophe Dubois     /* AIPS-1 Begin */
28345b8b34dSJean-Christophe Dubois 
28445b8b34dSJean-Christophe Dubois     FSL_IMX7_CSU_ADDR             = 0x303E0000,
28545b8b34dSJean-Christophe Dubois     FSL_IMX7_CSU_SIZE             = (64 * KiB),
28645b8b34dSJean-Christophe Dubois 
28745b8b34dSJean-Christophe Dubois     FSL_IMX7_RDC_ADDR             = 0x303D0000,
28845b8b34dSJean-Christophe Dubois     FSL_IMX7_RDC_SIZE             = (4 * KiB),
28945b8b34dSJean-Christophe Dubois 
29045b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE2_ADDR      = 0x303C0000,
29145b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHORE1_ADDR      = 0x303B0000,
29245b8b34dSJean-Christophe Dubois     FSL_IMX7_SEMAPHOREn_SIZE      = (4 * KiB),
29345b8b34dSJean-Christophe Dubois 
29445b8b34dSJean-Christophe Dubois     FSL_IMX7_GPC_ADDR             = 0x303A0000,
29545b8b34dSJean-Christophe Dubois 
29645b8b34dSJean-Christophe Dubois     FSL_IMX7_SRC_ADDR             = 0x30390000,
29745b8b34dSJean-Christophe Dubois 
29845b8b34dSJean-Christophe Dubois     FSL_IMX7_CCM_ADDR             = 0x30380000,
29945b8b34dSJean-Christophe Dubois 
30045b8b34dSJean-Christophe Dubois     FSL_IMX7_SNVS_HP_ADDR         = 0x30370000,
30145b8b34dSJean-Christophe Dubois 
30245b8b34dSJean-Christophe Dubois     FSL_IMX7_ANALOG_ADDR          = 0x30360000,
30345b8b34dSJean-Christophe Dubois 
30445b8b34dSJean-Christophe Dubois     FSL_IMX7_OCOTP_ADDR           = 0x30350000,
30545b8b34dSJean-Christophe Dubois     FSL_IMX7_OCOTP_SIZE           = 0x10000,
30645b8b34dSJean-Christophe Dubois 
30745b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_GPR_ADDR      = 0x30340000,
30845b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_GPR_SIZE      = (4 * KiB),
30945b8b34dSJean-Christophe Dubois 
31045b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_ADDR          = 0x30330000,
31145b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_SIZE          = (4 * KiB),
31245b8b34dSJean-Christophe Dubois 
31345b8b34dSJean-Christophe Dubois     FSL_IMX7_KPP_ADDR             = 0x30320000,
31445b8b34dSJean-Christophe Dubois     FSL_IMX7_KPP_SIZE             = (4 * KiB),
31545b8b34dSJean-Christophe Dubois 
31645b8b34dSJean-Christophe Dubois     FSL_IMX7_ROMCP_ADDR           = 0x30310000,
31745b8b34dSJean-Christophe Dubois     FSL_IMX7_ROMCP_SIZE           = (4 * KiB),
31845b8b34dSJean-Christophe Dubois 
31945b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT4_ADDR            = 0x30300000,
32045b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT3_ADDR            = 0x302F0000,
32145b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT2_ADDR            = 0x302E0000,
32245b8b34dSJean-Christophe Dubois     FSL_IMX7_GPT1_ADDR            = 0x302D0000,
32345b8b34dSJean-Christophe Dubois 
32445b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_ADDR     = 0x302C0000,
32545b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_SIZE     = (4 * KiB),
32645b8b34dSJean-Christophe Dubois 
32745b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG4_ADDR           = 0x302B0000,
32845b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG3_ADDR           = 0x302A0000,
32945b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG2_ADDR           = 0x30290000,
33045b8b34dSJean-Christophe Dubois     FSL_IMX7_WDOG1_ADDR           = 0x30280000,
33145b8b34dSJean-Christophe Dubois 
33245b8b34dSJean-Christophe Dubois     FSL_IMX7_IOMUXC_LPSR_GPR_ADDR = 0x30270000,
33345b8b34dSJean-Christophe Dubois 
33445b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO7_ADDR           = 0x30260000,
33545b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO6_ADDR           = 0x30250000,
33645b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO5_ADDR           = 0x30240000,
33745b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO4_ADDR           = 0x30230000,
33845b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO3_ADDR           = 0x30220000,
33945b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO2_ADDR           = 0x30210000,
34045b8b34dSJean-Christophe Dubois     FSL_IMX7_GPIO1_ADDR           = 0x30200000,
34145b8b34dSJean-Christophe Dubois 
34245b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS1_CONF_ADDR      = 0x301F0000,
34345b8b34dSJean-Christophe Dubois     FSL_IMX7_AIPS1_CONF_SIZE      = (64 * KiB),
34445b8b34dSJean-Christophe Dubois 
345757282adSAndrey Smirnov     FSL_IMX7_A7MPCORE_DAP_ADDR    = 0x30000000,
34645b8b34dSJean-Christophe Dubois     FSL_IMX7_A7MPCORE_DAP_SIZE    = (1 * MiB),
347757282adSAndrey Smirnov 
34845b8b34dSJean-Christophe Dubois     /* AIPS-1 End */
349757282adSAndrey Smirnov 
35045b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_CS0_ADDR         = 0x28000000,
35145b8b34dSJean-Christophe Dubois     FSL_IMX7_EIM_CS0_SIZE         = (128 * MiB),
352f0d877dcSAndrey Smirnov 
35345b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_PXP_ADDR       = 0x00940000,
35445b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_PXP_SIZE       = (32 * KiB),
35545b8b34dSJean-Christophe Dubois 
35645b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_EPDC_ADDR      = 0x00920000,
35745b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_EPDC_SIZE      = (128 * KiB),
35845b8b34dSJean-Christophe Dubois 
35945b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_MEM_ADDR       = 0x00900000,
36045b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_MEM_SIZE       = (128 * KiB),
36145b8b34dSJean-Christophe Dubois 
36245b8b34dSJean-Christophe Dubois     FSL_IMX7_TCMU_ADDR            = 0x00800000,
36345b8b34dSJean-Christophe Dubois     FSL_IMX7_TCMU_SIZE            = (32 * KiB),
36445b8b34dSJean-Christophe Dubois 
36545b8b34dSJean-Christophe Dubois     FSL_IMX7_TCML_ADDR            = 0x007F8000,
36645b8b34dSJean-Christophe Dubois     FSL_IMX7_TCML_SIZE            = (32 * KiB),
36745b8b34dSJean-Christophe Dubois 
36845b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_S_ADDR         = 0x00180000,
36945b8b34dSJean-Christophe Dubois     FSL_IMX7_OCRAM_S_SIZE         = (32 * KiB),
37045b8b34dSJean-Christophe Dubois 
37145b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_MEM_ADDR        = 0x00100000,
37245b8b34dSJean-Christophe Dubois     FSL_IMX7_CAAM_MEM_SIZE        = (32 * KiB),
37345b8b34dSJean-Christophe Dubois 
37445b8b34dSJean-Christophe Dubois     FSL_IMX7_ROM_ADDR             = 0x00000000,
37545b8b34dSJean-Christophe Dubois     FSL_IMX7_ROM_SIZE             = (96 * KiB),
376757282adSAndrey Smirnov };
377757282adSAndrey Smirnov 
378757282adSAndrey Smirnov enum FslIMX7IRQs {
379757282adSAndrey Smirnov     FSL_IMX7_USDHC1_IRQ   = 22,
380757282adSAndrey Smirnov     FSL_IMX7_USDHC2_IRQ   = 23,
381757282adSAndrey Smirnov     FSL_IMX7_USDHC3_IRQ   = 24,
382757282adSAndrey Smirnov 
383757282adSAndrey Smirnov     FSL_IMX7_UART1_IRQ    = 26,
384757282adSAndrey Smirnov     FSL_IMX7_UART2_IRQ    = 27,
385757282adSAndrey Smirnov     FSL_IMX7_UART3_IRQ    = 28,
386757282adSAndrey Smirnov     FSL_IMX7_UART4_IRQ    = 29,
387757282adSAndrey Smirnov     FSL_IMX7_UART5_IRQ    = 30,
388757282adSAndrey Smirnov     FSL_IMX7_UART6_IRQ    = 16,
389757282adSAndrey Smirnov 
390757282adSAndrey Smirnov     FSL_IMX7_ECSPI1_IRQ   = 31,
391757282adSAndrey Smirnov     FSL_IMX7_ECSPI2_IRQ   = 32,
392757282adSAndrey Smirnov     FSL_IMX7_ECSPI3_IRQ   = 33,
393757282adSAndrey Smirnov     FSL_IMX7_ECSPI4_IRQ   = 34,
394757282adSAndrey Smirnov 
395757282adSAndrey Smirnov     FSL_IMX7_I2C1_IRQ     = 35,
396757282adSAndrey Smirnov     FSL_IMX7_I2C2_IRQ     = 36,
397757282adSAndrey Smirnov     FSL_IMX7_I2C3_IRQ     = 37,
398757282adSAndrey Smirnov     FSL_IMX7_I2C4_IRQ     = 38,
399757282adSAndrey Smirnov 
400757282adSAndrey Smirnov     FSL_IMX7_USB1_IRQ     = 43,
401757282adSAndrey Smirnov     FSL_IMX7_USB2_IRQ     = 42,
402757282adSAndrey Smirnov     FSL_IMX7_USB3_IRQ     = 40,
403757282adSAndrey Smirnov 
40460c98e72SJean-Christophe Dubois     FSL_IMX7_GPT1_IRQ     = 55,
40560c98e72SJean-Christophe Dubois     FSL_IMX7_GPT2_IRQ     = 54,
40660c98e72SJean-Christophe Dubois     FSL_IMX7_GPT3_IRQ     = 53,
40760c98e72SJean-Christophe Dubois     FSL_IMX7_GPT4_IRQ     = 52,
40860c98e72SJean-Christophe Dubois 
409c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO1_LOW_IRQ  = 64,
410c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO1_HIGH_IRQ = 65,
411c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO2_LOW_IRQ  = 66,
412c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO2_HIGH_IRQ = 67,
413c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO3_LOW_IRQ  = 68,
414c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO3_HIGH_IRQ = 69,
415c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO4_LOW_IRQ  = 70,
416c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO4_HIGH_IRQ = 71,
417c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO5_LOW_IRQ  = 72,
418c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO5_HIGH_IRQ = 73,
419c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO6_LOW_IRQ  = 74,
420c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO6_HIGH_IRQ = 75,
421c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO7_LOW_IRQ  = 76,
422c73c2798SJean-Christophe Dubois     FSL_IMX7_GPIO7_HIGH_IRQ = 77,
423c73c2798SJean-Christophe Dubois 
424c4947e64SGuenter Roeck     FSL_IMX7_WDOG1_IRQ    = 78,
425c4947e64SGuenter Roeck     FSL_IMX7_WDOG2_IRQ    = 79,
426c4947e64SGuenter Roeck     FSL_IMX7_WDOG3_IRQ    = 10,
427c4947e64SGuenter Roeck     FSL_IMX7_WDOG4_IRQ    = 109,
428c4947e64SGuenter Roeck 
42901b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTA_IRQ = 125,
43001b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTB_IRQ = 124,
43101b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTC_IRQ = 123,
43201b96ec8SAndrey Smirnov     FSL_IMX7_PCI_INTD_IRQ = 122,
433757282adSAndrey Smirnov 
434757282adSAndrey Smirnov     FSL_IMX7_UART7_IRQ    = 126,
435757282adSAndrey Smirnov 
436757282adSAndrey Smirnov #define FSL_IMX7_ENET_IRQ(i, n)  ((n) + ((i) ? 100 : 118))
437757282adSAndrey Smirnov 
438757282adSAndrey Smirnov     FSL_IMX7_MAX_IRQ      = 128,
439757282adSAndrey Smirnov };
440757282adSAndrey Smirnov 
441757282adSAndrey Smirnov #endif /* FSL_IMX7_H */
442