Commit Graph

906 Commits

Author SHA1 Message Date
Jacob Siverskog 6d0587abf6 mcux-sdk-middleware-usb: update to sdk 2.14.0
this is taken from
git@github.com:nxp-mcuxpresso/mcux-sdk-middleware-usb.git, tag
MCUX_2.14.0.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2024-02-02 12:06:09 -06:00
Yves Vandervennet 7fe7d866f7 License: summary of contents
The software content register file (scr-hal.txt) provides information
about the NXP HAL. e.g. origin, license, location.

It is added for clarity.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-02-02 11:49:09 -06:00
Tomas Galbicka 0463d6aa0d mcux: mailbox: Include mailbox if mbox is enabled
This commit includes NXP mailbox driver when Zephyr MBOX API is used.

This is required for the mbox driver wrapper around NXP mailbox.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-02-02 07:28:05 -06:00
Declan Snyder b81cfaf885 Revert "mcux: hal_nxp: updated cmake to reference new pit definition"
This reverts commit 45f379b0cb.
2024-02-02 07:22:30 -06:00
Emilio Benavente 45f379b0cb mcux: hal_nxp: updated cmake to reference new pit definition
Updated cmakefile to include pit driver using the
updated Kconfig definition.

signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-01-31 11:47:26 -06:00
Radoslaw Koppel 909d2154cc mcux: mcux-sdk: Fix labels in inline assembly
This commit fixes labels in inline assembly to use
unique identifiers for internal labels.
This fix is required to be able to use LTO.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2024-01-31 15:09:44 +01:00
Laurentiu Mihalcea ae438701d6 hal_nxp.cmake: fix bad edma directory naming
When using the new Zephyr EDMA driver, Zepyhr tries to
include the old "edma" directory, which results in a build
error since "driver_edma_rev2.cmake" is not placed inside
that directory. To fix this, change the included directory's
name to edma_rev2, which is the directory that contains the
files associated with EDMA rev2 driver from NXP HAL.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-29 17:00:13 -06:00
Manuel Argüelles ecb9e4c150 s32: mcux: s32k146: enable RTC driver
Enable fsl_rtc.c driver on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-28 11:07:39 -06:00
Manuel Argüelles 1be7718c59 s32: soc: s32k146: set RTC_CLK sourced from RTC_CLKIN
Source the RTC clock from the external 32.768Khz crystal.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-28 11:07:39 -06:00
Daniel DeGrasse 967e5ab980 mcux: scripts: pinctrl: update comment syntax
Update code from writing descriptions given in pin control groups to
handle multiline descriptions as block comments. Also, update comment
code to write name of generation script correctly- since pin control
scripts are all called from gen_board_pinctrl.py

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-26 11:54:00 -06:00
Daniel DeGrasse cfa6aadfb3 mcux: scripts: pinctrl: update for v14 of the MEX utilities
Update pinctrl scripts for v14 of the MEX utilities, since
v13 is now legacy.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-26 11:54:00 -06:00
David Leach e6b0d96d86 mcux: hal_nxp: Remove unneeded files
Remove files not needed by Zephyr to reduce the size of the NXP HAL.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-01-25 08:30:21 -06:00
Manuel Argüelles 3d4be32141 s32: mcux: s32k146: enable watchdog driver
Enable fsl_wdog32 driver on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-25 12:18:41 +07:00
Laurentiu Mihalcea d6d43cab73 mcux: README: Update patch list
Update patch list to contain the EDMA rev2-related changes
from MCUX-SDK.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-22 14:28:46 -06:00
Laurentiu Mihalcea 432c5dfbea mcux: hal_nxp: Add option for compiling the EDMA rev2 driver
The Zephyr EDMA driver requires the NXP HAL EDMA rev2
driver to also be compiled. As such, add an option inside hal_nxp.cmake
which will compile the NXP HAL EDMA rev2 driver if CONFIG_DMA_NXP_EDMA
is set to "y".

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-22 14:28:46 -06:00
Laurentiu Mihalcea 919d0672b7 devices: MIMX9352: Add SoC layer definitions required for using edma rev2
With the introduction of revision 2 of the edma driver, each SoC
will have to expose to the entities using the edma rev2 driver an
array of eDMA configurations. Each of the entries from said array
represents an eDMA version found on an SoC.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-22 14:28:46 -06:00
Laurentiu Mihalcea 0cc2ef5689 drivers: edma: Introduce revision 2 of eDMA driver
This commit introduces revision 2 of the eDMA driver.

The main goal of this revision is to provide a standard
API to the entities using this driver, which can be used
for the eDMA IPs found on i.MX93, i.MX8QM, and i.MX8QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-22 14:28:46 -06:00
Declan Snyder ca7520ebc8 Revert "Revert "caam: Fixes RNG descriptors"" 2024-01-22 09:31:40 -06:00
Jacob Siverskog 3aafbf41f3 mcux-sdk-middleware-usb: remove duplicate files
these files just cause confusion.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2024-01-18 12:12:37 -06:00
Declan Snyder 9ced572b0d Revert "caam: Fixes RNG descriptors"
This reverts commit 75c1e0ddf2.
2024-01-18 11:54:24 -06:00
Jacob Siverskog 9b2693c765 mcux-sdk-middleware-usb: fix ip control return value for ip3511
without this kStatus_USB_Error was always returned for
kUSB_DeviceControlRun and kUSB_DeviceControlStop control types. let's
do it as for ehci/khci.

