Commit graph

89225 commits

Author SHA1 Message Date
Anisetti Avinash Krishna 53b717edd6 drivers: i2c: i2c_dw: update DMA node access in I2C dw
Update DMA node access from paren-node to dmas property in dts instance.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-22 09:52:59 +01:00
Anisetti Avinash Krishna a0ce427848 drivers: dma: intel_lpss: enable reload API for 32bit DMA address
Enable dma_reload API for DMA 32bit address transfer.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-22 09:52:59 +01:00
Anisetti Avinash Krishna 096635b212 drivers: dma: intel_lpss: update LPSS DMA init interface
Update LPSS DMA init interface which is common and
independent of parent-node.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-22 09:52:59 +01:00
TOKITA Hiroshi 2f2d8143f4 dt-bindings: interrupt-controller: ra-icu: Correct event numbers
The 64 is a missing entry in this event number table.
All after the 64th entry have shifted one before.

https://www.renesas.com/jp/ja/document/mah/renesas-ra4m1-group-users-manual-hardware?r=1054146#G17.2544398

I corrected the after of the 64th entry to the correct number.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-12-22 09:52:50 +01:00
TOKITA Hiroshi 4dde6dc0f1 dts: arm: renesas: ra: Enable built-in clock by default
The hoco, moco, and loco are always available.
Enable these by default.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-12-22 09:52:50 +01:00
TOKITA Hiroshi 32276bc2c1 drivers: clock_control: ra: fix initialization of the clock_hw_cycles
We should set the z_clock_hw_cycles_per_sec as the value of
the system clock frequency.

There was a mistake in referencing the clock source set before
initialization.
I corrected it to reflect the clock value after initialization.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-12-22 09:52:50 +01:00
Najumon B.A c146833fc8 drivers: pcie: fix for mmio size region calculation
I/O or memory decoding should be disabled via the command register
before sizing BAR for calculation MMIO size

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-12-22 09:52:40 +01:00
Jonas Woerner 2842f206eb Bluetooth: Host: add hci error to errno translation for INVALID_PARAM
now returns -EINVAL if invalid parameters a are supplied

Signed-off-by: Jonas Woerner <github@bolake.de>
2023-12-22 09:52:29 +01:00
Henrik Brix Andersen 6d5d06689b drivers: can: native_linux: leave room for null termination of string
Only copy up to IFNAMSIZ - 1 number of characters of the interface name to
leave room for null termination of string.

Fixes: #66777

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-22 09:49:39 +01:00
Henrik Brix Andersen c067f4d263 drivers: can: native_linux: add missing return value check
Check return value from linux_socketcan_set_mode_fd() function call.

