Commit graph

23353 commits

Author SHA1 Message Date
Reto Schneider
2e1a87543c drivers: flash: Add Si32 support
Can be used only once the SiM3U SoC support has been added.

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Anuj Pathak
1f05d03489 Drivers: Sensor: mc3419: Moved Decimation Rate config to DT
- Similar to LPF settings decimation rate could be applied to
per instance basis, thus moved to DT prop

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
Anuj Pathak
932e207741 Drivers: Sensor: mc3419: Added LPF CutOff select using dt
For applications that rely on low noise/variance in accelerometer
sample reading. Application can take advantage of integrated LPF
Thus this PR adds LPF configuration capability to the mc3419 driver

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
IBEN EL HADJ MESSAOUD Marwa
0cebee5ae7 drivers: clock_control: Add stm32u0 clock control support
Reuse the file clock_stm32g0.c for the STM32U0 and
rename it to clock_stm32g0_u0.c
because the G0 and U0 series share the same clock control.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
d7db52feb2 drivers: flash: flash_stm32: Fix log warning
Cast the argument to "unsigned long" to avoid the
warning

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
1ac85d3492 drivers: hwinfo: stm32u0: Clear standby and stop flags
Add the function that clear standby and stop flags

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
Lucas Tamborrino
9938022eff drivers: video: ov2640: Add 240x240 video format
Add 240x240 RGB format support for OV2640.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-26 17:06:28 +02:00
Laurentiu Mihalcea
2b96bfb2e5 drivers: dma: dma_nxp_sof_host_dma: do cache WB after HOST_TO_MEMORY copy
SOF is designed with the idea that the data transfer
between the host memory and local memory is performed via
DMA. This is not true for imx platform in which the DSP
performs this operation.

Because of the aforementioned design, SOF performs a
cache invalidation operation on the destination memory
region before data is copied further down the pipeline.

For some imx platforms, the destination memory region is
cacheable. As such, some of the data transferred from the
host memory region is held entirely in cache, which means
the RAM and the cache have different data for the same
memory region.

In such cases, performing cache invalidation forces
the DSP to fetch data from RAM instead of the cache, which
means the DSP will read stale data and propagate it further
down the pipeline.

Although not optimal and mostly as a workaround to this issue,
perform a cache WB operation on the destination memory region
to make sure that the cache and the RAM hold the same data.
During the data read operation (to copy it further down the
pipeline) after the aforemention cache invalidation, the DSP
will no longer end up reading stale data.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-26 17:06:20 +02:00
Elias Speinle
c4dba39548 drivers: fpga: add driver for renesas slg471X5
add driver for renesas slg471X5

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-08-26 17:06:14 +02:00
Raffael Rostagno
2ea9483009 drivers: spi: esp32c2: esp8684: Add support
Addded support to SPI2 module for ESP32C2 and ESP8684 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 17:06:02 +02:00
Jimmy Zheng
a7096fac7d drivers: interrupt_controller: nuclei_eclic: always use clic common entry
When CONFIG_RISCV_VECTORED_MODE is disabled, CLIC claims interrupts using
CSR 'mnxti' and handles all pending interrupts before exiting the ISR.

When CONFIG_RISCV_VECTORED_MODE is enabled, all interrupts use vector mode
and are claimed automatically. The RISC-V common ISR is used for interrupts
hooked into SW ISR table, but it only handle one pending interrupt per ISR.

This commit enhances CLIC to set vector mode for direct ISRs only and use
the CLIC common entry for regular ISRs to handles multiple pending
interrupts in an ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
d55950c23f drivers: interrupt_controller: nuclei_eclic: support vector mode setting
Implement riscv_clic_irq_vector_set() for Nuclei CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
91e524862d soc: common: riscv-privileged: add riscv_clic_irq_vector_set() for clic
Introduce riscv_clic_irq_vector_set() to implement z_riscv_irq_vector_set()
for CLIC. This commit also introduces CONFIG_CLIC_SMCLICSHV_EXT to indicate
support for the smclicshv extenion and riscv_clic_irq_vector_set().

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Raffael Rostagno
3c19c85b32 drivers: clock_control: esp32c6: Fix for USB/JTAG port
Fixes non-working JTAG port when serial USB is not enabled.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 11:05:19 -04:00
Erwan Gouriou
a078b4ee6b drivers: bluetooth: hci: Remove prompt on non user selectable symbols
Most of BT_FOO symbols that are designed to select the hci driver
implementation which will drive the comunication with controller are
selected based on device tree compatible and should not be made available
as an configurable option to the user.
To do this, remove the prompt on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-26 11:04:45 -04:00
Josuah Demangeon
c0f8658254 drivers: video: accept VIDEO_EP_ALL where VIDEO_EP_IN/OUT is given
The current video drivers did not allow VIDEO_EP_ALL to be selected,
as used by video_stream_stop().

