Commit graph

23353 commits

Author SHA1 Message Date
David Missael Maciel
cc1266ad6a drivers: memc: add memc_mcux_flexspi_aps6404l driver
Add driver for aps6404l PSRAM, using FlexSPI MEMC driver interface.

Signed-off-by: David Missael Maciel <davidmissael.maciel@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
e8d9dec141 drivers: memc: memc_mcux_flexspi: allow setting ahb alignment boundary
Some instances of the FLEXSPI IP permit limiting AHB bus access so that
no memory access requests will straddle a page boundary. Add a property
to manage this setting.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
df18121526 drivers: memc_mcux_flexspi_is66wvq8m4: make addressShift unconditional
is66wvq8m4 PSRAM always requires the address to be left shifted by
5 bits, regardless of which FLEXSPI port it is on. Fix the addressShift
assignment to be unconditional

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
5b4e4cfb04 drivers: memc_mcux_flexspi: remove addr adjustment based on ADDRSHIFT
The ADDRSHIFT bit simply left shifts the address written to IPCR0[SFAR],
(or the address used for AHB access), by 5 bits before sending it to the
attached memory. This bit does not have an effect on the base address
used to access the flash/psram device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Tom Burdick
24762115d4 i2c: Fix default RTIO handler transactions
Transactions from RTIO should result in single calls to i2c_transfer.
This corrects the default handler to first count the number of
submissions in the transaction, allocate on the stack, and then copy
over each submission to an equivalent i2c_msg.

It also cleans up the helper functions to be infallible, taking only the
submission and msg to copy to.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-10-22 18:29:34 -04:00
Tom Burdick
fab01c0c44 i2c: Drop TXRX from default RTIO handler
TXRX is meant specifically to handle a full duplex bus like SPI, I2C is
half duplex meaning only read or write can be performed at once.

Drop TXRX as a supported operation code for the default I2C submission
path.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-10-22 18:29:34 -04:00
Dimitrije Lilic
86ed9811c4 drivers: sensor: adxl345: Updated ADXL345 drv RTIO stream & Trigger func
Updated ADXL345 driver with RTIO stream functionality.
Added Trigger intterupt functionality. RTIO stream is using
FIFO threshold.Together with RTIO stream, RTIO async read
is also implemented.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-22 18:29:22 -04:00
Dimitrije Lilic
15ec1f2016 driver: spi: MAX32 add RTIO support plus refactor
Implements the SPIO RTIO API. Refactors internal transcive
fucntios to work with both existing SPI API and RTIO functions.

When SPI_RTIO is enabled the spi_transcieve call translates
the request into an RTIO transaction placed in the queue
that device will execute.

