Commit graph

107105 commits

Author SHA1 Message Date
Jukka Rissanen
d98fe73684 tests: net: dns_dispatcher: Add tests for dispatcher
Make sure that the socket service is properly unregistered when
dispatcher is unregistered.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:29:21 +01:00
Jukka Rissanen
da148ab3bc net: dns: Close socket service properly from dispatcher
We need to close the socket service context when dispatcher is
unregistered.

Fixes #82652

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:29:21 +01:00
Jukka Rissanen
c110331507 net: dns: Avoid errors when DNS dispatcher is already registered
Skip error prints and extra DNS events if DNS dispatcher was already
registered.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:29:21 +01:00
Jukka Rissanen
efcfcfe292 net: dns: Fix the debug print when dispatcher fails
Depending on DNS type, print the output (mDNS vs DNS) correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:29:21 +01:00
Johan Hedberg
880384a20e Bluetooth: Host: SMP: Verify public key before usage
Add a separate test for public key validity. This needs to be done
synchronously so that we can respond with an early failure message to the
peer device.

Fixes #80218

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-11 21:29:08 +01:00
Bartlomiej Buczek
81ad6ecc13 dts: bindings: comparator: fix nrf-comp binding.
Fix binding so that it's description matches property list
and it's allowed values.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-12-11 21:28:30 +01:00
Jukka Rissanen
1f2595a456 net: wifi: shell: Remove obsolete subcmd settings from commands
If a shell command does not have a sub command, then the 3rd parameter
to SHELL_SUBCMD_ADD() macro should be set to NULL so that the help
will only print information specific to that command and not all
wifi commands.

Fixes #82633

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:28:17 +01:00
Emilio Benavente
a8647d3af9 soc: nxp: mcx: Updating Clock Code
Updating clock code to mcxw71.
Adding some missing clock setups.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-12-11 21:27:51 +01:00
Jukka Rissanen
2c7e16a695 MAINTAINERS: Add entry for HTTP code
Add a separate entry for HTTP related code so that we can have
separate maintainers/collaborators than general networking area.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:27:25 +01:00
Emil Lindqvist
6dafb5f4a9 wifi: fix warning on wifi_ps_exit_strategy_txt
This commit fixes a warning when including wifi.h:
type qualifiers ignored on function return type

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-12-11 15:55:03 +00:00
Robert Lubos
55ea932f88 tests: net: socket: tcp: Increase system workqueue stack size
The tests overflowed system workqueue stack slightly when running on
nRF52840, increase the stack size globally for the tests to avoid
potential issues on other platforms as well.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-12-11 15:54:44 +00:00
Ilya Tagunov
520dd313ee tests: llext: temporarily disable all ARC HS5x platforms
Exclude all ARC HS5x platforms from selected LLEXT tests until
the linker issue is resolved.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-12-11 15:54:30 +00:00
Marcin Niestroj
a7ceb4723f net: l2: wifi: fix handling of missing 'ap_disable'
When calling wifi_ap_disable() API specific WiFi driver implementation was
checked whether 'ap_enable' was provided, instead of 'ap_disable'. Fix
that copy-paste error.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-12-11 15:54:18 +00:00
Pieter De Gendt
1e6f919999 tests: logging: log_backend_uart: Fix stack overflow
Put the buffer data in a static buffer to reduce the needed stack size.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-11 13:59:17 +00:00
Matt Rodgers
8f07784e9f tests: http_server: fix failing TLS tests due to moved certificates
Testcase uses certificates from the sample application at
samples/net/sockets/http_server. These were modified and moved into a
different folder by a previous commit, causing a build failure in the
test.

Testcase updated to:
- use new path to certificates
- update available cipher suites, since certificates now use ECDSA
- update expected hostname in certificate

The CA certificate in the sample app is also converted to .der format
for inclusion in the test (the content is exactly the same as the PEM
version, just converted to DER).

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-11 06:32:53 -05:00
Chang An
90ff9c0883 Bluetooth: tester: enable VCS volume flags notify
[Description]
PTS case: VCS/SR/SGGIT/CHA/BV-03-C fail.

