Commit graph

106854 commits

Author SHA1 Message Date
Valerio Setti
e3817d0ffc test: misc|shell: disable "zephyr,entropy" chosen property
When "zephyr,entropy" is enabled the corresponding entropy driver is
pulled in the build and initialized during boot. This

- changes the initialization sequence expected by "check_init_priorities";
- add one extra device to the expected list in "shell_device_filter".

Therefore this commit removes the "zephyr,entropy" propery to return the
test to the original state.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
4c43e3b756 samples: mcumgr: smp_svr: disable "zephyr,entropy" in mcuboot
If/when "zephry,entropy" is enabled CONFIG_ENTROPY_GENRATOR is
automatically enabled, therefore enabling the corresponding
platform entropy driver. On some platform this is a problem
because the entropy driver is not used directly as random
source, but only to seed the ctr-drbg algorithm provided
by Mbed TLS. Unfortunately CONFIG_MBEDTLS_CIPHER_MODE_CTR_ENABLED
cannot be directly enabled because CONFIG_MBEDTLS_CFG_FILE used
in mcuboot is different from the "config-tls-generic.h" which
is required to use Kconfig symbols defined in
"zephyr/modules/mbedtls/Kconfig.tls-generic".
Moreover entropy and random number generators are not required
in mcuboot because signature verification is a
deterministic operation.
In conclusion this commit disables "zephyr,entropy" in
mcuboot DTS overlay file.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
daab04857f drivers: entropy: nrf5: add "depends on MULTITHREADING"
entropy_nrf5 modules uses k_sem_xxx() functions in several
places, but these functions are only functional when
CONFIG_MULTITHREADING is set, otherwise they just fallback to
the empty weak implementation provided in
zephyr/lib/libc/armstdc/src/threading_weak.c.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
62581570a7 drivers: entropy: mcux_rnga: add "depends on SYS_CLOCK_EXISTS"
mcux_rnga driver calls k_cycle_get_32() which is not available
if CONFIG_SYS_CLOCK_EXISTS is not defined. Therefore we add
this depedendency to CONFIG_ENTROPY_MCUX_RNGA.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
8564df571a samples/tests: bluetooth: remove ENTROPY_GENERATOR selection
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
e05518146b boards: remove ENTROPY_GENERATOR selection if BT
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
2d959d96fb drivers: entropy: enable ENTROPY_GENERATOR if "zephyr,entropy" is set in DT
Automatically enable ENTROPY_GENERATOR if the device-tree has
any "zephyr,entropy" chosen property specified. This helps
in having CONFIG_ENTROPY_HAS_DRIVER set if the platform support
an entropy driver and this then enables CONFIG_CSPRNG_ENABLED.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Lyle Zhu
69d415c9ce Bluetooth: SSP: Improve BR SC only mode
Actively disconnect the connection with error code `BT_HCI_ERR_AUTH_FAIL`
when the notified link key type is not `BT_LK_AUTH_COMBINATION_P256` in
BR SC only mode.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-10 05:39:10 +01:00
Johan Hedberg
bc086f53e2 drivers: bluetooth: silabs_efr32: Declare supported features in Kconfig
Now that we enable `HAS_BT_CTLR` we should also declare which optional
features are supported. For now, we only add the features that are
available through the current driver init routine and found on all
supported platforms.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-10 05:38:39 +01:00
Grant Ramsay
31b54e7cee arch: arm: cortex_m: Include TBLBASE in VTOR mask if present
In some Cortex-M3 implementations SCB_VTOR bit[29] is called
the TBLBASE bit.
This enables setting VTOR to an SRAM address for qemu_cortex_m3

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-12-10 03:16:23 +00:00
Maochen Wang
c007ac4577 drivers: wifi: nxp: add Wi-Fi thread configurations
Support configuring Wi-Fi threads stack size and priority through
Kconfig.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-10 03:16:11 +00:00
TOKITA Hiroshi
3a69ed6c02 drivers: sensors: ti_hdc20xx: Remove ti,hdc20xx compatible
The `ti,hdc20xx` is a common definition for TI HDC20xx series,
so the actual device named `hdc20xx` does not exist.
Remove the "compatible" section.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-09 22:06:52 +00:00
David Leach
259302a201 boards: nxp: frdm_rw612: restructure dts
Restructure board dts file to prepare for NS targets using common
dts.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-12-09 22:06:32 +00:00
Félix Turgeon
9cdb07cb52 scripts: coredump: Fix loading coredumps when thread info is enabled.
When loading a coredump with an an elf built using
'CONFIG_DEBUG_THREAD_INFO=y', gdbstubs assumes that the thread info
memoryblock populated by 'CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_THREADS=y'
will be present in the coredump. This is not always true and causes an
error, and a failure to load the coredump. Add a default value for the
threads_metadata variable in CoredumpLogFile which can be used to detect
when the memory block is not present. This allows the coredump to load
successfully.

Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
2024-12-09 22:06:23 +00:00
Jianxiong Gu
29436c2b29 include: drivers: usb_c: unify status register data type to uint32_t
The tcpc_get_status_register function was using int32_t for the status
parameter, while the other related functions used uint32_t. This change
unifies the data type across all related functions to uint32_t for
consistency and clarity.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2024-12-09 22:06:09 +00:00
Jianxiong Gu
414ac1895a include: drivers: usb_c: Run clang-format
Run clang format before making changes

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2024-12-09 22:06:09 +00:00
Carles Cufi
af299be0fc boards: nordic: nRF54L15DK: Add debug configuration for FLPR
Add the required code for `west debug` to work the FLPR
core over JLink in the nRF54L 05, 10 and 15 devices.

