Commit graph

23353 commits

Author SHA1 Message Date
Fabian Blatz
39dbd49874 drivers: stepper: step_dir: Fix actual position increment
Address issue where the timing source is not stopped upon step completion
and not adjusting the actual position after performing a step.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-01 02:04:53 +01:00
Fabian Blatz
9e6366a01e drivers: stepper: step_dir: Add fallback for dual-edge-step
Adds a fallback for the dual-edge-step property in the step dir common
code. Without this drivers using the common code would have to declare the
dual-edge-step property so it can default to false when not set, even if
the IC does not support adjusting it.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-01 02:04:53 +01:00
Martin Jäger
9d3d67d3d1 drivers: ieee802154: b91: fix status variable type in RX ISR
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-12-30 19:47:05 +01:00
Jilay Pandya
0ab69fb19e drivers: crypto: crypto_ataes132a fix buffer overrun issue
fix buffer overrun issue by assigning more bytes to the param buf

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-29 05:51:51 +01:00
Fabian Blatz
0b124a2ff6 drivers: stepper: Add timing source for step dir stepper
Adds a timing source api which is used by the step-dir stepper common code.
This allows the reusable common code to configure different timing sources,
since the initial delayable work implementation was inacurate for higher
maximum velocities.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Fabian Blatz
fc2567939b drivers: stepper: shell: Use shell_device_filter
Use the shell_device_filter utils method and leverage the new api classing
to only suggest stepper devices via tab-complete within the shell.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-27 21:18:04 +01:00
Armando Visconti
f9eceaebf9 drivers/sensor: lis2dux12: add lis2duxs12 support
The LIS2DUXS12 is a smart, digital, 3-axis linear accelerometer whose
MEMS and ASIC have been expressly designed to combine the lowest current
consumption possible with features such as always-on antialiasing
filtering, a finite state machine (FSM) and machine learning core (MLC)
with adaptive self-configuration (ASC), and an analog hub / Qvar sensing
channel.

