Commit graph

69659 commits

Author SHA1 Message Date
Gerard Marull-Paretas 37c956ffb9 samples: pm: demonstrate usage of the policy latency APIs
Even though we have unit tests that cover the PM policy latency APIs, it
may not be obvious on how to use it in practice. This patch adds a new
sample where both the application and a device driver impose latency
requirements. The sample illustrates how latency requirements are
aggregated and are taken into account when choosing the CPU power state.
The test has been designed to run on native_posix, since it only serves
for demonstration purposes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-07 10:28:55 +02:00
Tom Burdick 897ae4a2d5 test: timer_behavior: Rename readme.md to readme
Renames the file to avoid what appears to be automatic inclusion
into the root of the doctree.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-06 17:54:52 -04:00
Andrey Borisovich c75e6cfcb9 soc: intel_adsp_ace1x: Added IPC/IDC implementation
Added IPC and IDC implementation for Intel ADSP ACE1X SoCs.

Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-06 15:33:24 -04:00
Gerard Marull-Paretas be38456279 include: types: remove ulong_t
ulong_t was mainly used in MIPS/RISC-V. Just use "unsigned long".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 18:16:33 +02:00
Gerard Marull-Paretas 8081d7f2a4 drivers: s/DT_CHILD(DT_DRV_INST(n), ...)/DT_INST_CHILD(n, ...)
Use instance version of DT_CHILD when possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Gerard Marull-Paretas 3732bbfa12 tests: devicetree: add tests for DT_CHILD/DT_INST_CHILD
Add some coverage for the DT_CHILD/DT_INST_CHILD macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Gerard Marull-Paretas 7a54318d35 devicetree: add DT_INST_CHILD
Add the instance-based version of DT_CHILD.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 08:45:25 -07:00
Vinayak Kariappa Chettimada 61a44f1af2 Bluetooth: Controller: Use macros in num complt implementation
Use macros to encode the counting of number of completed
packets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Morten Priess eb025d0497 Bluetooth: Controller: Fix ISO TX pool corruption and missing release
- Fix ISO TX data pool corruption due to multiple calls to
  tx_cmplt_get, without removing the nodes
- Added missing release of TX node link in case of ISOAL error

Signed-off-by: Morten Priess <mtpr@oticon.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 4a74f97a9a Bluetooth: Controller: Fix ISO Tx PDU memory pool corruption
Fix ISO Tx PDU memory pool corruption due to duplicate ISO
Tx PDU buffers repeatedly released into the memory pool.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 8eee8430d4 Bluetooth: Controller: Add implementation to flush Tx on BIG terminate
Add implementation to flush pending ISO Tx PDUs when BIG
events are terminated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 73e0b415ce Bluetooth: Controller: Fix removal of BIG association with Periodic Adv
Move the removal of BIG context association with the
Periodic Advertising context to when the BIG streams are
release and BIG terminate message is generated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Vinayak Kariappa Chettimada 0c88407a28 samples: Bluetooth: Increase adv data Len for broadcast audio source
Increase the Controller supported Advertising Data Length
Maximum so that Advertising Data set by Broadcast Audio
Source sample is accepted by the controller.

Also, tune down the supported ISO Tx PDU size to suffice the
Broadcast Audio Source usecase.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
Piotr Kmiecik 0acd68247f drivers: ace_v1x wallclock driver
Wallclock driver with functionality required by ACE v1x base firmware.

Signed-off-by: Piotr Kmiecik <piotrx.kmiecik@intel.com>
2022-09-06 17:44:03 +02:00
Carles Cufi 451dffe5ac doc: west: Document the 'west completion' command
This extension command was not documented yet, add it to the
corresponding page.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-06 08:43:15 -07:00
Carles Cufi 13ea65b6a9 west: Add completion support for zsh
As part of the overall work on improving west integration with Zephyr,
add support for zsh completion in the `west completion` command.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-06 08:43:15 -07:00
Kai Vehmanen eac6176961 logging: adsp_mtrace: fix handling of buffer full condition
If the mtrace buffer gets full, the entries are dropped. This
is however not reflected in the "bytes_written" argument passed
to the hook function used to notify of new data in the buffer.

