Commit graph

24538 commits

Author SHA1 Message Date
Hao Luo
eea4aa9f52 drivers: pwm: changed ambiq ctimer variable names
changed variable names from timer to ctimer

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 15:31:08 -04:00
Richard Wheatley
902005e0ef drivers: add assert to check for max children in timer
check for max number of children in timer.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2025-07-19 15:31:08 -04:00
Richard Wheatley
7cd378d9c9 dts: bindings: move clk-source to parent
Move clk-source from pwm to timer
change associated files to match

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2025-07-19 15:31:08 -04:00
Richard Wheatley
e81a241678 driver: pwm: create ambiq pwm driver
Restructured counter and timer.
CTimer/Timer is now parent to pwm and counter.
Created PWM driver and tied to pwm and pwm-led

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2025-07-19 15:31:08 -04:00
Camille BAUD
dbd85ae677 drivers: Add header file with common functions for BFLB
This moves the couple functions that are and will be all over
the various clock operations for all platforms.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-07-19 15:30:45 -04:00
Ruben Völl
9007a4fd8e sensor: lis2dw12: handle SENSOR_CHAN_ALL in sample_fetch callback
Handle `SENSOR_CHAN_ALL` case of the sample_fetch callback of the
lis2dw12 driver. Without this, `sensor_sample_fetch()` does not work
correctly for this device, e.g. rendering the rtio and the sensor shell
unusable.

Signed-off-by: Ruben Völl <ruben.voell@sevenlab.de>
2025-07-19 13:51:20 -04:00
Hao Luo
e6f986f907 drivers: watchdog: bugfix for ambiq wdt clk select
This commit fixed the watchdog clock select error in
ambiq driver.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 13:49:29 -04:00
Hao Luo
0407185d43 drivers: adc: ambiq: fixed the error that caused adc_api test to fail
This commit fixed the failure of test_adc_asynchronous_call

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 13:49:14 -04:00
Fin Maaß
d3ca2f07a9 drivers: spi: litex: remove core_ prefix
remove `core_` prefix from code and
register names, got dropped in litex in
https://github.com/enjoy-digital/litex/pull/2253

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-19 13:48:54 -04:00
Kapil Bhatt
dd7413d269 drivers: nrf_wifi: Fix rpu recovery debug info
Rpu recovey debug stats are stored in hal_dev_ctx which is not
persistent in case of interface is brought down/up. Need to add
in nrf_wifi_ctx_zep and update before interface goes down.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-19 13:47:04 -04:00
Samuel Tardieu
226011b8e1 Drivers: max17055: retrieve the current value
The MAX17055 peripheral allows measuring the current
value (which corresponds to the instantaneous value). Respond to
the `SENSOR_CHAN_CURRENT` command, and retrieve the data
from the `0x0a` device register.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
2025-07-19 13:46:19 -04:00
Luis Ubieda
4eaaf3c0ea bmm350: Add streaming mode
Supported for DRDY interrupts.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:45:38 -04:00
Luis Ubieda
0e9a018a3e bmm350: Add read-decode support
One-shot reads are now supported through the v2 model API.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:45:38 -04:00
Luis Ubieda
e92552275a bmm350: isolate data fetching from conversion
In order to allow decoupling these two operations.
No functional changes, sensor returns same readings through shell.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:45:38 -04:00
Luis Ubieda
6c13181efc bmm350: Refactor bus transfers to use RTIO
To easily further extend it to other transports and be able to
implement streaming mode.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:45:38 -04:00
Luis Ubieda
98ab8f0873 bmm350: scrub axis_en functionality
As this isn't effectively providing any value to the driver, instead
wastes cycles on every sample-fetch. Scrubbing this simplifies the
code.

Also, remove fix_sign() and replace it for the in-tree helper
sign_extend().

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:45:38 -04:00
Van Petrosyan
8eb2a9c507 drivers: modem_cellular: added APP RDY signal handling
Some modems (e.g. Quectel BG95/EG25-G, several SIMCom parts) print
“APP RDY” when the application core is ready.  Parse this line and
proceed from AWAIT_POWER_ON immediately, while keeping the existing
startup timeout as a fall-back.

* add MODEM_CELLULAR_EVENT_MODEM_READY + chat match
* open UART and attach chat in AWAIT_POWER_ON
* jump to SET_BAUDRATE / RUN_INIT_SCRIPT on event

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-19 13:45:15 -04:00
Chaitanya Tata
001f34d84c drivers: nrf_wifi: Fix return codes for xmit
Return proper error codes for xmit instead of generic -1.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-19 13:44:58 -04:00
Van Petrosyan
3225b517d4 drivers: modem_cellular: Add autostarts support for BG95
Add optional autostarts boolean to the quectel,bg95 binding and make
MODEM_CELLULAR_DEFINE_INSTANCE() use it through DT_PROP_OR().
Boards that carry a BG95-M3 Mini-PCIe card—or any other variant that
boots at VCC can now declare the property and skip the PWRKEY pulse,
while existing designs continue to behave unchanged.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-19 13:44:37 -04:00
Van Petrosyan
25cd0d6341 drivers: modem_cellular: use AT+QGMR to fetch FW version on BG95
Quectel BG9x returns only the base model string to AT+CGMR, while
AT+QGMR provides the true firmware build ID, e.g.

  AT+CGMR  → BG95M3LAR02A03
  AT+QGMR  → BG95M3LAR02A03_01.204.01.204