[Root Cause]
VCS/SR/SGGIT/CHA/BV-03-C require Volume Flags Characteristic properties
(Read/Notify), but tester volume flags notify is disabled by default.

[Fix]
add CONFIG_BT_VCP_VOL_REND_VOL_FLAGS_NOTIFIABLE=y in
tests/bluetooth/tester/overlay-le-audio.conf

[Testing]
After modified, VCS/SR/SGGIT/CHA/BV-03-C pass with log:
Test Case Ended	VCS/SR/SGGIT/CHA/BV-03-C	PASS	24	 00:00:01.010000
12/9/2024 11:31:55.027000 AM

Signed-off-by: Chang An <chang.an_1@nxp.com>
2024-12-11 08:01:20 +01:00
Alexandru Lastur
72d8bb48e3 boards: imx93_evk: add M33 DDR code support
This commit adds the support for running
the Cortex M33 code from DDR memory.

Signed-off-by: Alexandru Lastur <alexandru.lastur@nxp.com>
2024-12-11 08:00:52 +01:00
Daniel DeGrasse
72c4700d65 boards: shields: lcd_par_s035: configure TE signal for RW612
Configure the TE signal for the rw_rw612_bga board when using the
lcd_par_s035 shield. This signal should be handled on the rising edge in
the default configuration, since the display writes from the MCU are
faster than the panel reads data.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-11 08:00:42 +01:00
Daniel DeGrasse
6ed3554d20 drivers: display: st7796s: use mipi_dbi_configure_te API
Use the mipi_dbi_configure_te API within the st7796s display driver.
If the MIPI DBI controller supports the tearing enable signal, then
configure the ST7796S to output the TE line signal.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-11 08:00:42 +01:00
Daniel DeGrasse
83aa4aa5c2 drivers: mipi_dbi_nxp_lcdic: add support for mipi_dbi_configure_te
Add support for the mipi_dbi_configure_te API within the NXP LCDIC
peripheral. Also, remove a redundant code patch in the write_command
function that was previously used to determine when the display driver
was writing to graphics RAM, as these writes should now be performed
using the mipi_dbi_write_display API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-11 08:00:42 +01:00
Daniel DeGrasse
b1d1b70ddb drivers: mipi_dbi: add support for mipi_dbi_configure_te
Many MIPI DBI displays support a "tearing effect" signal, which can be
configured to signal each v-sync or h-sync interval. This signal can be
used by the MIPI DBI controller to synchronize writes with the
controller, and avoid tearing effects on the screen (which occur when
the write pointer from the MCU overlaps with the panel's read pointer in
the display controller's graphics RAM).

Add the `mipi_dbi_configure_te` API, which allows display controllers to
configure MIPI DBI controller to wait for a TE edge before streaming
display data. Allow the tearing enable parameters to be configured via
devicetree settings, since these will vary based on the MIPI DBI
controller and display controller in use.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-11 08:00:42 +01:00
Manuel Argüelles
a073d30ccb doc: migration-guide-4.1: add note about nxp,kinetis-lpuart change
Add note about compatible change for nxp,kinetis-lpuart.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-11 08:00:30 +01:00
Manuel Argüelles
f85f8ee88e dts: bindings: rename nxp,kinetis-lpuart compatible
Rename "nxp,kinetis-lpuart" compatible to "nxp,lpuart" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-11 08:00:30 +01:00
TOKITA Hiroshi
6642b1e228 boards: m5stack: cores3: Add AW9523B configuration
Adding AW9523B gpio expander configuration.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-11 08:00:14 +01:00
Adrian Chadd
1617bd99ce boards: nucleo_u5a5zj_q: add USB HS 2.0 support
This board has the required clock crystal (X4) and jumper settings
present to enable the USB 2.0 HS support.

* Enable the HSE clock (16MHz)
* Flip the PLL1 configuration over to use the HSE clock, but still
  outputting 160MHz to sysclk/apbclk.
* Add the USB HS device tree node.
* Update the board documentation.

Signed-off-by: Adrian Chadd <adrian.chadd@meta.com>
2024-12-11 08:00:03 +01:00
Marcin Niestroj
f72ef5c237 drivers: usb: stm32: fix support of STM32U5 OTG_HS with embedded PHY
Introduce new binding "st,stm32u5-otghs-phy" for OTG_HS PHY. This allows to
configure clock source and handle STM32U5 specific OTG_HS PHY behavior in
driver implementation in a more readable way.

Move OTG_HS PHY clock selection (previously <&rcc STM32_SRC_HSI48
ICKLK_SEL(0)>) from OTG_HS node to OTG_HS PHY node.

Rename USBPHYC_SEL -> OTGHS_SEL which matches the definition in the stm32u5
CCIPR2 register (RM0456 Rev 5, Section 11.8.47).

Support enabling OTG_HS PHY clock, which is bit 15 (OTGHSPHYEN) in
RCC_AHB2ENR1. Change OTG_HS clock to be bit 14 (OTGEN).

Calculate in runtime OTG_HS PHY clock source frequency. Try to match that
to supported (16, 19.2, 20, 24, 26, 32 MHz) frequencies and select proper
option with HAL_SYSCFG_SetOTGPHYReferenceClockSelection() API (instead of
hardcoded 16 MHz selection).

Co-authored-by: Adrian Chadd <adrian.chadd@meta.com>
Signed-off-by: Adrian Chadd <adrian.chadd@meta.com>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-12-11 08:00:03 +01:00
Marcin Niestroj
fafaa58240 drivers: clock: stm32: support STM32_CLOCK_DIV()
Support specifying divided clock buses by introduction of
STM32_CLOCK_DIV(div) macro. This macro can be used in devicetree to define
clock source of peripherals.

HSE is selected in devicetree using:

   <&rcc STM32_SRC_HSE ...>;

HSE/2 can now be selected with:

   <&rcc (STM32_SRC_HSE | STM32_CLOCK_DIV(2)) ...>;

This allows to use clock_control_get_rate() API in peripherals in order to
get desired clock rate.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-12-11 08:00:03 +01:00
Jilay Pandya
db43d2c4c1 drivers: led: is31fl3194.c fix uninitialized scalar variable
in the switch case in the preceeding for loop if default path is taken
all the time, then the ret variable will stay uninitialized, the original
contributor of this driver has provided a comment that this path shall
never be reached, however, it is better to return an error code instead
of continuing with an incorrect configuration, hence this commit replaces
continue with a proper return errno.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-11 07:59:41 +01:00
Pisit Sawangvonganan
23b6ab4699 bluetooth: shell: code formatting cleanup in host/shell
Re-ran `clang-format` for consistent styling, simplified
multi-line statements, and consolidated string concatenations
where applicable.
This is a non-functional change focused on code formatting.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-11 07:59:30 +01:00
Haiyue Wang
bb6856606c dts: bindings: memc: stm32: correct the SDRAM base address description
Catch the DTS warning by copying the SDRAM node in description:

 unit address and first address in 'reg' (0xc000000) don't match for
 /sdram@c0000000

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2024-12-11 07:59:17 +01:00
Jilay Pandya
87468a25dd docs: release notes: 4.1 add adi tmc2209 to release notes
added support for adi tmc2209, added common functions for step dir
stepper drivers

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-11 07:59:06 +01:00
Yishai Jaffe
9c60bcb19a gpio: shell: use new shell_device_get_binding function
Use shell_device_get_binding() to minimize code.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-11 07:58:50 +01:00
Yishai Jaffe
59c7d5715b shell: add function to get device by name or label
Added shell_device_get_binding() that wraps device_get_binding() plus
device_get_by_dt_nodelabel() so that a shell can easily get a device by
its full name or label.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-11 07:58:50 +01:00
Jilay Pandya
d5ae99a551 drivers: stepper: step_dir: rename direction_gpios to dir_gpios
for the brevity renaming direction_gpios to dir_gpios since STEP/DIR
interface is quite an established term in context of stepper controllers.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-11 07:58:34 +01:00
Jilay Pandya
5a2c6bf66c drivers: stepper: adi: tmc2209 allow instantiation of tmc2209 without msx
The current implementation of tmc2209 driver does not allow instantiation
of the driver without configuring msx pins.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-11 07:58:34 +01:00
Jordan Yates
a1ad0ad6c6 sdhc: spi: wait for VDD stable before clocking
The SD physical layer specification requires that the operating supply
be stable for at least 1 millisecond before providing the required 74
clocks. The maximum VDD ramp time is specified at 35ms, giving a total
minimum delay of 36ms.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-11 07:58:17 +01:00
Jordan Yates
a16bfb39ff sdhc: spi: power card before 74 clock signals
Power on the SD card before sending the required 74 clock signals.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-11 07:58:17 +01:00
Lucien Zhao
017cb3a316 dts: arm: nxp: add prescaler parameter in dts
prescaler parameter had been set to required true, add
this parameter to resolve the building issues.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-11 07:57:50 +01:00
Maochen Wang
b5db5615f3 boards: nxp: Update board documentation of RW612
Add information about Wi-Fi.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-11 07:57:38 +01:00
Benjamin Cabé
1441436a92 samples: echo_server: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-11 07:57:06 +01:00
Armin Kessler
1baf93b1d1 drivers: video: Add timeout tovideo_buffer_alloc
This PR fixes a blocking call to video_buffer_alloc in case of memory
shortage by addign a timeout parameter to the API.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-12-10 20:39:57 +01:00
Luca Burelli
adaa87a69d llext: enlarge test coverage
There is no reason the syscall tests should not be perfomed on
relocatable builds. This made some test runs pass even though
issues were present in those configurations.

Remove the build gate.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-10 20:38:48 +01:00
Luca Burelli
78ae035f89 llext: fix link order for weak syscall symbols
The weak syscall symbols generated by gen_syscalls.py are currently
compiled in the LLEXT subsystem library, which is then linked among all
other Zephyr libraries in an unspecified order. This can cause the weak
symbols to override the actual syscall implementations, leading to
undefined behaviour.

To fix this, the currently generated file is split in two elements:

- syscall_exports_llext.c contains the EXPORT_SYMBOL directives for all
  syscalls. This part can be compiled with the LLEXT library and linked
  among all other Zephyr libraries, and ensures all syscalls symbols
  are preserved by the linker.

- syscall_weakdefs_llext.c contains the weak definitions for all syscalls.
  This file is compiled in a separate library that is linked last, so
  that the weak symbols are only used if no other implementation is
  available.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-10 20:38:48 +01:00
Lyle Zhu
bb417dad1c Bluetooth: SDP: Notify result if error rsp is received.
In current implementation, the SDP response packet will be ignored if
the operation code is `BT_SDP_ERROR_RSP`. And the SDP transaction
request is done, but the application is not notified. And the pending
SDP transaction cannot be processed.

Notify application with empty buffer if the operation code is
`BT_SDP_ERROR_RSP`. And process the pending SDP transaction.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-10 20:38:30 +01:00
Lyle Zhu
f279f61551 Bluetooth: SDP: Correct record length of service att rsp
The discovered SDP record of service attribute transaction response
cannot notified correctly. There is an error returned from function
`get_record_len()`.

For service attribute transaction response, only one attribute list
is returned. So the total record length is the buffer length. Return
buffer length directly from `get_record_len()` to fix the issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-10 20:38:20 +01:00
Jilay Pandya
1d7826c2ad bluetooth: host: conn.c fix Constant variable guards dead code issue
This commit replaces the assignment of IS_ENABLED(x) macros to
various variables with direct condition checking. This should fix the
coverity issue and also promotes more uniformity in code.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-10 20:38:12 +01:00
Krzysztof Chruściński
d1bd45739a logging: frontends: stmesp: Move zephyr_custom_log.h to the unique path
Logging with STMESP frontend is using custom logging header feature.
Put that specific header file in a custom path which is added to the
build only if that logging frontend is used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 20:37:22 +01:00
Axel Le Bourhis
9fb546f85e samples: echo_client: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 20:37:03 +01:00
Matt Rodgers
6ebac0bd4e samples: http_server: document process to use HTTP/2 with web browser
Using HTTP/2 to communicate with the sample application using a web
browser requires some additional steps. Add documentation describing
this to the sample README file.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
f9b685d3fe samples: http_server: add option to use ALPN for HTTP2 support
Add application level Kconfig option to enable ALPN usage for
negotiating HTTP/2 connection with web browsers.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00