Commit graph

108953 commits

Author SHA1 Message Date
Robert Lubos
21b71224ac net: ethernet: Remove L2 header stripping after TX
It seems that this change was solely added to address issues with old
TCP stack, which blindly queued packets intended for TX for potential
further retransmission, expecting that the packet would remain intact
during transmission.

I think this assumption was wrong, as it's natural that lower layers
append respective headers to the packet, and this "header stripping"
behavior was specific for Ethernet L2 only. If an upper layer expects
that the packet would need to be retransmitted at some point, it should
clone it instead.

Therefore, remove the L2 header stripping from the Ethernet L2 to avoid
any potential issues in zero-copy case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-23 16:31:41 +01:00
Robert Lubos
78c3996b59 net: ethernet: Allow drivers to reserve net_pkt headroom
Add new Ethernet driver config option,
ETHERNET_CONFIG_TYPE_EXTRA_TX_PKT_HEADROOM, which allows Ethernet
drivers to inform L2 about the extra net_pkt headroom they need to be
allocated.
This is only supported when CONFIG_NET_L2_ETHERNET_RESERVE_HEADER is
enabled, so that it's possible to fit entire packet into a single
net_buf, which is needed for zero-copy transmission.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-23 16:31:41 +01:00
Aksel Skauge Mellbye
e35cb93afa boards: silabs: xg24_dk2601b: Add SPI NOR flash
Add definition of MX25R SPI flash to device tree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-23 16:31:28 +01:00
Robert Lubos
ea191bddaf net: pkt: Fix fixed buffer allocation with headroom bug
The size calculation for the first buffer, in case extra headroom is
requested, had a bug which could result in a size variable underflow
followed by net_buf exhaustion.

In case the net_buf size was larger than requested size, but smaller
than requested size + headroom, the whole buffer size was subtracted
from the requested size. This however did not take the extra headroom
into account and in effect could result in underflow.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-23 16:31:03 +01:00
Aksel Skauge Mellbye
14a00f259f drivers: spi: silabs: eusart: Always enable peripheral
The EUSART peripheral must always be enabled in configure(), as
its enable state gets cleared when the state machine is unretained
in deep sleep. The rest of the config registers are retained,
so they can continue to not be repainted on every configure() if
the context is the same as last time.

Remove unnecessary duplicated enable at the end of configure(),
the SPIInit HAL function already performs enable.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-23 16:30:47 +01:00
Yishai Jaffe
12240a9058 shell: uart: add write command
Added a command to write to a uart device.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-01-23 16:30:39 +01:00
Yishai Jaffe
1709731c5c shell: uart: fixed indentation
Fixed indentation to match line above.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-01-23 16:30:39 +01:00
Marcio Ribeiro
beae6e96f1 boards: esp32xx: fix zephyr,sram
Fixes the the node value of zephyr,sram for the following boards:
- esp32s2_devkitcc
- esp32s2_saola
- esp32s2_franzininho
- esp32s2_lolin_mini
- ttgo_t7v1_5_esp32

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-01-23 16:29:59 +01:00
Sylvio Alves
4456ecc0a3 soc: esp32xx: remove unused kconfig entry
ESP_HEAP_SEARCH_ALL_REGIONS kconfig entry is not
used and can be totally removed.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-01-23 13:45:31 +01:00
Jakub Rzeszutko
b0a0febe58 shell: fix unsafe API calls and add configurable autoflush behavior
Fixes an issue where the shell API could block indefinitely when called
from threads other than the shell's processing thread, especially when
the transport (e.g. USB CDC ACM) was unavailable or inactive.

Replaced `k_mutex_lock` calls with an indefinite timeout (`K_FOREVER`)
by using a fixed timeout (`K_MSEC(SHELL_TX_MTX_TIMEOUT_MS)`) in shell
API functions to prevent indefinite blocking.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/84274

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2025-01-23 13:45:20 +01:00
Jakub Rzeszutko
8991b954bc shell: add Kconfig option for configurable autoflush behavior
Introduced a new Kconfig option `SHELL_PRINTF_AUTOFLUSH` to allow
configuring the autoflush behavior of shell printing functions.

Updated `Z_SHELL_FPRINTF_DEFINE` to use the
`CONFIG_SHELL_PRINTF_AUTOFLUSH` setting instead of hardcoding
the autoflush behavior to `true`.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2025-01-23 13:45:20 +01:00
Alberto Escolar Piedras
492ad96ee5 manifest: Update nRF hw models to latest enabling cracen HAL
Update the HW models to the provisional branch zephyr_2025_01_22
which enables the use the not yet released CRACEN RNG & CM HAL
while enabling the latest nrf HAL 3.10

