Commit Graph

62855 Commits

Author SHA1 Message Date
Jamie McCrae 9ecc7ddff8 doc: Add link to J-Link virtual MSD disable for SMP
Virtual MSD J-Link support on some development boards has caused an
issue with SMP due to limiting the maximum size of UART data via the CDC
endpoint, add a link to the SMP documentation and smp_svr sample
application on how to disable MSD functionality and resolve the issue.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-04 13:03:33 +02:00
Vinayak Kariappa Chettimada 36c4c64675 Bluetooth: Controller: Workaround nRF52840 Revision 3 Errata 191
Add workaround for nRF52840 Revision 3 Errata 191. Removed
workaround for fixed nRF52840 Engineering Revision A Errata
164.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 13:03:08 +02:00
Juha Heiskanen 164680d696 net: lwm2m: Senml Opaque BASE64URL support and fix padding
LwM2M specification is only mentioning BASE64 encoding but SenML-JSON
specification is talking about BASE64URL encoding.
This change is silently accepting both formats and automatically pads the
data if padding is dropped.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-04-04 11:16:26 +02:00
Joakim Andersson 52be3030aa drivers: hwinfo: Remove HWINFO_NRF limitation for non-secure config
Remove the limitiation in HWINFO_NRF not working in non-secure
configuration. Use the exposed soc_secure_read_deviceid function
that accesses the device ID through the secure services.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 11:15:28 +02:00
Joakim Andersson 4b80afdd27 drivers: ieee802154: Use secure services
Allows the setting of ieee802154 EUI64 address in non-secure processing
environment by reading the FICR device ID through the secure service.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 11:15:28 +02:00
Joakim Andersson 02bd034255 soc: nordic_nrf: Add soc_secure_read_deviceid
Add soc_secure_read_deviceid function for reading the device ID from
FICR when executing in non-secure processing environment.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 11:15:28 +02:00
Joakim Andersson 6a14a0233b soc: nordic_nrf: Refactor soc_secure handling
Refactor soc_secure handling to not use TF-M directly in the header.
Move from nRF53 to common since nRF91 also supports TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 11:15:28 +02:00
Henrik Brix Andersen 28d9278358 tests: drivers: can: test can_get_core_clock() and can_get_max_bitrate()
Add tests for can_get_core_clock() and can_get_max_bitrate() API
functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-04 11:15:10 +02:00
Henrik Brix Andersen 49424574c5 drivers: can: handlers: can_get_max_bitrate() is an optional
The can_get_max_bitrate() is an optional API function. Limit validation
to the CAN device driver pointer.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-04 11:15:10 +02:00
Bartosz Bilas b9f635426d doc: networking: net_mgmt: s/net_mgmt_notify/net_mgmt_event_notify
net_mgmt_event_notify function should be used instead of net_mgmt_notify
since the second one does not exist anymore.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-04-04 11:15:00 +02:00
Kamil Gawor 54c9a3b8e9 Bluetooth: Controller: Fix b2b rx shorts
This fixes Radio Rx when switching back-to-back is
used and device support CTE. For the CTE reception we need to use
PHYEND->DISABLE short instead of END->DISABLE short.
Using NRF_RADIO_SHORTS_PDU_END_DISABLE short handles
both cases.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-04-04 11:14:52 +02:00
Kamil Gawor c2a0d7f761 Bluetooth: Controller: Improve handling iq samples in DTM
This adds improvements in handling IQ samples
in the Direct Test Mode.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-04-04 11:14:44 +02:00
Vinayak Kariappa Chettimada 7b9ef30b53 tests: Bluetooth: bsim: Increase to 250 simultaneous connections.
Increase to 250 simultaneous connections in the BabbleSim
test. Update connection interval to accommodate 250
non-overlapping connections and a scan window. And make the
use of is_disconnecting flag consistent between central and
peripheral sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 10:24:34 +02:00
Vinayak Kariappa Chettimada 992d133b42 Bluetooth: Increase supported maximum simultaneous connection to 250
Increase the supported maximum simultaneous connection to
250, tested under BabbleSim simulations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 10:24:34 +02:00
Vinayak Kariappa Chettimada cfc44101a6 Bluetooth: Controller: Update to increase simultaneous connection limit
Update Controller to use uint16_t instead of uint8_t to
allow buffer counts to exceed beyond 255. Also fix pointer
arithmetic from being restricted to uint16_t that prevented
calculating the memory index for large offsets. This will
now allow support for 250 simultaneous connections, limited
by ticker_id type being uint8_t.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 10:24:34 +02:00
Vinayak Kariappa Chettimada 8ef4cfc577 Bluetooth: Controller: Force MD feature not supported in LOW LAT ULL
Add Kconfig dependency to disable use of Force MD feature
when using LOW LAT ULL variant of the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 10:24:19 +02:00
Vinayak Kariappa Chettimada 018f59e46f Bluetooth: Controller: NULL structure fields before release to pool
NULL structure fields before releasing memory back to pool.
Add assertion check to prevent NULL pointer dereferencing of
node rx.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-02 15:40:09 +02:00
Erik Brockhoff 046ef86e7a bluetooth: controller: optimizing random get in encryption procedure
Utilizing packed location of SKDm/s and IVm/s to only call
csrand_get() once

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-02 15:40:02 +02:00
Erik Brockhoff e42d453e3e bluetooth: controller: use global ull_conn_event_counter() in procedures
Replace the use of local event_counter() functions with one defined
in ull_conn.c

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-02 15:40:02 +02:00
Erik Brockhoff 0a9b4a41c7 bluetooth: controller: test: removing TODO and un-skip ctrl-hci unittest
No longer skip this test case
Remove TODO re. chmap test
Def'ing out CENTRAL API tests as ull_central is mocked
Fix rssi test case
Fix feature_exchange_wrong_handle test case

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-02 15:40:02 +02:00
Erik Brockhoff 045735787d bluetooth: controller: removing 'no-brainer' TODOs from refactored LLCP
Getting rid of TODOs that are fairly straight forward to resolve
* introduce role checks in ENC API
* Remove ASSERT on re-rx of LL_VERSION_IND, ignore instead
* in tests/.../ctrl_chmu: rename variable and initialize initial ch map
* in tests/.../mock_ctrl/util.c: Changing TODO into FYI
* in tests/.../helper_features.h update mask and remove TODO comment
* in ull_llcp_remote.c: re-order cases in proc_with_instant switch
* in ull_conn_upd.c: PARAM REQ only uses REJECT_EXT_IND
* in ull_llcp_common.c: in CENTRAL on rx of LL_MIN_USED_CHANNELS_IND
     chose to do nothing re. channel map. Update unit test accordingly

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-02 15:40:02 +02:00
Erik Brockhoff 628d3224f9 bluetooth: controller: removing 'empty' TODO's from refactored LLCP
Cleanup, removing TODOs that should just be removed

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-04-02 15:40:02 +02:00
Emil Gydesen 9dd7efa4f1 samples: Bluetooth: Add broadcast audio sink sample
Add sample for the Basic Audio Profile (BAP) broadcast
audio sink role, that can scan for a receive audio
data over ISO from BAP broadcast sources.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-02 15:39:48 +02:00
Emil Gydesen a84d2b2e1a samples: Bluetooth: Add broadcast audio source sample
Add a sample using the Basic Audio Profile (BAP)
broadcast source role, that advertises mock audio
data over ISO.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-02 15:39:48 +02:00
Stephanos Ioannidis 8779dbf56f Revert "gh: actions: Triggger the do not merge after manifest runs"
This reverts commit 4bb3039560, which is
no longer necessary because the manifest action now has the required
permissions to trigger another workflow.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-02 09:20:14 -04:00
Stephanos Ioannidis cb331139a8 ci: manifest: Use 'zephyrbot' token to run manifest action
This commit updates the CI manifest workflow to run the manifest action
as the 'zephyrbot' user instead of the 'github-actions' user.

