Commit graph

87781 commits

Author SHA1 Message Date
Benjamin Cabé e4993fcc5b drivers: spi: doc: Doxygen cleanup
- Fixed a few improperly formatted struct
- Marked some mask definitions as internal when macros abstracting them
 out already exist
- Fixed a few code blocks to add proper syntax highlightingy

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 12:17:26 +00:00
Benjamin Cabé 06e8d01e93 drivers: led: Fix doxygen comments for led_info struct
Fixed improperly commented struct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 12:17:17 +00:00
Tim Woolliscroft 65068fb4df drivers: i2c: stm32: Fix routing of secondary target address
Fixes the routing of the events associated with a secondary
i2c target address being routed to the primary config. The
i2c_target_config/slave_cfg was being selected from the
driver address match but then over written by the primary.
This change fully implements the if/else of 10bit addressing
and includes a assert if the slave_cfg is NULL, and explains
why dual 10bit addresses on STM32 won't work.

Signed-off-by: Tim Woolliscroft <tim@opteran.com>
2023-11-27 12:16:58 +00:00
Mariusz Skamra b373079275 Bluetooth: audio: ascs: Remove spurious error message
This removes spurious error message printed when CIS has been
disconnected and it was not used by any of the endpoints.
This case is valid and may happen on Connection Timeout when the
controller reports ACL Disconnection first.
When the CIS Disconnection is reported after, the ASE is already in idle
state and the referenece to CIS has been already removed (on ACL
disconnection).

Fixes: #64896
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-27 12:16:30 +00:00
Juha Ylinen 637b4b62ee samples: lwm2m: Add support for Connection Manager
Using Connection Manager, it's easy to run lwm2m sample on
devices supporting different connectivity technologies
(for example, Wi-Fi and LTE).

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-11-27 12:16:10 +00:00
Minho Jin a1614e8c95 driver: counter: rpi_pico_timer: fix counter cancel
alarm setting function checks channel callback and it returns -EBUSY
if callback is registered. but alarm cancel function doesn't clear
callback function. this prevents from alarm setting after alarm cancel

Signed-off-by: Minho Jin <kilejin@gmail.com>
2023-11-27 12:15:56 +00:00
Grant Ramsay 82644a31c2 drivers: ethernet: Fix eth_ivshmem shared memory mapping
This driver assumed the ivshmem-v2 output sections would be mapped
contiguously, which is no longer true.

Modify eth_ivshmem to treat each output section independently

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-27 12:15:43 +00:00
Grant Ramsay 64cc0764ee drivers: virtualization: Map ivshmem-v2 sections individually
Recent changes to the arm64 MMU code mean that you can no longer map
R/O memory as R/W. Mapping R/W memory now causes a cache invalidation
instruction (DC IVAC) that requires write permissions or else a fault
is generated.

Modify ivshmem-v2 to map each R/O and R/W section individually

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-27 12:15:43 +00:00
Vinayak Kariappa Chettimada d36e085ecc Bluetooth: Controller: Fix scan aux context leak
Fix scan aux context leak under BT_CTLR_SCAN_UNRESERVED.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00
Vinayak Kariappa Chettimada d573951f0d Bluetooth: Controller: Revert back early abort of previous prepare
Revert back to implementation that did early abort of
previous prepare when a short prepare is enqueued.