Note that this requries an external J-Link probe, it will not work with
the on-board (OB) probe soldered on the DK.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-12-09 22:05:58 +00:00
Andrej Butok
e669bf8d3d soc: nxp: mcx: Add flash runner configuration
- Adds a flash runner configuration for mcxn/c/a/w
  used for sysbuild multi-image projects.
- Solves sysbuild issue with multiple resets and mass erases.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-12-09 22:05:40 +00:00
Sylvio Alves
fc7cacc983 soc: esp32: fix smp_log usage
smp_log usage should be only used when SMP is enabled.
This is currently causing build issues after the fix
provided by #82377

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-09 22:05:23 +00:00
Krzysztof Chruściński
e8a5ecc160 soc: nordic: common: mram_latency: Add option to auto request no latency
Add CONFIG_MRAM_LATENCY_AUTO_REQ. When option is enabled then module
requests no latency during the initialization. This option might be
useful for cases where we want to achieve maximum performance and
want to avoid controlling MRAM in the code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-09 22:05:17 +00:00
Krzysztof Chruściński
c8d50e4ef1 drivers: serial: nrfx_uarte: Add support for non ISR PM mode
When fast UARTE instance is used (e.g. UARTE120 in nrf54h20), PM actions
are not ISR safe because they include communication over IPC so they can
only be called from the thread context. Extend driver to support both
PM modes. When non ISR mode is used then uart_rx_enable() and uart_tx()
will return error if they are called from ISR and resume operation
would need to be called because device is suspended. On completion,
driver is calling pm_device_runtime_put_async which can be called from
the ISR context.

