Commit graph

114117 commits

Author SHA1 Message Date
Robert Lubos
32f3ce396f net: connection: Split net_conn_input()
The current implementation of net_conn_input() can accept different
packet types, with completely different processing code, resulting in a
function which is pretty bloated, sliced with conditionally enabled code
and hard to understand and therefore maintain.

This commit splits that function into smaller ones, specialized for
different packet types (and entry levels). The following functions have
been extracted from the original one:
  - net_conn_packet_input() for early packet processing (covering
    AF_PACKET family sockets)
  - net_conn_raw_ip_input() for raw IP packets processing (covering
    AF_INET(6)/SOCK_RAW sockets)
  - net_conn_can_input() for CAN packets processing (covering AF_CAN
    family sockets)

The net_conn_input() function stripped from above cases now only takes
care of packets that have been processed by respective L4 and are
intended for regular TCP/UDP sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-23 11:48:33 +02:00
Robert Lubos
edba291799 net: core: Pass the actual LL proto for DGRAM packet sockets
After L2 processing, the LL protocol type is already known and should be
set accordingly on the packet. Therefore it can be passed to the
net_packet_socket_input() function to allow proper socket filtering
based on protocol.

Additionally, as LL protocol type is 16 bit value, fix the proto
parameter type in net_packet_socket_input().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-23 11:48:33 +02:00
Cong Nguyen Huu
b985b9437c drivers: uart_nxp_s32_linflexd: support config via devicetree
Added support for initialization configuration via Devicetree.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-04-23 11:48:24 +02:00
Cong Nguyen Huu
92b57ac654 dts: bindings: serial: uart-controller: expand parity type support
Enhanced uart-controller.yaml to expand parity type support,
now including 'mark' and 'space' options.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-04-23 11:48:24 +02:00
Mark Wang
5c4dece721 bluetooth: classic: smp: fix the wrong Responder Key Distribution
BR_SEND_KEYS_SC should be used to determine the value of
Responder Key Distribution when sending pairing_response to
reply smp br pairing_request.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-04-23 10:04:23 +02:00
Hao Luo
eebd10de8a soc: ambiq: Add missing LOG_MODULE_REGISTER in soc
Need to register log module as we declare it in power.c

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-23 10:04:09 +02:00
Khoa Nguyen
5d0f4e3677 tests: drivers: flash: common: Fixing the overlap case
For the flash with the block size equal to or smaller than 64 bytes,
using a specific "32" bytes for adding for destination_offset and "32"
bytes for subtracting the size that need to copy is not correct.

