Commit graph

113274 commits

Author SHA1 Message Date
Christoph Winklhofer
061e345972 json: Fix calculation of object size
The calculation of the object size may be incorrect when the size of
a field is smaller than the struct alignment. When such a struct is
used in an array field, the decoded object contains wrong values.

The alignment influences the object size. For example the following
struct has a calculated object size of 8 bytes, however due to
alignment the real size of the struct is 12 bytes:

struct test_bool {
  bool b1; /* offset 0, size 1 */
           /* 3-byte padding */
  int i1;  /* offset 4, size 4 */
  bool b2; /* offset 8, size 1 */
           /* 3-byte padding */
};

This commit changes the object size calculation and computes the size
with the offset and size of the last field in the struct (rounded up
by the struct alignment).

Fixes: #85121
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-08 11:44:51 +02:00
Tom Hughes
1415796bb2 cmake clang/compiler_flags.cmake: Re-enable Wunused-function for clang
All warnings in the code base have been resolved.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-08 10:50:08 +02:00
Paul Alvin
a173fceba3 tests: drivers: gpio: gpio_basic_api: Add support for kv260
Add gpio driver testcase support for kv260. The overlay will select the
PS gpio bank to be tested.

For running this testcase on kv260 PS gpio bank 3 has been chosen
because it is EMIO and design is required to connect pins together.

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
2025-04-08 10:49:34 +02:00
Emil Gydesen
d8e771ded9 tests: Bluetooth: Add BT Tester GAP smoke test
Add a babblesim test of the BT Tester doing a GAP smoke test
connecting 2 BT testers using BTP.

The purpose of this is to further increase the test coverage
of the BT Tester in CI, as it is only being built, and runtime
errors are typically not caught.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-08 10:49:00 +02:00
Benjamin Cabé
39a65c0be2 drivers: sensor: icp201xx: fix channel check logic
Update the channel validation logic to properly check channel against
SENSOR_CHAN_ALTITUDE.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-08 10:48:49 +02:00
Benjamin Cabé
93c52cf0b5 drivers: sensor: icp201xx: fix channel check logic
Update the channel validation logic to avoid using enum constants as
boolean values.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-08 10:48:49 +02:00
Tim Lin
d3c6931252 board: ite/it515xx: Add board of it515xx
Add support for ITE it515xx_evb board.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
a531e71376 drivers/timer: Add timer driver of it51xxx
Add timer driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
d64d87f655 drivers/serial: Add ITE UART wrapper to enable serial driver of ns16550
Add ITE UART wrapper to enable serial driver of ns16550.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
df56c85e94 drivers/clock: Add clock drivers of it51xxx
Add clock drivers for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
f67c2a3d33 drivers/gpio: Add GPIO driver of it51xxx
Add GPIO driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
8c2f5684bb drivers/flash: Enable flash controller for it51xxx series
Enable flash controller for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
d9571f6412 soc: ITE: ilm: Enable instruction memory for it51xxx series
Enable instruction memory for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
f0d21fb497 drivers/pinctrl: Enable pinctrl driver for it51xxx series
Enable pinctrl driver for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
678adea066 drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx
Add interrupt and wake-up control drivers for ITE it51xxx series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
7a06df9cc3 soc: ITE: Add ITE it51xxx SoC
Add support for ITE it51xxx SoC.
NOTE: it51526aw is not support RISCV_ISA_EXT_C.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
0e5218cbcc drivers: ITE: Use generic name instead of specific chip name
Use generic name for structure in driver instead of specific chip name
for better compatibility.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
09f25854b3 soc: Separate it8xxx2 related files from the common folder
Some files should be separated from the common folder to
each soc folder for future expansion of the chip.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Tim Lin
c7e6cfb8cb soc/ite/ec: common: Modify the format to comply with check_compliance.py
Modify the format to comply with check_compliance.py.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-08 10:48:26 +02:00
Riadh Ghaddab
15cbe9fd18 zms: fix the detection of gc_done ATE
Previously, when detecting the GC_done ATE the gc_done_marker boolean
variable was not set.
Fix this by setting it to true if the GC_done ATE is found.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-04-08 10:48:17 +02:00
Khaoula Bidani
00cc4441aa drivers: usb: udc_stm32: Update UDC speed macros
Updated UDC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.

Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-08 08:58:18 +02:00
Khaoula Bidani
5f3fce67c6 drivers: usb: device_stm32: Update USB_DC speed macros
Updated USB_DC speed definition macros for STM32 series
to handle different speed configurations
based on the SoC compatibility.

