Commit graph

18310 commits

Author SHA1 Message Date
Jeppe Odgaard 5d44ebfa7d drivers: i2s: stm32: use length from i2s_write
The length parameter from `i2s_write` is not used correctly by
i2s_ll_stm32.c. E.g. `i2s_write(dev, block, 0)` would work.

Use the length from `i2s_write` in `dma_reload` to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-03 07:53:05 -04:00
Simon Guinot ea47ef0ac0 drivers: ncp5623: check led_info for all LEDs
With the current code, when three separate monochrome LEDs are defined
in DT, only the information from the first LED is checked during driver
initialization. This patch fixes the code to verify the information of
each LED.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-05-03 07:29:45 -04:00
Benjamin Cabé 003f145314 drivers: gpio: fix bug with Px15 pins
Fix condition in pin number check so that PA15, PB15, etc. can be properly
accessed..

Co-authored-by: Денис <baden.i.ua@gmail.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-03 07:29:13 -04:00
Bjarki Arge Andreasen 15fa7f79da drivers: gnss: gnss_publish: Use sem for locking
The gnss_publish incorrectly uses a spinlock for mutual
exclusion when publishing data and satellites. Update it to
use a binary semaphore.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-02 22:44:19 +01:00
Bjarki Arge Andreasen 2ff1ed7804 drivers: gnss: gnss_lcx6g: replace spinlock with sem
Use semaphore instead of spinlock for mutual exclusion. The
spinlock is improperly used for mutual exclusion, leading to
timeouts and other unintended behavior as ISRs are disabled.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-02 22:43:11 +01:00
Daniel DeGrasse 6290d18c13 drivers: display: display_hx8394: use MIPI LPM during init commands
Although not documented in the HX8394 datasheet, it seems that the
display fails to initialize if MIPI HS mode is used to send
configuration commands. Therefore, we must make sure all initialization
commands are sent with the MIPI_DSI_MSG_USE_LPM flag set.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-02 21:26:32 +03:00
Jose Alberto Meza 30eda2058b treewide: drivers: espi: Adjust terms per eSPI specification 1.5
1) Replace master/slave in API for new terms in eSPI spec 1.5
2) Reflect eSPI VW change and macro changes across eSPI drivers
3) Update terms in eSPI driver sample and eSPI test driver

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-05-02 13:56:46 -04:00
Tomi Fontanilles 43651979fc drivers: entropy: fix TF-M enabled build with MbedTLS 3.6.0
This fixes the compilation of entropy_psa_crypto.c that failed
when trying to include the MbedTLS configuration.

Inherit the needed include folders and definitions from tfm_api.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-02 09:42:34 -07:00
cyliang tw 0190ed2713 drivers: adc: support Nuvoton numaker m2l31x
Update m2l31x.dtsi for adc support and update adc_numaker.c
to support acquisition time in 0~255 ADC ticks.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-02 09:58:43 +01:00
Fabio Baltieri 37c23f69f2 input: analog_axis: use k_sem for locking
Swap the mutex with a semaphore for locking the calibration data.
Lighter data structure, no need to use a mutex here.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-01 22:56:07 +01:00
Mykola Kvach b8f7fc3cc3 drivers: sdhc: add support of Renesas MMC driver
Add basic functionality of Renesas SD/MMC driver. It can be used
for both gen3 and gen4 R-car boards, but tested only with H3ULCB,
Salvator XS M3 and Spider boards. This driver working with SDHC
subsystem.

The driver supports regularal reading/writing throught SD/MMC
controller buffer, DMA mode w/o interrupts and timing tuning.

Add gpio5 and sd0 nodes to h3ulcb and salvator xs which are needed
for working with SD cards. The GPIO node is needed for switching
voltage on SD card through gpio regulator driver.

Notes:
    * the driver doesn't support SPI mode;
    * SCC tuning and DMA mode based on IRQs are enabled by default;
    * an address of a data buffer has to be aligned to 128 bytes if it
      is not, driver will use non-DMA mode automatically;
    * Renesas MMC DMAC doesn't support 64-bit DMA addresses, so for
      case when we have 64-bit xref data address we use non-DMA mode;
    * SD/MMC controller supports block size between 512 and 1 with
      a lot of restrictions, more details you can find in code;
    * support of HS400 mode isn't implemented inside driver.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-05-01 10:55:11 -04:00