The 'github-actions' user does not have the permissions required to
trigger another workflow and fails to trigger the "Do Not Merge"
workflow when it (un)labels a pull request with the "DNM" label.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-02 09:20:14 -04:00
Andrzej Głąbek 586e26e8fc soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options
Instead of selecting appropriate HAS_HW_NRF_* options for particular
nRF SoCs (and simulated nRF52 target), set their values basing on
information from devicetree.
Correct also semantics of those options so that they are set only when
a corresponding DT node is enabled. This allows using them directly in
Kconfig dependencies of Zephyr drivers for nRF peripherals. Update
appropriately these dependencies.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek f80e572750 dts: nordic: Add properties indicating certain peripheral features
Add boolean properties to the binding for the nRF RADIO peripheral
to indicate whether the following features are supported:
- IEEE 802.15.4 mode
- 2 Mbps BLE mode
- coded BLE PHY
- high TX power settings
Set these properties appropriately in devicetree radio nodes for all
nRF SoCs.

Add also such properties and set them in appropriate nodes for nRF
flash controllers to indicate whether they support partial erase.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek 451a6ed6ab modules: hal_nordic: Refactor nrfx related Kconfig options
Change dependencies of the Kconfig options that enable particular nrfx
drivers so that the drivers and their instances are available when
a devicetree node with a corresponding compatible property exists,
no matter if it is enabled or not.
Change the options that enable compilation of multi-instance drivers
to be promptless helpers only (not directly configurable for users),
as they need to be enabled only together with some options that enable
particular instances of a given driver, and those options select them
as needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek bc26629ba8 dts: nrf: Rename "nordic,nrf-watchdog" compatible to "nordic,nrf-wdt"
For consistency with the scheme used for other nRF peripherals,
use the peripheral name that nRF Product Specifications use.
In this case, it is WDT, not WATCHDOG.

