Commit graph

79614 commits

Author SHA1 Message Date
Declan Snyder
dc40131a0e tests: uart_async_api: Support RTXXX
Support mimxrt595_evk_cm33 and mimxrt685_evk_cm33
on the uart_async_api test with a board overlay

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder
9640859623 boards: mimxrtXXX: Add UART DMAs
Add DMA phandles to UART nodes in RT 3 digit EVK
dts files now that the UART ASYNC API is supported
in the mcux flexcomm driver.

Also add the DMA phandles to other platforms with
flexcomm uart and lpc dma enabled by default for
compatibility

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder
cf34d2cbdc drivers: uart_mcux_flexcomm: Add ASYNC API
Support ASYNC API on Flexcomm UART

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder
2af408b8fa drivers: dma_mcux_lpc: Fix busy status
Driver should just say the channel is not busy if
it is not setup rather than returning an error.

Also, change the channel index to int8_t rather
than uint32_t since it is being assigned negative
values and that width is more appropriate.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder
e9a8389639 drivers: uart_mcux_flexcomm: Clean up
Clean up slashes in init macro to be less messy

Update copyright to reflect recent code changes by NXP

Update outdated driver description comment

Change irq driven api variables naming to be more specific

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Declan Snyder
4f290e6173 drivers: uart_mcux_flexcomm: Simplify init macros
The flexcomm uart mcux driver init macros have a lot
of unnecessary and confusing redundancy, so let's
simplify them.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-26 13:15:24 -05:00
Fabio Baltieri
c56a3615ee driver: npcx: i2c: set a dedicated priority for the port driver
The NPCX I2C controller has a port-controller hierarchy and the driver
is split in two files, with separate device struct and init functions.

These are currently initialized at the same level and priority, so the
actual order depends on what the linker does.

To avoid relying on the linking order, add a dedicated priority option
for the port that is set to go after the normal I2C one by default.

Found this by building with CONFIG_CHECK_INIT_PRIORITIES.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-26 14:08:12 -04:00
Rajkumar Kanagaraj
138faea796 manifest: TF-M and MbedTLS update
Update manifest to fetch latest TFM and MbedTLS.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Rajkumar Kanagaraj
682dbae203 samples: tfm: Re-commit psa_crypto sample
Adds a refactored version of the psa_crypto sample back,
which was removed as part of the update to TF-M 1.7.0
due to unresolvable (at the time) issues with use of
MbedTLS instances on the S and NS sides.

This sample takes advantage of changes to MbedTLS and
TF-M that were introduced after the TF-M 1.7.0 and MbedTLS
3.3 release, and cherry-picked in Zephyr, allowing for
improved linking of MbedTLS in secure and non-secure
images. PSA API calls on the non-secure side can now be
correctly routed to the secure partition, while X.509
and TLS calls remain on the non-secure/Zephyr side.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Rajkumar Kanagaraj
80a06b2533 modules: mbedtls: build MbedTLS as three libraries
Previously, Zephyr's mbedtls module's cmake build created a single static
library, rather than the collection of libraries (mbedtls, mbedcrypto,
and mbedx509) that upstream mbedTLS cmake provides.

To give better control at link time to choose the required libraries to
link, this commit updates the Zephyr MbedTLS module to also define a
collection of libraries rather than a single static MbedTLS library.

One benefit of the three library approach is that if mbedTLS is used in
Zephyr in the the non-secure application in addition to TFM's PSA Crypto
API on the secure side with TF-M, PSA API calls on the non-secure side
will be redirected to the TFM PSA implementation, and the mbedcrypto
library will only be linked to the secure (TF-M) binary, with the mbedtls
and mbedx509 libraries linked against the non-secure (Zephyr) binary,
enabling TLS calls to PSA crypto to be redirected to mbedcrypto in the
secure partition and avoiding function duplication in the non-secure
binary.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Madhurima Paruchuri
a19d905cc4 USB-C: genVIF: Cleanup and add support to pick static data from input
Removed few VIF properties which are being hardcoded
Updated the script to parse source VIF XML and add information to
the output
Added optional Kconfig option to configure custom source VIF XML path
Cleaned up the code

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-05-26 13:54:43 -04:00
Gregers Gram Rygg
8ea9fcead2 boards: nrf9160dk: Enable external flash switch in board controller
Enable the external_flash_pins_routing switch in the board controller
overlay for nRF9160 DK revision 0.14.0 and newer. This is to match the
behaviour of the factory shipped borad controller on board revisions
that have external flash.

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2023-05-26 13:54:05 -04:00
Gregers Gram Rygg
9751ad7db1 boards: nrf9160dk: Change default revision to 0.14.0
Change the default revision of the nRF9160 DK to 0.14.0 to make it
easier to use external flash.

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2023-05-26 13:54:05 -04:00
Anas Nashif
1cb5933553 tests: ztress: convert to new ztest API
Move to new ztest API.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 13:52:49 -04:00
Maciej Perkowski
1158a70e5f doc: twister: add documentation for pytest plugin
Adding documentation for integration of twister with pytest plugin.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Maciej Perkowski
dc14bdd54f ci: twister: add unit tests for pytest plugin
Adding a stage to twister unit test workflow where tests for
pytest-twister-harness plugin are executed.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Grzegorz Chwierut
23b7f0cdb8 samples: testsuite: exemplary pytest shell test
Adding exemplary pytest shell test to show possibilities of new pytest
plugin. This test uses bidirectional communication between tester and
device under test.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Grzegorz Chwierut
f1f305f4ae scripts: twister: adaptation for pytest plugin
Making the necessary changes to enable the new pytest plugin.
By default Twister should work without the pytest-twister-harness
plugin installed. To achieve this, each time Twister calls pytest,
the PYTHONPATH environment variable is expanded and the
`-p twister_harness.plugin` option is added to the pytest command.

