Commit graph

84856 commits

Author SHA1 Message Date
Maureen Helm
ce42ffcce0 dts: boards: Use ethernet-phy devicetree node name consistently
Some Ethernet PHYs used the devicetree node name `phy`, while others
used `ethernet-phy`. Be consistent and use `ethernet-phy` throughout.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-09-29 09:47:15 +02:00
Guillaume Gautier
e8e5d5554c drivers: adc: stm32: reset acquisition time between reads
For all STM32 ADC that use common sampling times, there is a check made to
ensure that all channels of a sequence use the same sampling time.
The value was not reset between reads, resulting in error if two
consecutive sequences used different values.
This commit adds a reset of this value once read is done.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-09-29 09:47:07 +02:00
Emil Gydesen
5656c23243 Bluetooth: Audio: Add codec_cfg_set_octets_per_frame
Add the bt_audio_codec_cfg_set_octets_per_frame function
to set or add the octets per frame field in the
codec configuration.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-29 09:46:58 +02:00
Yong Cong Sin
8cd64fd791 drivers: gpio: sifive: use Kconfig to convert between levels
The number of IRQ first level bits is not necessarily 8 bits
now, so use `CONFIG_1ST_LEVEL_INTERRUPT_BITS` instead of
hardcoded value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-09-29 09:46:24 +02:00
Emil Gydesen
8ab3fbf570 Bluetooth: Audio: Split bt_audio_codec_meta_get to cfg and cap
Split the bt_audio_codec_meta_get functions to cfg and cap
variants. This provides a more explicit API where users
do not need to dereference their cfg/cap structs in order
to use this functions.

Furthermore this will also make the get functions more
similar to the upcoming set functions, where the set functions
will require the use of the cfg and cap structs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-29 09:46:15 +02:00
Armando Visconti
1c67228428 dts: stm32: stm32u5: Add sdmmc1 and sdmmc2 configuration
Provide the soc configuration for sdmmc1 and sdmmc2 controllers.
This includes registers address, clocks, resets and interrupt line
details.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-09-29 09:46:08 +02:00
Benjamin Perseghetti
f19b8f2c1d soc: nxp_rt11xx: fix missing unique PWM name.
Adds missing PWM unique device name.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-09-29 09:45:57 +02:00
Armin Brauns
4c8866243d bluetooth: disable BT_ATT_ENFORCE_FLOW for BlueNRG devices
The firmware on these devices seems to have a bug that can cause reordering
of received packets. This can lead to new GATT requests being received
before the acknowledgement of the previous GATT response, accompanied by
log messages like the following:

<wrn> bt_att: bt_att_recv: Ignoring unexpected request

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-09-29 09:45:48 +02:00
Carles Cufi
f39944933d dts: arm: nordic: Add support for ieee802154 in the nRF52820 radio
The nRF52820 radio peripheral supports IEEE 802.15.4, add the required
property and node to reflect this.

See
https://infocenter.nordicsemi.com/topic/ps_nrf52820/radio.html?cp=5_3_0_5_11

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-09-29 09:44:00 +02:00
Alberto Escolar Piedras
d1ada164a4 nrf_hw_models: Update HW models to latest and align with them
* In Zephyr:
  * The HW models now include N fake timers, and N
  bst timers.
  The embedded code needs to target the one for its
  CPU specifically.

