Commit graph

89004 commits

Author SHA1 Message Date
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
Carles Cufi d053b8bf3b doc: Rename stable API change to breaking change
It is often confusing for users and developers alike to see the sentence
"stable API change" in a label or in the release notes. Stable APIs can
change in at least two ways (retaining compatibility or not), and so it
is preferrable to use a term that clearly describes the change as
incompatible, by using the common term "breaking".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-12-20 09:12:44 -05:00
Anisetti Avinash Krishna a6fda00254 drivers: spi: pw: Fix SPI Receive FIFO set
Fixes SPI Receive FIFO register set operation.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-20 11:58:56 +00:00
Seppo Takalo 6161fbdf21 net: lwm2m: Transmission state indications
Allow engine to give hints about ongoing CoAP transmissions.
This information can be used to control various power saving
modes for network interfaces. For example cellular networks might
support release assist indicator.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-20 11:57:48 +00:00
Seppo Takalo 0d650ffd26 net: lwm2m: Update TX timestamp on zsock_send()
In slow networks, like Nb-IOT, when using queue mode,
there might be significant delay between the time we
put the packet into a transmission queue and the time
we actually start transmitting.
This might cause QUEUE_RX_OFF state to be triggered earlier
than expected. Remedy the issue by updating the timestamp on the
moment where packet is accepted by zsock_send().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-20 11:57:48 +00:00
Seppo Takalo 01568b573a net: coap: Add API to count number of pending requests
Add coap_pendings_count() that return number of waiting
requests on the pendings array.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-20 11:57:48 +00:00
Anas Nashif a4356da484 ci: version_mgr: minor cleanups
- store downloaded version file in a temporary file.
- list weekly builds

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-20 11:57:36 +00:00
William Leara 12c51f8937 style: fix misspelling in "precededs"
Should be "precedes".

Signed-off-by: William Leara <william.leara@dell.com>
2023-12-20 11:55:46 +00:00
Erwan Gouriou b17b496ec7 boards: nucleo_wba52cg: Enable HSI16 clock
By default rng source is using HSI16 clock.
It has to be enabled on as part of board support.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-20 11:12:39 +00:00
Anders Storrø 7d373c7c28 Bluetooth: Mesh: Fix broken proxy adv test
Relaxes test requirements for proxy_adv_multi_subnet_coex
to resolve failing test on CI.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-12-20 11:48:18 +01:00
Ren Chen 5762d022dc drivers: usb: usb_dc_it82xx2: optimize the basic/extend endpoints control
This commit refactors the basic and extended endpoint control functions to
enhance readability.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen 40fa61213e drivers: usb: usb_dc_it81xx2: refactor transaction complete isr function
This commit refactor transaction complete callback function.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen 5846412167 drivers: usb: usb_dc_it82xx2: correct the extend endpoint control
There are some issues with the extended endpoint settings. The incorrect
setting leads to the chip being unable to respond with NAK when the host
polls the extended endpoint for data transfers. Additionally, the controls
for the extended endpoint's ISO and PID data sequence are also incorrect.
This commit addresses these issues to properly support extended endpoint
transactions.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen d6cc083c2c drivers: usb: usb_dc_it82xx2: usb driver cleanup
Cleans up the it82xx2 usb driver.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen 1c48b77ffa drivers: usb: usb_dc_it82xx2: remove unused code and debug msg
This change remove unused code and debug messages.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen 13788d4649 drivers: usb: usb_dc_it82xx2: correct the FIFO control
There are two registers that control the selection of one FIFO as data
buffer for 15 endpoints (ep1-ep15). Both registers should be configured
before sending and receiving data. Additionally, there was an issue with
the corresponding FIFO index setting in the 'usb_dc_ep_read_continue'
function, which has been addressed in this commit.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen e23ae3b678 drivers: usb: usb_dc_it82xx2: refactor usb driver with macros
Refactor the code using macros to enhance readability.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Laurentiu Mihalcea 52deadd420 clock_control: imx_ccm: Add support for i.MX93's SAI clocks
This commit introduces support for querying
i.MX93's SAI clocks.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-20 11:15:13 +01:00
Laurentiu Mihalcea fe64d840cc drivers: dai: Add driver for NXP's SAI
This commit introduces a new DAI driver used for NXP'S SAI IP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-20 11:15:13 +01:00
Laurentiu Mihalcea 897897970b include: dai.h: Add definitions for parsing dai_config's format field
This commit introduces some macros and enums which can
be used to parse struct dai_config's format field. This is
required by the SAI driver since it uses dai_config's format
field to select the protocol, clock configuration and clock
inversion. This is added to the dai.h header to avoid having
to define these macros/enums in each of the DAI drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-20 11:15:13 +01:00
Laurentiu Mihalcea f4eb77f76b manifest: Bump up hal_nxp revision
Bump up hal_nxp revision to contain the latest SAI-related
changes from NXP HAL side.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-12-20 11:15:13 +01:00
TOKITA Hiroshi 2b24a5c90c modules: hal_rpi_pico: Remove unused drivers
Remove drivers that not been referenced.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00