Mike J. Chen 40a8022e4a drivers: regulator: shell: add is_enabled cmd
Reports whether regulator is enabled or disabled

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-01 13:12:24 +02:00
Pisit Sawangvonganan 3d39926f94 bluetooth: hci: refactored bluetooth hci packet type indicators
Introduced a unified definition for HCI packet type indicators in
'bluetooth/hci_types.h. This change streamlines the code in
'drivers/bluetooth/hci/', reducing redundancy.
Enhances maintainability and consistency across all HCI drivers.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-01 10:33:12 +02:00
Reto Schneider 776af7ea39 drivers: gpio: kconfig: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-01 10:29:10 +02:00
Reto Schneider 998d51a090 drivers: gpio: cmake: Prevent conflicts
By sorting the lines alphabetically, conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-01 10:29:10 +02:00
Wei-Tai Lee 5b83b7a472 drivers: flash: andes_qspi: fix accessing error variable
Fix accessing error variable when using FLASH_ANDES_QSPI_SFDP_RUNTIME.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-05-01 10:26:21 +02:00
Wei-Tai Lee 71f4d1b98e drivers: flash: andes_qspi: fix shadow variable error
Make the variables naming more specific.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-05-01 10:26:21 +02:00
Aurelien Jarno ce29e275c9 drivers: hwinfo: shell: add support for displaying device EUI64 ID
This adds a 'deveui64' command to display the just added EUI64 device
id. Display "Not supported by hardware" on devices that do not have it.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Aurelien Jarno 185edca797 drivers: hwinfo: stm32: Add support for reading EUI64 on STM32W*
The STM32WB, STM32WB and STM32WBA families devices include a EUI64 ID
(called "IEEE 64-bit unique device ID register" in the reference manual
that is distinct from the standard device ID. Add support for reading
it, noting that it is stored in little endian format in the registers.

On other families the weak implementation takes over and returns
-ENOSYS.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Aurelien Jarno ada2c78235 drivers: hwinfo: Add device EUI64 ID support
Some devices, mostly with radio support, have an EUI64 ID (unique and
attributed by IEEE), in addition to the standard device ID.

Add support for reading it through the hwinfo API. As the size is always
the same (8 bytes), there is no need to pass the size in the function,
nor return the number of bytes copied.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-04-30 19:29:10 -05:00
Luis Ubieda 971491b5a4 sensor: decoder: Use helper API to compute header size
To be consistent with the computed offset on sensor_submit_fallback()
implementation. This prevents falling in misalignment issues when the
number of sensor channels changes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:28:02 -05:00
Luis Ubieda 45ae829791 sensor: rtio_default: Remove log when device does not contain channel
Since this loops over all listed sensor channels, this makes more
difficult catching other debug log messages that might be of interest
(e.g: Decoding results).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:27:15 -05:00
Luis Ubieda fcb5d768a2 sensor: rtio_default: Add shift to sensor_submit_fallback DBG printout
To facilitate calculation verification between Q-number and value
obtained through fetch/get APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-30 19:27:15 -05:00
Charles Dias fa19161527 drivers: video: ov2640: add clock rate control property
Add Clock Rate Control property to OV2640 CMOS video sensor

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-05-01 00:14:18 +02:00
Francois Ramu f9d04d0958 drivers: watchdog stm32 independent wdg when enable at boot
When the CONFIG_WDT_DISABLE_AT_BOOT is not set, the iwdg
should be configured by iwdg_stm32_install_timeout
and started by iwdg_stm32_setup

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-30 14:31:43 -04:00
cyliang tw 183edd2549 drivers: rtc: support for Nuvoton numaker m46x
Add Nuvoton numaker RTC driver including RTC alarm feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-04-30 14:31:29 -04:00
Fredrik Gihl be25e34a7c drivers: sensor: Add TI TMP114 temperature sensors
Add device driver for TI TMP114 I2C temperature sensor.
The driver only support basic functionality, i.e. fetch temperature
using default values.

Datasheet:
	https://www.ti.com/lit/ds/symlink/tmp114.pdf

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-04-30 14:31:07 -04:00
Nathan Collins acc2b51959 drivers: display: sdl: Fix asserts in sdl_display_write
The asserts and validation code were incorrectly mixing pitch and
width.  These incorrect checks were preventing rendering code from
re-using a smaller section of a buffer allocated to fit the full
screen. We expect to be able to update a portion of the display from a
portion of the buffer, in which case pitch must remain the screen
width. Expecting x + pitch to be smaller than the screen width is
incorrect.

Signed-off-by: Nathan Collins <nathan.collins@kdab.com>
2024-04-30 18:23:30 +02:00
Raffael Rostagno f4a6fd1f3f drivers: esp32: SDHC implementation
Implementation of SDHC driver for ESP32

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-04-30 18:23:06 +02:00
Fin Maaß 6801ec0e30 drivers: flash: esp32: correct return values
The esp_flash*() functions don't return
negative errno codes, so it's return value
should not be used for the flash api functions.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-30 18:01:59 +02:00
Jiafei Pan 91c081833e drivers: clock_control: imx_ccm_rev2: add tpm clock
Add TPM clock support on i.MX 93 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Marouen Ghodhbane 3fb0e784ff drivers: counter: mcux: add support for TPM
Add TPM native Zephyr driver. It's mainly inspired from the GPT
counter implementation.

Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Declan Snyder 9320907fdf drivers: uart_mcux_lpuart: Fix APIs used together
Handle controller instances wanting to use different
API instances, need to change init flow so that they dont
interfere with each other, trick for now is returning
either the interrupt driven or async apis as not enabled
if the other has already been used on that controller.

Previously, there was an issue where enabling CONFIG_UART_ASYNC_API
would overwrite the init even if controller was meant to use
interrupt driven (as kconfig is global to affect all the controllers)

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Declan Snyder dfe4991a2c Revert "drivers: serial: uart_mcux_lpuart: fix IRQ-driven API with ASYNC_API"
This reverts commit a80fa5163b.

That commit broke the polling API when used with the interrupt driven,
it is completely wrong to disable the receiver from irq_rx_disable,
the uart_basic_api test has been broken on all lpuart platforms because
of this bug.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Declan Snyder e3ef4e3f09 drivers: mdio: Remove empty functions
Remove empty functions that were "implementing" the
mdio bus_enable and bus_disable apis.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-29 22:31:16 +01:00
Rafał Kuźnia 8ec1e0cdaf drivers: spi_dw: add HSSI register layout
The Synopsys Designware SPI peripheral exists in two versions with
slightly different register layouts. Added a Kconfig option that makes the
driver compatible with the HSSI register layout.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-04-29 15:44:22 +02:00
Chen Xingyu 979cd1dfe8 drivers: display: st7789v: Add support to disable inversion mode
For historical reasons, inversion mode is enabled by default in the
current implementation. This commit introduces an `inversion-off`
boolean DTS property, allowing it to be disabled if necessary.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-04-29 11:02:20 +02:00
Patryk Duda 8c6e801250 soc: xlnx: zynq7000: Select SYSCON in SoC config
The pinctrl driver actually uses SYSCON, so 'depends on' should be used
instead of 'select'. SYSCON should be selected in SoC config instead,
just like other SoC do.

This breaks Kconfig dependency loop for configs that indirectly depends
on SYSCON and causes PINCTRL to be selected.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-04-29 09:56:58 +01:00
Robert Hancock 1ad4b5c617 i2c: i2c_xilinx_axi: Fix for target mode interrupt handling
When a target was registered with the controller but a controller-mode
request was performed, the driver failed to mask the interrupts that
were occurring as a result of the controller-mode transfer, causing an
interrupt flood. Ensure that all interrupts not handled by target mode
are handled as potential controller-mode events and acknowledged
properly.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Robert Hancock 083a42d734 i2c: i2c_xilinx_axi: Fix switching from controller to target mode
It appears that a controller re-initialization is sometimes needed for
proper operation when handling target mode requests after a request from
the core is completed in controller mode. Add this re-initialization as
was already done between controller mode requests.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Krzysztof Chruściński 4e880e62dc drivers: cache: nrf: Use CONFIG_DCACHE_LINE_SIZE
Use Kconfig instead of fixed value in the driver code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 9f6567b87a drivers: cache: nrf: Optimize operation
Apply changes which significantly speed up cache operations.
Removed k_busy_wait from function which polls for cache busyness.
Removed spinlock from cache operation. Lock taking and releasing
takes time and it is faster to check if LINEADDR changed
after performing the operation. If LINEADDR changed then it
indicates that current context was preempted by another cache
operation. If such state is detected current operation is
repeated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński b83a11281d drivers: cache: nrf: Fix case when driver may hang
Driver was disabling cache before full range operations and that
was causing hanging on polling for cache busy status since
state was never changing (because cache was disabled).

Additionally, added flushing to data cache disabling. If flushing
is not performed then execution fails since data in cache is lost.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 73d4f58b98 drivers: cache: nrf: Handle issue with LINEADDR on secure builds
nrf54h20 has a bug that requires to manually set 28th bit in the line
address. 28th bit indicates secure memory space. Add handling to the
cache driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Benedikt Schmidt 10bbf7cd57 drivers: sensor: add driver for temperature sensor NCT75
Add a driver for the ON Semiconductor temperature sensor NCT75.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Yong Cong Sin 0291c551a2 drivers: use DT_INST_NODE_HAS_COMPAT
Replace occurances of:

  DT_NODE_HAS_COMPAT\(DT_DRV_INST\((.*)\), (.*)\)

With:

  DT_INST_NODE_HAS_COMPAT($1, $2)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Alberto Escolar Piedras 076594fc1c USB_NATIVE_POSIX: Correct dependencies
USB_NATIVE_POSIX dependencies were partially broken for
native_sim as the option was duplicated in the boards
defconfigas.
Let's not define it also in the board Kconfig.defconfig
but instead default it to y in its main definition if
building for either native_posix[//64] or native_sim[//64]

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Benjamin Cabé d9c40856ea drivers: counter: fix leaking NXP counter Kconfigs
fix conditions for COUNTER_NXP_PIT and COUNTER_NXP_MRT Kconfigs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 388c0aa68f drivers: udc: fix leaking Kconfig
UDC_DWC2_MAX_QMESSAGES was leaking.
Added proper dependency to UDC_DWC2

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé a761c55144 drivers: regulator: fix NXP VREF Kconfig leakage
Properly guard NXP VREF driver Kconfig options.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé b7bef3f8ff drivers: grove_lcd: lcd fix Kconfig leakage
Kconfig for Seeed Grove LCD RGB Backlight was looking.
Make it depend on DT_HAS_SEEED_GROVE_LCD_RGB_ENABLED.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé dce214eb3f drivers: timer: fix gRTC Kconfig leak
Add proper dependency to DT_HAS_NORDIC_NRF_GRTC_ENABLED to avoid leakage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 8304e82328 drivers: i2c: fix leaking Kconfig option for dw driver
Fix leaking I2C_DW_LPSS_DMA option that was showing up for all I2C
drivers

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé c165446993 drivers: i2c: fix leaking Kconfig option for mcux driver
Fix leaking I2C_NXP_TRANSFER_TIMEOUT option. It was showing up for all
I2C drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Bram Vlerick 1e8051af34 i2c: i2c_mcux_flexcomm: add multi target support
When registering a target device, the driver will check if a slave address
is free in the peripheral. If so, the new slave address gets configured and
enabled.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick e0daad64a4 i2c: i2c_mcux_flexcomm: move slave init to helper function
Move slave initialization to a separate helper function. This helper will
also be needed in the multi target support during unregistration. When
unregistering, the slave needs to be reinitialized if other remaining
targets are still attached.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick 20cc510df4 i2c: i2c_mcux_flexcomm: add find target functions
Add helper functions to find a free target for configuration and find a
target based on the configured slave address. These functions are in
preparation for multi-target mode.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick 39bae54b53 i2c: i2c_mcux_flexcomm: move target data to separate struct
Move target data to dedicated struct. This is in preparation for multi
target support. The target_handle can stay global since this handle is
unique per peripheral and not per slave address.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Jun Lin 458b219879 drivers: uart: npcx: extend the UART baudrate support
1. support the baudrate = 3MHz.
2. add baudrate = 115200 setting when UART source clock = 25/30/48/50 MHz.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-04-26 16:13:25 +02:00
Jun Lin 08fedb4a80 drivers: uart: npcx: add asychronous API support
This commit implement the UART asynchronous API mode support.
When the API is used, the UART hardware cooperates with the DMA (MDMA)
module to handle the the data transfer and receiving.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-04-26 16:13:25 +02:00
Jun Lin 3ba7874cd5 driver: uart: npcx: fix coding style
Fix the coding style by clang-format tool.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-04-26 16:13:25 +02:00
Ricardo Rivera-Matos 4928f3b7ff regulator: cp9314: Adds regulator_get_error_flags support
Adds a handler to check error flag bits. This should be called
by applications that call regulator_enable and receive -EINVAL
as a return.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-26 16:08:39 +02:00
Ricardo Rivera-Matos f9ce311855 regulator: cp9314: Adds support for PGOOD pin
Adds support for the PGOOD pin. This pin is asserted by the
regulator when converter startup has completed and the output
is stable. If the PGOOD pin is not used, the PGOOD state is
check via the PGOOD_PIN_STS bit.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-26 16:08:39 +02:00
Ricardo Rivera-Matos 99816aba6b regulator: cp9314: Tidies regulator enable conditional
Enables the converter via I2C as the else case when the EN pin
conditional fails. This used to not matter as no code followed,
but this will change in subsequent patches.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-26 16:08:39 +02:00
Hardeep Sharma b521bb655d drivers: fpga: Added altera FPGA bridge support
Added altera FPGA bridge support

Signed-off-by: Hardeep Sharma <hardeep.sharma@intel.com>
2024-04-26 09:30:24 +02:00
Grant Ramsay c9a148882c drivers: ethernet: w5500: Tidy up
* Rename w5500_hw_reset to w5500_soft_reset.
This function performs a software reset, the GPIO reset is
hardware reset.
* Set thread name "eth_w5500".
* Simplify random MAC address code.
Remove unnecessary function pointer and wrapper function.
* Remove SPI read variable length array.
The VLA causes unnecessary stack usage and its max size changes
depending on CONFIG_NET_BUF_DATA_SIZE.
Split the SPI read into two transactions, a skip of the first 3
dummy bytes, then a read of the data directly into to given buffer.
* Remove unused variables config_func and full_duplex.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-04-26 10:19:27 +03:00
Mike J. Chen 6b2fae0d01 drivers: i3c: i3c_mcux: reduce timeout busy waiting
For many of the state checks with timeout, the check
should be very fast (sub 1 microseconds) and the
previous implemention involving busy waits between
checks could add unneeded latency. Change the
timeout checking method to use WAIT_FOR(), with
no extra delays between checks.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-04-26 10:18:54 +03:00
Arunmani Alagarsamy 0810180135 drivers: i2c: i2c_gecko: Refactor driver to use pinctrl api
Deprecate the use of location_* properties in the i2c_gecko driver
and migrate to the pinctrl api for enhanced maintainability and
compliance with current standards.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
2024-04-25 18:07:48 -04:00
Arunmani Alagarsamy 04931a54ee drivers: pinctrl: pinctrl_gecko: Add support for using pinctrl api
This update integrates I2C support with the pinctrl_configure_pins api
within the pinctrl_gecko driver.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
2024-04-25 18:07:48 -04:00
Junho Lee 31baddaa51 drivers: gpio: add brcmstb gpio driver
Add GPIO driver for brcmstb, required by Raspberry Pi 5.

Signed-off-by: Junho Lee <junho@tsnlab.com>
2024-04-25 18:06:43 -04:00
Joakim Andersson 855c0d742b drivers: spi: Align SPI init priority with other devices
Align the SPI init priority with other devices.
Other bus-devices like UART and I2C are init at standard kernel
device level (50), but SPI is at 70 and there appears to not be
a reason for it.
GPIO is init at 40 so there should not be an issue to use the default.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-04-25 18:00:20 -04:00
Nikodem Kastelik e0b98dccd1 drivers: pwm: pwm_nrfx: place data buffer in specified memory region
Some devices (like nRF54H20) must have PWM data buffer
stored in appropriate location.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-25 17:59:27 -04:00
Phi Bang Nguyen de29ffb033 drivers: video_common: Add aligned allocation API
For some hardwares, it is very common that some aligment on the allocated
memory is required. For example, the PxP and eLCDIF of NXP require aligned
buffers so that their performances can be optimal.

Add a new video_buffer_aligned_alloc() API for these needs.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-04-25 17:58:57 -04:00
Sebastian Bøe 99f94295eb drivers: nrf: rram: Support TF-M
Non-secure images cannot reference NRF_RRAMC_NS because NRF_RRAMC_NS
does not exist.

TF-M will configure RRAMC according to these Kconfig's before booting
the non-secure image so we ifdef out this code.

Also, rewrite the implementation of commit_changes to also work when
the commit task is not available.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-04-25 17:58:40 -04:00
Jerzy Kasenberg 1d83fa521c drivers: regulator: Add power management to DCDC
This change restore DCDC configuration after system resumes.

When CONFIG_PM_DEVICE is enabled each of the four rails that
support DCDC handle resume in regulator_da1469x_pm_action function.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-04-25 16:17:53 +02:00
Andrzej Kaczmarek 422092f2d3 drivers: gpio: smartbond: Add GPIO latching for PM
This adds automatic GPIO latching before going to extended sleep and
restoring state after wakeup.

Mode and state for each pin is stored, then ports are latched to retain
state when PD_COM is disabled during sleep. On wakeup mode and state for
each pin is restored and ports are unlatched to make it work again.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-04-25 16:17:53 +02:00
Andrzej Kaczmarek fbc7a9e209 soc: arm: smartbond: Add support for extended sleep
This enabled extended sleep for Renesas SmartBond(tm).

Extended sleep is low power mode where ARM core is powered off and can
be woken up by PDC. This is default sleep mode when CONFIG_PM is
enabled.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-04-25 16:17:53 +02:00
Andrzej Kaczmarek 6307d8de78 drivers: timer: Add timer driver to Renesas SmartBond(tm)
This adds timer driver for Renesas SmartBond(tm) family.
It uses TIMER2 block which is in PD_TIM power domain so it can work even
if ARM core is disabled, thus can work as a sleep timer.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-04-25 16:17:53 +02:00
Caspar Friedrich 666a89221b drivers: adc: tla2021: Fix reference voltage
This fixes the problem that `adc_raw_to_millivolts` only returns half of
the actual voltage.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2024-04-25 15:12:14 +02:00
Mykola Kvach 797158997f boards: arm64: add support of Renesas Spider S4 A55 board
Add support of 'rcar_spider_s4/r8a779f0/a55' board: minimal dts
and configuration.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-04-25 14:54:51 +02:00
Nerijus Bendžiūnas 14338208ca spi: shell: fix copyright typo
Corrected copyright header.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-04-25 07:24:14 -04:00
François Baldassari 4fe9909949 ADC: kb1200: start_read returns uninitialzed value
Found via static analyis. When `adc_kb1200_start_read` succeeds, no
value is set for `error` so it is still uninitialized when it is
returned.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-04-25 11:06:11 +00:00
Lukasz Madej 71e7a77e99 drivers: adc: adc_ad559x: improve adc read
Use information encoded in conversion result value to validate it.
Check if MSB bit is set to zero.
Check if channel number included in the result matches channel
number selected for conversion.
Use bitmask to extract converted value instead of math calculations.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-04-25 12:15:19 +02:00
Lukasz Madej f565f4cae7 drivers: adc: adc_ad559x: fix driver init
k_thread_name_set() function returns an error if CONFIG_THREAD_NAME is
not enabled which may make the driver not functional.

Fix the issue by adding a check against CONFIG_THREAD_NAME avaliability
before calling k_thread_name_set() function so the driver can operate
properly with CONFIG_THREAD_NAME disabled.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-04-25 12:15:19 +02:00
Lukasz Madej 55235712fb drivers: adc: adc_ad559x: add invernal vref value
Add configuration of internal refference voltage value so raw ADC
readings can be converted to mV utilizing adc_raw_to_millivolts()
ADC API function.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-04-25 12:15:19 +02:00
Damian Nikodem 2455436337 driver: ssp: update Intel SSP DAI driver to support dynamic SSP management
This commit refactors the Intel SSP DAI driver to support dynamic
management of SSP IP. This change additionally separates the management
of the DAI part from the management part of the SSP IP.

Key changes:
- Add new static functions to manage SSP IP power.
- Update the DAI SSP configuration functions to use the new management
  approach.
- Update device tree bindings and instances to reflect the new SSP IP
  management mechanism.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-04-25 12:14:50 +02:00
Jeff Daly 7e0a334060 drivers: sensor: ntc_thermistor: Add Murata NCP15XH103
Murata NCP15XH103 compensation table added.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-04-24 15:56:23 -04:00
Dominik Ermel 22a7d2d8fb drivers/flash_simulator: Fix FLASH_SIMULATOR_DOUBLE_WRITES help
Fix incorrect note that write only allows to change value of
bit to zero, where proper information is that change is only allowed
from erase-value to the opposite.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 19:42:44 +00:00
Dominik Ermel 8b109b6649 drivers/flash_simulator: Fix write for 0x00 erase value
The commit adds missing binary or in write operation.
Assuming that program-erase devices only allow switching bits
from erase-value to opposite, in case of 0x00 erase value device
only ones can be written.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 19:42:44 +00:00
Erwan Gouriou 58a9f9f528 drivers: disk: sdmmc_stm2: Add HWFC support on stm32h5
Hardware flow control is available also on stm32h5.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-24 19:41:09 +00:00
Alvis Sun 629bfd9f9f drivers: i3c: i3c_shell: add alphabetical order constraint
Add /* zephyr-keep-sorted-start */ around DT_FOREACH_STATUS_OKAY.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun 5d33a4cffe drivers: i3c: i3c_shell: add nuvoton_npcx_i3c compat macro to i3c_shell.
As titile.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun c6763bd2ca drivers: i3c: npcx: introduce NPCX I3C driver
This implements basic driver to utilize the I3C IP block
on NPCX.

1. I3C mode: Main controller mode only.
2. Transfer: Support SDR only.
3. IBI: Support Hot-Join, IBI(MDB).
   Controller request is not supported.
4. Support 3 I3C modules:
   I3C1(3.3V), I3C2(1.8V, espi mode), (I3C3 1.8V or 3.3V)

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun a3cd76b6f2 drivers: i3c: update i3c_dev_list_daa_addr_helper()
During DAA, the responding device might not be in the device list.
This CL adds target device descriptor's pointer checking to prevent
getting unexpected results.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun 3ed5f8a948 drivers: clock_control: npcx: add MCLKD as i3c source clock
1. The only valid values of MCLKD clock frequency
   are between 40Mhz to 50Mhz.
2. If DMA is used, the APB4_CLK clock frequency must
   be equal to or higher than 20Mhz.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
François Baldassari dcb974a9df Can: mcan: Uninitialized access in state_change_handler
Found via static analysis. In `can_mcan_state_change_handler`, the
return value of `can_mcan_get_state` is not checked for error. In the
event of an error, both `err_cnt` and `state` are left unitialized and
accessed downstream.

The correct behavior is to return early in that case.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-04-24 15:01:59 -04:00
Tomi Fontanilles b4c8d47536 drivers: gnss: nmea_generic: some fixes/improvements
- Configure a UART TX buffer; the backend would otherwise assert in
its configuration or (if the asserts are off) miserably fail when
trying to send anything to the GNSS modem.
- Fine tune the UART RX buffer size and make it depend on whether
satellite data is received.
- Remove unused k_spinlock.
- Make declaration of Kconfig items dependent on GNSS_NMEA_GENERIC
conditional.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Tomi Fontanilles 21efdc23c9 drivers: gnss: nmea_generic: implement basic power management
As of now only the resume action is supported, and doesn't perform
any power action on the GNSS modem.
It allows to initialize the GNSS driver later than it would otherwise
be.

Also, the driver now runs a modem-specific chat script on resumption.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Tomi Fontanilles a986905df5 modem: chat: implement helper defines/structs
Those helpers allow to define some typical kinds of chat matches and
scripts with more ease/less boilerplate.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Mikhail Siomin 4b276c4962 drivers: can: stm32_bxcan: fix CAN mailbox overwrite
Fixes overwriting a mailbox before sending it completes.
Overwriting can occur when one thread has waited for
another thread to complete the send function and
fills a mailbox selected based on
the transmit_status_register variable,
which has not been updated after waiting and,
accordingly, does not contain up-to-date information
about the mailboxes used.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-04-24 10:56:33 -04:00
Ruibin Chang 1d74cb74d9 drivers/crypto/crypto_it8xxx2_sha_v2.c: implement sha v2 for it82xx2 series
Implement a new version crypto_it8xxx2_sha_v2 driver for it82xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-04-24 09:55:46 +02:00
Henrik Brix Andersen 71fe0f413b drivers: can: remove unnecessary asserts
Remove unnecessary asserts from various CAN controller drivers. These
asserts are all covered by the common CAN subsystem API implementations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-24 09:53:06 +02:00
Henrik Brix Andersen 09604d4044 drivers: can: validate arguments in can_add_rx_filter()
Validate the CAN ID and CAN ID mask used in the can_filter struct before
passing it to the driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-04-24 09:53:06 +02:00
Henrik Brix Andersen 751a884efe drivers: can: validate arguments in can_send()
Validate the CAN ID used in the can_frame struct before passing it to the
driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-04-24 09:53:06 +02:00
Chris LaFlash 9c492f4a9b drivers: gnss: Use correct GGA Elevation field
Switching from using Geoid seperation to Elevation MSL field.

Signed-off-by: Chris LaFlash <chris-github@laflash.com>
2024-04-23 19:46:42 -04:00
Fabio Baltieri 4a5fa01694 input: add a paw32xx driver
Add a driver for PAW32xx sensors.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-04-23 22:13:51 +00:00
Arne Bohnsack 38edec68d4 usb: device_next: Fix Mass Storage on STM32
Mass Storage enumeration failed because udc_stm32_ep_mem_config() was only
increasing priv->occupied_mem on endpoint enable, and not decreasing it on
endpoint disable. Fix the issue by decreasing priv->occupied_mem
on endpoint disable.

Signed-off-by: Arne Bohnsack <arne.bohnsack@draeger.com>
2024-04-23 21:26:20 +00:00
Marcin Szymczyk 06a84bf8e5 drivers: mbox: nrf_vevif_local: remove RT periph enable
It is done already at PRE_KERNEL stage.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-23 21:26:04 +00:00
Nazar Palamar 6d684c91c2 drivers: bluetooth/cyw43xxx: check that hw_flow_control is set
Add BUILD_ASSERT to check that hw_flow_control is set.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-04-23 15:35:53 +02:00
Andy Sinclair 1f156c352c drivers: mfd: npm1300: Fixed configuration of long press reset
Added write of strobe register after setting long press reset
configuration.  This is needed to apply the new value.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-04-23 15:35:46 +02:00
Marcin Szymczyk 5bba170ea7 drivers: interrupt_controller: add intc_nrfx_clic
Add interrupt controller driver for Nordic Semiconductor
VPR CLIC.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-23 15:35:12 +02:00
Tom Chang a5741c8cca drivers: espi: npcx: add dependency for espi taf
This CL adds CONFIG_FLASH as dependency for ESPI_TAF_NPCX.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-04-23 15:31:44 +02:00
Declan Snyder f0f83d214e drivers: ptp_clock_nxp_enet: misc fixes
1. Correct node label in k64 overlay for ptp test
   - Not sure if this actually matters since it appears
     that actual hardware is no longer tested in net tests

2. Include fsl_enet with <> instead of "".

3. Build the ptp clock driver only if the ethernet driver is built
   - Technically I think the 1588 timer should be able to be used
     even if the ethernet mac is not used, but I would imagine this
     to be an extraordinarily rare, weird, and niche use case, so to fix
     the current CI error caused by net test disabling ethernet drivers,
     couple the ptp clock driver to the ethernet driver in the build
     configuration.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-23 15:31:33 +02:00
Jędrzej Ciupis f18ea95758 drivers: timer: nrf_grtc_timer: fix return type signedness
Negative error codes cannot be returned if the function returns an
unsigned integer. Change function's API to return the read compare
register value through a pointer and the actual result as a signed
integer.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-23 11:07:37 +00:00
Martin Tverdal dbf62a5a2a drivers: clock_control: Update XTAL accuracy on nRF54L
We are not able to achive 50ppm on nRF54L.
Working on fixing it propperly, but untill we do set what we get.

Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2024-04-22 17:05:49 -05:00
Najumon B.A 4a973db3d4 drivers: gpio: gpio_intel: add acpi base resource enumeration
add gpio_intel driver with acpi based resource enumeration support.
Also updated test cases overlay with new dts entires.

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-04-22 06:50:38 -07:00
Lukasz Majewski 24cbb74d46 net: dsa: Fix DSA driver for KSZ8xxx to correctly initialize LAN devices
The commit "drivers: ethernet: dsa_ksz8xxx: use
NET_DEVICE_DT_DEFINE_INSTANCE"
(SHA1: f78a081066) replaced
NET_DEVICE_INIT_INSTANCE() with NET_DEVICE_DT_DEFINE_INSTANCE() to
facilitate the removal of deprecated (from Zephyr's 3.2 release)
DT_LABEL() macro.

Unfortunately, the per LAN port initialization is necessary for correct
operation of the DSA driver - otherwise following errors were visible
when LLDP DSA sample (samples/net/dsa/src) was run on ip_k66f board:

<wrn> net_if: iface 0x20001440 is down
<inf> net_dsa_lldp_sample: LLDP pkt recv -> lan1
<inf> net_dsa_lldp_sample:   CHASSIS ID:     38:05:43:69:XX:ZZ
<inf> net_dsa_lldp_sample:   PORT ID:        38:05:43:69:XX:ZZ
<inf> net_dsa_lldp_sample:   TTL:            120s
<inf> net_dsa_lldp_sample:   SYSTEM NAME:    mtt
<err> net_dsa_lldp_sample: Failed to send, errno 115

The fix is to use again NET_DEVICE_INIT_INSTANCE() with "lan"X name
assigned (to avoid too long names when recommended DT_PROP() is
used instead of DT_LABEL()).

Fixes: f78a081066

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-04-22 06:50:32 -07:00
Jan Kubiznak 030a8b1830 drivers: dac: dac_ad569x: Support for AD569x DACs.
Added support for Analog Devices AD5691 / AD5692 / AD5693 DACs.

Signed-off-by: Jan Kubiznak <jan.kubiznak@deveritec.com>
2024-04-22 06:50:01 -07:00
Wei-Tai Lee 80f9736115 drivers: cache: add Andes cache driver
Add cache driver for Andes cache.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-04-22 09:19:27 -04:00
Ryan McClelland 732c2e1989 i3c: add i3c shell
Add an I3C shell. This includes support of all I3C CCC commands that
currently have helper functions implemented. This also includes all
the read/write shell commands that the i2c shell supported. An Info
command is also provided which will print out all i3c and i2c info
of an i3c bus. Only SDR read/writes are currently implemented.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-04-20 13:46:26 -04:00
Peter Mitsis 461fcf4cef linker: drivers: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'drivers' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Pisit Sawangvonganan 6d99f3797a drivers: flash: spi_nor: clean up unnecessary code
This commit removes unnecessary usage of the `ARG_UNUSED` macro and
unnecessary initialization of the `ret` variable where its value is
guaranteed to be overwritten by subsequent operations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-04-19 17:55:25 +00:00
Alberto Escolar Piedras 8e20b80575 drivers/timer grtc: Fix for ISR prototype
Interrupt handlers are expected to have a pototype
void (const void*)
but nrfx_grtc_irq_handler has just a void(void)
(with no input parameter).
Fix it by using a trampoline.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-19 16:56:16 +00:00
Dominik Ermel a7909bc596 drivers/flash/nordic_qspi_nor: Add missing FLASH_HAS_PAGE_LAYOUT
The Kconfig for device has not been missing the FLASH_HAS_PAGE_LAYOUT.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Tom Chang b89a7203e2 drivers: espi: npcx: support multi-byte for dp80
This CL adds multi-byte support for debug port 80 on npcx4.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-04-19 16:40:46 +00:00
Abderrahmane Jarmouni 4af01814c4 drivers: spi: stm32: cache coherency management modifs
Expand cache coherency management code to all STM32 targets with DCACHE.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-04-19 16:40:33 +00:00
Manuel Argüelles 5d2670ac1f drivers: pwm: mcux_ftm: allow to select clock source
FTM internal counter can be clocked by one of three clock sources
independent of the module bus clock. This patch introduces a DT property
to perform the clock selection from DT.

DT sources are updated to keep the current clock selection for all boards,
with exception of ucans32k1sic board which is migrated to use system
clock by default, as this seems to be a better choice for most cases.
Some PWM LED samples require slower clock so overlays are added for
those cases.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-04-19 10:08:53 +02:00
Tomasz Gorochowik 38dd10ea1c drivers: fpga: shell: add shell load error handling
Check if the call was successful, print an error otherwise.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2024-04-19 10:08:06 +02:00
Marcin Niestroj bf637bf623 drivers: net: nsos: implement sendmsg()
Implement sendmsg() socket API to have increased compatibility with
components like MQTT client.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-19 10:07:42 +02:00
Marcin Niestroj 26bc2e2952 drivers: net: nsos: pass addrlen by value in sockaddr_to_nsos_mid()
There is no reason to pass addrlen by pointer, since it is a read-only in
the context of sockaddr_to_nsos_mid().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-19 10:07:42 +02:00
Steve Boylan 5b72665c47 drivers: spi: Add support for half-duplex (3-wire) SPI
Add support for half-duplex (3-wire) SPI operation using the Raspberry
Pi Pico PIO.  To allow control of the size of the driver, including
half-duplex support is optional, under the control of Kconfig options.

The original PIO source code is also included as a reference.

Corrected 3-wire tx/rx counts.

Enable half-duplex code based on DTS configuration

Replace runtime checks with static BUILD_ASSERT()

Remove too-fussy Kconfig options

Removed PIO source per review request

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2024-04-18 08:09:15 -07:00
Nerijus Bendžiūnas b394664dd9 spi: shell: add simple SPI shell
Inspired by I2C shell. Useful during
SPI device driver development or for debugging.

Usage example (read JEDEC ID):

```
uart:~$ spi conf spi4 1000000 oh
uart:~$ spi transceive 9f 00 00 00
TX:
00000000: 9f 00 00 00                                 |....             |
RX:
00000000: 00 ef 40 19                                 |....             |
```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-04-18 08:08:02 -07:00
Dipak Shetty c8e301ad78 drivers: spi: spi_mcux_lpspi.c: remove redundant assignments
Redundant kLPSPI_MasterPcsContinuous transfer config flag
is eliminated since this is set earlier.

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
2024-04-18 08:06:42 -07:00
Martin Tverdal 4f68adfbd5 drivers: clock_control: Update RC accuracy nRF devices
It is only nrf52 that has 500ppm accuracy on LFRC.
All others have 250ppm.

Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
2024-04-18 08:06:19 -07:00
Mark Wang 31df41ee11 driver: udc: trigger queued transfer on halt clear
Submit USBFSOTG_EVT_XFER on halt clear to allow queued
transfers to execute as soon as endpoint STALL is cleared.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-04-18 08:05:46 -07:00
Declan Snyder 210df56f37 drivers: ethernet: Add ETH_DSA_SUPPORT
Make DSA dependent on ETH_DSA_SUPPORT which is selected by driver
kconfigs, rather than having a list of dependencies.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder fdbba0341c drivers: nxp_enet: Deprecate ETH_MCUX
Deprecate ETH_MCUX, by:

- Marking it as DEPRECATED in Kconfig, obviously.
- Unmarking the new driver as experimental.
- Putting the new and old drivers in the same folder.
- Reworking the menu appearance of the driver selection.
  Note that technically now it is possible to choose the wrong
  driver than what is enabled in DT, this is intentional, but
  the correct one will obviously be enabled by default.
- Convert all sample overlays to the new Kconfigs. This was
  part of the motivation for the shared overlays, as it was
  causing twister/CI logs to look ugly and misleading due
  to Kconfig warnings.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder 83bfcb1b30 drivers: ethernet: DSA supported on ETH_NXP_ENET
I have tested the DSA support with ETH_NXP_ENET driver and it
works, so marking it as supported by adding it to the dependency
list for the DSA feature.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder ac58f3abe6 drivers: nxp_enet: Generate MAC using eth.h
The MAC address macros are ridiculous in this driver.
Rewrite to be simpler and use eth.h common function.
Also, clarify the mac address generation on the DT overlays.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder 4be0439bed drivers: nxp_enet: Convert RX to workqueue
Convert from multiple threads for each instance to use
one workqueue for all instances. The benefit is to save
memory and use a kernel function that already exists
for a use case like this.

Also introduce the ETH_NXP_ENET_RX_THREAD_PRIORITY kconfig,
which makes the thread priority of the workqueue configurable.

Finally, remove the code enabling the RxBufferInterrupt, since
the meaning of it isn't used currently in this driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder bc785e076a drivers: nxp_enet: Add NET DEVICE PM function
Add functionality for when NET_POWER_MANAGEMENT (ie PM_DEVICE)
is enabled. This function code originally comes from the
old eth_mcux driver which was only tested on kinetis family SOCs,
so that family kconfig is a dependency for this feature for now.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder fe3aefe2ae drivers: nxp_enet: Remove unused interrupt codes
Remove code that does nothing, regarding unused interrupts.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder 02916828ab drivers: nxp_enet: Remove unnecessary comments
Some comments in this driver are just redundant - the code
spells out exactly what the comment says. And some comment
blocks are just unnecessary to have. Finally, remove the TODO
comment because this is flagged by static analysis and there
are already tracking issues for the zero copy enhancement.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder 9ac2ee91f2 drivers: nxp_enet: Correct PTP clock dependencies
The dependencies should be in a 'depends on' clause.
Also, 'depends on PTP_CLOCK' is redundant because this is
within 'if PTP_CLOCK' already.

Additionally, conditionally include the PTP header in the mac driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Declan Snyder 1205bab4a0 drivers: clock_control: mcux_sim: PTP clock
Add PTP clock get rate code

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Stanislav Poboril 6ead65bb2f drivers: ethernet: phy: KSZ8081 PHY Driver improvements
Added changes required for nxp_enet ethernet driver to work
with multiple PHYs and fixed few problems:

- The cfg_link API resets PHY before configuring link. It was moved
  here so the ethernet driver does not have to reset it - not all
  PHYs need reset before configuring link and moving the reset code
  here makes possible to have the reset done in a PHY specific way
  (for example to reset by toggling GPIO pin). It also avoids ethernet
  driver touching PHY registers without locking.
- When reset GPIO is not defined, reset is performed by setting reset
  bit in control register.
- The cfg_link API does not return error when autonegotiation fails.
  This fixes situation when the link is down at system start - ethernet
  driver then skipped setting link-change callback and link was never
  to be detected again.
- Added reset of excessive bits 16-31 when reading register values.
  As only 16 bits are read from PHY, but the API is supposed to read
  into uint32_t, the remaining bits contained previous data after
  a successful read.
- Fixed missing mutex unlock when querying link state and link was down.
- Added missing initializer to link state variables. This could result
  in link state change detection while link was still down, because
  the speed/duplex settings could be random and old and new state
  could be wrongly detected as different.
- Not logging link speed/duplex status when link is not up.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-04-18 11:18:31 +02:00
Zhaoxiang Jin fefb472700 drivers: lpadc/adc_mcux_lpadc/: enable nxp lpadc acquisition time feature
Enable nxp lpadc driver acquisition time feature

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-04-18 11:16:45 +02:00
Zhaoxiang Jin 4fa58d315e drivers: clock_control: add support for LPADC clock obtain
The lpadc driver needs to obtain its functional clock to configure
the acquisition time. This patch add support for I.MX RT three digit
parts, I.MX RT11xx parts, and LPC parts.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-04-18 11:16:45 +02:00
Krzysztof Chruściński 8b96dff2f6 drivers: serial: nrfx_uarte2: Fix error event not being sent
When RX length was 0 and error was reported then UART_RX_STOPPED event
was not sent. Fixing the condition check to ensure that UART_RX_STOPPED
is always generated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 11:14:58 +02:00
Krzysztof Chruściński 5a41aa2614 drivers: serial: uart_nrfx_uarte2: Prevent TX in suspend mode
Do not transmit if the device is in suspend mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 11:14:58 +02:00
Krzysztof Chruściński d27842c953 drivers: serial: nrfx_uarte2: Clean error state on rx_enable
Clean error state on re-enabling RX. If previous transmission ended with
an error it should not impact next receiving session.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-18 11:14:58 +02:00
Petar Susac e3cacf7390 drivers: audio: mpxxdtyy: Handle PCM block sizes of more than 1 ms
The Open_PDM_Filter_64/128() functions of the third-party OpenPDMFilter
library are designed to handle a fixed PCM block size of 1 ms of audio.
Allow the MPxxDTyy drivers to use a block size of more than 1 ms by
calling the filtering function multiple times, once for each ms of
audio.

Fixes zephyrproject-rtos/zephyr#69447

Signed-off-by: Petar Susac <petar.susac@byte-lab.com>
2024-04-17 14:40:14 +02:00
Eran Gal e58dfac374 drivers: dac: Add TI DACx0501 driver
Adds a DAC driver for Texas Instruments DACx0501 family of devices

Signed-off-by: Eran Gal <erang@google.com>
Co-authored-by: Martin Jäger <17674105+martinjaeger@users.noreply.github.com>
2024-04-17 14:37:21 +02:00
Andrzej Głąbek 2f4426663a drivers: pinctrl_nrf: Configure QSPI IO3 pin as output set high
... so that the pin is kept in a defined state when the IO3 line is
not controlled by the QSPI peripheral (when the peripheral is disabled
or disconnected from the pin).

The IO3 pin in Quad SPI flash chips usually has dual functionality -
it is an I/O line when the chip is configured to work in Quad (4 I/O)
mode and it is a HOLD# or RESET# line when the chip is configured to
work in non-Quad (2 I/O) mode. In the latter case, it is important that
the line is kept in the inactive (high) state, otherwise communication
with the chip may be disrupted (and this actually happens when e.g.
the spi_flash sample is used on a brand new nRF5340 or nRF52840 DK -
the nrf_qspi_nor driver fails to initialize and the sample just ends
up with the "mx25r6435f@0: device not ready" message).

This commit addresses the problem in the same way that it was done for
the CSN line in commit 6d8172f4e9.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-04-17 14:34:50 +02:00
Daniel DeGrasse 1c5a66f99c drivers: mipi_dbi: add mipi_dbi_release API
Some SPI based displays expect the ability to lock the SPI bus after a
transaction completes, or to hold CS low. In order to accommodate this
within the MIPI DBI layer, add the mipi_dbi_release API, which allows
SPI displays to hold then release the SPI bus used by the MIPI
abstraction layer.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-17 14:30:05 +02:00
Jakub Zymelka 65f743619d drivers: nordic: Align VPR launcher for nRF54L15 FLPR core
Add nRF54L15 FLPR support for nordic_vpr_launcher.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-04-16 18:36:58 +01:00
Jun Lin 011b730b4c driver: reset: npcx: add driver support for reset controller
Nuvoton NPCX chips have reset registers which allow to reset the
peripheral hardware modules. This commit adds the support by
implementing the reset driver. Note that only the reset_line_toggle API
is supported because of the nature of the reset controller's design.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-04-16 09:09:13 +02:00
Krzysztof Chruściński e10ed057e8 drivers: serial: uart_async_to_irq: Move resetting to disabling function
Move resetting of the receiver state to disabling function so that once
uart is disabled there is no data pending in the module.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-16 09:07:55 +02:00
Krzysztof Chruściński 8f89013789 drivers: serial: uart_async_rx: Fix uart_async_rx_reset function
Add missing fields clearing to the resetting function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-16 09:07:55 +02:00
Armin Brauns 3116970516 drivers: disk: add loopback disk driver
This driver creates a disk_access that transparently reads from and writes
to a file in a file system.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-04-15 10:55:29 -07:00
Krzysztof Chruściński 685e6cec9b drivers: serial: nrf: Adapt config dependencies to nrf54h20
DT nodes and compatible had been renamed and Kconfig option was relying
on the names that do not exists.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-15 12:53:09 +02:00
Juliane Schulze ca92f96f41 drivers: lis2dh: read reference register prior to wakeup
Fixes #71371

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-04-15 12:52:39 +02:00
Mike J. Chen 5518b0c698 drivers: i3c: i3c_mcux: retry when timeout occurs in emit stop
Have seen timeout error occur when doing an emit stop at
end of a multiple register write to a mmc5633 mag sensor IC.
The i3c_mcux driver would return on such an error without
doing the k_condvar_broadcast(), since the stop wasn't
technically done (or unclear if it was), and then future
transfers requests waiting on the condvar could be blocked
forever. Add a limited retry when a timeout occurs to
avoid such a stall condition from happening.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-04-13 07:05:36 -04:00
Aleksander Wasaznik a64d20f6f0 Bluetooth: host: sched-lock bt_recv()
`bt_recv` is invoked from the BT long work queue, which is preemptible.
The host uses cooperative scheduling to ensure thread safety.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-04-13 07:05:20 -04:00
Ricardo Rivera-Matos 30b27c73c3 regulator: cp9314: Cleans sleep related preprocesor directives
Removes conditional calling k_busy_wait() on single threaded
systems and uses k_sleep for both single and multi threaded
systems.

Commit e375d82 ("kernel: Implement k_sleep for Single Thread")
eliminated the need to call k_busy_wait() on single threaded
systems in place of k_sleep.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-12 16:52:18 -04:00
Ricardo Rivera-Matos 7afc5932f0 regulator: regulator_common: Cleans sleep related preprocesor directives
Removes conditional calling k_busy_wait() on single threaded
systems and uses k_sleep for both single and multi threaded
systems.

Commit e375d82 ("kernel: Implement k_sleep for Single Thread")
eliminated the need to call k_busy_wait() on single threaded
systems in place of k_sleep.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-04-12 16:52:18 -04:00
Marcin Niestroj 3431d09f09 drivers: wifi: esp_at: fix missing channel in scan result
WiFi scan results were not updated with information about channel, after
scan results parsing was updated. Fix that.

Fixes: a6b06004c2 ("drivers: wifi: esp_at: handle commas in SSIDs during
  scan and status")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-12 16:51:52 -04:00
Guillaume Gautier b567a7db83 drivers: spi: stm32: add pm support
Add power management support for STM32 SPI

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-04-12 13:49:04 +02:00
Jędrzej Ciupis 2b23a52642 boards: nrf53: switch to the network CPU management API
Switch to the network CPU management API from direct nrfx calls.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-12 11:31:47 +02:00
Marc Herbert 17081222e2 drivers: dai: intel: ssp: fix LOG_ERR level / false positive
There's no way this log level was intentional: this line is just the
title / prefix of a multi-line section with mostly LOG_INF statements.

Fixes commit 6423bc3bc8 ("drivers: dai: intel: ssp: Improve logging
output") which was very large hence error-prone.

Fixes SOF bug https://github.com/thesofproject/sof/issues/9026

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-04-11 17:30:20 -04:00
Henrik Brix Andersen 8eded2f76b drivers: can: add can_get_bitrate_{min,max}(), deprecate existing APIs
Since the minimum/maximum supported bitrates are now stored in the common
CAN controller driver configuration struct, retrieving these can no longer
fail.

Add new CAN controller API functions can_get_bitrate_min() and
can_get_bitrate_max() reflecting this and deprecate the existing
can_get_min_bitrate() and can_get_max_bitrate().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Henrik Brix Andersen be54b552d7 drivers: can: fake: specify maximum supported bitrate
Specify a maximum supported bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Henrik Brix Andersen 776f771172 drivers: can: loopback: specify maximum supported bitrate
Specify a maximum supported bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Tom Burdick 4180d70439 dma: Fix error_callback enable/disable confusion
Previously the logic was inverted for error_callback_en where 0 was
enablement and 1 was disable. This was likely done so that the default,
sensibly so, was to enable the error callback if possible. A variety of
in tree users had confused the enable/disable value.

Change the name of the flag to error_callback_dis where the default
remains 0 (do not disable the callback!) and correct in tree uses of the
flag where it seemed incorrect.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-04-11 17:08:10 -04:00
Jilay Pandya eaa2c60220 refactor: adjust spacing by clang formatting
This commit clang-formats the file after the new additions

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-04-11 20:09:59 +02:00
Jilay Pandya 895e889b38 fix: sensor: veml7700
This commit introduces checks in order to sanitize input data

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-04-11 20:09:59 +02:00
Hans Binderup ed06b0ba74 drivers: led: shell: Add devices as sub commands
Currently you have to manually type out the device name for each command.

This commit adds support for <device> entry tab completion and device
lookup if help is enabled.

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
2024-04-11 11:36:09 -05:00
Hessel van der Molen c4850efab5 drivers: interrupt_controller: Enable PINT-irq when deepsleep is not used
DisableDeepSleepIRQ() disables the NVIC irq, while PINT need it to fire an
event when the interrupt is used. So while the interrupt is not used in
DeepSleep mode, it should still be available to be used.

Signed-off-by: Hessel van der Molen <hvandermolen@dexels.com>
2024-04-11 11:28:52 -05:00
Aditya Ganesh 9b17a952f6 drivers: can: can_stm32_bxcan.c: Failed to exit sleep mode
Fixes the issue of CAN failing to exit sleep mode
inside can_stm32_init() when a software reset is done.
For stm32 the CAN is first made to enter initialization
mode first and then made to exit the sleep mode.

Signed-off-by: Aditya Ganesh <adityaganesh2k@gmail.com>
2024-04-11 10:34:16 +02:00
Jan Kubiznak ba90f160b9 drivers: adc: adc_ads1119: Fix configuration register access.
The adc_ads1119 driver is unable to overwrite the configuration register,
the chip therefore always works with its default settings. Register access
macros are fixed by this commit.

Fixes: #70091

Signed-off-by: Jan Kubiznak <jan.kubiznak@deveritec.com>
2024-04-11 09:09:20 +02:00
Daniel DeGrasse 6294f4b541 drivers: usb: usb_dc_mcux: add case for RW6xx SOC series
Add case for RW6xx SOC series to indicate which device controller is in
use.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-11 09:09:00 +02:00
David Leach 00b46686b1 drivers: lpc55s36: Remove deprecated CSS driver
CSS was deprecated from the mcu-sdk. Removing driver from lpc55s36
to clear build error.

This is a temporary patch to remove the build error.

Fixes #69961

Signed-off-by: David Leach <david.leach@nxp.com>
2024-04-10 14:11:34 -04:00
Marcin Niestroj 424ea9f5e4 drivers: wifi: esp_at: do not connect socket on bind(INADDR_ANY)
All connect() syscalls result in EISCONN error, since underlying
_sock_connect() is attempted to be called twice. Once from net_context.c'
bind_default() (with INADDR_ANY) as part of esp_bind() and second time as
part of esp_connect().

Do not call _sock_connect() from esp_bind(INADDR_ANY), which happens as
part of connect().

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 12:23:12 -05:00
Marcin Niestroj ea44e2715a drivers: net: nsos: update unwatched file descriptor with poll()
zsock_poll_internal() iterates through all fds to call
ZFD_IOCTL_POLL_UPDATE on them. In cases when -EAGAIN is returned from one
of such syscalls (which happens for example for TLS sockets when in the
middle of a TLS handshake) whole fds array is iterated once again. This
means that ZFD_IOCTL_POLL_UPDATE can be called more than once for a single
preceding ZFD_IOCTL_POLL_PREPARE operation. This resulted in error in
nsos_adapt_poll_remove() call, which was not intended to be called twice.

In case ZFD_IOCTL_POLL_UPDATE is called second time, update 'revents' just
by calling poll() syscall on the host (Linux) side with 0 timeout.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 11:30:04 -04:00
Marcin Niestroj 7c506fad6b drivers: net: nsos: fix error message on EPOLL_CTL_DEL error
Fix a copy-pasted error message to reference proper epoll_ctl() operation.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 11:30:04 -04:00
Lyle Zhu 97fcbc905b drivers: memc: fix FlexRAM bank cfg issue
From IMXRT1170RM.pdf, iomuxc_gpr->GPR17 is
used to configure FlexRAM bank 0~7.
iomuxc_gpr->GPR18 is used to configure
FlexRAM bank 8~15.

Set low 2 bytes to iomuxc_gpr->GPR17.
Set high 2 bytes to iomuxc_gpr->GPR18.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-04-10 11:28:32 -04:00
Armando Visconti 38738265b9 drivers/sensor: use sensor APIs to convert to units
Make use of sensor_ug_to_ms2() and sensor_10udegrees_to_rad() APIs
to convert from raw values into proper units (i.e. m/s^2 for accel
and rad/s for gyro).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-04-10 15:55:32 +02:00
Seppo Takalo 41d70de91e drivers: eth: stellaris: Fix build error
Apparently there was a typo in the last commit.
Looks like it was refactored without trying to build.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-04-10 15:55:13 +02:00
Francois Ramu 01684df03a drivers: flash: stm32 ospi flash driver the correct erase instruction
Use the most adapted instruction for the sector erase command
It can be 0x20 or ox21 or 0x21DE in octo - DTR mode.
The value is given by the SFDP table and  filled in the erase_types
 table the during the SFDP discovery process.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-10 08:00:53 -04:00
Dominik Ermel 5a0ecb9641 flash: Move dependency on FLASH_PAGE_LAYOUT where it belongs
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
 FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-10 10:01:40 +02:00
TOKITA Hiroshi e678a6247d drivers: serial: rpi_pico: Migrate to pl011 driver
RaspberryPi Pico's UART can be operated with the pl011 driver.
Replace it with this.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 10:01:25 +02:00
TOKITA Hiroshi e93cf224b6 drivers: serial: pl011: Add err_check function
Implementing err_check function by porting from
rpi_pico implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 10:01:25 +02:00
TOKITA Hiroshi dd84e8db26 drivers: serial: pl011: Use clock control to determine frequency
If a clock control device is set in the `clocks` property,
it is used to determine the frequency.
If `fixed-clock` is set for the clocks, we use that value as is.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 10:01:25 +02:00
TOKITA Hiroshi 80b8ef80b3 drivers: serial: pl011: Add capability for handling reset device
Reset the device on initializing if the node inherits
`reset-device.yaml`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 10:01:25 +02:00
TOKITA Hiroshi 155fee5924 drivers: serial: pl011: Introduce macros to separate device-dependent code
Introduce the `COMPAT_SPECIFIC_...` macros to determine the function name
from the compatible name.
These macros allow the isolation of device-dependent code in a generic way.

For example, if the compatible name is `ambiq,uart`,
The `COMPAT_SPECIFIC_DEFINE` macro is replaced by `AMBIQ_UART_DEFINE`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 10:01:25 +02:00
Henrik Brix Andersen f7b92f1eae drivers: can: shell: use CAN_STD_ID_MASK/CAN_EXT_ID_MASK
Use CAN_STD_ID_MASK/CAN_EXT_ID_MASK instead of
CAN_MAX_STD_ID/CAN_MAX_EXT_ID.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-04-10 10:00:59 +02:00
Nazar Palamar a83d2dad8d wifi: airoc: remove dependency on CYHAL
Removing dependency on cyhal in airoc wifi driver.

It need to build airoc wifi driver with different than
PSoC 6 Soc like STM32

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-04-09 16:57:49 +02:00
Jędrzej Ciupis 774dd16555 drivers: ieee802154: gracefully handle invalid Ack timestamp
The nRF IEEE 802.15.4 driver might report a received Ack frame with
invalid timestamp, if the timestamp could not have been taken. The upper
layers are not prepared to handle such a case as they expect that for a
received frame, the timestamp is always present and valid.

This commit detects this situation and handles it gracefully by
reporting the transmission as failed as if no Ack was received.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-09 07:37:10 -04:00
Benedikt Schmidt 888d071fe7 drivers: sensor: implement output diagnostics sensor for TLE9104
Implement a sensor for the output diagnostics of the power train
switch TLE9104.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-04-09 11:07:27 +02:00
Benedikt Schmidt 84a40778af drivers: gpio: split up driver for TLE9104 into a MFD
Split up the driver for the power train switch TLE9104 into a
MFD and GPIO.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-04-09 11:07:27 +02:00
Axel Haslam 11e50e750e drivers: usb: stm32: Dont disable ULPI clock on low power
When running the cdc_acm demo on a board with an external ULPI
phy, the device is unable to enumerate:

usb 1-1.8.3.1: new full-speed USB device number 51 using ehci-pci
usb 1-1.8.3.1: device descriptor read/64, error -32
usb 1-1.8.3.1: device descriptor read/64, error -32

the console shows:

[00:00:00.001,000] cdc_acm_echo: Wait for DTR
[00:00:00.007,000] usb_cdc_acm: Device suspended
[00:00:00.902,000] usb_cdc_acm: Device resumed
[00:00:00.902,000] usb_cdc_acm: from suspend
[00:00:25.526,000] usb_cdc_acm: Device suspended

By not disabling the ULPI clock in low power, the usb enumeration
is working and we can run the cdc_acm demo. While touching
this code, add some comments to clarify the macro nesting.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
2024-04-09 11:07:14 +02:00
Jiafei Pan 46ce8741bd clock: mcux_ccm: add gpt ipg clock
GPT IPG clock is using GPTx_CLK_ROOT.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-09 11:06:24 +02:00
Jiafei Pan 6a9407ede4 drivers: counter: gpt: enable MMIO memory mapping
Map the device memory in case of running with MMU on Cortex-A
Core.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-09 11:06:24 +02:00
Laurentiu Mihalcea 399c2cba65 nxp: imx8ulp: enable pinctrl
This commit enables pinctrl on i.MX8ULP. This includes:
	1) Adding `pinctrl_soc.h` header file.
	2) Adding DTS node for IOMUXC1, which is one of the
	IPs responsible for managing the 8ULP pads.
	3) Adding .dtsi with pin definitions. For now, only
	the LPUART7 pads are added to this file because this
	is going to be the only consummer for now.
	4) Modifying the `pinctrl_imx.c` driver to work for 8ULP.
	5) Enabling the `CONFIG_HAS_MCUX_IOMUXC`, which is a
	dependency of `CONFIG_PINCTRL_IMX`.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-09 11:06:14 +02:00