* Update the HW models module to
  f4595802d32d103718bf50b3d390b7a450895843

  Including the following:
  * f459580 TEMP & ECB: Fix INTEN sideeffect prototypes
  * 50c2abe nrfx_common: Fix build error with clang
  * 5f0ae29 FICR: Add nrf53 variants
  * 82ee9bd DPPI: On initialization, set all registers to their reset value
  * 1472c34 NVMC & UICR: Readied for nrf53
  * f425c08 NVMC & UICR: Refactor
  * 3a4cfc2 RADIO: Parametrize ED_RSSIOFFS
  * a20e9fc nrfx_get_irq_number() Add missing CCM peripheral for nrf5340net
  * c199715 DPPI: Bugfix
  * 93806ac Zephyr cmake: Align with nrf53 board rename
  * 51f26a3 VREQCTRL: Add register stub and definitions for nrf53
  * 802e0cf RADIO: Switch to level interrupts, readied for nrf53
  * 49bcea2 Templates: Added shortcut check & event signaling version for s
  * a880cd6 Template: Move static out of signal handler definition
  * 709f82b TEMP: Switched to level interrupts, readied for nrf53
  * 6ef0069 AES_CCM: Switched to level interrupts, readied for nrf53
  * eaa89da RNG: Use common templates
  * 75a6cb4 AAR: Switched to level interrupts, readied for nrf53
  * fbf58f3 AES_ECB: Switched to level interrupts, readied for nrf53
  * d084647 RNG: Bugfix in STOP subscription
  * 8007318 Templates: Added template code for the most common models logic
  * bab6a54 int ctrl: Added new API
  * daaaaa0 config: Fix nrf53 Net core EGU instance HAL mapping
  * 54570a0 nrf5340 RTC int mapping fix
  * 043af26 nrfx_common: Provide nrfx_get_irq_number() for 5340 cores
  * ecd7b9b SWI: Add SWI pseudo peripheral
  * a70c73b CLOCK: Add missing TASK sideeffecting prototypes, and fix typo
  * 56c7581 nrf5340: Split HAL files in net and app sets
  * 3892d3e Add API to get the MCUs/domains names
  * 8f485bc RADIO: Prevent clang build warning
  * 5aac1c2 hal: Build weak version of the HAL for the 53 series also
  * f18422d standalone nrfx_config: Provide needed definitions for nrf53
  * 4015d5a nrfx_glue_bsim: Provide 2 trivial definitions for standalone bu
  * 4af80d5 cmsis stubs: Provide trivial macro to replace ISB
  * b6c2769 cmsis replacements: Fix for other Zephyr bsim targets
  * 8316930 zephyr CMakefile: Set HAL version based on Kconfig
  * 4404106 RNG: Rename functions to match new naming convention
  * a3dbb38 RTC: Rename functions to match new naming convention
  * 886dc73 CLOCK: Rename functions to match new naming convention
  * bcb2b99 EGU: Rename functions to match new naming convention
  * 50af67e TIMER: Rename functions to match new naming convention
  * 8120224 CLOCK/POWER/RESET: Add DPPI connections, generalize to N instan
  * 450337c RTC: Add DPPI connection, nrf53 support and new functionality
  * 2918ce6 DPPI common subscription: Minor API change
  * ec1c2a7 TIMER: Add DPPI connection, nrf53 support and functionality
  * e6f9860 EGU: Add DPPI connection, nrf53 support and generalize
  * c8a4368 bst_ticker: Generalize to N instances
  * 093deee fake timer: Generalize to N instances
  * 302da8d DPPI: Typo fix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 10:42:29 +03:00
Alberto Escolar Piedras
0a8500e79f manifest: hal_nordic: Update to enable 15.4 on simulated nrf53
Take in a minor fix necessary to run 15.4 on the
incoming simulated nrf53 targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 09:57:46 +03:00
Alberto Escolar Piedras
536aee1e1a native soc: Add option to pass extra images to native simulator build
Add a new kconfig option to be able to pass extra images to the
native simulator build.
So one can, for ex., use one application build to produce one core image,
and at the same time have it produce the final link with the native
simulator runner and the other MCU images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 08:50:52 +02:00
Alberto Escolar Piedras
9fea8f5f6b native boards: AMP fix: localize the CONFIG_ symbols
The Zephyr build leaves all kconfig options as absolute symbols
in the image. This need to be localized, otherwise they will
appear as duplicates with other Zephyr images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 08:50:52 +02:00
Alberto Escolar Piedras
dd29dffca4 native SOC: Add option to define how many MCUs a SOC has
Add a new Kconfig option to define how many MCUs a SOC has

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 08:50:52 +02:00
Alberto Escolar Piedras
c7f85e6ee9 native SOC: Add option to select the primary MCU
Add a new kconfig option to select which is the
preffered embedded MCU.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-29 08:50:52 +02:00
Yong Cong Sin
f5fbaa18a3 tests: build_all: plic: relocate and cleanup
The test is for intc_plic only, so move them into the
intc_plic folder.

