Commit graph

75881 commits

Author SHA1 Message Date
Marc Herbert 68c1cafb41 intel_adsp: dts: ace: lower case 71C00 to fix DTC warning
Fixes the warning below. This commit does not change the firmware
binary. Thanks Kumar Gala for the suggestion.

  build-mtl/zephyr/zephyr.dts:279.42-285.5: Warning (simple_bus_reg):
  /soc/ace_comm_widget@71C00: simple-bus unit address format error,
  expected "71c00"

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-07 08:33:30 +01:00
Maureen Helm 3126556199 boards: arm: Configure sensor devicetree aliases on tdk_robokit1
Configures magnetometer, accelerometer, and die temperature devicetree
aliases on the tdk_robokit1 board to enable generic sensor sample
applications (magn_polling, accel_polling, die_temp_polling) on this
board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-03-07 08:33:23 +01:00
Nicolas Pitre abb50e1605 arch/arm64/mmu: fix table discarding code
First, we have commit 7d27bd0b85 ("arch: arm64: Disable infinite
recursion warning for `discard_table`") that blindly shut up a compiler
warning that did actually highlighted a real bug. Revert that and fix
the bug properly. And yes, mea culpa for having been the first to
approve that commit, or even creating the bug in the first place.

Then let's add proper table usage cound handling for discard_table() to
work properly and avoid leaking table pages.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-03-07 08:33:05 +01:00
Declan Snyder e72d1bf970 drivers: memc: flexspi: Update init priority
Update flexspi driver init priority to be the
memc driver init priority. This fixes a bug where
the flexspi flash drivers on i.MX RT platforms were
being initialized before the flexspi memc driver.
Since those flash drivers depend on the flexspi
spi bus controller being initialized, the flash drivers
would fail to initialize and cause runtime failures.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-03-07 08:32:48 +01:00
Gaël PORTAY 419dda3ed7 samples: fix path to tensorflow lite micro examples
The samples under the tensorflow modules directory has been renamed
since commit 6fd1b02496. However, the path
in their README.rst was not updated.

Additionnaly, the modules top directory under the samples is missing for
the samples magic_wand and tflm_ethosu.

This fixes the path to the tensorflow lite micro samples in their
README.rst.

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
2023-03-06 16:08:55 -06:00
João Dullius 79d9f45296 scripts: runners: bossac: Enable BOSSAC to run on Windows (native)
Fixes #37538 by correctly detecting WSL and blocking bossac from running
on that platform, but allowing it to run on Windows native.

Signed-off-by: João Dullius <joaodullius@bpmrep.com.br>
2023-03-06 13:17:09 -08:00
Keith Short 942e4a38d2 docs: Move RFCs into a separate document
The RFC proposal documentation better belongs with the other
documentation related to contributing to the Zephyr project.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-06 21:59:23 +01:00
Keith Short 34165a3480 docs: Add Contributor Expectations document
Collect up all the contributor expectations and PR requirements into a
single place. Add additional guidelines about creating small PRs and how
to break up PRs into multiple commits.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-06 21:59:23 +01:00
Alberto Escolar Piedras 6c1f8cf2a5 ci: bluetooth-tests: Also trigger on BT samples changes
Quite a few applications in samples/bluetooth
are part of the bluetooth regression run in simulation.
Changes to them should also trigger this CI workflow.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-06 21:20:38 +01:00
Purdea Andrei f4e0f9004f drivers: usb_dc_rpi_pico: implement remote wakeup support
This change implements the following, necessary for remote wakeup to be
supported:

- implement usb_dc_wakeup_request() call to trigger remote wakeup
- implement interrupts to detect supsended/resumed state
- implement extra logic to simulate resumed state when the resume
  is a result of remote wakeup. In this case the rp2040 chip doesn't
  send a USB_INTR_DEV_RESUME_FROM_HOST interrupt, or any other
  interrupts when the resume condition is detected to be extended
  by the upstream port, so we need to simulate this event when we
  see activity on the bus.

Signed-off-by: Purdea Andrei <andrei@purdea.ro>
2023-03-06 21:18:38 +01:00
Fabio Baltieri 3659017be1 MAINTAINERS: add an Input section
Add a maintainer section for Input.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Fabio Baltieri 456a1cab2f doc: api: overview: add an entry for input
Add an entry for the input subsystem, experimental, 3.4.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Fabio Baltieri 67ccf6d564 tests: input: add an initial input testsuite
Add some initial tests for the input subsystem, covering all the APIs in
both synchronous and thread mode.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Fabio Baltieri e82ddb75fb samples: add input_dump sample
Add a first input sample in the subsys/input directory. This just prints
any input event on the console.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Fabio Baltieri fce6eee760 doc: input: add the initial input subsystem documentation
Add the initial documentation for the input subsystem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Fabio Baltieri 3386e96515 input: add input subsystem
Initial commit introducing the input subsystem into Zephyr.

Includes the input_event data structure, the input_report_* APIs, an
iterables sections based subscription API and two operation modes:
synchronous, where the listeners are called directly, and asynchronous,
where the listeners are called in a dedicated thread.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Carles Cufi e073210ec2 scripts: runners: nrfjprog: Use --tool-opt in all operations
Pass on the tool-specific options to nrfjprog during all operations, and
not only when programming. This is useful when combined with options
like --ip, that allows west flash to be used over the network.

Fixes #55340.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-06 11:40:49 -08:00
Carles Cufi ba86759a79 scripts: runners: tests: nrfjprog: Test --tool-opt
Add tests for the --tool-opt command-line switch, to ensure that if the
user includes additional tool options those get passed on to nrfjprog at
the end of the command-line to override any preceding ones.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-06 11:40:49 -08:00
Carles Cufi 8fc87c87b8 scripts: runners: nrf: Add support for multiple nRF backends
Generalize the logic that was previously in nrfjprog.py into a new
nrf_common.py, which can then use specific tool subclasses, one of which
is nrfjprog.py, to implement the actual tool invocation.

This commit lays down the groundwork for the addition of a new backend
for nRF boards, the new nrfutil tool from Nordic. Both nrfjprog and
nrfutil will coexist in the immediate future, but nrfutil is expected to
be the sole tool for everything nRF in due time.  This is why the internal
representation of the operations is based in JSON and is using the exact
format that nrfutil expects when using the 'execute-batch' option, that
takes a JSON file with an array of operations to be executed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-06 11:40:49 -08:00
Carles Cufi c34da24596 scripts: west: runners: Support class hierarchies in the runners
Allow for multiple levels of inheritance in the runners in order to make
it possible to share common infrastructure in similar runners.
Also check if the class can be instantiated (i.e. it is not abstract) to
avoid returning abstract base classes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-06 11:40:49 -08:00
Alberto Escolar Piedras eed1c32d51 Samples: zbus: benchmark: Exclude nrf52_bsim
For the POSIX arch, this test relays on the native_posix RTC.
But that does not exist in the nrf52_bsim.
And without something to measure actual execution time,
it does not make sense to benchmark in the POSIX arch.
So disable this test for this platform,
and add a clear build error to warn users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-06 19:57:00 +02:00
Martí Bolívar 9c18b3854a doc: ztest: various fixes
This page is:

- using literal blocks [1] where it should be using code
  blocks [2], which won't produce the desired results [3]

- missing required whitespace between code block directives and their
  pygments syntax arguments [4]

  In other words, this:

    .. code-block::foo

  should be:

    .. code-block:: foo

- using an incorrect syntax (option:`CONFIG_FOO` or
  :kconfig:option:`CONFIG_FOO=y1) to refer to Kconfig
  options (should be :kconfig:option:`CONFIG_FOO`, etc)

Fix these issues so we get syntax-highlighted code blocks in the
correct pygments highlight syntax and valid references to Kconfig
options.

Adjust directive content indentation to match the usual .rst style and
make some grammar tweaks as well.

[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks

[2] https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block

[3] Use of literal blocks can produce the same results if there is a
    consistent choice of highlight language specified for the file, but
    this file is intermixing code blocks that should be highlighted as
    either C or shell commands, so there is no single choice of
    highlight syntax that works.

[4] https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#directives

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-03-06 09:14:02 -08:00
Yuval Peress cedeebec59 sensor: add unit tests for icm42688 interrupt
Add a test that verifies that when the INPUT GPIO fires, we get the
trigger callback.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Yuval Peress 8760829064 sample: add trigger support to sensor shell sample
Automatically add trigger callbacks to any sensor that supports the
data ready trigger. Use a window average in order to avoid too many
logs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Yuval Peress 622374651c boards: enable icm42688 interrupt in TDK robokit
Enable the interrupt gpio for the icm42688 on the TDK robokit

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Yuval Peress d6c45ad27b sensor: implement drdy trigger for icm42688
Add support for the data ready trigger in the icm42688 driver.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Seppo Takalo edae1bed3d drivers: kscan: Add driver for XPT2046
Add driver for Xptek XPT2046 resistive touch controller on SPI.
Only interrupt driven mode supported, does not do polling.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2023-03-06 17:21:17 +01:00
Ravi Dondaputi 0f601b8c00 wifi: shell: Rectify data type of beacon interval and DTIM period
Data types of beacon interval and DTIM period are defined
incorrectly.

dtim_period=1-255, so, unsigned char 802.11-202: 9.4.2.5.1 General.

beacon_interval=2 bytes, so, unsigned short: 802.11-2020 - 9.4.1.3
Beacon Interval field.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2023-03-06 17:20:43 +01:00
Erik Brockhoff 1d8acfe5fa Bluetooth: controller: fixing CIS establish flow for refactored LLCP
Latest modification to LLCP removed 'monitoring' of cis->established
flag in LLCP, relying instead on signal through ULL.

For this to work properly the signal must also be generated, so this is
introduced. Note - checking of cis->established flag could be removed
if caller ensures only calling once (on establish condition)

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2023-03-06 17:08:42 +01:00
Torsten Rasmussen 86ee761552 sysbuild: provide a Kconfig setting name for boot signature choice
Kconfig choices should have setting name so that their default
choice can be adjusted, for example by a board.

It further prevents the `defined with a prompt outside the choice`
warning when trying to re-source a Kconfig tree where choices are
create without a setting name.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-03-06 16:45:33 +01:00
Sylvio Alves 690f65dbd9 drivers: wifi: esp32: fix possible interface null pointer
esp32_wifi_dev_init() currently starts Wi-Fi stack before
the interface is properly configured, which happens in function
esp32_wifi_init(). This can trigger a ESP32_WIFI_EVENT_STA_START event
before interface initialization, causing a crash.
Moving esp_wifi_start() to esp32_wifi_init() will guarantee that
this won't happen.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-03-06 16:44:45 +01:00
Adrien Leravat 534b7ec78d doc: build: dts: fix small doc typo
`using west build` was repeated, and supposed to be `west build`.

Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
2023-03-06 16:44:16 +01:00
Hiroki Tada 01a44000e8 samples: die_temp_polling: Add esp32c3 overlay
- Add overlay for the esp32c3 board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32c3 dtsi.

Testing Environment:
esp32c3-devkitC-02

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-03-06 09:34:18 -06:00
Marcin Niestroj b03d27cca3 toolchain: esp32: support esp32s3 in 'espressif' toolchain
CROSS_COMPILE_TARGET is defined based on CONFIG_SOC selected. So far
'esp32s3' SoC was not taken into account, so building Zephyr with
'espressif' toolchain (the only one supported for now) is was not possible
out of the box.

Add 'CROSS_COMPILE_TARGET_xtensa_esp32s3' CMake variable, same as it is
done for other SoC specific variables. That way toolchain paths are
automatically figured out and building succeeds.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-03-06 13:52:55 +01:00
Chris Friedt 6841d96a59 tests: misc: iterable_sections: test alternate foreach
Add tests for `STRUCT_SECTION_FOREACH_ALTERNATE()`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-06 13:52:29 +01:00
Chris Friedt e684ed9f24 toolchain: common: iterable sections: add alternate foreach
Previously, it was possible to declare an iterable section using
the alternate form (where the `out_type` does not correspond
to the `struct_type`) but there was no convenient means to
iterate over them.

Add `STRUCT_SECTION_FOREACH_ALTERNATE()` to fill the gap.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-06 13:52:29 +01:00
Pavel Vasilyev eef9553669 docs: release: 3.4: Add exp support for new Bluetooth mesh draft specs
Add a note about added experimental support for new Bluetooth mesh
specifications.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Krzysztof Kopyściński 392f95705c tests: bluetooth: mesh: add Proxy Solicitation to shell
This adds commands to advertise Solicitation PDUs, configure
On-Demand Private Proxy and manage Solicitation PDU RPL.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-06 13:52:15 +01:00
Krzysztof Kopyściński d0995541fb Bluetooth: Mesh: add implementation for Proxy Solicitation
This is initial implementation of Proxy solicitation procedure.
This includes:
- support for sending and receiving Solicitation PDUs
- On-Demand Private Proxy functionality (Server and Client) controlling
  behaviour of node after receiving Solicitation PDU
- Solicitation PDU RPL Configuration (Server and Client), which manages
  Replay Protection List for Solicitation PDUs.

Proxy Solicitation allows to enable advertising of Proxy service on node
by sending Solicitation PDUs. These PDUs are not part of Mesh messages;
instead, these are non-connectable, undirected advertising PDUs with
their own format, containing Proxy Solicitation UUID.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-06 13:52:15 +01:00
Stine Akredalen 56298dff73 tests: Bluetooth: Mesh: add LCD metadata test. Refactor existing tests.
* Test that the Large Composition Data server can send a max access
payload metadata status message.
* Test that the Large Composition Data client can request large chunks
of metadata from the server, and correctly merge samples.
* Refactoring of existing LCD tests.

Signed-off-by: Stine Akredalen <stine.akredalen@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Michal Narajowski d95fe3f52b Bluetooth: Mesh: Add support for Models Metadata Page 128
This patch adds for handling Models Metadata Get Page 128.

Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Krzysztof Kopyściński 007bca7b63 Bluetooth: Mesh: Add Composition Data Page 1 to shell
Add parsing of Composition Data Page 1 and enable it's support.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-06 13:52:15 +01:00
Krzysztof Kopyściński 29f07abc89 Bluetooth: Mesh: Add Composition Data Page 1
Composition Data Page 1 contains information about relations between
models. Implementation saves relations into array of tuples
{ptr to base, ptr to extension, relation type} on model initialization
and uses this information to construct Composition Data Page 1.

Appropriate structures and methods were added to API, allowing user to
parse all received data into Composition Data Page 1 formats:
Composition Data Page 1 Element, Model Item, Model Extension Item.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-06 13:52:15 +01:00
Stine Akredalen 87a3e31412 Bluetooth: mesh: added OPcode aggregator Bsim test
The test checks the Opcode aggregator (SIG) model basic behaviour.

Signed-off-by: Stine Akredalen <stine.akredalen@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Michał Narajowski 0bd0071e4a Bluetooth: Mesh: Add Opcodes Aggregator models to shell
- Add entry for client and server in composition data.
- Add Client commands to aggregate and send messages.

MESH/SR/AGG/BV-02-C requires more key slots.

Co-authored-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Michał Narajowski da5195ea97 Bluetooth: Mesh: Add support for Opcodes Aggregator models
Includes Opcodes Aggregator Server and Client. To use Opcodes Aggregator
client features with some client model, that client should support async
API.

Co-authored-by: Ludvig Samuelsen Jordet <ludvig.jordet@nordicsemi.no>
Co-authored-by: Mia Koen <mia.koen@nordicsemi.no>
Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Pavel Vasilyev d46480c36b Bluetooth: Mesh: Add shell commands for Private Beacon Client
Add shell commands for Private Beacon Client.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Trond Einar Snekvik f9b19010ed Bluetooth: Mesh: Private Beacons
Adds support for private beacon sending and receiving.

Co-authored-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
Co-authored-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-06 13:52:15 +01:00
Krzysztof Kopyściński e2086c22bc tests: Bluetooth: Mesh: Test SAR with slowest possible timings
Add test that sends longest possible PDU with slowest possible timings
and default retransmission values.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-06 13:52:15 +01:00
Stine Akredalen 37386552d5 tests: Bluetooth: Mesh: added SAR stress test
Test that a maximum length SDU can be processed with SAR
with "stressed" transmitter and receiver configurations.

Signed-off-by: Stine Akredalen <stine.akredalen@nordicsemi.no>
2023-03-06 13:52:15 +01:00