This adds the VIDEO_EP_ALL to each video driver that filtered endpoints.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-24 07:17:03 -04:00
Valerio Setti
98ddf107fa mbedtls: rename CONFIG_MBEDTLS_ZEPHYR_ENTROPY and move it
- Slightly improve the name of this kconfig adding the suffix
  _POLL in order to highlight that this adds a callback
  function used to poll data.

- Description was also updated to point out that this symbols
  might not only use the (secure) entropy driver, but also
  generic number generators, some of which are not really
  secure.

- The symbol was move from Kconfig to Kconfig.tls-generic because
  this is where MBEDTLS_ENTROPY_C is located and since
  MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
  makes sense if the entropy module is also enabled), we add
  also the "depends on".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
e3e13fb40b mbedtls: rename MBEDTLS_ENTROPY_ENABLED as MBEDTLS_ENTROPY_C
ENABLED suffix does not really makes much sense for a kconfig
so it should be removed. Also other MBEDTLS symbols were recently
updated accordingly.
Moreover having it named exactly the same way as in Mbed TLS
symplifies the understanding of what this kconfig is doing.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Lucas Tamborrino
3c91c408a4 drivers: dma: esp32: Add psram support
Add support for external ram access in DMA.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-24 07:14:48 -04:00
Marcio Ribeiro
b9ccaaea53 drivers: spi: esp32: fix exception in mode 3 & soft-ctrld CS
Fixes division by zero exception when SPI is configured to operate in mode3
whit CS controlled by software.

Such exception occurred because data->dfs is listed as the denominator in
a division inside the spi_esp32_transfer() function which is called from
spi_esp32_configure() (before assigning a value to data->dfs) inside
transceive() in the condition where mode 3 is chosen as the SPI operating
mode and the chip select is configured to be software-controlled.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-23 15:50:03 +01:00
Emil Dahl Juhl
bc5477ab10 drivers: led: lp5569: run clang-format
Run clang-format on drivers/led/lp5569.c to align formatting in the file.

No functional changes intended.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Emil Juhl
f53a401758 drivers: led: lp5569: add enable-gpios
The lp5569 features a double functioning pin for enable and pwm control.
The chip, however, uses the first rising edge to initialize and get ready
for i2c communication, and then the pin alters function to pwm mode.

Add support for providing enable-gpios to the lp5569 in the dts, which
will make sure to assert the pin and wait for the chip to initialize
before attempting further configuration of the chip.

Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Emil Juhl
47f9040bfa drivers: led: lp5569: add charge pump configuration
The lp5569 controller contains an internal charge pump which can be useful
for driving LEDs with a forward voltage greater than the lp5569 supply.
Taking advantage of the charge pump can alleviate the need for an external
boost converter.

Add a dts property, charge-pump-mode, to the ti,lp5569 binding with which
the cp_mode bits of the MISC register will be configured.

Following the datasheet, the possible configurations are:
    0x00 -> disabled (default)
    0x01 -> 1x mode
    0x10 -> 1.5x mode
    0x11 -> auto mode

Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Jordan Yates
18a964faaa i2c: nrfx_twi: fix RTIO utility functions
Route `configure` and `recover_bus` through the RTIO framework to avoid
race conditions. Update `RTIO_OP_I2C_RECOVER` implementation to actually
recover the bus, instead of triggering a loop.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-23 08:02:45 -04:00
Aiman Mazlan
0d796ee286 drivers: sensor: st: vl53l1x: add return to attr_set and attr_get
Incorrect value set by user when using sensor_attr_set can fail silently
since it always returns 0.
Fix by adding ret. Also added return on sensor_attr_get.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2024-08-23 08:02:23 -04:00
Maureen Helm
e49cca2cc3 drivers: sensor: Fix adxl345 sample fetch return value
Fixes the adxl345 accelerometer driver to return zero on sample fetch
success, as specified by the sensor driver API. Prior to this change,
the driver incorrectly returned a positive non-zero value on sample
fetch success, which in turn caused a bus fault getting data with the
sensor shell.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-23 09:53:28 +02:00
Raffael Rostagno
90c6106926 drivers: esp32: Interrupts flags configuration
Allows configuring interrupts flags in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
bb746cdcc5 drivers: esp32: esp_intr_alloc return condition
Add checks to return value of esp_intr_alloc to avoid drivers init
returning 0 when interrupt allocation fails.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
0b3a34cdca drivers: esp32: Interrupts priority configuration
Allows configuring interrupts priority in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Duy Phuong Hoang. Nguyen
b9f31c0e40 drivers: entropy: Initial support for trng driver of RA8
Initial commit for entropy support on RA8
- drivers: entropy: implementation for TRNG driver of RA8x1
- dts: arm: add device node for trng of RA8x1
- boards: arm: enable support zephyr_entropy for ek_ra8m1 and
update board documentation

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-22 14:24:57 -04:00
Andreas Moltumyr
2f1a5ce104 drivers: adc: nrf: Update adc driver to support nRF9280
Expands driver to support nRF9280 similar to nRF54H20 device.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
c0410e1a22 drivers: serial: nrf: disable legacy shim for nRF92
Disable the legacy shim due to DPPI support currently missing.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
a2bb323861 drivers: cache: nrf: enable CACHE_NRF_PATCH_LINEADDR for nRF92
Enable CACHE_NRF_PATCH_LINEADDR for nRF92 by default,
similarly to how it's enabled for nRF54H.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Chaitanya Tata
22a1846e8e drivers: wifi: Fix AP mode build
Pass the AP mode configuration based on Zephyr's Kconfig to the OS
agnostic code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
56055ac4a8 drivers: wifi: Fix monitor mode handling
Monitor mode relies on core Wi-Fi management functions, so, the file
should be included for both system and system with raw modes.

