Commit Graph

67934 Commits

Author SHA1 Message Date
Guo Lixin 0356e1a925 tests: kernel: context: move to new ztest API
Move tests/kernel/context/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-08-04 13:42:47 +02:00
Gerard Marull-Paretas e6a345f967 drivers: ieee802154: uart_pipe: make driver DT-based
Use Devicetree to describe the UART UPIPE IEEE 802.15.4 driver. This
allows to remove usage of IEEE802154_UPIPE_DRV_NAME in preparation for
the removal of NET_CONFIG_IEEE802154_DEV_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas d904b5d908 drivers: ieee802154: uart_pipe: split Kconfig
As all other drivers, keep uart_pipe driver Kconfig settings into its
own file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas 1d6862c4e9 drivers: ieee802154: rf2xx: remove unused IEEE802154_RF2XX_DRV_NAME
The option is no longer used (driver is DT-based).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas 2df965f490 drivers: ieee802154: nrf5: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_NRF5_DRV_NAME in preparation for the
removal of NET_CONFIG_IEEE802154_DEV_NAME.

All SoC files have been updated with the addition of an ieee802154 node
(disabled and only on those SoCs that define ieee802154-supported. The
peripheral has been enabled in the nRF52840DK board (used for testing
ieee802154).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas 7d5272db62 drivers: ieee802154: kw41z: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_KW41Z_DRV_NAME in preparation for the removal
of NET_CONFIG_IEEE802154_DEV_NAME.

KW41Z files have been updated with the addition of radio and an
ieee802154 nodes The peripheral has been enabled in the frdm_k41z board
(used for testing ieee802154).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas dc0728fb2a drivers: ieee802154: cc2520: drop IEEE802154_CC2520_CRYPTO_DRV_NAME
The crypto driver is used internally, so there's no real need to expose
its name as a Kconfig option. Just drop it in favor of a plain string
with the same previous value.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas fb9dbdd60e drivers: ieee802154: cc13x2_cc26x2_subg: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_CC13XX_CC26XX_SUBG_DRV_NAME in preparation
for the removal of NET_CONFIG_IEEE802154_DEV_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas fa16891625 drivers: ieee802154: cc13x2_cc26x2: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_CC13XX_CC26XX_DRV_NAME in preparation for the
removal of NET_CONFIG_IEEE802154_DEV_NAME. All boards used in testing
have been updated to enable the peripheral in DT as well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas 1ff6577e30 drivers: ieee802154: cc1200: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_CC1200_DRV_NAME in preparation for the removal
of NET_CONFIG_IEEE802154_DEV_NAME.

In this case, the driver already had bindings, however, it was still
using NET_DEVICE_INIT.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Torsten Rasmussen 69f4fa6a4e west: adding --domain to west build synopsis
Adding `--domain DOMAIN` to the west build synopsis.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-04 13:06:13 +02:00
Peter Mitsis 71ef669ea4 kernel: Fixes sys_clock_tick_get()
Fixes an issue in sys_clock_tick_get() that could lead to drift in
a k_timer handler. The handler is invoked in the timer ISR as a
callback in sys_tick_announce().
  1. The handler invokes k_uptime_ticks().
  2. k_uptime_ticks() invokes sys_clock_tick_get().
  3. sys_clock_tick_get() must call elapsed() and not
     sys_clock_elapsed() as we do not want to count any
     unannounced ticks that may have elapsed while
     processing the timer ISR.

Fixes #46378

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-08-04 05:32:11 -04:00
Dat Nguyen Duy 8e55e59c59 arch: introduce config DCLS
Some processors support Dual-redundant Core Lock-step
DCLS) topology but the processor still can be ran in
split-lock mode (by default or changed at flash time).
So, introduce config DCLS that is enabled by default if
config CPU_HAS_DCLS is set, it should be disabled if
processor is used in split-lock mode.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2022-08-04 12:51:25 +09:00
Kumar Gala 6298b27725 watchdog: remove Kconfig.defconfig setting of watchdog drivers
Now that watchdog drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
watchdog and not respect the devicetree state of the watchdog.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:30:17 -05:00
Peter Mitsis 3e2f30a7ef kernel: fix race condition in sys_clock_announce()
Updates sys_clock_announce() such that the <announce_remaining> update
calculation is done after the callback. This prevents another core from
entering the timeout processing loop before the first core leaves it.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-08-03 17:43:04 -04:00
Kumar Gala 3967911d3b dts: arm: st: Remove label property from devicetrees
Remove some new label properties that got added.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 15:57:55 -05:00
Yuval Peress 000bdb16c7 test: BT: ctrl_isoal: run clang-format
Run clang-format on the ctrl_isoal test's main.c

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-03 21:20:40 +02:00
Yuval Peress 4659524374 ztest: mock: Remove ztest mock from BT ctrl_isoal
Remove use of ztest mock Kconfig from BT ctrl_isoal tests.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-03 21:20:40 +02:00
Yuval Peress fb5fabc3fb ztest: mock: Update BT ctrl_isoal allocation to use fff
Remove references to ztest mock used in `sink_sdu_emit_test`.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-03 21:20:40 +02:00
Yuval Peress 926830e546 ztest: mock: Update BT ctrl_isoal allocation to use fff
Remove references to ztest mock used in `sink_sdu_write_test`.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-03 21:20:40 +02:00
Yuval Peress 8589e34a50 ztest: mock: Update BT ctrl_isoal allocation to use fff
Remove references to ztest mock used in `sink_sdu_alloc_test`.