This behaviour becomes problematic in the case there is no
active consumer of the mtrace logs. To allow the client that has
registered the hook function, to act correctly in this case,
the bytes_written should reflect the actual bytes that have been
added to buffer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-09-06 17:43:08 +02:00
TOKITA Hiroshi f3fd686b96 drivers: adc: shell: Support RaspberryPi Pico ADC
Add ADC shell support for RaspberryPi Pico.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 519af86d38 samples: drivers: adc: Add rpi_pico support
Add support for rpi_pico board to adc driver sample.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 32735c992a tests: drivers: adc: Add support for rpi_pico
Add support for rpi_pico board to adc_api test.

At this time, twister couldn't with rpi_pico board,
Test it built with west and checked the console output.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 43d8ea1ae6 boards: arm: rpi_pico: Enabling ADC
Make ADC available. Also enable internal temperature sensor.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 6df65f569d drivers: adc: Add support for RaspberryPi Pico ADC
Introducing RaspberryPi Pico ADC driver.
This driver was created with reference to the adc_emul implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 4f7201463a dts: bindings: adc: Add RaspberryPi Pico ADC
Define RaspberryPi Pico ADC.

The ADC has internally connected temperature sensor,
Add property to enable this.

The ADC has a single VREF. VCC usually connects to it,
but it may not be in a case.
Add property to make configurable it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi 725aa4759a modules: hal_rpi_pico: Enable ADC driver
Enable ADC driver.
Add the path of the ADC driver header into include paths.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
TOKITA Hiroshi dd1ca1790c manifests: Rename Pico-SDK's adc_read() to pico_adc_read()
adc_read() that defined in adc.h of PICO-SDK
conflicts with zephyr's ADC API.
Rename it to avoid compile errors.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Tatsuroh Hayashi fbef588a57 boards: arm: stm32f103_mini: STM32F1RTC support
Add RTC support of STM32F1 family.

Signed-off-by: Tatsuroh Hayashi <tatzu884@gmail.com>
2022-09-06 09:43:54 -05:00
Tatsuroh Hayashi 6183129ecb boards: arm: nucleo_f103rb: STM32F1RTC support
Add RTC support of STM32F1 family.

Signed-off-by: Tatsuroh Hayashi <tatzu884@gmail.com>
2022-09-06 09:43:54 -05:00
Tatsuroh Hayashi 36f10006c1 dts: arm: st: f1: STM32F1RTC support
Add RTC support of STM32F1 family.

Signed-off-by: Tatsuroh Hayashi <tatzu884@gmail.com>
2022-09-06 09:43:54 -05:00
Tatsuroh Hayashi cc434a9fe1 drivers: counter: STM32F1RTC support
Add RTC support of STM32F1 family.

Fixes #31175

Signed-off-by: Tatsuroh Hayashi <tatzu884@gmail.com>
2022-09-06 09:43:54 -05:00
Filip Kokosinski f177413ef9 MAINTAINERS: add Renode area
This commits adds the Renode area in the MAINAINTERS.yml file.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-09-06 09:35:38 -05:00
Filip Kokosinski 8e419c7bc6 MAINTAINERS: update CODEOWNERS and MAINTAINERS.yml
This commit updates the outdated entries of CODEWONERS and
MAINAINERS.yml files.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-09-06 09:35:38 -05:00
Jamie McCrae 1066b2fba2 doc: release-notes: Add note about support for taskstat tick usage
Adds information to the release notes on mcumgr supporting tick usage
in the taskstat response

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 16:19:37 +02:00
Jamie McCrae e394899256 mgmt: mcumgr: Add runtime taskstat tick usage
Adds the runtime tick count of threads to mcumgr's taskstat response,
if CONFIG_SCHED_THREAD_USAGE is enabled, which reports the number of
execution cycles that each thread has been running for.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 16:19:37 +02:00
Jamie McCrae 92074e00a8 mgmt: mcumgr: Fix Bluetooth notification issue
Fixes an issue with Bluetooth notification sending whereby it does
not wait for buffers to become available and can error out if
unable to get a buffer once.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 16:19:15 +02:00
Jamie McCrae 698c4b0243 mgmt: mcumgr: Use dedicated work queue for SMP
Fixes an issues where the system work queue can become a source of
contention and cause a deadlock by moving MCUMGR SMP processing to its
own dedicated work queue.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 16:19:15 +02:00
Jamie McCrae 4bd39c21c7 mgmt: mcumgr: Move zephyr_grp to lib/cmd folder
Moves the zephyr_grp commands to the same directory as the other
mgmt command handlers.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 16:18:50 +02:00
Henrik Brix Andersen 2f925b47a7 tests: drivers: can: shell: poll for the dummy shell to be ready
Poll for the dummy shell to become ready and fail the tests if not.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 14:12:33 +00:00
Henrik Brix Andersen d785c01b97 tests: shell: add missing assert
Add missing assert after polling for the dummy shell backend to be ready.

