1a4eefc69SBernhard Beschow /* 2a4eefc69SBernhard Beschow * i.MX 8M Plus SoC Definitions 3a4eefc69SBernhard Beschow * 4a4eefc69SBernhard Beschow * Copyright (c) 2024, Bernhard Beschow <shentey@gmail.com> 5a4eefc69SBernhard Beschow * 6a4eefc69SBernhard Beschow * SPDX-License-Identifier: GPL-2.0-or-later 7a4eefc69SBernhard Beschow */ 8a4eefc69SBernhard Beschow 9a4eefc69SBernhard Beschow #ifndef FSL_IMX8MP_H 10a4eefc69SBernhard Beschow #define FSL_IMX8MP_H 11a4eefc69SBernhard Beschow 12a4eefc69SBernhard Beschow #include "cpu.h" 13a4eefc69SBernhard Beschow #include "hw/char/imx_serial.h" 14a4eefc69SBernhard Beschow #include "hw/intc/arm_gicv3_common.h" 15*86c2dff9SBernhard Beschow #include "hw/misc/imx8mp_analog.h" 16*86c2dff9SBernhard Beschow #include "hw/misc/imx8mp_ccm.h" 17a4eefc69SBernhard Beschow #include "qom/object.h" 18a4eefc69SBernhard Beschow #include "qemu/units.h" 19a4eefc69SBernhard Beschow 20a4eefc69SBernhard Beschow #define TYPE_FSL_IMX8MP "fsl-imx8mp" 21a4eefc69SBernhard Beschow OBJECT_DECLARE_SIMPLE_TYPE(FslImx8mpState, FSL_IMX8MP) 22a4eefc69SBernhard Beschow 23a4eefc69SBernhard Beschow #define FSL_IMX8MP_RAM_START 0x40000000 24a4eefc69SBernhard Beschow #define FSL_IMX8MP_RAM_SIZE_MAX (8 * GiB) 25a4eefc69SBernhard Beschow 26a4eefc69SBernhard Beschow enum FslImx8mpConfiguration { 27a4eefc69SBernhard Beschow FSL_IMX8MP_NUM_CPUS = 4, 28a4eefc69SBernhard Beschow FSL_IMX8MP_NUM_IRQS = 160, 29a4eefc69SBernhard Beschow FSL_IMX8MP_NUM_UARTS = 4, 30a4eefc69SBernhard Beschow }; 31a4eefc69SBernhard Beschow 32a4eefc69SBernhard Beschow struct FslImx8mpState { 33a4eefc69SBernhard Beschow DeviceState parent_obj; 34a4eefc69SBernhard Beschow 35a4eefc69SBernhard Beschow ARMCPU cpu[FSL_IMX8MP_NUM_CPUS]; 36a4eefc69SBernhard Beschow GICv3State gic; 37*86c2dff9SBernhard Beschow IMX8MPCCMState ccm; 38*86c2dff9SBernhard Beschow IMX8MPAnalogState analog; 39a4eefc69SBernhard Beschow IMXSerialState uart[FSL_IMX8MP_NUM_UARTS]; 40a4eefc69SBernhard Beschow }; 41a4eefc69SBernhard Beschow 42a4eefc69SBernhard Beschow enum FslImx8mpMemoryRegions { 43a4eefc69SBernhard Beschow FSL_IMX8MP_A53_DAP, 44a4eefc69SBernhard Beschow FSL_IMX8MP_AIPS1_CONFIGURATION, 45a4eefc69SBernhard Beschow FSL_IMX8MP_AIPS2_CONFIGURATION, 46a4eefc69SBernhard Beschow FSL_IMX8MP_AIPS3_CONFIGURATION, 47a4eefc69SBernhard Beschow FSL_IMX8MP_AIPS4_CONFIGURATION, 48a4eefc69SBernhard Beschow FSL_IMX8MP_AIPS5_CONFIGURATION, 49a4eefc69SBernhard Beschow FSL_IMX8MP_ANA_OSC, 50a4eefc69SBernhard Beschow FSL_IMX8MP_ANA_PLL, 51a4eefc69SBernhard Beschow FSL_IMX8MP_ANA_TSENSOR, 52a4eefc69SBernhard Beschow FSL_IMX8MP_APBH_DMA, 53a4eefc69SBernhard Beschow FSL_IMX8MP_ASRC, 54a4eefc69SBernhard Beschow FSL_IMX8MP_AUDIO_BLK_CTRL, 55a4eefc69SBernhard Beschow FSL_IMX8MP_AUDIO_DSP, 56a4eefc69SBernhard Beschow FSL_IMX8MP_AUDIO_XCVR_RX, 57a4eefc69SBernhard Beschow FSL_IMX8MP_AUD_IRQ_STEER, 58a4eefc69SBernhard Beschow FSL_IMX8MP_BOOT_ROM, 59a4eefc69SBernhard Beschow FSL_IMX8MP_BOOT_ROM_PROTECTED, 60a4eefc69SBernhard Beschow FSL_IMX8MP_CAAM, 61a4eefc69SBernhard Beschow FSL_IMX8MP_CAAM_MEM, 62a4eefc69SBernhard Beschow FSL_IMX8MP_CCM, 63a4eefc69SBernhard Beschow FSL_IMX8MP_CSU, 64a4eefc69SBernhard Beschow FSL_IMX8MP_DDR_BLK_CTRL, 65a4eefc69SBernhard Beschow FSL_IMX8MP_DDR_CTL, 66a4eefc69SBernhard Beschow FSL_IMX8MP_DDR_PERF_MON, 67a4eefc69SBernhard Beschow FSL_IMX8MP_DDR_PHY, 68a4eefc69SBernhard Beschow FSL_IMX8MP_DDR_PHY_BROADCAST, 69a4eefc69SBernhard Beschow FSL_IMX8MP_ECSPI1, 70a4eefc69SBernhard Beschow FSL_IMX8MP_ECSPI2, 71a4eefc69SBernhard Beschow FSL_IMX8MP_ECSPI3, 72a4eefc69SBernhard Beschow FSL_IMX8MP_EDMA_CHANNELS, 73a4eefc69SBernhard Beschow FSL_IMX8MP_EDMA_MANAGEMENT_PAGE, 74a4eefc69SBernhard Beschow FSL_IMX8MP_ENET1, 75a4eefc69SBernhard Beschow FSL_IMX8MP_ENET2_TSN, 76a4eefc69SBernhard Beschow FSL_IMX8MP_FLEXCAN1, 77a4eefc69SBernhard Beschow FSL_IMX8MP_FLEXCAN2, 78a4eefc69SBernhard Beschow FSL_IMX8MP_GIC_DIST, 79a4eefc69SBernhard Beschow FSL_IMX8MP_GIC_REDIST, 80a4eefc69SBernhard Beschow FSL_IMX8MP_GPC, 81a4eefc69SBernhard Beschow FSL_IMX8MP_GPIO1, 82a4eefc69SBernhard Beschow FSL_IMX8MP_GPIO2, 83a4eefc69SBernhard Beschow FSL_IMX8MP_GPIO3, 84a4eefc69SBernhard Beschow FSL_IMX8MP_GPIO4, 85a4eefc69SBernhard Beschow FSL_IMX8MP_GPIO5, 86a4eefc69SBernhard Beschow FSL_IMX8MP_GPT1, 87a4eefc69SBernhard Beschow FSL_IMX8MP_GPT2, 88a4eefc69SBernhard Beschow FSL_IMX8MP_GPT3, 89a4eefc69SBernhard Beschow FSL_IMX8MP_GPT4, 90a4eefc69SBernhard Beschow FSL_IMX8MP_GPT5, 91a4eefc69SBernhard Beschow FSL_IMX8MP_GPT6, 92a4eefc69SBernhard Beschow FSL_IMX8MP_GPU2D, 93a4eefc69SBernhard Beschow FSL_IMX8MP_GPU3D, 94a4eefc69SBernhard Beschow FSL_IMX8MP_HDMI_TX, 95a4eefc69SBernhard Beschow FSL_IMX8MP_HDMI_TX_AUDLNK_MSTR, 96a4eefc69SBernhard Beschow FSL_IMX8MP_HSIO_BLK_CTL, 97a4eefc69SBernhard Beschow FSL_IMX8MP_I2C1, 98a4eefc69SBernhard Beschow FSL_IMX8MP_I2C2, 99a4eefc69SBernhard Beschow FSL_IMX8MP_I2C3, 100a4eefc69SBernhard Beschow FSL_IMX8MP_I2C4, 101a4eefc69SBernhard Beschow FSL_IMX8MP_I2C5, 102a4eefc69SBernhard Beschow FSL_IMX8MP_I2C6, 103a4eefc69SBernhard Beschow FSL_IMX8MP_INTERCONNECT, 104a4eefc69SBernhard Beschow FSL_IMX8MP_IOMUXC, 105a4eefc69SBernhard Beschow FSL_IMX8MP_IOMUXC_GPR, 106a4eefc69SBernhard Beschow FSL_IMX8MP_IPS_DEWARP, 107a4eefc69SBernhard Beschow FSL_IMX8MP_ISI, 108a4eefc69SBernhard Beschow FSL_IMX8MP_ISP1, 109a4eefc69SBernhard Beschow FSL_IMX8MP_ISP2, 110a4eefc69SBernhard Beschow FSL_IMX8MP_LCDIF1, 111a4eefc69SBernhard Beschow FSL_IMX8MP_LCDIF2, 112a4eefc69SBernhard Beschow FSL_IMX8MP_MEDIA_BLK_CTL, 113a4eefc69SBernhard Beschow FSL_IMX8MP_MIPI_CSI1, 114a4eefc69SBernhard Beschow FSL_IMX8MP_MIPI_CSI2, 115a4eefc69SBernhard Beschow FSL_IMX8MP_MIPI_DSI1, 116a4eefc69SBernhard Beschow FSL_IMX8MP_MU_1_A, 117a4eefc69SBernhard Beschow FSL_IMX8MP_MU_1_B, 118a4eefc69SBernhard Beschow FSL_IMX8MP_MU_2_A, 119a4eefc69SBernhard Beschow FSL_IMX8MP_MU_2_B, 120a4eefc69SBernhard Beschow FSL_IMX8MP_MU_3_A, 121a4eefc69SBernhard Beschow FSL_IMX8MP_MU_3_B, 122a4eefc69SBernhard Beschow FSL_IMX8MP_NPU, 123a4eefc69SBernhard Beschow FSL_IMX8MP_OCOTP_CTRL, 124a4eefc69SBernhard Beschow FSL_IMX8MP_OCRAM, 125a4eefc69SBernhard Beschow FSL_IMX8MP_OCRAM_S, 126a4eefc69SBernhard Beschow FSL_IMX8MP_PCIE1, 127a4eefc69SBernhard Beschow FSL_IMX8MP_PCIE1_MEM, 128a4eefc69SBernhard Beschow FSL_IMX8MP_PCIE_PHY1, 129a4eefc69SBernhard Beschow FSL_IMX8MP_PDM, 130a4eefc69SBernhard Beschow FSL_IMX8MP_PERFMON1, 131a4eefc69SBernhard Beschow FSL_IMX8MP_PERFMON2, 132a4eefc69SBernhard Beschow FSL_IMX8MP_PWM1, 133a4eefc69SBernhard Beschow FSL_IMX8MP_PWM2, 134a4eefc69SBernhard Beschow FSL_IMX8MP_PWM3, 135a4eefc69SBernhard Beschow FSL_IMX8MP_PWM4, 136a4eefc69SBernhard Beschow FSL_IMX8MP_QOSC, 137a4eefc69SBernhard Beschow FSL_IMX8MP_QSPI, 138a4eefc69SBernhard Beschow FSL_IMX8MP_QSPI1_RX_BUFFER, 139a4eefc69SBernhard Beschow FSL_IMX8MP_QSPI1_TX_BUFFER, 140a4eefc69SBernhard Beschow FSL_IMX8MP_QSPI_MEM, 141a4eefc69SBernhard Beschow FSL_IMX8MP_RAM, 142a4eefc69SBernhard Beschow FSL_IMX8MP_RDC, 143a4eefc69SBernhard Beschow FSL_IMX8MP_SAI1, 144a4eefc69SBernhard Beschow FSL_IMX8MP_SAI2, 145a4eefc69SBernhard Beschow FSL_IMX8MP_SAI3, 146a4eefc69SBernhard Beschow FSL_IMX8MP_SAI5, 147a4eefc69SBernhard Beschow FSL_IMX8MP_SAI6, 148a4eefc69SBernhard Beschow FSL_IMX8MP_SAI7, 149a4eefc69SBernhard Beschow FSL_IMX8MP_SDMA1, 150a4eefc69SBernhard Beschow FSL_IMX8MP_SDMA2, 151a4eefc69SBernhard Beschow FSL_IMX8MP_SDMA3, 152a4eefc69SBernhard Beschow FSL_IMX8MP_SEMAPHORE1, 153a4eefc69SBernhard Beschow FSL_IMX8MP_SEMAPHORE2, 154a4eefc69SBernhard Beschow FSL_IMX8MP_SEMAPHORE_HS, 155a4eefc69SBernhard Beschow FSL_IMX8MP_SNVS_HP, 156a4eefc69SBernhard Beschow FSL_IMX8MP_SPBA1, 157a4eefc69SBernhard Beschow FSL_IMX8MP_SPBA2, 158a4eefc69SBernhard Beschow FSL_IMX8MP_SRC, 159a4eefc69SBernhard Beschow FSL_IMX8MP_SYSCNT_CMP, 160a4eefc69SBernhard Beschow FSL_IMX8MP_SYSCNT_CTRL, 161a4eefc69SBernhard Beschow FSL_IMX8MP_SYSCNT_RD, 162a4eefc69SBernhard Beschow FSL_IMX8MP_TCM_DTCM, 163a4eefc69SBernhard Beschow FSL_IMX8MP_TCM_ITCM, 164a4eefc69SBernhard Beschow FSL_IMX8MP_TZASC, 165a4eefc69SBernhard Beschow FSL_IMX8MP_UART1, 166a4eefc69SBernhard Beschow FSL_IMX8MP_UART2, 167a4eefc69SBernhard Beschow FSL_IMX8MP_UART3, 168a4eefc69SBernhard Beschow FSL_IMX8MP_UART4, 169a4eefc69SBernhard Beschow FSL_IMX8MP_USB1, 170a4eefc69SBernhard Beschow FSL_IMX8MP_USB2, 171a4eefc69SBernhard Beschow FSL_IMX8MP_USDHC1, 172a4eefc69SBernhard Beschow FSL_IMX8MP_USDHC2, 173a4eefc69SBernhard Beschow FSL_IMX8MP_USDHC3, 174a4eefc69SBernhard Beschow FSL_IMX8MP_VPU, 175a4eefc69SBernhard Beschow FSL_IMX8MP_VPU_BLK_CTRL, 176a4eefc69SBernhard Beschow FSL_IMX8MP_VPU_G1_DECODER, 177a4eefc69SBernhard Beschow FSL_IMX8MP_VPU_G2_DECODER, 178a4eefc69SBernhard Beschow FSL_IMX8MP_VPU_VC8000E_ENCODER, 179a4eefc69SBernhard Beschow FSL_IMX8MP_WDOG1, 180a4eefc69SBernhard Beschow FSL_IMX8MP_WDOG2, 181a4eefc69SBernhard Beschow FSL_IMX8MP_WDOG3, 182a4eefc69SBernhard Beschow }; 183a4eefc69SBernhard Beschow 184a4eefc69SBernhard Beschow enum FslImx8mpIrqs { 185a4eefc69SBernhard Beschow FSL_IMX8MP_UART1_IRQ = 26, 186a4eefc69SBernhard Beschow FSL_IMX8MP_UART2_IRQ = 27, 187a4eefc69SBernhard Beschow FSL_IMX8MP_UART3_IRQ = 28, 188a4eefc69SBernhard Beschow FSL_IMX8MP_UART4_IRQ = 29, 189a4eefc69SBernhard Beschow FSL_IMX8MP_UART5_IRQ = 30, 190a4eefc69SBernhard Beschow FSL_IMX8MP_UART6_IRQ = 16, 191a4eefc69SBernhard Beschow }; 192a4eefc69SBernhard Beschow 193a4eefc69SBernhard Beschow #endif /* FSL_IMX8MP_H */ 194