Commit Graph

67773 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 60d3e487a3 soc: arc: snps_emsk/nsim: remove unused definitions
Remove definitions not used in any C unit throughout the tree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 754c022fa2 soc: arc: snps_arc_iot: define sysconf in DT
sysconf base address was hardcoded in <soc.h>. Create a new compatible
and define it in Devicetree, where hardware needs to be described.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 36ac01780e soc: arc: snps_arc_iot: delete unused soc_irq.h file
The definitions provided by this file seem to be unused throughout the
tree, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas ef502746c9 soc: arc: snps_emsdp/k: remove unused SYSCLK_DEFAULT_IOSC_HZ
The definition is not used, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 80457bdc84 soc: arc: snps_arc_iot: move SYSCLK_DEFAULT_IOSC_HZ to sysconf
sysconf source file is the only user of such definition, so move it
there.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 5f40a9f40f soc: arc: synopsys: move secure timer0 definition to DT
Use Devicetree to describe secure timer0 instead of hardcoding values in
<soc.h>.

DT files have been structured to match the following requirements: In
case of sectimer0 - it's should be only enabled for:

- emsdp_em7d_esp.dts
- em_starterkit_em7d.dts
- nsim_sem_mpu_stack_guard.dts
- nsim_sem.dts

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 44250fe3d3 soc: arch: synopsys: move timer0/1 IRQ information to DT
timer0/1 IRQ information was hardcoded in soc.h, however, Devicetree is
nowadays a better place to describe hardware. Note that I have followed
existing upstream Linux code to do these changes.

Ref.
- https://elixir.bootlin.com/linux/latest/source/arch/arc/boot/dts/
  hsdk.dts
- https://elixir.bootlin.com/linux/latest/source/Documentation/
  devicetree/bindings/timer/snps,arc-timer.txt

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 3f12689f4e soc: arc: snps_arch_hdsk: fix include list
Include what is necessary: <zephyr/init.h> and a platform specific
architecture header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 247d5acdf9 dts: arc: synopsys: move intc out of cpus node
interrupt controller is not a CPU, move it to the root node.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas 82ce3e566d soc: arc: snps_arch_hdsk: remove unused pinmux definitions
Pinmux definitions were not used, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Nickolas Lapp 3feebd6571 Nordic nRF GPIO: Fixup race condition in GPIO pin Toggle
This PR fixes up a race condition which could cause GPIO writes to be
dropped when one thread was toggling a gpio on a port, and a different
thread was also modifying a (different) gpio on the same port.

Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
2022-08-03 12:39:02 +02:00
Piotr Pryga e9ea1b0e68 Bluetooth: df: fix ref antenna repeat after switch pattern exhausted
Direction finding functionality does antenna switching during CTE
reception in AoA mode and CTE transmission in AoD mode. Antennas are
switched according to user provided antenna switch pattern. If a CTE
length is enough to exhaust all antenna ids in a switch pattern then
Radio should loopback to reference antenna and continue from switching
from it.

Current implementation loops back to wrong antenna due to wrong index
used in GUARD_REF_ANTENNA_PATTERN_IDX. It was set to one instead of
zero. Zero is the index of reference antenna in Host provided antenna
switching pattern array.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-08-03 12:37:59 +02:00
Jan Kuliga a830ba149d boards: arm: nucleo_f303re: Add lacking board-level spi dt description.
The nucleo_f303re board has a SoC equipped with spi. Add lacking
devicetree, doc and yaml description.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2022-08-03 12:06:20 +02:00
Jan Kuliga 133d2351e7 boards: arm: nucleo_f303re: doc: Fix board type typo.
The current board's documentation includes a board type typo.
Change the board type to the proper one.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2022-08-03 12:06:20 +02:00
Jan Kuliga db204d2770 boards: arm: nucleo_f303re: Add lacking board-level i2c dt description.
The nucleo_f303re board has a SoC equipped with i2c. Add lacking
devicetree and yaml description.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2022-08-03 12:06:20 +02:00
Daniel DeGrasse 8db6e41af7 tests: drivers: sdhc: update SDHC test to new ZTEST api
Update SDHC test to use new ZTEST api.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-03 12:06:02 +02:00
Daniel DeGrasse 5671c7749a tests: sdmmc: fix SDMMC test order
SDMMC test requires that initialization test run first. Fix test name
to ensure it runs before other tests in suite.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-03 12:06:02 +02:00
Julius Barendt e54cc1f6d1 tests: fpu_sharing/generic: Remove qemu_leon3 workaround
This workaround is no longer needed as sparc stack footprint
is reduced in this commit:
5cf2083e8b87f918a522423a1659ae58137ceea0

