Commit graph

114117 commits

Author SHA1 Message Date
Daniel DeGrasse
b84076a192 cmake: arm: linker: remove usage of ld-specific ADDR() function
Remove usage of ld-specific ADDR function within the cmake linker
generator scripting. Since the linker generator scripting doesn't
support MPUs, we can simply set the __ramfunc_region_start symbol to be
equal to __ramfunc_start

Fixes #87200

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-04-24 16:54:14 +02:00
Ederson de Souza
01d10a4115 twister: Look at SIMICS_PROJECT environment variable to find simics
While cmake/emu/simics.cmake uses SIMICS_PROJECT env var, twister checks
if a build is "runnable" by checking if `simics` is executable, but it
doesn't look at SIMICS_PROJECT env var.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-04-24 16:54:00 +02:00
Ederson de Souza
f968d49232 cmake/emu: Use environment variable value on message about it
A message about not finding simics at SIMICS_PROJECT env var was not
showing the current value of said variable.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-04-24 16:54:00 +02:00
Benedikt Schmidt
21c1a9ef09 drivers: fpga: use device_deinit in ICE40 bitbang driver
Replace reapplying the original pin configuration via pinctrl
in the ICE40 bitbang driver with a device_deinit/device_init.
Fixes #77983.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2025-04-24 16:53:49 +02:00
Nicolas Goualard
27bfeea162 mcumgr: fs_mgmt: Add a hook on download/upload complete.
Added a hook on the FS group that notify applications when a
 file download/upload has completed.

Signed-off-by: Nicolas Goualard <nicolas.goualard@sfr.fr>
2025-04-24 16:53:35 +02:00
Sahaj Sarup
d784adbc1b shield: m5stack_cardputer: initial support
Added initial support for the M5Stack Cardputer shield for
M5 Stamp S3. The following features are supported:

- uSD
- st7789 LCD
- Analog input from VBAT
- I2C on the grove connector

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2025-04-24 16:53:25 +02:00
TOKITA Hiroshi
8f9dc66f98 boards: m5stack: cores3: Add configuration for AXP2101
Adding configuration for enabling AXP2101.
Currently, it supports only LED features.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
TOKITA Hiroshi
ee68472082 tests: driver: build_all: led: add AXP192/2101 to tests
Add AXP192/2101 LED controller function driver to build_all test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
TOKITA Hiroshi
7237a2659d drivers: led: Add driver for AXP192/2101 LED control function
Add a driver to support AXP192/2101's LED control function.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
TOKITA Hiroshi
ff9d35ab95 dts: bindings: Define a bus for the axp192/axp2101.
Define a bus to show the dependencies of each function
on the AXP192/AXP2101 MFD.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
Sayooj K Karun
bf104d42cb bluetooth: mtu_update: peripheral: Add NULL check
Add NULL check for connection context, and only send the
notification if connection is established.

Signed-off-by: Sayooj K Karun <sayooj@atmosic.com>
2025-04-24 11:57:43 +02:00
Anas Nashif
9aba1323ce doc: cache: fix cache doc structure
Wrong levels and cache topic appearing in the wrong table of contents.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-24 11:57:36 +02:00
Max Emde
e04d828219 Bluetooth: BAP: Update encrypt_state when BIG synced after bad code
- When encrypt_state in a receive state of the scan delegator is
  BT_BAP_BIG_ENC_STATE_BAD_CODE, make sure that on synchronization
  encrypt_state is updated to BT_BAP_BIG_ENC_STATE_DEC, as this
  implies that a correct code was provided, so that the broadcast
  assistant is not asked for a correct code any longer.

Signed-off-by: Max Emde <mxem@demant.com>
2025-04-24 11:57:25 +02:00
Ravi Dondaputi
870b2872fd snippets: wifi-enterprise: Resize data heap to fix RAM overflow
Inclusion of CONFIG_WIFI_SHELL_RUNTIME_CERTIFICATES causes build time
RAM overflow issues. Decrease NRF_WIFI_DATA_HEAP_SIZE to accommodate
the RUNTIME_CERTIFICATES feature.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-04-24 11:57:10 +02:00
Wojciech Klimek
21738825e9 boards: stm32: Add zephyr_udc0 to nucleo_h503rb
Added config of USB peripheral for Nucleo H503RB.

