Commit graph

23353 commits

Author SHA1 Message Date
Chaitanya Tata
7d696f5b69 drivers: nrfwifi: Fix label name
The label is used for both positive and negative cases, so, should be
called "out".

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-26 03:57:12 +01:00
Chaitanya Tata
2ea25ea238 drivers: nrfwifi: Fix regulatory domain regression
Recent WPA supplicant changes have broken nRF regulatory support,
implement the new set/get country WPA supplicant ops.

WPA supplicant: Regulatory SET through WPA supplicant, GET is direct to
the driver

Scan only: SET and GET direct calls to the driver

Fixes #79916.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-26 03:57:12 +01:00
Maureen Helm
9ca3826abf drivers: sensor: adi: Set trigger thread name
Sets the trigger thread name for all adi sensor drivers to more clearly
identify the thread when tracing or debugging.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-26 03:56:58 +01:00
Vladislav Pejic
832bbd8030 driver: sensor: adxl372: Bug fix for q31_t conv
This is a bug fix for adxl372_accel_convert_q31 function.
Function is used to convert samples received from
sensor to q31_t format when RTIO stream is used.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-26 03:54:23 +01:00
Krzysztof Chruściński
9ccaf9b5bd drivers: serial: nrfx_uarte: Minor code size optimization
Optimize function which enables UARTE peripheral. It is called
only when interrupts are locked so data->flags does not require
atomic operation. Use standard logical operations so save few
bytes.

Simplify uarte_disable_locked.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
7e94fca0bd drivers: serial: nrfx_uarte: Use legacy shim by default
So far new platforms did not use legacy shim but it shall
be now a default uart shim for all platforms.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
68903ca8dd drivers: serial: nrfx_uarte: Improve RX FIFO flushing workaround
Improved a workaround. When FIFO is not empty then FLUSHRX
task will generate RXSTARTED event to indicated that DMA transfer
was started. This property can be used to detect when FIFO was
not empty and workaroud a HW bug where RX.AMOUNT register is not
updated after flushing empty FIFO.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
3ce19da43b drivers: serial: nrfx_uarte: Add runtime PM
Add runtime PM to the driver. When asynchronous or interrupt
driven API is used, there are 3 independent paths for enabling
the device: RX, TX and TX poll_out. TX poll_out requires special
handling because number of poll_out calls does not need to much
number of TXSTOPPED interrupts. To handle that special flag is
added. For standard RX and TX is simpler.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
cfc87dab75 drivers: serial: nrfx_uarte: Remove unused element from a structure
Remove aborted flag from uarte_async_rx structure. Flag is not
used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
a98bde993e drivers: serial: nrfx_uarte: Add missing closing bracket
A code ifdefed by UARTE_BAUDRATE_RETENTION_WORKAROUND was missing a
closing bracket. It was missed because CI did not compile any target
that is applying this workaround and enables code compilation.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
David Brown
5969a10c30 drivers: pwm: rpi_pico: Convert clk calculations to fixed-point
Remove the use of floating point to calculate in
`pwm_rpi_get_cycles_per_sec` to fixed point calculations that result in the
same value.  There is still a division here, which is somewhat slow still,
but the end result about twice fast for the whole path through the led pwm
code.

