Commit graph

64802 commits

Author SHA1 Message Date
Enjia Mai
2674c44a59 twister: passing a pty pararmeter to intel_adsp runner
Add a pty parameter from twister to intel_adsp when west-flash,
to tell the intel_adsp runner to change the way it outputs the
log.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-06-05 14:13:57 +02:00
Enjia Mai
01b0c73ece soc: intel_adsp: add a client-server based cavstool tool
The cavstool_client.py is a client use to communicate with
the firmware loading and running server which dealing with
the requests from the intel_adsp west runner. It supports:

1. Download firmware to remote ADSP host and running.
2. Send the ADSP log messages back to client.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-06-05 14:13:57 +02:00
Enjia Mai
12c44aaec7 scripts: runner: add a intel_adsp west runner
Add a intel_adsp west runner instead of using misc-flasher for
intel_adsp boards. Now running the test on intel_adsp_cavs by:

  west build -b intel_adsp cavs25 ...
  west flash --remote-host [remote hostname or ip addr] \
             --rimage-tool [path to rimage tool] \
             --config-dir [path to dir of .toml config file] \
             --key [path to signing key]

The intel_adsp west depends on the cavstool_server.py running
on the remote host machine.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-06-05 14:13:57 +02:00
Yong Cong Sin
c7267dc26a drivers: modem: gsm: remove mux_enabled flag and checks
mux_enabled check in the gsm_configure is unnecessary since it
is init and scheduled by gsm_ppp_start which means that the
mux must be disabled. The IS_ENABLED(CONFIG_GSM_MUX) check
should be good enough to determine whether or not the
mux_enable function should be ran.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-06-05 14:13:45 +02:00
Yong Cong Sin
b7eb2202e3 drivers: modem: gsm: introduce lock
After the introduction of start/stop & rssi query work, these
additional functions can be invoked from different threads.

Things can quickly become hard to analyze when an interrupt
fires during one of these functions and upon return the
scheduler schedules another thread and run another function.

This PR introduces a simple mutex lock that guarantees thread
safety. Similar implementation can be found in hl7800 driver,
which has lots of public APIs that can be invoked from different
threads.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>

Update gsm_ppp.c
2022-06-05 14:13:45 +02:00
Yong Cong Sin
975bc85b14 drivers: modem: gsm: move the rssi query an individual function
Move the rssi query part out from the rssi_handler work item as
an individual function, so that it can be used directly without
referencing the work.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-06-05 14:13:45 +02:00
Emil Gydesen
edb30d53d9 Bluetooth: Audio: Fix issues with unicast audio group lifetime
The unicast audio group can not have streams removed after the
CIG has been created as part of the QoS set procedure.

The bt_audio_unicast_group_remove_streams function may
leave the unicast group without streams, and thus the
check for "free" group was not correct, and has been replaced
with a simple boolean value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
f05e608f9a samples: Bluetooth: Add tx support for unicast audio server
Add support to send mock data on any source endpoint/streams
configured by the client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
0334853e42 samples: Bluetooth: unicast_audio_server multi-cis support
Add support for multiple CIS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
21903ab65f samples: Bluetooth: Update unicast audio client to multi-cis
Add support for setting up, configuring, and using
multiple CIS in the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
2baa0ba710 Bluetooth: Audio: Use bidirectional CIS for unicast audio
The unicast client and server will attempt to use a
bidirectional CIS instead of two unidirectional CIS
whenever possible.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
cc94fa763b Bluetooth: Audio: Make bt_audio_codec_qos_to_iso_qos return void
Change the return type of bt_audio_codec_qos_to_iso_qos to
void as it cannot fail, and this will make it easier to use.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
f77355aaa5 Bluetooth: Audio: Add sink/source ep ref to bt_audio_iso
Add supporting for referercing either a sink endpoint,
a source endpoint or both in the bt_audio_iso struct.

This way a single bt_audio_iso can have references to up
to 2 endpoints.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
e8e1920577 Bluetooth: Audio: Move ISO struct from audio_endpoint
Moves the bt_iso_chan and bt_iso_chan_qos structs
out from the bt_audio_ep struct, and instead use a
reference.

This is due to the fact that an endpoint can ever
only be unidirectional, and a CIS can be bidrectional.

