Commit graph

19844 commits

Author SHA1 Message Date
Yassine El Aissaoui
c002e7880a drivers: bt_nxp: delete non monolithic support
Current code does no longer support
the non monolithic feature.
Hence, removing unnecessary code.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-18 17:45:07 +01:00
Emilio Benavente
9d5cceb166 boards: nxp: frdm_mcxn947: Enabled MRT
Enabled the MRT at the board level for
mcxn947. Enabled the clocking for the MRT
in the clock control.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-18 17:44:48 +01:00
Vivekananda Uppunda
da0c30d52a drivers: wifi: nrfwifi: Add promiscuous mode support functions
This adds promiscuous mode support functions into build for filter
operation when the configuration CONFIG_NRF70_PROMISC_DATA_RX
is enabled.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-10-18 08:31:50 -04:00
Vivekananda Uppunda
c9b56de040 drivers: wifi: nrfwifi: Promiscuous mode filtering support in driver
This set of changes brings in promiscuous mode filtering support in
driver. Since, firmware would be unable to filter packets due to
connection issues, the filtering support for promiscuous mode is
moved to the driver.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-10-18 08:31:50 -04:00
Michał Stasiak
f8466b4791 drivers: audio: dmic: Add support for multiple nrf PDM instances
Driver now uses multi-instance PDM nrfx API and
defines PDM device based on available instances.
It also introduces calculating PDM frequency using
prescaler, present on nRF54L15 FP1.
Updated nrfx API version changed to 3.7 to use the
new PDM API.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Nikodem Kastelik
7048e0bec3 drivers: retained_mem: nrf: align dependencies to nrf54h20
nRF54H20 cpuapp and cpurad are now compatible with retained_mem,
so explicit list of supported devices can be removed.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-18 08:17:53 -04:00
Laurentiu Mihalcea
e2872c002a drivers: intc: irqstr: initialize 'enabled' variable
Initialize the 'enabled' variable before using it.
This fixes the following compilation warning:

"warning: 'enabled' may be used uninitialized [-Wmaybe-uninitialized]"

issued when compiling with `CONFIG_DEBUG` enabled.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-10-18 14:16:21 +02:00
Sadik Ozer
3c4f819c02 drivers: w1: Add MAX32xxx 1-Wire driver
Added 1-Wire master driver for MAX32xxx MCUs

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Ha Duong Quang
12bb3fb9b1 soc: nxp: s32ze: add support eDMA3 for S32Z270
Enable support EDMA for S32Z270.
Add eDMA3 instance 0, 1, 4 and 5 for S32Z270 devices.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-10-18 14:16:05 +02:00
Ha Duong Quang
a685d1143d drivers: dma: support multiple instances
Support multiple instances for dma.

Memset struct data and tcdpool on initialization is not necessary.
Therefore remove it.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-10-18 14:16:05 +02:00
Georgij Cernysiov
daf116a73d drivers: ethernet: adin2111: minor corrections of is_adin2111
* Make `is_adin2111` a const.
* Check `is_adin2111` before processing port 2 related events.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Georgij Cernysiov
fd9a947311 drivers: ethernet: adin2111: add is_adin2111 check for oa port 2
Skip RX check for port 2 in the OA path for ADIN1110.
As the 2nd port doesn't exist.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Georgij Cernysiov
32cf1f7df2 drivers: ethernet: adin2111: oa: fix thread termination
If OA read fails, then the essential thread is terminated.
Correct the behavior so that the driver re-tries the read and
continues to work.

Refactor offload thread OA and Generic SPI parts into
if/else statement.

Add missing `is_adin2111` to OA port 2 RX status check.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Tobias Pisani
3253d333e1 drivers: display: Add ssd1322 driver
Initial support for SSD1322 OLED display driver. Only 1 bit color mode is
supported.

Most options map directly to values documented in the datasheet,
except segments-per-pixel, which I had to add to support the Newhaven
NHD-2.7-12864WDW3. This is a slightly odd feature, but in practice
it is a lot nicer to support it in the driver, and since we're currently
remapping pixels anyway, it makes sense to implement here.

This driver also has a configurable buffer size for the pixel conversion.
By using a larger buffer, we can potentially use DMA for the SPI transfer.
The default is set to 8, which is the smallest value that supports
segments-per-pixel = 2

Initial driver implementation by Lukasz Hawrylko <lukasz@hawrylko.pl>.
Additional options and configurability by Tobias Pisani <mail@topisani.dev>

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
Signed-off-by: Tobias Pisani <mail@topisani.dev>