Including the following:
4aac556 Support latest nrf HAL 3.10 / MDK 8.69.1 for 54L15 builds
2e75940 UART: Correct UART names printed out to the users

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-23 10:15:11 +01:00
Håvard Reierstad
e13e893dfc net: buf: revert disallowing blocking in syswq
Reverts the change made in d4d53010f00cadbb4f89c6d41391937646fc1740
(The changes was moved to another file in a restructuring)

The commit incorrectly assumed that no blocking would be allowed in
the syswq. This has caused issues observed among others
in #77241 and #80167

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-01-23 10:14:59 +01:00
Johan Hedberg
b3c6151679 doc: release: Add notes for Bluetooth ECDH changes
Mention the removed prompt for BT_ECC in the migration guide, and also add
a note about the removed HCI emulation layer to the release notes.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-01-23 10:14:46 +01:00
Johan Hedberg
d3c8cb4b79 Bluetooth: Host: Remove prompt from BT_ECC
This option only exposes internal APIs, so there should be no need to allow
applications to set an explicit value. Instead, users of the API should
select it through Kconfig.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-01-23 10:14:46 +01:00
Johan Hedberg
09e86f3b69 Bluetooth: Host: Remove HCI ECC emulation
Remove the HCI command & event emulation layer for ECDH commands and
events. This means that we always do the necessary operations in the host.
The existing BT_ECC Kconfig option stays, but now gets automatically
enabled when necessary (e.g. based on the BT_SMP option), which is why this
commit removes so many explicit assignments in prj.conf files.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-01-23 10:14:46 +01:00
Xudong Zheng
020cb79d27 drivers: serial: nrfx_uarte: move DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM
The Kconfig option should be defined alongside
UART_NRFX_UARTE_LEGACY_SHIM for clarity.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-01-23 08:26:33 +01:00
Xudong Zheng
fac7c86568 drivers: serial: nrfx_uarte: fix deprecation warning when UART is unused
This hides the deprecation warning when UART_NRFX_UARTE_LEGACY_SHIM is
false because UART is not used.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-01-23 08:26:33 +01:00
Fabio Baltieri
9d34d5c104 i2c_shell: only include i3c if I3C=y
Only lookup for i3c devices if I3C=y, fixes a build error:

zephyr/drivers/i2c/i2c_shell.c:
In function 'device_is_i2c':
zephyr/drivers/i2c/i2c_shell.c:341:43:
error: array type has incomplete element type 'struct i3c_driver_api'
341 |         return DEVICE_API_IS(i2c, dev) || DEVICE_API_IS(i3c, dev);

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-01-23 08:26:21 +01:00
Hao Luo
6694c53fad dts: ambiq: move compatible fields from board dts to dtsi
compatible fields should be defined in dtsi instead of overlays

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-01-23 05:23:54 +01:00
Vinayak Kariappa Chettimada
7573ac521d Bluetooth: Controller: Fix regression in Code PHY S2 Rx to any PHY Tx
Fix regression in Coded PHY S2 reception to any other PHY Tx
in the s/w switch implementation.