Signed-off-by: Wojciech Klimek <wjklimek1@gmail.com>
2025-04-24 11:57:04 +02:00
Jordan Yates
befb464d6e modules: fatfs: volume strings from DTS
Instead of relying on a hardcoded list of valid strings, automatically
create a perfectly sized array of disk names from devicetree.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-24 11:56:57 +02:00
Jordan Yates
0b5021aec8 tests: fs: lib_link: add RAM disk overlay
Add a basic RAM disk overlay for libraries that expect at least one disk
driver to be enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-24 11:56:57 +02:00
Jordan Yates
42f1740361 boards: st: stm32h747i_disco: add SD disk name
Add a disk name to the SDMMC node, as done for all other SD card
compatibles in tree.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-24 11:56:57 +02:00
Ruibin Chang
eb99158a80 drivers/sensor/ite/tach/it51xxx: implement tachometer driver
Implement tachometer driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-04-24 11:56:44 +02:00
Titan Chen
e6bb7fc6cf soc : realtek: ec: rts5912: add support ULPM
Port rts5912 ULPM on Zephyr

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-04-24 11:56:36 +02:00
Erwan Gouriou
b4c1dc63a8 soc: stm32h7r/s: smps is supported on all SoCs
Remove the sanity check between Cube HAL SMPS symbol and Kconfig SMPS
configuration.
SMPS is available on all STM32H7R/S SoC, so misalignment isn't possible.

Additionally, point to the hal commit which revert the fix which was done
on hal_stm32 to add this symbol.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-04-24 10:39:34 +02:00
Emil Gydesen
c8742a3cec Bluetooth: Mesh: Add missing includes to va.h
The va.h file used both uintX and bool without including
the appropriate header files, which can cause a compile issue
if the file is included in the wrong order.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-24 10:39:21 +02:00
Emil Gydesen
72d9a37159 tests: Bluetooth: Tester: Cleanup includes
Update the includes so that only what is actually used is included,
and so that everything is used is includes (IWYU).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-24 10:39:21 +02:00
Declan Snyder
e71aa649b2 spi_nxp_lpspi: Support SPI_HOLD_ON_CS FLAG
Support SPI_HOLD_ON_CS flag in the CPU-based driver. To do this we will
set CONTC bit to continue previous command. Technically it may not be
necessary right now, and could just not clear CONT bit...
but in the future in the lpspi driver we
will decouple the config/init of a transfer from the SDK
and therefore have more control over TCR,
and when we write the TCR, we need to take CONTC bit into account
otherwise a new command will be made. So this approach is how
it should be handled in the driver going forward in my opinion, even
if it might be possible without this bit right now, I want to introduce
it's usage now.

This commit also does a minor refactor in the ISR and adds some comments
to make the strange CS behavior and strange handling code more clear to
future readers.

Also, make the early predicted SPI xfer end code only happen for spi
versions where it is necessary, since I think that code is really the
best we can do but might have a race condition, where possible the last
word is not finished sending when we end the xfer. So limit the
potential affect to v1 lpspi where the workaround is actually required
due to stalling behavior.

Lastly, set the LPSPI into master mode at active low in init, due to
it being the most common case, we want the SPI CS lines to be
initialized at init of driver. I don't think it's worth it to make it
configurable at this time, but in the future it could be if needed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
17ec70c9c1 spi_nxp_lpspi: Use one logging module
Use one logging module for LPSPI driver instead of 3

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
9d0762a1b8 spi_nxp_lpspi: Fix word size > 8
Fix calculations for larger than 8 bit word sizes

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
d54d63d518 spi_nxp_lpspi: Support word size < 8
The LPSPI does support word sizes such as 6 or 7, anything as small as 2
bits. So fix the checks and the math to allow for this in the driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
0cc535eedd spi_nxp_lpspi: Optimize TX fill for less interrupt
Optimize the TX fill algorithm to have less interrupts by filling the TX
fifo as much as possible during each interrupt handle.

