Commit graph

357 commits

Author SHA1 Message Date
Jiafei Pan
dc68d1bb10 soc: imx943: a55: disable D-Cache when booting from el2
Enabled CONFIG_ARM64_BOOT_DISABLE_DCACHE to disable D-Cache when
booting from EL2.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-17 07:22:51 +02:00
Neil Chen
ab3d2dc830 boards: frdm_mcxa153,frdm_mcxa156: add hwinfo support
1. enable hwinfo support
   - device_id_get
   - get_reset_cause
   - get_supported_reset_cause
   - clear_reset_cause
2. verified tests/drivers/hwinfo

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-06-12 10:24:40 +02:00
Yangbo Lu
1d2e1787cb soc: nxp: imx9: add basic support for i.MX943 M33
Added basic support for i.MX943 M33.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-06-10 22:07:17 +02:00
Axel Le Bourhis
3c6a3826ad soc: nxp: rw: adjust ACL bt_conn_tx contexts to match Controller's
RW61x's controller uses 8 ACL packets, adjust `BT_BUF_ACL_TX_COUNT`
to match it.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2025-06-06 08:45:33 +02:00
Axel Le Bourhis
df2dac7a68 soc: nxp: mcxw: adjust ACL bt_conn_tx contexts to match Controller's
MCXW7x's controller uses 12 ACL packets, adjust `BT_BUF_ACL_TX_COUNT`
to match it.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2025-06-06 08:45:33 +02:00
Mike J. Chen
2923504780 soc: nxp: imxrt: imxrt5xx: add Fusion F1 DSP selects
Add select for GEN_HANDLERS to use the more efficient
generated interrupt handlers.

Add select for HIFI3, which are the SIMD related registers.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-06 08:43:52 +02:00
Jiafei Pan
c0aee5c224 soc: imx943: add imx943 soc support
This patch add i.MX 943 soc support.

The i.MX 943 applications processors integrate up to four Arm Cortex-A55
cores and supports functional safety with built-in 2x Arm Cortex -M33 and
-M7 cores which can be configured as a safety island. Optimizing
performance and power efficiency for Industrial, IoT and automotive
devices, i.MX 943 processors are built with NXP’s innovative Energy Flex
architecture.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-04 15:51:36 -04:00
Jiafei Pan
e624cffd9b soc: imx: disable dcache until mmu is enabled during booting
Enable CONFIG_ARM64_BOOT_DISABLE_DCACHE for i.MX Cortex-A platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-04 16:59:43 +02:00
Derek Snell
1fd24fbdbb soc: nxp: mcx: MCXNx4x: update SOC to use flash_k4 driver
Use flash_k4 driver for internal flash instead of ROM API driver.  One
benefit is the flash program phrase size decreases from 128 Bytes to 16
Bytes.  16 Byte phrases enables this SOC to leverage the Zephyr NVS
subsystem, and the MCUboot swap mode.

Signed-off-by: Derek Snell <derek.snell@nxp.com>

Conflicts:
	west.yml
2025-05-31 05:57:40 -04:00
Manuel Argüelles
6681f8d342 soc: nxp: s32k3: configure missing mpu regions
This fixes a regression introduced in c31640239c where all regions
except Flash and RAM where left unmapped. Before introducing region
0 that prevents speculative access to the entire memory space, we
were relying on the architectural background map to access them.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-05-31 05:57:18 -04:00
Matthieu Speder
66d90e7782 soc: nxp_kinetis: Mark __kinetis_flash_config with __used attribute
This is a fix for issue #90426 .
Marking __kinetis_flash_config  with __used attribute prevents
unwanted deletion when compiling with LTO.

Signed-off-by: Matthieu Speder <mspeder@users.sourceforge.net>
2025-05-31 03:37:20 +02:00
Andrej Butok
eb5014f7a3 soc: imxrt: add mimxrt1052/1062 flashing configuration
- Adds a flash runner configuration for mimxrt1052 and mimxrt1062,
  used for sysbuild multi-image projects, mainly for MCU-boot.
- Avoid unwanted multiple erases and resets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-05-31 03:36:24 +02:00
Declan Snyder
4598c18754 soc: rw: Switch main clock on PM2 to LPOSC
On RW, normal configuration has all clock generators gated in PM2.
Only the LPOSC is available for main clock source since it is a low
power clock.

Many of the peripherals on the chip are still "on" and do need a
main clock source in order to be effective as wakeup sources
to the chip as intended. So we should make this switch for PM2
specifically in order to achieve desired wakeup capabilities.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Mark Wang
a8796ca6ee boards: nxp: add uhc support for frdm_k22f, rt1060, lpc55s69 and lpc55s28
add uhc related items to dts.
add clock initialization
add BM4 if CONFIG_USB_UHC_NXP_KHCI is enabled
add pin mux
update board related CMakeLists.txt
update sdk-ng CMake to include NXP controller drivers
update west.yml to contain the hal_nxp pr

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Manuel Argüelles
c31640239c soc: nxp: s32k3: fix erratum ERR011573
Due to erratum ERR011573, speculative accesses might be performed
to normal memory unmapped in the MPU. This can be avoided by using
MPU region 0 to cover all unmapped memory and make this region
execute-never and inaccessible.

