Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
01e39bb
arch/arm/imxrt: Allow placing primary ram into TCM in allocateheap
jlaitine Sep 3, 2026
c1207c0
arch/arm/src/armv7-m/arm_fpuconfig.c: Set CP10 and CP11 before CONTRO…
jlaitine Sep 2, 2026
466ed32
arc/arm/imxrt/imxrt_usbdev.c: Fix for imxrt118x-evk
jlaitine Sep 9, 2026
fccfef0
arch/arm/imxrt: Fix LPUART TXDMA buffer wrap handling
jlaitine Sep 11, 2026
0c53f86
arch/arm/imxrt: Add imxrt118x_memorymap
jlaitine Sep 1, 2026
6a99934
arch/arm/imxrt: Add imxrt118x irq definitions
jlaitine Sep 1, 2026
ab3a153
arch/arm/src/imxrt: Add the clock configuration for iMXRT118x
jlaitine Sep 1, 2026
652871a
arch/arm/imxrt: Add register definitions for imxrt118x general power …
jlaitine Sep 1, 2026
1815083
arch/arm/imxrt: Add register definitions for imxrt118x ANADIG
jlaitine Sep 1, 2026
502c550
arc/arm/imxrt: Add initial iomuxc drivers for imxrt1189
jlaitine Sep 1, 2026
054dcf2
arch/arm/imxrt: Port trdc driver from imx93 for imxrt118x
jlaitine Sep 1, 2026
3e06c55
arch/arm/imxrt: Port the imx93 ELE driver for iMXRT118x
jlaitine Sep 1, 2026
28dac30
arch/arm/imxrt: ELE, TRDC and TCM fixes in __start for iMXRT118x plat…
jlaitine Sep 3, 2026
834304f
arch/arm/imxrt: Add iMXRT118x XBAR register definitions
jlaitine Sep 2, 2026
c69d3c1
arch/arm/imxrt: Add support for IOMUXC and rgpio
jlaitine Sep 1, 2026
47d5a9a
arch/arm/imxrt: Add initial imxrt118x dmamux definitions
jlaitine Sep 1, 2026
84f9214
arch/arm/imxrt: Initial support for OCOTP on imxrt1180
jlaitine Sep 2, 2026
891bd24
arch/arm/imxrt: Add imxrt118x blkctrl definitions
jlaitine Sep 1, 2026
5b6cce1
arch/arm/imxrt: Add support for iMXRT118x in lowputc & serial drivers
jlaitine Sep 1, 2026
17e7e90
arch/arm/imxrt: Small fixes for I2C&SPI to build for iMXRT118x
jlaitine Sep 2, 2026
a14a493
arch/arm/src/imxrt: Add Support for IMXRT1189 into build files
jlaitine Sep 1, 2026
7a0c573
arch/arm/imxrt: Add iMXRT118x capable eDMA driver
jlaitine Sep 3, 2026
d1de761
boards/arm/imxrt/imxrt1180-evk: Add board configurations for imxrt118…
jlaitine Sep 1, 2026
c8640f3
arch/arm/imx9, arch/arm64/imx9: Release eDMA lock before callbacks
jlaitine Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,14 @@ config ARCH_CHIP_IMX9_CORTEX_M

config ARCH_CHIP_IMXRT
bool "NXP/Freescale iMX.RT"
select ARCH_CORTEXM7
select ARCH_HAVE_MPU
select ARCH_HAVE_RAMFUNCS
select ARCH_HAVE_TICKLESS
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_SPI_CS_CONTROL
select ARM_HAVE_MPU_UNIFIED
select ARMV7M_HAVE_STACKCHECK
---help---
NXP i.MX RT (ARM Cortex-M7) architectures
NXP i.MX RT (ARM Cortex-M7 or Cortex-M33) architectures.