Also remove the requirement for the label property in the binding.
It is no longer needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek cd00a3a3c9 scripts: kconfigfunctions: Redefine dt_nodelabel_has_compat()
The function in its current form is confusing because unlike other
similarly named functions (dt_nodelabel_has_prop(), dt_node_has_prop())
or devicetree macros (DT_NODE_HAS_COMPAT(), DT_NODE_HAS_PROP()), this
function takes into account the status of the checked node and returns
"y" only when the node is enabled.
This commit redefines dt_nodelabel_has_compat() so that it no longer
checks the node status, and for cases where the previous functionality
is needed, a new function named dt_nodelabel_enabled_with_compat()
is introduced as a replacement.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek 9f2a27b3e0 scripts: kconfigfunctions: Add dt_has_compat()
Add a function for checking if any node with a given compatible exists,
no matter if its status is "okay" or not.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek b4b2b2ef98 boards: nrf52: Suppress DTC warnings about duplicate unit-address
Prevent "unique_unit_address_if_enabled" warnings from being reported
for nRF52 Series SoCs, where certain nodes need to be enabled with
the same base addresses. These can be (depending on a given SoC):
- power@40000000 & clock@40000000
- power@40000000 & clock@40000000 & bprot@40000000
- acl@4001e000 & flash-controller@4001e000

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek ab281b5c40 boards: nrf51: Suppress DTC warnings about duplicate unit-address
Prevent "unique_unit_address_if_enabled" warnings from being reported
for nRF51 Series SoCs, where certain nodes need to be enabled with
the same base addresses. These are:
- power@40000000 & clock@40000000 & mpu@40000000

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek 56a1ac3817 dts: Add missing nodes and bindings for peripherals present in nRF SoCs
Add missing devicetree nodes representing the following peripherals
in nRF SoCs:
- ACL
- BPROT
- CCM
- COMP/LPCOMP
- CTRLAP
- DCNF
- MPU (nRF MPU peripheral in nRF51 Series, not ARM MPU)
- MUTEX
- MWU
- NFCT
- OSCILLATORS
- POWER (in nRF51 and nRF52 Series)
- PPI
- RESET
- SWI
- USBREG
Add also corresponding bindings and validation of base addresses of
these nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek 79cc5a96bd dts: nrf5340: Use dual compatible property for mbox nodes
This is a follow-up to commit cf6a58d3f6.

