Commit graph

102907 commits

Author SHA1 Message Date
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Yong Cong Sin
5aebd1276d devicetree: add DT_NODE_HAS_STATUS_OKAY
We already have `DT_HAS_COMPAT_STATUS_OKAY` and
`DT_NUM_INST_STATUS_OKAY`, it seems intuitive to assume that
`DT_NODE_HAS_STATUS_OKAY` exists, so much so that it was used
before it's implemented.

This patch implements `DT_NODE_HAS_STATUS_OKAY`, which is
equivalent to: `DT_NODE_HAS_STATUS(<node_id>, okay)`

Added test for it in `tests/lib/devicetree/api`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Andrew Sonzogni
44d101acab drivers: sensor: lis2dw12: add interrupt status fetch
INT status can be fetched if the feature can't trigger via interrupt

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
70de35d9c9 drivers: sensor: lis2dw12: add inactivity detection
Add inactivity mode or stationary detection

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
c74dd3ee74 drivers: sensor: lis2dw12: add temp reading
adds support for reading temperature
Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Daniel Leung
8638e411e7 xtensa: fix insecure userspace warning wording
"in behave of" -> "on behalf of", which is more accurate of
what is actually happening in the code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-03 11:41:40 +01:00
Adrien Ricciardi
cd76ab3428 fs: nvs: Simplified the initial loop in calc_free_space()
Replaced the initial loop that computes the initial free space
by a simple formula.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-10-03 11:41:33 +01:00
Dominik Kilian
9acfd9d4ca maintainers: Add doki-nordic as maintainer of IPC
Become the maintainer for the IPC code.
Additionally carlocaione becomes collaborator now.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-03 11:41:12 +01:00
Georges Oates_Larsen
a4599219b7 logging: dictionary: Support unsigned integers
Add unsigned integer support to the log parser.

This does not change the underlying log format,
it only allows the log parser to more accurately
read the log format.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-10-03 11:40:41 +01:00
Dave Rensberger
c0bb9735d7 net: shell: Make stack size for event_mon_stack configurable
The stack size for the event_mon_stack task may need to be larger than the
default 1024 to avoid crashes. It should be configurable through Kconfig
so that source code doesn't need to be modified to increase it.

Signed-off-by: Dave Rensberger <davidr@beechwoods.com>
2024-10-03 11:40:16 +01:00
Florian Grandel
5688a95d07 cmake: modules: dts: fix in/out docs
The input/output documentation of dts.cmake and pre_dt.cmake was
outdated.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-03 11:40:09 +01:00
Jyri Sarha
80e629cd97 soc: intel_adsp: tools: cavstool.py: Add debug_slot_offset()
Add debug_slot_offset() function for getting a debug slot offset by
the slot number.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
9563960bde soc: intel_adsp: tools: cavstool: Fix fw_is_alive() and wait_fw_entered()
The fw_is_alive() depends on 'dsp' global variable which is assigned
from map_regs() return value. To make fw_is_alive() and
wait_fw_entered(), that calls fw_is_alive(), callable from another
module, the 'dsp' variable needs to be passed as an argument.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
91495812bd soc: intel_adsp: tools: cavstool.py: Make map_regs() shareable
map_reg() depends on args global variable for knowing it should
load a new firmware or just stand by for logging or Zephyr
shell. The map_regs() code is the very first step to access the
DSP memory, it nees to be shareable if the code is to be accessed
from another python module.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
c2126cb906 soc: intel_adsp: tools: cavstool.py: argsparse code to separate function
Do not force argsparse code to all modules importing cavstool.py. The
commit moves argparse code into a separate function, and calls it from
'if __name__ == "__main__":'. Also adds the argsparse call to to
acetool.py that shares cavstool code with the argument parsing.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Yong Cong Sin
c710f8892b drivers: intc: plic: implement irq affinity configuration
- Implement irq-set-affinity in RISCV PLIC.
- Added new affinity shell command to get/set the irq(s)
  affinity in runtime, when `0` is sent as the `local_irq`, it
  means set/get all IRQs affinity.
- Some minor optimizations

Updated the build_all test to build this new configuration.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 13:48:05 -05:00
Laurentiu Mihalcea
155f3f3ba6 west_commands: sign: add imx95 to target list
Add imx95 to target list to allow signing images for
imx95.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-02 13:46:06 -05:00
Laurentiu Mihalcea
01754956de boards: nxp: imx95_evk: add rimage support for m7 ddr variant
Add rimage support for the i.MX95 EVK M7-based DDR board
variant. This is only required when running SOF.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-02 13:46:06 -05:00
Pieter De Gendt
476c12fdde include: zephyr: net: coap_service: Use _CONCAT expansion
Passing MACRO arguments that need expansion require _CONCAT.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-02 13:44:42 -05:00
Jamie McCrae
96c6c7863a sysbuild: cmake: Fix ExternalZephyrProject_Add() revision handling
Fixes an issue with HWMv2 boards whereby the specified board
revision was not applied at the correct place, which would cause
the target image to fail configuration

