Commit graph

41120 commits

Author SHA1 Message Date
Ioannis Glaropoulos
38216b100c boards: nrf5340_dk_nrf5340: boot Network MCU from Application MCU
We add the functionality that allows the nRF5340 Application
MCU to boot the Network MCU by releasing the RESET line. The
Application MCU may optionally allocate and corfigure resources
that the Network MCU is going to use (currently GPIO and secure
attribution) if running in secure mode. Non-Secure Application
MCU firmware can only issue Network MCU resets.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 21:45:27 +01:00
François Delawarde
4ca408ed6a bluetooth: host: refactor ccc settings handling
Move functions in order to avoid function prototype and use IS_ENABLED
instead of #if defined where possible.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-11-08 21:29:23 +02:00
François Delawarde
a51986616e bluetooth: host: add ability to load CCC settings on demand
This commits adds a BT_SETTINGS_CCC_LAZY_LOADING option to allow for
CCC settings to be loaded on demand when a peer device connects in
order to reduce memory usage.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-11-08 21:29:23 +02:00
François Delawarde
42eb629188 bluetooth: host: refactor sc settings handling
Move functions in order to avoid function prototypes.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-11-08 21:29:23 +02:00
François Delawarde
fd10c4c962 bluetooth: host: do not remove SC entry when peer subscribed and paired
Maintain Service Changed entry as long as the peer device is subscribed
to SC indications and bonded. This allows to save indication data for
disconnected peers peers when CCC settings are not available (loaded
on-demand).

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-11-08 21:29:23 +02:00
Ioannis Glaropoulos
b0c8293bf8 boards: arm: nrf5340 dk: add documentation for nRF5340 DK board
We add supportive documentation for the nRF5340 DK board.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
9d52f798c5 bluetooth: controller: define SW IRQ structure for nRF53 SoCs
Extend the nRF5-specific SW IRQ framework to support nRF53.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
fb56d56dc9 bluetooth: controller: setup nRF53 DDPI configuration for Coded PHY
This commit provides the DPPI configuration for the Radio
driver for nRF5340 SoC, supporting LE Coded PHY.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
17859e1eee bluetooth: controller: setup DDPI configuration for nRF5340
This commit provides the DPPI configuration for the Radio
driver for nRF5340 SoC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
0186c66ac3 bluetooth: controller: enable support for nRF53 when building radio.c
Add the require #ifdef blocks in radio.c, in order to support
building for nRF53 SoC series (and, in particular, for nRF5340
CPU1 SoC).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
1b3039ef1a bluetooth: controller: include nRF5340-specific radio header
Conditionally include nrf5340_radio.h when building the
BLE controller for nRF5340 SoC. Introduce the header for
nrf5340.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
2c2e2b678b boards: nrf5340_dk_nrf5340: enable BT CTLR if building with BT
When building with support for BLE stack, enable
the BLE Controller module for the nRF5340 DK NRF5340
CPUNET (Network MCU).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
04e66dab53 bluetooth: host: add nRF53 in HW variants
This commit adds a string representation of the
nRF53 variant in bluetooth host.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
613e716e11 bluetooth: controller: enable support for nRF53 in Kconfig
This commit enables support in bluetooth/controller/Kconfig
for nRF53 series of SoCs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
a7a4c89579 bluetooth: controller: conditionally define NRF_RADIO_TXPOWER_POS4DBM
nRF5340 does not support a Radio TX power of 4dBm, so we
introduce a dependency for the respective Kconfig option
for TX power, so the option is never defined for nRF5340.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
53e4c215ee include: bluetooth: define hci macro for nRF53
Define the nRF53 HW variant in include/bluetooth/hci_vs.h
and pass the define in hci_vendor.h

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
5556908160 drivers: entropy: set default RNG priority for nRF5340
For nRF5340, set the range and the default IRQ level
for the RNG interrupt.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Gaute Gamnes
32e85adc26 boards: arm: nordic: nRF5340_dk_nrf5340_cpunet board definition
- Modify board cmake file for Network MCU
- nRF5340 DK NRF5340 CPU NET board definition (Network MCU)

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
b4acd3bbbd boards: arm: nordic: nRF5340_dk_nrf5340_cpuapp board definition
- Board cmake file with runner commands for Application MCU
- nRF5340 DK NRF5340 CPUAPP board definition (Application MCU)
  Secure and Non-Secure board definition