config ARCH_CHIP_KINETIS
bool "NXP/Freescale Kinetis"
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/include/imxrt/chip.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
/* MIMXRT1170DVMA TODO
*/
# define IMXRT_GPIO_NPORTS 13 /* Thirteen total ports */
#elif defined(CONFIG_ARCH_CHIP_MIMXRT1189CVM8C) || \
defined(CONFIG_ARCH_CHIP_MIMXRT1189CVM8C_CM33)
/* MIMXRT1189CVM8C - Dual-core Cortex-M33 + Cortex-M7 */

# define IMXRT_GPIO_NPORTS 6 /* Six general purpose GPIO ports */
#else
# error "Unknown i.MX RT chip type"
#endif
Expand Down
293 changes: 293 additions & 0 deletions arch/arm/include/imxrt/imxrt118x_irq.h

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions arch/arm/include/imxrt/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
# include <arch/imxrt/imxrt106x_irq.h>
#elif defined(CONFIG_ARCH_FAMILY_IMXRT117x)
# include <arch/imxrt/imxrt117x_irq.h>
#elif defined(CONFIG_ARCH_FAMILY_IMXRT118x)
# include <arch/imxrt/imxrt118x_irq.h>
#else
# error Unrecognized i.MX RT architecture
#endif
Expand Down
16 changes: 10 additions & 6 deletions arch/arm/src/armv7-m/arm_fpuconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ void arm_fpuconfig(void)
{
uint32_t regval;

/* Enable full access to CP10 and CP11 before setting CONTROL.FPCA (see
* ARMv7-M Architecture Reference Manual, DDI 0403E.e). Otherwise cores
* which have the coprocessor disabled at reset will raise a NOCP usage
* fault.
*/

regval = getreg32(NVIC_CPACR);
regval |= NVIC_CPACR_CP_FULL(10) | NVIC_CPACR_CP_FULL(11);
putreg32(regval, NVIC_CPACR);

/* Set CONTROL.FPCA so that we always get the extended context frame
* with the volatile FP registers stacked above the basic context.
*/
Expand All @@ -76,10 +86,4 @@ void arm_fpuconfig(void)
regval = getreg32(NVIC_FPCCR);
regval &= ~(NVIC_FPCCR_ASPEN | NVIC_FPCCR_LSPEN);
putreg32(regval, NVIC_FPCCR);

/* Enable full access to CP10 and CP11 */

regval = getreg32(NVIC_CPACR);
regval |= NVIC_CPACR_CP_FULL(10) | NVIC_CPACR_CP_FULL(11);
putreg32(regval, NVIC_CPACR);
}
4 changes: 2 additions & 2 deletions arch/arm/src/imx9/imx9_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,11 @@
* if not continue to free tcds in chain
*/

next = dmach->flags & EDMA_CONFIG_LOOPDEST ?

Check failure on line 531 in arch/arm/src/imx9/imx9_edma.c

View workflow job for this annotation

GitHub Actions / check

Bad alignment
NULL : (struct imx9_edmatcd_s *)
imx9_edma_dmaaddr_to_addr(tcd->dlastsga);

imx9_tcd_free_nolock(tcd);

Check failure on line 535 in arch/arm/src/imx9/imx9_edma.c

View workflow job for this annotation

GitHub Actions / check

Bad alignment
}

dmach->head = NULL;
Expand All @@ -548,12 +548,12 @@
dmach->arg = NULL;
dmach->state = IMX9_DMA_IDLE;

spin_unlock_irqrestore_nopreempt(&g_edma.lock, flags);

if (callback)
{
callback((DMACH_HANDLE)dmach, arg, true, result);
}

spin_unlock_irqrestore_nopreempt(&g_edma.lock, flags);
}