Include the latest refacor changes of RTIO.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-22 20:42:20 +02:00
TOKITA Hiroshi
96a17e2a0f drivers: ethernet: Add dummy driver for vnd,ethernet
Add dummy driver for "vnd,ethernet" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-22 20:42:05 +02:00
Jerzy Kasenberg
d5a008dd3b drivers: usb: udc: add Smartbond UDC driver
Code adds Smartbond UDC driver to be used with
USB next stack.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-10-22 20:41:55 +02:00
Jerzy Kasenberg
0575c1a976 drivers: dma: smartbond: Fix power policy handling
Function dma_smartbond_set_channel_status() used incorrect
condition to release state lock.
In initialization function dma_smartbond_init() function
dma_smartbond_set_channel_status() was called for each DMA
channel and tried to release lock that was never taken.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-10-22 20:41:55 +02:00
Luis Ubieda
ca822d4e4b sensor: lm77: Add LM77 config as a subset of the main symbol
Following pattern used in other Kconfigs. This also addresses the CI
failure on previous run.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 20:41:43 +02:00
Luis Ubieda
d557ee36d5 sensor: tree-wide: Enforce dependency of int-gpios with Trigger feature
We need int-gpios defined to use trigger functionality. Enforced with
the Kconfig parameter.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 20:41:43 +02:00
Scott Worley
62d7db4d4d drivers: timer: mec5: Driver using Microchip RTOS timer as kernel tick
Timer driver using Microchip 32KHz based RTOS timer as the kernel
timer tick. The driver uses one of the 32-bit basic timers to
support the kernel's k_busy_wait API which is passed a wait
count in 1 us units. The 32-bit basic timer is selected by using
device tree chosen rtimer-busy-wait-timer set to the handle
of the desired 32-bit basic timer. If this driver is disabled,
the build system will select the ARM Cortex-M4 SysTick as the
kernel timer tick driver. The user should specify RTOS timer
as kernel tick by adding the compatible properity and setting
the status property to "okay" at the board or application level
device tree. The driver implements two internal API's for use
by the SoC PM. These two API's allow the SoC PM layer to disable
the timer used for k_busy_wait so the PLL can be disabled in
deep sleep. We used a custom API so we can disable this timer
in the deep sleep path when we know k_busy_wait will not be
called by other drivers or applications.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-10-22 20:41:32 +02:00
Aksel Skauge Mellbye
cfccd11026 drivers: timer: gecko: Remove clock configuration
Clock setup is now done by the clock manager based
on device tree configuration.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Hao Luo
8b107ab5f1 drivers: i2c: add bus recovery
Added bus recovery support for ambiq i2c

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-22 20:40:29 +02:00
Kapil Bhatt
0b11b39461 drivers: wifi: Add Kconfig option for passive scan
Add kconfig option for forced passive scan, It will use for
only scan only mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-22 20:40:01 +02:00
Mert Vatansever
d1678a51de drivers: flash: Add MAX32xxx flash driver
Support flash read, write, erase features.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Michal Simek
7c809b9945 serial: xilinx: uartlite: switch to DT_INST_IRQN_BY_IDX
Use DT_*IRQN helper to get the IRQ number on systems with multi-level
interrupt configuration instead of IRQ number on particular interrupt
controller.

Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-10-22 20:39:12 +02:00
Chaitanya Tata
f7ef64df28 drivers: nrfwifi: Allow scan-only for all platforms
Though nRF7000 is a special Scan only chipset, scan only can work with
any nRF70 platforms, no need for this enforcement and we can keep things
flexible.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-22 20:38:48 +02:00
Hao Luo
a1cd2d6c83 drivers: pm: add pm_policy_state_lock for drivers
Added pm_policy_state_lock to prevent memory power
off during data transfer

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-22 14:14:34 +02:00
Declan Snyder
41580bdc07 drivers: i2s_mcux_sai: Clang format
Clang format to fix strange formatting, shortens the line count by 100

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-22 14:13:59 +02:00
Andrzej Kuros
30c449d9e6 drivers: ieee802154_nrf5: support IEEE802154_SELECTIVE_TXCHANNEL
The ieee802154_nrf5 supports the IEEE802154_SELECTIVE_TXCHANNEL
Kconfig option and advertises the IEEE802154_HW_SELECTIVE_TXCHANNEL
capability.
The ieee802154_nrf5 driver now allows to schedule timed transmission
requests with selective tx channel, that is set at the latest
possible moment. This improves reception performance when the
timed transmissions are requested.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-10-22 14:04:33 +02:00
Andrzej Kuros
2fbba82591 drivers: ieee802154: add Kconfig IEEE802154_SELECTIVE_TXCHANNEL
The Kconfig `IEEE802154_SELECTIVE_TXCHANNEL` is added along with
the new capability `IEEE802154_HW_SELECTIVE_TXCHANNEL`.
The new capability of the ieee802154 drivers allows to schedule
CSL transmissions as stated in IEEE 802.15.4-2020 chapter 6.12.2.7
CSL over multiple channels. The benefit of the new API is that
additional call to `ieee802154_radio_api::set_channel()` is not
required. The drivers will switch to the new channel as late as
possible for CSL transmissions thus will not interrupt any reception
that might be in progress until the very late moment when the
transmission actually starts.
This improves reception performance when CSL transmissions are used.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-10-22 14:04:33 +02:00
Wajdi ELMuhtadi
fb45c6d93a drivers: sensor: wsen_hids_2525020210002: add sensor driver
Add wsen_hids_2525020210002 driver with
the corrected name and compatibility with
the hal update as well as added new features.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-22 14:03:08 +02:00
Vladislav Pejic
6d8ace9198 drivers: sensor: adxl362: Added RTIO stream
Updated ADXL362 driver with RTIO stream functionality.
RTIO stream is using both FIFO threshold and FIFO full triggers.
Together with RTIO stream, RTIO async read is also implemented.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-22 14:02:21 +02:00
Ren Chen
ea4f1b758c udc: it82xx2: emit SOF event
This commit emits SOF event.

Fixes: #76225

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
b61111a41a udc: it82xx2: enable RESUME interrupt
This commit enables RESUME interrupt mask.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
8bf7c1aa28 udc: it82xx2: clear the data seq bit when enabling non-ctrl IN endpint
This commit clears the data sequence bit when enabling non-control IN
endpoint.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
bbb2f9437d udc: it82xx2: correct the handling of the out endpoint
There is an issue where OUT data is not handled correctly when the
toatl length exceeds the MPS. This update fixes the control handling
for the OUT endpoint.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
1afe9e16a5 udc: it82xx2: fix issue with the unexpected setting of the ready bit
The ready bit is automatically cleared by hardware. When setting other
bits, there is a chance that the ready bit hasn't been cleared yet,
leading to unexpected USB transactions. This commit addresses this
isuue and locks irq for critical section to prevent racing condition.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
e64e189e61 udc: it82xx2: fix the fifo control issue
The IT82xx2 chip has three FIFOs shared across endpoint 1 to 15, and
the FIFO control register is configured based on the active endpoints.
However, there are some issues with FIFO control.

Firstly, when a TRANS_DONE interrupt occurs, the completion of the
transaction should be determined by the ready and enable bits of the
corresponding endpoint. Additionally, only one non-control IN endpoint
can access the IN FIFO at a time. The FIFO control register is selected
before writing data and cleared after the IN transaction is completed.

