Commit graph

86920 commits

Author SHA1 Message Date
William MARTIN 56395ec42f dts: arm: st: Update stm32l496.dtsi
Add missing master-can-reg into stm32l496.dtsi

Signed-off-by: William MARTIN <william.martin@muxen.fr>
2023-11-09 11:22:48 +01:00
Fabio Baltieri 702399080e Kconfig: drop COMPAT_INCLUDES
Last reference of this was dropped in 01b7800bc8, almost 2y ago.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-09 11:22:40 +01:00
Sebastian Bøe 1f0b4c62a2 drivers: entropy: psa: Don't have PSA_CRYPTO_RNG depend on TF-M
Remove the depenency on TF-M so that this driver can be used when PSA
is provided by something else than TF-M.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2023-11-09 11:22:26 +01:00
Ning Yang be0cb45e1a drivers: dma: fix build warning issue for dma sedi driver
Remove unused functions to avoid build warning check.

Signed-off-by: Ning Yang <ning.yang@intel.com>
2023-11-09 10:21:58 +00:00
Pieter De Gendt 98052aabb7 doc: releases: migration: Add CoAP API changes
Add a note to the 3.6 migration guide about the CoAP API changes
introduced with the CoAP server subsystem.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt b81ce1f957 doc: connectivity: networking: api: Add subsystem link notes to CoAP
The CoAP documentation has server/clients sample usages, added a
note about the available subsystems that can be used instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 230c989590 doc: connectivity: networking: api: Add CoAP server documentation
Created a dedicated page for CoAP service and resource examples.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 1f63c32c03 samples: net: sockets: Add CoAP service example
Replaced the CoAP server example with CoAP services.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 74db066941 tests: net: lib: Add CoAP service tests
Add a test for CoAP macro usage.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt e8e6d23270 net: lib: coap: Add CoAP server shell
Add shell commands that allow to start/stop CoAP services.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt ae6e0106e7 net: lib: coap: Add service support
Add CoAP services and server as a subsystem implementation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 5227f24815 net: lib: coap: Add support for observer event callbacks
This commit adds the option to register an event handler to CoAP
resources when observers are added/removed.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 291743b686 net: lib: coap: coap_remove_observer result type
Change coap_remove_observer to return the result of removing the
observer if found.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt fac670e1e2 net: lib: coap: Add coap_find_observer_by_token
Add a CoAP helper function to find a matching observer by token.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt cc89338888 net: lib: coap: Add coap_packet_is_request
Add function to check if CoAP packet is a request to the public API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 0a4668a2f7 net: lib: coap: Add coap_uri_path_match
Add URI path matching function to public CoAP API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt bea29cf631 net: lib: coap: Add resources length based variants
Add length variant for the well known core resource and parsing.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 1158c5dc01 include: coap: Fix typo
Fixed a typo to include DOXYGEN generated documentation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Ning Yang c33ed20eb8 drivers: dma: copy whole user dma config to fix dma case failure
user dma config is not fully saved in dma_sedi_chan_config
function. When dma_sedi_start function it will check local
context, it will cause failure here.

Signed-off-by: Ning Yang <ning.yang@intel.com>
2023-11-09 10:21:26 +00:00
Chaitanya Tata ed17320c3d net: Remove unnecessary lock
The main action in this function it queueing the packet for
transmission which doesn't need a lock and interface flags use atomic
operations.