/****************************************************************************
Expand Down Expand Up @@ -1526,7 +1526,7 @@
unsigned int imx9_dmach_idle(DMACH_HANDLE handle)
{
struct imx9_dmach_s *dmach = (struct imx9_dmach_s *)handle;
return dmach->state == IMX9_DMA_IDLE ? 0 : -1;

Check failure on line 1529 in arch/arm/src/imx9/imx9_edma.c

View workflow job for this annotation

GitHub Actions / check

Missing blank line after declarations
}

/****************************************************************************
Expand Down
42 changes: 35 additions & 7 deletions arch/arm/src/imxrt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@

# Required i.MX RT files

set(SRCS imxrt_allocateheap.c imxrt_start.c imxrt_periphclks.c)
set(SRCS imxrt_allocateheap.c imxrt_start.c)

if(NOT CONFIG_IMXRT_RGPIO)
list(APPEND SRCS imxrt_periphclks.c)
endif()

if(CONFIG_IMXRT_PROGMEM)
list(APPEND SRCS imxrt_flash.c)
Expand All @@ -35,23 +39,31 @@ list(
SRCS
imxrt_irq.c
imxrt_clrpend.c
imxrt_gpio.c
imxrt_daisy.c
imxrt_wdog.c
imxrt_serial.c
imxrt_xbar.c
imxrt_ocotp.c
imxrt_lowputc.c)

if(CONFIG_IMXRT_RGPIO)
list(APPEND SRCS imxrt_rgpio.c)
else()
list(APPEND SRCS imxrt_gpio.c imxrt_daisy.c)
endif()

# Configuration-dependent i.MX RT files

if(CONFIG_IMXRT_CLOCKCONFIG_VER2)
if(CONFIG_IMXRT_CLOCKCONFIG_VER3)
list(APPEND SRCS imxrt_clockconfig_ver3.c)
elseif(CONFIG_IMXRT_CLOCKCONFIG_VER2)
list(APPEND SRCS imxrt_clockconfig_ver2.c imxrt_pmu.c)
else()
list(APPEND SRCS imxrt_clockconfig_ver1.c)
endif()

if(CONFIG_IMXRT_IOMUX_VER2)
if(CONFIG_IMXRT_IOMUX_VER3)
list(APPEND SRCS imxrt_iomuxc_ver3.c)
elseif(CONFIG_IMXRT_IOMUX_VER2)
list(APPEND SRCS imxrt_iomuxc_ver2.c)
else()
list(APPEND SRCS imxrt_iomuxc_ver1.c)
Expand All @@ -68,7 +80,11 @@ else()
endif()

if(CONFIG_IMXRT_GPIO_IRQ)
list(APPEND SRCS imxrt_gpioirq.c)
if(CONFIG_IMXRT_RGPIO)
list(APPEND SRCS imxrt_rgpioirq.c)
else()
list(APPEND SRCS imxrt_gpioirq.c)
endif()
endif()

if(CONFIG_ARM_MPU)
Expand All @@ -80,7 +96,11 @@ if(CONFIG_BUILD_PROTECTED)
endif()

if(CONFIG_IMXRT_EDMA)
list(APPEND SRCS imxrt_edma.c)
if(CONFIG_IMXRT_EDMA_VER3)
list(APPEND SRCS imxrt_edma_ver3.c)
else()
list(APPEND SRCS imxrt_edma.c)
endif()
endif()

if(CONFIG_IMXRT_USDHC)
Expand Down Expand Up @@ -149,4 +169,12 @@ if(CONFIG_IMXRT_ADC)
endif()
endif()

if(CONFIG_IMXRT_ELE)
list(APPEND SRCS imxrt118x_ele.c)
endif()

if(CONFIG_IMXRT_TRDC)
list(APPEND SRCS imxrt118x_trdc.c)
endif()

target_sources(arch PRIVATE ${SRCS})
122 changes: 122 additions & 0 deletions arch/arm/src/imxrt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,33 @@ config ARCH_CHIP_MIMXRT1176DVMAA
select IMXRT_HAVE_USBOTG1
select IMXRT_HAVE_USBOTG2

config ARCH_CHIP_MIMXRT1189CVM8C
bool "MIMXRT1189CVM8C (Cortex-M7 core)"
select ARCH_FAMILY_IMXRT118x
select ARCH_CORTEXM7
select ARCH_HAVE_DPFPU
select ARMV7M_HAVE_ICACHE
select ARMV7M_HAVE_DCACHE
select ARMV7M_HAVE_ITCM
select ARMV7M_HAVE_DTCM
select ARMV7M_HAVE_STACKCHECK
select ARMV7M_ITCM
select ARMV7M_DTCM
---help---
Target the Cortex-M7 core on the RT1189 SoC.

config ARCH_CHIP_MIMXRT1189CVM8C_CM33
bool "MIMXRT1189CVM8C (Cortex-M33 core)"
select ARCH_FAMILY_IMXRT118x
select ARCH_CORTEXM33
select ARMV8M_HAVE_STACKCHECK
select IMXRT_ELE
select IMXRT_TRDC
---help---
Target the Cortex-M33 core on the RT1189 SoC. Used to build a
NuttX bootloader / minimal application that runs on the M33 out
of reset.

endchoice # i.MX RT Chip Selection

# i.MX RT Families
Expand All @@ -126,12 +153,14 @@ config ARCH_FAMILY_MIMXRT1021C
config ARCH_FAMILY_IMXRT102x
bool
default n
select ARCH_CORTEXM7
select ARCH_HAVE_FPU
select ARCH_HAVE_DPFPU # REVISIT
select ARMV7M_HAVE_ICACHE
select ARMV7M_HAVE_DCACHE
select ARMV7M_HAVE_ITCM
select ARMV7M_HAVE_DTCM
select ARMV7M_HAVE_STACKCHECK

config ARCH_FAMILY_MIMXRT105xDVL6A
bool
Expand All @@ -150,12 +179,14 @@ config ARCH_FAMILY_MIMXRT105xCVL5A
config ARCH_FAMILY_IMXRT105x
bool
default n
select ARCH_CORTEXM7
select ARCH_HAVE_FPU
select ARCH_HAVE_DPFPU # REVISIT
select ARMV7M_HAVE_ICACHE
select ARMV7M_HAVE_DCACHE
select ARMV7M_HAVE_ITCM
select ARMV7M_HAVE_DTCM
select ARMV7M_HAVE_STACKCHECK

config ARCH_FAMILY_MXRT106xDVL6A
bool
Expand All @@ -174,12 +205,14 @@ config ARCH_FAMILY_MIMXRT106xCVL5A
config ARCH_FAMILY_IMXRT117x
bool
default n
select ARCH_CORTEXM7
select ARCH_HAVE_FPU
select ARCH_HAVE_DPFPU # REVISIT
select ARMV7M_HAVE_ICACHE
select ARMV7M_HAVE_DCACHE
select ARMV7M_HAVE_ITCM
select ARMV7M_HAVE_DTCM
select ARMV7M_HAVE_STACKCHECK
select IMXRT_HIGHSPEED_GPIO
select IMXRT_HAVE_FLEXSPI2
select IMXRT_ADC_VER2
Expand All @@ -193,15 +226,32 @@ config ARCH_FAMILY_IMXRT117x
select IMXRT_FLEXCAN1_FD
select IMXRT_FLEXCAN2_FD

config ARCH_FAMILY_IMXRT118x
bool
default n
select ARCH_HAVE_FPU
select IMXRT_HAVE_LPUART9
select IMXRT_HAVE_LPUART10
select IMXRT_HAVE_LPUART11
select IMXRT_HAVE_LPUART12
select IMXRT_IOMUX_VER3
select IMXRT_RGPIO
select IMXRT_CLOCKCONFIG_VER3
select IMXRT_EDMA_VER3
---help---
i.MX RT1180 dual-core Crossover Processors (Cortex-M33 + Cortex-M7).

config ARCH_FAMILY_IMXRT106x
bool
default n
select ARCH_CORTEXM7
select ARCH_HAVE_FPU
select ARCH_HAVE_DPFPU # REVISIT
select ARMV7M_HAVE_ICACHE
select ARMV7M_HAVE_DCACHE
select ARMV7M_HAVE_ITCM
select ARMV7M_HAVE_DTCM
select ARMV7M_HAVE_STACKCHECK
select IMXRT_HIGHSPEED_GPIO
select IMXRT_HAVE_FLEXSPI2
select IMXRT_HAVE_FLEXIO3
Expand Down Expand Up @@ -359,10 +409,73 @@ config IMXRT_CLOCKCONFIG_VER2
bool
default n

config IMXRT_CLOCKCONFIG_VER3
bool
default n
---help---
Selects the RT118x-family clock configuration
(arch/arm/src/imxrt/imxrt_clockconfig_ver3.c).

config IMXRT_IOMUX_VER2
bool
default n

config IMXRT_IOMUX_VER3
bool
default n
---help---
Selects the "generation 3" IOMUXC driver used by RT118x.

config IMXRT_RGPIO
bool
default n
---help---
Selects the RGPIO driver (arch/arm/src/imxrt/imxrt_rgpio.c) that
targets the RGPIO IP block used on RT118x.

config IMXRT_ELE
bool
default n
---help---
Enable the NXP EdgeLock Enclave (ELE) messaging driver
(arch/arm/src/imxrt/imxrt118x_ele.c). Present on RT118x-class
SoCs.

config IMXRT_ELE_LOAD_FW
bool "Load ELE firmware from NuttX at boot"
depends on IMXRT_ELE
default n
---help---
Embed the ELE firmware AHAB container (CONFIG_IMXRT_ELE_FW_PATH)
in the NuttX image and hand it to the EdgeLock Enclave with a
LOAD_FW command early in imxrt118x_ele_init().

When disabled, the ELE firmware is instead packed as its own
AHAB container in the boot image, loaded by ROM code.

config IMXRT_ELE_FW_PATH
string "ELE firmware AHAB container path"
depends on IMXRT_ELE
default "tools/imxrt1180/.cache/ele-fw/mxrt1180b0-ahab-container.img"
---help---
Path (relative to the NuttX top-level directory, or absolute) to
the NXP EdgeLock Enclave firmware AHAB container.

config IMXRT_TRDC
bool
default n
---help---
Enable the Trusted Resource Domain Controller driver
(arch/arm/src/imxrt/imxrt118x_trdc.c). Present on RT118x-class
SoCs.

config IMXRT_EDMA_VER3
bool
default n
---help---
Selects the "generation 3" eDMA driver
(arch/arm/src/imxrt/imxrt_edma_ver3.c) used by RT118x.

menu "i.MX RT Peripheral Selection"

config IMXRT_EDMA
Expand Down Expand Up @@ -2350,6 +2463,7 @@ endmenu # i.MX RT Peripheral Selection
menuconfig IMXRT_GPIO_IRQ
bool "GPIO Interrupt Support"
default n
depends on !IMXRT_RGPIO

if IMXRT_GPIO_IRQ

Expand Down Expand Up @@ -2601,6 +2715,7 @@ endchoice # i.MX RT Boot Configuration

choice
prompt "i.MX RT Primary RAM"
default IMXRT_TCM_PRIMARY if ARCH_CORTEXM33
default IMXRT_OCRAM_PRIMARY
---help---
The primary RAM is the RAM that contains the system BLOB's .data and
Expand All @@ -2618,6 +2733,13 @@ config IMXRT_SRAM_PRIMARY
bool "External SRAM primary"
depends on IMXRT_SEMC_SRAM

config IMXRT_TCM_PRIMARY
bool "TCM primary"
---help---
Place the primary RAM in the core-local TCM (M7 DTCM or M33
System TCM, both aliased at IMXRT_DTCM_BASE). The size is taken
from the linker script's _ram_size symbol.

endchoice # i.MX RT Primary RAM

menu "i.MX RT Heap Configuration"
Expand Down
Loading
Loading