Commit graph

15409 commits

Author SHA1 Message Date
Yonatan Schachter
fd68fc486c bindesc: Add maximum data size and assertion
Add a Kconfig symbol to limit the maximum size of a descriptor's
data, enforced by a build assertion.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yangbo Lu
85501c5414 include: arm: arm_mpu_v8: support memory attribute for device for Cortex-M
Supported memory attribute for device for Cortex-M.
Not sure why such code was conditional compile for only Cortex-R,
but Cortex-M also suited.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-11 13:18:21 -04:00
Sudan Landge
8bdd45be47 arch: arm: cortex_a_r: smp: minor fix for non cache coherent cores
What is changed?
1. Updated the data sync barrier to make sure the other parameters of
   `arm_cpu_boot_params` are updated before updating its member `mpidr`
2. Updated the MPIDR affinity level mask to account for affinity level
   1 and 2 along with level 0.

Why do we need this change?
1. As reported in issue #76182, on Cortex_A_R, the current code
   execution fails to consider the correct sequence of data sync
   barrier and cache maintenece for the code to work on non cache
   coherent cores in SMP enabled mode.
   The secondary cores are waiting in a loop for primary core to set
   `arm_cpu_boot_params.mpidr`. As soon as primary core set this,
    the secondary cores start reading other parameters from the
   `arm_cpu_boot_params` however, the existing position of DSB
   instruction doesn't guarantee that `arg`, `cpu_num` and other
   parameters of `arm_cpu_boot_params` would be updated before `mpidr`
   is udpated and this could lead to a unpredicatble behaviour so,
   we need to move the DSB instruction.
2. The affinity level mask is updated because it didn't account for
   level 1 to identify individual cores within a cluster and
   level 2 to identify different clusters within the system which can
   lead to an incorrect conversion between mpidr to core-id.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
Duy Phuong Hoang. Nguyen
59dbbb347d drivers: pwm: Initial support for PWM driver on RA8
Add PWM driver code support for RA8. This support is using
GPT HW

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-10-11 09:28:29 +02:00
Laurentiu Mihalcea
6b6443f11f include: dt-bindings: power: add IMX SCU resource header
Add header file containing definitions of IDs for all resources
managed by NXP's SCU.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Phi Bang Nguyen
6acad9bd91 include: drivers: video: Remove unused video-controls header
Remove the unnecessary video-controls header included in video.h.
Drivers, applications should explicitly include it when needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-11 09:27:38 +02:00
Phi Bang Nguyen
d29ef14bcf include: drivers: video: Run clang-format
Run clang format before making changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-11 09:27:38 +02:00
Bjarki Arge Andreasen
2fbe105a47 drivers: comparator: add fake comparator
Add fake comparator driver and bindings for use with testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
d37f844104 drivers: comparator: add mcux acmp device driver
Add mcux SDK based kinetis acmp device driver implementing the
comparator device driver API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
04e70ab96c drivers: comparator: add nRF LPCOMP device driver
Add nRF LPCOMP device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
4adc92475d drivers: comparator: Add nRF COMP device driver
Add nRF COMP device driver and remove deprecated bindings from
dts/bindings/sensor.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
00cefa15ff drivers: Add comparator API
Add comparator API header.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Lars Knudsen
405492f009 Bluetooth: Audio: Shell: Fix BIS sync bit field validity check
NO PREF (0xFFFFFFFF) and BIT(0) was wrongly rejected.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-10 20:22:39 -04:00
Lars Knudsen
7f1589e23b Bluetooth: ISO: Add ISO BIS bitfield check macro
Checks validity of ISO BIS bitfield (BIT(0)|...|BIT(30))

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-10 20:22:39 -04:00
Ryan McClelland
f2d549d55b drivers: i3c: cdns: fixup attachment and addr assignment for daa
The ENTDAA does not have a way to assign DA that are with a PID. It will
assign DAs that were in it's RRs in the order that they win arbitration.
Assign only available addresses in to it's RRs before ENTDAA.

Cleanup the attach api to no longer require a addr argument and remove
the helper function `i3c_determine_default_addr`. This now looks at if
it has a static address or if it already has a dynamic address (such as
from DEFTGTS) and will register the address if either exist with
precidence of dynamic addr over static addr.

This also fixes up the look up for if a device already has a dynamic
addr to find which pos of the RRs is it is in.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-10 20:22:01 -04:00
Maochen Wang
9487952a4f net: fix build error in DPP struct
Fix build error in DPP struct when building Matter over Wi-Fi.
The struct declaration must be done outside of the anonymous union.
Only struct definition can be done inside the anonymous union.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-10 14:58:44 -04:00
Jordan Yates
e45ab126ea zbus: optional publishing statistics
Add optional statistics around the channel publishing action. Store the
time a channel was last published to, and a total publish count.