Additionally, suspending in the TXSTOPPED and RXTO events has been
moved after user callback. It allows to support the case where
uart_rx_enable() or uart_tx() are called from that callback context.
Since suspending is called after returning from the callback it will
not trigger suspend action because API called in the callback context
will increment the usage counter (when pm_device_runtime_get() is
called).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-09 22:05:03 +00:00
Stephan Linz
4488ed1a20 tests: drivers: build_all: display: add config for 16-bit transfer
Add configuration with 16-bit transfer to C4 by the new `xfr-min-bits`
property. Such a setup generally only allows `write-only` access.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Stephan Linz
a68c1aa4ad drivers: mipi_dbi_spi: add 16-bit transfer to C4
Extends the MIPI DBI SPI driver class for operating mode C4, SPI 4-wire,
with 16 write clocks to send one or multiple byte for commands. Generic
data (e.g. GRAM) aligned to 16-bit are passed through and stuffed with
bytes if required.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Stephan Linz
c809c3730d drivers: mipi_dbi_spi: splitting SPI write function
The more complex the SPI transfer algorithms become, the more
confusing the current implementation of the SPI write function
becomes. Furthermore, if further as yet unknown MIPI DBI modes
are to be supported, the scope of this implementation would
increase dramatically. With the splitting now introduced, the
existing SPI transfer algorithms are moved to individual
auxiliary functions and the SPI write function only focus on
the decision of the respective MIPI DBI mode and the device
lock/unlock.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Stephan Linz
d0ba5a38c9 drivers: mipi_dbi_spi: splitting SPI read function
The more complex the SPI transfer algorithms become, the more
confusing the current implementation of the SPI command read
function becomes. Furthermore, if further as yet unknown MIPI
DBI modes are to be supported, the scope of this implementation
would increase dramatically. With the splitting now introduced,
the existing SPI transfer algorithms are moved to individual
auxiliary functions and the SPI read function only focus on
the decision of the respective MIPI DBI mode and the device
lock/unlock.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Stephan Linz
0c93541bb5 drivers: mipi_dbi: doc: fix clock in waveform diagram
In the Doxygen comments, the amount of SPI clocks now match the
number of data bits shown. The clock was shown half the speed.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Stephan Linz
9a148413ef dts: bindings: mipi-dbi-spi: fix language describing duplex
Update language describing mipi dbi spi duplex to be more clear.
Removing a run-on sentence.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-12-09 15:12:21 +01:00
Francois Ramu
df86315a41 tests: drivers: flash RDP testing on stm32h7
Add the configuration to run the testcase
with READOUT_PROTECTION (RDP) on stm32h7 disco kits

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
3696ee06e5 drivers: flash: stm32h7 with RDP protection
Implement the readout protection for the STM32H7 series.
Define the specific functions used by the flash_stm32h7.
Move the stm32h7 flash register manipulation in a write_optb()
to be called by the flash_stm32_set_rdp_level.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
a8da57471f drivers: flash: stm32 flash ex op functions are common
Move the stm32 flash driver ex_op functions to common
flash_stm32_ex_op.c file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Francois Ramu
3e166bc209 drivers: flash: stm32 driver move sem functions for multithread
Place the flash_stm32_sem_take and flash_stm32_sem_give
function to header file for common to use in any flash driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-09 15:12:04 +01:00
Lyle Zhu
2424bfd869 Bluetooth: BR: improve br_sufficient_key_size
Currently, the minimum value of encryption key size is
`BT_HCI_ENCRYPTION_KEY_SIZE_MIN`.

Add a new Kconfig `BT_BR_MIN_ENC_KEY_SIZE`. It is used to set the
specific minimum encryption key size.
The default value is `BT_SMP_MIN_ENC_KEY_SIZE`. And it can be
configured if `BT_SMP_SC_ONLY` is not enabled.

Use `CONFIG_BT_BR_MIN_ENC_KEY_SIZE` as minimum encryption key size in
`br_sufficient_key_size`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-09 15:11:52 +01:00
Johan Carlsson
f756d0d2bd usb-c: pe: set correct sink/src ready state.
policy engine errors were unconditionally setting the state back
to sink ready. this fix sets the correct state based on the current
power role.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
9b021bc8e1 usb-c: add PE_SRC_Disabled support.
with this fix the pd stack works with type-c devices that does not
respond to pd.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
cae67312d1 usb-c: ignore VDM messaged when using PD 2.0
according to PD 2.0 sepecification VDM should be ignored
if not supported.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Johan Carlsson
0fa9ef8b07 usb-c: clear cache cc_voltage variable.
when not clearing cc_voltage the type-c current limit
will only be reported on the first plug in.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-12-09 15:11:39 +01:00
Emil Gydesen
a4df95f390 samples: Bluetooth: BAP: Refactor stream_recv_lc3_codec
Refactor the function to use net_buf_pull_mem instead of the
offset variable when decoding.

