Commit graph

51756 commits

Author SHA1 Message Date
Shubham Kulkarni
a24707a4bd esp32: Add config options in Kconfig.board, remove _heap_start symbol
This commit adds config options for supporting multiple memory
allocation using k_malloc()

Update west.yml with hal_espressif change

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-05-05 08:46:35 -04:00
Shubham Kulkarni
67d2368398 esp32: SPIRAM Support
Adds SPIRAM support for ESP32

Configures k_heap for SPIRAM memory range

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-05-05 08:46:35 -04:00
Krzysztof Chruscinski
61a2e8cee3 tests: lib: cbprintf: Extended to test C++
Extended test suite to be run for C++

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-05 08:45:43 -04:00
Krzysztof Chruscinski
6f227698bb lib: os: cbprintf: Improve C++ support in static packaging
Added C++ replacements for macros that are using _Generic
keyword.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-05 08:45:43 -04:00
Tim Lin
caa3328cc7 ite: drivers/pinmux: modify pinmux driver
Modify the pinmux control method and add support the fun3
& fun4 alternation function.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-05-05 08:45:16 -04:00
Maureen Helm
05a68b1604 samples: fs: Extend littlefs sample to mimxrt1060_evk board
Adds the mimxrt1060_evk board to the platform_allow list for the
littlefs sample application.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-05 08:44:00 -04:00
Maureen Helm
b1cd3e8ed6 samples: mgmt: Extend smp_svr sample to mimxrt106x_evk boards
Adds mimxrt1060_evk and mimxrt1064_evk boards to the platform_allow list
for the smp_svr sample application.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-05 08:44:00 -04:00
Maureen Helm
dd9c656961 boards: arm: Document flash driver support on mimxrt106x_evk boards
Documents QSPI flash driver support on mimxrt1060_evk and mimxrt1064_evk
boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-05 08:44:00 -04:00
Maureen Helm
62e3298bed boards: arm: Add mcuboot and flash storage partitions to mimxrt1060_evk
Adds flash partitions and chosen nodes to the mimxrt1060_evk device tree
to support mcuboot and storage on the external QSPI flash. This flash is
rated for 100K minimum program-erase cycles per sector, therefore this
partition configuration supports approximately 100K / (3072/128) = 4167
upgrades.

Also enables FlexSPI flash driver XIP mode support on this board to
support mcuboot.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-05 08:44:00 -04:00
Maureen Helm
6a9dc2ae57 boards: arm: Add mcuboot flash partitions to mimxrt1064_evk
Adds flash partitions and chosen nodes to the mimxrt1064_evk device tree
to support mcuboot on the internal QSPI flash. This flash is rated for
100K minimum program-erase cycles per sector, therefore this partition
configuration supports approximately 100K / (1984/64) = 3225 upgrades.

Also enables FlexSPI flash driver XIP mode support on this board to
support mcuboot.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-05 08:44:00 -04:00
Fabio Baltieri
0a56ced423 boards: stm32_min_dev: convert to dt based clock config
Convert the stm32_min_dev boards to the new device tree based config
setup.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-05-05 08:42:53 -04:00
Fabio Baltieri
525a235fb3 clock_control: stm32f1: fix STM32_PLL_XTPRE check
This is always defined since:

755d09e149 include/drivers/clock_control: stm32: Update for STM32F1
support