This information can be used to determine how old a given channels data
is, and an average channel publishing frequency.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 14:57:13 -04:00
Phi Bang Nguyen
ecd4c43026 drivers: video-controls: Rename colorbar to test pattern
Color bar is one type of test patterns. Rename it to
VIDEO_CID_CAMERA_TEST_PATTERN to be more generic.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
6007fb5c33 drivers: video-controls: Add some control IDs
Add some control IDs:

- VIDEO_CID_CAMERA_HUE
- VIDEO_CID_POWER_LINE_FREQUENCY
- VIDEO_CID_PIXEL_RATE which is needed for changing frame rate

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
ae87d53ac5 drivers: video-controls: Run clang-format
Run clang format before making any changes.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Nithin Ramesh Myliattil
de14efef98 Bluetooth: BASS: add scan cb to scan delegator module.
Add scan cb to scan delegator so that Application
can be notified  when assistant starts or stops
scanning.
Also state information of Broadcast Assistant
is removed as info is not used.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-10-10 10:06:43 +02:00
Krzysztof Chruściński
df683fd7f8 logging: log_output: Move flushing and writing to the header
Move log_output_flush and log_output_write (renamed internal
buffer_write() function) to the header as inline functions.
Those function are used by log_output_dict.c and there are cases
when log_output.c is not compiled in.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-09 18:37:49 +01:00
Robert Lubos
f4335d22ca net: if: Don't require native IP stack support for IPv6 lookups
IPv6 based interface lookups doesn't require native IP stack support,
hence reflect that in the API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-09 18:37:30 +01:00
Jilay Pandya
52c6a289f1 drivers: stepper: adi: trinamic tmc5041
This commit introduces initial structure for trinamic drivers
TMC5041 is implemented with following features:
- StallGuard
- RAMPSTAT_POLL
- RAMP_GEN

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-09 18:24:08 +01:00
Fin Maaß
d28c0cf08c mgmt: hawkbit: move HAWKBIT_JSON_URL
move HAWKBIT_JSON_URL out of the header.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
94bad9d9ac mgmt: hawkbit: seperate header files
seperate the hawkbit header files, to make
it clearer.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
dce3d2de66 mgmt: hawkbit: seperate autohandler
seperate the autohandler from the main
hawkbit source. This way the autohandler can
be disabled if it is not needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
621cf5baec mgmt: hawkbit: get poll interval
Add function to get the poll interval.
This is needed to seperate the autohandler
from the main hawkbit code.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
421ab502e4 mgmt: hawkbit: delay autohandler
Be able to delay the next run of
the hawkbit autohandler.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
6cc2bb53b4 mgmt: hawkbit: add hawkbit_autohandler_wait
Add hawkbit_autohandler_wait() to be able
to wait for the autohandler to finish.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
cf5f6aad23 mgmt: hawkbit: add option for autohandler
add option for autohandler to only run once.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Jordan Yates
4953389b1e net: socket_service: remove work_q parameter
Remove the `work_q` parameter from `NET_SOCKET_SERVICE_SYNC_DEFINE` and
`NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC` as this feature was dropped
during review but the removal was not 100% complete.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-09 13:48:54 +02:00
Pisit Sawangvonganan
ec5354cd80 lib: crc: add crc8_rohc for CRC-8/ROHC variant calculation
This commit introduces the `crc8_rohc` function to the CRC library,
implementing the CRC-8/ROHC (RObust Header Compression) variant.
This algorithm is widely used in networking protocols, which is commonly
found in modem subsystems.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-09 09:48:00 +02:00
Emil Gydesen
e7e7386352 Bluetooth: BAP: Modify unicast client callbacks to slist
Modify the BAP unicast client callback structure to be a
linked list. The purpose of this is to have multiple listeners
of the unicast client changes and notifications.
This is needed for the CAP initiatior.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-09 09:42:30 +02:00
Yong Cong Sin
65fb61bc68 drivers: intc: plic: implement software-generated interrupt
Implement `riscv_plic_irq_set_pending()` to trigger a
software-generated interrupt.

The "4. Interrupt Pending Bits" of the riscv-plic specs
described the reading of the pending bits, but not the writing