Fixes #89852

Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-05-29 20:17:14 +02:00
Derek Snell
7c77d0ea48 soc: nxp: MCXNx4x: enable booting from QSPI flash
The ROM bootloader has the option to boot from external QSPI flash on
the FlexSPI instead of internal flash.  Adds
CONFIG_NXP_FLEXSPI_BOOT_HEADER to include the FlexSPI boot ROM header
in the image.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-28 21:29:29 +02:00
David Leach
c52bea0a6d soc: imxrt: remove MEMC config selection
MEMC no longer needs to be default y on RT builds.

Fixes #89782

Signed-off-by: David Leach <david.leach@nxp.com>
2025-05-27 16:44:37 +02:00
Andrei Menzopol
88a180556d soc: nxp: mcxw: update macro in Kconfig.defconfig
Use IEEE802154 as it is set by the L2 macros too.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-05-27 09:16:04 +02:00
Vit Stanicek
e253c3b57f soc: xtensa: Add mimxrt685s/hifi4
Add definitions, linker file and init code for mimxrt685s/hifi4 (i.MX
RT685's HiFi 4 DSP).

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-05-21 20:11:19 +02:00
Alexandre Rey
3b407609b4 soc: mcxn: formatting
Run clang-format on soc/nxp/mcx/mcxn/soc.c.

Signed-off-by: Alexandre Rey <alexandre.rey@swisstiming.com>
2025-05-21 19:56:47 +02:00
Alexandre Rey
59a23b57f6 soc: mcxn547: add support for MCXN547
Add MCXN547 support

Signed-off-by: Alexandre Rey <alexandre.rey@swisstiming.com>
2025-05-21 19:56:47 +02:00
Peter Wang
dd1bc2434a boards: frdm_mcxa166, frdm_mcxa276: add hwinfo reset_cause support
1. enable hwinfo support
   - get_reset_cause
   - get_supported_reset_cause
   - clear_reset_cause
2. verified tests/drivers/hwinfo

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-05-20 18:27:56 +02:00
Jiafei Pan
6e72749c64 soc: imx93: a55: add empty soc.h
Some drivers need header file soc.h, according to Zephyr SoC Porting Guide
soc.h must be provided for each SoC, so created an empty one.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-12 16:47:49 +02:00
Declan Snyder
ddce1e1c67 soc: nxp: rw: Policy constraints when PM2 enabled
When PM2 is enabled, it will disable many of the devices, so need to
enable PM policy constraints for this mode also so that device drivers
can work.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-09 01:41:05 +02:00
Emilio Benavente
5fd6715917 drivers: watchdog: Added Driver for the EWM
Added a driver for the External Watchdog Driver

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-05-09 01:39:56 +02:00
Jiafei Pan
108615c560 soc: imx95: a55: initialize lpuart clock
Initialize lpuart clock to avoid it is not initialized.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-06 20:36:15 +02:00
Ofir Shemesh
999b19d6ce soc: nxp: imxrt: fix incorrect flexram partition function call
Replace incorrect call to memc_flexram_dt_partition() with
flexram_dt_partition() to resolve build error on
IMXRT10xx and IMXRT11xx.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2025-05-02 01:17:13 +02:00
Hake Huang
c10e6eaf07 soc: mimxrt11xx: update the frdmram api
flexram api change to misc.

fixes: #89150

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-05-02 01:16:37 +02:00
Derek Snell
26423f2020 soc: nxp: mcxn: configure CPU1 TrustZone access level
Configures AHBSC MASTER_SEC_LEVEL register for the cpu1 before cpu1 is
enabled.  By default, this gives CPU1 secure and privileged access to
the rest of the SOC, same as CPU0.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-02 01:16:26 +02:00
Axel Le Bourhis
dc52ec7d32 soc: nxp: rw: fix wrong dependency on kconfigs
Use `defaut y if` instead of `depends on` as the related Kconfig
should be user configurable even when standby mode is not used.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2025-05-01 18:16:57 +02:00
Adib Taraben
e92fb10971 drivers: hwinfo: add nxp mcxn reset_cause implementation
Implementation is specific to the NXP MCXN series.
Code mostly copied from hwinfo_mcux_rcm driver.

Signed-off-by: Adib Taraben <theadib@gmail.com>
2025-04-29 20:07:25 -04:00
Jacob Wienecke
db63e563a9 drivers: memc: memc_nxp_flexram.h: Move to the public includes directory
Moved to: include/zephyr/drivers/misc/flexram/memc_nxp_flexram.h

This change makes it so that the .h file does not need to be pulled in
using the CMakeLists.txt file, and can be included like other public
includes.

Removes drivers/memc/memc_nxp_flexram.h

Add memc_nxp_flexram.h to include/zephyr/drivers/misc/flexram

Modify drivers/memc/memc_nxp_flexram.c to use the new include path.

Modifies the mimxrt1170 magic_addr sample to include the driver using
the new include path.

Modify the soc file: soc/nxp/imxrt/imxrt11xx/soc.c to use the new path.

Add relevant information to migration-guide-4.2.rst.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Co-authored-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-26 10:55:09 +02:00
Kate Wang
587042d0df soc: nxp: imxrt: imxrt7xx: update rt7xx soc files
Add functions to configure MIPI_DSI power and clock when
MIPI_DSI is enabled.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kesavan Yogeswaran
2882dab78c soc: nxp: Fix boot header placement when using lld
As well described in a previous PR [1], the GNU ld and LLVM lld linkers
treat the location counter (`.`) differently. lld always inteprets the
location counter as an absolute address whereas ld interprets it as an
offset from the start of the current object.

The NXP boot header linker script files use `.` assignment to specify an
offset within the rom_start region (ld-style). This causes lld to error
out since it interprets this as the location counter moving backwards.

To fix this, re-use the idea from the previous PR [1]:
replace `. = FOO` with `. += FOO - (. - __rom_start_address)`

This sets the location counter in a way that works with both ld and lld.

[1] https://github.com/zephyrproject-rtos/zephyr/pull/58315

Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
2025-04-21 22:03:38 +02:00
Qiang Zhao
893f2e0187 soc: nxp: imx95: fix systick issue for M7
The SLEEP_HOLD_EN is enabled by default, that will
gate systick, clear it to fix

Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
2025-04-21 22:03:27 +02:00
Qiang Zhao
c412ee4597 drivers: firmware: scmi: add cpu domain protocol
Added helpers for NXP SCMI cpu dmomain protocol.

Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
2025-04-21 22:03:27 +02:00
Neil Chen
720f726072 soc: mcxa153: add SOC support for MCXA153
Add MCXA153 support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-04-12 00:02:28 +02:00
Derek Snell
070bd0e295 soc: nxp: rw61x: enable USB clock for UDC
When using USB Next stack and UDC driver, enable USB clock

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-04-10 15:51:45 +02:00
Iuliana Prodan
ab5c0b5195 soc: nxp: imx: add resource_table section in linker script
Add resource_table section in linker script
for i.MX8ULP, for inter-process communication.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2025-04-07 15:17:34 +02:00
Emilio Benavente
9a893c6bd9 boards: nxp: Added I2S Support for RW612
Added I2S support for RW612.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-04-03 21:06:14 +02:00
Jiafei Pan
e94a545599 soc: imx9: fix pinctrl drive strength setting
Current code configures the higher bits ahead of drive strength
to be "1", this patch fix this issue.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Lei Xu <lei.xu@nxp.com>
2025-04-03 11:07:01 +02:00
Peter Wang
9580bc5627 soc: mcxa166,mcxa276: add SOC support for MCXA166 and MCXA276
add soc MCXA166 and MCXA276 for board frdm_mcxa166 and frdm_mcxa276

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-04-03 08:43:16 +02:00
Tim Wang
25fcfff154 soc: mimxrt1180: Add USB Device support
This was tested on the MIMXRT1180 EVK board

Signed-off-by: Tim Wang <tim.wang@nxp.com>
2025-04-01 11:52:09 +02:00
Xiaoli Ji
30da8b5aa8 soc: nxp: imxrt: imxrt118x: Update lpuart clock
1.Update lpuart0102 clock
2.Enable lpuart0304/0506/0708/0910/1112 clock

Signed-off-by: Xiaoli Ji <xiaoli.ji@nxp.com>
2025-03-31 19:50:27 -04:00
Zhaoxiang Jin
7ed7cd191a modules: hal_nxp: Move hal_nxp glue layer to zephyr repo
Move hal_nxp glue layer to zephyr repo.
Fix build warnings and failures caused by hal_nxp upgrade.
Update manifest to contain hal_nxp changes.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-03-26 16:26:34 +01:00
Hake Huang
1847b882a2 tests: ztest: enable ztest_no_yield for all in PM
if CONFIG_PM=y, board will enter low power,
which will cause problem for debugger.
So for ztest cases, we need enable this to avoid problem.
This used to apply to soc/platform level, now remove them.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-03-25 22:14:20 +01:00
Yangbo Lu
95f314734f soc: nxp: imx95: support M7 soc init for NETC
Added support for soc init for NETC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-25 05:59:30 +01:00
Yangbo Lu
3d109d65ee soc: nxp: imx95: enable multi-level interrupts for m7
Enabled multi-level interrupts for m7 since IRQSTEER is used.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-25 05:59:30 +01:00
Mahesh Mahadevan
bc5a60c812 boards: mimxrt700_evk: Fix USB failures
1. Update the USB clock init code
2. Pass a flag to USB HAL driver for cache
   management

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-03-25 00:32:14 +01:00
Andre Heinemans
f0134cdd83 soc: nxp: imx: add .resource_table section for imx95
Add .resource_table section to the linker script for the
i.MX95. This section is used by intercore communication to
publish features and configurations to the remote

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2025-03-24 12:17:53 +01:00