As a solution, I will add one-fourth of a block size for the
destination_offset and modify the size that need to copy to
[block size + one-fourth of a block size].

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-04-23 10:04:02 +02:00
Fin Maaß
44f9f9fb28 drivers: ethernet: phy: clarify phy_link_callback_set()
clarify phy_link_callback_set() duties.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Fin Maaß
3237fd2a54 drivers: ethernet: atmel_sam_gmac: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Fin Maaß
ddfb3909f6 drivers: ethernet: nxp_imx_netc_psi: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Fin Maaß
0e55a9565d drivers: ethernet: esp32: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Kate Wang
b74feaacb8 samples: drivers: display: Enable example for g1120b0mipi on mimxrt798s
Enable display example for g1120b0mipi shield on mimxrt798s board and
update board document.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
4282687d40 boards: shields: Support panel g1120b0mipi and rk055hdmipi4ma0 on RT700
Add board specific overlay and configuration for display panel
g1120b0mipi and rk055hdmipi4ma0.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
041f2865bb boards: nxp: add configuration for MIPI-DSI and LCDIF on mimxrt700_evk
1.Add clock configuration for DCNano LCDIF video and
command mode.
2.Update board dts file

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
560b8bab37 dts: arm: nxp: update RT7xx dts files for LCDIF and MIPI-DSI
Add configuration for LCDIF and MIPI-DSI.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
587042d0df soc: nxp: imxrt: imxrt7xx: update rt7xx soc files
Add functions to configure MIPI_DSI power and clock when
MIPI_DSI is enabled.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
90c0af2018 drivers: clock_control: update clock_control_mcux_syscon driver for RT700
Update pixel clock control to support RT700.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
d628bfc148 drivers: mipi_dsi: dsi_mcux_2l: Use NXP DCNano DBI driver for memory write
There is no smartdma on RT700, so to perform DCS memory write the CPU has
to write APB buffer word by word, which is too slow for most applications.
But the DCNano in DBI mode can be used to interface with the MIPI-DSI on
RT700, and send data to MIPI-DSI to transfer, once it is properly
configured, which solves the issue.
First added new parameter first_write in display_buffer_descriptor to let
NXP DCNano DBI driver know to use MIPI_DCS_WRITE_MEMORY_START or
MIPI_DCS_WRITE_MEMORY_CONTINUE.
Second updated the MCUX MIPI-DSI driver to support using the NXP DCNano DBI
driver for memory write.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
0017bfcedc drivers: mipi_dbi: introduce NXP DCnano driver
Introduce NXP NCNano driver using MIPI DBI class. This peripheral
supports 8080 and 6800 mode. The driver also supports used with
nxp,mipi_dsi_2l driver, for the panel with DPHY bus, such as g1120b0mipi.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
b442b0b985 drivers: mipi_dbi: Add defines for color coding
Add defines for color coding of DBI Type A(Motorola 6800)
and B(Intel 8080) bus. This is to comply with the MIPI
Alliance Standard for Display Bus Interface v2.0.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
058a162baf drivers: display: Update nxp,dcnano-lcdif to support IP change on RT700
Update nxp,dcnano-lcdif to support IP change on RT700. There are extra
registers need to be configured for the lcdif on RT700. Add new binding
item "version" to tell which version of the IP the SoC has.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
ed63240804 drivers: display: Fix typo in kconfig comment of nxp,dcnano-lcdif.
Should be DISPLAY_MCUX_DCNANO_LCDIF instead of DISPLAY_MCUX_ELCDIF.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
TOKITA Hiroshi
6463c68bc3 doc: extensions: application: Add args for debug related commands
The same as flash-args for flash, we will add commands to debug,
debugserver, and attach to specify arguments in the document.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-23 02:16:29 +02:00
Jilay Pandya
82c6add9b1 drivers: stepper: gpio: refactor work rescheduling logic
update remaining steps should just update the remaining steps, rescheduling
should happen after updating steps and hence is moved to position mode task
which is also in coherence with velocity mode task

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-04-23 02:16:19 +02:00
Luis Ubieda
150cd56643 tests: build_all: sensor: Add ICM45686 as an I2C device
To validate build-time functionality.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Luis Ubieda
0a4d86c557 sensor: icm45686: Add I2C bus support
Validated for read/decode APIs, as well as Streaming mode (FIFO).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Luis Ubieda
b22299d262 sensor: icm45686: Rename REG_SPI_READ_BIT to REG_READ_BIT
So it's generic irrespective to the bus. Tested for I2C and SPI.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Luis Ubieda
1d4d7422b0 sensor: icm45686: Refactor DTS bindings to unify common properties
To split bus support into separate files. This patch does not introduce
any functionality, but rather precedes a patch introducing I2C bus
support.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Christoph Winklhofer
3b29b9fa3b tests: logging: restore userspace testing
Restore userspace testing that was removed with commit 'aa2b72d32a
(tests: logging: remove userspace testing, 2024-04-10)' and reported in
the issue #49213.

For the tests running with threads in user space (with ZTEST_USER),
the memory partitions are configured in the test-suite setup.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Christoph Winklhofer
501f33edea arch: Unify declaration of text region
The declaration for the text region '__text_region_start' and
'__text_region_end' should be consistent with the declaration in the
include file 'zephyr/linker/linker-defs.h'.