Laurentiu Mihalcea d42dfc36d7 drivers: pinctrl: Kconfig.imx: enable PINCTRL_IMX by default
Currently, when using the `pinctrl_imx.c` driver one has
to manually enable `CONFIG_PINCTRL_IMX` even if the pinctrl
node using the driver is enabled. This is redundant and prone
to error as one would expect the driver to be enabled when
the node is also enabled.

This commit fixes the issue by enabling `CONFIG_PINCTRL_IMX`
by default and adding a new dependency on the state of the
pinctrl node (i.e: node needs to be enabled for the configuration
to also be set to `y`).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-09 11:06:14 +02:00
Nikodem Kastelik 835f3bef70 drivers: pwm: add support for nRF54 devices
Add PWM instances found on nRF54H20 and nRF54L15 devices,
so that PWM driver can be utilized on these.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-09 11:05:46 +02:00
Rob Newberry 3114ccf568 GNSS: Increase size of hdop
The valid range of hdop (horizontal diffusion of precision) goes
from 0-100000, but because we are using a uint16_t, we truncate
anything above UINT16_MAX.

This fix changes the size of the hdop member to a uint32_t, which
allows us to capture valid (but admittedly very poor) readings.

Signed-off-by: Rob Newberry <rob@zenomoto.com>
2024-04-09 11:05:38 +02:00
Jamie McCrae 2ae1a978ae drivers: sensor: ite_cvmp_it8xxx2: Move init priority into if check
Moves a Kconfig that appears everywhere in the wrong place so that
it is enclosed if if statment check, so it only shows for device
that have the driver enabled

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-08 18:17:52 -05:00
Nicolas Goualard d9fd292f4b drivers: input: CHSC6X Driver
Added a driver for the CHSC6X chip used on the
Seeed Studio Round Display for Xiao

