Commit graph

25,525 commits

Author SHA1 Message Date
Jérôme Pouiller
db2472209a drivers: wifi: siwx91x: Align the ways errors are managed
Unify the way the error code are tested:
  - sl_status_t is an alias to an int. The compiler won't complain if an
    int is assigned or compared to a sl_status_t. In the other hand,
    "int" is well known to manage error code. So, just use "int"
    everywhere.
  - Always name the return code "ret"
  - Unless it is meaningful, test the value of ret against 0
    (SL_STATUS_OK is just a convoluted way to say 0).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
dd0afec087 drivers: wifi: siwx91x: Clean up included files
To avoid confusion, we prefer to only keep header files really used by the
source file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
9cee7a1e57 drivers: wifi: siwx91x: Extract station related functions
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the station related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
5818738668 drivers: wifi: siwx91x: Extract Power Save related functions
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the power-save related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
9a1ebee72b drivers: wifi: siwx91x: Extract AP related functions
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the Access Point related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
6dd601c9f1 drivers: wifi: siwx91x: Extract scan related functions
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the scan related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
f6f387993f drivers: wifi: siwx91x: Fix siwx91x_wifi_socket.h syntax
Functions in siwx91x_wifi_socket.h are not declared static. So it create
duplicated symbols if the file is included twice.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Romain Jayles
684b90e6b3 bluetooth: stm32wbax: add temperature calibration of linklayer
This patch allows to link the request of the linklayer for a
temperature calibration to the temperature driver.
The linklayer will then adapt and trigger its calibration related to
the current temperature.

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2025-06-26 10:59:31 -05:00
Romain Jayles
94b82655fa drivers: bluetooth: dedicated Kconfig for the STM32WBA configuration
Adds a Kconfig for the STM32WBA associated BT configuration

The first configuration added is the possibility to activate the
calibration of the radio using the temperature

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2025-06-26 10:59:31 -05:00
Dave Joseph
76905a8e54 drivers: power_domain: Power domain TISCI driver support
Support added for power domain regulation using TISCI added for
devices using the binding ti,sci-pm-domain.
This driver relies on the TISCI layer to make calls to the
device manager core to perform power management.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2025-06-26 10:57:45 -05:00
Jeppe Odgaard
dffbd4fc88 license: fix copyright owner
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-06-26 10:56:48 -05:00
Ryan McClelland
d0d9894070 drivers: sensor: bmm350: expose magnetic reset
This exposes a driver specific function to perform a
magentic reset by the application.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
8cdaf1db99 drivers: sensor: bmm350: run clang-format
Run clang-format on files

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
dc6594997c drivers: sensor: bmm350: nit picky cleanup
There were a lot of places where the return value was sum'ed up
which can be slightly easier to read, but can give an odd return
value in the end. This changes it to just return immediately if
an error is seen.

There was also runtime NULL checking of input arguments that are
rather programmer clown prevention. Change these to asserts.

The return value didn't have a consistant type through the file,
make it consistently an int.

This changes the name of the return value of fix_sign to be
signed_value differenating it from the ret name used elsewhere.

Use the sizeof(buffer) as the argument for reg reads and writes
rather than a hard number.

Some log messages ended with '\n'. Remove all these.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
e636fb2dd1 drivers: sensor: bmm350: add pad ctrl and int ctrl dts config
Add configurations for setting the pad drive strength and the
interrupt active high/low and od/pp.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
d2fdf52d43 drivers: sensor: bmm350: fix handling interrupt race condition
There is a race condition where an interrupt can fire before the
drdy_handler is registered. The drdy_handler will tradionaly
callback the sample get clearing the interrupt... but if it's not
configured and NULL, the interrupt will stay forever latched. Read
the interrupt status to clear the interrupt flag allowing it to
trigger again.

Also, move the serial api function helpers in to the header
allowing them to be used from other c files.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
c7e1f0b3da drivers: sensor: bmm350: fix no averaging val for oversampling
Fix the oversampling value to be 1 from 0 for no oversampling to be
consistant with other sensor drivers.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
b1dac48faa drivers: sensor: bmm350: add default odr/osr
Add a way to define the default odr and osr with devicetree for
the bmm350.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
8720b2368e drivers: sensor: bmm350: add attr_get
Add the attr_get api. Also rename functions where they implied
accelerometer to imply magnetometer.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Miguel Gazquez
d3cae7ee92 drivers: sensors: add driver for the magnetometer in lsm9ds1
This driver supports the magnetometer in the ST lsm9ds1 sensor, on the
I2C bus.
This driver does not support the triggers.
This driver use the stmemsc HAL.