Signed-off-by: Yuval Peress <peress@google.com>
2022-08-03 21:20:40 +02:00
Aastha Grover 5d23d4f4a6 samples: kernel: metairq: Update ReadMe
Update ReadMe for metairq sample application.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-03 14:00:22 -05:00
Al Semjonovs 1463e1c26a ztest: Fix logic for listing tests once
A test case may invoke run_all multiple times, causing
logic for listing tests to run tests on second call.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2022-08-03 14:32:54 -04:00
Henri Xavier b187477fe7 scripts: Upgrade to junitparser v2+
There is a breaking change in Junitparser 'TestCase.result' between
v1.x and v2.x.

Update check_compliance.py minimally to take into account this change.

This avoids relying on an outdated package.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-08-03 14:04:36 -04:00
Kumar Gala 70475bf5ec dts: arm: nxp: Remove label property from devicetrees
Label properties are not required.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 12:59:00 -05:00
Jonathan Rico 1d0692b2f7 shell: kernel: fix sleep command
Was trying to parse the second argument instead of the first one.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-08-03 18:47:03 +02:00
Jonathan Rico 975fd4787b shell: Bluetooth: Fix auto-connect
The logic was still trying to parse the address even though one was already
stored.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-08-03 18:47:03 +02:00
Gerard Marull-Paretas a24007c35e boards: tlsr9518adk80d: remove list of supported samples
Sample compatibility should be determined by the sample.yaml in each
sample directory. Keeping a list in board documentation isn't a good
idea: easy to get outdated, it doesn't cover all compatible samples,
etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 18:46:01 +02:00
Kumar Gala b5b2b627b5 dac: remove Kconfig.defconfig setting of DAC drivers
Now that DAC drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the DAC.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:23 +02:00
Kumar Gala cab0f5e4f3 dac: remove setting DAC_INIT_PRIORITY in board Kconfig.defconfig
The specific drivers for DAC_MCP4725 and DAC_DACX0508 have their
own driver specific Kconfig symbol for the INIT_PRIORITY.  So
remove setting the generic one as it doesnt make sense to set it
and the default value matches what the board specific values for
INIT_PRIORITY are set to.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:23 +02:00
Kumar Gala 433e42d470 modules: lvgl: Remove Kconfig symbols that dont exist
LV_Z_DISPLAY_DEV_NAME, LV_Z_HOR_RES_MAX, & LV_Z_VER_RES_MAX
Kconfig symbols don't exist anymore.  They got removed in
recent devicetree update of lvgl module.  So remove them from
modules/Kconfig.lvgl.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:13 +02:00
Ming Shao 99fff9ff03 tests: kernel: syst_mutex: move to new ztest API
Move sys_mutex tests to new ztest API.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-03 18:43:42 +02:00
Ming Shao e3fad7be40 tests: Enhance the thread_competition case in sys_mutex test
Current thread_competition() case cannot verify the order of mutex
taking. This commit enhances on that.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-03 18:43:42 +02:00
Ming Shao 2daae30ec3 tests: Use dynamic thread instead of static thread for sys_mutex test
As of now, both the old and new ztest framework don't have a logic to
launch static threads. Static threads can only be launched by Zephyr
itself during boot.  If a test interact with static threads, when it
is executed multiple times without reboot, only the first few runs can
have static threads to interact with. After the static threads exit,
later runs will have nothing to interact with, which can lead to failure.
One unfortunate example is the sys_mutex test.
This commit replaces static threads with dynamic thread to make the test
repeatable. In future, maybe static threads launching logic should  be
covered by the ztest framework so richer scenarios can be tested.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-03 18:43:42 +02:00
Ming Shao e77d233981 tests: kernel: mutex_error_case: move to new ztest API
Move mutex_error_case tests to new ztest API.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-03 18:43:42 +02:00
Ming Shao 4a0ce498d1 tests: kernel: mutex_api: move to new ztest API
Move mutex_api tests to new ztest API.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-08-03 18:43:42 +02:00
Aleksandr Khromykh 678b003a50 Bluetooth: Mesh: Scanner is enabled during Friendship termination
Scanner was disabled after Friend Clear command. LNP didn't have
chance to receive Friend Clear Confirmation command back.
If option BT_MESH_LPN_ESTABLISHMENT is off then scanner is left
disabled and next Friend Offer after Friend Request
cannot be received.
PR fixes this.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-08-03 18:43:29 +02:00
Yong Cong Sin 588277c43a drivers: adc: stm32: Disable ADC before setting common path
According to the reference manual, the ADC should not be
converting when setting the common path, we disable the adc
directly in this driver for the sake of simplicity.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-08-03 18:43:20 +02:00
Yong Cong Sin 36a73d7704 drivers: adc: stm32: Use k_usleep variant
Convert these k_sleep calls to use the k_usleep instead.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-08-03 18:43:20 +02:00
Yong Cong Sin d4205f46dd drivers: adc: stm32: remove unnecessary VREFINT path
Remove unnecessary VREFINT path connection during the init.
Internal paths should be setup before reading the channel.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-08-03 18:43:20 +02:00
Yong Cong Sin 4ae32b1020 drivers: adc: stm32: Move adc_stm32_setup_channels to start_read
Move the `adc_stm32_setup_channels` function to `start_read`
so that we can guarantee that the internel path is connecte
before reading.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-08-03 18:43:20 +02:00
Tomasz Leman 7af70d9609 soc: ace_v1x: add power control registers
Those registers controls the power domain operations for DSP FW.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-08-03 11:47:27 -04:00
Torsten Rasmussen b88c8e1363 cmake: sysbuild: signing support
This commit introduces image signing by adding the possibility to
specify algorithm and signing key for sysbuild images.

