Commit graph

88414 commits

Author SHA1 Message Date
Yong Cong Sin f3da086ac3 arch: common: sw_isr: make sure that the table index is within range
Assert that the `local_irq` of each levels should only ranges
from `0` to `CONFIG_MAX_IRQ_PER_AGGREGATOR`, so that it doesn't
overflow the other aggregators.

Also, assert that the output of `z_get_sw_isr_table_idx` shouldn't
overflow the ISR table.

Update the `sw_isr_table` tests to test the range of
`CONFIG_MAX_IRQ_PER_AGGREGATOR` instead of the entire range of
level bits.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-08 08:40:41 -05:00
Yong Cong Sin a28da922db tests: interrupt: refactor the sw_isr_irq_parent_table tests
Split the `sw_isr_irq_parent_table` test into one that tests
the IRQ table index function which is generic and should
always be tested, and one that tests multi-instance -related
functions which only work in interrupt controller drivers that
has multi-instance implementation.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-08 08:40:41 -05:00
Yong Cong Sin 0274821bb7 arch: common: multilevel irq: move CAT_3RD_LVL_LIST into 3rd level guard
The `CAT_3RD_LVL_LIST` macro is only used when
`CONFIG_3RD_LEVEL_INTERRUPTS` is enabled, so move it into the
compiler guard.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-08 08:40:41 -05:00
Yong Cong Sin 48d9af46e3 arch: common: multilevel irq: fix issues where the intc device is NULL
The `irq` argument of the `Z_IF_DT_INTC_IRQN_EQ` macro
coincides with the `'irq'` argument passed into the `DT_IRQ`
macro, the former was supposed to be a number, while the latter
is a string/type, together this means that it was intepreted
as:

```c
DT_IRQ(node_id, <some_number>)
```

instead of

```c
DT_IRQ(node_id, irq)
```

as intended, so the macros never managed to match a device with
the IRQ properly, resulting in the `dev` member of the table
being NULL.

Solve this by renaming all the `irq` args in the macros to
`_irq` to avoid mixed usage.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-08 08:40:41 -05:00
Daniel Leung 397c001181 doc: kernel/mm: add a page about virtual memory
This adds a page about virtual memory under kernel's memory
management.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-08 08:31:15 -05:00
Daniel Leung 22447c9736 kernel: mmu: fix typo K_DIRECT_MAP to K_MEM_DIRECT_MAP
Fix typo in comment to reflect the actual macro named
K_MEM_DIRECT_MAP.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-08 08:31:15 -05:00
Yong Cong Sin 0a3fe40505 drivers: intc: plic: set edge-triggered register address using compat
Define the edge-trigger register base address based on whether
the PLIC node in the devicetree has an additional compatible
that supports edge-triggered interrupt.

Limited the implementation to Andes NCEPLIC100 only, updated
the devicetree binding of `andes_v5_ae350` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-08 07:51:05 -05:00
Flavio Ceolin 4e9f73b0dd doc: pm: nrf target does not enable PM
samples/boards/nrf/system_off does not enable CONFIG_PM so
it should not be listed as an example in system power management
documentation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-12-08 10:27:18 +00:00
Fabian Blatz 917770952d samples: subsys: display: lvgl: Update README
Update the readme to better describe contents of the sample, which is now
used to showcase the various input device types that LVGL offers.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-12-08 10:26:24 +00:00
Ryan McClelland edf32335cb test: drivers: sensor: adltc2990: fix double promotion
Fix double promotion warning

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-12-08 10:26:11 +00:00
Ryan Erickson 8deaf18d8b drivers: modem: hl7800: fix low power modes
Do not allow the modem to sleep if the driver is busy.
Fix CTS filtering. Ignore small pulses on the CTS line.

Fix socket restoration. Restored sockets could be mismatched
with a wrong type.
UDP sockets could be duplicated during restore.