Signed-off-by: Julius Barendt <julius.barendt@gaisler.com>
2022-08-03 12:05:49 +02:00
Julius Barendt 42da90f6bf SPARC: reduce z_thread_entry_wrapper
Transfer the entry point and initial parameters in the callee_saved
struct rather than on the stack. This saves 48 byte stack per thread
and simplifies the logic.

Signed-off-by: Julius Barendt <julius.barendt@gaisler.com>
2022-08-03 12:05:49 +02:00
Vinayak Kariappa Chettimada 6a41330650 Bluetooth: Controller: AD data fragment operation review rework
Added define PDU_AC_EXT_AD_DATA_LEN_MAX, maximum AD data
length possible in AUX_ADV_IND when all Common Extended
Header Format fields are populuted.

Updated function description to explain the added ADI and
Aux Ptr fields support in updating the auxiliary PDUs.

Remove the redundant CTE info population code unnecessary
for new chain PDU as a result of AD data overflow.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 76396496b6 Bluetooth: Controller: Minimal time reservation for aux and sync
Use minimal time reservation for auxiliary and sync PDU
reception. A peer device could be scheduling multiple
advertising sets in a short duration with small PDUs hence
using the minimal time reservation would avoid skipping
closely scheduled reception of multiple auxiliary PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada e6c8aaf629 Bluetooth: Controller: Refactor DF impl to add aux offset in ULL context
Refactor DF implementation to add aux offset in the aux
pointer field of the parent PDU when chain PDU is added
and/or is duplicated when PDU contents are updated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada d34cfb2929 Bluetooth: Controller: Add Extended Scan Resp Data fragment operation
Add implementation to support Extended Scan Response Data
fragment operation of first, intermediate, last, unchanged
and complete data operation using the HCI LE Set Extended
Scan Response Data Command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 1ed0ae3c81 Bluetooth: Controller: Minor scan response implementation refactor
Minor refactor of scan response implementation to rename sr_pdu
to sr_pdu_prev, and aux_pdu to sec_pdu_prev etc.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 97bb30ea59 Bluetooth: Controller: Add Extended Advertising Data fragment operation
Add implementation to support Extended Advertising AD Data
fragment operation of first, intermediate, last, unchanged
and complete AD data operation using the HCI LE Set Extended
Advertising Data Command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada aa5c0c0a90 Bluetooth: Controller: Rename Kconfig to BT_CTLR_ADV_AUX_PDU_BACK2BACK
Rename Kconfig BT_CTLR_ADV_PDU_BACK2BACK to
BT_CTLR_ADV_AUX_PDU_BACK2BACK to represent use of
back-to-back for Extended Advertising PDU chaining support
similar to BT_CTLR_ADV_SYNC_PDU_BACK2BACK that is used to
represent the use of back-to-back for Periodic Advertising
PDU chaining support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada efe1b1dda4 Bluetooth: Controller: Fix missing AD Data Set fragment operation
Fix missing AD data set fragment operation implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 349d27ebc7 Bluetooth: Controller: Fix sync set_clear to return aux_ptr reference
Update ull_adv_sync_pdu_set_clear() to return aux_ptr
reference so that aux_ptr field for chain PDUs can be
pupulated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada ccab45f9ad Bluetooth: Controller: Add defines for ext adv header field offsets
Add defines for Extended Advertising Common Extended Payload
Format field offsets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 4c94227b1d Bluetooth: Controller: Minor refactor to move ULL after LL functions
Minor refactor to reorder and move ULL functions after the
LL functions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 84450d8981 Bluetooth: Controller: Duplicate and add aux offset to chain PDU in ULL
Refactor PDU chaining implementation to add aux offset in
the aux pointer field in the parent PDU when duplicating
chain PDUs.

By adding the aux offsets in the ULL execution context the
LLL prepare execution in Extended and Periodic Advertising
does not need to have a O(n) while loop in LLL execution
context.

This will reduce CPU use in the highest priority ISR
compared to current implementation where chain PDUs where
duplicated in ULL execution context and aux offset populated
in LLL execution context.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada b689f18079 Bluetooth: Controller: Cleanup periodic adv chaining aux ptr population
Cleanup Periodic Advertising Chain PDUs auxiliary pointer
population, populate the back to back auxiliary pointer
field in thread context. Also, removed an unused code for
filling data.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 3edf487f6a Bluetooth: Controller: Set/Clear function to enqueue aux PDU in caller
Refactor the ull_adv_aux_hdr_set_clear function so that the
caller of the function will enqueue the auxiliary PDU when
enqueuing the primary PDU.