The local declarations are:
  extern uintptr_t __text_region_start, __text_region_end;
whereas 'linker_defs.h' declares them as:
  extern char __text_region_start[];
  extern char __text_region_end[];

This may result in conflicting types when 'linker_defs.h' is indirectly
included. Hence, remove the local declarations.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Christoph Winklhofer
8c7aded4c1 logging: Assign module data to memory partition 'k_log_partition'
The logging module data is assigned to the memory partition
'k_log_partition' so that a user mode thread can access this data (see
k_mem_domain_add_thread()). The 'k_log_partition' is created when:
- CONFIG_USERSPACE=y
- CONFIG_LOG_ALWAYS_RUNTIME=y

The option CONFIG_NO_OPTIMIZATIONS=y forces the logging module to use
the runtime message creation CONFIG_LOG_ALWAYS_RUNTIME=y. This raises a
MPU violation when logging is used in a user mode thread since this
thread is not allowed to access the module data (e.g. __log_level,
__log_current_const_data).

Note that the user mode thread may also require access to the partition
'z_libc_partition'.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Christoph Winklhofer
77925656ab logging: Fix runtime message creation in user-mode thread
The runtime message creation (CONFIG_LOG_ALWAYS_RUNTIME=y) in a user-
mode thread raises a MPU violation, e.g. call LOG_INF("Test") in a
user-mode thread.

The function 'z_log_msg_runtime_vcreate' runs in user mode but works
with Kernel data. Hence, create the cbprintf package on the stack (of
the user mode thread) and pass it further to the syscall
'z_log_msg_static_create'.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Marvin Ouma
83aafaf1ae tests: posix: xsi_realtime: move more tests into xsi_realtime
move tests with _POSIX_PRIORITY_SCHEDULING Option to
xsi_realtime testsuite

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2025-04-23 02:15:17 +02:00
Johann Fischer
52db58defa usb: device: remove loopback function in favor of new device stack
This function is used for testing purposes only, there is no real use
for it in a user application. Remove in favor of implementation in new
device stack.
Also remove the part of the documentation that depends on loopback.
Documentation on how to implement your own USB device function using the
new USB device support will follow during the documentation rework.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-23 02:15:10 +02:00
Johann Fischer
5b385493b3 samples: usb: testusb: use new USB device stack
Rework sample to use new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-23 02:15:10 +02:00
Chris Friedt
5fb47cd97f scripts: check_compliance: un-ignore diff and patch for CheckPatch
Un-ignore diff and patch files for CheckPatch.

This was originally added to avoid throwing false-positives when diff
and patch files were actually in the repo, since it would incorrectly
try to perform code-formatting checks on those files instead of on
the content of the commit.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-22 13:14:30 -04:00
Matt Ihnen
132289ec33 drivers: entropy: stm32: fix compile errors for STM32L4 series
The low level function names in the stm32l4xx low level driver are
different than all the other stm32's even though the functionality is the
same. This breaks the entropy module for these parts. This patch fixes the
build and has been tested on a custom stm32l4p5 board.

This STM32CubeL4 issue has been reported (ST Internal Reference: 207828).

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/88621

Signed-off-by: Matt Ihnen <matt.ihnen@gmail.com>
2025-04-22 16:54:52 +02:00
Sai Santhosh Malae
0d547d4e8a drivers: dma: siwx91x: SRAM desc alignment bug fix
Addressed an issue where alignment of dma desc varaible
of dma0 is corrected to 1024 instead of 512.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Sai Santhosh Malae
19e4c56e23 drivers: dma: siwx91x: Bug fix for regular DMA transfers
Addressed an issue where regular/non-scatter-gather DMA
transfers were not explicitly using the primary DMA descriptor
structure. This ensures a smooth regular DMA transfer after
any scatter gather transfer.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Sai Santhosh Malae
a7c06773fe drivers: dma: siwx91x: distinguishing mem to mem transfers
Introduced a new variable in the `dma_siwx91x_channel_info`
structure to provide a clean way to differentiate transfer
directions. This enhancement is utilized to trigger software
requests specifically for memory-to-memory transfers

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Emil Gydesen
11c3ee12a8 Bluetooth: BAP: Sink: Move mod_src_param to RAM
The mod_src_param was several places stored on the stack.
However this is a complex paramater struct that has
2 Kconfig options that can significantly increase the size,
and the maximum size of the parameter is nearly 8 KiB, and
was always place the in the BT RX thread's stack.