Regression in commit 55b7dba8ec ("Bluetooth: Controller:
Refactor sw_switch hal interface use").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-01-23 05:23:39 +01:00
Yassine El Aissaoui
cd361c35be dts: mcxw71: Move smu2 region inside fast peripheral
SMU2 was using NS address in dts.
Update to use S address.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2025-01-23 05:23:19 +01:00
Alvis Sun
2d465707c9 dts: arm: npcx: add I2C port helper macro
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-01-23 05:22:57 +01:00
Yassine El Aissaoui
3bccb227ae boards: nxp: frdm_rw612: Add missing chosen to dtsi
Add zephyr,flash-controller and zephyr,code-partition
chosen info.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2025-01-23 00:14:23 +01:00
Ederson de Souza
3bbe42f789 tests/subsys/tracing: Async tracing API test fix
Test `tracing.transport.uart.async.test` was working only due sheer
serendipity: one of the tracing strings checked,
sys_trace_k_mutex_lock_exit, was never being registered on the tracing
buffer. However, the check never got to check this string, so the test
was passing.

Why wasn't it being registered? Tracing buffer size was a bit small for the
flurry of messages - increasing it solves the problem, and is what this
patch does.

Why did the check never got to the missing string? Tracing thread has a
lower priority, so when the k_sleep of test thread expired, it was
preempted. Indeed, if the sleep was changed by any number of ticks, the
test would fail. Even changing order - and thus number - of instructions
executed could make this test fail.

While at it, fixed some typos and an imprecise commentary on code.

Fixes: #84169

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-01-23 00:13:46 +01:00
Sylvio Alves
3d3217ea6a hci: esp32: remove deprecated symbol
Make sure HAS_BT_CTLR is used instead
of deprecated BT_CTLR symbol.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-01-23 00:13:17 +01:00
Chris Friedt
dba7598517 posix: options: shm: use truncation flag that has been added
Originally, when the POSIX_SHARED_MEMORY_OBJECTS option was
added, the O_TRUNC flag was not consistently available.

Now that it is consistently available, ensure it is used
within the shm_open() function.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-23 00:12:58 +01:00
Chew Zeh Yang
d770a4c584 usbd: device_next: cdc: add option to enable short packet terminate
For usbser.sys driver, which is the default USB host driver for CDC
devices in windows, it is expected that USB device always indicate
completion of transmission by short packet. In case where the last
packet length is multiple of max packet size of the BULK IN endpoint,
the USB device shall indicate completion of transmission by sending a
zero length packet. This commit adds the sending of the short packet
termination mentioned above, ensuring condition of short packet
terminate is fulfilled.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2025-01-23 00:12:24 +01:00
Guennadi Liakhovetski
76e1e1b804 llext: fix Z_GENERIC_SECTION() usage
Z_GENERIC_SECTION() uses STRINGIFY() to convert its argument to a
string, therefore the argument shouldn't contain additional quotes.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-01-22 20:50:00 +01:00
Yasin Ustuner
0689d6d7e7 samples: Add MAX78000FTHR sample overlay files
Enable following sample for MAX78000FTHR:
 - samples/drivers/counter/alarm

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
3e218c69a4 tests: Add MAX78000FTHR test overlay files
Enable the following tests for MAX78000FTHR:

 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/spi/spi_loopback
 - tests/drivers/w1/w1_api

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
426c586868 boards: adi: Add MAX78000FTHR board
This commit adds MAX78000FTHR board.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
11e913b65a samples: Add MAX78000EVKIT sample overlay files
Enable following sample for MAX78000EVKIT:
 - samples/drivers/counter/alarm

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
b547986e82 tests: Add MAX78000EVKIT test overlay files
Enable following tests for MAX78000EVKIT:
 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/w1/w1_api

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
153fc5ab54 boards: adi: Add MAX78000EVKIT board
This commit adds MAX78000EVKIT board.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
2c3ae462a2 include: zephyr: dt-bindings: Add MAX78000 DMA binding
This commit adds binding file for DMA slots.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
d0a95b4083 soc: adi: max32: Add. shared section for MAX7800X SoC
The SystemCoreClock variable must be placed in the '.shared' section for
the MAX78000 and MAX78002 because the ARM core is responsible for changing
the System Clock and updating the SystemCoreClock variable, and the
RISC-V core knows what the System Clock frequency is through the
shared variable.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
ab278c2419 soc: adi: Add the MAX78000 SoC
This commit adds MAX78000 SoC
and dts files.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Yasin Ustuner
9030472e4e manifest: Update hal_adi to add MAX78000 SoC
Add MAX78000 SoC files to the hal_adi repository.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-01-22 20:47:21 +01:00
Daniel Leung
32f5ef5892 tests: kernel/msgq_api: join threads after each test
On SMP systems, threads going through k_thread_abort() may still
be running while the test moves on to the next one. This creates
some interferences and may result in the next test failing. So
after each test, we need to do k_thread_join() on those threads
to make sure they are no longer active.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-01-22 20:47:05 +01:00
Anas Nashif
7ae2b5033e doc: review: switch labels to a definition list
Move labels docs from headers to a definition list.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
22b1e70b08 doc: contribute: split style guidelines into own document
Move style guidelines into own section and put it along side other
guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
09a0bebdd1 doc: contribute: up reviewer expectation one level
Reviewer expectation was burried under contributor section, it deserves
to be on the same level and highlighted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
7676e3602e doc: contribute: remove example sub-header
Remove one level listing one single example.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
4c3bd250b2 doc: contribute: move prerequisites section up
Move prerequisites section to the top of the page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
831a0184d6 doc: contrib: move section about modifying patches
Move section about modifying changes to the contribution section where
it belongs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
cc21c72392 doc: contrib: dco: remove git tip listed as requirements
Some of the git tips in this sections do not count as 'requirements'.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
fdcfc262d3 doc: remove note about cherry-picking commits from PRs
The text in this note is not accurate and should already be covered by
the license agreement, no need to say what the license already covers in
non-legal terms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
8c20225c80 doc: contrib: move contrib badge info to roles page
Move this to the project role page where the contributor role is listed
and described.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00
Anas Nashif
4cecaf094f doc: contribute: match order of toc
Just match the same order the sections appear in.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-22 18:33:06 +01:00