Signed-off-by: Nicolas Goualard <nicolas.goualard@sfr.fr>
2024-04-08 09:28:36 -04:00
Marek Matej 7236321743 drivers: clock_control: esp32: Multiple fixes
- update the console configuration defines references
- add missing header file with flash capabilities
- replace all console wait-until-ready calls by single one

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Maureen Helm d2dfb8e8d7 drivers: sensor: meas: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm b6fd6eafa1 drivers: sensor: asahi_kasei: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 3127ffb441 drivers: sensor: espressif: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 1b1954649b drivers: sensor: infineon: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 5d79eced22 drivers: sensor: honeywell: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm eedccf7e96 drivers: sensor: aosong: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 8e46dc01ba drivers: sensor: vishay: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 77a53a21b1 drivers: sensor: seeed: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm b52d5e20a1 drivers: sensor: rohm: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm addfa22b08 drivers: sensor: nuvoton: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 51e6cbddba drivers: sensor: nordic: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm ec105cbf67 drivers: sensor: ite: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 2fc36432e6 drivers: sensor: wsen: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm fab99bd641 drivers: sensor: sensirion: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 5df44e43d6 drivers: sensor: ams: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm b2b2d704f4 drivers: sensor: ti: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm a2ef60e9bc drivers: sensor: silabs: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 1cfa6d918a drivers: sensor: nxp: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm e09398d5e0 drivers: sensor: microchip: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm c02e3aa47a drivers: sensor: maxim: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 5b9454f520 drivers: sensor: st: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 6320a96730 drivers: sensor: bosch: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Maureen Helm 8714f53188 drivers: sensor: adi: Move to vendor subdirectory
Organizes sensor drivers by vendor to distribute maintainership
responsibilities.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-04-08 09:14:06 -04:00
Adam Berlinger 91acd6c1e0 drivers: timer: add support for LPTIM on STM32H5
Added support for LPTIM1/2 for STM32H503 and
LPTIM1 to LPTIM6 for STM32H56x/STM32H57x devices

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-04-08 15:55:24 +03:00
Adam Berlinger 0717d4789d drivers: timer: remove reset release for lptim
The LL_APBx_GRPn_ReleaseReset clears reset bit in RCC,
however this bit is reset by default. Code that set
this bit was removed in previous commit
0856e99155
Keepint the autonomous clocks for STM32U5 family.

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-04-08 15:55:24 +03:00
Armin Brauns e69ce5bb43 usb: stm32: clarify calculation of FIFO sizes
Magic constants throughout the code made this difficult to reason about,
especially with two different units of measurement (bytes and words) at
play.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-04-08 15:17:55 +03:00
Armin Brauns c4815254c0 usb: stm32: fix calculation of TX FIFO sizes
The RX FIFO size is in words, so needs to be subtracted from the total
memory size *after* it's divided by 4.