For OUT endpoints, all endpoint bits must be selected in the OUT FIFO
control register when the endpoint is enabled. This can result in fake
OUT tokens being detected if an interrupt is triggered by another FIFO.
To prevent this, an atomic out_fifo_state variable has been introduced
to handle the detection of fake OUT tokens.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Chris Ruehl
a3f863e3f1 Drivers: Sensors: Bosch bmp390 merge into bmp388
Add support for Bosch bmp390 sensor, the drop in replacement for the
bmp388 with same register but different chip-id. This patch make use
of "bosch_bmp390" or "bosch_bmp388" and set the specific chip-id in a
data->chip-id variable, which then used to check against the register
value.

Additional, manual shift operation had been replaced with ENDIAN safe
macros and calibration values with target variable of int16_t add a
cast for it.

bmp388_spi: read register implementation wrong, fixed it.
tx-buffer must be <addr><dummy><dummy> in order to receive the
register value. Read registers in burst mode and have rx and tx
buffer same spi_buf to avoid clock stop and delay with nrf5.

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-10-22 13:58:33 +02:00
Stefan Schwendeler
8786436909 drivers: sensor: ntc_thermistor: adds support for VDD based ADC reference
The NTC thermistor implementation assumes a constant pull-up voltage
and that the ADC channel is measured against a reference voltage so that
the absolute voltage across the NTC can be calculated. Based on the
relationship of `pullup-uv` and this absolute NTC voltage, the resistance
of the NTC is calculated.

There are applications where the "pullup-uv" is not constant, but VDD.
Most ADCs support relative measurements against VDD. If `pullup-uv` is not
defined, the implementation assumes now that the ADC channel is configured
to use VDD as a reference and therefore no millivolt conversion is
required.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-10-22 13:56:54 +02:00
Henrik Brix Andersen
185432c96d drivers: can: select CONFIG_PINCTRL where needed
Select CONFIG_PINCTRL for all CAN controllers drivers using pinctrl.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-21 18:54:27 -05:00
Ryan McClelland
42da6c9c82 drivers: i3c: shell: fix argc count for setmrl
There is the wrong argc count for the max ibi len for setmrl.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
f9ba776fb4 drivers: i3c: shell: fix typos for enec/disec/rstact errors
Fix typos for enec/disec/rstact typos.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
f17b15525b drivers: i3c: shell: fix kconfig def for ibi
Fix kconfig def for ibi where it is missing the CONFIG_.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
434bed5c6f drivers: i3c: shell: fix reference on pointer arg for null check
A reference was missing for checking for null on devices.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
0068b61672 drivers: i3c: shell: fixup typos
There were some copy and paste errors that were easily missed where the
wrong print out would happen of an argument with `info` and an extra
autocompelete would happen with the `speed` command.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Chaitanya Tata
9a9f8998f9 drivers: nrfwifi: Remove non-existing member
Opriv was removed but the doxygen doc string was left.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
a21648d7e6 drivers: wifi: Clean up exit path
Fix couple of bugs in exit path:

- In case of calloc failure, return's without unlocking
- memory is freed outside lock, in case of a tiny window of race, this
  can cause a crash when this function is called from two threads.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
ea7d3bea93 drivers: wifi: Fix memory leak in regulatory processing
During Wi-Fi connection UMAC sends an unsolicited regulatory change
event but the driver code always assumes that this event is solicited
hence doesn't free the memory for the event.

Fix this by dropping the unsolicited event as it's not supported yet.

Fixes #79733.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
f333e1f00f drivers: wifi: Add regulatory debug log
This log helps in identifing if the event is solicited or not.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chris Friedt
d22a49536f drivers: devmux: use int instead of ssize_t for select_get()
Use int instead of ssize_t for select_get().

This eliminates the unnecessary need for POSIX types.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-21 18:48:18 -05:00
Krzysztof Chruściński
317de0c6de drivers: serial: nrfx_uarte: Add lock to uart_rx_disable
Add lock to fix race when uart_rx_disable is interrupted by RXTO
event which lead to driver state corruption.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
5eaafbaf99 drivers: serial: nrfx_uarte: Add workaround for BAUDRATE register
On uart120 BAUDRATE register is not retained when ENABLE=0 and
because of that BAUDRATE must be set after enabling. Add workaround
to the driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
7735302e06 drivers: serial: nrfx_uarte: Improve RX FIFO flush workaround
Add configurable magic byte instead of fixed 0xAA. In some cases, it
is known that certain bytes are less likely in the transmission and
picking specific magic byte may reduce probability of failure of
detection of the correct amount of flushed data.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
9517106899 drivers: serial: nrfx_uarte: Add support for DMM and cache
Add support for DMM which manages cache and dedicated memory spaces.
Added support for data cache for buffers which are not DMM managed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Jordan Yates
f443363f16 i2c: nrfx_twim: native RTIO support
Add native support for RTIO to the TWIM hardware IP.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-21 15:53:05 +02:00