So the condition has currently no effect and causes the prescaler to
always be set to /2.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-05-05 08:42:53 -04:00
Francois Ramu
3a93f9bcc9 dts: arm: stm32l1 has a fixed lsi clock of 37kHz
Correct the clock freq of the lsi for the stm32l1

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-05-05 08:42:21 -04:00
Vinayak Kariappa Chettimada
08a679dc4c Bluetooth: controller: Add Broadcast ISO related timing macros
Added Broadcast ISO related timing macros, like T_MSS
Minimum Subevent Space.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:41:40 -04:00
Vinayak Kariappa Chettimada
03c191c281 Bluetooth: controller: Add function to calculate BIS access address
Added a function to calculate the BIS SubEvent access
addresses.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:41:09 -04:00
Vinayak Kariappa Chettimada
3469171041 Bluetooth: controller: Add function to calculate seed access address
Added utility function to calculate seed access address.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:41:09 -04:00
Vinayak Kariappa Chettimada
544acb9804 Bluetooth: controller: Fix missing EVENT_TICKER_RES_MARGIN_US
Fix missing use of EVENT_TICKER_RES_MARGIN_US in Periodic
Synchronization.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:40:44 -04:00
Vinayak Kariappa Chettimada
0da63124d2 Bluetooth: controller: Add ticker allocation for BIG events
Add ticker node allocations for BIG radio event scheduling.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:40:28 -04:00
Vinayak Kariappa Chettimada
12f04da828 Bluetooth: controller: Minor rename in BIS PDU data members
Renamed offset and offset_units to offs and offs_unit to be
consistent with rest of the other structures.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:40:06 -04:00
Vinayak Kariappa Chettimada
eb5874ca7b Bluetooth: controller: Fix ULL reference decrement on done event
Fix ULL reference count decrement to be performed before the
done events are handled, so that correct reference count is
used to determine if events are pending in the pipeline.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:39:41 -04:00
Vinayak Kariappa Chettimada
b0bba245ea Bluetooth: controller: HCI: Allow processing a list of events
Update HCI driver implementation in the controller to
process a list of controller events by traversing net buf
frags.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:39:25 -04:00
Vinayak Kariappa Chettimada
323b8efe75 Bluetooth: controller: Reorder feature bits
Reorder Channel Selection Algorithm #2 and Minimum Number of
Used Channels Procedure bits.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:38:56 -04:00
Vinayak Kariappa Chettimada
4eca1a821c Bluetooth: controller: Add ticker allocation for BIG Sync events
Add ticker node allocations for BIG Sync radio event
scheduling.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:36:43 -04:00
Vinayak Kariappa Chettimada
415e068e16 Bluetooth: controller: Conditional compile ISO Tx functions
Conditional compile ISO Tx related declarations and
implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 08:36:27 -04:00
Eduardo Montoya
a47677da06 net: openthread: add CSL transmitter API
This commit implements the OpenThread APIs to pass MAC keys and
frame counter to the radio layer in order to process the
transmission security. This is needed for the correct functioning
of a CSL transmitter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-05-05 14:33:47 +02:00
Vinayak Kariappa Chettimada
a4d2e062cb Bluetooth: controller: Fix regression in central initiated terminate
Fix regression in central initiated terminate introduced in
commit 3a80785947 ("Bluetooth: controller: Fix connection
terminate to happen on event done").

The regression caused an additional central connection event
transmitting PDU  after the previous connection event had
received acknowledgment for the terminate_ind PDU from the
peripheral.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:21:05 +02:00
Andrzej Kaczmarek
b8dfecfdc5 Bluetooth: conn: Fix invalid ref on conn object
We should unref conn object if skipped during lookup.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:20:05 +02:00
Emil Gydesen
3e6ea470a1 Bluetooth: ISO: Additional text for setting unidir values for the CIG
Add additional text to explain why we use the TX values if RX is
disabled and vice versa.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-05-05 14:19:38 +02:00
Andrzej Kaczmarek
5652d59393 tests: Bluetooth: bsim: Add test for initaiting conn on ext adv
advx will do connectable advertising using ext adv, scanx will try
to connect.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
1d2babfa85 tests: Bluetooth: bsim: Handle consecutive connection in tests
If we want to test conn on legacy and ext adv, we need scanx to
handle connection more than once. Change local flag to global and
let it indicate whether we want scanx to initaite connection when
device is scanned.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
48735a30e9 tests: Bluetooth: bsim: Fix conn ref
'disconnected' callback always unrefs conn object, but this is only
valid if connection was created in scanx since app owns reference to
that conn object. In case of advx, app does not own any reference so
should not unref.

Basically we do not really need to hold any reference to conn object
in either scanx or advx so just drop reference immediately after conn
is created in scanx, no need to worry about it later.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
7eabf1cdf2 Bluetooth: host: Add adv parameters def for connectable ext adv
This is the same as for legacy, but with ext adv flag.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
e5ffc18507 Bluetooth: controller: Do not report Aux PDUs while initiating
Do not report auxiliary PDUs as advertising reports when in
initiator state on auxiliary channels.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
472169befa Bluetooth: controller: Ensure both 1M and Coded PHY can initiate
Ensure that the advertiser address type and address is setup
in both 1M and Coded PHY scanning instance when extended
create connection is enabled on both the PHYs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
a6b8eba7c5 Bluetooth: controller: Implement disabling the other PHY initiator
When connection is initiated in one of either 1M or Coded
PHY initiating scan instance then the other scanning
instance's scheduling and memory allocation needs to be
cleaned up.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
9eb5f85870 Bluetooth: controller: Reserve an additional node rx for Ext. Initiator
Reserve an additional node rx buffer when Extended Initiator
is supported as the received ADV_EXT_IND PDU is being
buffered in the auxiliary channel scanning instance and is
only released/flushed in the done event of the initiating
auxiliary channel radio event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
236755198b Bluetooth: controller: Rename use of params to param
Rename the use of params word with param.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
6f2d4a4458 Bluetooth: controller: Fixes and use of defines related to initiator
Fixed incorrect LLL context used to generate done event for
auxiliary channel scanning. Other minor comments and fixes.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Vinayak Kariappa Chettimada
031aa8c340 Bluetooth: controller: Ensure only initiating on selected PHY
Reset the scanning context for the PHY not selected in the
Extended Create Connection command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
0b04dd7221 Bluetooth: controller: Add support for initiator on secondary adv ch
This allows to initiate a connection on secondary advertising channels,
i.e. when advertises uses advertising extensions.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
c47396abd9 Bluetooth: controller: Fix aux scanning for connectable ADV_EXT_IND
When in initiating state we need to handle ADV_EXT_IND as in regular
scan sice we always want to scan AUX_ADV_IND in order to be able to
connect.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
37b79ff229 Bluetooth: controller: Fix 1st connection event offset
We need to take RX chain delay and PHY used to send CONNECT_IND into
account when calculating 1st connection event offset.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
2ab25f67fe Bluetooth: controller: Use proper transmitWindowDelay for central
On secondary advertising channel transmitWindowDelay depends on PHY
used to create connection so we need to adjust it.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
e58800267f Bluetooth: controller: Add public helpers for scan checks
We will need the same checks for AdvA and TargetA/InitA in lll_scan_aux
so let's make them public and use address explicitly instead of passed
via pdu.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Andrzej Kaczmarek
95b693965e Bluetooth: controller: Refactor CONNECT_IND prepare to separate func
We can use the same code to create both CONNECT_IND and AUX_CONNECT_REQ
since they are basically that same PDUs.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-05-05 14:15:05 +02:00
Ioannis Glaropoulos
0eb3b3c2c0 tests: arm_thread_swap_tz: correct dt overlays for stm32 boards
Correct thee dt overlays for the STM32 boards, so the Zephyr
image starting address is in accordance with what TF-m expects
it to be.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Ioannis Glaropoulos
b7c964da48 tests: arm_thread_swap_tz: decrease work delay to ensure test passing
Decrease the submitted work delay, to ensure that the PSA
crypto operation will be preempted when the work fires. The
modification is required for devices with fast crypto
operations. Also minor corrections to the test ase name,
so it is not the same with the other arm_thread_swap test.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Ioannis Glaropoulos
a1c6fbbfec doc: release notes: release notes entry for non-blocking secure calls
Add an entry in the release notes regarding the
support for non-blocking secure calls in Zephyr.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Øyvind Rønningstad
17442cece9 tests: arm: Add arm_thread_swap_tz test
For testing secure->non-secure thread swapping.
This also tests that the FP context is correctly preserved
when calling a secure function.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Øyvind Rønningstad
aed0643705 trusted-firmware-m: Store FP context before entering secure calls
When ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled, if FPU is
being used (CONTROL.FPCA == 1), store all FP registers before
entering the secure function, and restore them afterwards.

This is needed if any NS thread or ISR that interrupts the secure
function uses FP registers. If they do, a secure UsageFault occurs
unless this change is applied.

This allows k_sched_lock() and k_sched_unlock() to be dropped when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled.

Enable ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS by default when
building TF-M.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 13:00:31 +02:00