link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-26 10:55:11 -05:00
David Jewsbury
0285cf4235 drivers: clock_control: update nrf2 lfosc_get_accuracy
Move lfosc_get_accuracy away from common library as
not all devices need this function.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
9087e82c9f drivers: can: update clock control to use nrf2_auxpll
Auxpll driver has been refactored to use nrf2 API instead.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
49b0f1abb8 drivers: clock_control: refactor nrf_auxpll driver to nrf2
Refactor of previous clock_control_nrf_auxpll.c to use
the nrf2 clock control API

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
Jukka Rissanen
cdc6c324d7 net: dns: Save info about source when configuring DNS servers
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-26 14:08:19 +02:00
Sebastian Głąb
031040872e drivers: i2c: Support i2c23 and i2c24 instances
Extend I2C driver with possibility to use
- TWIM23, TWIM24,
- TWIS23, TWIS24.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-06-26 14:07:55 +02:00
Bjarki Arge Andreasen
652635fab9 drivers: pinctrl: nrf: patch pin retain to follow lp mode
Pins can be configured to retain their config even when the power
domain they belong to is suspended. Update pinctrl_nrf to enable
retain only if the pin has been configured and is not in use
(pincnf is low-power/sleep), disable retain otherwise.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-26 14:07:43 +02:00
Bjarki Arge Andreasen
691b3356f8 drivers: gpio: nrfx: extend pin retain to every pin
The usage of nrf_gpio_port_retain_disable/_enable, in cases where
the soc pins support retention, every pin must be
retained/unretained regardless of what power domain the pad is in.

This patch ensures retain is applied to all pins in all domains by
the gpio_nrfx device driver, not only pins specifically in the
fast_active_1 domain. Without this patch, pinctrl will correctly
retain pins, while gpio_nrfx will fail to unretain them when
again.

We no longer check the output state either, which was passed with
the flags arg of gpio_nrfx_gpd_retain_set() so this arg has been
removed.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-26 14:07:43 +02:00
Julien Racki
d418512473 drivers: clock_control: stm32: Fix STM32MP13 gate clock disable
The STM32MP13 clock control has set and clear registers
for the clocks. So clearing the set register won't have any effect.
Instead, we should write on the clear register.

Signed-off-by: Julien Racki <julien.racki@st.com>
2025-06-26 14:07:25 +02:00
Duy Nguyen
5c293b9915 drivers: serial: Fix issue qemu rx cannot input console
The source code is missing the Receive enable in serial
poll-in function so the status flag will never become affect
and data will never be read
Add the RE write before checking for receive status flag

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-06-26 14:07:03 +02:00
Lewis Lee
39f3a62dc1 drivers: i2s: Added Apollo510 I2S driver.
I2S driver support standard format, short/long sync, left/right justified.
Supporting 2 channels as a default.

Signed-off-by: Lewis Lee <llee@ambiq.com>
2025-06-26 14:06:49 +02:00
Lewis Lee
6d34549ff3 drivers: audio: dmic: Add Apollo510 PDM driver for DMIC.
Add PDM driver for DMIC.
This driver is compatible with samples/audio/dmic application.

Signed-off-by: Lewis Lee <llee@ambiq.com>
2025-06-26 14:06:49 +02:00
Etienne Carriere
4bce536cc6 drivers: clock_control: stm32: release Backup Domain access refcount
Fix STM32 WBA and H7 clock drivers to release the reference counter
added to access LSE configuration controllers once the clock is
configured. Keeping such an unbalanced access request is no more
needed since SoC functions manage reference counting of access requests.

Fixes issue 90942.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-06-26 12:43:17 +02:00
Etienne Carriere
8da20047cc drivers: clock_control: stm32: refcounter for Backup domain accesses
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.

By the way, correct stm32_hsem.h header file inclusion that requires
brackets (<>) delimiters, not double quotes, as per convention on header
location.

Fixes issue 90942.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-06-26 12:43:17 +02:00
Etienne Carriere
c7ea5a89e6 drivers: rtc: stm32: refcounter for Backup domain accesses
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.

By the way, move inclusion of stm32_hsem.h header file after inclusion
of the LL header files and Zephyr header standard files.

Fixes issue 90942.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-06-26 12:43:17 +02:00
Etienne Carriere
5a279d9309 drivers: counter: stm32: refcounter for Backup domain accesses
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access. When we're done accessing RTC registers and
other protected resource, release the access refcount.

By the way, simplify rtc_stm32_read() when COUNTER_NO_DATE is defined
that used a useless extra local variable.

By the way, correct stm32_hsem.h header file inclusion that requires
brackets (<>) delimiters, not double quotes, as per convention header
location.

Fixes issue 90942.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-06-26 12:43:17 +02:00
Etienne Carriere
c99715a866 drivers: bbram: stm32: reference counter for Backup Registers accesses
Use recently added SoCs functions to request access to SoC backup
domain resources These function use a reference counter to track these
request and ensure the resources are accessible as long as at least a
consumer requires access.

