Commit graph

103851 commits

Author SHA1 Message Date
Krzysztof Chruściński
1f96e62397 drivers: serial: nrfx_uarte: Add support for frame timeout
Frame timeout is a hardware feature present in newer versions
of UARTE (e.g. in NRF54X platforms) for detecting idle state
on RX line and ending RX after configurable timeout.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Krzysztof Chruściński
399a235653 drivers: serial: nrfx_uarte: Rework driver to support new features
Rework driver to support new way of asynchronous RX handling.
Previously RX was handled in two modes: using RXDRDY interrupt for byte
counting or TIMER + PPI. Both modes had flaws. RXDRDY interrupt mode
could miscalculated amount of received bytes when interrupt was not
handled on time. Data was not lost but was not reported on time that
could lead to issues. PPI+TIMER mode requires additional resources
thus it was not the default mode. Often user was not aware of that
option and was expiriencing driver RX faults.

New RX mode is switching buffers when there is new data (RXDRDY event
not set for given amount of time). It does not require additional
resources to get precise byte counting. Additionally, this is in line
with new UARTE feature (RX frame timeout) which is present in nRF54X
devices. The behavior of the driver is the same for legacy devices
and new one. For legacy devices k_timer periodic interrupts are used
to check if there are any new bytes and it is not needed when RX frame
timeout is present.

Improved RX mode is enabled by default
(CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) but legacy modes are still
available though not recommended to be used.

Note that new RX mode (CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) behaves
a bit different because timeout always triggers switch of buffers
which means that there will be no UART_RX_RDY events with non-zero
offset. It also means that every UART_RX_RDY will be followed by
UART_RX_BUF_RELEASED.

After rework, driver is recommended to be used for all platforms as it
performs much better and takes much less code than the second UART shim
available for Nordic devices.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Krzysztof Chruściński
d82808ea9b drivers: serial: nrfx_uarte: Refactor to use RX async struct pointer
Refactor RX asynchronous API function to use a pointer to the RX
async data structure instead of top level data structure pointer.
It improves readability with more concise code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Hake Huang
96aef721eb boards: da14695_dk_usb: remove the arduino_gpio support
da14695_dk_usb use mikro-bus interface not arduino

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
d323137a6c boards: lpcxpresso55s69: add arduino_gpio support
add arduino_gpio support to lpcxpresso55s69

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
bdc15f10e1 boards: lpcxpresso55s28: add arduino_gpio support
add arduino_apio support to lpcxpresso55s28

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
2850841106 test: gpio: gpio_basic_api: enhance the gpio test
1. add delay read config for platforms that has capacitor with pin
2. add dts pin flags to gpio_pin_config when output.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
43425014c6 tests: gpio: gpio_basic_api split input and ouput
input and output shall be split and configure by dts

fixes: #78381

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
999e31e26f tests: gpio: gpio_basic_api: update customerized board list
update boards that can not use the common pins
mimxrt102x reuse with ethernet
mimxrt106x has external pull up
lpcxpresso55s3x reuse with int

add CONFIG_SKIP_PULL_TEST by default to be more general
user can enable this test in customized case with select pin