Fixes: #66798

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-22 09:49:39 +01:00
Manuel Aebischer 8cf199fb04 drivers: usb_dc_rpi_pico: previosuly used endpoint may remain locked
When reconfiguring a previously used endpoint, it may still be locked
when a write was taking place when e.g. the host application crashed.
The call to udc_rpi_cancel_endpoint seems to do a proper cleanup of
the endpoint, i.e. the write semaphore will be released.
Fixes #66723.

Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
2023-12-21 17:18:49 +00:00
Magdalena Kasenberg e05d964b46 bluetooth: audio: broadcast: Fix missing update of meta_len
The length of the updated metadata was not updated.
Fixes the CAP/INI/BST/BV-13-C test case.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-12-21 17:18:09 +00:00
Marc-Antoine Riou 8e1bc2b058 samples: ipc: Update openamp rsc table documentation
This change follow the recent commit that update openamp rsc table logs.
Add the logs for both samples sample client & TTY responder,
as well as for both sides Linux & Zephyr.
Remove the serial connection to Zephyr because it is board specific.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Marc-Antoine Riou 71138d4001 samples: ipc: Add logs in openamp rsc table loops
Add logs in both of the openamp rsc table loops to stick with
what is shown in Zephyr documentation. Prefix each message with the loop
name and unify logs with those from rpmsg_client_sample module.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Marc-Antoine Riou d470f464eb samples: ipc: Fix length of message to send in openamp rsc table sample
Sample openamp_rsc_table was sending too many characters to master.
It was displayed as unrecognised character when reading message on master.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Aaron Ye 5f83c3fe4d dts: arm: ambiq: Use DT_FREQ macro for frequency configuration.
This commit updates the Ambiq Apollo4x series soc clock frequency
of defined instances to align with context of these dts files.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2023-12-21 17:17:11 +00:00
Aaron Ye 6c4751220a boards: arm: apollo4p_evb: Update the support feature.
This commit updates the support features in document and yaml files
of Ambiq apollo4p_evb and apollo4p_blue_kxr_evb.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2023-12-21 17:17:11 +00:00
Fabio Baltieri 8c83185f6e tests: add an kbd_matrix test suite
Add an initial test suite for the keyboard scanning input library.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-21 10:12:33 +00:00
Fabio Baltieri 978b0bb5ea tests: input: add a gpio-kbd-matrix test suite
Add an initial test suite for the gpio-kbd-matrix driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-21 10:12:17 +00:00
Benjamin Cabé 109c53dae8 doc: kconfig: redirect: Add redirects for some old URLs
Documentation pages around Kconfig have moved around on a couple of
occasions in the past [1] [2] and current redirects were dysfonctional
(leading /) and incomplete, while an entire set of redirects was also
missing. This notably fixes the "browse latest development version of
this page" link on
https://docs.zephyrproject.org/2.7.5/guides/build/kconfig/tips.html or a
link to the "Kconfig tips" page as found in Kconfiglib's current README
(https://pypi.org/project/kconfiglib/)

[1] commit 5342bc64dd [2] commit
5c88418428

Fixes #66701

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-21 10:02:58 +00:00
Benedikt Schmidt 4c731f27c6 shell: modules: do not use k_thread_foreach with shell callbacks
Always use k_thread_foreach_unlocked with callbacks which print
something out to the shell, as they might call arch_irq_unlock.
Fixes #66660.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-12-21 10:01:08 +00:00
Benjamin Cabé ed5352ffce coc: Update Code of Conduct to latest Contributor Covenant
As per the changelog of the Contributor Covenant between versions 1.4
and 2.1, the main changes are:

2.0
- Emphasizes 'community' over 'project' scope, effectively merging the
  Community Covenant into the Contributor Covenant
- Adds expectation about accepting responsibility and apologizing to
  those affected by mistakes, and learning from the experience to the
  list
- Adds sexual attention and advances of any kind as unacceptable
  behavior example
- Moves enforcement responsibilities from project maintainers to
  community leaders
- Adds responsibility to communicate reasons for moderation decisions
  when removing, editing, or rejecting contributions not aligned to the
  Code of Conduct
- Requires community leaders to respect privacy and security of the
  reporter of any incident, not just confidentiality
- Provides a template for code of conduct enforcement

2.1
- Adds 'caste' and 'color' to the preamble

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-21 09:38:23 +00:00
Erwan Gouriou 098df08bbc drivers: bluetooth: stm32wba: Configure flash manager
Configure flash manager at BLE init.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:19:24 +01:00
Erwan Gouriou c81e2ff68a boards: nucleo_wba52cg: Add a user flash partition
This partition could be used by application.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:19:24 +01:00
Erwan Gouriou f6555aa95e drivers: flash: stm32wba: Use STM32WBA Flash manager for RF coexistence
When Bluetooth is enabled, it is required to arbitrate flash accesses
between RF and write accesses (for user activity).
A dedicated flash manager is provided as part of STM32WBA BLE lib.

Implement a dedicated driver using FM Apis to handle RF activity.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:19:24 +01:00
Erwan Gouriou 7c09139d6f west.yml: Use STM32WBA BLE lib with Flash manager
Flash coexistence facility is provided by a dedicated BLE controller
driver added in hal_stm32 WBA lib.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:19:24 +01:00
Erwan Gouriou 2908458554 soc: stm32wba: hci_if: Implement HW_RNG_EnableClock API
STM32WBA controller uses a PKA driver to perform cyphering operations
on keys. Since PKA hardware block requires RNG clock to be enabled, a
synchronization with zephyr RNG driver is needed.

Use RNG enable status to check if RNG could be switched off or needs to
be switched on.
Similarly in entropy driver, don't cut RNG clock if PKA is enabled.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:18:53 +01:00
Anas Nashif 0175f9627b ci: codecov: increase stack size for tests
Increase stack size for tests and exclude nono libc scenarios causing
some issues with coverage collection.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-21 09:18:44 +01:00
Anas Nashif 2b43582236 tests: add a tag for nano libc tests
tag nano libc tests with nano so we can exclude them if needed. Now they
cause issues when collecting coverage information from tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-21 09:18:44 +01:00
Anas Nashif 8bfa8556b0 ci: codecov: add mps2_an385 as a coverage platform
Add one more ARM based platform to get more code coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-21 09:18:44 +01:00
Anas Nashif 05315ea6af kernel: fatal: remove LCOV exclusion
line is already excluded as part of the function.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-21 09:18:44 +01:00
Anas Nashif f772bd1106 ci: codecov: use gcovr and upload cobertura style file
Use gcovr to generate reports and upload cobertura style file instead of
previously lcov info file.

We have been seeing issues with lcov format and code being reporting as
not covered although by inspecting the generate output files, they
should be.

The XML format we generate is otherwise easier to parse and deal with.

Also reduce frequency to twice a day.

Fixes #66656

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-21 09:18:44 +01:00
Jordan Yates 1ef0ec55c9 net: ip: dhcpv4: remove address on interface down
Any received address is no longer valid once the interface goes down.
Leaving the address assigned results in the L4 interface transitioning
through the following on reconnection:
 UP: Interface is connected
 DOWN: Old address is removed by DHCP
 UP: New address is re-added by DHCP

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-12-21 09:18:32 +01:00
Jordan Yates 434c93ddfb net: conn_mgr: output events as hex
Networking events are masks of bits, which are almost impossible to read
as decimal, and trivial to read as hex. Also unifies the format string
across multiple outputs for some flash savings.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-12-21 09:18:32 +01:00
Jukka Rissanen 19392a6d2b net: ipv4: Drop packet if source address is my address
If we receive a packet where the source address is our own
address, then we should drop it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-21 09:18:24 +01:00
Jukka Rissanen 6d41e68352 net: ipv4: Check localhost for incoming packet
If we receive a packet from non localhost interface, then
drop it if either source or destination address is a localhost
address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-21 09:18:24 +01:00
Aleksander Wasaznik 700f640948 Bluetooth: ATT: Reject read-by-uuid rsp outside range
A bad peer responding to read-by-uuid can return handles outside the
requested range. This confuses the stack. In particular, the "continue"
and "end" logic in the same function relies on this assumption.

This bad peer was a real issue at UPF, and it caused an infinite loop
during discovery.

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

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-12-21 09:18:14 +01:00
Fabio Baltieri c0e6629b7b input: npcx_kbd: setup the interrupt to falling edge only
The driver works on active low signals only, change the interrupt
configuration to trigger on falling edges only.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-20 18:07:43 +00:00
Daniel Leung a7dccc4475 kernel: mmu: mitigate range check overflow issue
It is possible that address + size will overflow the available
address space and the pointer wraps around back to zero. Some
of these have been fixed in previous commits. This fixes
the remaining ones with regard to Z_PHYS_RAM_START/_END,
and Z_VIRT_RAM_START/_END.

Fixes #65542

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-20 11:37:17 -05:00
Grzegorz Chwierut e9aa3e36a9 twister: second fix for hardware map detection
When scanning ports the manufacture field is not always
filled. It must be checked before using.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-12-20 10:19:19 -05:00
Lars Knudsen 95f8c2666a samples: WebUSB: Fix MS OS 2.0 descriptor
The sample did not correctly select the WinUSB
driver for the WebUSB interface as required
on Windows when CDC ACM was included in the
build configuration (the case for e.g. nRF52840
Dongle).

Introduce correct function subset header in the
MS OS 2.0 descriptor.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2023-12-20 14:35:35 +00:00
Christopher Friedt dbd4b82f1c doc: posix: support pthread_getguardsize pthread_setguardsize
Mark pthread_getguardsize() and pthread_getguardsize() as
supported.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Christopher Friedt 5c78c66fc2 tests: posix: headers: check for pthread get / set guardsize
Add checks to ensure that pthread_getguardsize() and
pthread_setguardsize() are callable.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Christopher Friedt 5e245bd42e tests: posix: tests for pthread_getguardsize() pthread_setguardsize()
Add tests for pthread_getguardsize() and pthread_setguardsize().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Christopher Friedt a7d2c5cb32 posix: implement pthread_getguardsize() pthread_setguardsize()
Implement pthread_getguardsize() and pthread_setguardsize().

pthread_getguardsize() and pthread_setguardsize() are required
by the POSIX_THREADS_EXT Option Group as detailed in Section
E.1 of IEEE-1003.1-2017. However, they were formerly part of
XSI_THREADS_EXT.

The XSI_THREADS_EXT Option Group was required for PSE51, PSE52,
PSE53, and PSE54 conformance.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Christopher Friedt eb7e4bed98 posix: pthread_attr: use space in struct more efficiently
This change reduces the space occupied by struct pthread_attr
which is the internal type used for pthread_attr_t.

We cap the stack size at 16 bits (so up to 65536 bytes) and
since a stack size of 0 is invalid, we can encode the stack
size by simply subtracting 1 or adding 1 when setting or
getting.

The schedpolicy is capped at 2 bits and initialized,
cancellable, and detached are given 1 bit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Christopher Friedt 746a3b943d tests: posix: use consistent min stack sizes
* Use PTHREAD_STACK_MIN as provided by the specification
  instead of a hard-coded value of 1024
* add extra stack size to semaphore tests

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-20 14:20:58 +00:00
Sylvio Alves ecda72079e esp32: overlays: remove unused dt-binding headers
All overlay headers are not necessary to be included.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-12-20 14:17:49 +00:00
Sylvio Alves 2f2ee91947 pinctrl: esp32: move files from hal_espressif to main
ESP32 family pinctrl files are currently placed in hal_espressif.
Move to main branch as part of pinctrl dt-bindings.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-12-20 14:17:49 +00:00
Yong Cong Sin d1f3f863f1 soc/xtensa/intel_adsp: fix interrupts typo
Hex should be `0x` instead of `0X`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-20 09:16:45 -05:00