Commit graph

24538 commits

Author SHA1 Message Date
Qiankun Li
d5a9a0fa87 drivers: wifi: nxp: Fix embedded supplicant stations link mode issue.
The link mode of legacy staions is specifically
divided into Wi-Fi_1, Wi-Fi_2 and Wi-Fi_3.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Qiankun Li
26f4d9b551 drivers: wifi: nxp: Fix getting error stations twt capability issue.
When external station connects to soft ap,
fill ap_sta_info.twt_capable with external
station HE capability.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Qiankun Li
f1b781577e drivers: wifi: nxp: Fix embedded supplicant link mode issue.
1. When external stations connect to soft ap,
   Wi-Fi driver will send UAP_CLIENT_ASSOC event with data.
   nxp_wifi_wlan_event_callback will be called to process this event.
2. The data should include some basic station information
   but not only mac address of station.
3. Fill ap_sta_info with information of
   connected station but not soft ap self.
4. Fix: Wi-Fi driver send UAP_CLIENT_ASSOC event
   with basic station information.
5. Fix: ap_sta_info with information of connected station.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Raymond Lei
0d2935218c drivers: spi: nxp: fix PCS broken issue and PCS_HOLD_ON support
Different LPSPI IPs are used for RT11xx and MCXN. On a older version of
LPSPI, a transmit command or a TX data need to be issued to end a frame.
On a new version, no such requirement.

Based on above information, we have to make DMA transfers "cascade" in
the DMA ISR to keep CS asserted during the whole SPI transfer.

PCS_HOLD_ON is a feature to keep CS asserted during multi SPI transfers.
It is implemented and supported on new LPSPI IP but it is impossible to
be supported on an older version like RT11xx.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-26 22:06:04 -05:00
Declan Snyder
ab9b9bfab3 spi_nxp_lpspi: Add slave mode support
Add rudimentary slave mode support to the interrupt based LPSPI driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-26 11:07:55 -10:00
Sylvio Alves
9952180987 soc: espressif: sync hal to latest updates
1) Bring latest hal_espressif updates/sync to latest v5.1 branch.
2) Update RF libraries for bug fixes and improvements
3) Add necessary BLE Kconfig entries to support latest changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-26 10:51:45 -10:00
Tony Han
95454914bf drivers: rtc: sam: update for supporting RTC of sama7g5 devices
The basic characteristics of "atmel,sam-rtc" is the same as the ones
of sama7g5.

Differences between the RTCs listed bellow:
                    | atmel,sam-rtc | rtc in sama7g5
--------------------|---------------|----------------------
Persian calendar    |      Y        |         N
UTC Mode support    |      N        |         Y
Tamper Timestamping |      N        |         Y

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-06-26 10:42:39 -10:00
Jérôme Pouiller
ffebf73079 drivers: wifi: siwx91x: Assign variable on declaration
When a variable is assigned once, we try to assign it during the
declaration.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
8d1d8d2b86 drivers: wifi: siwx91x: Prefer WIFI_MAC_ADDR_LEN
The preferred way to reference the size of the MAC address is
WIFI_MAC_ADDR_LEN.

For consistency, replace ARRAY_SIZE(mac.octet) with WIFI_MAC_ADDR_LEN.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
2ae23f7c58 drivers: wifi: siwx91x: Do not set unused values
We avoid to assign unused values during declaration. Hence, the reader
knows that every value assigned are meaningful. It also allow compile to
raise true warning if a value is used uninitialized.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
0b8f7d85bc drivers: wifi: siwx91x: Uniformize error management
Usually, the exception are treated in a condition before the nominal
case:

    ret = f();
    if (ret) {
        return -EXXX;
    }
    ... nominal case ...

siwx91x_on_join_ipv4() and siwx91x_on_join_ipv6() didn't follow this
pattern.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
a89dc21a2b drivers: wifi: siwx91x: Uniformize declaration of 'interface'
sl_wifi_interface_t interface is always initialized with
sl_wifi_get_default_interface().

Let's assign the value during the declaration everywhere.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
56fb22fba8 drivers: wifi: siwx91x: Group ARG_UNUSED() after declarations
We want to avoid declarations after statements.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
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