So, remove the unnecessary lock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-11-09 10:21:13 +00:00
Piotr Narajowski 7f7b097499 bluetooth: tester: MCP Client tests
Add support for Media Control Client tests

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-11-09 11:20:49 +01:00
Yong Cong Sin 7485ef91f5 irq: multilevel: reduce the use of macros
Convert `#if defined CONFIG_*` to use
`if (IS_ENABLED(CONFIG_*))` and removed some macro guards since
they are safe to be compile.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Yong Cong Sin 63bd547e9f arch: common: guard the compilation of sw_isr_common with CMakeLists.txt
Instead of using a macro guard to prevent functions in
`sw_isr_common.c` from getting compiled when
`CONFIG_DYNAMIC_INTERRUPTS` isn't enabled, do that in
`CMakeLists.txt` instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Yong Cong Sin cdb606aa03 arch: common: refactor multi-level IRQ code
Refactor multi-level IRQ related code from `sw_isr_common.c` to
`multilevel_irq.c` to simplify `sw_isr_common` & macrologies.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Yong Cong Sin ec93404a26 arch: common: irq: relocate internal functions into a private header
Relocate new and existing internal software-managed table
access functions from the public `sw_isr_table.h` into a
private header that should only be accessed internally.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Yong Cong Sin ad788a335f tests: interrupt: add testcase for functions in the sw_isr_table
Validate the following functions in the sw_isr_table:
- z_get_sw_isr_table_idx
- z_get_sw_isr_device_from_irq
- z_get_sw_isr_irq_from_device

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Yong Cong Sin d24545072c arch: sw_isr: store device info in the table and add funtions to access
Change the internal function to `get_parent_entry`, which
returns the entire entry of table.

Store the parent interrupt controller device in the
`irq_parent_offset` table, and added 2 helper functions to:

1. determine the parent interrupt controller based on the IRQ
2. determine the IRQ of the parent interrupt controller

Declare the `struct _irq_parent_entry` in the header and added
`-` suffix to the struct so that it can be used to test the
functions in testsuites.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 11:20:42 +01:00
Mulin Chao f9a4a3597b soc: arm: npcx: move soc-specific register definitions to soc.h
This CL is to minimize `CONFIG_SOC_SERIES_XXXX` definitions when we
introduce a new chip series. Most of them are relevant to register
layouts in different npcx soc series. It moves soc-specific register
definitions from `reg_def.h` to its own soc.h file.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-11-09 10:20:39 +00:00
Manuel Argüelles db0ec23ba4 tests: samples: watchdog: add s32z270dc2_r52 rev.D
Twister treats board revisions as separate boards, so s32z270dc2_r52
revision D must be added to the filters.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Manuel Argüelles 6744d6084d watchdog: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Corey Wharton 0fdb50b869 tests: arch: arm: add new test for custom interrupt control on Cortex-M
Adds a new test for ARM Cortex-M architectures with the
CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER option enabled.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2023-11-09 11:20:01 +01:00
Corey Wharton 4e5868faaf arch: arm: cortex-m: support custom interrupt controllers
This change adds support for the CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER
option on Cortex-M platforms. While all Cortex-M platforms have a
NVIC controller some custom SoCs may have additional IRQ controllers
or custom handling. This change allows those SoCs to modify this
bahaviour without having to place platform specific logic inside
applications or drivers.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2023-11-09 11:20:01 +01:00
Mykola Kvach c4ffadb0b6 arch: arm64: avoid invalidating of RO mem after mem map
The Cortex ARM documentation states that the DC IVAC instruction
requires write access permission to the virtual address (VA);
otherwise, it may generate a permission fault.

Therefore, it is needed to avoid invalidating read-only memory
after the memory map operation.