The support for using a single bididrectional CIS
for two audio streams/endpoints is not implemented
in this commit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Michal morsisko
ddc4854d27 boards: Added E73-TBB board
This commit adds support for EBYTE E73-TBB.
This board features Nordic nRF52832 chip.
It was tested with several samples such as blinky and buttons.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2022-06-05 14:12:56 +02:00
Emil Gydesen
73e8fd6684 Bluetooth: ISO: Move iso_server NULL check for inc. reqs
Move the NULL-check for the iso_server to an earlier point.
There's no need to do anything on the device if no iso_server
has been registered.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Emil Gydesen
e2e56da061 Bluetooth: Shell: Add security level option to "iso connect"
The "iso connect" now also takes a security level option like
"iso listen", so that the central can easily encrypt
and connect a CIS in a single command.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Emil Gydesen
57e1056bef Bluetooth: ISO: Guard sec_level with CONFIG_BT_SMP
The ISO security implementation works by verifying
against the acl (bt_conn) sec_level field. The
bt_conn sec_level field is only available
if CONFIG_BT_SMP is enabled, so this commit
adds guards for all ISO security checks as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Emil Gydesen
b3cddc6d27 Bluetooth: ISO: Central security request
If the required_sec_level is lower than the
conn->sec_level, the central will now initialize the
security procecure to ensure that the CIS is encrypted
properly.

The algorithm implemented is as follows:
1) Check security levels for each (acl, iso) pair
2) For those with insufficient security,
   call bt_conn_set_security
3) For those with sufficient security, connect the CIS
4) Once the ISO from 2) has been encrypted, connect the
   CIS for the specific ACL

The idea behind this was to implement similar support
for autonomous encryption as we have for L2CAP.
It is more complex for ISO as we are dealing with
an array of (acl, iso) pairs, meaning more can go
wrong.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Emil Gydesen
2ace9cb256 Bluetooth: ISO: Add server security check
Add check for connection and server security
levels, and reject the CIS if the ACL security
level is too low.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Chen Peng1
d8fa857b19 LLVM: add built-in lld linker support for x86.
add support to use LLVM built-in lld linker to build
zephyr applications for x86 platforms.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-06-05 14:10:25 +02:00
Martí Bolívar
da6549c452 VERSION: bump to 3.1.99
Following our usual convention, setting PATCHLEVEL to 99 indicates
that the branch is now in the development phase towards the next
release. 3.1.99 itself is not a real zephyr release version.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-05 13:19:10 +02:00
Martí Bolívar
2ddd73feaf release: Zephyr 3.1.0
Update versions for release v3.1.0.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-05 13:19:10 +02:00
Martí Bolívar
dccf0e4e4e doc: api: update overview page
Update the versions modified based on the commit logs.

I'm guessing this hasn't been done in a while.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-05 13:19:10 +02:00
Martí Bolívar
e27565e34d doc: release: 3.1.0 notes are no longer a working draft
Remove that from the title.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
3ba2078761 doc: release: manually curate list_issues.py output
Apply suggestions from Dan Kalowsky to clean up extraneous issues
included in the script's output.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
d0db31abe1 doc: releases: unify disjoint issue related sections for v3.1.0
There are three lists of issues in the release notes:

- security vulnerabilities which received CVEs
- other open bugs
- resolved issues

(Here, "issue" is a strictly more general term than "bug": every bug
is an issue, not every issue is a bug. This is GitHub-specific
jargon.)

The current structure is awkward. Clean it up by unifying the
lists under a single top level section and cleaning up the distinction
between issues and bugs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
f9d8165d3d doc: releases: unite disjoint bluetooth sections for v3.1.0
For some reason, there are two different sections covering bluetooth.
This is clearly incorrect; fix it by moving the content into a single
section.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
aea7696e6a doc: releases: fix location of "new APIs" content for v3.1.0
This needs to be in the "API changes" section, instead of in a
"Bluetooth" section where it currently is.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
5889b5ba86 doc: releases: fixes for v3.1.0
Make a pass through the file, trying to fix as many issues as possible
with how the notes are written. This includes fixes for tense and
invalid .rst role usage, as well as removal of any sections which have
missing content.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
ce091d30d0 doc: releases: known issues for v3.1.0
Every release notes page includes a section for known issues.

In previous releases, we have linked to a GitHub query which displays
open issues. The problem with this approach is that the information
immediately goes stale, making this section's content less than useful.

We can do better now that we have a bug snapshot workflow and a script
capable of dumping snapshot contents in the same almost-rst-format
used by list_issues.py.

Use it as follows to archive the known open bugs at time of release:

$ wget https://builds.zephyrproject.io/zephyr/bug-snapshot/zephyr-bugs-2022-06-03.pickle.xz
$ unxz zephyr-bugs-2022-06-03.pickle.xz
$ ./scripts/dump_bugs_pickle.py zephyr-bugs-2022-06-03.pickle