Improve IO debug mode. Use warning message for IO debug mode
to easily see IO transitions color coded in a terminal.

Ensure the UART is enabled whenever the driver needs to send
commands to the modem.

Ensure DNS resolver is re-initialized after the modem is powered off.

PROD-307

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-12-08 10:26:04 +00:00
Jasper Smit 6003927ac2 net: sntp: Add option for SNTP uncertainty
SNTP response is not analyzed for uncertainty, and no uncertainty is given
to the `struct sntp_time` returned. Fix it with a Kconfig option that adds
optional SNTP uncertainty and timestamp fields in SNTP time struct, and
calculates these when parsing the response.
Adds two helper functions to convert Q16.16/Q32.32 in seconds to `int64_t`
in microseconds to facilitate this.
Also changes combined `lvm` field in `struct sntp_pkt` to bit-fields
`li`, `vn`, and `mode`.

Signed-off-by: Jasper Smit <git@jrhrsmit.nl>
2023-12-08 10:25:46 +00:00
Pavel Vasilyev ef1f2d1336 Bluetooth: Mesh: Convert no opcode error to debug log
This error message may confuse when `CONFIG_BT_MESH_ACCESS_LAYER_MSG` is
enabled and all messages are processed by the callback anyway.
This error message also confuses when a node is subscribed to the same
address as it publishes to, which makes it generating the error message
every time it publishes a message.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-12-08 10:25:36 +00:00
Pavel Vasilyev bcd2aba4d7 Bluetooth: Mesh: Allow custom RPL use mesh settings work
This change allows a custom RPL use pending mechanism and the mesh
settings work to store pending RPL entries. `bt_mesh_rpl_pending_store`
is a public API and should be implemented anyway. The custom RPL
implementation has to trigger settings with the
`BT_MESH_SETTINGS_RPL_PENDING` flag to ask the mesh settings work to
call `bt_mesh_rpl_pending_store`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-12-08 10:25:36 +00:00
Jamie McCrae 22ef2bed33 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  212997395ed34ff1721f5f4461b800e81abeb68d

Brings following Zephyr relevant fixes:
 - 21299739 zephyr: firmware/single_loader: Fix compile warning
 - a88e2293 zephyr: sysflash: Fix if condition for zephyr
   applications
 - 2a74a2b5 zephyr: io: add 'io_led_set()'
 - 8c6c6701 zephyr: io: include 'bootutil_log.h' and declare log
   module membership
 - d99154f4 zephyr: rename 'led_init()' to 'io_led_init()'
 - c43a20fd boot: zephyr: add support for mimxrt1040_evk

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-08 10:24:56 +00:00
Jaroslaw Stelter 0e73c225bb drivers: ssp: Reverted CPA check condition
There is reverted CPA check condition in routines:
dai_ssp_pm_runtime_en_ssp_power()
dai_ssp_pm_runtime_dis_ssp_power()
In result disable always timeouts while enable returns before
CPA bit set. This cause sporadic exceptions on HW.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-12-08 10:24:45 +00:00
Manuel Argüelles 0ee6632967 soc: arm: nxp_s32: s32k1: use HAL to init code cache
Use the HAL cache driver to initialize the Code Cache.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-08 10:22:12 +00:00
Manuel Argüelles 6aa242cdfb soc: arm: nxp_s32: s32k1: fix code cache init
Currently Code Cache cannot be enabled because its initialization is
guarded by Kconfig options which depend on CPU core cache support,
but S32K14x devices has a SoC specific L1 cache controller. Hence,
introduce a SoC-specific symbol to enable Code Cache.

Note that the cache controller is not available for S32K11x devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-08 10:22:12 +00:00
Przemyslaw Bida 304b98391c net: openthread: Add openthread TCAT implementation.
This commit adds bbtc implementation.
New file in modules/openthread/platform/ble.c
New corresponding kconfig option `OPENTHREAD_BLE_TCAT`.