Fixes: 491f4dd701

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 14:12:33 +00:00
Dominik Ermel 4a702ea21e mgmt/mcumgr: Move mgmt Kconfig file under mgmt sub-dir
The Kconfig for MCUMgr management source code (service registration,
group registration, and so on) has been moved to the sub-dir with
the code.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 12:49:27 +02:00
Jamie McCrae 1c922bdd1a doc: release-notes: Add mcumgr signed thread taskstat notice
Adds information to the release notes about the Kconfig option
CONFIG_OS_MGMT_TASKSTAT_SIGNED_PRIORITY now being enabled by default
which reports signed thread priorities when the taskstat mcumgr
command is used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 12:48:25 +02:00
Jamie McCrae 3a79fddfc2 mgmt: mcumgr: Make signed thread priorities enabled by default
By default, thread priorities in mcumgr task stat responses are
unsigned, whilst in zephyr, thread priorities are signed. This means
that clients get obscenely large numbers for priorities that make no
sense. The fork of mcumgr has been in zephyr long enough now that
this should be changed to use signed thread priorities by default
instead of sticking with the old mcumgr default.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-06 12:48:25 +02:00
Enjia Mai 6f8575522a tests: drivers: virtualization: move the ivshmem tests to new ztest API
Migrate the testsuite tests/drivers/virtualization/ivshmem/ to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-06 12:36:54 +02:00
Andrzej Głąbek 326f7bd450 tests: Increase stack size when nRF DK serial workaround is enabled
... and tests are built with no optimizations. The standard size may
not be sufficient in such circumstances.

Commit 4b1103547c addressed the same
issue in a single test and used a higher value (1024) that turns out
to be not necessary, so revert also that change to make the cleanup
easier when the workaround will no longer be needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-06 12:36:40 +02:00
Meng xianglin 26f0a4f594 tests: fs_api: move to new ztest API
all test cases in tests/subsys/fs/fs_api are moved to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-06 12:36:24 +02:00
Dominik Ermel 6b760b3702 mgmt/mcumgr: Remove internal functions form Zephyr header
The commit removes declarations of:
 zephyr_smp_rx_req, zephyr_smp_alloc_rsp, zephyr_smp_free_buf
from include/zephyr/mgmt/mcumgr/smp.h, as these are MCUMgr internal
functions used in SMP processing and should be not exposed
from header file that provides interface for SMP transports.
The declarations have been moved to smp_internal.h, which is
visible within MCUMgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 12:36:08 +02:00
Jakub Rzeszutko 491f4dd701 shell: update shell tests
Replace hard fixed delay with function shell_ready to wait
for shell readiness.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-09-06 12:36:01 +02:00
Jakub Rzeszutko 66d4471d48 shell: add function checking shell readiness.
Tests with shell commands will fail if they are started
before the shell backend is initialized or started.
Adding API function: shell_ready indicating shell readiness.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-09-06 12:36:01 +02:00
Jakub Rzeszutko 2b05f467f0 shell: add missing asserts to api functions
Add missing macro: __ASSERT_NO_MSG to API functions.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-09-06 12:36:01 +02:00
Anders Storrø 36e34fce41 Bluetooth: Mesh: Add CDB depend on to prov Kconfig
The current implementation of provisioning features is dependent on CDB
to compile, which is reflected poorly in the Kconfig options for mesh.

This commit alters the Kconfig options for provisioning to be dependent
on the CDB option to compile.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-06 12:35:48 +02:00
Marc Lasch 42858bebb7 mgmt/mcumgr: Fix format specifier
Use c99 format specifier macros to remove build warnings when building
for `native_posix[_64]`.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2022-09-06 10:00:25 +02:00