Since not all PLIC implementations support software-generated
interrupt, the function is compiled only when
`CONFIG_PLIC_SUPPORTS_SOFT_INTERRUPT` is enabled on PLIC that
supports it, such as the Andes' NCEPLIC100.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-09 09:41:50 +02:00
Benjamin Lemouzy
9f60075d14 jwt: remove jwt_payload_len function
The function jwt_payload_len doesn't return payload length but returns
used data in builder->buf

If jwt_payload_len is called after jwt_init_builder, header length will
be returned
If jwt_payload_len is called after jwt_add_payload, header+payload
length will be returned
If jwt_payload_len is called after jwt_sign, header+payload+sign length
will be returned

So, this commit removes the function and uses strlen instead

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-10-08 18:10:41 -04:00
Jukka Rissanen
4b83b2346f hostap: Use proper value when generating supplicant event
The previous NET_EVENT_SUPPLICANT_CMD_INT_EVENT is from
"enum net_event_supplicant_cmd" but the supplicant_send_wifi_mgmt_event()
has the event parameter as an "enum net_event_wifi_cmd" and those event
number spaces are different.

This meant that the wrong event value NET_EVENT_SUPPLICANT_CMD_INT_EVENT
maps to NET_EVENT_WIFI_CMD_TWT (from "enum net_event_wifi_cmd") which
fortunately did not cause issue in this case because the
supplicant_send_wifi_mgmt_event() has no handling for this TWT event value.

It is important we fix this as this can cause great confusion in the
future.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-08 18:17:42 +01:00
Robert Lubos
c6498bb68d net: ipv6: Make Multicast Listener Discovery API public
IPv6 MLD API was so far defined in an internal header. This does not
seem correct though, as application code should be able to join/leave
multicast groups, hence the API should be exposed in a public header,
just as it is done for its IPv4 countepart - IGMP.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 17:00:06 +02:00
Luca Burelli
11c350e2e6 llext: fix handling of unimplemented syscalls
When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.

This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.

This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.

The test for this functionality is also updated to reflect the change.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-08 16:59:50 +02:00
Krzysztof Chruściński
8fc0aba4ae logging: Add log_source_id helper function
There are many places where source_id is retrieved and it
depends on runtime filtering being enabled. So far it was
all exposed but lets encapsulate that into a helper function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-08 16:57:59 +02:00
Aleksander Wasaznik
8cfad44852 Bluetooth: Deprecate adv auto-resume
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/72567

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-08 16:57:01 +02:00
Chris Friedt
ced4e16235 drivers: flash: provide a generic flash_copy() algorithm
Provide a generic flash_copy() algorithm that is capable of
copying from one flash device to another or within different
regions of the same flash device.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
TOKITA Hiroshi
0f80f993f9 drivers: clock_control: renesas_ra: Adding macros to convert DT values
Adding the macros `RA_CGC_CLK_SRC` and `RA_CGC_CLK_DIV` that derive
the BSP clock settings from the DeviceTree node settings.
I also define some aliases to fill in the gaps with the BSP
naming conventions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
767d1ce5f6 devicetree: Adding UNQUOTED, TOKEN, and UPPERTOKEN variants of FULL_NAME
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
Adrian Friedli
98289e594d net: lib: coap: make ACK random factor runtime configurable
Extend the `coap_transmission_parameters` struct with the field
`ack_random_percent`. This was the last remaining CoAP transmission
parameter that was not configurable at runtime.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-10-08 06:00:56 -04:00
Pisit Sawangvonganan
a378440116 drivers: intc: stm32: correct inconsistent parameter names
Correct several inconsistent parameter names in the following functions:
- stm32_gpio_intc_select_line_trigger: rename `trigger` to `trg`
  to match the header file.
- stm32_gpio_intc_set_irq_callback: rename the callback argument to `user`
  to match the `stm32_gpio_irq_cb_t` type.
- stm32_exti_get_line_src_port: rename `pin` to `line` to align with
  the Doxygen comment and implementation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 17:12:34 +01:00
Chaitanya Tata
1da74ef705 net: wifi: Fix DPP disabled build
In case WPA supplicant disabled DPP, we need to compile out the
corresponding DPP code in Wi-Fi shell too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:16 +01:00
Guillaume Gautier
b27e36242b include: zephyr: dt-bindings: clock: st: add bus source clocks
Add missing bus source clocks define for STM32H5, L1, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Marcel Krüger
38c9a74099 kernel.h: Fix k_msgq_get retval doxygen
Added a hint about -ENOMSG being returned when the
queue is purged.

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2024-10-06 20:51:18 +01:00
Rex Chen
82ec1d7862 net: wifi: shell: add wps support
Add wps pin and wps pbc L2 layer cmd support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-05 14:07:48 -04:00