Replace CGMR with QGMR in the BG95 init script so that
cellular_get_modem_info(... FW_VERSION ...) reports the complete
version string.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-19 13:44:20 -04:00
Van Petrosyan
06b4adda81 drivers: modem_cellular: Add shutdown script for BG95
Add quectel_bg95_shutdown_chat_script that issues AT+QPOWD=1 and
link it to MODEM_CELLULAR_DEVICE_QUECTEL_BG95 to enable a clean
software-initiated power-off path

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-19 13:44:09 -04:00
Tim Lin
daaacd2998 drivers/i2c: it51xxx: Add support two target addresses for each target
This commit adds support for configuring two user-defined target
addresses in the I2C target driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-19 13:42:42 -04:00
Guennadi Liakhovetski
b6786a2f75 drivers: dai: dmic: fix 2 compiler warnings
Fix two compiler "unused function" warnings.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-07-19 13:42:30 -04:00
Jakub Zymelka
35044b64e4 drivers: adc: nrfx_saadc: Fix SAADC shim for nRF54LV10A
GAIN field is not present on LV10A, so instead we need to
check the input value to the function.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-07-19 13:40:29 -04:00
Rafał Kuźnia
3cccfa5f64 drivers: ieee802154: nrf5: prevent negative timestamps
The nrf-802154 driver may be unable to acquire a valid timestamp under
rare conditions. In such case, the nrf_802154_received_timestamp_raw
reports time=NRF_802154_NO_TIMESTAMP.
The shim implementation must not calculate the PHR timestamp when
receiving this value, because doing so results in an assert in
ptp_packet.h due to a negative time value.
When the driver is unable to capture the timestamp, the packet is
assigned zero as its timestamp.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-07-19 13:39:58 -04:00
Tomasz Moń
97e363f868 drivers: udc_dwc2: Arm control out endpoint in DMA mode
It was observed that device ceases to work in Buffer DMA mode after GET
DEVICE QUALIFIER request is STALLed (when USB stack is limited to
Full-Speed only operation). The issue is due to missing dout feed.

Clear pending dout feed flag after bus reset (enumeration done) and
after stalled control read transfer to allow dout to be feed when
necessary.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-19 13:39:47 -04:00
Bjarki Arge Andreasen
f5ee52ecf3 drivers: can: nrf: fix invalid pointer leading to undef behavior
The can_nrf device driver incorrectly passes its own device
driver pointer to a call to clock_control_get_rate() to get the
rate of the auxpll. The actual device driver which should be passed
to clock_control_get_rate() is the auxpll.

Without this fix, the call jumps to the can_nrf_api and returns
garbage (unfortunately it does not hardfault, which is why this
issue has not been discovered yet).

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-19 13:28:38 -04:00
Luis Ubieda
cf4a16e09c bmp581: Add Streaming support
Working only with DRDY Interrupts. FIFO watermark not added yet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:26:42 -04:00
Luis Ubieda
5671129f1a bmp581: Add One-shot Read-Decode support
Decoding one-shot reads through submit API.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:26:42 -04:00
Luis Ubieda
a32d5c15fe bmp581: Move bus transfers to work over RTIO
In order to abstract details of the transport itself, improving
portability.

No functional changes at this point. Driver works the same as far
as my local testing goes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:26:42 -04:00
Luis Ubieda
c62e4b5a88 bmp581: Add dts-properties to set default configuration
The existing driver requires setting multiple attributes in order to
work basic fetch/get reads. Simplify this by allowing the user to set
dts node properties based on the use-case.

As a result, basic settings results in the driver being up and running
from the start, one can just get sensor readings out of the box.

These still can be overriden at run-time if need be.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-19 13:26:42 -04:00
Declan Snyder
efdd8580ca soc: nxp: Flatten MCX SOCs
Turn MCX series into families.

Reasoning:
 1. The MCX SOCs are quite different from each other and having them all
    under one family in the HWMv2 hierarchy is fruitless because there
    are so many differences that it is confusing to try to introduce
    family-level code and configs since they would each only apply to a
    subset of the series. There is almost nothing that can be shared
    between all of them. Which is why there are comments in the MCX
    family files saying not to put anything in them. This is a technical
    waste.
 2. Therefore, turning all of them into families is almost 0 effort and
    makes sense. It will allow these different types of MCX to be
    further subdivided into series in the future as the MCX portfolio
    expands and such division will be necessary as new SOCs within each
    letter family are released.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-19 13:25:29 -04:00
Sylvio Alves
05316bd0ed drivers: uart: esp32: avoid pin re-configuration on uart_configure()
Ensure uart_configure() only updates UART parameters without
reassigning pin configuration. Pin assignment via pinctrl is now
restricted to the initialization procedure, guaranteeing pins are
set only when properly configured.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-19 13:23:29 -04:00
Rafał Kuźnia
5925d718ef drivers: ieee802154: nrf5: drop packets that are too long
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.