Co-authored-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Piotr Golyzniak
8c4bfcf324 scripts: add pytest plugin
Adding pytest plugin dedicated to running pytest tests in Zephyr
project. This plugin provides a dut fixture which allows to handle
bidirectional communication with the device under test. This version
of plugin can be used for tests dedicated to real hardware, QEMU and
native_posix simulator.

Co-authored-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Co-authored-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Co-authored-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Chad Karaginides
9ab7354a46 arch: arm64: SCR_EL3 EEL2 Enablement
For secure EL2 to be entered the EEL2 bit in SCR_EL3 must be set.  This
should only be set if Zephyr has not been configured for NS mode only,
if the device is currently in secure EL3, and if secure EL2 is supported
via the SEL2 bit in AA64PFRO_EL1.  Added logic to enable EEL2 if all
conditions are met.

Signed-off-by: Chad Karaginides <quic_chadk@quicinc.com>
2023-05-26 13:51:50 -04:00
Dawid Niedzwiecki
53525bb9c5 mgmt: ec_host_cmd: add support for IN_PROGRESS status
The IN_PROGRESS status is a specital status that can be sent during
handling a host command. Synchronous backends don't support it, so
an additional check is required.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-05-26 13:51:30 -04:00
Dawid Niedzwiecki
66d8e27c34 mgmt: ec_host_cmd: add a function to send response
A function to send Host Command response is needed for commands that
that sends IN_PROGRESS status or doesn't return e.g. perform reboot.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-05-26 13:51:30 -04:00
Dawid Niedzwiecki
a2b9c56ee5 mgmt: ec_host_cmd: fix checking usage of handler buffer
The usage of RX handler buffer was checked incorrectly.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-05-26 13:51:30 -04:00
Fabio Baltieri
2ebad47eaa drivers: serial: ite_it8xxx2: add a dedicated priority symbol
The uart_ite_it8xxx2 is relying on a node that depends on a matching
ns16550 symbol, such as:

ite_uart1_wrapper: uartwrapper@f02720 {
        compatible = "ite,it8xxx2-uart";
	...
        uart-dev = <&uart1>;
};

But the two are currently setup to initialize at the same level and
priority. Add a dedicated priority symbol so that the wrapper device is
always initialized after the main one, regardless of the linker order.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-26 13:51:08 -04:00
Hou Zhiqiang
41520e8b5b kernel: mmu: add direct-map support in z_phys_map()
Many RTOS applications assume the virtual and physical address
is 1:1 mapping, so add the 1:1 mapping support in z_phys_map()
to easy adapt these applications.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2023-05-26 13:50:35 -04:00
Yuval Peress
5ab14730f5 sensors: Add async read/decode documentation
Add documentation about the new async read and decode APIs including
some rough examples.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Yuval Peress
3e9b750d85 icm42699: Only clear interrupt status when setting trigger
Always clearing the interrupt status register was causing issues for
the sensor shell when interrupts were enabled but trying to read
one-off samples.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Yuval Peress
ca5bf10143 sensor_shell: Update to new sensor_read API
Update the sensor shell logic to use the new sensor_read() APIs and
make triggers an option of the sensor_shell sample (this avoids the
trigger stealing the interrupt status from one-shot reads).

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Yuval Peress
ed380de152 sensors: Add new async one-shot reading API
Add a new async API based on the RTIO subsystem. This new API allows:
1. Users to create sampling configs (telling the sensor which channels
   they want to sample together).
2. Sample data in an asynchronous manner which provides greater control
   over the data processing priority.
3. Fully backwards compatible API with no driver changes needed for
   functionality (they are needed to improve performance).