Added conditional checks for full-speed definitions
using DT_HAS_COMPAT_STATUS_OKAY for st_stm32_usb.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-08 08:58:18 +02:00
Lars-Ove Karlsson
76969f82a4 bluetooth: host: Avoid warning for unaligned access
Rewrote places in the bluetooth code that converts objects
larger than one byte by taking the address of an unaligned struct
member and changed it to a function that takes the value directly
and converts it to big endian.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-04-08 08:58:06 +02:00
Krzysztof Chruściński
e33606f300 drivers: gpio: esp32: Add ESP32_ prefix to CPU_ID() macro
Driver is using local macro to get current CPU ID and it is now
in conflict with generic CPU_ID. Added prefix to avoid conflict.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-08 08:57:57 +02:00
Krzysztof Chruściński
29d9405036 pm: Use fixed cpu id in single core case
When there are no multiple cores than fixing id to 0 saves few
cycles.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-08 08:57:57 +02:00
Krzysztof Chruściński
49337973e0 kernel_structs: Add macro CPU_ID for getting current CPU ID
In case of a single core it resolves to 0. In many cases it reduces
code size and execution time compared to reading id in runtime.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-08 08:57:57 +02:00
Michał Stasiak
aa34fa80aa drivers: clock_control: nrf: Apply fix for nRF54L anomaly 30.
Applied fix for nRF54L anomaly 30, which requires a periodic
calibration of high-frequency clock.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-04-08 08:57:39 +02:00
Jordan Yates
c3139c59d0 bluetooth: hci: SPI backend boot timeout
Add a timeout to the SPI boot process to ensure that `bt_enable` does
not block forever but instead returns an error after an appropriately
large delay. While 1 second would be sufficient under normal operation,
we also want to give the controller time to perform any application
upgrades via a bootloader.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-08 08:57:26 +02:00
Georgios Vasilakis
ce4240f893 samples: tests: Exclude nRF54L15 NS for unsupported tests/samples
The ADC and watchdog samples are not currently supported for the
non secure target of the nRF54L15 DK.

Add exclusions for these until they are supported.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Georgios Vasilakis
85f281057b samples: tfm: Add nRF54L15 in TF-M samples yaml
Add nRF54L15 non secure target for the config_build and
the tfm_ipc samples.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Georgios Vasilakis
47c71e35ee boards: Add non-secure target for nrf54L15dk
This adds the nrf54l15dk/nrf54l15/cpuapp/ns board variant to
Zephyr. It allows to build applications for this target.

This is an initial support for the non secure target which allows
building and running tfm_ipc and config_build.

This is NOT full support of the non secure target in upstream
Zephyr.

There are important limitations, such as:
- The hardware Crypto accelerator is not supported and thus the non
  secur target is NOT secure for production applicatiions in upstream
  Zephyr.
- The BL2 is not supported, so no DFU is supported with this support

Most of the code chagnes here are taken from nRF Connect SDK
in order to avoid having noups there.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Georgios Vasilakis
320505ef39 dts: nordic: Add NRF MPC node in dts
Add the Nordic Memory Privilege Controller (MPC)
in the dtsi of nrf54l15/10/05.