Fixes issue 90942.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-06-26 12:43:17 +02:00
Daniel Leung
12ed0528b3 Revert "drivers: serial: ns16550: Fix TX IRQ not triggered...
...when FIFO is empty"

This reverts commit 47e43d552e.

This is breaking sample.sensor.shell.pytest where characters
are either missing or repeated when printing to the console.

Originally this is just for RISC-V with PLIC interrupt
controller. That was made more general to avoid having arch
specific code in a generic driver. And now it is breaking
on non-RISC-V platforms. Note that the QEMU RISC-V boards
all have PLIC as interrupt controller and are passing sensor
shell pytest without this workaround. So this does not seem
to be an issue with PLIC and NS16550.  So revert the commit
for now.

Fixes #92187

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-26 12:42:11 +02:00
Chun-Chieh Li
2fd79998d0 drivers: wifi: esp_at: fix +CIPRECVDATA parsing for AT 1.7
This fixes +CIPRECVDATA parsing for AT 1.7. Per AT 1.7 spec,
remote ip/port is not replied.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-26 11:19:56 +02:00
Qiankun Li
702221da2d drivers: wifi: nxp: Fix TWT setup issue.
When try to set twt, system will try to
get interface status firstly.
In shim driver, miss filling twt_capable field.
The twt_capable is set as false by default.
Failed to set twt because of incorrect
twt_capable.

Add enhance code to fill twt_capable field
in shim driver.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 11:19:48 +02:00
Martin Jäger
cba8b33c3d drivers: ieee802154: Add implementation for ESP32 series
Initial commit of the IEEE 802.15.4 driver using Espressif HAL.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-06-26 11:12:34 +02:00
Khoa Tran
e84ea05dd4 drivers: i2s: Initial driver support for SSIE on Renesas RA
Add i2s driver support for Renesas RA SSIE

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
2025-06-26 11:12:21 +02:00
Chew Zeh Yang
5e5c40c489 drivers: udc_ambiq: added support for double endpoint buffer
implements option to enable double endpoint buffer to improve throughtput
for non-control endpoints.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2025-06-26 11:12:02 +02:00
Chew Zeh Yang
46cdb84590 drivers: udc_ambiq: add support for apollo510
Added UDC support for Ambiq apollo510 family with USB HS and DMA support.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2025-06-26 11:12:02 +02:00
Nhut Nguyen
f7120c716b driver: serial: rz: Fix serial issue with sci and scif
Fix issues that Renesas RZ boards cannot run the below serial
samples properly with sci and scif.

- `samples/subsys/console/echo`
- `samples/subsys/shell/shell_module`

The modification is to make the callback invoked in tei interrupt.

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-06-26 11:11:47 +02:00
b1cd947771 drivers: adc: add a driver for the CH32V003 ADC
The CH32V003 has a 8 channel, 10 bit onboard ADC. Add an immediate
mode driver and the appropriate pinctrl bindings. Note that the
CH32V003 GPIO pins have both a floating input and an analogue input
mode, and the pinctrl is needed to put the pin in analogue mode.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-26 09:42:20 +02:00
Benjamin Cabé
a06454f61f drivers: i2c: renesas_rz_riic: fix apply state in init code
Fixed the reverse logic of checking if `pin_config` is set in the init
code.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-26 09:39:39 +02:00
Marco Marche
f5f90395c9 drivers: adc: ad7124: add current sources support
Adds support for configuring the AD7124's excitation current sources.

Signed-off-by: Marco Marche <marco.marche@gmail.com>
2025-06-26 09:39:25 +02:00
37190890d6 drivers: gpio: add interrupt support for the CH32V family
The WCH GPIO peripheral integrates with the EXTI and supports firing
interrupts when a GPIO pin changes.

Add optional support for firing a callback on rising edge, falling
edge, or both edges.

Tested on the `linkw` and the `ch32v006evt` using
`samples/basic/button`.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-26 09:38:56 +02:00
b99b7d14f1 drivers: interrupt_controller: add a WCH EXTI external interrupt driver
The WCH External Trigger and Interrupt controller (EXTI) supports
between 8 and 22 lines where each line can trigger an interrupt on
rising edge, falling edge, or both edges. Lines are assigned to a
group, and each group has a separate interrupt. On the CH32V003/6,
there is one group of 8 lines, while on the CH32V208 there are
multiple groups with between one and six lines per group.

In the same way as the STM32 and GD32, define an EXTI driver that
configures the peripheral and an internal interface that can configure
individual lines.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-26 09:38:56 +02:00
Jamie McCrae
98c5b1c1fa drivers: clock_control: nrf: Fix bleeding Kconfig
Fixes a Kconfig bleeding through to every device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-25 15:57:24 -10:00