Commit graph

86967 commits

Author SHA1 Message Date
Manuel Argüelles b3f950c648 drivers: mdio: nxp_s32_netc: 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-13 09:49:26 +01:00
Dat Nguyen Duy 18a0660be0 samples/tests: skip samples/tests disable MPU for s32ze series
On SoC series s32ze, Zephyr application cannot run with MPU
disabled, skipping relevant samples/tests

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-13 09:48:43 +01:00
Bartosz Bilas 39eb124c81 drivers: add MAX20335 charger driver
Add a MAX20335 MFD subdriver for the built-in
battery charger.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-13 09:48:33 +01:00
Dmitrii Golovanov 4d394f9d23 tests: coredump: Fix backend.logging test misconfig
The debug.coredump.backends.logging testcase did use 'console'
Twister harness whereas the test suite itself and the rest of
the testcases are implemented as Ztest. This misalignment
allowed to check basic output expected from the logging backend,
but caused inconsistency of the test suite results because
the 'console' Twister Harness can't use test cases' ID provided
by the 'Ztest' Twister Handler.
It is decided to focus the debug.coredump.backends.* suite
on the coredump backend API testing with Ztest.
The logging backend's resulting output should be tested
by its dedicated test suite debug.coredump.logging_backend
(tests/subsys/debug/coredump).

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-11-13 09:48:22 +01:00
Dmitrii Golovanov 1032fe3b5c tests: coredump: Extend backends test coverage
Extend coredump_backend tests:
 * fix COREDUMP_CMD_VERIFY_STORED_DUMP test was not executed.
 * add tests for these coredump commands:
   - COREDUMP_QUERY_GET_STORED_DUMP_SIZE,
   - COREDUMP_CMD_INVALIDATE_STORED_DUMP,
   - COREDUMP_CMD_ERASE_STORED_DUMP,
   - COREDUMP_CMD_CLEAR_ERROR.
 * extend the out-of-the-treee example 'empty' backend to
   execute the new tests.
 * fix the test's cmake project name.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-11-13 09:48:22 +01:00
Jamie McCrae 5c05b61ecd doc: mgmt: mcumgr: Remove OS mgmt datetime unimplemented note
This functionality is now implemented

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-13 09:48:13 +01:00
Jamie McCrae 20f0e37413 doc: release: 3.6: Add note on MCUmgr OS mgmt datetime
Adds a note that datetime support has been added to MCUmgr

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-13 09:48:13 +01:00
Jamie McCrae 1855fd16f7 tests: mgmt: mcumgr: Add os_mgmt_datetime test
Adds a test which tests datetime set/get and hook callbacks

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-13 09:48:13 +01:00
Jamie McCrae 6c4b89cb00 mgmt: mcumgr: grp: os_mgmt: Add datetime get/set functions
Adds datetime set and get functions which allow for setting and
getting the current time to/from the rtc alias device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-13 09:48:13 +01:00
Yves Vandervennet 28c5b1d76d west: linkserver: update to reflect logging changes in 1.3.15
NXP released the linkserver update 1.3.15, which corrects an issue
with logging that by default went out to stderr when flashing.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2023-11-13 09:47:27 +01:00
Yong Cong Sin 6d9fcd83a9 test: logging: add testcase for multi-instance log backend uart
Add testcase for the multi-instance log backend uart using
emulated uart.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-13 09:47:06 +01:00
Chris Friedt c0064f1de8 logging: uart: support multiple instances
Extends the log_backend_uart to support logging to multiple
UART instances.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-13 09:47:06 +01:00
Yong Cong Sin b89095cf12 tests: logging: log_syst: set backend ctx to its cb ctx when enable
Set the backend's context to its control block's context
instead of NULL when doing `log_backend_enable`, as the log
backend UART uses that later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-13 09:47:06 +01:00
Emil Gydesen 89612932b0 tests: Bluetooth: Enable passing CAP AC 441 tests
Enable some previously disabled CAP AC tests for 44.1 KHz,
as they are now passing.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:46:57 +01:00
Nick Ward 2612aa02ce tests: drivers: build_all: gpio: add ads1145s0x testcase
This fixes multiple CI issues for the ads1145s0x
driver.

Having a special testcase for the driver limits the
CONFIG_ADC=y and CONFIG_ADC_INIT_PRIORITY adjustment
requirements.

Also fixes address not matching warning for pcal6416a@2

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-11-13 09:46:48 +01:00
Nick Ward e338299bd4 drivers: adc: adc_ads114s0x: fix incorrect type
Affected CONFIG_ADC_ADS114S0X_GPIO=y build.
register_addresses was wrong type for
ads114s0x_write_multiple_registers()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-11-13 09:46:48 +01:00
Robert Lubos 8aba7740b8 net: lwm2m: Fix core objects version reporting
Core objects version reporting was broken for LwM2M version 1.1, as the
default object version not necessarily matches the LwM2M version.
Therefore, implement a table with default object versions for particular
LwM2M version, which can be looked up when determining whether it's
needed to include object version or not during Registration/Discovery.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-13 09:46:06 +01:00
Daniel Istvan Nemeth e5dbb26c72 samples: drivers: led_ws2812: nRF5340DK support
New config files to support nrf5340-based boards