Adds back implementation deleted in
commit 7f388bb70a ("Bluetooth: Controller: Fix short
prepare when many enqueued in pipeline").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00
Vinayak Kariappa Chettimada b444dc442b Bluetooth: Controller: Minor re-arrange advanced feature Kconfig
Minor refactor of Kconfig order such that the advanced
feature Kconfig is just above the enabling/visible of the
advanced features menu.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00
Vinayak Kariappa Chettimada ec7bdde22b Bluetooth: Controller: Improve preempt timeout req/ack counting
Improve preempt timeout request and acknowledge counting.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00
Joseph Yates 5ae648d417 boards: shields: Adding support for the waveshare pico ups-b shield
Adding support for the Waveshare pico ups-b shield with documentation

Signed-off-by: Joseph Yates <joeyatessecond@gmail.com>
2023-11-27 12:14:05 +00:00
Jamie McCrae 1b364c1422 drivers: console: uart_mcumgr: Skip reading FIFO during setup
Drops calling the UART FIFO read function during the setup
function (when not in async mode) which could cause issues on
some devices since this function is not called in an ISR.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-27 09:12:36 +00:00
TOKITA Hiroshi 9f1b1bbba4 boards: arm: rpi_pico: add pyocd runner configuration
Adding configuration for support pyocd.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-27 09:07:48 +00:00
Anas Nashif aed0c451f8 arch: introduce DSP_SHARING and CPU_HAS_DSP configs
introduce global DSP_SHARING and CPU_HAS_DSP to be used by all
architectures and change existing usage in ARC to use those global
configs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-27 09:05:54 +00:00
Anas Nashif b58a1f15af kernel: sanitize thread options
Some thread options were made architecture specific, i.e. K_ARC_DSP_IDX. We
have other architectures with similar functionality and we need to be
architecture agnostic at this level.

Changed the option to be more generic. The option is now called K_DSP_IDX.

Also remove multiple level of ifdefs and guards around those defines to
allow for documentation to be published and added a note about required
configs in the docstring.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-27 09:05:54 +00:00
Christopher Friedt 5da13ea30a docs: posix: correct spelling of XSI_THREADS_EXT
The option group includes a trailing S

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-26 19:58:54 -05:00
Christopher Friedt 4d8442d3a5 docs: posix: update the XSI_THREADS_EXT option group
Previously pthread_attr_getguardsize() and
pthread_attr_setguardsize() were part of the
XSI_THREADS_EXT option group. That is no longer the case.

In IEEE 1003.1-2017 they are part of the POSIX_THREADS_EXT
option group.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-26 19:58:54 -05:00
Christopher Friedt ecd2961160 doc: services: portability: posix: add pthread_setcanceltype()
The function pthread_setcanceltype() is supported and mandatory
for conforming implementations.

Mark it as supported since the preceding commit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-26 05:55:08 -05:00
Christopher Friedt 5f64a47d52 tests: posix: headers: support pthread_setcancelstate() / type()
The function pthread_setcancelstate() has been supported for
some time already in Zephyr. For some reason, it was not being
checked in the "headers" testsuite.

Additionally, check for pthread_setcanceltype() since it was
added in a prior commit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-26 05:55:08 -05:00
Christopher Friedt 1e7eb7a6da posix: pthread: support for pthread_setcanceltype()
pthread_setcanceltype() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.

The POSIX_THREADS_BASE Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-26 05:55:08 -05:00
Marco Widmer 20979f80a6 drivers: uart: esp32: use config from device tree
The parity, stop bits and data bits config was hard-coded instead of
taken from the device tree.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2023-11-25 09:04:46 -05:00
Benjamin Cabé 0b39da6869 doc: Do not fail when manually authored doc file is not tracked by git
This fixes a bug where a newly created documentation file not yet
tracked by git would cause the documentation generation to fail.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-25 08:55:18 -05:00
Vinayak Kariappa Chettimada 12cefe1027 Bluetooth: Controller: Fix compiler warning when RL_SIZE=1
Fix compiler warning when BT_CTLR_RL_SIZE=1.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-25 08:54:39 -05:00
Benjamin Cabé af671a41bb drivers: display: doc: Add missing Doxygen comments
Added proper doxygen comments where they were missing.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-25 08:54:09 -05:00
Jordan Yates e1cd9f335d bluetooth: hci: spi: handle interrupt return code
Handle the GPIO module failing to configure the interrupt line.

Fixes #65583

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-11-25 08:53:49 -05:00
Jordan Yates 8b95376625 bluetooth: hci: increase SPI driver stack size
Increase the SPI RX driver stack size by 128 bytes. Overflows have
previously been observed on real hardware at the default stack size of
512.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-11-25 08:53:49 -05:00
Dawid Niedzwiecki 13e5c6359b maintainers: correct user name
Update user name from semihalf-niedzwiecki-dawid to niedzwiecki-dawid.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-11-25 08:52:08 -05:00
Yong Cong Sin cb10e94799 drivers: intc: plic: minor code refactor
The `riscv_plic_irq_enable` & `riscv_plic_irq_disable` are very
similar, refactor them out into `plic_irq_enable_set_state`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-25 08:51:52 -05:00
Aymeric Aillet 36f2627363 doc: Add Renesas Spider board documentation
Adding Spider board documentation based on Renesas official documentation
and following Zephyr guideline.

The documentation is describing the board and its current
Zephyr support.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet cf4ab0e907 boards: arm: Add Renesas Spider support
Renesas Spider board use a S4 SoC (r8a779f0).

Add basic support for UART, GPIO and clock control.

We are using SCIF0 as SCIF3 is used by Linux.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet f2061a073a soc: arm: reneas: Add r8a779f0 support
r8a779f0 SoC is part of the Renesas R-Car Gen4 SoC series.

This SoC has a dual core lockstep Cortex-R52 CPU.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet cfb93c1c82 dts: arm: Add Renesas r8a779f0 support
r8a779f0 is also know as S4, this SoC is part of the Gen4 SoC series,
has 8 Cortex-A55 and a dual core lockstep Cortex-R52 processor.

SCIF0 is dedicated to Zephyr and SCIF3 to Linux.

**Control Domains**
IMPORTANT: This SoC is divided into two "domains":
- Application domain contains some peripherals as well as A55 & R52 cores.
- Control domain that contain a G4MH/RH850 MCU and other peripherals.

In order to access control domain peripherals such as gpio4-7 and CAN-FD
from application domain, the G4MH MCU has to unlock a protection
mechanism from control domain buses.

"Protected" controllers will be flagged in gen4 device trees,
warning users that they need to flash a custom G4MH firmware
to unlock access to these controllers.

**Clock controller**
This SoC clock controller is offering "domains"
for each world (Zephyr/Linux).

These domains are several "entry points" to the clock controller
which are arbitrated to avoid a world from turning off a clock needed
by another one.

We decided to use the same domain as Linux because the
security mechanism as to be implemented before accessing
another domain.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Mykola Kvach 5461917952 drivers: clock: rcar: Add r8a779f0 support
Add support of r8a779f0 cpg driver.
r8a779f0 soc has its own clock tree.
Gen4 SoCs common registers addresses have been added in header.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet 6033db5360 drivers: pinctrl: rcar: Add r8a779f0 support
Enable PFC controller for r8a779f0 SoC.
Declare pin list for r8a779f0 SoC.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet 1738543c5d drivers: pinctrl: Add R-Car Gen4 support
Renesas R-Car Gen4 is different from Gen3 regarding pinmux.

While Gen3 had only one base address to manage all pins,
Gen4 has one set of pinmux registers per GPIO banks.

We could expose one pinmux register per GPIO controllers,
but that would break potential compatibility with Linux
Device tree.

Instead create a reg_base array to parse all reg base from
device tree and identify proper base address based on the pin
definition.

This imply to add a pfc_base parameter to most of the pfc_rcar
function.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet eb879413be drivers: gpio: rcar: Add R-Car Gen4 support
Renesas Gen4 SoCs GPIO IPs are using one more
register comparing to Gen3 SoCs.

The new "INEN" register is used to enable general input.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Anas Nashif c696344f0d twister: tests: adapt tests for new behaviour in runner class
We have removed some return data and added build time to instance class.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-25 08:49:27 -05:00
Anas Nashif 2ba6bcf906 twister: measure build time and report it in json output
Measure both cmake and make/ninja build times and log them in debug mode
and additionally put the result in the json report for tracking build
times.

Cleanup what build/cmake function return and remove unused keys in the
result map.

Remove some excessive logging of launched jobs or default platforms that
gets in the way when in debug mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-25 08:49:27 -05:00
Nikolay Agishev 4cb194f3e8 ARC: MWDT: Force cleanup .device_states section
This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/64268

MWDT supposes .device_states section as BSS because .device_states
variables defined as uninitialized. This causes the section marked
as NOLOAD section and OpenOCD does not take it in account while
flashing it into board memory.
Finally .device_states variables becomes initialized with garbage
from RAM.

In this PR it's suggested to clean .device_states in early init stage.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-11-25 08:48:15 -05:00
Vinayak Kariappa Chettimada 6c7c5bd5dd Bluetooth: Controller: Fix uninitialized ad_len_chain variable
Fix uninitialized ad_len_chain variable.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-25 08:47:36 -05:00
Vinayak Kariappa Chettimada ca45155a23 Bluetooth: Controller: Fix NULL pointer dereferencing in Sync ISO
Fix NULL pointer dereferencing when Host supplies an out of
bounds BIG handle.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-25 08:47:00 -05:00
Christopher Friedt 87635dd34a posix: do not define _PTHREAD_CANCEL_POS
_PTHREAD_CANCEL_POS is an implementation detail and should not
be defined in the global scope. Furthermore, _PTHREAD_CANCEL_POS
uses a reserved identifier (underscore followed by capital
letter).

Adjust definitions so that the implementation detail is only
used in the implementation and not in the interface.

Additionally, modify naming so that the non-standard macro does
not use a reserved identifier.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Christopher Friedt d2e729233d tests: posix: headers: add verification tests for more constants
Ensure that the "headers" test checks that the following constants
are defined:

* PTHREAD_PROCESS_SHARED
* PTHREAD_PROCESS_PRIVATE
* PTHREAD_COND_INITIALIZER
* PTHREAD_MUTEX_INITIALIZER
* PTHREAD_CANCELED

They were already defined by previous commits, but the test had not
been updated.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Christopher Friedt 19ef279dc3 posix: define PTHREAD_CANCELED globally
Move the definition of PTHREAD_CANCELED from pthread.c to
pthread.h.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Christopher Friedt 505e9be2e1 tests: posix: headers: ensure pthread_condattr_getclock() exist
These calls were added some time ago, so ensure they are checked
for existence.

* pthread_condattr_getclock()
* pthread_condattr_setclock()

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Christopher Friedt 131220cb95 tests: posix: headers: check pthread_spin_lock() et al exist
The simple header test was not updated to verify that the
following functions were implemented even though they were
implemented some time ago.

* pthread_spin_destroy()
* pthread_spin_init()
* pthread_spin_lock()
* pthread_spin_trylock()
* pthread_spin_unlock()

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Christopher Friedt ad5441bbdd posix: pthread: move pthread_equal() closer to pthread_self()
* "identity" functions grouped more closely
* posix_thread_pool_init() should be adjacent to the SYS_INIT()

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-25 06:29:16 -05:00
Shahar Hadas cc6bf66345 auxdisplay: Enhance SerLCD auxdisplay driver
Added export of command and special command delays as configurable options.

Signed-off-by: Shahar Hadas <shaharhd@gmail.com>
2023-11-24 22:04:22 +00:00