Fixes #70789.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-04-08 15:17:55 +03:00
Daniel DeGrasse 8ffd1e2f53 drivers: display: add driver for ST7796s display
Add driver for ST7796s display. This is a MIPI DBI display controller,
with a frame memory of 320x480x18 pixels. Support for 4 wire SPI mode is
implemented using the MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-08 09:04:06 +02:00
Andriy Gelman 8372df0a48 drivers: can: mcp251xfd: Add can statistics support
Adds support for tracking CAN bus errors when CONFIG_CAN_STATS=y

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-04-06 14:23:06 +03:00
Jose Alberto Meza b5778f1b38 drivers: gpio: mec172x: Add message to warn about pins not in GPIO mode
Warn about potential device tree errors for cases when driver's
client tries to configure a pin as GPIO but which is not
in GPIO mode.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-04-05 23:47:32 +03:00
Lukas Gehreke 5f6a68a03b drivers: flash: Added buffered write for addresses in flash on rp2040
It is impossible to perform flash reads during a flash write. When the
data to write to flash lies in the flash itself, it is buffered in ram
before writing.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-04-05 10:56:21 -05:00
Lucas Tamborrino fe57a12cf2 drivers: esp32: update to hal_espressif v5.1
Modify necessary drivers to meet updated hal.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-05 13:39:53 +02:00
Fin Maaß 3ffad11b22 drivers: net: use sys_rand8_get
use sys_rand8_get() instant of sys_rand32_get().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Fin Maaß 19df6cd9b1 drivers: modem: use sys_rand_get directly
use sys_rand_get() directly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Fin Maaß 792cbb9a24 drivers: ethernet: use sys_rand_get directly
use sys_rand_get() directly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Fin Maaß 9e8e21b36f drivers: ieee802154: use sys_rand_get directly
use sys_rand_get() directly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Krzysztof Chruściński 7bededbc29 drivers: serial: nrfx_uarte2: Fix re-enabling the receiver
Move providing of the first buffer in uart_rx_enable from that
function to the callback which is called from nrfx_uarte_rx_enable
context. By doing this nrfx_uarte_rx_buffer_set is called when
RX configuration flags are already known to the driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-05 12:21:58 +02:00
Ali Hozhabri 0252b6ff88 drivers: bluetooth: hci: Support reading long events in ST SPI v1
Provide support for reading events longer than 127 bytes in
ST SPI protocol v1 by splitting them into several SPI transactions.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-04-05 12:21:17 +02:00
Ali Hozhabri 7392bf284c drivers: bluetooth: hci: Support ISO packets in ST HCI SPI BT driver
Add support for ISO packets in ST HCI SPI BT driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-04-05 12:21:01 +02:00
Daniel DeGrasse 2206085cd8 drivers: mipi_dbi: introduce NXP LCDIC driver
Introduce NXP LCDIC driver using MIPI DBI class. This peripheral
supports 8080 and SPI 3/4 wire mode, although only SPI 4 wire support is
currently implemented. The driver supports DMA and interrupt driven
transfers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse e6a1337726 drivers: clock_control: clock_control_mcux_syscon: add LCDIC clock
Add LCDIC clock support to MCUX SYSCON clock driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Emilio Benavente dbd1da973b dts: arm: nxp: nxp_mcxn94x: Added watchdog node
Added the dts node for the
wdt watchdog and updated the
clock frequency.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-04-04 23:58:01 +03:00
Jamie McCrae 554ed2235c drivers: sensor: mpu6050: Add support for MPU6500
Adds basic support for using this driver with a MPU6500 device

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-04-04 15:22:08 -05:00
Georgios Vasilakis 7a8d454e22 soc: nordic: Refactor soc_secure.h
The soc_secure_* function are used by the non-secure application
to access hardware resources which are mapped as secure.
Using these functions for hardware resources mapped as non-secure
is missleading.