Before, the algorithm was just a very simple, fill the TX fifo with as
much from only the current buffer as possible, then send it and wait for
the next interrupt. Now the algorithm is to fill the TX fifo as much as
possible, even if it means reading from multiple buffers during the
interrupt.

This has the advantage from master mode of having less interrupts. And
it is very important for slave mode because the slave mode does not
control the pacing of the transfer and so therefore should fill as much
as possible whenever possible in order not to miss a deadline.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Lyle Zhu
e454b0d678 Bluetooth: tester: Support board mimxrt1170_evk@B/mimxrt1176/cm7
Add test case bluetooth.general.tester_br_edr.

Add overlay `zephyr,sram` and `zephyr,uart-pipe` for the board.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
539a28312a Bluetooth: tester: Add project configuration for BR
Set following configuration by default,
CONFIG_BT_CLASSIC=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_PAGE_TIMEOUT=0xFFFF

When building the project, the argument `--extra-conf prj_br.conf`
needs to be appended for BR.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
065762cd2d Bluetooth: tester: Add BTP event encryption change
Report encryption change event when callback `le_security_changed` is
triggered.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
424364ded0 Bluetooth: tester: Support l2cap connect rsp insuff secure authen
If the L2CAP connection response of command `listen` is
`BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_SEC_AUTHEN`, set the security
level of L2CAP server to level 4.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
ba55e9d7c0 Bluetooth: tester: Ignore error -EBUSY of bt_conn_set_security
The error code `-EBUSY` of `bt_conn_set_security` means the
pairing/encryption procedure is ongoing. Ignore the error code.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
81b8f8d265 Bluetooth: tester: Add command pair_v2 for BTP GAP
Compare with BTP GAP pair, the pair_v2 add more arguments, including
security mode, security level, and flags.

The argument `security mode` is used to set the security mode.

The argument `security level` is used to set the security level of the
specific security mode.

The argument `flags` is used to add additional setting, such as flag
`BTP_GAP_PAIR_V2_FLAG_FORCE_PAIR` is used to force the pairing
procedure.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
1f73bd7312 Bluetooth: tester: Support BR L2CAP connect and disconnect BTP command
Change the channel id rage of BR L2CAP channel to
`ARRAY_SIZE(channels)` ~ `ARRAY_SIZE(channels) + CHANNELS`. The
unified channel ID can help identify whether the channel is BR or BLE
L2CAP channel.

When the address type of L2CAP connect command is
`BTP_BR_ADDRESS_TYPE`, create BR L2CAP channel connect request.

And if the channel ID falls into the range `ARRAY_SIZE(channels)`
~ `ARRAY_SIZE(channels) + CHANNELS` of L2CAP disconnect command,
create BR L2CAP disconnect request.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
4fdc79d1e3 Bluetooth: tester: Support BR connect and disconnect features
Create BR connect if the address type is `BTP_BR_ADDRESS_TYPE` when
handling BTP GAP `connect` command.

Disconnect BR connect if the address type is `BTP_BR_ADDRESS_TYPE`
when handling BTP GAP `disconnect` command.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
71f81660d4 Bluetooth: tester: Enable GAP discover feature for BR
Call `bt_br_discovery_cb_register` to register discovery callbacks.

Define a buffer br_adv_buf to report br discovery result.

Report device found event if discovery received callback triggered.

Start BR device discovery procedure if command `start_discovery` is
received.

Stop BR device discovery procedure if command `stop_discovery` is
received.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
2cae2622ae Bluetooth: tester: Support pincode request for BR
Set the pin code request callback `auth_pincode_entry`.

If `highsec` is false, call `bt_conn_auth_pincode_entry` with pin code
"0000".
If `highsec` is true, call `bt_conn_auth_pincode_entry` with pin code
"0000000000000000".

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
05d6174c98 Bluetooth: tester: Support BR L2CAP listen mode
If cp->transport is BTP_L2CAP_TRANSPORT_BREDR, register BR L2CAP
server.