Restore the "nordic,nrf-ipc" compatible property in mbox nodes for both
nRF5340 cores and use it together with the new "nordic,mbox-nrf-ipc"
one. This way either the MBOX or the IPM driver can be used for these
nodes without further modifications. This eliminates the need to use
overlays in quite a few cases, so remove all those no longer needed
ones (which are also a bit confusing now as they refer to no longer
existing ipc@2a000 and ipc@41012000 nodes).

Restore also the ipc node label removed in the commit mentioned above,
as the label is used in validation of base addresses of nRF DT nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
David Leach 314e8484e2 hal: nxp: Centralize handling of SDK custom sections
The NXP SDK defines CodeQuickAccess and DataQuickAccess sections
for locating critical items that need faster access. Centralize
the handling of these sections instead of doing it per SOC.

Fixes #44453

Signed-off-by: David Leach <david.leach@nxp.com>
2022-04-02 13:30:44 +02:00
Anas Nashif 6e8cb0d155 MAINTAINERS: do not use orphaned terminology
an area without maintainer is still considered active, calling it orphan
is a bit extreme. We have some areas that can be considered "orphaned",
those now will be covered with 'odd fixes' status, meaning that they
might have one or more collaborator and getting some changes from time
to time, but nothing beyond fixes and nobody driving the area beyond
where it is right now.

Even an area with a dedicated maintainer can be have the status of 'odd
fixes', i.e. there is a maintainer but the area is stale and no further
development is happening.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-01 17:16:41 -04:00
Anas Nashif 43d3dfb7c5 boards: add maintainer to the platform yaml file
Each board needs to have a maintainer to allow automatic assignment and
adding reviewers when pull requests concerning the platform are being
submitted.

This is now a placeholder so we can start adding maintainers early, the
data is not being used anywhere yet.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-01 17:16:41 -04:00
Anas Nashif 033e301e10 ci: compliance: skip codeowner checks
Do not check for CODEOWNER file changes, we are moving away to
MAINTAINERs.yml file instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-01 17:16:41 -04:00
Gerard Marull-Paretas ee91cd5665 drivers: pwm: add Doxygen in/out tags to parameters
Indicate wether pointer parameters are input or output. This information
is useful for API users.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas f0f541e6cb drivers: pwm: improve some Doxygen docstrings
Make some docstrings a bit more clear/concise.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas cc2411f644 drivers: pwm: use UINT32_MAX for overflow checks
Some values are limited to 32-bit, UINT32_MAX can be used to check if
they overflow.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas ab71d26a87 drivers: pwm: improve include list
- sort includes (libc, zephyr)
- make header self-contained
- remove redundant includes

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 59ecdcef02 drivers: pwm: improve formatting
Improve formatting (parameters alignment, declarations, etc.).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas a7706c5d44 drivers: pwm: group all capture APIs together
Group all capture APIs together for better readability. Previous to this
patch, get_cycles() as placed at the end.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 149e863c18 drivers: pwm: use essentially boolean expressions
s/if (err)/if (err < 0)

Ref. MISRA rule 10.1.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 14a2c584d4 drivers: pwm: improve error handling code and docs
Do not convert get_cycles_per_sec() failures to -EIO, just propagate the
failure code since the failure is not handled. As a consequence, all
Doxygen docstrings have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 0edd98af49 drivers: pwm: make API dereferencing homogeneous
Always use const pointer (dev->api is const)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 42c05b7f38 drivers: pwm: hide API ops from public documentation
Hide all API ops (typedefs and struct) under INTERNAL_HIDDEN. This is
information required by drivers only, not API clients.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00