It introduces Kconfig setting to specify signing algorithm and key file.

It will default the signing key to the default key provided by MCUBoot
if no key has been specified.

When signing is enabling, the signature key will be passed to the
application so the build system can sign the image as post build step.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 8408af6d7c scripts: west commands to support --domain
This commit extends the west commands build, flash, and debug to support
--domain when having multiple domains (images) defined in a domains.yaml
build file.

The domains.yaml uses the following yaml format to specify the
build directory of each domain in the multi image build:
> default: <domain-n>
> domains:
>   <domain-1>:
>     build_dir: <build_dir-domain-1>
>   <domain-2>:
>     build_dir: <build_dir-domain-2>
>   ...

`west <build|flash|debug>` has been extended to support
`--domain <domain>`.

`west build` calls CMake to create the build system, and if `--domain`
is given, then the build tool will be invoked afterwards for the
specified domain.

`west flash` will default flash all domains, but `--domain <domain>`
argument can be used to select a specific domain to flash, for example:
> west flash --domain mcuboot

`west debug` only a single domain can be debugged at any given time.
If `--domain` is not specified, then the default domain specified in the
domains.yml file will be used.
Users can still select a different domain, for example with:
> west debug --domain mcuboot

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 5fe5d6b43d scripts: extend west build command to support sysbuild CMake project
west build now support the sysbuild CMake project which allows users
to easily enable and build a bootloader together with any sample.

This will allow for cleaning up samples and boards which already does
custom multi image in a non-generic way, for example:
- mps2_an521 which includes a build for remote board
- samples/ipc/ which includes a samples for remote board
- esp32 which includes custom bootloaders

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 598bea0899 cmake: create domains.yaml
Support creation of domains.yaml to support
`west <build|flash|debug> --domain` when working with sysbuild multi
image.

Each Zephyr based image is added to list of domain that can be handled
by the Zephyr west extension commands.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 3d520dde2b cmake: support MCUBoot bootloader natively with SYSBuild
This commit adds CMake and Kconfig files needed to build MCUboot as
an extra image using SYSBuild.

Building an application with MCUBoot using SYSBuild allows users to
build both images using a single build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 9d6cc39d6f cmake: initial sysbuild / multi image support
This is the initial commit with system build, sysbuild.

Using CMake as infrastructure together with the Zephyr sysbuild allows
us to support a convenient way of building a sample and allow for extra
images to be built as part of a larger system.

It uses Kconfig for configuration of image builds.
This allows for future extension with additional build images.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 542aad5ac3 cmake: kconfig: allow to set Kconfig targets externally
This commit allows a project to specify a given set of Kconfig targets
prior to sourcing kconfig.cmake.

This allows for greater flexibility when re-using kconfig.cmake in
other projects.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00
Torsten Rasmussen 796474e366 cmake: kconfig: allow for Kconfig CONFIG namespace
This commit allows for specifying a dedicated Kconfig namespace, for
example: <namespace>_CONFIG

This namespace will then be used for handling loading of configuration
files into CMake configure scope, as well as handling of CMake cache
variables when set using `-D<namespace>_CONFIG_<var>=<value>`.

This allows greater flexibility when re-using the cmake/kconfig.cmake
in other projects.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-03 16:05:07 +02:00