This issue has been produced by commit c9b534c.
This commit resolves the issue #64758.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-11-09 10:19:12 +00:00
Emil Obalski d769a92520 ipc: icmsg: Allow to support future versions
Allow magic number to be longer than the sizeof(magic).
This will allow to support future versions of the icmsg
with backwards compatibility.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:19:02 +00:00
Emil Obalski eb4fc3f083 ipc: backends: Port IcMsg based backends to use pbuf
Replace spsc_pbuf with pbuf implementation dedicated to
be used by IcMsg based backends.
The pbuf is written on top of simple read/write semantics
with minimal footprint and code complexity

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Emil Obalski 25a0489d62 tests: ipc: Add pbuf unit tests
Add unit tests for packed buffer.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Emil Obalski 380f83bab1 ipc: Add pbuf implementation
This adds implementation of secure packed buffer.
Secure packed buffer is added with intention to be used
in icmsg backed backends.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Emil Obalski f93243b68f ipc: Remove nocopy feature from icmsg_me backend
Remove nocopy feature from icmsg_me backend.
The backend is not meant to be used to send big
data chunks thus no-copy feature is removed.
If one wants to use no-copy it is recommended
to use icmsg_me only for control messages while
allocator will shall be written seperately.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Antoniu Miclaus fbee62d9e3 dts: bindings: adxl372: move int1-gpios to common
The `int1-gpios` property is common for both spi and i2c
implementations of adxl372. Therefore move it to
`adi,adxl372-common.yaml`

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-11-09 10:17:51 +00:00
Ioannis Karachalios 96a4300c6f tests: drivers: dma: Control testcases via Kconfig
Added Kconfig to control BURST16 and board config for da1469x_dk_pro.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-11-09 10:17:29 +00:00
Ioannis Karachalios dd1371da8b dts: renesas: smartbond: Support the DMA engine.
Update DTS and board configurations to support the DMA accelerator.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-11-09 10:17:29 +00:00
Ioannis Karachalios 546a640657 drivers: dma: smartbond: Support DMA accelerator.
Add support for the DMA engine.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-11-09 10:17:29 +00:00
Gustavo Silva b4625d6f13 drivers: sensor: add tsl2561 basic support
Add basic support for ams TSL2561 light sensor. Triggers, attributes
and manual integration time are currently not supported.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2023-11-09 10:16:51 +00:00
Fabio Baltieri 9bb44b8e5f dts: arm: st: set flash size for stm32l011X4
This device lost the reg property since 88c9d1fbaf, causing the
nucleo_l011k4 board to not build anymore. Add it back, 512 bytes should
be the right number for this chip.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-09 09:09:22 +01:00
Maureen Helm 3769938e78 boards: arm: Fix sensor shell sample for beagleconnect_freedom board
Commit 944ced68f5 enabled
CONFIG_UART_CONSOLE=y for the beagleconnect_freedom board, which had the
side effect of satisfying a required dependency for the sensor shell
sample application and causing new build errors in the weekly full
twister run. Fix the build errors by moving the board's light and
humidity sensor nodes to be children of the I2C controller node.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-11-08 21:10:32 -05:00
Benjamin Cabé 559424285f doc: develop: update ram and rom report sample and reduce width
Update the sample outputs for ram and rom report commands to reflect
current look&feel, and reduce the width of the output to better fit
on narrow screens & PDF output.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-08 16:03:48 -05:00
Benjamin Cabé 73a106ccb4 charger: doc: Fix doxygen docstrings in charger header
Fixed a couple of improperly formatted Javadoc docstrings.
Added @file tag.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-08 16:03:11 -05:00
Tobias Pisani ec202d852f drivers: sensor: bq274xx: Configure or confirm chemistry profile
Both the BQ27421 and BQ27427 have a few preset Chemistry profiles.
For the BQ27421 there exists three variants of the IC, and for the BQ27427,
it can be configured. The chemistry profile among other things includes the
taper voltage, which is used to detect charge termination.

This adds an optional `chemistry-id` config option to the driver. On the
BQ27421, it will confirm that the correct variant of the IC is mounted,
and on the BQ27427, it will configure it with the correct value.

Side note: The reference manual for the BQ27427
(https://www.ti.com/lit/ug/sluucd5/sluucd5.pdf) currently contains some
errors and inconsistencies regarding these registers. The table on page 7
appears to be correct.

Signed-off-by: Tobias Pisani <topisani@hamsterpoison.com>
2023-11-08 11:55:52 -06:00
Henrik Brix Andersen 26002b0607 Bluetooth: fix doxygen warnings
Fix doxygen warnings ("warning: found </em> tag without matching <em>")
from building the Bluetooth API documention.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-08 15:12:39 +00:00
Erwan Gouriou d06c93f24c drivers: clock_control: stm32wba: Apply VOS range 2 when sysclock = 16MHz
When sysclock is 16MHz, we're allowed to used VOS range 2.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:12:21 +00:00