Commit Graph

87791 Commits

Author SHA1 Message Date
Lukasz Majewski d378e64508 drivers: net: Force LAN865x to start received frames at first chunk word
Zephyr's network stack has issues with network IP header split across
fragments.
To alleviate this problem, the frame would be now aligned to first byte
of the chunk. This would ensure that the header is stored at one network
buffer fragment (as we explicitly set its size to 64B).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-11-27 19:58:13 +01:00
Lukasz Majewski 6c8c0f57f9 drivers: net: tc6: Add read,modify and write operation on control regs
The OA TC6 driver requires some bits manipulations in control registers.
Up till now - it has been implemented as an explicit set of read and write
registers' operations.
One good example would be the oa_tc6_set_protected_ctrl() implementation,
which used such scheme.

This patch brings dedicated function for this operation; oa_tc6_reg_rmw().
The aforementioned oa_tc6_set_protected_ctrl() function now uses it
internally.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-11-27 19:58:13 +01:00
Andy Sinclair a757c26e50 samples: shields: npm1300_ek: Fix display of negative temperature
Update temperature printing to handle negative values.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Andy Sinclair f3447c0c1e samples: shields: npm1300_ek: Added missing shell configs
Sample readme states that shell inteface is supported
for evaluation.  Added missing GPIO_SHELL and SENSOR_SHELL
to Kconfig.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Andy Sinclair 39564cdf20 boards: shields: npm1300_ek: Settings moved to board overlay
The existing npm1300_ek shield overlay has several example
voltage and gpio settings.  For many use cases these are
invalid and need to be overridden, or removed with
delete-property.

These example configurations have been moved to a board
specific overlay.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Flavio Ceolin 09e17c17b1 mem_manage: Remove unnecessary header
"zephyr/kernel/mm.h" is not needed in "zephyr/sys/mem_manage.h".

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-27 19:57:46 +01:00
Flavio Ceolin a66667caba kernel: mm: Include missing header
mm.h uses sys_mm_is_virt_addr_in_range() that is declared in
sys/mem_manage.h.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-27 19:57:46 +01:00
Flavio Ceolin 683accaef0 xtensa: mmu: Include missing header
This file uses inline functions declared in cache.h and consequently
has to include that file.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-27 19:57:46 +01:00
Carlo Caione 9025789064 tests: Add test for the memory allocator
Add a new test for the attribute-based memory allocator.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-11-27 19:56:48 +01:00
Carlo Caione 06571fc87b doc: Add documentation for the new allocator
Add new documentation for the new attribute-based memory allocator.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-11-27 19:56:48 +01:00
Carlo Caione 09fd6b6ea5 mem_mgmt: Add a memory attributes memory allocator
Using this new library it is now possible to leverage the memory
attribute property 'zephyr,memory-attr' to define and create a set of
memory heaps from which the user can allocate memory from with certain
attributes / capabilities.

When the CONFIG_MEM_ATTR_HEAP option is set, every region marked with
one of the memory attributes listed in
include/zephyr/dt-bindings/memory-attr/memory-attr-sw.h is added to a
pool of memory heaps used for dynamic allocation of memory buffers with
certain attributes.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-11-27 19:56:48 +01:00
Seppo Takalo a8d56c4f1f net: scripts: Use native_sim instead of native_posix
Sample tests should also be using native_sim board.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-27 19:55:30 +01:00
Alberto Escolar Piedras 7b1813e9dc tests/drivers/build_all/*: Switch to native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras fd095c36b9 tests/lib/gui/lvgl: Enable for native_sim
Enable this test which runs in native_posix_64 in
native_sim(_64), and set default test platform
to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras b51f0ee4cd tests/subsys/testsuite/fff_fake_contexts: Enable for native_sim
Enable this test which runs in native_posix_64 in native_sim,
Switch from native_posix_64 to native_sim_64 as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras f2283df0ef tests/drivers/clock_control/fixed_clock: Enable for native_sim_64
Switch from native_posix_64 to native_sim_64 as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras e6f6d60cd9 tests/drivers/udc: Switch to native_sim_64
Enable this test which run in native_posix_64 in native_sim_64,
And switch native_posix_64 overlays to native_sim_64.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 548739cf8c tests/cmake/*: Switch to native_sim
Switch from native_posix to native_sim as test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 31ec1d044b tests/misc/test_build: Switch integration_platform to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 161b236124 tests/misc/kconfigoptions: Switch to native_sim
Switch from native_posix to native_sim as test platform
and switch overlay to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 6568825174 tests/crypto/*: Switch from native_posix to native_sim
Enable these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
For drivers.rand32.random_psa_crypto, filter the posix
arch to save some CI time, as TFM is not supported in this
architecture all together.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 70e0d1e04e tests/lib/devicetree: Enable for native_sim
Enable these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 18c71868a5 tests/lib/mpsc_pbuf: Switch to native_sim
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 5f4bd36b98 tests/boards/native*: Moved to native_sim
Moved folder to tests/boards/native_sim from native_posix
(including updating the MAINTAINERS file)
And enable all these tests for native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 3d406a7a56 native_simulator: Get latest from upstream
Align with native_simulator's upstream main
ae241af736d06874ec02deb9aacb79918d745aba

Which includes:
* ae241af native timer_model: Allow calling into get_host_us_time

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 7332eb2ea7 board native_sim/posix: Provide NEVER/NSI_NEVER definitions
Some native_posix specific apps/tests use the macro NEVER
provided it also for native_sim until all have switched
to the new NSI_NEVER.

And ensure NSI_NEVER is also avaiable when building
for native_posix to ease the transition.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 2231c3ab97 tests/subsys/usb/*: Enable for native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 1d64f1b397 tests/subsys/openthread: Enable for native_sim
Enable these test which run in native_posix in native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras e628a5b9d0 tests/subsys/logging/*: Enable for native_sim
For all tests which were enabled for native_posix
enable them also for native_sim.
For those with native_posix as integration_platform,
set native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras aa683e2a8b tests/subsys/logging/log_backend_fs: Simplify and enable for native_sim
* Simplify the test definition by using an EXTRA DTC overlay
  so we don't need one test per board
* Move native_posix overlays to native_sim
* Switch the default integration platform to native_sim
  from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras bf937b0d92 tests/subsys/mgmt/mcumgr/*: Switch to native_sim
Enable all these tests which run in native_posix in native_sim,
For those with native_posix as default test platform,
which it to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras bb090128f6 tests/subsys/mgmt/ec_host_cmd/*: Enable for native_sim
Enable these test which run in native_posix in native_sim,
And set native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras c47702cb7e tests/subsys/shell/shell_flash: Enable for native_sim
Enable this test which runs in native_posix in native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 617616888f tests/subsys/bindesc: Enable for native_sim
Enable these tests which run in native_posix also in native_sim,
And add native_sim as default test platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 8d6421df04 tests/subsys/emul: Enable for native_sim
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

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