- nRF5340 shared SRAM partitioning info

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
2293b57638 scripts: west_commands: nrfjprog: extend nrfjprog.py runner for nrf53
This commit extends the nrfjprog.py runner script so it adds
support for nRF53. In the wake of the changes done in the
runner script, we extend the testing done in test_nrfjprog.py,
adding the required coverage for the nRF53.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Gaute Gamnes
efa28c9de9 soc: arm: nrf53: add nRF5340 CPUNET SoC definition
Nordic nRF5340 Network (CPU NET) SoC definition.

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
397d1938de soc: arm: nrf53: add nRF5340 CPUAPP SoC definition
Nordic nRF5340 CPUAPP (Application MCU) SoC definition
(Secure and Non-Secure domains).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Gaute Gamnes
603531bb78 dts: arm: nordic: nRF5340 Network MCU DTS structure
Adding nRF5340 Network MCU (CPU NET) .dtsi headers

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Ioannis Glaropoulos
b15ce8800d dts: arm: nordic: nRF5340 Application MCU DTS structure
- Adding nRF5340 Application (CPU APP) common (Secure/Non-Secure)
peripheral DTS representation.
- Adding nrf5340 Application (CPU APP) default (Secure)
 .dtsi headers
- Adding nrf5340 Application (CPU APP) Non-Secure
 .dtsi headers
- Added nRF53 flash controller binding

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Stephanos Ioannidis
92625d710d arch: arm: Make PLATFORM_SPECIFIC_INIT available to all ARM variants.
Move PLATFORM_SPECIFIC_INIT declaration from Cortex-M Kconfig to the
ARM arch Kconfig in order to make it available for all ARM variants.

The rationale is that there is really no good reason why
platform-specific initialisation should be a Cortex-M-specific feature
and that Cortex-R port is expected to utilise this in a near future.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-08 19:17:58 +01:00
Kevin Townsend
740f6868a5 sensor: hmc5883l: convert to device tree
This commit converts the existing hcm5883l 3-axis magnetometer
driver to use device tree for the I2C and GPIO selection.

It also adds a basic sample application for this sensor, using the
frdm-k64f development board to demonstrate how the interrupt
GPIO pin and I2C bus can be selected.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2019-11-08 12:12:38 -06:00
Henrik Brix Andersen
30fc72a50e drivers: flash: native_posix: remove unused mutex
Remove unused mutex in the flash_native_posix driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-08 18:59:02 +01:00
Krzysztof Chruscinski
61d12cad78 shell: Use temp_buffer in tab completion
Change common_beginning_find() to use temp_buffer for storing first
command when algorithm compares commands in search for common
beginning. It is done to support cases where syntax returned by
dynamic commands is transient (e.g. single static buffer is used
for to build syntax).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-11-08 12:29:24 -05:00
Alberto Escolar Piedras
d9c64a930a nrf52_bsim: Update the NRF52 HW models revision
Updated to the official tag (v2.0)
(same SHA as test_2019_11_08_CIc)

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-08 17:40:21 +01:00
Christian Taedcke
b25569ef74 soc: silabs_exx32: Enable mpu on efr32mg soc
Enables the arm v7m mpu on the efr32mg soc and the board
efr32mg_sltb004a.

Tested on hardware with samples/mpu/mpu_test and
tests/kernel/mem_protect

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2019-11-08 10:38:18 -06:00
Francois Ramu
1967a1befe boards: arm: st_stm32: add lptimer to disco_l475_iot1 board
This patch introduces the support of the LowPower Timer
     for the STM32L4xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -06:00
Francois Ramu
39e0b4bf59 boards: arm: st_stm32: add lptimer to nucleo_l4r5zi boards
This patch introduces the support of the LowPower Timer
     for the STM32L4xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -06:00
Francois Ramu
d0c9234d70 soc: arm: st_stm32: add driver lptimer management to stm32l4 series
This patch introduces the support of the Low Power Timer
     for the STM32L4xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -06:00
Francois Ramu
0ae7023405 driver: timer: st_stm32: add lptimer management to stm32xx series
This patch introduces the support of the LowPower Timer
 for the STM32xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -06:00
Trond Einar Snekvik
c704495807 Bluetooth: Move Company ID config out of ctlr
The Company ID concept is not restricted to the controller, and should
be part of the wider Bluetooth scope, so it can be used on a
controller-less device. It's used in multiple host level modules, most
notably the Bluetooth Mesh and Device Information Service.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-11-08 16:16:37 +01:00
Stephanos Ioannidis
9695763f5f arch: x86: Inline direct ISR functions.
This commit inlines the direct ISR functions that were previously
implemented in irq_manage.c, since the PR #20119 resolved the circular
dependency between arch.h and kernel_structs.h described in the issue
#3056.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-08 15:50:23 +01:00
Ismael Fillonneau
3f12671f4e doc: json: improve example documentation
The example will be well displayed in the documentation

Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
2019-11-08 09:39:16 -05:00
Alex Porosanu
74248e26d9 samples: bluetooth: peripheral_hr: add VEGABoard sanity testing
Add a special target that's marked build_only so the BLE SW LL
implementation on VEGABoard is built daily. This helps ensuring
that it doesn't get inadvertedly broken by subsequent updates.
The name of the target is peripheral_hr_rv32m1_vega_ri5cy
and it can be run with the following command:

sanitycheck -v --all -p rv32m1_vega_ri5cy \
            -x=CMAKE_REQUIRED_FLAGS=-Wl,-dT=/dev/null \
            --test samples/bluetooth/peripheral_hr/\
              sample.bluetooth.peripheral_hr_rv32m1_vega_ri5cy

Note: The extra CMake flags are required if running with the official
      VEGABoard compiler, due to this linker issue:
      https://github.com/pulp-platform/pulpino/issues/240

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach
d36b1b11f7 boards: riscv: rv32m1: enable BT related configuration
Specific SW defined BLE LL parameters need to be set
if the user enables it on this platform. As such, conditionally
enable them directly into the defconfig.

INTMUX CH2 and CH3 are not available to be used if BT support
is enabled on Vega, because they are used internally by the
BLE SW LL

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
Alex Porosanu
57d9411837 bluetooth: kconfig: disable some options for openisa/RV32M1
Some Bluetooth options are currently not supported by the experimental
BLE SW LL implementation done on VEGABoard. As such, hide them from
the user altogether.

The full list of disabled config options is as follows:

- CONFIG_BT_PHY_UPDATE
- CONFIG_BT_DATA_LEN_UPDATE
- CONFIG_BT_HCI_VS
- CONFIG_BT_CTLR_LE_ENC
- CONFIG_BT_CTLR_CONN_PARAM_REQ
- CONFIG_BT_CTLR_EXT_REJ_IND
- CONFIG_BT_CTLR_SLAVE_FEAT_REQ
- CONFIG_BT_CTLR_LE_PING
- CONFIG_BT_CTLR_PRIVACY
- CONFIG_BT_CTLR_EXT_SCAN_FP
- CONFIG_BT_CTLR_CHAN_SEL_2
- CONFIG_BT_CTLR_ADV_EXT
- CONFIG_BT_CTLR_XTAL_ADVANCED
- CONFIG_BT_CTLR_SCHED_ADVANCED
- CONFIG_BT_CTLR_TIFS_HW

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
Alex Porosanu
d24213f4e4 samples: bluetooth: add overlays for RV32M1 SoC for BLW SW LL
Add the required specific HW configuration for SW defined
BLE LL on RV32M1 SoC, by means of DTS overlays:
- enable INTMUX0 channels 2 & 3
- route Generic FSK RF0 interrupt to INTMUX channel 3
- route LPTMR1 interrupt to INTMUX channel 2

This change is done for all Bluetooth samples that are intended to
run on RV32M1 using BLE SW LL.

Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
Alex Porosanu
bfcfac8bf3 doc: riscv: rv32m1_vega: add BLE software link layer info
Since the experimental BLE software link layer is enabled on
the VEGABoard, add some information about it, as well as the
limitations.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach
5edcb7dc2a bluetooth: controller: openisa/RV32M1: add debug pins support
Add SW defined BLE LL debug support on Vega platform by using
the debug GPIO pins infrastructure.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
George Stefan
d87aaa6107 bluetooth: controller: openisa/RV32M1: enable the BLE SW controller
This patch updates the config files required to enable the
BLE SW defined controller to be built on RV32M1 SoCs. Only the split
version is supported.

Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
2019-11-08 15:38:57 +01:00
George Stefan
b063456015 bluetooth: controller: openisa/RV32M1: BLE Link Layer ULL/LLL split
This commit takes the Nordic LLL and adapts it for RV32M1 SoCs, using
the blocks that are specific to this SoC: the GenFSK & LPTMR IP
blocks.

Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
2019-11-08 15:38:57 +01:00
George Stefan
24d9ad2494 bluetooth: controller: openisa/RV32M1: add HAL for LPTMR & GenFSK
This commit adds the HAL layer needed for the BLE controller
LL on RV32M1 SoCs on OpenISA boards. Specifically, the controller
makes use of the the GenFSK and LPTMR IP blocks.

Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach
bcd77a572c soc: riscv: rv32m1: kconfig: use RV32M1 TRNG as an entropy generator
If the user requires an entropy generator to be activated, enable
the SoC TRNG as a source for the entropy.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach
d65ddcd7d3 boards: riscv: rv32m1: use xoroshiro as default RNG
Don't use use the RV32M1 TRNG as a random source since it can
be  quite slow. Instead, use the software implemented xoroshiro
RNG.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00
George Stefan
cb03eba697 drivers: entropy: add openisa/RV32M1 entropy driver
Wrapper for openisa/RV32M1 TRNG driver

Signed-off-by: George Stefan <george.stefan@nxp.com>
2019-11-08 15:38:57 +01:00
David Leach
94106a8ff3 boards: riscv: rv32m1: add support for GPIO debugging
Having a pin toggle when the code reaches a certain point
is really useful for debugging; the infrastructure is already
in place for Nordic boards, so just build upon and enable the
mechanism on the Vega board as well.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-08 15:38:57 +01:00