Since the offset value was always 0 before, this fixes the
incorrect decoding.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-09 15:11:23 +01:00
Daniel DeGrasse
a8182aa942 drivers: display: display_rm67162: check ret value of gpio_add_callback
Check the return value of gpio_add_callback() in the display init
function, to resolve an issue flagged by static analysis.

Fixes #81921

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Daniel DeGrasse
4d24120dcf drivers: display: display_rm67162: fix unsigned compare against 0
"wlen" variable set to return value of mipi_dsi_transfer should be a
ssize_t type, so that if a negative value is returned the error will be
caught and returned.

Fixes #81929

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Daniel DeGrasse
d7c9c4505c drivers: display: display_rm67162: fix dead code for pixel format
Fix dead code within the set_pixel_format() function for the RM67162.
This function should set the relevant data fields for the driver, then
send the MIPI DCS command to change pixel format.

Fixes #81945

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-09 15:11:11 +01:00
Andries Kruithof
dd75fc39c3 Bluetooth: Audio: add bt_ prefix when registering logging module
Add the bt_ prefix when registering logging for the media_proxy module,
to be consistent with what the other modules in bluetooth/audio do
Note that the bap_usb module shall not have the bt_ prefix

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-12-09 15:10:57 +01:00
Andrzej Głąbek
6e22d19fd2 samples: drivers: spi_flash: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependecies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Andrzej Głąbek
cd3a78056d samples: drivers: jesd216: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependencies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Alessandro Manganaro
5c290d8d55 drivers: bluetooth: hci: STM32WBA: Fix pub address assignment
BLE public address assignment shall be done only when
CONFIG_BT_HCI_RAW is not enabled.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-12-09 15:10:37 +01:00
Tomas Choat
bc3748ce60 net: lib: ptp: fix cpp compilation errors
Compilation errors in ptp library when using C++ compiler.
First error is due to 'class' keyword being reserved in C++
and 'class' is used as a variable name in ptp library.
Second error is due to a flexible array member in a struct
is not placed at the end.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
7541742002 net: lib: ptp: Assert statements inverted
The asserts always fail because the condition is inverted.
This patch fixes the condition to verify the socket
is lower than PTP_SOCKET_CNT.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
b3505fbaa6 net: lib: ptp: Fix bidir time adjustment
When the offset is larger than 1 second, the time
adjustment should still be allowed to be bidirectional.
Casting the offset to an unsigned value after the
subtraction will allow the adjustment to be bidirectional.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Tomas Choat
ecfc44469c net: lib: ptp: fix follow up msg bug
When sending follow up messages, the pre send function
does not insert the correct time stamp in the message.
Issue is fixed by calling the pre send timestamp function.

Signed-off-by: Tomas Choat <trc@ixys.no>
2024-12-09 15:10:28 +01:00
Anas Nashif
072a430cea twister: handler: open files using with statement
Use with statement to open stdout/stderr and resolve current warning
when running twister:

	ResourceWarning: unclosed file....

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-09 15:10:19 +01:00
Robert Slawinski
ef6f804d8f drivers: dm8806: link speed change interrupt handling
On the interrupt handling, one thread per driver instance is involved
into monitoring the semaphor, sends inside the gpio callback triggered
by the gpio interrupt. Each time, when the link parameters are change,
the DM8806 is generating the gpio interrupt. After getting semaphor,
the application callback function which was linked during initialization
process is called to get the new link parameters with standard API
calls

Signed-off-by: Robert Slawinski <robert.slawinski1@gmail.com>
2024-12-09 09:50:29 +01:00