Even better would be to cache these values, since there is no interface in
this driver to change the configuration past init time.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-10-25 18:11:14 -07:00
Reto Schneider
618d44164a bluetooth: Remove migration hints
Zephyr 3.7.0 has been released and it is time to remove the migration
code added in 9cf07bbdb5 (bluetooth:
Rename rpmsg HCI driver and sample to ipc).

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-25 17:37:53 -07:00
Declan Snyder
c1affb981d drivers: regulator_nxp_vref: Clear UTRIM on init
Reset value of this register is supposed to be 0 but I noticed on some
chip, it was not resetting to 0 on system reset, don't know why, but
this supposedly redundant clear is fine for now.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
e4deb46ba1 dts: nxp_vref: Add current compensation prop
Add DT property to enable current compensation feature of NXP VREF.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Daniel DeGrasse
6bc73df06b drivers: flash: flash_mcux_flexspi: add support for W25Q512JV
Add support for the W25Q512JV with the FLEXSPI, using a custom
LUT table.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-25 18:51:45 +01:00
Vladislav Pejic
527c1f5356 driver: sensor: adxl362: Bug fix for q31_t conv
This is a bug fix for adxl362_temp_convert_q31 and
adxl362_accel_convert_q31 functions.
Functions are used to convert samples received from
sensor to q31_t format when RTIO stream is used.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-25 12:51:31 -05:00
Cla Mattia Galliard
6f99b6d0e4 drivers: ethernet: phy: phy_mii: log remove excess newlines
Remove excess newlines from log output in phy_mii.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2024-10-25 12:50:38 -05:00
Mathieu Choplain
764ce97b2f drivers: dma: stm32: add support for STM32WB0
Add support for STM32WB0 series in the relevant drivers and Kconfig.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
c532702d76 drivers: dma: dmamux_stm32: remove unused SO and RGO functions
Functions related to synchronization inputs and request generators were
present in the DMAMUX driver, despite being completely unused.
Remove them for compatibility with WB0 which lacks this hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Aksel Skauge Mellbye
545e9334f7 drivers: bluetooth: hci: silabs: Configure radio for sleep
If PM is enabled, the radio must be configured to synchronize its
protocol timer with the low frequency timer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-25 14:09:57 +02:00
Aksel Skauge Mellbye
00378b56ec drivers: serial: gecko: Add device power management
Add basic device power management to USART driver. The initial
implementation only ensures that the TX FIFO is flushed before
allowing the system to go to sleep by polling the TXIDLE status
register.

This fixes an issue where the last 1-2 characters would be lost
if transmitted immediately before going to deep sleep.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-25 14:09:00 +02:00
Nils Bosbach
94baef654c drivers: gpio: gpio_iproc: fix reg write
The sys_write32 function expects a value as the first parameter and the
memory location where the value should be written as the second parameter.

Signed-off-by: Nils Bosbach <bosbach@ice.rwth-aachen.de>
2024-10-25 14:04:35 +02:00
Sungwoo Kim
88de2711ca Bluetooth: userchan: fix buffer overflow in hci_packet_complete()
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
2024-10-25 13:54:36 +02:00
Hui Bai
7c167c67c3 modules: hostap: add 11k cmd support
Add 11k cmds support. User can issue 11k cmds to enable/disable 11k and
send Neighbor Report Request packet.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Pisit Sawangvonganan
3ca71c94df drivers: serial: ra_sci: add missing break in callback_adapter
Added missing `break` statement in `uart_ra_sci_callback_adapter`
for the `UART_EVENT_RX_COMPLETE` case.
Without it, `async_evt_rx_err()` would be called, which is not
the desired operation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-25 13:50:55 +02:00
Pisit Sawangvonganan
f44690795f drivers: serial: ra_sci: revise switch-case in callback_adapter
Unified switch-case usage in `uart_ra_sci_callback_adapter` to use
`break` instead of `return`.
Typically, a `break` is used in switch-case statements unless an early
return is necessary, in which case `return` is appropriate.