Signed-off-by: Daniel Istvan Nemeth <nemeth.daniel.istvan@hallgato.ppke.hu>
2023-11-13 09:45:49 +01:00
Fabio Baltieri 9439c816e9 input: split npcx generic keyboard code into input_kbd_matrix.c
Move all the generic code from the Nuvoton NPCX keyboard scanning driver
into input_kbd_matrix.c. While doing that convert few configs into
devicetree properties and tweak few other things to enable the generic
code to support multiple instances.

This is limited to 8 rows for now, and that's fine for all the current
in-tree drivers, the limit could be removed down the road but this
should be fine for now, added few generic build checks to make sure a
driver does not go over the limit, as well and some more implementation
specific checks.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-13 09:45:28 +01:00
Mariusz Skamra f80b237e30 tests: Bluetooth: Add tests for ATT automatic security elevation
This adds tests for automatic security elevation and retry on security
errors. This includes two tests:
1. where the security is elevated by the central
2. the security is elevated by security request, so pairing is already
   in progress.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-13 09:45:20 +01:00
Mariusz Skamra f434198a2b Bluetooth: att: Retry ATT request if security elevation is in progress
If the conn security elevation is already in progress, retry the ATT
request if failed due to security reasons.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-13 09:45:20 +01:00
Mariusz Skamra f0715fcbb3 tests: bsim: testlib: Fix compilation error
Fixes compilation error seen if CONFIG_BT_EATT is unset

testlib/src/att_read.c:179:73: error: expected expression before ‘,’ token
179 |               IF_ENABLED(CONFIG_BT_EATT, (.chan_opt = bearer)),
    |                                                               ^

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-13 09:45:20 +01:00
Tomasz Moń f12e1d75ed usb: device: cdc_acm: Always buffer poll out data if possible
Queue characters in TX ring buffer regardless of interface state. This
allows simple applications that print basic output to CDC ACM port to
not care about connection or DTR state. Note that depending on actual
application requirements it might be still wise to wait for DTR before
trying to send data.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-13 09:43:46 +01:00
Tomasz Moń c275fa737b doc: connectivity: usb: Document CDC ACM ECHO mitigation
Explain the root cause behind garbage characters received in shell
applications, what Zephyr does to mitigate the issue and what is
expected from host userspace applications.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-13 09:43:46 +01:00
Tomasz Moń 0127d000a2 usb: device: cdc_acm: Use ZLP to detect initial host read
Prevent ECHO on Linux by arming IN endpoint with ZLP when interface is
configured and making sure that actual payload is only sent after
initialization timeout. The ZLP is not visible to host side applications
because the applications are really accessing tty buffer and received
ZLP does not modify tty buffer in any way.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-13 09:43:46 +01:00
Emil Gydesen fc2a54b80c doc: Bluetooth: Audio Stack status table
Adds table of the status of the LE Audio stack in
the Bluetooth subsystem.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:43:35 +01:00
Ryan McClelland 9ddc94e0d4 drivers: i3c: specify start addr when searching for a free addr
For example, if a driver needed to reserve address before it does a
ENTDAA, it would need to get free address in a loop, but the get
free address func would return the same address everytime. It needs
the start address, which would be the last free address it go, to
be passed in to get the next free address.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-11-13 09:43:26 +01:00
Ethan Duckett da4e3e713b drivers: adc: ltc2451: Add ltc2451 driver
Adds support for the Linear Technologies LTC2451 ADC.

Signed-off-by: Ethan Duckett <ethan.duckett@brillpower.com>
2023-11-13 09:43:05 +01:00
Hake Huang dbed251249 test: twister: testplan.py use normpath
when load test plan it is possible the plan is built in another os
so the case key would be
'samples/hello_world/samples.baseic.hello_world'
but the testsuite is scaned in current os may in window
and the key is like
'samples\\hello_world\\samples.baseic.hello_world'

so update the uniq path with only backslash in path

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-11-13 09:42:50 +01:00
Emil Gydesen 06d5a625a6 Bluetooth: Audio: Add codec cap set functions
Add set functions for codec capability, to set all
assigned number values in the bt_audio_codec_cap
struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:42:35 +01:00
Emil Gydesen de0c543e62 Bluetooth: Audio: Update some codec cap assigned numbers
Update codec capabiliy frequency, frame duration and
channel count to use enums, and add additional
documentation and missing values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:42:35 +01:00
Emil Gydesen c35e677d82 Bluetooth: Audio: Split ltv_set_val from codec_cfg_set_val
Add a new function, ltv_set_val, that did most of the
data manipulation from codec_cfg_set_val, so that we can
reuse that code for the codec cap and codec meta
functions as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:42:35 +01:00
Declan Snyder 31eb944fcd samples: boards: mimxrt11xx_cm7: Magic addr sample
Add magic address sample to show how to use flexram
magic address using memc flexram driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Declan Snyder 2d1fdb5586 soc: nxp: rt1xxx: Enable NXP FlexRAM
Enable NXP FlexRAM in DTS and SOC code.

