Commit graph

73200 commits

Author SHA1 Message Date
Francois Ramu
5b2d80ca18 tests: drivers: stm32g0 clock control with APB1_2 RCC register
Change the name of the STM32_CLOCK_BUS_APB2 RCC resgister
of the stm32g0 to STM32_CLOCK_BUS_APB1_2
in the testcase for the stm32g0 device.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 10:21:18 -06:00
Francois Ramu
c7b55b4e39 dts: arm: stm32g0 has a APB peripheral bus clock on 2 registers
The stm32G0 device has a one APB peripheral clock bus
but splitted on two RCC registers: RCC_ABPENR1 and RCC_ABPENR2
Peripherals are on one or the other.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 10:21:18 -06:00
Stephanos Ioannidis
e11d82ba31 ci: doc-build: Disable PDF documentation build for pull requests
This commit disables the PDF documentation build for pull request CI
runs because the HTML documentation build already validates the
documentation changes and the PDF build takes significantly longer than
the HTML build.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-12-14 01:13:45 +09:00
Stephanos Ioannidis
264afa8ae7 ci: doc-build: Increase PDF documentation build timeout
This commit increases the timeout for PDF documentation build job from
45 minutes to 60 minutes because it can occasionally take more than 45
minutes on the GitHub Actions hosted runners.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-12-14 01:13:45 +09:00
Erwan Gouriou
33d14f49a6 boards: nucleo_g0b1re: enables HSI48 clock for USB
Enables the HSI48 clock on the nucleo_g0b1re platform.
Fix warning when building USB related samples.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-13 08:23:57 -05:00
Dominik Ermel
72db5c09c0 samples/smp_svr: Switch to ZCBOR_MAP_DECODE_KEY_DECODER
Swithc zcbor_map_decode_bulk to use ZCBOR_MAP_DECODE_KEY_DECODER
macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-13 11:42:02 +01:00
Dominik Ermel
fc7b5a551f tests/mgmt/mcumgr/zcbor_bulk: Use ZCBOR_MAP_DECODE_KEY_DECODER
Replaces ZCBOR_MAP_DECODE_KEY_VAL with ZCBOR_MAP_DECODE_KEY_DECODER
in test and adds equivalency test between
ZCBOR_MAP_DECODE_KEY_VAL and ZCBOR_MAP_DECODE_KEY_DECODER.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-13 11:42:02 +01:00
Dominik Ermel
550b6d518d mgmt/mcumgr: zcbor_bulk: Allow spaces in map keys
The CBOR encoding allows strings to have white spaces, and as string
may be used as key it should also be allowed to use space in key.
The commit provides ZCBOR_MAP_DECODE_KEY_DECODER macro, which is
intended to replace ZCBOR_MAP_DECODE_KEY_VAL macro, that allows
to use string keys with spaces in it.
Both macros are available for now.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-13 11:42:02 +01:00
Aaron Massey
5e33f833ed fuel_gauge: Fix sbs_gauge err to conform to API
The SBS fuel gauge driver did not return a count of the number of
properties that failed.

Fix this and add a test that verifies the sbs_gauge returns the number of
failing properties as well as a test that verifies a negative return code
if all properties failed.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2022-12-13 11:10:44 +01:00
Erwan Gouriou
13acbf1b68 samples: blinky_pwm: Add nucleo_l476rg support
Enable use of nucleo_l476rg on this sample using a dedicated overlay.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-13 10:01:11 +00:00
Huifeng Zhang
12fa8335a3 drivers: gicv3: add zephyr kernel header file
zephyr kernel header file should be included otherwise gcc will report
the warning: implicit declaration of function 'k_aligned_alloc' and
the return value of 'k_aligned_alloc' will be treated as an int type,
which will cause an error on the 64 bits platform.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-12-13 18:08:40 +09:00
Carlo Caione
e1e06d05fa ipc: static_vrings: Zero config struct
Initialize the config struct to zero before passing down to OpenAMP.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-13 09:44:44 +01:00
Henri Xavier
45af717a66 arch/arm64: Implement ASID support in ARM64 MMU
Improves context-switch performance.

TLB invalidation and the nG bit are used conservatively. This could
be improved in future work.

Tested with tests/benchmarks/sched_userspace:

BEFORE:
```
Swapping  2 threads: 161562583 cyc & 1000000 rounds ->   1615 ns per ctx
Swapping  8 threads: 161569289 cyc & 1000000 rounds ->   1615 ns per ctx
Swapping 16 threads: 161649163 cyc & 1000000 rounds ->   1616 ns per ctx
Swapping 32 threads: 163487880 cyc & 1000000 rounds ->   1634 ns per ctx
```

AFTER:
```
Swapping  2 threads: 18129207 cyc & 1000000 rounds ->    181 ns per ctx
Swapping  8 threads: 49702891 cyc & 1000000 rounds ->    497 ns per ctx
Swapping 16 threads: 55898650 cyc & 1000000 rounds ->    558 ns per ctx
Swapping 32 threads: 58059704 cyc & 1000000 rounds ->    580 ns per ctx
```

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-12-13 17:21:11 +09:00
Henri Xavier
2d96beb9d8 tests/benchmarks: Add userspace scheduling benchmark
Zephyr already has a scheduling benchmark in tests/benchmarks/sched,
but it only uses kernel threads.
We add an userspace version of it, to exercise memory domains.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-12-13 17:21:11 +09:00
Francois Ramu
444ddfe268 samples: Use immediate logging mode in nvs sample
Applying same fix as for watchdog relmated samples
in https://github.com/zephyrproject-rtos/zephyr/pull/52949/
Switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.Do not direct printk to logging subsystem in the sample.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 17:20:38 +09:00
Stephanos Ioannidis
0e5762e56e scripts: compliance: Fix misdetection of Kconfig choices as undefined
This commit updates the KconfigCheck to add the Kconfig symbols from
both "config" and "choice" symbol lists to the defined symbol list, as
opposed to the "config" list only, in order to prevent any references
to the choice symbols outside the Kconfig files (e.g. in documentation)
from being reported as undefined.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-12-13 17:20:10 +09:00
Yuval Peress
85a7d0cc46 maintainers: remove obsolete self
I'm no longer actively involved in these platforms and should not
be automatically added as reviewer.

Signed-off-by: Yuval Peress <peress@google.com>
2022-12-12 23:08:49 -05:00
Ryan McClelland
e2742af6ed tests: drivers: build_all: add build for i3c_cdns
The Cadence I3C has no in-tree board with it to built with. This
adds a test build-only for the cadence i3c peripheral attaching
with the qemu_cortex_m3 board as that appears to be generic
enough.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
672a401f20 i3c: add cdns i3c driver
This gives initial support to the cadence i3c controller

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
371470d608 i3c: GETMWL and GETMRL may be optionally supported if no settable limit
According to section 5.1.9.3.5 and 5.1.9.3.6 of the I3C Specification
v1.1.1. This CCC is may be optionally supported if the target device
has no settable limit.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
e48dc11ee0 i3c: add NBCH header flag for private transfers
According to section 5.1.2.2.2 of the I3C Specification v1.1.1. A
controller may skip the 0x7E broadcast header for private
transfers as an optimization if it is know that no I3C Target on
the bus has a spike filter.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
59ee3f1a79 i3c: fix macro generation with multiple devices
When generating an array of devices with I3C_DEVICE_ARRAY_DT_INST
and I3C_I2C_DEVICE_ARRAY_DT_INST when the number of devices is
greater than 1, a comma was not inserted between each struct with
macro. This would give an error preventing compiling.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
1eb3f15d11 i3c: add write to tx fifo target api
Some controllers will "automatically" NACK any read request to them
if there is no data in the TX FIFO. This would prevent use of the callback
function read_requested_cb which is expected to be called from an ISR.
i3c_target_tx_write was added to give applications a direct way to load
data in to the tx fifo.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Ryan McClelland
b7dc01cd48 i3c: rename is_primary to is_secondary
Rename is_primary to is_secondary. The justification for this is
because it is less likely to have something configured to be
secondary, and the 0 value would be if it is primary.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2022-12-12 15:51:16 -05:00
Erwan Gouriou
428700f709 drivers: gpio: stm32: Keep port clock in input configuration
When pin is configured in input mode, clock is also required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-12 15:50:21 -05:00
Vinayak Kariappa Chettimada
5fab7a5173 Bluetooth: Controller: Fix MIC failure transmitting LL_CIS_REQ PDU
Fix MIC failure transmitting LL_CIS_REQ PDU.
The MAXPACKETSIZE value was not set with using Long Control
PDUs.

