Commit graph

114038 commits

Author SHA1 Message Date
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
TOKITA Hiroshi
0032951e29 boards: m5stack: cores3: Add AXP2101 charger configuration
Adding AXP2101 battery charger configuration.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 01:27:34 +02:00
Javad Rahimipetroudi
42683c369c samples: spi_flash: add support for blackpill_f411ce
This commit add spi nor flash support for blackpill_f411ce board

Signed-off-by: Javad Rahimipetroudi <javad321javad@gmail.com>
2025-04-24 01:27:27 +02:00
S Swetha
cbc5fdbb4b tests: kernel: spinlock: Increase lock contention
This commit resolves lock contention
issues by increasing the probablity of
contention during the test execution.

Increased wait delay when lock is taken
and Reduced wait delay when the lock is
released.

Achieved 99% lock contention probablity,
verified through runtime metrices.

Signed-off-by: S Swetha <s.swetha@intel.com>
2025-04-24 01:27:00 +02:00
Jukka Rissanen
c09ec58f01 samples: net: dsa: Enable DHCPv4 and start it when interface is up
Enable DHCPv4 when network interface goes up. This makes it easier
to test IP connectivity with DSA.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
4eb1669ac6 samples: net: dsa: convert to new dsa core driver
Converted to new dsa core driver. And adapted mimxrt1180_evk to it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
14e4e12441 samples: net: dsa: rename master/slave to conduit/user
Renamed master/slave to conduit/user.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
e2488977e5 boards: nxp: mimxrt1180_evk: convert to random mac addresses for switch
Converted to use random mac addresses for switch.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
12ccaa1b46 drivers: ethernet: dsa_nxp_imx_netc: adapt to new DSA framework
Adapted to use new DSA framework. And related platforms converted
in samples too.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
2967b8db7e drivers: ethernet: eth_nxp_imx_netc: support no-tag type DSA conduit
Added support for no-tag type DSA conduit.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
81e0367e98 doc: connectivity: networking: add DSA document
Added DSA document.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
f0b1cb578f net: dsa: introduce new DSA framework
The new DSA framework purpose and changes are as below.

- Aligned to Linux DSA framework which has been already mature framework
  for many years, For now in zephyr, the DSA components were splited
  as: switch, port, master(not need driver file for now), slave, and tag.
  Seperated drivers were used for maintaining and developing new
  features.

- The unified dts bindings (aligned to linux) were supported. The port
  driver would parse DTS to decide the port type (master port, slave
  port, or cpu port) to set up the switch. All the ports registered as
  standard ethernet devices. (dsa port and dsa switch tree was not
  supported.)

- How to add DSA device driver based on the framework? All the device
  driver needing to do is providing dsa_spi implementation and private
  data, and calling below initialization.

    DSA_INIT_INSTANCE(n, _dapi, data)

- For switch tag case, recv/xmit helpers in dsa_api could be used for
  taging/untagging. No modified ethernet drivers.
  For no-tag type case, ethernet driver of master port should support
  packet injection/extraction for slave ports leaving NULL recv/xmit.

The dsa_nxp_imx_netc.c driver will be the first example of the new DSA
framework.

The future work for DSA will be supporting bridge for ports. We may align
Linux to give users two options to use DSA device:

- Standalone mode: the switch ports work as regular ethernet ports.

- Bridge mode: switch mode with virtual bridge device which could be
  assigned IP address.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
ba2028d19c dts: bindings: dsa: add common bindings file
Added common bindings file for dsa, and adapted NETC to it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
b22db75cec include: ethernet: rename dsa master/slave to conduit/user
Renamed dsa master/slave to conduit/user for capabilities.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
018a718e12 net: dsa: make current DSA core driver obsolete
Current DSA TX/RX way was hard-coded in ethernet devices driver
with ETH_DSA_SUPPORT and NET_DSA.
This patch is to make such way obsolete, as we actually will support
a better DSA framework to handle this in NET/DSA core driver.
To make legacy devices not affected, below options are used instead.

- ETH_DSA_SUPPORT_DEPRECATED
- NET_DSA_DEPRECATED

Once the legacy devices are converted to new DSA framework, this code
could be removed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Gerson Fernando Budke
b939b1d07c MAINTAINERS.yml: Add Bouffalo Lab entries
Introduce Bouffalo Lab platform.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
531196086b boards: riscv: Introduce bl604e_iot_dvk
Add initial version.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
531915deda drivers: serial: bouffalolab: Add bflb serial driver
Add Bouffalo Lab serial driver. The driver uses pinctrl to configure
pins and have power management capabilities.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
6520633a90 drivers: pinctrl: bouffalolab: Add bflb pinctrl driver
Add Bouffalo Lab pinctrl driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
3c45c8b5cf soc: riscv: bouffalolab: Add bl60x series cpu
Add initial version.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
cb84060409 dts: riscv: bouffalolab: Add bl60x series cpu
Introduce Bouffalo Lab vendor with BL60x cpu.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
fab1b2bd11 dts: bindings: vendor-prefixes: Add Bouffalo Lab prefix
Add necessary bflb prefix to be used on devicetree bindings and identify
the board vendor.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
0020af2a8b west: Introduce hal bouffalo lab
Add initial version that uses bouffalo_sdk 1.4.5.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Cla Mattia Galliard
4d87827e04 MAINTAINERS.yml: Add clamattia as collaborator for ethernet
Add clamattia as collaborator in the area of ethernet to the
MAINTAINERS.yml file.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-04-24 01:26:26 +02:00
Haiyue Wang
9c9c080b68 pmci: mctp: Fix No SOURCES CMake warning
The commit 1e0af58b51 ("pmci: Move MCTP into the PMCI subsys") changes
'mctp' directory adding to unconditionally, which will cause:

CMake Warning at ./zephyrproject/zephyr/CMakeLists.txt:1022 (message):
  No SOURCES given to Zephyr library: subsys__pmci__mctp

  Excluding target from build.

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-04-23 17:55:19 +02:00
Arkadiusz Balys
e93fdca1e4 doc: releases: add release note for OpenThread update
Add an entry to the release notes and migration guide regarding
moving OpenThread-related Kconfig options from
subsys/net/l2/openthred/Kconfig to modules/openthread/Kconfig.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-04-23 17:54:58 +02:00
Arkadiusz Balys
66e78e05d3 openthread: Separate OpenThread Kconfigs from L2 layer
Moved OpenThread-related Kconfigs from L2 layer to
modules/openthread. All of those configs were not strictly related
to the L2 layer, so they fits better to OpenThread module.
This operation allows using OpenThread Kconfigs even if L2 layer is
disabled.

Enabling NET_L2_OPENTHREAD also configures those configs by
selecting the OPENTHREAD kconfig, so there is no change regarding
backwards compatibility. The only change is that the Kconfigs
related to Thread were moved to the modules space, so their
location in the menuconfig also changed.

Once it is done, a choice for setting different L2 implementations
seems to be redundant.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-04-23 17:54:58 +02:00
Anas Nashif
a07b6563a8 doc: semihosting: fix section level
Wrong section level makes this section appear in the wrong table of
contents.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-23 17:54:47 +02:00
Derek Snell
699ebb3623 doc: tests: drivers: i2c_target_api: correct comments for frdm_mcxn947
Corrects GPIO signal names shorted together for this test.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-04-23 17:54:43 +02:00
Fin Maaß
e6d6aacf32 ci: set_assignee: don't allways pick next area when submitter = assignee
we don't want to pick the next area when there
are other maintainers available in the same area.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 17:54:38 +02:00