Fixes #79208

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-02 13:43:59 -05:00
Jori Rintahaka
a3f2ba1928 drivers: bluetooth: silabs: move code from module to main tree
The code that handles passing events to and from the controller
resided in the hal_silabs module. This is an integral part of the
HCI driver that it can't work without, and logically belongs in
the driver.

Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
2024-10-02 13:42:56 -05:00
Torsten Rasmussen
094b0498a9 manifest: update open-amp to include change to strlcpy
This manifest update points open-amp to include a fix for unsafe use
of strncpy by by replacing it with internal strlcpy.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-02 13:42:09 -05:00
Alberto Escolar Piedras
867e84ce59 manifest: Update nRF hw models to latest
Update the HW models module to:
bf8e45bd1f870e49cc15392e045c28d54ea12285

Including the following:
* bf8e45b (52) CCM HAL: Support nrfx 3.7.0 with renamed TASK_CRYPT
* 14c14d7 HW_models/NHW_GRTC: Support MDK not exposing SYSCOUNTERVALID
* 6d66801 RADIO: Improve RSSISTART behaviour
* ceb6a80 hal grtc: Add replacements for new int group functions
* 838aa38 docs/README_HW_models: Add reference to Bsim HW models descr
* 0ff34d7 docs: Several updates and fixes
* 2972a93 AES_CCM: Avoid UBSAN pointer align warnwhen reading CNFPTR
* f8cd477 UART: Minor bugfix: Set rx status to off during ENABLE

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 13:41:15 -05:00
Georgij Cernysiov
d8c0a67d7b drivers: ethernet: adin2111: fix generic spi frame reception
Fixes a bug that results in double RX buffer read from ADIN
when generic SPI protocol is used.

Actual frame size to be read must be RX_FSIZE - HEADER.
If we read less amount of bytes, then ADIN raises an IRQ or
signals via Pn_RX_RDY that there is another frame available, as
we fail to read the whole frame.

The fix for "Still some length to go 2" is still present, we drop
the CRC32 bytes from the frame prior allocation and network
stack pass.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-02 13:40:42 -05:00
Iuliana Prodan
42b116e4ac samples: add support for i.MX8QM and i.MX8QXP DSP core in openamp_rsc_table
Add the dts and config overlay for the two boards in order
to have the openamp_rsc_table sample working on
HiFi4 DSP from i.MX8QM and i.MX8QXP.

Since these two are similar, use a snippet.

Therefore, to compile the sample we use:
west build -p -b imx8qm_mek/mimx8qm6/adsp -S nxp-openamp-imx8-adsp
-s samples/subsys/ipc/openamp_rsc_table/

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Iuliana Prodan
991eb0cd10 dts: xtensa: nxp: add mailbox node
Add mailbox node used for inter-process communication.
For DSP, we have a direct interrupt line to the core.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Iuliana Prodan
c85d157fc0 soc: nxp: imx: add resource_table section in linker script
Add resource_table section in linker script for i.MX8QXP and
i.MX8QM, for inter-process communication.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Pete Skeggs
715b97397b net: lib: coap: Make use of ZSOCK_MSG_TRUNC configurable
Not all offloaded network stacks support this socket option so
control it using a Kconfig CONFIG_COAP_CLIENT_TRUNCATE_MSGS,
and enable it by default.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-10-02 15:55:00 +02:00
Lyle Zhu
0ed8866eb6 Bluetooth: host: Kconfig: Correct help of BT_BONDABLE
Correct the `help` of the configuration `BT_BONDABLE`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
aaab223574 Bluetooth: SSP: Incorrect bonding status notified
The `bonded` flag of the callback `pairing_complete` is always true,
event if the SSP pairing is non-bondable.

Check the bonding status in SSP complete event instead of in link key
notify event.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
a00d5089d5 Bluetooth: shell: Add command conn-bondable
Add command `conn-bondable` to enable/disable the pairing bondable
flag of a specific ACL connection.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
d5160f663a Bluetooth: BR: Improve bt_conn_set_bondable
In current, the bondable flag cannot be configured for each specific
BR connection.
But for LE conn, there is a function `bt_conn_set_bondable` for this
purpose.