Co-authored-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2023-12-08 10:21:56 +00:00
Przemyslaw Bida 8f2b7a121b net: openthread: Openthread upmerge to 4ed44bc
This commit bumps openthread commit to `4ed44bc`
and implements `CONFIG_OPENTHREAD_MULTIPAN_RCP` option.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-12-08 10:21:56 +00:00
Jukka Rissanen 825bc325d2 net: context: Document misc settings and functions
Various misc settings and functions were not documented so fix it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-08 10:21:38 +00:00
Jukka Rissanen 039c6a304d net: context: Document socks proxy settings
Documentation for socks proxy was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-08 10:21:38 +00:00
Jukka Rissanen 405b8b5f19 net: context: Add docs for getter/setter of TTL/hoplimit values
The IPv4 TTL and IPv6 hop limit value getter and setter functions
were not documented properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-08 10:21:38 +00:00
Jordan Yates 643984c432 pm: device_runtime: don't assert in ISR put
Don't assert that `pm_device_runtime_get` is not running in an ISR
context, as `runtime_suspend` properly handles that condition.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-12-08 11:09:34 +01:00
Andrei Emeltchenko 339d0ac4a5 tests: btp_mcp: Fix dead code warning
Remove return statement preventing to return error code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-12-08 10:05:20 +00:00
Emil Gydesen 203949c42c Bluetooth: VCP: Allow for multiple vol_ctrl cb registers
Modify the VCP volume controller callbacks to support
multiple registers by making it into a linked list.

This allow for multiple applications to get the information
from procedures or notifications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-08 10:04:31 +00:00
Maxmillion McLaughlin 8ab1c75e9b feat: add support for TDK NTCG103JF103FT1 thermistor
Adds compensation table and bindings for NTCG103JF103FT1 thermistor

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
2023-12-08 10:04:12 +00:00
Fabio Baltieri f69641f7d2 input: gpio_kbd_matrix: do not enable interrupt if there's no callbacks
Change the gpio_kbd_matrix_set_detect_mode to skip setting gpio
interrupts if we don't have callbacks configured. This is the case if
the driver is running in poll or scan mode.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-08 01:07:15 +00:00
Hake Huang 27d519b260 samples: logging: disable usermode for rtt platfroms
Those platfroms using rtt as debug port,
are conflicted with usermode. same with
163e9ba9a3

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-12-07 21:11:01 +01:00
Dmitrii Golovanov 28ff83515d tests: drivers: coredump: Enable code coverage
Enable code coverage for debug.coredump.drivers.api.* test suite
adding custom fatal error handler to dump code coverage data
when the test halts as expected.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-12-07 12:14:32 -05:00
Ederson de Souza 026908b7b8 include/zephyr/net: Add 'brief' to group description
So it doesn't extend previous directive.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-12-07 16:18:34 +00:00
Robert Baruch 5e08f73f7d samples: net: wifi: boards: added missing files for xiao_esp32c3
The conf and overlay files to properly compile the wifi samples were
omitted for the Xiao_esp32c3 board. I've added those two files and
confirmed that the sample properly compiles and runs.

Signed-off-by: Robert Baruch <robertbaruch@mac.com>
2023-12-07 16:18:04 +00:00
Lingao Meng 1106b86bde doc: release: Add migration for bluetooth uuid
The Bluetooth UUID has been declare as rodata.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-12-07 16:16:43 +00:00
Lingao Meng 786b9a0ad4 Bluetooth: Host: Add const prefix for UUID
Add const prefix for service uuid and char uuid.

Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.

The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-12-07 16:16:43 +00:00
Pieter De Gendt a51af14729 doc: release: 3.6: Add note on net_mgmt worker Kconfig
Added an entry for the Kconfig choice CONFIG_NET_MGMT_EVENT_WORKER.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 16:15:53 +00:00
Pieter De Gendt 8084a1c908 tests: net: mgmt: Add test cases new worker options
Run the Network event tests also on the system work queue and
synchronous.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 16:15:53 +00:00
Pieter De Gendt c1204affab net: ip: net_mgmt: Support system work queue and synchronous callbacks
Add Kconfig choice for the user to select how Network Events are
handled. It's own thread, the system work queue or synchronous when
events are emitted.