This sets the number of override regions and the
granularity of the regions.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Georgios Vasilakis
b1842723fd dts: bindings: Add binding for Nordic MPC
Add binding for the Nordic Memory
Privilege Controller (MPC).

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Georgios Vasilakis
d8b87d6279 manifest: Bring TF-M with nRF54L15 upstream support
Update west

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-04-08 01:51:18 +02:00
Benjamin Cabé
798db0f777 boards: dptechnics: walter: Add mdm-wake-gpios to modem node
Configure wake up pin (IO46) for the model.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-07 21:14:27 +02:00
Benjamin Cabé
b722cc4ce9 dts: bindings: add mdm-wake-gpios to Sequans Monarch 2 GM02S binding
Add DT property for modem's wake-up pin

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-07 21:14:27 +02:00
Daniel Baluta
8bdf533d76 dma: nxp: sdma: Initialize channel capacity with zero
DMA channel capacity wasn't properly initialized and the computation
relies on it being zeroed.

This only works fine only when requesting channel the first time
causing problems when we have multiple cycles of channel
request/release.

Fix this by properly initializing the capacity when requesting the
channel.

Fixes 43a48d4630 ("drivers: dma: sdma: Update buffer descriptor")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2025-04-07 21:14:16 +02:00
Lukas Gunnarsson
e7201b9f2c drivers: rtc: add nxp pcf2123 driver
Add driver support for the NXP PCF2123 RTC.

Signed-off-by: Lukas Gunnarsson <lukasgunnarsson@protonmail.com>
2025-04-07 21:13:29 +02:00
Titan Chen
5a94a1ca66 drivers: counter: rts5912: add support slow timer counter driver
Port rts5912 slow timer counter driver on Zephyr

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-04-07 21:13:10 +02:00
Andrej Butok
8f2f97ce32 tests: littlefs: fix large partition mounting
Fixes a large partition mounting error
for flashes with erase size > 32KB
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-07 15:18:30 +02:00
Emil Dahl Juhl
1a3dd63dde drivers: sensor: ti: opt3001: add trigger support
The ti,opt3001 ambient light sensor is capable of asserting its interrupt
gpio upon conversion completion. The interrupt gpio can then be used to
trigger a reading of the conversion result automatically.
Due to this, it makes sense for the driver to implement the sensor trigger
functionality.

Add a devicetree property, int-gpios, to the ti,opt3001 bindings to allow
describing the gpio used for getting interrupts from the ti,opt3001.

Implement the sensor trigger functionality with options for using the
global worker thread or letting the ti,opt3001 create its own thread for
servicing the interrupts.
In both cases, when an interrupt is received the driver will read a new
measurement from the chip and clear the interrupt. The sample is then ready
to be read by the user of the sensor.

When manually triggering a sample_fetch, the trigger handler is not
invoked.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2025-04-07 15:18:21 +02:00
Samuel Chee
c8bcf1b018 boards: arm: v2m_beetle: add pinctrl support for v2m_beetle
Adds initial pinctrl support to arm v2m_beetle board target.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
7e95006abf drivers: pinctrl: add pinctrl drivers for arm v2m_beetle
Adds pinctrl driver for the v2m_beetle board target.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
7b6993ffe8 boards: arm: mps3: add pinctrl support for mps3 board
Adds initial pinctrl support to all arm mps3 board targets.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
a2f0e5d372 drivers: pinctrl: add pinctrl drivers for arm mps3
Adds pinctrl driver for all Arm mps3 targets

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
5b7d1e4129 boards: arm: mps2: add pinctrl support for mps2 board
Migrates mps2 targets away from the pinmux driver to
the new pinctrl driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
99ae4bf132 drivers: pinctrl: add pinctrl driver for Arm mps2
Adds pinctrl driver for all Arm mps2 targets.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
9bac31e5a2 drivers: uart: adds pinctrl support for Arm cmsdk uart driver
Adds necessary pinctrl support for Arm cmsdk uart driver

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Samuel Chee
4772e183dc drivers: i2c: add pinctrl support to Arm sbcon driver
Adds necessary pinctrl support to Arm SBCon I2C driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-07 15:18:10 +02:00
Remi Buisson
6560f57140 samples: sensor: Barometric pressure interrupt generic example
Reports generic barometric sensor interrupts
* Data ready interrupt
* Pressure threshold interrupt
* Pressure changed interrupt

Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
2025-04-07 15:17:44 +02:00