We have some soc_secure_* functions which read FICR values.
In nRF91 and nRF53 platforms this made sense since FICR
has hardware fixed mapping as secure.
For nRF54 though the FICR has hardware fixed mapping as non-secure.

This change refactors the soc_secure.h to exclude the functions
which read FICR values from being included when FICR is mapped as
non-secure.

Also updates the hwinfo and ieee802154 drivers to adjust to this change.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2024-04-04 13:17:13 -05:00
Jamie McCrae d3edd34df3 drivers: sensor: dht: Add lock IRQ option
Adds an option that allows for locking all interrupts when reading
the data from this sensor, this can be used alongside systems like
Bluetooth to vastly increase chances of getting a reading from the
sensor successfully, at the risk of losing Bluetooth packets.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-04-04 13:16:18 -05:00
Jukka Rissanen 7fdebb5a91 drivers: net: ppp: Add packet capture support
User is able to enable packet capture for low level HDLC data
frames received from and sent to network. This data can sent to
remote system for analysis. The captured data is encapsulated
into Linux cooked mode SLL packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Marcin Niestroj 226f247006 drivers: net: nsos: fix compatibility with CONFIG_POSIX_API=n
Improve code consistency and fix CONFIG_POSIX_API=n compatibility with use
of ZSOCK_* and DNS_* macros.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-04 17:01:38 +02:00
Ilia Kharin 828a0c04a1 drivers: input: pinnacle: add driver for trackpad
The initial version of an input driver for Cirque Pinnacle ASIC supports:
 * Setting sensitivity
 * Choosing between relative and absolute modes
  * Relative mode
   * Primary tap
   * Swapping X and Y
  * Absolute mode
   * Setting number of idle packets
   * Clipping coordinates outside of active range
   * Scaling coordinates
   * Inverting X and Y coordinates

Signed-off-by: Ilia Kharin <akscram@gmail.com>
2024-04-04 09:46:06 +01:00
Kyle Dunn a846b81d58 drivers: sensor: lis2dux12: Add lis2dux12 driver
Adds support for the STMicroelectronics LIS2DUX12 3-axis accelerometer.

Signed-off-by: Kyle Dunn <kdunn926@gmail.com>
2024-04-04 09:45:49 +01:00
Declan Snyder fd1a129a3e drivers: eth_nxp_enet_qos: Fixed unused variable
Fix warning caused by unused variable when
CONFIG_NET_STATISTICS_ETHERNET is disabled.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-04 10:14:30 +02:00
Luis Ubieda f643f3a6cf drivers: serial: bt: Make TX flush non-deferrable
To prevent postponing data flush until filling fifo. Now the flush will
occur at the scheduled time, regardless of subsequent poll_out reqs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-03 20:42:01 -04:00
David Brown f7e64c8703 drivers: serial: rpi_pico: Enable uart FIFO
A few lines above this change explicitly enable the UART FIFO.  Then this
line, goes and disables it.  This seems to be from a workaround where the
parity and stop bits are not coming in correctly in the config.  Fixing
that will be another patch.  But, the FIFO should always be enabled.  This
is visible when trying to use bit rates that are reasonably fast.  Even in
IRQ mode, with a sufficient bit rate, bytes are readily dropped.

Tested on a Sparkfun Promicro rp2040 board.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-04-03 15:38:29 -05:00
Henrik Brix Andersen 36f4ef70a9 drivers: can: transceiver: gpio: automatically select GPIO
Automatically select CONFIG_GPIO when the GPIO-controlled CAN transceiver
driver is enabled. Update board configurations to benefit from this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-03 21:12:32 +01:00
Steven Chang e44c0987b9 driver: watchdog: prevent floating point usage
Prevent the use of floating point operations

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-04-03 21:12:17 +01:00
Laurentiu Mihalcea bd9b3c67b2 drivers: dai: add driver for NXP's ESAI
This commit introduces a new DAI driver used for NXP's ESAI IP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-03 16:18:50 +01:00
Erwan Gouriou fa4ab81f40 drivers: clocks_control: stm32wba: Fix erratum 2.2.4
Cf Errata sheet, 2.2.4: With HSE active, switching the system clock source
from any other source to HSI, spuriously deactivates HSE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-03 15:38:55 +01:00
Erwan Gouriou 930e03fdfd drivers: clock_control: stm32wba: Fix chain loaded applications case
In case of chain loaded application with PLL set as the sysclk source,
directly exit the init function.
This also applies to exit from stop mode and was tested successfully.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-03 15:38:55 +01:00
Pieter De Gendt fcc729f240 drivers: spi: Support NXP i.MX ECSPI
Add a driver implementation for NXP's Enhanced Configurable SPI.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-02 21:03:47 -04:00
Erik Andersson 72503ab386 drivers: display: add driver for frida,nt35510
For now DSI settings are hard-coded for the specific
LCD module used on the STM32H747I Discovery board

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Erik Andersson 36e2b40e38 drivers: dsi: stm32: add additional dt options
To support the NT35510 display, some additional
options needs to be configurable in the STM32
DSI peripheral

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Declan Snyder 62b56bb313 drivers: ethernet: Add NXP ENET QOS Driver
Add driver for NXP ENET QOS Ethernet

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Declan Snyder e90fa0399b drivers: mdio: Add NXP ENET QOS MDIO Driver
Add driver for NXP ENET QOS MDIO

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Declan Snyder 8fdacb5e45 drivers: clock_control_mcux_syscon: Add ENET QOS
Add code for ENET QOS clocking in clock control driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Mahesh Mahadevan cbbe33996e drivers: i2c: Use the NXP Flexcomm driver for interrupt handling
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPI2C interrupt handler.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan 678e65093b dts: nxp_lpi2c: Interrupts is no longer a required property
Some NXP SoC's have a FlexComm interface that manages the
interrupts.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan 6199bd9c61 drivers: i2c: MCUX SDK LPI2C driver sometimes uses instance number
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan a9fea59281 soc: nxp: Select the MFD Kconfig when LPFlexcomm is enabled
LPFlexcomm is a MFD device hence select this Kconfig whenever
it is enabled.
Remove the selection from the individual driver Kconfig files.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Jason Yu d5b1a7d929 driver: input: gt911: Support case that no dedicated reset pin
On some boards, there is not dedicated reset pin for GT911, it might
be the same pin with display IC, or might be tighted to a high level
voltage.
This patch makes the rst_gpio can be empty.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2024-04-02 15:35:50 +01:00
Laurentiu Mihalcea f4c73105e5 drivers: dai: sai: add pinctrl support
Add support for performing pinctrl operations. For now,
the only supported operation is applying the pinctrl default
state. Pinctrl is left optional to allow for scenarios in which
this is not required (e.g: AMP system in which another
OS configures the pinctrl).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:31:15 +01:00
cyliang tw 820a70242f drivers: spi: support for Nuvoton numaker m2l31x
Update m2l31x.dtsi for spi support and update spi_numaker.c
for dummy TX data.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-04-02 14:30:57 +01:00
Tim Lin 0967f13c3f ITE: drivers/i2c: Add a property selecting to drive I2C recovery mode
Add a property to select the push-pull GPIO output type to drive the
I2C recovery. The default is open-drain.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-04-02 14:30:48 +01:00
Laurentiu Mihalcea 139fcfa5f7 drivers: clock: clock_control_mcux_pcc: add support for 8ULP
This patch add supports for performing clock-related operations
on i.MX8ULP. This consists of:
	1) Adding a LUT.
	2) Adding an initialization function meant to tell the
	HAL which rate the XTALs on the boards (EVK and EVK9)
	run at. This is used by the functions that compute the
	rate of an IP clock.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:30:27 +01:00
Laurentiu Mihalcea 9afd8c9054 drivers: clock: clock_control_mcux_pcc: rework clock ID computation
In the case of some SOCs simply using the PCC base and clock
offset to build the clock ID passed to the HAL is not sufficient
since the clock ID may also contain some flags (e.g: see the case of
i.MX8ULP). For such SOCs, we change the semantic of the value passed
from the DTS (which is simply called "name", thus allowing us to
interpret it differently from SOC to SOC) to an index in a LUT
used to fetch the clock ID that can be safely passed to the HAL.

For compatibility reasons, we also keep the old way and use it
for SOCs which don't define such a LUT. The driver will decide
which method to use based on the LUT size (i.e: if 0, use the
old way, if != 0 use the new way).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:30:27 +01:00
Renato Soma da7b65735e drivers: sensors: Add driver for LM35
Add a driver implementation for the LM35 ADC temperature sensor

Signed-off-by: Renato Soma <renatoys08@gmail.com>
2024-04-02 14:29:42 +01:00
Iuliana Prodan 1f55be8b42 nxp: imx8: change CONFIG_SOC_<name> to match the value
Change, for audio DSP and M7 cores, SOC_<name> to match
the exact soc name.
Update the board files accordingly.

These configs are used in SOF and NXP_HAL, so change
sha for these modules.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-04-02 10:41:07 +03:00
Luis Ubieda 92e0d0bbfc bluetooth: nus: Change Kconfigs prefix to BT_ZEPHYR_NUS
To prevent future conflicts with NCS's NUS implementation, whose
Kconfig's are prefixed with BT_NUS.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-02 10:36:01 +03:00
Jeppe Odgaard 17b1912bc3 drivers: ad559x: add i2c bus support
Rename ad5592 files in dts, driver and include to ad559x and add support
for I2C bus which is required for AD5593.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:18:47 -05:00
Jeppe Odgaard 2a5dc2a0df drivers: sensor: qdec_stm32: add optional encoder mode
Add support for setting encoder mode in dts.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:10:54 -05:00
Jeppe Odgaard 06a4d4b02f drivers: sensor: qdec_stm32: clang-format qdec_stm32.c
Run clang-format on qdec_stm32.c.

This moves '\' in macros to line index 100, which ensures '\' still
aligns if a macro is edited with a new line that is longer than the
previous longest line.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:10:54 -05:00
Boris Mulder f87143d919 drivers: sensor: tmp108: Handle negative values correctly
Negative temperatures were converted to the sensor_value struct
incorrectly.
This fixes the causes: signed/unsigned mixups and integer overflows.
Also clarified temperature calculation using multiplier/divisor config
values.

Fixes #68240

Signed-off-by: Boris Mulder <b.mulder@innoseis.com>
2024-03-29 15:09:25 +00:00
Armin Brauns f4c596ae28 drivers: add iis328dq stmemsc driver
Based on the iis2dlpc driver, with some significant differences in
interrupt handling.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Armin Brauns 808d897ca8 drivers: iis2dlpc: fix typo in function name
iis2dlpc, not ii2sdlpc.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Armin Brauns b49116c7eb drivers: iis2dlpc: fix typo in log message
Probably copy-pasted from another line.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Jakub Michalski e92c04cbeb drivers: gpio: add interrupt support to renesas rzt2m gpio
Add interrupt support to renesas rzt2m gpio driver

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
2024-03-29 10:56:55 +01:00
Vit Stanicek 903bbefef3 drivers: dma_mcux_lpc: Fix omitted interrupt config
Add the invocation of an interrupt config function
(config->irq_config_func). Absence of this call results in the DMA
driver not being able to service interrupts raised by the DMA
peripheral.