Relates to commit e895948047 ("Bluetooth: Controller: Add
Long Control PDU support").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:44:40 +01:00
Vinayak Kariappa Chettimada
88d94a5b8b Bluetooth: Controller: Remove duplicate code in nRF5 radio HAL
Remove duplicate PPI/DPPI configuration in
radio_tmr_start_now() which reuses radio_tmr_start_us().

And other minor refactor to remove unnecessary conditional
compilation of a define.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:44:22 +01:00
Vinayak Kariappa Chettimada
dfb5988da2 Bluetooth: Controller: Fix dynamic tx power for Broadcast ISO
Fix compilation error for ISO Broadcaster with dynamix Tx
power support, and remove setting tx power for ISO
Synchronized Receiver.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:44:06 +01:00
Vinayak Kariappa Chettimada
0dfa37b7e1 Bluetooth: Controller: Add internal comments in BIS LLL code
Add internal comments explaining the control flow in the
BIS synchronization in LLL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Vinayak Kariappa Chettimada
b5d089fb48 Bluetooth: Controller: Receive starting at selected BIS and skip others
Updated implementation to save power consumption by
scheduling BIG event starting at the first BIS selected for
synchronization. Also, skip reception of any unselected
BISes in between multiple BISes that the Broadcaster is
transmitting. Added advance calculation of next subevent
channel index.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Vinayak Kariappa Chettimada
9a51ece3fd Bluetooth: Controller: Fix BIS subevent channel indices
From Bluetooth Core Specification v5.3 Vol 6 Part B Section
4.4.6.8 Channel indices,

The subevent number se_n shall be set to the values 1 to
NSE, in order, for the subevents on a given BIS - the same
values shall be used for all the BISes in a BIG - and to 1
for the control subevent.

Hence, fix implementation to reset back to se_n to 1 when
next BIS PDUs are transmitted in the subevents.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Vinayak Kariappa Chettimada
9660f52dc7 Bluetooth: Controller: Fix Broadcast ISO PDU receive connection handle
Fix broadcast ISO PDU receive connection handle. The look up
was using BIS index instead of the index of the selected
stream that is being received.

Example, when receiving BISes 2 and 4, only the connection
handle for BIS 2 was correct and connection handle lookup
was out-of-bounds for BIS 4; symptoms being that Host
dropped the received ISO PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Vinayak Kariappa Chettimada
46ead9915d Bluetooth: Controller: One extra ISO rx buffer for empty PDU reception
Budget for one extra ISO Rx PDU buffer for empty/NULL PDU
reception that has to always remain free in order to be able
to setup radio h/w for new PDU receptions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Vinayak Kariappa Chettimada
554ea0bae3 Bluetooth: Controller: Fix missing cssn and cstf flag initialization
Fix missing cssn and cstf flag initialization in ISO
Broadcast LLL implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-12-12 18:43:47 +01:00
Carlo Caione
d540cf8877 openamp: Add new Kconfig option to enable dcache
Currently OpenAMP is unconditionally compiled with the options to use
the vrings cache operations disabled.

Add a new CONFIG_OPENAMP_WITH_DCACHE Kconfig option to enable the
support for d-cache operations in OpenAMP when needed.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-12 18:41:01 +01:00
Ravik Hasija
22e2b004df drivers: serial: Add Driver for CDNS UART IP6528
Adding New Serial/UART driver for Cadence UART IP6528.

Signed-off-by: Ravik Hasija <ravikh@fb.com>
2022-12-12 12:19:35 -05:00
Marco Argiolas
3540ae1df9 drivers: sensor: bmm150: fix mispelling
Build error appearing only when enabling CONFIG_BMM150_PRESET_LOW_POWER

Signed-off-by: Marco Argiolas <marco.argiolas@ftpsolutions.com.au>
2022-12-12 10:54:40 -06:00
TOKITA Hiroshi
33900ab99e dts: riscv: gd32vf103: Correct wrong clock configuration for dma1
The `dma1` node had used GD32_CLOCK_DMA0.
Correct it to GD32_CLOCK_DMA1.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 15:15:40 +00:00
Witold Lukasik
c7acd98bf4 usb: device: update logging module registration
Update logging module registration and remove LOG_LEVEL macro
for USB device classes.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2022-12-12 15:57:35 +01:00
Andrzej Głąbek
c097872718 include: drivers: adc: Refactor the ADC_CHANNEL_CFG_DT() macro
Add a default value (0) used for the `input_positive` field of the
`adc_channel_cfg` structure when there is no `input-positive` property
specified in the DT node for a given channel.
This solves a problem that occurs when an ADC driver that requires
analog inputs to be specified (so it selects ADC_CONFIGURABLE_INPUTS)
is used together with an ADC driver that does not use the corresponding
fields of the `adc_channel_cfg` structure. With the previous form of
the macro, the DT nodes with channel configuration for the latter
driver would need to specify the `input-positive` property, though its
value would be ignored, otherwise a build error would occur.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-12-12 15:57:15 +01:00
Siyuan Cheng
9a7ed58b25 arc: add XY mem support
The XY Memory is a feature commonly found in DSP processors to increase
the DSP performance. The XY component allows a ARC processor to
implicitly load source operands and store results into a closely coupled
memory using a single instruction.

Add XY memory for ARC EM9D/EM11D processors including em_starterkit,
em_starterkit_em11d. emsdp_em9d, nsim_em, iotdk.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2022-12-12 14:38:13 +00:00
Dominik Ermel
6effadd773 tests/mcumgr/zcbor_bulk: Add additional test platforms
ARM plaftorms added.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-12 15:01:11 +01:00
Dominik Ermel
0fdae69f25 tests/mcumgr/zcbor_bulk: Add test for map in map decoding
The zcbor_map_decode_bulk is able to decode embedded CBOR types
like maps in maps, but this has been missing proper tests.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-12 15:01:11 +01:00
Gregers Gram Rygg
d5987756e7 drivers: flash: spi_nor: release notes for fix flash busy during init
Add release notes for #51662.

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2022-12-12 15:00:37 +01:00
Johann Fischer
a01fbd0731 sample: usb: shell: add keybord harness string
Add keybord harness string to sample.yaml file.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-12 15:00:20 +01:00
Jani Hirsimäki
5a93a25158 net: l2: ethernet: ethernet support for AF_PACKET/SOCK_RAW/IPPROTO_RAW
Setting the protocol type for raw IP packets to be sent so that they
can be passed to Ethernet.

Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
2022-12-12 14:56:07 +01:00
Fabio Baltieri
d75607f234 boards: riscv: add Seeed Studio xiao_esp32c3
Add Seeed Studio xiao_esp32c3, an ESP32-C3 based board using the XIAO
form factor.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-12-12 14:55:59 +01:00
Mariusz Skamra
a68f78526d Bluetooth: audio: tbs_client: Fix misleading error log
This fixes error log that has been shown if number of calls in the list
was equal to CONFIG_BT_TBS_CLIENT_MAX_CALLS.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-12-12 14:55:41 +01:00
Hang Fan
ebcfa196fc Bluetooth: audio: fix invalid ase state transition
When Receiver Stop Ready operation has completed, the Unicast Server
may request to terminate a CIS and set source ASE state to Qos
configured state immediately. But after CIS disconnected completed,
it will transition source ASE state from Qos Configured to Disabling
state. It's invalid and will cause assert.

we should add Streaming and Enabling state check when CIS disconnected.

Signed-off-by: Hang Fan <fanhang@xiaomi.com>
2022-12-12 14:55:32 +01:00
Brian Dunlay
491933b185 drivers: wifi: eswifi: Guard net_ctx state change
Previously, a call to set the net_context state was added here to
accommodate a new KConfig scenario that permitted disabling offload
sockets. This code path is used by both local and offloaded sockets.
While it is necessary to update the state of the net_context for a
locally managed socket, setting the net_context for an offloaded socket
is an error, as the net_context is invalid (in fact, it points to a
hard-coded dummy socket), as observed in #52346 and #38544.

A prior commit (a9ac0a88) attempting to remedy the offload socket
scenario removed this line, which resulted in problems for the local
socket scenario. The socket never got updated to the connected state,
and thus was unusable.

Adding this guard allows the eswifi socket to set the socket net_context
only if the socket is NOT offloaded.

Signed-off-by: Brian Dunlay <brian@nubix.io>
2022-12-12 14:55:03 +01:00