this change fixes the tests/subsys/usb/device/usb.device test for
lpcxpresso55s69_cpu0.

this is from https://github.com/nxp-mcuxpresso/mcux-sdk-middleware-usb/pull/6

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2024-01-05 13:50:19 -06:00
Manuel Argüelles 12970d629f s32: mcux: s32k146: add definitions for FlexCAN
Add FlexCAN peripheral definitions to enable FlexCAN driver
on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-04 12:40:10 -06:00
Manuel Argüelles 6ccc1ddc1f s32: drivers: s32k1: patch FlexCAN header for compatibility with MCUX
The following patches are applied to the headers in order to make them
compatible with MCUX FlexCAN driver:

- Substitute regex pattern \bFLEXCAN_ with CAN_
- Replace message buffer RAMn array with a struct for 64-byte payloads
  (the only paylod length supported at the moment in MCUX FlexCAN
   driver).
- Replace macros for RAM array bytes with macros for message buffer
  fields CS, ID, WORD0 and WORD1.
- Define MCR_WAKSRC, MCR_SLFWAK, MCR_WAKMSK and ESR1_WAKINT register
  access macros to be able to build with MCUX driver. These fields are
  reserved in S32K1xx and not used.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-04 12:40:10 -06:00
Manuel Argüelles 4605f6715c s32: mcux: s32k146: add definitions for FTM
Add FTM peripheral definitions to enable FTM driver on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-26 09:56:16 +07:00
Manuel Argüelles edceb5b166 s32: drivers: s32k1: patch FTM for compatibility with MCUX
In order to reuse existing device header with MCUX SDK FTM driver,
is needed to redefine CONTROLS.CSC/CV to CONTROLS.CnSC/CnV.
The change is applied to all devices to allow future use of it, although
for now only will be used on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-26 09:56:16 +07:00
Manuel Argüelles 97ce737d7c mcux: drivers: ftm: make public FTM_GetInstance()
Make public FTM_GetInstance() function to avoid compilation warnings
when building with clock control driver disabled.

Cherry-picked from mcux-sdk#155.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-26 09:56:16 +07:00
Daniel DeGrasse ed3efff426 mcux: hal_nxp: add support for DMIC
Add support for including DMIC driver into build

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-12-13 15:19:03 -06:00
Laurentiu Mihalcea a436d08e2c mcux: README: Update patch list
Update patch list to contain the MIMX9352 SAI-related
and the fsl_sai-related changes from the mcux-repo.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea 528c95269e mcux: hal_nxp.cmake: Allow NULL FIFO watermark for Zephyr DAI SAI driver
The Zephyr DAI SAI driver may want to set a NULL FIFO watermark
in which case the NXP HAL SAI driver needs to allow it as it's
a valid value. As such, this commit sets the MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
macro to 1 which will allow the NULL FIFO watermark.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea bed98a03d8 mcux: hal_nxp.cmake: Disable implicit channel configuration for Zephyr DAI SAI driver
The Zephyr DAI SAI driver sets the channel-related fields (i.e:
startChannel, channelMask, endChannel, and channelNums) from
sai_transceiver_t. As such, implicitly setting them inside
SAI_TxSetConfig()/SAI_RxSetConfig() should be disabled. Also,
the Zephyr driver may pass a virtual address to SAI_TxSetConfig()/
SAI_RxSetConfig() in which case these functions will no longer
work properly because of the implicit channel configuration logic.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea 1a85f30340 mcux: hal_nxp.cmake: Add support for compiling fsl_sai for Zephyr DAI SAI driver
This commit allows compiling the fsl_sai files whenever
the Zephyr DAI SAI driver is enabled.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea d6aa09fdd6 drivers: fsl_sai: Fix compilation warnings when asserts are disabled
When asserts are disabled, SAI_GetInstance() will no longer check
if the instance is < ARRAY_SIZE(s_saiBases), which results in compilation
warnings. To fix this, check if instance has reached the array size. If so,
return 0. If asserts are enabled, this will cause an assert failure due
to the "assert(false)" call.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea f2b304837d drivers: fsl_sai: Allow NULL FIFO watermark
The SAI IP allows setting 0 for the watermark value, in which
case the watermark will be considered 1. As such, since the
driver doesn't subtract 1 from the value passed through
"config->fifoWatermark", we need to allow passing a NULL
watermark to SAI_TxSetFifoConfig()/SAI_RxSetFifoConfig().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea 0e48ec7d67 drivers: fsl_sai: Allow enabling/disabling implicit channel configuration
Currently, SAI_TxSetConfig() and SAI_RxSetConfig() will implicitly
configure the startChannel, channelMask, endChannel, and
channelNums fields from sai_transceiver_t. In some uses cases,
this behaviour may not be wanted as the user may want to set
these fields themselves before calling SAI_TxSetConfig() or
SAI_RxSetConfig(). As such, introduce a new macro which will
allow disabling this behavior.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Laurentiu Mihalcea 8287880d36 devices: MIMX9352: Add new SAI-related FSL_FEATURE_* macros
The Zephyr SAI driver requires the introduction of a couple
of FSL_FEATURE_* macros. As such, this commit introduces
FSL_FEATURE_SAI_{TX/RX}_FIFO_BASEn, which can be used to
retrieve the physical address of a SAI RX/TX FIFO and
FSL_FEATURE_SAI_{TX/RX}_DMA_MUXn, which can be used to
retrieve the DMA MUX value for a SAI RX/TX.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-13 08:42:14 -06:00
Benjamin Perseghetti 2a294b540c s32k344: devices: Fix lpspi by removing errata.
Removes the S32K3X4-0P55A-1P55A-ERRATA by disabling
FSL_FEATURE_LPSPI_HAS_ERRATA_050456. This allows for
lpspi to work correctly on mr_canhubk3.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-12-08 11:50:35 -06:00
Cong Nguyen Huu cbf2cd1f09 s32: drivers: s32ze: Remove 'static inline' keywords from 'Netc_Eth_Ip_MSIX_Rx' function
Netc shim driver uses 'Netc_Eth_Ip_MSIX_Rx' function.
Need to remove 'static inline' keywords from this function
so that it can be used as an extern function outside of the
file declaration.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-12-08 09:08:09 +07:00
Chekhov Ma b4d9e9178e imx93: drivers: add rgpio driver to cmake
Add the option to build fsl_rgpio driver for ZephyrOS.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2023-12-07 12:17:34 -06:00
Jason Yu efc4e8a6a0 mcux: drivers: fsl_rgpio update to v2.1.0
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2023-12-07 12:17:34 -06:00
Manuel Argüelles 1b2f3608ab s32: mcux: s32k146: add support for cache driver
Add definitions to use MCUX SDK cache driver for LMEM controller on
S32K146 devices.