This change is required to support chaining of AD Data where
parent auxiliary PDU will be added with aux ptr fields when
chain PDUs are appended.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 49abc04d41 Bluetooth: Controller: Fix Periodic Adv Sync from preemption
Fix Periodic Advertising Synchronization from being
preempted by an overlapping Auxiliary PDU scan event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada a40a403a0d Bluetooth: Controller: Fix skipped Periodic Sync radio events
Fix skipped Periodic Advertising Sync radio events due to
increased CPU use during pre-emption in LLL from a Scan
radio event to Periodic Advertising Sync radio event by
increasing EVENT_OVERHEAD_START_US value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 5071ba4157 Bluetooth: Controller: Fix continuous scan initiator from being aborted
Fix to prevent a transmitted CONNECT_REQ PDU from being
aborted mid-air when initiator is using continuous scan
window that do not use time reservation. A different state
or role that overlaps the connection initiation requesting
for an abort should be denied when CONNECT_REQ PDU has been
enqueued for tranmission by the radio.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 3eb0c448be Bluetooth: Controller: Fix directed adv connection setup stall
When directed advertising and continuous scanning are
simultaneously active, and a connection request is received
by the directed advertising state then the connection was
not established due to the done event not being generated.

Done event from the directed advertising state was not
generated because the prepare pipeline only had resume
event which does not get scheduled when there is prepare
event of the continuous scan state.

The fix is to explicitly abort all pending prepare and
resume event in the pipeline for the directed advertising
state when connection request is received.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Vinayak Kariappa Chettimada 6b98d33ea6 Bluetooth: Controller: Minor refactor to move initialization
Minor refactor to move initialization close to locality of
reference.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-03 12:02:47 +02:00
Anas Nashif 31e0d86484 samples: do not use CONFIG_TEST_EXTRA_STACK_SIZE
samples should not use CONFIG_TEST_EXTRA_STACK_SIZE, instead, they
should set the recommended stack size directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-03 11:22:20 +02:00
Anas Nashif d60e3123cb tests: TEST_EXTRA_STACK_SIZE depend on test
Make the option TEST_EXTRA_STACK_SIZE depend on Tests, otherwise it will
appear in each generated .config file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-03 11:22:20 +02:00
Anas Nashif 51cb40e5b3 tests: ztest: move TEST_LOGGING_FLUSH_AFTER_TEST under ztest
This config option is only used with ztest, so move it under ztest.
Otherwise it appears in .config when you build ANY application.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-03 11:22:20 +02:00
Veijo Pesonen ebaf501de9 samples: net: lwm2m: overlay for interop testing
For further details about interoperability testing please see

   * https://lwm2m.openmobilealliance.org/ - Test V1.1 12-Sep-2019

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-08-03 11:20:50 +02:00
Veijo Pesonen 0b57ba8dcb net: lwm2m: remove EXPERIMENTAL-label from v1.1
Version 1.1 support is not experimental anymore.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-08-03 11:20:50 +02:00
Hake Huang 6dbd89bae7 test: dma: sg fixing source address alignment issue
in NXP platform, src address shall be 4 bytes alligned
adding this restricting to test cases

fixing: #48512

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-08-03 11:20:10 +02:00
Andriy Gelman 9f77926b26 tests: gpio_api_1pin: Test interrupt re-entry if level unchanged
Currently the level triggered test disables the interrupt in
the first callback. This doesn't test interrupt re-entry if the
gpio level is unchanged.

This commit adds an option to disable the interrupt after
several calls and adds two tests with the extra condition.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-08-03 11:19:35 +02:00
Gerard Marull-Paretas a650c6c554 pm: policy: allow multiple subscribers to latency changes
Current API allowed to get notified when the maximum system latency
changes, however, a single callback was allowed. The design was intended
for SoC specific actions when latency changes. However, in some cases
drivers may also want to know the current maximum latency to perform
local actions if other parts of the system modify it.

This patch updates the API with a pair of subscribe/unsubscribe calls to
achieve such goal. Tests have been updated to show how the API can be
used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 11:19:17 +02:00
Gerard Marull-Paretas 41a00438cb pm: policy: keep microseconds resolution
When new latency requirements are introduced/updated, the microseconds
value gets converted down to ticks. Ticks usually have a coarse
resolution compared to the microseconds scale. This is fine for making
PM state change decisions, however, when getting notified about latency
changes, we may want to know the real value in microseconds, even if the
system rounds to ticks internally. This patch stores the value in both
us and ticks (in ticks to cache the conversion, really), so that the
user will get notified with precise latency values.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 11:19:17 +02:00
Yinfang Wang 0e1cc6977f tests: subsys: shell: move shell to new ztest API
Move test shell to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00
Yinfang Wang 5ac55c18d9 tests: subsys: shell: move shell_history to new ztest API
Move test shell_history to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00
Yinfang Wang dba6bbb727 tests: subsys: shell: move shell_flash to new ztest API
Move test shell_flash to use new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-08-03 11:19:08 +02:00