Do not configure flexram at runtime if the code is in the RAM.

Fix RT1060 DT to be more accurate.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Declan Snyder 97d991f7d6 drivers: memc: Add NXP FlexRAM driver
Add driver for NXP FlexRAM

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Declan Snyder 71b0db2118 dts: bindings: Add nxp,flexram binding
Add binding for NXP FlexRAM

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Daniel Schultz da1427406d boards: arm: am62x_m4: Add GPIO0 to phyBOARD-lyra
Enable the gpio0 node and mux the heartbeat LED. Moreover, add the
heartbeart LED as LED node and create an alias with 'led0'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2023-11-13 09:42:11 +01:00
Daniel Schultz 474bbd12e9 dts: arm: ti: am62x_m4: Add gpio0 node
The M4F subsystem has a dedicated GPIO controller with 24 available
pins. Add the node definition for the recently added driver.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2023-11-13 09:42:11 +01:00
Daniel Schultz fbd2b84e0e drivers: gpio: davinci: Add pinctrl
Add pinctrl to the Davinci GPIO driver to allow muxing pins dirctly
in this driver.

Also aligned the macro backslashes as line continuation character at
the end of each line with each at the same position and removed the
GPIO_DAVINCI_DEVICE_INIT macro which seems to be not used.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2023-11-13 09:42:11 +01:00
Daniel Schultz a2f971795f soc: arm: ti_k3: am62x_m4: Lower Initialization level for init
Other drivers like the pinctrl_ti_k3 rely on a fully initialized system.
Move the am62x_init to an earlier stage than PRE_KERNEL_1 to keep both
PRE_KERNEL_{1,2} free for drivers.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2023-11-13 09:42:11 +01:00
Emil Gydesen 9f3858aad9 tests: bsim: Bluetooth: Remove broadcast_source_get_base_inval
Removed the tests for invalid bt_bap_broadcast_source_get_base
parameters and state, as those tests now implemented as unit tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:41:56 +01:00
Emil Gydesen 175a2f3287 tests: bsim: Bluetooth: Remove broadcast_source_get_id_inval
Removed the tests for invalid bt_bap_broadcast_source_get_id
parameters and state, as those tests now implemented as unit tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:41:56 +01:00
Emil Gydesen 475e067379 tests: Bluetooth: Add inval testing of bt_bap_broadcast_source_get_base
Add invalid parameter and state testing of
bt_bap_broadcast_source_get_base

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:41:56 +01:00
Emil Gydesen 1946dd829d tests: Bluetooth: Add inval testing of bt_bap_broadcast_source_get_id
Add invalid parameter and state testing of
bt_bap_broadcast_source_get_id

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:41:56 +01:00
Andriy Gelman 6db785404a tests: drivers: uart_async_api: Be more robust to early buf release
Commit eb44414af9 modified
test_single_read for early rx buf release.

The commit assumed that tdata.last_rx_buf points to either &tdata.rx_buf[0]
if the driver releases the first buffer or at &rx_buf[5] if the first
buffer is not released. However, where tdata.last_rx_buf points to depends
on the timeout given to uart_rx_enable(), making the test flaky.

This commit modifies the test by keeping track how many bytes have been
received in the first and second buffers.
The function tdata_check_recv_buffer() validates that the sent data
matches the received bytes which may have been split between first and
second buffer.

This fixes the uart_async_api test on the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-13 09:41:49 +01:00
Fabio Baltieri 3003cc1938 input: keep CMakeLists and Kconfig sorted
Add zephyr-keep-sorted tags to CMakeLists and Kconfig in input.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-13 09:41:05 +01:00
Fabio Baltieri 98d9a7f86f scripts: compliance: add a compliance check to keep blocks of code sorted
This allows defining a list within two marker (zephyr-keep-sorted-start
and zephyr-keep-sorted-stop), and have the CI validate that the block is
kept sorted every time stuff gets added to it.

This is mainly for Kconfig and CMake include lists so that there's no
ambiguity on where to add new stuff.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-13 09:41:05 +01:00
Fabio Baltieri 6ae03d98a0 drivers, subsys: sort the lists again, mark the blocks for checking
Sort the Kconfig and CMakeLists include blocks again, and mark the start
and end of the blocks so that the CI can keep them sorted.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-13 09:41:05 +01:00
Jason Kridner 26f30db8ad soc: arm: ti_simplelink: cc13x2x7_cc26x2x7: add caparray delta config
- Make caparray delta a Kconfig variable
- Set caparray delta for beagle_bcf at beagleconnect_freedom_defconfig

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
2023-11-11 18:49:25 -05:00
Ayush Singh 27fe62c33f ieee802154: ieee802154_cc13xx_cc26xx_subg: Add cc1352p7 support
- Add support cc1352p7 used by beagleconnect_freedom
- Since this is a multi interface device, auto config does not work.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-11-11 18:49:25 -05:00