If cp->transport is not one of BTP_L2CAP_TRANSPORT_BREDR and
BTP_L2CAP_TRANSPORT_LE, return error code BTP_STATUS_FAILED.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
d083825cee Bluetooth: tester: GAP: Support BR connection
According to the connection type of connection, get the appropriate
peer address.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
4611c402e2 Bluetooth: tester: Support BR for security related commands
Look up the BR connection if the address type is BTP_BR_ADDRESS_TYPE.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
096fbb0c52 Bluetooth: tester: Add BR address type BTP_BR_ADDRESS_TYPE
The address type `BTP_BR_ADDRESS_TYPE=0xe0` of LE address is used to
mark as BR address.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
c667eb5aca Bluetooth: tester: Support connectable mode for classic
Disable connectable mode for classic if `cp->connectable` is false.

Enable connectable mode for classic if `cp->connectable` is true.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
353580a764 Bluetooth: tester: Support general and limited discoverable for classic
Disable discoverable mode if `cp->discoverable` is
`BTP_GAP_NON_DISCOVERABLE`.

Set general discoverable mode if `cp->discoverable` is
`BTP_GAP_GENERAL_DISCOVERABLE`.

Set limited discoverable mode if `cp->discoverable` is
`BTP_GAP_LIMITED_DISCOVERABLE`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Lyle Zhu
ba44d90a6a Bluetooth: tester: Set setting BREDR and SSP if classic is enabled
Set the supported settings `BTP_GAP_SETTINGS_BREDR` and
`BTP_GAP_SETTINGS_SSP` if the Bluetooth classic is enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Fengming Ye
23494b7b68 net: sockets: kconfig: change hostap default socket pair add heap size
Reduce default socket pair add heap size in hostap case.
Reduce 1 socket pair in wpa_supplicant case.
Reduce 2 socket pairs in wpa_supplicant and hostapd coex case.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-04-24 10:38:03 +02:00
Fengming Ye
fd0ac07a21 modules: hostap: remove zephyr wpa_msg socket pair
Background:
In DPP hostapd will put more than 1K bytes text in multiple
wpa_msg calls in one loop. This will drain hostapd monitor
socket pair and fail. Thus DPP connection will fail.

The monitor socket pair of wpa_supplicant and hostapd are not like
ctrl_iface socket pair, which are used for sending command to
hostap from other tasks. The monitor socket pair is used by wpa_msg
to send messages to attatched ctrl_iface monitors. But in zephyr case,
the monitor is hostap task itself.
This means hostap task is both the sender and receiver task.
So it writes all the wpa_msg text into FIFO and read it in next loop.
So there is risk of draining socket pair FIFO and missing msg.
And the reading socket loop can be omitted by directly handling msg
in wpa_msg_cb.

Linux uses monitor socket pair because hostap is a process and wpa_msg
does cross-process communication.
But zephyr hostap is used as module in the same binary with
zephyr kernel.
So the usage is different and we don't need to use socket pair to
notify ctrl_iface monitors.
As long as we don't do time-consuming process in zephyr_wpa_msg_cb,
it won't affect hostap task.
So the zephyr_wpa_msg_cb will only filter and restore interesting logs,
or raise mgmt events to wifi l2 mgmt task.

Fix:
Remove socket send flow in wpa_msg.
Directly filter and handle text in zephyr_wpa_msg_cb,
coding in zephyr repo.
This will save 2K RAM in supplicant case and 4K RAM in
supplicant & hostapd coex case, in current default hostap
socket pair config.
And this will save max 50% loops of hostap task.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-04-24 10:38:03 +02:00
Fengming Ye
c767fa51e2 manifest: update hostap revision
Update hostap revision to fix wifi dpp fail due to
wpa_msg draining socket pair FIFO.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-04-24 10:38:03 +02:00
Ricardo Rivera-Matos
eca57905a3 dts: arm: st: f4: adds stm32f401Xd dtsi
Adds a dtsi file for the STM32F401XD family of devices. These devices
are closely related to the STM32F401XE family of devices but with a
reduced flash memory from 512kB to 384kB.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-04-24 01:27:43 +02:00
Ricardo Rivera-Matos
2b553ba74f soc: stm32: Adds support for STM32F401XD variants
Introduces config file entries for STM32F401XD variants. The
STM32F401XD family is related to the STM32F401XE family but with a
reduced flash memory.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-04-24 01:27:43 +02:00