(https://www.st.com/en/mems-and-sensors/lis2duxs12.html)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Armando Visconti
0f76a4e519 drivers/sensor: lis2dux12: re-working to be DUX generic
Prepare the driver to be able to handle other DUX software compatible
devices. Currently the driver handles the st_lis2dux12 compatible only.

Do following major changes:

1. Introduce the lis2dux12_chip_api structure filled with device specific
   APIs. At the moment define following callback:

    - api_lis2dux12_set_odr_raw()
    - api_lis2dux12_set_range()
    - api_lis2dux12_sample_fetch_accel()
    - api_lis2dux12_sample_fetch_temp()
    - api_lis2dux12_handle_interrupt()
    - api_lis2dux12_init_interrupt()

2. Prepare specific APIs for st_lis2dux12 device.

3. Make DT instantiation on inst + name basis, and not only by inst. This
   commit only use "name = DT_DRV_COMPAT = st_lis2dux12".

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Jilay Pandya
8db97b5bf6 drivers: wifi: esp_at: fix null pointer dereference issue
fix null pointer dereference issue by checking if *sock is null or not

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-27 15:42:41 +01:00
Irfan Ahmad
cf2ce9d322 drivers: display: Fix typos in multiple display drivers
Found multiple similar typos in various display drivers - fixed them.

Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
2024-12-27 07:18:28 +01:00
TOKITA Hiroshi
1207ccfb7e drivers: i2c: dw: Fix the "resets" property exists check logic
Regardless of the argument specified, it always references the
property of the 0th, so it was corrected to reference the instance
specified by the argument.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-26 19:43:54 +01:00
Hua Zheng
535c40d6d6 drviers: mipi_dbi: mipi_dbi_bitbang: fix 16-bit data_gpios exceed error
For a 16-bit data bus, "DT_INST_PROP_LEN(n, data_gpios)" returns 16
which is equals "MIPI_DBI_MAX_DATA_BUS_WIDTH(16)".
As a result, the assertion will always be triggered.

Use a "<=" condition for the assertion instead.

Signed-off-by: Hua Zheng <writeforever@foxmail.com>
2024-12-26 06:21:25 +01:00
Ruibin Chang
4ce0ff5ef4 drivers/timer/it8xxx2: fix busy wait timer race condition
Command "waitms 50" on ChromeBook EC console, then it will crash EC.

Because arch_busy_wait() is re-entried by two different tasks,
the second calling will reset the timer and may cause the first
calling to fail to reach the waiting destination
(if the first calling's wait time is longer enough).

Verified by follow test pattern:
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_api
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_error_case
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_monotonic
west build -p auto -b it8xxx2_evb tests/kernel/timer/starve
west build -p auto -b it8xxx2_evb tests/kernel/context

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-12-25 08:40:53 +01:00
Tran Van Quy
8f91d0c072 drivers: sdhc: support SDHC driver on Renesas RA8
This is initial commit to support SDHC driver on Renesas RA8
with r_sdhi modules

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Johan Hedberg
5f963feed4 modules: hal_silabs: Add stubs to support CONFIG_BUILD_ONLY_NO_BLOBS
Add empty function stubs to support building with the newly introduced
CONFIG_BUILD_ONLY_NO_BLOBS option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-25 03:37:53 +01:00
Mahesh Mahadevan
b978fd7bfb drivers: usb: Fix pointer reference in the NXP drivers
The address passed in to the function was incorrect causing
failures when porting to RT1180.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-12-24 16:07:49 +01:00
Mikkel Jakobsen
e4c21da41b drivers: fuel_gauge: make read-only pointer args const in api
For the lists of properties passed as a pointer to the get_props and
set_props functions, there is no reason to not make the pointer const as
the called functions will not and should not alter the pointed-to data.

In practice, not having the pointers const can cause compilation errors
if trying to pass in a const array of properties.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2024-12-24 13:54:15 +01:00
Dawid Niedzwiecki
be5d44eb7e drivers: flash: stm32: update ex_op API
Use uint64_t instead of uint32_t for the FLASH_STM32_EX_OP_SECTOR_WP
extended operation.

Some chips have two banks, more than 16 sectors each e.g. stm32h7a3xx
chips, so more than 32 bits are required.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-24 13:54:04 +01:00
Jeff Daly
334c6be2da drivers: adc: microchip: Fix PR #80933
Fixed bug calculating offset of registers after unused space in the ADC
register space for the SZ package parts.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-12-23 23:58:47 +01:00
Andrew Featherstone
b6b38e6808 drivers: dma: rpi_pico: Refactor DMA files for Raspberry Pi SoCs
Avoid referring to Pico 2 (the name of a board). In this context,
RPI_PICO is used to refer to the (Zephyr) `SOC_FAMILY` rather than the
Pico 1 board. This clarifies common numerical values between the RP2040
and RP2350 SoC series, and enables existing DTS files to be used with
RP2350-based boards with fewer changes.

Remove the use of Zehpyr's `CONFIG_` macros from the device tree files,
and replace them with `SOC_SERIES`-specific files. Update the driver
implementation to conditionally include the correct file. Update
documentation and samples to match.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
293b9a16ca drivers: counter: rpi_pico_timer: Add support for RP2350
The RP2350 SoC series contain two timer peripherals. Extend the driver
to support using the second timer (`TIMER1`).

N.b. this requires a fix from the Pico SDK to be patched into
hal_rpi_pico. See https://github.com/raspberrypi/pico-sdk/pull/1949 .

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
TOKITA Hiroshi
9043e651ef drivers: watchdog: rpi_pico: Add support for RP2350
The watchdog register configuration of RP2350 differs from that
of RP2040, so we make fit that.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
8d39008f2f drivers: clock_control: rpi_pico: Start tick generators for timers
Unlike the RP2040, the RP2350 has multiple tick generators that need to
be started. Start TIMER0 and TIMER1 tick generators during
clock_control_init.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
1d3f5ac13d drivers: hwinfo: rp2350: Add initial support for RP2350
Extend the existing driver to add some initial support for the new SoC,
whilst maintaining compatibility with the RP2040.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Benjamin Cabé
cc4a985316 soc: rp2350: Add initial support for the Raspberry Pi RP2350
RP2350 is Raspberry Pi's newest SoC. From the datasheet:

"RP2350 is a new family of microcontrollers from Raspberry Pi that
offers significant enhancements over RP2040. Key features include:
• Dual Cortex-M33 or Hazard3 processors at 150 MHz
• 520 kB on-chip SRAM, in 10 independent banks
• 8 kB of one-time-programmable storage (OTP)
• Up to 16 MB of external QSPI flash/PSRAM via dedicated QSPI bus
...
"

This commit introduces some changes to support the existing RP2040 and
what is describe by Raspberry Pi as the "RP2350 family". Currently there
are 4 published products in the family: RP2350A, RP2350B, RP2354A, and
RP2354A. Within Zephyr's taxonomy, split the configuration as follows:
Family: Raspberry Pi Pico. This contains all RP2XXX SoCs,
SoC Series: RP2040 and RP2350.
SoC: RP2040 and, for now, just the RP2350A, which is present on the Pico
2, where the A suffix indicates  QFN-60 package type. This structure is
reflected in `soc/raspberrypi/soc.yml`, and somewhat assumes that there
won't be a RP2050, for example, as a RP2040 with more RAM.

This is foundation work ahead of introducing support for Raspberry Pi's
Pico 2 board, which is fitted with a RP2350A and 4MB of flash.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
122784df15 drivers: clock_control: rpi_pico: Add support for the RP2350.
Add support for SoC-specific clock ids and update the initialization
function to support the existing RP2040 and add support for the RP2350.

clock_control_rpi_pico.c uses numerical values for clock ids taken from
rpi_pico_clock.h which are the "clock generator". For the RP2350 these
values are different for some of the same logical clock sources, as well
as the RP2040 and RP2350 having different clock sources available.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Jilay Pandya
2382d239d7 drivers: stepper: gpio: return -ECANCELED from move operations
return -ECANCELED when move operations are called with stepper not enabled

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-23 22:00:35 +01:00
Martin Stumpf
857e5793f1 drivers: flash: flexspi: Fix XIP during flash write
XIP prefetching seems to still be running, even while interrupts are
disabled. Therefore it is important to wait for the FlexSPI to be idle
before performing a write/erase operation.

Signed-off-by: Martin Stumpf <martin.stumpf@vected.de>
2024-12-23 18:41:28 +01:00
Nikodem Kastelik
7e84571dcd drivers: retained_mem: nrf: make ram_ctrl variant explicit
Updated retained_mem driver variant exposes vendor-specific API,
rather than executing implicitly during boot.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +01:00
Nikodem Kastelik
e501b54bad soc: nordic: add common symbol for RAM control helper presence
Common symbol is defined by SoCs that support RAM control helper.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +01:00
Scott Worley
f51729aada drivers: gpio: mec5: Microchip MEC5 HAL based GPIO driver
Add a GPIO driver for the Microchip MEC5 HAL based chips.
Current devices are: MEC174x, MEC175x, and HAL version of
MEC172x named MECH172x.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-12-23 17:11:22 +01:00
Daniel Baluta
e94c86f395 drivers: dma: Add initial support for NXP SDMA
This adds initial support for NXP SDMA controller. We make use
of NXP HAL to configure the IP.

SDMA uses BD (buffer descriptors) to describe a transfer. We create
a cyclic list of descriptors and trigger them manually at start and
later when data is available.

This is tested using Sound Open Firmware app on top of Zephyr.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-12-23 17:11:09 +01:00
Jilay Pandya
59064a409e dts: bindings: stepper: add en-gpios to common stepper-controller.yaml
- rename enable-gpios to en-gpios in adi,tmc2209
- place en-gpios in common stepper-controller.yaml

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-23 17:10:06 +01:00
Danh Doan
9792abb692 drivers: entropy: Add support for TRNG to entropy driver
add support TRNG to entropy driver for Renesas RA

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-23 13:24:13 +01:00
Martin Jäger
e5e8fb56d1 drivers: interrupt_controller: esp32c6: reserve IRQ 1 for WiFi
IRQ 1 is reserved for WiFi in ESP-IDF, which is used as the basis
for the Espressif HAL in Zephyr.

If IRQ 1 is used by Zephyr and too many other peripherals (e.g.
multiple UARTs) are enabled, WiFi stops working.

Marking IRQ 1 as "not available" seems to fix the issue.

Fixes #82874

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-12-23 13:23:59 +01:00
Omar Naffaa
c9be1a991b drivers: sensor: dht: Fix sensor read issue on esp32_devkitc_wrover
The DHT[11/22] sensor driver fails to read data due to an extra
"gpio_pin_set_dt" that is occurs prior to waiting for the sensor active
response. This leads to consistent failed reads on esp32 (devkitc,
wrover). After removing this line reads are consistently successful.

Signed-off-by: Omar Naffaa <omarnaffaa.on@gmail.com>
2024-12-23 09:16:06 +01:00
Andrzej Głąbek
59c94db6f0 drivers: spi_nrfx_spim: Add clock requests for fast SPIM instances
Fast SPIM instances (SPIM120 and SPIM121) for correct operation require
the highest frequency from the global HSFLL. This commit adds needed
clock controller requests to the driver. When the runtime device power
management is enabled, the frequency is requested as long as the SPIM
is resumed, otherwise it is requested for the duration of transfers.

This commit also adds a missing call to `pm_device_runtime_put()` when
SPIM reconfiguration fails.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-21 15:04:58 +01:00
Andrzej Głąbek
c8fff0c77d drivers: clock_control_nrf2: Add missing cancelation of request
This is a follow-up to commit fe0e2dbc60.

If `nrf_clock_control_request_sync()` ends up with a timeout, before
returning it must cancel the request that was not fulfilled on time.
Otherwise, the request may actually finish successfully a bit later,
but the caller will not be aware that the clock needs to be released
(since the call resulted in an error). And actually even more serious
problem is that because the `req` structure is placed on stack, after
the function returns, the contents of this structure will be probably
overwritten with some other data, so if the request finishes at that
point, an attempt to execute the callback function pointed by this
structure will most likely cause a crash.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-21 15:04:58 +01:00
Ajay Parida
0fb3707699 drivers: wifi: Configure number of BSS entries
Configure BSS entries to be displayed in scan result as
per the rssi order.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-12-21 15:04:38 +01:00
Jilay Pandya
dcf9449b51 drivers: sensor: mmc56x3_async.c fix missing break
coverity complains of a missing break statement in SENSOR_CHAN_ALL case
this is fixed by adding __attribute__((fallthrough))

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-21 15:04:22 +01:00
Aleksander Dejewski
a4e31487d5 drivers: lora: Add user_data to lora_recv_async
The LoRa driver does not allow to pass void* user_data to callback in
lora_recv_async function. This leads to complex way of using the API. This
commit fixes the issue and adds the field to the function and to the
callback.

Signed-off-by: Aleksander Dejewski <aleksander.dejewski@gmail.com>
2024-12-21 05:51:52 +01:00
The Nguyen
1d6a453a6a drivers: display: add support for ili9806e_dsi driver
First commit to add support for ili9806e_dsi driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
The Nguyen
238a992614 drivers: mipi_dsi: add support for MIPI DSI driver on Renesas RA family
First commit to add support for MIPI DSI driver on Renesas RA

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
The Nguyen
b5f03367d8 drivers: display: add support for GLCDC on Renesas RA family
First commit to add support for Graphics LCD Controller on Renesas RA

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
The Nguyen
ee04db8b4d drivers: memc: enable support for SDRAM controller on Renesas RA family
First commit to add support for SDRAM controller on Renesas RA SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
Manuel Argüelles
c16ccf8e7d dts: bindings: rename nxp,kinetis-ftm-pwm compatible
Rename "nxp,kinetis-ftm-pwm" compatible to "nxp,ftm-pwm" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-20 23:53:14 +02:00
Sylvio Alves
3d06716a7b drivers: bt: esp32: add CONFIG_BUILD_ONLY_NO_BLOBS to allow CI tests
Adds an option to enable CI tests without binary blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-20 23:51:16 +02:00
Keith Short
5eacb2a24f usbc: ps8xxx: Fix build error
Fix a build error in the PS8xxx TCPC driver.

Signed-off-by: Keith Short <keithshort@google.com>
2024-12-20 23:50:50 +02:00
Aksel Skauge Mellbye
6b65d60d49 drivers: spi: gecko: eusart: Support LSB first and GPIO CS
Propagate bit ordering and type of CS pin to HAL layer. Previously,
the driver assumed MSB first and EUSART hardware CS control.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-12-20 18:32:22 +01:00
Chaitanya Tata
6eff676448 drivers: nrf_wifi: Add dependencies
Add the feature flag and required GPIO in DTS as dependencies to avoid
build failures.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-20 18:31:22 +01:00