Co-authored-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
Co-authored-by: Tobias Pisani <mail@topisani.dev>
2024-10-18 09:18:21 +02:00
Daniel Gaston Ochoa
f05fb41587 drivers: spi: stm32h7: Avoid unnecessary FIFO flush
The RxFIFO is already flushed any time a transceive operation
finishes, there is no need for doing it also before the
transaction start.

The aim of this change is to simplify the logic and to
(potentially) reduce the minimum time between transactions.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-10-18 09:17:46 +02:00
Andrzej Głąbek
f629f1e287 drivers: clock_control_nrf2_hsfll: Fix checking if DVFS is available
To check if DVFS can be used, the CONFIG_NRFS_DVFS_LOCAL_DOMAIN symbol
needs to be used, not CONFIG_NRFS_HAS_DVFS_SERVICE which only indicates
that DVFS is technically possible, not that its local domain part is
actually included in the build.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-10-17 15:49:38 -04:00
Javier Santos
a70eaa5c4a drivers: sensor: npm1300: Added charging support without NTC
Current nPM1300 charger driver does not work with batteries
without NTC thermistor. Added supported for this feature.

Signed-off-by: Javier Santos <jasr93@outlook.es>
2024-10-17 15:39:28 -04:00
Tomáš Juřena
3602342611 drivers: sensor: ti: ina230: Add support for INA236
This commit adds support for INA236 into the existing INA230 driver.
These two chips are similar enough to share most of the code.
The device can be defined the same way as INA230 and we only have
the extra option to select the high-precision mode.

```
ina236: ina236@40 {
		status = "okay";
		compatible = "ti,ina236", "ti,ina230";
		reg = <0x40>;
		adc-mode = "Bus and shunt voltage continuous";
		vbus-conversion-time-us = <1100>;
		vshunt-conversion-time-us = <1100>;
		avg-count = <1>;
		current-lsb-microamps = <1000>;
		rshunt-micro-ohms = <15000>;
		alert-gpios = <&gpiod 0 GPIO_ACTIVE_LOW>;
		high-precision;
	};
```

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-10-17 15:39:18 -04:00
Jordan Yates
8f4cf7f6af sensor: voltage_divider: delay sampling after power-on
Enforce some minimum delay between enabling the voltage divider with a
GPIO and sampling the analog voltage. Without this delay the ADC can
easily sample the transient power up curve instead of the steady state
output.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 15:38:52 -04:00
Benedikt Schmidt
acbc14e767 drivers: gpio: implement parallel mode in TLE9104
Implement the parallel mode in the powertrain switch TLE9104.
This allows that OUT1 and OUT2 are controlled together, as well
as OUT3 and OUT4.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-10-17 15:38:45 -04:00
Florian Weber
0d9cdf0990 drivers: sensors: rtio
Inform the executor of a submissions completion with -ENOMEM
if the size of the workq is not big enough.

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2024-10-17 15:37:49 -04:00
Mathieu Choplain
6fd1a19868 drivers: i2c: stm32: add support for STM32WB0
Select COMBINED_INTERRUPT mode of operation for STM32WB0 to match the
hardware and allow the driver to build - no other modification required.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-17 10:49:34 -04:00
Laurentiu Mihalcea
d3aa170963 drivers: dai: sai: support pm runtime operations
Add support for PM runtime operations.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-17 10:48:38 -04:00
Laurentiu Mihalcea
3fbb7f4403 clock_control: mcux_ccm: add sai clocks
Add support for gating/ungating SAI clocks for imx8qm and
imx8qxp.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-17 10:48:38 -04:00
Krzysztof Chruściński
7ea87f4de9 drivers: misc: coresight: nrf_etr: Add support for shell
Extend ETR handler to be able to work as shell backend and multiplex
Coresight STM logging with shell content on the UART used by the
ETR handler. Shell backend works only in the standalone mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
fe6c288b1b drivers: misc: coresight: nrf_etr: Use dmm API for the buffer declaration
Use DMM_MEMORY_SECTION instead of a custom macro. When file was created
dmm was not present yet.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Yong Cong Sin
b9df2bed64 drivers: uart: ns16550: add support for Synopsys DesignWare 8250
Extended functionality of the current driver to support
Synopsys DesignWare 8250 UART.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
Yong Cong Sin
b0a872c908 drivers: uart: ns16550: refactor read into a function
Refactor the char read into a function, check for availability
before reading.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
Yong Cong Sin
1d571fff4c drivers: serial: ns16550: rename config to uart_ns16550_dev_config
Rename `uart_ns16550_device_config` to `uart_ns16550_dev_config` so
that it looks consistent with the device data structure.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
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
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
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
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
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
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
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
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
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