Improve `bt_conn_set_bondable` to support BR conn.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
e772c45e6b Bluetooth: SSP: Support non-bondable mode
If the return value of function bt_get_bondable is false, clear the
bonding flag when controller requiring `Authentication_Requirements`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
c0ce5b419b Bluetooth: Host: smp: Add function to get bonding setting
Add a function bt_get_bondable to get the bonding setting.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Håvard Reierstad
0fe6d34f8a Bluetooth: Mesh: Remove duplicate brg declaration
Removes duplicate declaration of the bridging direction, keeping the
one in the public header file.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-10-02 14:54:13 +01:00
Håvard Reierstad
8049c24994 Bluetooth: Mesh: Add prefix to Subnet Bridge API
Adds the `bt_mesh_brg_cfg` prefix to the public Subnet Bridge API, and
aligns the function and callback naming with the rest of the Bluetooth
Mesh API.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-10-02 14:54:13 +01:00
Johann Fischer
35c9e54961 include: usb_ch9: add note about USB_CONTROL_EP_MPS
This value may not be correct for devices operating at speeds other than
high speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:54:04 +01:00
Johann Fischer
f5a3f90a68 usb: device_next: respect bMaxPacketSize0 in control transfers
Only the device operating at high speed has bMaxPacketSize0 set to 64
bytes, the device operating at other speeds may have a different value.
For full speed, use the value from the full speed descriptor.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:54:04 +01:00
Alberto Escolar Piedras
3d86360c33 samples/bluetooth/cap_acceptor: Add missing include
strncasecmp()'s prototype is provided in strings.h
let's include it to avoid a build warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Alberto Escolar Piedras
d29f2d547b tests/bsim/bluetooth/audio_samples: Error on warnings
Do not override the cmake_args parameter, but instead use the
cmake_extra_args one.
Otherwise we lose the default -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Alberto Escolar Piedras
1460ef4419 tests/bsim/compile: Improve cmake_extra_args
Allow cmake_extra_args to contain multiple arguments

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Emil Gydesen
9658b7d0d3 samples: Bluetooth: Audio: Avoid uisng K_FOREVER in syswq
Several samples used K_FOREVER when allocating buffers in the
system workqueue thread, which is prohibited.

The samples should rather retry later if TX fails.

This is not the ideal solution for the samples, but
fixes a bug. Ideally the samples would use a dedicated thread
to handle TX, instead of the system workqueue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-02 15:53:37 +02:00
Daniel Gaston Ochoa
bce51b7706 drivers: spi: stm32h7: avoid unnecessary suspend
The SPI stm32 H7 driver always suspends the SPI transaction
when finishing the transceive operation. This, according to
the stm32 H7 datasheet, must only be done when the SPI master
is configured as receive-only, and the driver always
configures it as full-duplex.

Hence, remove this unnecessary operation for clarify and for
a potential reduction in the minimum time between SPI
transceive operations.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-10-02 14:42:48 +01:00
Luca Burelli
aeec014cbe llext: rename symbol struct identifiers
This patch renames the identifiers for the structs in the LLEXT symbol
tables to have a prefix of "__llext_sym_". This is done so existing
scripts like gen_device_deps.py do not confuse them with the object
they are referring to.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-02 14:42:37 +01:00
Jordan Yates
bf9584d6ba fs: add FILE_SYSTEM_LIB_LINK option
Add an option that links in the underlying file system libraries as
usual, but doesn't compile in the Zephyr file system abstraction layer.

This can be useful to avoid linking in the entire filesystem
implementation through the `fs_file_system_t` API struct if only a
subset of the functions are used.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 14:42:10 +01:00
Johann Fischer
b79ffe3582 usb: device: use irq_update in CDC ACM UART implementation
Move the TX/RX ready flag updates into irq_update() where they belong.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
c5a31aec3c usb: device: cleanup CDC ACM UART rx_ready, tx_ready and is_pending
Align the irq_tx_ready and irq_rx_ready implementations and use them
from irq_rx_pending.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
0f0322127d usb: device: avoid starving other threads in CDC ACM UART fifo_fill
The check for the device being configured or suspended in the fifo_fill
implementation can starve other threads, because the early return does
not change the state of the TX path, and fifo_fill is called again
from the callback loop. The ringbuffer that emulates the TX FIFO can be
filled and marked ready as long as the space is available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
fe4d8a678c usb: device_next: use delayable work for TX FIFO in CDC ACM
Use delayable work to reduce CPU load when there is no transfer flow in
the host direction. This also improves the performance of poll out, as
introduced in commit commit fed6bde788
("usb: device: cdc_acm: send more than 1 byte in poll out")
for the legacy CDC ACM implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
4875aa3924 usb: device_next: limit CDC ACM OUT transfer size to the current MPS
When the controller is connected to a full speed bus, regardless of
whether the controller supports high speed or not, the transfer size for
the bulk OUT endpoint should be equal to the MPS in the current
configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00