ST prefer to using D9 D10 pair to testing.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
2d0e6d7fbe boards: lpcxpresso55s36 : add arduino_gpio
add arduino_gpio in support list

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Lukas Gehreke
4c0317fa47 drivers: usb_dc_rpi_pico: Implemented vbus detection handling
As per USB 2.0 specification 7.1.5.1: The voltage source on the pull-up
resistor must be derived from or controlled by the power supplied on the
USB cable such that when VBUS is removed, the pull-up resistor does not
supply current on the data line to which it is attached.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-10-17 10:47:15 -04:00
Dmitrii Golovanov
e528d53a7a ci: footprint: Add data transform and upload to ELK
Extend `footprint-tracking` CI workflow with two more steps:

 * pack Memory Footprint data produced by `track.py` script
   into Twister JSON footprint reports (`twister-footprint.json).

 * upload Twister JSON footprint reports into ElasticSearch storage.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-17 10:47:01 -04:00
Daniel DeGrasse
99368df6a8 samples: tracing: add usage example for sys_trace_user_event
Add usage example for sys_trace_user_event, to demonstrate how users
could add tracing functionality to their application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Daniel DeGrasse
87180f40ac doc: services: document sys_trace_user_event
Document availability of sys_trace_user_event, for users who are trying
to add custom trace events to their application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Daniel DeGrasse
66577a9d23 tracing: add named event trace
Add support for a "named event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Anas Nashif
6f937c9cea Revert "tests: posix: net: fix missing clock_t and clockid_t with newlib"
This reverts commit 45b3010d74.

Issue introduced in #79884.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-17 06:51:02 -04:00
Daniel Kampert
9d0486e3ee drivers: sensor: Add support for Broadcom APDS-9306
- Add Broadcom / Avago APDS-9306 ambient light sensor driver

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-10-17 09:46:53 +02:00
Jordan Yates
5d3d78e9cb sensor: bmm150: support power domains
Support the BMM150 being on a power domain, which may not be powered at
boot. For example, Nordic Thingy53.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:46 +02:00
Juliane Schulze
38ee9aa17b vcnl36825t: additional delay after wakeup on "force"-mode
There is an (undocumented) additional delay necessary if the device woke
up and a measurement is triggered via the "force"-mode. The additional
sleep time was determined empirically on different devices.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-10-17 09:46:38 +02:00
Krystof Sadlik
3978693d47 samples: sensor: added general samples for triggers
Added samples that show off trigger functionality, removed fxos8700 driver
specific sample

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-10-17 09:46:32 +02:00
Jordan Yates
5eb5f3d6a5 sensor: bme280: only configure mode on PM suspend/resume
Update power management to only start/stop periodic measurements in
`CONFIG_BME280_MODE_NORMAL`, instead of re-initialising the chip
completely.

In `CONFIG_BME280_MODE_FORCED`, there is nothing to do when suspending,
as the sensor is already in its lowest power mode.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Jordan Yates
ecfb4c7628 sensor: bme280: check status before sleeping
Check the status register immediately, instead of waiting 3ms for the
first check.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Jordan Yates
22c2fe52dc sensor: bme280: name for mode choice
Add a name for the mode choice symbol to enable other Kconfig files
to change the default.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Lukasz Mrugala
82548410bd scripts: twister: NOTRUN status
Adds a new NOTRUN status, which indicates
that a test was successfully built, but
not run on account of being not
runnable in given test instance.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-17 09:46:17 +02:00
Niklas Gürtler
50dbd8ba5a modem_cellular: Add support for the Telit ME310G1 LTE modem
Add support for the Telit ME310G1 LTE modem which is very similar to
the ME910G1. Re-use the ME910G1's AT command scripts but rename
them to mex10_xx and define a shutdown script (AT#SHDN).

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Niklas Gürtler
bfeb8c807a dts: bindings: Add binding for Telit ME310G1
Add a DTS binding file for Telit ME310G1 cellular modem based
on the binding for ME910G1 but without the mdm-reset-gpios as
the ME310 doesn't have a reset input.

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Niklas Gürtler
93330b07f2 modem_cellular: Add support to define a shutdown script for cellular modems
Add support to define a shutdown script for cellular modems, i.e.
AT commands to shutdown the modem. This allows to shutdown the
modem much quicker compared to using a power pulse which saves power.

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Rex Chen
193023b075 net: wifi: shell: update enterprise mode certificate files
Update enterprise mode certificate files to support phase1 and
phase2.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-17 09:46:02 +02:00
Rex Chen
be151908d8 net: wifi: shell: add enterprise support for station
Add EAP-TLS, EAP-PEAP-MSCHAPv2, EAP-PEAP-GTC, EAP-TTLS-MSCHAPv2,
EAP-PEAP-TLS, EAP-TLS-SHA256  enterprise wpa2 and wpa3 suiteb
support for station.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-17 09:46:02 +02:00
Reto Schneider
7dbcf65562 tests: drivers: dma: Enable for board sgrm
This allows to run the test 'chan_blen_transfer' and 'loop_transfer' on
the sgrm board.

The functionality tested in `chan_link_transfer` and `scatter_gather` is
not (yet) supported by the Si32 DMA driver, and those tests therefore
not enabled.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-17 09:45:54 +02:00
Reto Schneider
6c78a776a5 MAINTAINERS: Add Gardena maintainer and collaborators
Adding myself as maintainer because my employer Husqvarna wants to
upstream the Gardena smart gateway radio module SoM to Zephyr, and keep
it well-supported.

Adding as collaborator M1cha, because he did the initial port.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-17 09:45:54 +02:00
Michael Zimmermann
bd4212e458 boards: gardena: Add smart garden radio module
This adds support for the SiM3U/Si4467 based SoM used on the GARDENA
smart Gateway [1] (art. no 19000 and 19005).

[1] https://github.com/husqvarnagroup/smart-garden-gateway-public

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-10-17 09:45:54 +02:00
Yassine El Aissaoui
9cc3364d3c boards: frdm_mcxw71: Add BLE info to doc + Enable second UART instance
- Add second UART needed for bt_tester app.
- Update doc with BLE info

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Yassine El Aissaoui
ad8b62413d soc: MCXW71: Add BLE support
- Add IMU regions
- Add HCI definition
- Add config when BT is enabled

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Yassine El Aissaoui
89709ee382 drivers: hci: Update NXP HCI driver
Add updates to support MCXW71
Add support if RX data are received in ISR context
Add support to set BT address using Vendor command

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Chaitanya Tata
9eedb6d7c8 drivers: nrfwifi: Fix build error
This crept-in due to bad merge conflict resolution.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
c08b846b47 samples: net: wifi: Enable nRF70 Util in nRF70 build
This ensures we catch basic issues in nRF70 util, which is handy in
debugging.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
cd736558ef drivers: nrfwifi: Fix build errors when Util is enabled
This path is disabled by default.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida
0ce5da6da8 wifi_mgmt: Add support for configuring PS exit strategy
If AP indicates the presence of buffered traffic, then it is up to the
STA to decide whether to stay in PS or come out of PS, add configuration
options that can be used at runtime to choose this.

This is tagged as "noup" because it's a backport and "fromlist" cannot
be used as it won't apply cleanly.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
d30161cd8b drivers: wifi: Fix mutex re-initialization
The mutex is used to protect RPU zephyr context which gets modified for
every interface down and up (including recovery), so, it was being
re-initialized but also used to protect down and up which is a bug.

Move the re-initialization to the driver entry so that it happens only
once and we can properly use the mutext for down and up protection.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ce9d71c476 drivers: wifi: Fix missing unlock for stats
The RPU context lock is not unlocked this is causing recovery to be
stuck waiting for the lock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
67216f1b5a drivers: wifi: Fix crash when recovery is triggered
There is a race condition when recovery is in progress and in parallel
Wi-Fi util commands are being executed (CTF), where the RPU context is
de-initialized as part of recovery but no checks are present in the
Wi-Fi util command processing causing a crash.

This needs a proper fix for all commands, but for maintenance branch
fix is added only for commonly used commands.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida
fe920fc9c9 drivers: wifi: Add PS exit strategy runtime configuration
Dynamically set power save exit strategy runtime configuration that
allows to switch b/w stratgies depending on conserving power and
low-latency traffic download.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
d0d659b675 drivers: wifi: Use mutex for spinlock
Ideally we should be using Zephyr spinlock APIs but that requires
changes to shim API, so, for this maintenance release just replace with
mutex to keep the context same and no API changes.

This solves the locking issue that we see when control and data path are
excited concurrently due to locking semantics of semaphores, the issue
is not root caused but mutex enforce strict locking semantics for
multiple threads and solve the issue.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
5f6dca377a drivers: wifi: Fix shell hang
Add a null check for HAL context in the interrupt handler, this was
causing locking issue operating on null. The root cause of null is not
known, but this solves the locking issue when data and control paths are
excited in parallel.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
7c3d342796 drivers: wifi: Add support for keepalive
To handle interoperability issue with few APs, add a feature to keep
sending keepalive frames periodically to avoid AP disconnecting the STA.

This is disabled by default to avoid unnecessary power consumption as
it's only seen with few old APs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
94f9fb95d9 drivers: wifi: Increase default PS active timeout interval
In crowded environments RPU is active for more than 10s due to too many
retries and this triggers a false RPU recovery. To avoid this, increase
the default to 50s to handle corner cases, as this will only impact the
recovery triggered case, higher timeout doesn't have any impact in
normal cases.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
dbda09d3e5 drivers: wifi: Enable management buffers offload
With this offload, host doesn't need to manage RX buffers for management
frames, and this saves Host-RPU comms and thus giving RPU to sleep more
often and is essential to test RPU recovery.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
a4537a7eea drivers: wifi: Add PS state debugs
These are very frequent, so, a separate debug is added for debugging
host RPU recovery logic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
9c36d97646 drivers: wifi: Fix TX buffers leak
During interface down in case TX has pending buffers in either TXQ or
Pending_Q then they are not freed instead the Q itself is freed.

Fix by traversing the Q and freeing all members.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00