Commit Graph

109410 Commits

Author SHA1 Message Date
Martí Bolívar
de9db18e78 dts: bindings: improve base.yaml descriptions
This file defines some of the most important properties in the
devicetree, including core concepts like 'compatible', 'reg', and
'interrupts'. For some reason, we've never prioritized writing up
proper descriptions that indicate their importance or show where the
user can get more information about them in the specs or elsewhere.

Give this file a once-over to improve the situation.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
2025-01-30 22:59:03 +01:00
Yasin Ustuner
45f50f858e tests: drivers: build_all: Add build test for ad7124 driver
This commit adds build-only test of ad7124 spi based
adc.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Yasin Ustuner
a4b5635930 include: dt-bindings: Add AD7124 analog inputs
This commit adds analog inputs for AD7124 ADC.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Yasin Ustuner
65997dce76 dts: bindings: adc: Add AD7124 binding
This commit adds ad7124 binding.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Yasin Ustuner
d411b4f67b drivers: adc: Introduce AD7124 adc driver
This commit introduces ad7124 adc driver.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-30 20:33:10 +01:00
Mahesh Mahadevan
4e31be313a soc: nxp_rw: Update pinctrl setting for FlexSPI
The FSEL bit for FlexSPI should not be cleared as part of
configuring the FlexSPI pins.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-01-30 20:28:20 +01:00
Chris Friedt
8ab6e29cf1 posix: shm: ensure addend is less than INTPTR_MAX
Although it's quite unlikely that we will see shared memory
objects in practice that are greater than 2GiB, there is a
possibility of integer overflow when comparing intptr_t and
size_t, since the former is signed and the latter is unsigned.

Explicitly check to ensure that the addend is less than
INTPTR_MAX before subtraction.

This fixes CID 487734

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-30 20:27:59 +01:00
Chris Friedt
f81293d0dc posix: semaphore: explicitly ignore return of k_mutex_unlock()
The nsem_list_unlock() static inline function looks as though it
was designed to always ignore the return value of
k_mutex_unlock(), presumably for performance reasons.

A quick audit of the code looks as though the call should
always succeed.

Prepend (void) to the call to avoid the coverity defect in the
future.

CID 444386

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-30 20:27:48 +01:00
Cla Mattia Galliard
ed1ebb337d net: tc: Add statistics about dropped packets
Add statistics about packets dropped in net_tc.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-01-30 20:27:33 +01:00
Cla Mattia Galliard
84f6e7a313 net: tc: Limit the max amount of packets in the traffic-class-fifo
To avoid starvation of a traffic class by another, limit the maximum amount
of packets, that can sit in a single traffic-class-fifo to a fraction of
the maximum amount of available packets. In the tx-case also reserve
packets for direct sending, in the case, where
CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO is enabled.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-01-30 20:27:33 +01:00
Lukasz Majewski
d0d68d6b0f drivers: net: ot: Provide structure instance for HDLC RCP context
Without this patch the hdlc_iface_init() function assigns to
ot_hdlc_rcp_context structure pointer (*ctx) value of 0, as in the
NET_DEVICE_DT_INST_DEFINE() preprocessor macro the 'data' field is
set to NULL.