Fix this by adding a hidden symbol.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
464cc9e161 drivers: wifi: Fix duplicate file inclusion
If Wi-Fi management is enabled, then independent of modes scan
functionality is always included.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
eea8f67b91 drivers: wifi: Wait for clock divider to take effect
This is a fix from QSPI-NOR driver to wait for clock divider change to
be applied and take effect.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
ed58af2ccd drivers: wifi: Fix QSPI clock dividers
For less than 32MHz using HFCLK192M, /2 divider should be used and only
for Anamoly159 /1 divider should be used.

Without this fix 8MHz clock in DTS uses 16MHz clock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
e5a665d4aa drivers: wifi: Add tx packets drop count calculation
[SHEL-1063] Add calculation of drop packets in tx due to
lack of buffer memory.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Ajay Parida
41e29c6cad drivers: wifi: Option for PS data retrieval
SHEL-2947] Option to set either PS-poll or QoS null frame based
power save data retrieval mechanism.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Sachin D Kulkarni
1f494387b1 nrf_wifi: Remove dependency on OSAL layer handle
Removes the requirement for the different layers in the OS agnostic
parts of the driver having to maintain a handle to the OS interface
layer in order to call the OS interface calls. The OS interface layer
now maitains the handle to OS-specific ops internally and invokes the
appropriate functions.

Fixes SHEL-2639

Signed-off-by: Sachin D Kulkarni <sachin.kulkarni@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
e085d440c2 drivers: wifi: Reset interface statistics data
[SHEL-2542] When reset command is called this will
reset all statistics including firmware and host.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
37a98bfa79 drivers: wifi: Add kconfig option to disable WMM feature
[SHEL-2054] Adding a kconfig option for WMM.
By default it will be enabled. If user needs
to disable it, set it as n.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Daniel Kampert
db9b45a7b3 drivers: rtc: off-by-one error in RV-8263-C8 driver
1. tm_mon in rtc_time structure has a range [0, 11],
while the RTC expects [1, 12]. Add missing
increasing / decreasing of this value.

2. Fix typo in debug log

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-22 14:21:41 -04:00
Lucien Zhao
e147a6e8d9 drivers: clock_control: support new i2c clock model
In RT1180, two lpi2c instances share same one clock gate

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Daniel DeGrasse
17f71e19f0 drivers: sdhc: imx_usdhc: assume card is present if no detection method
The imx USDHC driver previously queried the peripheral's internal card
detect signal to check card presence if no card detect method was
configured. However, some boards do not route the card detect signal and
do not work correctly with the DAT3 detection method supported by this
peripheral. As a fallback, assume the card is present in the slot but
log a warning to the user.

Fixes #42227

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-22 14:19:37 -04:00
Yangbo Lu
2a827f04b8 drivers: pinctrl_imx: support i.MX93 M33 core
Converted to use CONFIG_SOC_MIMX9352 instead of
CONFIG_SOC_MIMX9352_A55 to support also M33 core.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Yangbo Lu
250460b008 drivers: clock_control_mcux_ccm_rev2: support i.MX93 M33 core
Converted to use CONFIG_SOC_MIMX9352 instead of
CONFIG_SOC_MIMX9352_A55 to support also M33 core.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Declan Snyder
6e7f86ce86 soc: nxp: Move connectivity defaults to common
Move default of monolithic and fw loader, options, etc to the
common kconfig files rather than defaulting in soc file.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
4e9227641e drivers: usb device: Remove MCUX controller type
The CONFIG_USB_MCUX_CONTROLLER_TYPE choice config
is not necessary, let's just remove it. Theoretically,
if there was an SOC with the EHCI and LPCIP3511, then
it might cause a build error, but there is no SOC
which is supported on this legacy driver that has that.

Remove all settings of it in the SOC files.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00