The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-07-19 13:23:06 -04:00
Erwan Gouriou
a884e3b537 drivers: timer: stm32 lptim: Fix the st,timeout runtime check
Existing check failed on correct settings.
Add an assert to fasten the debug.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-19 13:22:44 -04:00
Erwan Gouriou
e99db0ddd2 drivers: timer: stm32_lptim: Fix behavior of st,timeout
To be consistent with the definition of label stm32_lp_tick_source,
be sure "st,timeout" is taken from the LPTIM defined as lp_tick_source.

Then, fix the computation of lptim_time_base.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-19 13:22:44 -04:00
Sylvio Alves
e794a86a94 drivers: intc: esp32: fix non-IRAM mask usage in interrupt disable
Fix the non-IRAM interrupt disable routine to use non_iram_int_mask[cpu]
directly instead of its bitwise inverse. The previous implementation used
the wrong mask and could affect unrelated interrupts. This change ensures
that only intended non-IRAM interrupts are disabled and restored.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-19 13:20:38 -04:00
Sylvio Alves
d55c550579 drivers: intc: esp32: fix and reset flags when freeing interrupt
Fix bitwise operation when freeing an interrupt to correctly clear the
VECDESC_FL_NONSHARED, VECDESC_FL_RESERVED, and VECDESC_FL_SHARED flags.
Also reset the interrupt source to ETS_INTERNAL_UNUSED_INTR_SOURCE to
ensure proper cleanup and prevent issues with future allocations.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-19 13:20:38 -04:00
Sylvio Alves
5e6d118389 drivers: intc: esp32: fix race in critical section locking
Replace global lock variable with function-local storage for irq_lock()
state. This fixes a race condition when multiple access enter or exit
the critical section at the same time. Now each lock/unlock pair uses
its own key, making interrupt safe.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-19 13:20:38 -04:00
Fin Maaß
d4a2a2e581 drivers: ethernet: adin2111: make register access independent
don't use global buffers for reg_read and reg_write,
so we only need to rely on the spi drivers lock and
don't have to use our lock.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-19 10:24:05 +02:00
Tahsin Mutlugun
edc9ff951d drivers: spi: spi_max32: Return proper error codes in spi_configure
spi_configure was returning HAL error codes that are incompatible with
Zephyr error definitions straight back to the caller. Replace these with
error codes that Zephyr can correctly interpret.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-19 10:21:58 +02:00
Tahsin Mutlugun
f47449e7e9 drivers: spi: spi_max32: Fix word size support
Driver was not handling SPI word sizes other than 8 bits. Apply DFS
shift wherever necessary to support non 8-bit transfers.

DMA mode cannot support word sizes that are less than 8 bits so return
-ENOTSUP if word size less than 8-bits is required.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-19 10:21:58 +02:00
Mario Paja
442465f81c drivers: i2s: add sai support for stm32h5xx
Define SAI nodes for STM32H5 series and enable samples/drivers/i2s/output
for nucleo_h563zi board.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-07-19 10:16:03 +02:00
Tahsin Mutlugun
f9d35e2e8b drivers: sensor: adxl367: Fix log module declaration
Resolve a compilation issue caused by incorrect logging state
declaration for ADXL367.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-07-19 10:11:43 +02:00
Alvin Šipraga
cc08d96d79 drivers: gpio: mspm0: allow configuration of open-drain outputs
Check the GPIO_OPEN_DRAIN flag and set the corresponding HIZ1 bit in the
PINCM register.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00
Emil Dahl Juhl
5ede804e2d drivers: gpio: mspm0: Mask interrupts correctly
Reading back the raw interrupt status from the gpio controller, provides
the interrupt mask _without_ the controller's masking registers applied.
This means that e.g. a rising edge would trigger an interrupt even on
pins that are configured for falling edge only.

Fix this by reading the "enabled" interrupt status instead of the raw
one.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00
Emil Dahl Juhl
3e5b9728e9 drivers: gpio: mspm0: Fix interrupt polarity
The polarity mapping was swapped such that GPIO_INT_TRIG_LOW would
translate to high, and vice versa, on the chip configuration.

Swap the polarity to fix this.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00
Hans Binderup
e88a14751a drivers: gpio: mspm0: Add support for GPIO_GET_DIRECTION
This commit implements the gpio_get_direction handle for the gpio_mspm0
driver.

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00
Hans Binderup
8bc98ead34 drivers: gpio: mspm0: Add support for GPIO_GET_CONFIG
This commit implements the gpio_get_config handle for the gpio_mspm0
driver.
NOTE: Currently only handles input/output state and not configured flags

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00
Hans Binderup
9edd7b0661 drivers: gpio: mspm0: fix disabled state handling
Prior to this commit, writing a gpio port would completely clear
the state of given port. This commit ensures that state is kept
when writing, reading and configuring gpio ports.

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
2025-07-19 10:09:13 +02:00