4. Helper functions for processing loop.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Yuval Peress
9c624fa9e6 clang-format: flag *_SECTION_FOREACH as for loop
Improve clang-format handling for iterable sections.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Daniel DeGrasse
3c3132b639 boards: arm: mimxrt595_evk_cm33: configure LVGL for improved performance
Configure LVGL to improve performance on the RT595 EVK, with the
following changes:

- Allocate two rendering buffers for LVGL, both the entire size of the
  display
- Force LVGL full refresh bit
- Locate LVGL rendering buffers in external PSRAM (since they will not
  fit on onboard SRAM)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
ac0ae62b58 soc: arm: nxp_imx: add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx
Add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx SOC. These sections
can be used by the user's application as part of a custom linker script,
if the application needs to relocate a buffer to external SRAM connected
to FLEXSPI1 or FLEXSPI2

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
a688fb109d drivers: display: enable direct framebuffer rendering with DCNANO LCDIF
Enable direct framebuffer rendering using DCNANO LCDIF, to improve
performance when the call to display_write is attempting to refresh
the full display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
52b4144145 boards: arm: mimxrt1170_evk: update LVGL settings
Update LVGL settings to optimize RT1170 performance with LCDIF. The
display hardware will perform best when LVGL always uses full refreshes,
as this avoids memory copies required with partial display refreshes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
85a937a59f boards: arm: mimxrt1060_evk: update LVGL config for better performance
Update LVGL settings to improve performance with ELCDIF. This update
requires changes to the LVGL module, to introduce Kconfig settings for
enabling full display refresh, and setting display buffer alignment.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
4ae5edcf84 drivers: display: mcux_elcdif: enable directly writing framebuffer
Enable the ELCDIF driver to directly write the framebuffer using
hardware, when an entire framebuffer update is requested. This will
enable better performance for applications that avoid partial
display updates.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Daniel DeGrasse
1e852d43c5 manifest: update LVGL revision with performance tuning options
Update LVGL revision with performance tuning options, including the
following:
- Enable forcing LVGL to perform a full display refresh on every update
- Enable custom alignment and linker section location of LVGL
  framebuffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Marek Matej
92b7d37397 arch: riscv: Fix bogus condition
Remove double preprocessor condition.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-05-26 10:36:15 -04:00
Anisetti Avinash Krishna
5925a4670b drivers: dma: dma_intel_lpss: Added intel LPSS DMA interface
Added intel LPSS DMA interface using dw common to support
usage of internal DMA in LPSS UART, SPI and I2C for
transfer and receive operations.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-05-26 10:06:00 -04:00
Anisetti Avinash Krishna
c828e8cd02 drivers: dma: dma_dw_common: Added 64bit address transfer
Added support for 64bit address source and destination
usage for dw common.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-05-26 10:06:00 -04:00
Anisetti Avinash Krishna
54ecda63cf drivers: dma: dma_dw_common: Added missing break in switch
Added a break and corrected wrong usage of source
instead of destination.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-05-26 10:06:00 -04:00
Tom Burdick
137c44118e tests: dma: Update LLI pool size for sg test
The scatter gather test now does a transfer list of 4 and the LLI pool
config needs to be updated to match the new test requirement.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
b406ec9133 tests: dma: Enable scatter_gather test on RT595 EVK
Enable scatter gather test on NXP RT595 EVK

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
4dd6331a9b tests: dma: Enable scatter_gather test on RT685 EVK
Enable scatter gather test on NXP RT685 EVK

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
625232b2c6 tests: dma: Increase data transferred in loop_transfer test
Increase the amount of data to be transferred.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
8eeb3554b0 tests: dma: Increase data transferred in scatter_gather test
Increase the amount of data to be transferred and the
number of blocks to transfer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
846fdd8330 boards: nxp: Update the boards using NXP LPC DMA
Switched dma_mcux_lpc DMA driver to use K_HEAP_DEFINE

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
0260d6daa4 drivers: mcux_i2s: Use the DMA reload flag
Use the DMA reload flag to indicate we wish to use
a circular chain of DMA descriptors to reload DMA
receive buffers.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
b8c21a6d88 drivers: dma_mcux: Add support for big data transfers
1. Transfers are not limited by XFERCOUNT transfer length of
   LPC DMA descriptor. Added code to handle block sizes
   greater than XFERCOUNT.
2. Use the reload_en flag to decide if we should setup
   a circular descriptor chain.
3. Improve handling of source and destination width.
4. Number of DMA descriptors are defined by a Kconfig value.
5. Changed the dma_reload function to handle transfers
   greater than XFERCOUNT.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00
Mahesh Mahadevan
723224f086 drivers: dma_mcux: Rename variables in NXP MCUX driver
Rename the variables to help understand the code flow.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 10:05:24 -04:00