This case was observed on the i.MX RT685's HiFi 4 DSP domain, where DMA
was not functional because of this.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-03-28 16:04:34 -05:00
Henrik Brix Andersen bfad7bc00e drivers: can: mcan: enable transmitter delay compensation when possible
Enable Transmitter Delay Compensation whenever the data phase timing
parameters allow it.

Fixes: #70447

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-28 09:41:53 +00:00
Henrik Brix Andersen ec75dc2232 drivers: can: mcan: remove broken transmitter delay compensation support
Remove broken support for Transmitter Delay Compensation from the Bosch
M_CAN backend driver.

Even if this was enabled via Kconfig, the TDC bit in the DBTP register set
during driver initialization is overwritten in can_mcan_set_timing_data(),
turning TDC off.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-28 09:41:53 +00:00
Jukka Rissanen c4a4506b4a drivers: ethernet: nxp_s32_netc: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 7825ce2418 drivers: ethernet: e1000: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen c5dc6542fd drivers: ethernet: xmc4xxx: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen bcb34705bb drivers: ethernet: nxp_enet: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 813af655c5 drivers: ethernet: nxp_s32_gmac: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 4e7565dceb drivers: ethernet: mcux: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen e45a8c9104 drivers: ethernet: enc28j60: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 898a0d8ab8 drivers: ethernet: sam_gmac: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen f9b8608d2b drivers: ethernet: stm32: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen aca5f43ecc drivers: eth: native_sim: Remove VLAN handling
Virtual LAN logic is now done in Ethernet L2 so no need to manipulate
VLAN packets in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Declan Snyder 353c6a66cb dts: bindings: ethernet: Remove fixed link
Remove ethernet-fixed-link binding as it is redundant with the
phy bindings. Clearly, ethernet does not work without the L1
layer, which is a phy device, or an integrated mac/phy device,
and all of these things should be described properly in DT.
The schema did not even come with a compatible, meaning nodelabels
were hardcoded into the drivers, which is unacceptable.

- Remove the binding file for ethernet-fixed-link.yaml.
- Remove fixed link functionality from the nxp s32 gmac driver.
  Since this functionality is already covered by the phy support,
  it is redundant.
- Remove fixed link include from the s32 gmac binding.
- Remove fixed link include from the nuvoton numaker binding.
  As far as I can tell the corresonding driver does not even
  use it anyways, and I did not find any board with this device
  that describes a "fixed link".
- Move the definition into the nxp,kinetis-ethernet binding
  as the eth_mcux driver, which is already being deprecated,
  does use this, contain the debt to the legacy driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-27 15:18:54 +00:00
Raffael Rostagno b17712364c drivers: systimer: Removed mention to ESP32C3
Removed mention to C3 SoC, so files are not SoC specific. Ready for C6
integration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-03-27 15:18:45 +00:00
Fabian Kainka 24c03bfacb serial: uart_native_tty: Polling thread fix
Addresses an issue where attempts to transmit data fail.
The identified cause of this failure is the handling of the
`rx_irq_enable` and `tx_irq_enable` flags. The `else if` handling the
`tx_irq_enable` was replaced by an `if` so both flags can be true,
and both functions can be called. This fix was tested with the
`cellular_modem` example successfully.

Signed-off-by: Fabian Kainka <kainka@cognid.de>
2024-03-27 15:18:11 +00:00
Andy Sinclair c7f59c9e40 drivers: mfd: npm1300: Added long press reset config
Added configuration of long press reset functionality.
Includes ship/hibernate to wake debounce time and
disabled/one_button/two_button mode selection.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-27 14:32:17 +00:00
Angelo Dureghello e0a1e69262 drivers: ethernet: eth_adin2111: use NET_ETH_ADDR_LEN
Use new NET_ETH_ADDR_LEN definition.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 180c423c80 drivers: ethernet: eth_adin2111: fix port to port_idx
Fix all references of port to port_idx to be uniform.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 569ebc247a drivers: ethernet: eth_adin2111: enable promiscuous mode
Add promiscuous mode support.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 2cebc0f307 drivers: ethernet: eth_adin2111: extend api support
Extend api support with new functionalities.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello dd8072abb3 drivers: ethernet: eth_adin2111: adjust multicast filter
Multicast rule as 01:00:00:00:00:00 is actually shadowing
broadcast rule, enabling broadcast packets to be received/forwarded
even if broadcast rule/filter is not set.

Set the multicast filter with an appropriate mask.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Nathan Olff 13deb0365c drivers: sensor: dht20: implement new driver
The DHT20 sensor is a temperature and humidity sensor that uses I2C to
communicate with a microcontroller. The DHT20 sensor is Aosong.

use standard crc

update description to add reference to AHT20 and AM2301B

clean code, use defines and bit manipulation

add dht20 to i2c test suite for build tests

update bit manipulation

use more defines instead of raw numbers

add bindings to allow aht20 or am2301b to be used in devicetree

in all 3 cases, the same dht20.c driver is compiled

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-03-27 14:29:54 +00:00
Mahesh Mahadevan 8b7cff7d33 drivers: spi: Use the NXP Flexcomm driver for interrupt handling
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPSPI interrupt handler.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan e5ecc96b3c dts: spi: Interrupts in NXP LPSPI is no longer a required property
Some NXP SoC's have a FlexComm interface that manages the
interrupts.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan 7c431dde18 drivers: spi: NXP LPSPI driver sometimes uses instance number
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan 55abfcb31e drivers: dma: Update NXP EDMA driver for version 4
1. Update EDMA driver for version 4
2. The DMAMux module is not always present. Use the
   feature define to make this optional.
3. Use the EDMA_SetChannelMux API for SoC's that supports
   this feature.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Lukasz Madej a64a64b3c2 drivers: charger: charger_max20355: handle thermistor mode
Allow to configure thermistor monitoring mode.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej bda4c18fc9 drivers: charger: charger_max20355: handle recharge threshold
Allow to configure recharge threshold.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej f1b35a5c78 drivers: charger: charger_max20335: handle minimum system voltage
Allow to configure minimum system voltage threshold parameter.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej e43f6f5d2a drivers: charger: charger_max20335: rename register related macros
Rename macros related to charger harware registers to make them
consistent.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej c7c168b378 drivers: charger: charger_max20335: rename macro to reduce ambiguity
The ILimCntl name can be understood as both register name and its field
name. Therefore it is better to change macro name so it contains both
register and field name. Second field of this register will be also
utilized by this driver in the future and new code will be aligned to
this naming convention.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej b2c460f274 drivers: charger: charger_max20335: fix linear range usage
Fix validation of `linear_range_get_index()` results.
The function can resturn both 0 or -ERANGE but -EINVAL is never
returned. Use comparison against 0 to make the validation robust.

Use valid maximum index for the linear range. The 0x0C is reserved
value and should not be used. Therefore replace it with 0x0B.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej 82169bba15 drivers: charger: charger_max20335: drop redundant validation
`max20335_get_constant_charge_current()` and
`max20335_set_chgin_to_sys_current_limit()` functions has redundant input
values validation. Drop not important ones to make the code clean.
While on it remove `max20335_get_constant_charge_voltage()` function
since it become useless.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej d791526dd8 drivers: charger: charger_max20355: fix configuration
Maximum charging current is selected with an external resistor in
the MAX20335 charger. Therefore it is not possible to configure it
with software directly. There is only a capability to limit current
set with hardware but configuration of the limiter is not
straight-forward.

To reflect real functionality, drop usage of
`constant-charge-current-max-microamp` property as an required one and
use custom `chgin-to-sys-current-limit-microamp` instead.
Use enum in binding file to signalize improper values at compile time.

Drop support for `CHARGER_PROP_CONSTANT_CHARGE_CURRENT_UA` API property
since this cannot be handled.

The `max20335_get_constant_charge_current()` function become useless so
remove it.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Rick Bruyninckx 9b0510cea9 drivers: led: add output current configuration to ti,lp5562
Add Output current configuration for led channels to the TI lp5562 driver.

Signed-off-by: Rick Bruyninckx <xactme@gmail.com>
2024-03-26 16:17:23 -04:00
Phi Bang Nguyen 64ca263bfd drivers: video: mt9m114: Rework to support more resolutions
Currently, the driver supports only VGA resolution while 480x272 is
needed to match with the display resolution on i.MX RT10XX family.

Also, the current framerate is very low, about 3-4 fps without doing
anything else with the image buffers (just discarding them).

Rework the driver to address the low framerate issue as well as to add
support for 480x272 and 1280x720 resolutions.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Phi Bang Nguyen f17f1d67f8 drivers: video: mt9m114: Drop unused stuffs
Drop unused register macros and coherently use major letters for
register address.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Phi Bang Nguyen c0d52e4837 drivers: video: mt9m114: Run clang format
Run clang format before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Jeff Welder 2f63bc7ac9 modem: modem_cellular: Telit ME910G1 Complete Modem Info
Add missing fields to complete info struct to
chat script for Telit ME910G1. Also for test
suite modem bg95.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Jeff Welder bf910873bc modem: modem_cellular: Add ICCID to Modem Info API
Added missing SIM ICCID case to
Modem Info API.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Immo Birnbaum e9bc58bc75 drivers: gpio: xlnx_axi: fix polling mode
Fix compiler errors and warnings that are issued when compiling this
driver for use without the optional interrupt facilities.

When interrupts are not enabled for any instance of this device,
there's currently a compiler error in gpio_xlnx_axi_pin_interrupt_configure
due to the function's header being located within the ifdef-block for
interrupt-driven operation.

Fully encapsulate the interrupt-related functions
gpio_xlnx_axi_pin_interrupt_configure, gpio_xlnx_axi_manage_callback
and gpio_xlnx_axi_get_pending_int with ifdefs checking for interrupt
mode inorder to remove compiler warnings caused by those functions
being always present so far, while not being used in the API function
pointer table when all instances of this GPIO controller are operating
in polling mode. This circumstance causes a "declared, but not used"
compiler warning for each of those functions.

Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
2024-03-26 11:18:28 -05:00
Aleksander Wasaznik b91728619c Bluetooth: host: remove CONFIG_BT_RECV_BLOCKING
This config selects a variant of the HCI driver interface that spills
out host internals unto the drivers and even the Zephyr controller. It
will now be removed in favor of driver interfaces that hide the
internals of the host.

The new default is `CONFIG_BT_RECV_WORKQ_BT`.

Any references to the removed kconfig are refactored out.

Any out-of-tree driver using the removed interface can be easily adapted
by copying the following implementations into the driver as private
functions:

 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV_PRIO`
 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV`
 - `hci_driver.h:bt_hci_evt_get_flags`
 - `hci_raw.c:bt_recv_prio`

In combination these symbols function as a interface adapter. These
symbols will be removed in this PR in subsequent commits.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-26 11:17:29 -05:00
Fabio Baltieri 55c14e6fa6 input: analog_axis: rework deadzone calibration code
Rework the data scaling algorithm for the "deadzone" mode so that the
deadzone is subtracted from the input rather than from the output. This
makes the whole output range usable rather than making the output jump
from the center value to the minimum deadzone range.

This changes the calibration data structure as well so now all values
refer to the input data, which is more coherent.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-26 11:10:10 -04:00
Fabio Baltieri 1b2bb0dbf2 input: analog_axis: fix the variable name for calibration
Use a coherent name for the calibration data structure variable name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-26 11:10:10 -04:00
Juliane Schulze 5254c153b9 sensor: tmag5273: fix switched mask/value argument in FIELD_GET
This somehow worked without problems during the test runs, but we found a
corner case where this leads to an error.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-03-26 11:04:26 -04:00
Lukas Gehreke 9e06a8a1e6 drivers: uart_pl011: Implemented runtime configure
Implemented runtime configure functions for the driver.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-03-26 11:03:13 -04:00
Tom Burdick 41f1c3a2b7 sensors: Move TDK sensors to a subdirectory
Move all tdk/invensense sensors to a subdirectory named after the
vendor.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-03-26 10:54:27 -04:00
Bartosz Sokolski f4d55e7f68 drivers: nrf_qspi_nor: Add option for 2bit IO
Add missing NRF_QSPI_READOC_READ2IO option handling
to enable 2bit IO

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-03-26 10:47:20 -04:00
Jeppe Odgaard d1d6938a16 drivers: sensors: grow_r502a: remove all unused drv_data
Fix compile warnings cause by removing drv_data in some functions.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Jeppe Odgaard 83957729dd drivers: sensors: add fcx-mldx5 o2 sensor
Add driver for Angst+Pfister O2 sensors FCX-MLD25 & FCX-MLD95 and maybe
more. Tested with FCX-MLD25.

Supports get O2 value, get status, and power management.

Note that in suspended power mode heating output is at 20 %, thus
probably not suited for a battery powered device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Jeppe Odgaard 29cc0e6aed sensor: add SENSOR_CHAN_O2 enum value
Add an enum value to support O2 sensors.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Krzysztof Chruściński 8bc5111c27 drivers: serial: uart_async_rx: Optimize RAM usage
Since there is only one consumer of the data stored in the buffers,
it is enough to have one read index variable which can be stored in
the data associated with the module and not in the buffer space (where
there is a read index for each buffer).

Additionally, we can safely assume that module works with small buffers
so 127 byte limit is enough. Based on that assumption completed flag
can be stored on a single byte together with write index. After this
change, control data for each buffer takes 1 byte (3 bytes previously).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński 17dc3da35d drivers: serial: uart_async_rx: Fix race condition
There was a wrong order of conditions checking. First indexes were
compared and then completed flag was checked. It was possible that
after checking first condition context is preempted and new data
is written to the buffer and completed flag is set. In that case
both conditions are met but data added in preemption is dropped.
In order to avoid that completed flag must be checked first.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński d2bd82eb5f drivers: serial: uart_async_rx: Add return value to consume function
Return availability of free buffers after data is consumed. This
information may be important for the module using uart_async_rx to
schedule next reception if there is a new buffer available.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński 65b42260f7 drivers: serial: uart_async_rx: Add buffer release to consuming function
Add buffer releasing to consuming function to allow better buffer
utilization since buffer is available earlier.