For this reason, the param is now stored in a single
static variable in RAM instead, so that the BT RX thread's stack
does not need to be increased based on the Kconfig options,
as that is quite difficult for users to be aware of.

The add_src_param has been left as is, as that stored in
the calling thread, and it is easier for an application
to determine if the calling thread needs additional stack
space.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-22 16:53:58 +02:00
Gudipudi Ramana Kumar
aafcd4f851 bluetooth: audio: Update bad code in BASS to be v1.0.1 compliant
Bad Broadcast Code in BASS/Scan Delegator if BIG_Encryption
field value = 0x03 (Bad_Code), Bad_Code shall be set to the
value 0xFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF according to BASS v1.0.1

Signed-off-by: Gudipudi Ramana Kumar <gudipudiramanakumar@gmail.com>
2025-04-22 16:53:49 +02:00
Jamie McCrae
7e6410de2e boards: nordic: nrf52840dk: Add QSPI nrfutil config
Adds a configuration file which is used with nrfutil to allow
programming QSPI on the device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-22 16:53:32 +02:00
Jamie McCrae
63c4951e38 boards: nordic: nrf5340dk: Add QSPI nrfutil config
Adds a configuration file which is used with nrfutil to allow
programming QSPI on the device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-22 16:53:32 +02:00
Jamie McCrae
cd79d233e6 boards: nordic: nrf7002dk: Add SPI nrfutil config
Adds a configuration file which is used with nrfutil to allow
programming the SPI flash on the device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-22 16:53:32 +02:00
Jamie McCrae
55a8198d35 boards: nordic: thingy53: Add QSPI nrfutil config
Adds a configuration file which is used with nrfutil to allow
programming QSPI on the device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-22 16:53:32 +02:00
Egill Sigurdur
6d710a21cb doc: Make SD card peripheral docs more generic, fix one acronym
Fixes an issue in which "SDHC" had been incorrectly expanded to
"Secure Digital High Capacity" instead of "SD Host Controller".

Since this page is listed under "Peripherals" and since the
SD Host Controller API is not supposed to be used by applications,
the more generic and recognizable title "SD card interface" is used,
and users are pointed to pages relevant to them (disk access API
and SD card subsystem).

Signed-off-by: Egill Sigurdur <egill@egill.xyz>
2025-04-22 16:53:05 +02:00
Josuah Demangeon
0b2d45595e drivers: video: hotfix: force use of constant value for 'source_dev'
In Clang 16 run with some flags, the compiler does not accept a static
const variables as struct initializer. This caused build errors in only
some contexts. Always use the devicetree macros to access the source
device node as a workaround.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-04-22 15:04:47 +02:00
Guillaume Gautier
a15b66309d dts: arm: st: n6: fix axisram1 size
In STM32N6, AXISRAM1 is next to the 400kB FLEXRAM.
By default, the FLEXRAM is configured to extend the AXISRAM1 which put
its total size to 1024kB.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-04-22 15:04:38 +02:00
Simon Gilbert
5c04df9127 i2c: stm32: add DMA callback stubs to avoid nullptr calls in ISR context
Add stub functions for the I2C DMA callbacks, which are invoked
during or upon completion of DMA-based I2C transactions. Without
these, NULL pointer calls occur on DMA transfer complete or error
events, leading to faults within ISR context.

Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
2025-04-22 15:04:11 +02:00