Also cleaned up the testcase.yaml a bit while I'm at it

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-09-29 01:26:52 -04:00
Robert Lubos
815e7a1e34 samples: net: sockets: socketpair: Replace integration platform
mps2_an385 was excluded from networking tests, therefore can no longer
be used as an integration platform. Replace it with qemu_x86.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 17:29:00 -04:00
Robert Lubos
6a3612666e boards: mps2_an385: Exclude platform from networking tests
The platform is known for having unstable system timer with networking
enabled (see https://github.com/zephyrproject-rtos/zephyr/issues/48608)
causing occasional failures of time-sensitive networking testsuties
(TLS, now DHCPv6). Instead of excluding the platform on per-test basis,
just exclude the platform from networking testing globally.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 17:29:00 -04:00
Daniel Leung
d47b1c05f3 kernel: userspace: add k_object_is_valid()
This adds a function k_object_is_valid() to check if a kernel
object exists, of certain type, and has been initialized.
This replaces the same (or very similar) code that has been
copied from kernel into the network subsystem.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 17:28:43 -04:00
Bjarki Arge Andreasen
cc219c0132 drivers: serial: serial_test.c: Patch 64-bit incompat
The serial_test.c driver uses size_t to store read_size,
which becomes a 64-bit type when built for 64-bit
architectures. This is incompatible with the print
format %d which is 32-bit. Updated to %zd

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-09-28 16:38:30 -04:00
Bjarki Arge Andreasen
b054d162f2 tests: drivers: modem: Specify targets for cellular
Many boards do not build properly if UART_ASYNC_API
is enabled, which is causing an overly large list
of targets to exclude for the
build_all.modem.modem_cellular.build test suite.

This commit instead specifies 4 emulated boards, two
of 32-bit, two of 64-bit instead.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-09-28 16:38:30 -04:00
Bjarki Arge Andreasen
d118d19293 drivers: serial: serial_test: Move ring buf dep to Kconfig
This commit moves the dependency management between the
RING_BUFFER and UART_ASYNC_API or UART_INTERRUPT_DRIVEN
options to the Kconfig Kconfig.test.

If either UART API options listed are selected, the
RING_BUFFER option must be selected. This is now handled
automatically by Kconfig instead of causing a build
assert.

The asserts where added with this PR #59880, and are
removed in this commit.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-09-28 16:38:30 -04:00
Bjarki Arge Andreasen
ebd6681589 drivers: serial: serial_test: Patch irq_isr set to undefined
This commit fixes an error where the irq_isr callback is set
to an undefined variable instead of NULL.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-09-28 16:38:30 -04:00
Bjarki Arge Andreasen
7fb10c82cc tests: build_all: modem: Patch dependencies preventing build
Some dependencies where missing from the build_all test
for the modem_cellular.c driver. These have been added.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-09-28 16:38:30 -04:00
Benjamin Cabé
79674debcb samples: bindesc: doc: Describe sample using zephyr:code-sample
Describe the code sample using zephyr:code-sample directive to help
with making it easier to find from API reference.
Also cross-referenced main bindesc page from the sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-28 23:04:47 +03:00
Yonatan Schachter
66c4cef240 west_commands: bindesc: Fixed crash when no sub-command is given
The west bindesc command currently crashes when no subcommand is
given. This is because the subcommand was not marked as required.
This commit fixes the issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Yonatan Schachter
f4e2a669eb samples: hello_bindesc: Improved README.md
Improved the README.md of the hello_bindesc sample by adding a
note about non existing bin files and referencing the relevant
parts of the documentation.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Yonatan Schachter
0bc277b7a0 release-notes: Added binary descriptors
Added binary descriptors to the release notes, under
"Libraries / Subsystems".

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Yonatan Schachter
3a4a82bb58 MAINTAINERS.yml: Add entry for bindesc
Add a MAINTAINERS.yml entry for binary descriptors, with yonsch
as maintainer.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Carles Cufi
2d38c095a6 west: runners: Add support for a common --reset argument
Some of the runners in the tree have been adding their own,
class-specific versions of a switch to instruct the runner to reset or
not the device after flashing.

In order to better support multi-image builds that require more than one
flash operation, introduce a new --reset,--no-reset command-line
parameter that is part of the RunnerCaps so taht this functionality can
be accessed in a standardized manner.

Implementations for the new parameter are provided for the runner
classes that were already configurable in this regard.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-28 11:08:25 -07:00
Jeroen Reeskamp
1134245ac9 sensors: lsm6dso: Values now match better with the ODR values.
Values are specified in the datasheet(page 30, table 18).
Values match with values defined in lsm6dso-common.yaml

Signed-off-by: Jeroen Reeskamp <jeroen.reeskamp@vention.nl>
2023-09-28 12:21:54 -05:00
Henrik Brix Andersen
ddd2b490b0 doc: releases: update v3.5 migration guide with changes in CAN timing
Update the migration guide for v3.5 to mention the changes related to
setting CAN timing.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Henrik Brix Andersen
9783ed56d9 dts: bindings: can: deprecate the sjw and sjw-data properties
Update the descriptions for the various CAN devicetree timing properties
specified in Time Quanta (TQ) to make it clear that these, if present, are
only used for the initial timing parameters.

Deprecate the (Re-)Synchronization Jump Width (SJW) devicetree properties
for both arbitration and data phase timing as these are now only used in
combination with the other TQ-based CAN timing properties, which are all
deprecated.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Henrik Brix Andersen
a9d3935fa0 drivers: can: solely use sjw from devicetree for initial timing
Update the CAN controller drivers to solely use the sjw and sjw-data
devicetree properties for setting the initial timing when devicetree timing
parameters are specified in Time Quanta (TQ).

Any timing set via the CAN timing APIs will contain either user-provided or
automatically calculated SJW values. This includes any timing parameters
calculated from bus-speed and bus-speed-data devicetree properties.

Update the CAN controller driver tests accordingly and remove the
CAN_SJW_NO_CHANGE definition as it has lost its meaning.

Fixes: #63033

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Henrik Brix Andersen
e397b85eb8 drivers: can: calculate a default SJW value
Change the CAN timing calculation APIs to automatically calculate a default
(Re-)Synchronization Jump Width (SJW) value. The calculated value can be
overwritten by the caller if desired.

This allows automatically scaling the SJW according to the number of Time
Quanta (TQ) used for phase segment 2 instead of relying on a compile-time
fallback value defined in devicetree.

This reduces the can_set_timing()/can_set_timing_data() API functions to
simple setters (with validation).

Fixes: #63033

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Dominik Ermel
e48354455a mgmt/MCUmgr/grp/os: Add booloader info support
Adds command allowing to query information on bootloader.
In this case support is provided to query MCUboot information.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Dominik Ermel
7668b4fbb3 doc/services/device_mgmt: Bootloader info request definition
Specification for MCUmgr OS group command allowing to query
for bootloader information.
Provide information on supported MCUboot parameters query by MCUmgr
group OS.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Dominik Ermel
83d69f50ad doc/release-notes: MCUboot overwrite mode Kconfig info
Note on CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Dominik Ermel
5d28fdea63 modules/MCUboot: Add overwrite mode for MCUboot
Add MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY mode.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Daniel Leung
9686f6e000 kernel: do not expose z_tls_current in kernel.h
This moves the declaration of z_tls_current inside
k_current_get() so it will not be exposed as a public
variable.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 16:15:46 +02:00
Daniel Leung
0a50ff366e kernel: rename z_current_get() to k_sched_current_thread_query()
The original idea of z_current_get() was to be the counterpart
of k_current_get() when thread local variable for current has
not been initialized if TLS is enabled, otherwise they are
the same function. Now since z_current_get() is being used
outside of core kernel, rename it under kernel namespace so
other subsystem can conceptually use them too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 16:15:46 +02:00
Keith Packard
41e8b44619 kernel: Make thread 'init_delay' k_timeout_t rather than int msecs
Storing this value in milliseconds rather than using k_timeout_t requires
the system to perform division at runtime to convert types. This pulls in
the 64-bit soft division code on platforms without hardware for this.

Perform the conversion at build time instead by using the runtime time
directly.

The init_delay field was moved within the _static_thread_data structure to
avoid introducing a hole for alignment on 32-bit systems when using 64-bit
timeouts.

Use SYS_TIMEOUT_MS instead of K_MSEC so that the initial delay can be set
to forever.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-28 16:15:27 +02:00
Keith Packard
477bf558de west: Pull in espressif linker alignment fix
This PR fixes the espressif esptool to deal with ELF section alignment
which would otherwise create holes in the resulting binary.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-28 16:15:27 +02:00
Keith Packard
4269bbc4ea test/kernel: Adjust timer test to deal with time_units macros
All of the time_units conversion routines are now macros which means the
test cannot reference them as functions. Instead, create local static
functions which call each one of them and use those instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-28 16:15:27 +02:00
Keith Packard
9c47239264 sys/time_units.h: Make SYS_TIMEOUT_MS usable as constant initializer
To make this macro usable as an initializer for static or global data, it
cannot have struct values within the expression, instead it must compute
the tick value as a primitive value and then wrap that in the struct as the
final step.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-28 16:15:27 +02:00
Keith Packard
8f5d0791bf sys/time_units.h: Convert time conversion to macros
The intent of this patch is to leave all of the semantics of the macros
unchanged, only replacing the easy-to-read static inline conversion
function with a pile of ?: operators.

Ick. This is not a cleanup. However, what it does enable is using constant
results while initializing global variables, which cannot be done with
either static inline functions or even statement expressions, even when
those generate constant results.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-28 16:15:27 +02:00
Grant Ramsay
a8497c5216 kernel: msg_q: Remove alignment requirements from message queue docs
Alignment of the message queue's ring buffer is not necessary.
The underlying implementation uses memcpy (which is
alignment-agnostic) and does not expose any internal pointers

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-09-28 16:14:56 +02:00
Benjamin Cabé
a46f1b9c33 kernel: Fix unused-parameter warnings
Add missing ARG_UNUSED where needed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-28 16:14:39 +02:00
Mulin Chao
21d7c2db6d drivers: sensor: npcx: fix debug message when port B is captured
Fix wrong debug message when port B of tachometer is captured.

Signed-off-by: Evan Chang <MCCHANG1@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-09-28 09:08:29 -05:00
Andrei Emeltchenko
9e6960fe90 boards: x86: Indicate smp support for ADL and EHL boards
Indicate SMP support to be able to run related tests on the boards.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-28 15:46:07 +02:00