Commit Graph

87756 Commits

Author SHA1 Message Date
Benjamin Cabé 0bd03239ee MAINTAINERS: clean up POSIX area
Ensure documentation related to POSIX portability matches POSIX area.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 09:23:07 -06:00
Benjamin Cabé c1656a4486 doc: redirects: fix redirect for POSIX portability homepage
Add a proper redirect for pre-3.5.99 POSIX portabiltity home page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 09:23:07 -06:00
Maciej Baczmanski 38118c24a3 MAINTAINERS: add myself as collaborator for openthread related repos
Add maciejbaczmanski as collaborator for openthread repos.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-11-27 09:20:03 -06:00
cyliang tw c07156ef3c tests: drivers: i2c: i2c_target_api: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-27 14:34:15 +00:00
cyliang tw dfff1107b8 drivers: i2c: support for Nuvoton numaker series
Add Nuvoton numaker series I2C controller feature.
Support dual role and at most one slave at one time

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-27 14:34:15 +00:00
Felipe Neves a97e30a829 boards: arm: arduino_opta_m4: adds initial support
to the arduino_opta PLC on the M4 core.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-11-27 14:10:22 +00:00
Christopher Friedt 5bfed9ef6b doc: posix; mark pthread_getconcurrency() supported
Mark pthread_getconcurrency() and pthread_setconcurrency()
as supported in documentation.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt caf72569a9 tests: posix: common: test pthread_getconcurrency()
Add functional tests for pthread_getconcurrency() and
pthread_setconcurrency().

Note: the specification explicitly says

> an implementation can always ignore any calls to
> pthread_setconcurrency() and return a constant for
> pthread_getconcurrency()

The implementation and tests could be up for revision at a future
time when optimizations are considered and there is a better
system in placeo for documenting POSIX options and deviations.

Any such optimizations should be explicitly controlled via
Kconfig.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt c0f2038c26 tests: posix: headers: check for pthread_getconcurrency()
Check for the existence of pthread_getconcurrency() and
pthread_setconcurrency().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt e49ae776cc posix: pthread: implement pthread_getconcurrency()
Zephyr must support all functionality of the XSI_THREADS_EXT
subprofiling option group in order to claim it supports that
subprofiling option group.

The XSI_THREADS_EXT option group is critical to be able to
run POSIX threads with statically allocated thread stacks, which
has been a feature of the implementation since it was initially
added.

The pthread_getconcurrency() and pthread_setconcurrency()
functions are the only remaining, unimplemented functions of
the XSI_THREADS_EXT option group.

Implement pthread_getconcurrency() and pthread_setconcurrency()
via the more "posixly correct" interpretation of the
specification.

I.e. as the pthread_t:k_thread relationship is 1:1 and not M:N,
Zephyr does not support multiplexing of user threads on top of
schedulable kernel entities (i.e. "user threads" are directly
mapped to native threads, just like linuxthreads or NPTL are in
Linux).

For that reason, to be "posixly correct", we should save the
provided value via pthread_setconcurrency(), in the absense of
errors, and also return that same value back via
pthread_getconcurrency(), even though that serves zero purpose
in Zephyr for the foreseeable future.

Note: the specification also states
"an implementation can always ignore any calls to
pthread_setconcurrency() and return a constant for
pthread_getconcurrency()."

For that reason, the implementation may be revisited at a later
time when when considering optimizations and when there is a
better system in place for documenting deviations.

Any such optimization should be explicitly controlled via
Kconfig.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Yonatan Schachter e3520c6813 dts: rp2040: Fix num-irq-priority-bits
The number of IRQ priority bits was incorrectly set to 3 instead
of 2, which is the correct number for Cortex-M0+.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-11-27 12:22:47 +00:00
Bartosz Bilas 0b76b4f016 drivers: mdio: esp32: add dependency of node status
MDIO driver should be available and enabled only when
mdio node has status okay.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-27 12:22:18 +00:00
Bartosz Bilas 08a4829682 drivers: ethernet: esp32: fix Kconfig
Add the missing dependency of the node status value
and enable the driver by default when they are met.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-27 12:22:02 +00:00
Andrei Emeltchenko db1c21bfd7 drivers: sensor: adxl367: Add missing breaks
Fix missing breaks errors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-27 12:21:42 +00:00
Kacper Dalach 82d7535b19 dts: st: Add cpu node labels
After porting from h5 to f7 i noticed that not all mcus have
cpu node labels. Added cpu0 node labels to all stm32 dts.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2023-11-27 12:21:19 +00:00
Alberto Escolar Piedras 8f78b7148c samples/bluetooth: sysbuild: Add Kconfig setting for HCI IPC inclusion
Introduce NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.

This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:56 +00:00
Johan Hedberg 084b8e4f97 x86: Only enable EFI_CONSOLE if UART console is not enabled
Most x86 build configurations enable the UART console. Since EFI console
has also defaulted to enabled, this means that the EFI covers the early
part of the boot until UART takes over.

This is all fine, except that enabling EFI console has the effect of
disabling PRINTK_SYNC. This in turn has the effect of causing garbled
output over UART, which has led to several bug reports on x86 platforms
(in particular on up_squared).

Since EFI console should really only be used for early platform bringup
and debugging purposes, it's not really ideal to unconditionally have it
enabled by default. Instead, change the default enabling to be
conditional to the UART console being disabled.

Fixes #54861
Fixes #55071

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-27 12:19:41 +00:00
Alberto Escolar Piedras 9aafc832a2 tests/misc/check_init_priorities: Fix for native_sim
Fix this test for the native_simulator,
and add it as a default test target.

Also be a bit clearer in stdout about the test having
passed or not.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:03 +00:00
Alberto Escolar Piedras 9bb708eb7d init_priorities: Fix for native_simulator based targets
Fix the init_prioties related cmake targets so they also
work with native_simulator based build targets.
Mostly this consists of pointing to the right file
(final build result instead of intermediate elf library)
and setting the dependency to that final build result.

Note that for the native_simulator based targets
the init priorities check can only be run on build
if we are building the final image (not just a partial
prelinked library),
and we are not assembling several images together
into one executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:03 +00:00
Francois Ramu c3940cb4f7 Revert "dts: arm: stm32u5 family has a x2 factor on its LPTIM clock"
This reverts commit 823b0e6016.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Francois Ramu f1af7f13eb drivers: timer: stm32 lptimer revert static-prescaler
Revert "drivers: timer: lptim timer clock on stm32u5 has a prescaler"
This reverts commit c14670abea.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Francois Ramu 8146fe4f66 dts: bindings: stm32 lptimer has no divider on the clock source freq
Revert "dts: bindings: LPtimer of stm32 has a x2 factor on its clock"
The stm32u5 lptim clock source has no prescaler to divide the
the LPTIM input clock frequency : no property required.
This reverts commit 572b286010.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Bjarki Arge Andreasen bec7789862 tests: modem: backend: uart: Add fixture to test suite
Add fixture to test suite to allow for and signal that the test
must be run on real hardware.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-27 12:18:19 +00:00
Yong Cong Sin 7ed88f169b drivers: intc: stm32: fix a minor copy paste error
The description of `STM32_EXTI_TRIG_FALLING` got copied into
the `STM32_EXTI_TRIG_BOTH` as well, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-27 12:18:08 +00:00
Alberto Escolar Piedras cd5f88e8d3 boards native_posix/sim: Define native_posix DTS from native_sim's
Get the native_posix DTS from native_sim instead of
the oposite. As native_sim is now the default test platform.

Note this commit is practically just swapping files.
There is no changes to the DTS content, beyond
changing the board name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:17:57 +00:00
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