By default a separate thread is created to be backwards compatible.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 16:15:53 +00:00
Emil Gydesen 3fec3964e0 Bluetooth: CAP: Move initiator/commander common code to cap_common
The CAP Initiator and the CAP Commendar share quite a lot of
functionality in terms of discovery and performing set-based
procedures.

The code for handling most of this has been moved to
cap_common.c to avoid duplicating code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-07 16:14:42 +00:00
Jamie McCrae 227905ac4d doc: release: 3.6: Add note on fixed MCUboot erase issue
Adds a note that the shell mcuboot erase command can no
longer erase the MCUboot or application slots

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-07 14:24:48 +00:00
Jamie McCrae f147e8b8f5 dfu: boot: mcuboot_shell: Prevent erasing MCUboot/app flash areas
Prevents the user from potentially bricking a device by erasing
the MCUboot or currently running application flash areas with the
mcuboot erase command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-07 14:24:48 +00:00
Nikos Agianniotis ed610400bc drivers: sensor: mcp9600: fix wrong register address
The address of most of the registers defined in
the driver are wrong. This fixes it, following
the correct numbering as can be found in the
device's datasheet. Moreover, re-grouping of
the macros according to their functionality.

Signed-off-by: Nikos Agianniotis <na@neq.dk>
2023-12-07 10:42:03 +00:00
Peter Mitsis a3e5af95de kernel: Update k_sleep() and k_usleep() return values
Updates both the k_sleep() and k_usleep() return values so that if
the thread was woken up prematurely, they will return the time left
to sleep rounded up to the nearest millisecond (for k_sleep) or
microsecond (for k_usleep) instead of rounding down. This removes
ambiguity should there be a non-zero number of remaining ticks
that correlate to a time of less than 1 millisecond or 1 microsecond.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-12-07 10:41:00 +00:00
Peter Mitsis 093c7f4137 tests: benchmark: Add case for object core stats
Updates both the app_kernel and latency_measure testcase scripts
to include a scenario involving object core statistics. This can
then be used to estimate the performance cost of using this feature
post-execution by comparing its results to the scenario where it is
not enabled.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-12-07 10:40:36 +00:00
Alberto Escolar Piedras 19ac0a2839 drivers adc_emul: Refer to native_sim overlay instead of native_posix
Refer to the native_sim overlay instead of the native_posix one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Alberto Escolar Piedras 9f15c41a7e drivers/timer native: Replace native_posix with native_posix/sim
This driver is applicable to both targets.
Let's be clear about that.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Alberto Escolar Piedras 53bbded264 drivers/serial native: Replace native_posix with native_sim in comments
In the kconfig descriptions and the links to documents
replace native_posix with native_sim, or a generally
applicable description.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Alberto Escolar Piedras 94b16c4d2d drivers/sensor Kconfig: Replace native_posix with native_sim
Use native_sim in the help messages platforms examples
instead of native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Alberto Escolar Piedras 9323a3f9c7 arch/Kconfig: Fix ARCH_POSIX comment
The comment applies to all POSIX arch based targets,
not just native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Alberto Escolar Piedras 8add7cb62f soc/posix posix_native_task: Replace native_posix in description
Replace native_posix in the NATIVE_TASK description.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Marc Lasch 8358cdd697 net: lwm2m: Reduce dependency on firmware update pull Kconfig
There are functions whose headers are only visible when
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT is selected. However these
functions are used outside the scope of the firmware update pull
functionality. This change allows to disable
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT while still being able to use
the firmware update object.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2023-12-07 10:38:58 +00:00