Then copy paste the output into the release notes and handle .rst
escapes in the same way has previously been done for closed issues
since the last release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
b964f0b156 scripts: add dump_bugs_pickle.py
This prints the contents of a zephyr-bugs-$DATE.pickle file in a
format similar to the output of list_issues.py.

It will be useful to have this in tree so that we can better record
the known issues at the time of a particular zephyr release.

The pickle file itself should be created using the bug snapshot
workflow defined in .github/workflows/bug_snapshot.yaml, which can be
triggered manually from this URL:

https://github.com/zephyrproject-rtos/zephyr/actions/workflows/bug_snapshot.yaml

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
3c9e977347 doc: releases: resolved issues for v3.1.0
Follow along with the release checklist (#43286) like this:

$ ./scripts/release/list_issues.py -o zephyrproject-rtos -r zephyr -s
2022-02-22 -f issues.txt

Then copy issues.txt into the right place in the doc, and clean up the
resulting .rst errors by properly escaping and converting the markdown
format used in github issue titles.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Andrzej Głąbek
1491ab181b doc: release-notes-3.1: Add entry about dt_nodelabel_has_compat
Add information about redefined Kconfig preprocessor function
dt_nodelabel_has_compat.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 13:48:49 -07:00
Andrzej Głąbek
e7163cde62 doc: release-notes-3.1: Add more entries in ADC and PWM driver sections
Add information about new ADC facilities and about significant changes
in nRF PWM drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 13:48:49 -07:00
Martí Bolívar
5c6aaf709c doc: release: build and infrastructure for v3.1
Two significant highlights are the build system internals revamp and
the new Zephyr SDK.

Fixes: #46221

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 09:24:51 -07:00
Johann Fischer
f2e2bbd864 doc: release-notes-3.1: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-06-03 16:23:46 +02:00
Krzysztof Chruscinski
540d26a010 release_notes: Add section about Logging and Shell
Update release_notes section for logging and shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Krzysztof Chruscinski
605822d775 release_notes: Update section about Counter driver
Add information about changes in counter driver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Krzysztof Chruscinski
2b01713f81 release_notes: Add section about utilities
Add information about UTIL_LISTIFY deprecation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Vinayak Kariappa Chettimada
f31b974243 Bluetooth: Host: Fix incorrect ACL buffer count
Fix incorrect ACL buffer count use when Controller used
supports separate ISO buffers.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-03 15:11:33 +02:00
Andrzej Głąbek
a5265c56b2 doc: releases: Add GPIO and I2S release notes for v3.1
Add release notes related to GPIO and I2S drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 14:58:06 +02:00
Carles Cufi
2464bfe40d doc: relnotes: Add timer relnotes
Just a couple of mentions to relevant changes.

Closes #46222.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-03 14:57:39 +02:00
Carles Cufi
5fd8a59c72 doc: relnotes: Add SPI release notes
Not much activity, but a few changes to remark on the relnotes.

Closes #46218.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-03 14:57:39 +02:00
Herman Berget
ed0dfb9dd2 Bluetooth: Host: Fix ATT PDU alloc being non-blocking.
The API is documented as being blocking. Making it nonblocking was an
unintentional API change.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 14:41:09 +02:00
Herman Berget
e494d9c072 Bluetooth: Host: Handle err in l2cap_chan_sdu_sent and l2cap_chan_seg_sent
The error will be propagated to the higher levels.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 12:52:16 +02:00
Herman Berget
eff10664bd Bluetooth: Host: Do not require the ops->sent callback
The L2CAP channel ops->sent callback was required to call the
l2cap_chan_sdu_sent callback.

Previously, the only difference between the l2cap_chan_sdu_sent and
l2cap_chan_seg_sent callbacks was that l2cap_chan_sdu_sent called
ops->sent. This is no longer true and l2cap_chan_sdu_sent should always
be called when an SDU is sent.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 12:52:16 +02:00
Herman Berget
bbe5143b95 Bluetooth: Host: Call bt_conn_tx callback with error in error cases
This allows the higher layers to to any required cleanup.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 12:52:16 +02:00
Herman Berget
5e93b3f192 Bluetooth: Host: Free ATT metadata before calling user callback
In case the user callback tries to allocate metadata for a new ATT PDU.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 12:52:16 +02:00
Herman Berget
695e5915f8 Bluetooth: Host: Add err parameter to bt_conn_tx_cb_t
This gives more information back to the supplier of the callback.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-06-03 12:52:16 +02:00