Afterwards, the ctx->iface is set to iface address passed to the function
(as well as the ctx->ot_context is set).
Writing those values to address 0x0 is catastrophic to for example
mimxrt1020, which uses ITCM memory (mapped from 0x0) to store flash
handling functions, as those are used to XIP code directly from
SPI NOR memory (as mximxrt1020 doesn't have internal flash).

In this particular case - the flash_flexspi_nor_erase() function is mapped
(i.e. relocated) to ITCM's 0x0 address. Overwriting first 8 bytes of it
causes the SoC to enter "Precise data bus error" exception.

The fix is to define the static instance of struct ot_hdlc_rcp_context
and pass its address to the NET_DEVICE_DT_INST_DEFINE() macro. As a result
its storage is now in RAM, not ITCM.

This issue has been discovered on UART based HDLC RCP communication, but as
it also may be problematic on the NXP driver, this patch fixes it too.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2025-01-30 20:26:53 +01:00
Declan Snyder
62b911feea spi_nxp_lpspi: Rewrite driver, fix native chip sel
To fix the native hardware chip select, we need to rewrite this driver
to not use the MCUX SDK handle abstraction, which does not fit the
zephyr use case.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Declan Snyder
0bb7ccbb0c drivers: spi_context: Functions for remaining len
Add functions to get remaining length in the transfer. Refactor a bit to
avoid duplicate code for the for loop that is the same as in the total
length function.

The difference between the total length and left length function is that
the current buffer total length is counted in the former and the current
buffer remaining length is counted in the latter.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Declan Snyder
9966d29957 dts: nxp,lpspi: Fifo property and fix delay desc
Add properties for describing RX and TX fifo sizes.

Also reformat some descriptions and fix the description of the
transfer-delay property which was incorrect. Since zephyr spi bufs are
not continuous, every possible Zephyr LPSPI driver must use
continuous transfer mode, for which the meaning of this delay has
nothing to do with the chip select.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-30 20:26:36 +01:00
Benjamin Cabé
0e4a5ac6cb drivers: audio: dmic: remove compatible from nxp,dmic child binding
There is no such thing as associating a compatible to a child binding
so remove this from the nxp,dmic binding definition and devicetree files
that incorrectly set one.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-30 20:26:19 +01:00
Aksel Skauge Mellbye
fc7143ffbc dt-bindings: pinctrl: silabs: Add analog bus bindings
Add definitions for analog bus selections on Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-30 18:30:01 +01:00
Aksel Skauge Mellbye
120691a155 drivers: pinctrl: silabs: Add support for analog bus allocation
The GPIO peripheral on Silabs Series 2 devices is responsible for
allocating analog buses to analog peripherals. Enable support for
this in the pinctrl driver. Since these bus allocations are not
digital pins, introduce a new property silabs,analog-bus for this
purpose.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-30 18:30:01 +01:00
Jukka Rissanen
4195130214 net: shell: events: Print more details for L4 events
Print IP address information for L4 DNS server add and remove
events.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Jukka Rissanen
6edcf445ab net: shell: events: IPv4 mcast join and leave were missing
The event monitor did not handled IPv4 multicast join/leave
event information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Jukka Rissanen
ef9b3d4dbf net: shell: events: IPv4 mcast addr add and del were missing
The event monitor did not handled IPv4 multicast address
addition or deletion information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Jukka Rissanen
b83f86a1d2 net: shell: events: Add admin up and down events
The "admin up/down" event was not being decoded.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Jukka Rissanen
e109a27c99 net: shell: events: Print event id for unknown events
To simplify debugging what event code is missing from the
events shell module, print also event id for the for unknown
events. This way it is a bit easier to figure out what the
unknown event is.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Jukka Rissanen
b2dcaa8f9e net: shell: events: Add Ethernet L2 support
Print Ethernet carrier on/off and VLAN tag enabled/disabled
status when monitoring events.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 18:29:45 +01:00
Mahesh Mahadevan
85bdab00de soc: mimxrt1180: Add USB support
This was tested on the MIMXRT1180 EVK board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-01-30 18:29:33 +01:00
Mahesh Mahadevan
c3533472c1 drivers: hwinfo: Add support for MIMXRT1180
Add HWINFO support for MIMXRT1180

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-01-30 18:29:33 +01:00
Christophe Dufaza
ad22d34d16 edtlib: amend Node.props API documentation
Node properties are not created for all properties defined
by the node's binding (Binding.prop2specs),
only for those that actually have a value.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-01-30 18:29:28 +01:00
Christophe Dufaza
c6e3de296d edtlib: amend PropertySpec.path API documentation
PropertySpec.path does NOT tell "the file where the property
was last modified", but instead the binding file specifying
the devicetree node of which this is a property.

See: #65135

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-01-30 18:29:28 +01:00
Dmitrii Golovanov
53f7f6bcd1 twister: coverage: Merge gcovr reports
In `--coverage-per-instance` mode for 'gcovr' merge individual
coverage.json reports into the aggregate code coverage report
instead of processing .gcda data files again.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-01-30 18:29:08 +01:00
Dmitrii Golovanov
f93f82f160 twister: coverage: Data collection and reporting per-test instance
With this change, the coverage data (GCOV dump) is extracted from the
test log files after each of the test instance parallel execution,
instead of post processing all the logs at the end of the Twister run.

The new `--coverage-per-instance` mode extends Twister coverage operations
to report coverage statistics on each test instance execution individually
in addition to the default reporting mode which aggregates data to one
report with all the test instances in the current scope of the Twister run.
The split mode allows to identify precisely what amount of code coverage
each test suite provides and to analyze its contribution to the overall
test plan's coverage. Each test configuration's output directory will have
its own coverage report and data files, so the overall disk space and
the total execution time increase.

Another new `--disable-coverage-aggregation` option allows to execute
only the `--coverage-per-instance` mode when the aggregate coverage
report for the whole Twister run scope is not needed.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-01-30 18:29:08 +01:00
Dmitrii Golovanov
220f251241 twister: coverage: Group command line arguments
Group Twister code coverage command line arguments for better usability.
Add more details in descriptions.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-01-30 18:29:08 +01:00
Hake Huang
1b23b91527 tests: drivers: gpio: fix gpio test failure for rt1060_evkc
the gpio for test has a pull up in revc, so need skip pull test

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-01-30 16:22:03 +01:00
Daniel DeGrasse
598f343385 shell: handle reprint correctly when output crosses line boundary
When reprinting the shell command buffer with long user inputs, the
reprinted buffer may cross a line boundary, and require a newline to be
printed. For these cases, print the command buffer character by
character, inserting newlines as appropriate.

Fixes #82155

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2025-01-30 16:21:53 +01:00
Nikodem Kastelik
50f6142497 samples: nordic: system_off: add retained_mem variant for nRF5340 DK
nRF5340 SoC supports retained_mem driver, which can be
utilized for RAM retention in System OFF sleep mode.
Add sample configuration confirming this.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Nikodem Kastelik
34b14bbc48 tests: drivers: retained_mem: add support for nRF5340 DK
nRF5340 SoC supports retained_mem driver.
Add test configuration confirming this.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Nikodem Kastelik
c61a5178fe soc: nordic: nrf53: kconfig: mark RAM CTRL as supported
nRF5340 SoC supports nrfx RAM control helper.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Nikodem Kastelik
8b495dc316 soc: nordic: poweroff: remove disabling of emul l05/l10 unused RAM
Code is now incorporated into SystemInit() function of MDK 8.69.1,
which is integrated within nrfx 3.10.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Marcio Ribeiro
c0b666de8f west.yml: hal_espressif: revision update
Updates hal_espressif revision

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-01-30 16:21:13 +01:00
Marcio Ribeiro
c3b53d0fa3 soc: esp32xx: makes esp_console_init() calling conditional
Makes the esp_console_init() calling during hardware initialization
conditioned to CONFIG_ESP_CONSOLE

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-01-30 16:21:13 +01:00
Benjamin Cabé
7c6d3a6f93 fs: ext2: Fix potential integer overflow in disk access size calculation
Cast sector_count and sector_size to uint64_t to prevent potential
integer overflow when calculating total device size in
disk_access_device_size().

Fixes Coverity issue CID-322647

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-30 16:20:58 +01:00
Benjamin Cabé
ab9a2f52ba drivers: gpio: npm2100: properly handle I2C write return value
properly check return code from i2c_reg_write_byte_dt effectively
making it possible for gpio_npm2100_port_set_masked_raw to error out since:

if (ret != 0U) {
	return ret;
}

was dead code before this fix.

Fixes CID-444376

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-30 16:20:45 +01:00
Ibrahim Abdalkader
33ec0276b8 drivers: video: video_stm32_dcmi: Sanity-check frame size.
Add a check to ensure the frame size does not exceed the video buffer
size defined by `CONFIG_VIDEO_BUFFER_POOL_SZ_MAX`. Even if the sensor
supports the resolution, the frame size could overflow the buffer.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-01-30 16:20:17 +01:00
Ibrahim Abdalkader
a4ce71dc70 drivers: video: video_stm32_dcmi: Fix DCMI video buffer release.
Ensure the DCMI video buffer is released only after the DCMI
has been fully stopped. This prevents potential access to the
buffer while the DCMI is still active, avoiding undefined behavior.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-01-30 16:20:17 +01:00
Jamie McCrae
f4a5bd2651 doc: migration: 4.1: Add notes on removal of build type
Adds a note about this deprecated feature being removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-30 16:19:57 +01:00
Jamie McCrae
150f3674dd doc: Remove build type information
Removes information on this feature now it has been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-30 16:19:57 +01:00
Jamie McCrae
763a49f082 cmake: Remove build type
Build type was deprecated in Zephyr 3.6, it was replaced with
FILE_SUFFIX support

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-30 16:19:57 +01:00
Kamil Kasperczyk
1ac373dd09 MAINTAINERS: Update maintainer information for OpenThread
One of the collaborators of Networking: OpenThread is not active
anymore and was replaced by another one.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2025-01-30 16:19:36 +01:00
Jamie McCrae
d9c5210dc8 scripts: requirements: Remove MCUboot imgtool requirement
MCUboot's imgtool requirement has been moved directly to MCUboot
which can be installed using west packages if needed, remove it
from Zephyr's requirements

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-30 14:16:50 +01:00
Dominik Ermel
78d7f4a448 doc: release-notes-4.1: stream_flash_erase_page gets deprecated
Add note on deprecating stream_flash_erase_page and how to substitute
its functionality.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-30 14:13:42 +01:00
Dominik Ermel
22703875bd storage/stream_flash: Deprecate stream_flash_erase_page
The commit marks stream_flash_erase_page as deprecated.
After the function is removed users will have to rely on stream
flash to erase space it needs prior to write.

The stream_flash_erase_page has several issues like using non-relative
offset for erases, allowing to destroy data already written or even
erase out of area available for stream flash.

This fixes #67407

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-30 14:13:42 +01:00
Dominik Ermel
56ef352f17 tests/stream_flash: Prepare for stream_flash_erase_page removal
Keep on testing the function but fix logic where applicable
and remove last_erased_page_start_offset which has been replaced
with erased_up_to in stream_flash_ctx.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-30 14:13:42 +01:00