For this case, using a `break` statement is the more suitable choice.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-25 13:50:55 +02:00
The Nguyen
95cc5f53b8 drivers: can: initial support for Renesas RA CANFD
Add support for CAN driver running on Renesas RA CANFD

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-10-25 08:55:17 +02:00
Jordan Yates
573c18f42a bluetooth: hci: dedicated symbols for SPI variants
Add dedicated Kconfig symbols for the two SPI backend variants. This
allows enabling the symbols by default from devicetree, and cleans up
the cmake logic.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-25 08:55:07 +02:00
Phi Bang Nguyen
5e41249ddf drivers: video: csi: Add NXP copyright
The CSI is an NXP IP and the driver has been very much changed
by NXP, so add NXP copyright to it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
a738613dcf drivers: video: csi: Increase init priority
The CSI needs to be initialized BEFORE the camera sensor to provide
clock to the camera sensor. It is now possible to do so as direct
reference to the sensor via phandle is now removed. There will be
no check failure on the init order anymore when compiling.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
59e253ed4a drivers: video: csi: Drop source device phandle reference
The peer remote device "source_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
1dd96ba9f9 drivers: video: csi: Remove obsolete comment
Remove the obsolete comment about the init order of the CSI and the
camera sensors (e.g. mt9m114) which is not true anymore.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
5bbaffe7c3 drivers: video: csi: Add support for changing frame rate
Add support for changing frame rate

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
29f38b81e2 include: video: Add an utility function to get bytes per pixel
As getting bytes per pixel of a pixel format is a very common operation,
add an utility function for it instead of repeating the same codes in
different drivers.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
8053b722af drivers: video: mipi_csi2rx: Add support for changing frame rate
Add support for changing frame rate.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
a182394725 drivers: video: mipi_csi2rx: Set clocks according to pixel rate
Instead of fixing csi2rx clock frequencies, set them according to the
pixel rate got from the camera sensor.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Farah Fliss
a40505148c drivers: video: mipi_csi2rx: Add set_ctrl callback
Add set_ctrl callback to propagate controls to the sensor.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
f82b0d5681 drivers: video: mipi_csi2rx: Drop sensor device phandle reference
The peer remote device "sensor_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
901f022cdb drivers: video: mipi_csi2rx: Get data lanes number from devicetree
Get number of data lanes from device tree instead of hard-coding it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Mahesh Mahadevan
513ead82dd drivers: clock: Update the NXP Syscon driver for MCUX
Update the code for MCUXN947 I3C support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Mahesh Mahadevan
38f06aa4bf drivers: sensor: p3t1755: Driver for NXP digital temperature sensor
Added driver for the NXP P3T1755 digital temperature sensor.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
James Roy
b443929f49 drivers: esp32: Fix esp_wifi_drv strncpy warning
Add '\0' to the end of the ssid to prevent warnings
or segmentation errors.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-25 08:53:26 +02:00
Michal Smola
13e0b1fa2b drivers: usb: Use VREG only if present for NXP Kinetis usb
Some NXP socs with Kinetis USB do not have USB voltage regulator.
It causes build error in USB samples.
Fix it by enabling and disabling the voltage regulator only if
present.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Raffael Rostagno
03dc880aa6 drivers: counter: esp32: Clang run
Clang run on driver for formatting

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-25 00:04:25 +01:00
Raffael Rostagno
4be1897519 drivers: counter: systimer: esp32c2: Fix clock parameters
Fix clock source frequency for systimer and GP timer.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-25 00:04:25 +01:00
IBEN EL HADJ MESSAOUD Marwa
cf367686f6 drivers: ethernet: eth_stm32_hal: Correct indentation
Adjusted indentation to follow consistent coding standards.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
IBEN EL HADJ MESSAOUD Marwa
eff9a87a7a drivers: ethernet: eth_stm32_hal: Use the compatible st_stm32h7_ethernet
Replace "CONFIG_SOC_SERIES_STM32H7X || CONFIG_SOC_SERIES_STM32H5X"
by the compatble st_stm32h7_ethernet

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
IBEN EL HADJ MESSAOUD Marwa
ca768581c8 drivers: ethernet: eth_stm32_hal: Remove V1 code for H7/H5 series
Remove the V1 code for STM32H7 and STM32H5 series

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
Daniel DeGrasse
3d4f83aaac drivers: wifi: eswifi: fix casts for 64 bit pointers
The eswifi driver uses an integer to identify the socket used for each
connection, which must be cast to and from a `void *`. This causes
warnings on 64 bit platforms, as precision is lost when casting from a
`void *` to `int`. Use a `intptr_t` type to store the socket value to
resolve this warning. Also, fix a function signature for the `accept_cb`
to use `size_t` instead of `int` for the length

Fixes #80242

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 12:25:04 -05:00
Grzegorz Swiderski
96f08d53a4 drivers: adc: nrfx_saadc: Use CONFIG_NRF_PLATFORM_HALTIUM
Apply it in a few more locations that were missed in
5a4655f69f.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00