Note that `LMEM_PCCCR_ENWRBUF` is not present on S32K1xx devices so it
is defined to have no effect if used in the cache driver.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-07 19:27:23 +07:00
Laurentiu Mihalcea d0c424e1c6 mcux: README: Update patch list
Update patch list to contain the MIMX8ML8 IRQSTEER-related
changes from mcux-sdk repo.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea 682dc0828b mcux: hal_nxp: Disable implicit IRQ management within IRQSTEER driver
If the Zephyr IRQSTEER driver is used then the implicit
IRQ management operations done through IRQSTEER_Init()/Deinit()
are not necessary. As such, this commit disables the implicit
IRQ management via the FSL_IRQSTEER_ENABLE_MASTER_INT macro.

This commit introduces support for controlling the
FSL_IRQSTEER_ENABLE_MASTER_INT macro via a Zephyr
configuration.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea b4d06dc4aa mcux: hal_nxp: Add option for compiling the IRQSTEER driver
The Zephyr IRQSTEER driver requires the NXP HAL IRQSTEER
driver to also be compiled. As such, add an option inside hal_nxp.cmake
which will compile the NXP HAL IRQSTEER driver if CONFIG_NXP_IRQSTEER
is set to "y".

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea d622620908 devices: MIMX8ML8: fsl_clock: Add missing definitions for IRQ_STEER
This commit adds missing clock-related definitions
required by the IRQSTEER driver to work. This consists
of adding an entry in the IP clocks for the audio processor
IRQ_STEER and defining the IRQSTEER_CLOCKS macro.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea a007ccf746 devices: MIMX8ML8: Add missing FSL_FEATURE_* macros
The IRQSTEER driver requires defining some additional
FSL_FEATURE_* macros. As such, this commit introduces
said macros such that compiling the driver for MIMX8ML8's
DSP core will work.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea 4a78a5fb7d devices: MIMX8ML8: Fix naming inconsistency
The IRQSTEER driver requires the *_CHn_* naming convention
for macros and fields of the IRQSTEER_Type structure. As such,
change MIMX8ML8_dsp header file such that this convention is
followed.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea 56c85e2eb1 drivers: irqsteer: Add function for querying the master interrupts status
This commit adds a new function: IRQSTEER_GetMasterInterruptsStatus()
which can be used to fetch the status of the interrupts aggregated
by a master.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Laurentiu Mihalcea 0f2d98486c MCUXGH-1081[IRQSTEER] Improve for portability
- Improve so that the driver can be easily porting
 to other platforms other than Cortex M.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-04 09:00:00 -06:00
Manuel Argüelles 94f7f1e612 s32: mcux: s32k146: add LPI2C and LPSPI support
Add definitions for LPI2C and LPSPI on S32K146 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-02 10:25:28 +07:00
Cong Nguyen Huu b2e85ddda6 s32: soc: s32z27: netc: remove 'u' suffix from macro
Netc shim driver uses the macro
FEATURE_NETC_ETH_NUMBER_OF_CTRLS with LISTIFY.
Remove 'u' suffix from macro so that it
can be used with LISTIFY.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-11-30 13:06:33 +07:00