Note that releasing in claiming function is still needed as there
are cases when there are empty but completed buffers and those
need to be consumed in claiming phase.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński ce3d45375e drivers: serial: uart_async_rx: Remove unused field
Removing a field which was redundant. It was only incremented but
never read.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Jordan Yates 71c3c955c1 drivers: flash: spi_nor: use pm_device_driver_init
Use `pm_device_driver_init` to ensure that init is run correctly
regardless of the power state.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-26 10:45:34 -04:00
Dean Sellers e193f922cd drivers: ethernet: enc28j60: Add DT property to set Rx filter
Byte value written to the device's
ERXFCON: ETHERNET RECEIVE FILTER CONTROL REGISTER
Sets the devices receive packet filter, optional. If not set
in device tree previous hard coded value`0xA3` is used.
Uni, multi and broadcast packets with valid CRC are accepted.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2024-03-26 10:03:07 -04:00
Mayank Mahajan 3d81167eaf ADD: GNSS Driver for U-BLOX M10 & Support for UBX Messages
MODEM_UBX: Adds Support for UBX Messages in Modem Subsystem.

GNSS API Supported: get_supported_systems, set_fix_rate, get_fix_rate,
	set_enabled_systems, get_enabled_systems, set_navigation_mode,
	get_navigation_mode.

Boards Tested: MIMXRT1062_FMURT6, VMU_RT1170.

Note: Partial support for U-BLOX Messages is provided as of now.

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-03-26 09:28:36 +00:00
Clement Dysli bc140e1a36 drivers: input: add cf1133 controller touchscreen
The driver allows to use CF1133 controller touchscreen (I2C)

Signed-off-by: Clement Dysli <clementdy@kickmaker.net>
2024-03-26 09:24:43 +00:00
Armando Visconti 8d83b76f84 drivers/sensor: add support to STTS22H temperature sensor
The STTS22H is an ultralow-power, high-accuracy, digital temperature
sensor offering high performance over the entire operating temperature
range. This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/resource/en/datasheet/stts22h.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-03-25 18:40:54 -04:00
Lingao Meng 137efd1c30 drivers: bluetooth: hci: Fix userchan insufficient buf cause dead-loop.
If insufficient buf for given event, will cause dead-loop.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-03-25 18:39:03 -04:00
Mike J. Chen fe4b03baf3 drivers: i3c: i3c_mcux: Fix bug in do_one_xfer
Error check was incorrect, causing wait for complete
not to be done. This can result in emit stop not
working on writes because controller won't do the
stop if it is still busy processing transmit.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-03-25 18:38:31 -04:00
Dominik Ermel 6266dc11a9 drivers: flash: spi nor: Fix missing init of hold pin
There has been missing line initializing the hold pin,
which caused SPI NOR device init to fail with -ENODEV,
if property defining such pin has been present in device
definition.

Fixes #70661

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-03-25 13:26:55 -05:00
Luis Ubieda 3c56af6c87 drivers: serial: bt: Fix Max payload to be transmitted with minimum MTU
As correctly pointed during the initial PR Review, when the MTU-size is
23 the effective payload that can be transferred is MTU-3 = 20. Thus,
this change to be consistent.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-25 13:26:27 -05:00
Daniel Leung 3664ed64c3 arch: move arch_interface.h under zephyr/arch
arch_interface.h is for architecture and should not be
under sys/. So move it under include/zephyr/arch/.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-25 09:58:35 +00:00
Mahesh Mahadevan 4045975c80 drivers: timer: NXP OS Timer updated for low power modes
Add ability to set a wakeup counter in case OS Timer is
disabled in certain low power modes. Also add code to
compensate the tick value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-25 09:35:51 +01:00
Kevin ORourke 9bf0a24f2e drivers: clock_control: stm32: clock_control_on
Make clock_control_on for STM32 behave the same as the HAL,
delaying after enabling peripheral clocks. Otherwise it may return
before the clock is actually enabled, causing subsequent writes to
peripheral registers to be silently ignored.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-03-25 09:31:54 +01:00
Pisit Sawangvonganan 5aa4ae6ed5 drivers: can: stm32: fdcan: refactor register bits remap
Optimize bit remapping in STM32 FDCAN driver by grouping consecutive bits.

Additionally, leverage shared bit mapping between MCAN_IR and MCAN_IE to
consolidate switch cases.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-24 20:56:10 +01:00
Chen Xingyu 7273f212e3 drivers: gpio: dw: Address warning of unused gpio_dw_isr
This commit conditionally masks out `gpio_dw_isr` to prevent a build
warning if none of the instances of this driver are connected to an IRQ.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Chen Xingyu a622407bd3 drivers: gpio: dw: Switch to DT_INST_IRQN_BY_IDX
Switch to using `DT_*IRQN` helpers for obtaining the IRQ number instead of
directly accessing the `irq` cell. This change ensures that the encoded
values for multi-level interrupts are correctly retrieved.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Flavio Ceolin 6b9d01f995 intel_adsp/ace: power: No pending transaction before power gate
Issue an upstream read transaction through uncached memory to flush
out all pending transactions before power down the host domain.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-03-22 21:29:33 -04:00
Declan Snyder 9607543496 drivers: hwinfo: Add RW hwinfo driver
Add RW hwinfo driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00
Mahesh Mahadevan 68ed426751 drivers: flash: Update mcux driver to add support for MCX flash
Add support for the MCX flash

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-22 14:25:31 +00:00
Marcin Niestroj 4f9e3fa1b7 drivers: net: nsos: support blocking accept() and recvfrom()
So far only non-blocking accept() and recvfrom() were suported. This patch
implements blocking behavior, with the use of poll(fd, POLLIN) as helper
mechanism.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 8487fcca5b drivers: net: nsos: implement poll() syscall
Use NSI_HW_EVENT() in order to periodically check for events in host
sockets. Whenever there is a socket event ready to be processed by Zephyr,
raise native_sim (newly introduced) CPU interrupt, so that Zephyr driver
can signal readiness with k_poll().

Maintain a list of Zephyr poll() executions in Zephyr context. Iterate
through them whenever there is some event to be processed.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 483c41d209 drivers: net: nsos: add F_GETFL and F_SETFL support
This allows to use Zephyr TLS subsystem with Native Sim offloaded sockets.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 4317cd4576 drivers: net: nsos: add IPv6 support
Add support for IPv6 socket offloading, next to existing IPv4 support.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj d1adffc123 drivers: net: nsos: add DNS offload support
Extend driver to support DNS by offloading getaddrinfo() and freeaddrinfo()
APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 07edc9a070 drivers: net: nsos: new driver for Native Simulator offloaded sockets
Add driver for 'native_sim' target that implements offloaded socket
networking by the use of host networking stack and wrapped BSD sockets API.

This driver has following advantages over existing networking drivers for
emulated platforms that are already in tree:
 * no TUN/TAP use means that no additional setup is required on the host
   side:
   * possible to use it within unpriviledged Docker containers, either for
     development or in CI
 * possibility to use and test offloaded sockets
   (CONFIG_NET_SOCKETS_OFFLOAD=y) with emulated target, which allows
   to increase tests coverage of this feature, without requirement of using
   hardware

Native Simulator host libc has different error codes than embedded libc
used by Zephyr. Convert between those.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Luis Ubieda 205994b87b drivers: serial: bt: Add UART over NUS Bluetooth driver
Enables usage Bluetooth LE GATT as a serial endpoint to exchange data
using UART APIs. This implementation is compatible with UART Interrupt
Driven APIs and uses the nus-uart device-tree node properties to
configure FIFO buffers for transmitting and receiving. Defining
multiple instances of the driver is possible and it allows implementing
multiple GATT NUS service instances to exchange data as separate serial
endpoints.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Daniel DeGrasse 6b3e14e7d5 drivers: pwm: pwm_mcux_ctimer: use correct clock subsystem ID
With the merge of zephyrproject-rtos/zephyr/pull/70254,
MCUX_CTIMER_CLK_OFFSET is no longer defined nor needed. Remove this from
the macro getting the clock subsystem in the ctimer PWM driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-22 10:23:58 +01:00
Tomasz Bursztyka 7004f373f2 disk/nvme: Update copyright headers
Most of the code is a port of FreeBSD's NVMe's driver, made by Jim
Harris (Intel).

Though all subsequent contributions that happened on this original
driver were made on files copyrighted by Intel, and under BSD-2 clause,
let's update the copyright header to point out Jim's original work and
major contributors were relevant.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-22 09:23:00 +00:00
Johann Fischer 13022ceab7 drivers: udc_dwc2: enable SOF interrupts and SOF events
Enable SOF interrupts and SOF events.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:26 +01:00
Declan Snyder ad393fbbfa dts: Rename RW pinctrl to MCI IO MUX
"RW pinctrl" is clearly SOC specific naming for an IP
that is not necessarily constrained to live on one SOC series.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 08:56:10 +01:00
Ricardo Rivera-Matos 64a959c922 regulator: cp9314: Prevents reset while switching
Configures and initializes the EN GPIO to inactive prior
to calling the soft reset sequence during probe. The EN
pin may have been left asserted by the hardware on some systems.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-03-21 13:16:56 -05:00
Wafer Xie 2396b01b1e drivers: eth: stellaris: Fix driver poll all packets from ethernet
The number of interrupts received by the driver maybe less than
the number of data packets received by Ethernet,
so the driver should read the packets number
from the register REG_MACNP value.

Signed-off-by: Wafer Xie <wafer@jaguarmicro.com>
2024-03-21 12:07:35 +00:00
Andy Sinclair 9813221ea6 drivers: mfd: npm1300: Added GPIO events
Added GPIO input edge events

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Andy Sinclair 13e43ca5c8 drivers: gpio: npm1300: Event configuration based on active state
Configuration of GPIO as input now sets rising/falling
event orientation based on ACTIVE_HIGH/LOW setting.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Mehdi Zemzem adedf14c42 drivers: flash: spi nor: Add MultInstance support
Modify the SPI Nor driver to be able to have multiple instances at
the same time.

This patch is heavily inspired by the at45 driver.
It was tested on the nRF5340 DK by using the external spi memory two times.
Macros were improved by de-nordic

Signed-off-by: Mehdi Zemzem <mehdi.zemzem2@gmail.com>
2024-03-21 10:07:53 +00:00
Ledion Daja 4c25482ef6 modules: hal_ethos_u: update module revision
Updated revision for hal_ethos_u module, and adapted
ethosu_semaphore_take function prototype accordingly in order to align
with changes in the NPU driver

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Declan Snyder d3e2052a69 drivers: clock_control: Support RW MRT
Support RW MRT in clock control syscon driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
TOKITA Hiroshi 7b61d1c43c drivers: led_strip: Enabling config with DT_HAS_..
Applying the modern way which is adding `default y` and
`depends on DT_HAS_...` to enable configs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi 7d99de6dfa drivers: led_strip: ws2812: Remove WS2812_STRIP and WS2812_STRIP_DRIVER
Removing `choice WS2812_STRIP_DRIVER` to enable the use of multiple
types of WS2812 drivers.
Also, `menuconfig WS2812_STRIP` will be deleted as it does not
correspond to the appropriate settings.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
Johan Carlsson 94351ce2ad drivers: uart_mcux_flexcomm: fix invalid use of status bits.
uart flexcomm driver incorrectly used kStatus enum as mask when
checking for errors and enabling the error interrupts.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-03-20 17:18:48 -05:00
Daniel DeGrasse adfe4b8359 drivers: clock_control: clock_control_mcux_syscon: allow FlexSPI reclock
Enable support for setting and querying the FlexSPI clock rate to the
clock_control_mcux_syscon driver, as this is required by the
flash_flexspi_nor_driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Declan Snyder e336c644be drivers: wdt_mcux_wwdt: Support RW
Support RW soc series in wwdt driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 16:19:12 +00:00
Alberto Escolar Piedras 46193f48f6 drivers/sensor/bma4xx/Kconfig: Change native_posix reference to native_sim
As we are replacing native_posix with native_sim, let's
use native_sim instead of native_posix as example platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras 11530015ad drivers/gpio emul: Fix reference to example overlay
That file does not exist anymore, let's refer
to its new name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Mykola Kvach ff35a247f1 drivers: pinctrl: pfc_rcar: add dummy IPSR flag to pinctrl driver
Add a dummy IPSR flag to the RCar PFC driver. It is necessary
to ensure that the driver sets the 'peripheral' bit (the driver
resets this bit during the first call of 'pfc_rcar_set_gpsr') for
a pin that doesn't have a pin function defined in IPSR, but always
acts as a 'peripheral', for example, the MMC pins on the Spider
board.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-03-20 15:42:45 +01:00
Pieter De Gendt 2ee4716091 drivers: ethernet: Build ethernet drivers with ETH_DRIVER_RAW_MODE
Allow building ethernet drivers without NET_L2_ETHERNET config symbol.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt e99b5228a1 drivers: ethernet: Introduce ETH_DRIVER_RAW_MODE option
Add a Kconfig symbol to allow building ethernet device driver without
an L2 layer.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt 78457c0499 drivers: ethernet: adin2111: Use ethernet init macro
Use the ethernet specific init macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt e1b132771e drivers: ethernet: nxp_s32_gmac: Imply MDIO
The ethernet driver will most likely require the MDIO device to be
enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Benedikt Schmidt 04f38ffba2 drivers: sensor: add sensors for MAX31790
Add sensors for fan speed and fan fault for the PWM
controller MAX31790.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00