Commit graph

63542 commits

Author SHA1 Message Date
Gerard Marull-Paretas
8f135d525e dts: bindings: pwm: nuvoton: add period cell to PWM
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:16 +02:00
Gerard Marull-Paretas
fe41c54bcd boards: arm: legend: fix PWM LEDs period
The period was 255 nsec, a value that doesn't make much sense when
driving an LED. Since the period cell is rarely used nowadays, the
value was probably copy&pasted or a random value was added since it is
required. A period of 20 msec has been chosen as most other boards do
for PWM LEDs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:07 +02:00
Gerard Marull-Paretas
c6c758312f boards: arm: atmel: update PWM specs to include period cell
Updated all PWM specs to include the period cell. Because all specs
refer to PWM driven LEDs, a period of 20 msec has been chosen, as most
other platforms do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:01 +02:00
Gerard Marull-Paretas
ca4ce6a99b dts: arm: atmel: include pwm dt-bindings
Include the PWM dt-bindings by default, so that boards can use utilities
like PWM_MSEC() without extra includes. This is a common pattern done
for e.g. i2c or gpio.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:01 +02:00
Gerard Marull-Paretas
ff6924c17b dts: bindings: pwm: atmel,sam0-tcc-pwm: add period cell
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds it. Note that flags have not been added as they are
optional and not supported anyway.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:01 +02:00
Erwan Gouriou
d67b341282 include: Move stm32 clock dt-bindings to include/zephyr/dt-bindings/clock
Fix STM32 clock dt-bindings location as they were added during
the shift of bt-bindings location from include to include/zephyr.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-24 19:47:54 +02:00
Vinayak Kariappa Chettimada
4efd9b80c8 Bluetooth: Controller: Fix typo in BT_CTLR_ISOAL_SOURCES prompt
Fix typo in BT_CTLR_ISOAL_SOURCES Kconfig prompt message.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-24 19:47:46 +02:00
Daniel Leung
02ea021cbe gitignore: add .clangd to the ignore list
This adds .clangd to .gitignore for when you need to provide
local configurations to clang's language server.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-24 19:47:40 +02:00
Martí Bolívar
d1ae18c342 doc: west 0.13.1 release notes
This is a bug fix point release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-04-24 19:47:33 +02:00
Tristan Honscheid
e4d24fcf3a ztest API Migration: lib/cbprintf_package
Migrate the unit tests at `lib/cbprintf_package` to use the new ztest
API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-04-24 19:47:18 +02:00
Herman Berget
3aef3dae02 Bluetooth: Host: Add test for GATT tx complete callback
Checks that the callback given to bt_gatt_notify_cb is called.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-04-24 19:46:41 +02:00
Herman Berget
c8b2279f89 Bluetooth: Host: Make tx complete callback work for EATT channels
Previously, if a callback was set for notifications, they would always be
sent over unenhanced ATT.

The nfy_mult_data was bigger than the buffer user_data and we were this
overflowing the buffer when setting the tx callback user_data. Now the
data is stored separately and only a pointer to it is added to the
buffer user_data.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-04-24 19:46:41 +02:00
Herman Berget
cf3832f0bf Bluetooth: Host: Add support for tx complete callback for ECRED channels
Previously callbacks were only supported on unenhanced channels.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-04-24 19:46:41 +02:00
Nicolas Pitre
f61b8b8c16 semihosting: fix inline assembly output dependency
Commit d8f186aa4a ("arch: common: semihost: add semihosting
operations") encapsulated semihosting invocation in a per-arch
semihost_exec() function. There is a fixed register variable declaration
for the return value but this variable is not listed as an output
operand to respective inline assembly segments which is an error.
This is not reported as such by gcc and the generated code is still OK
in those particular instances but this is not guaranteed, and clang
does complain about such cases.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-04-24 19:46:15 +02:00
Jordan Yates
1d189487b4 tests: spi: spi_loopback: use gpio_dt_spec fields
Use the gpio_dt_spec fields of `struct spi_cs_control`, instead of the
deprecated individual fields.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-04-23 21:11:29 +02:00
Jordan Yates
d6c3b0a40a tests: spi: spi_loopback: cleanup code formatting
Cleanup split lines and invalid whitespace.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-04-23 21:11:29 +02:00
Anas Nashif
399a0b4b31 debug: generate call graph profile data using gprof
This will generate profile data that can be analyzed using gprof. When
you build the application (currently for native_posix only), after
running the application you will get a file "gmon.out" with the call
graph which can be processed with gprof:

  gprof build/zephyr/zephyr.exe gmon.out > analysis.txt

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-22 16:04:08 -04:00
Xavier Chapron
bfcb181b49 drivers: gpio: pca95xx: Add support for PCAL95xx
Introduce has-interrupt-mask-reg DTS property for nxp,pca95xx driver.
This additionnal property allow to specify that the gpio expander has an
interrupt mask register that must be configured by the driver.
This allow to use this driver with PCAL95xx.
This fixes issue #44834.

Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
2022-04-22 14:19:21 -05:00
Mahesh Mahadevan
154a297f99 west.yml: Get NXP HAL changes to link SDK symols in ramfunc
Pull in the NXP HAL changes to link SDK CodeQuickAccess symbols
to Zephyr ramfunc region

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-04-22 13:33:29 -05:00
Mahesh Mahadevan
785da27257 soc: nxp: Do not select CODE_DATA_RELOCATION_SRAM
We no longer need to relocate the SDK power management
source file to SRAM. Instead specific functions from the
SDK file are relocated to the ramfunc section.

This commit fixes Issue#44670

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-04-22 13:33:29 -05:00
Jose Alberto Meza
09ca5cc9cb drivers: espi: Correct default eSPI to UART mapping
Correct default mapping for eSPI UART virtual port to SoC UART
for MEC172x.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-04-22 10:46:18 -05:00
Gerard Marull-Paretas
40abcd283c boards: riscv: rv32m1_vega: fix PWM period and flags
The PWM driven LEDs had a wrong period: 0 nsec. A value of 20 msec has
been chosen as most other boards do for PWM driven LEDs. The polarity
has been set to normal (LEDs are driven active high).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-22 10:41:30 -05:00
Gerard Marull-Paretas
0f48fed41e dts: riscv: rv32m1: include PWM dt-bindings by default
In order to be consistent with other platforms, include the PWM
dt-bindings by default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-22 10:41:30 -05:00
Aleksander Wasaznik
8e5c177233 Bluetooth: Host: Validate IRK ID in range
Validate `id` so that `bt_dev.irk[id]` cannot result in an out-of-bounds
access.

This fixes coverity report 239569.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-04-22 10:24:43 -05:00
Dino Li
4cecbf7a85 soc: it8xxx2: enable extensions by configuration options
CONFIG_RISCV_ATOMICS_ISA enables A extension.
CONFIG_RISCV_MUL_ISA enables M extension.
CONFIG_FLOAT_HARD enables F extension. (FPU)

Since we changed to use configuration options to enable extensions,
we no longer need to specify extensions using zephyr_compile_options.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-04-22 10:21:51 -05:00
Henrik Brix Andersen
1044d29aeb boards: arm: nucleo_g474re: increase size of storage partition
Increase the size of the flash storage partition from 2KB (one page) to
4KB (two pages) in order to support NVS.

Fixes: #44977

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-22 10:09:10 -05:00
TLIG Dhaou
f3d488989f board/arm/nucleo_l073rz : add entropy RNG support
This commit enables rng for nucleo_l073rz platfrorm. This has been
tested with tests/drivers/entropy/api and is working as expected.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-04-22 10:07:37 -05:00
Gerard Marull-Paretas
ab71e6bdf0 boards: arm: twr_ke18f: fix PWM LEDs period
The period was set to 60 usec, a value that doesn't make much sense in
the context of PWM driven LEDs. Since the period cell was rarely used,
the value was likely added because it is required, but was never used. A
period of 20 msec has been chosen as most other boards do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-22 08:18:35 -05:00
Kamil Gawor
3defc3dfc2 Bluetooth: Controller: Fix timings for Tx test
The Tx interval is now calculated at the beginning
of the Tx test and the next transmission is
triggerd by the switch timer instead of event
timer. This fixes a corner case issue when
timer rollover.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-04-22 13:46:34 +02:00
Bartosz Bilas
536fe6a948 drivers: spi: mark old spi_cs_control fields deprecated
Since gpio_dt_spec is finally available within spi_cs_control
struct, mark the old fields deprecated in order to use
gpio_dt_spec struct.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Co-authored-by: Jordan Yates <jordan.yates@data61.csiro.au>
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
Co-authored-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-04-22 09:45:53 +02:00
Piotr Pryga
77ae58ee72 Bluetooth: Controller: fix wrong use of LE Features in CTE REQ llcp
When Host calls HCI_LE_Connection_CTE_Request_Enable with cte type
set to AoD with 1us slots or AoD with  2 us slots, the Controller
verifies if peer device supports Antenna Switching During CTE
Transmission (AoD) feature.

That is wrong because the feature is marked as optional when send
to peer, so it shall be igonerd by remote device.

There are no means to check if peer device supports particular
CTE type, hence the check has to be removed.

The check causes enable CTE REQ procedure to fail after feature
exchange has happened.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-22 09:45:27 +02:00
Piotr Pryga
45bba8e5f8 Bluetooth: Controller: df: Fix missing disable CTE req LLCP after compl
The CTE request procedure can be run in periodic and non-periodic mode.
In periodic mode it stays enabled until Host call HCI_LE_Connection_CTE-
_Request_Enable(Enable=0x0).
In non-periodic mode the command is disabled after completion,
LL_CTE_RSP is successfully received.

There is missing disable of the procedure in the current code,
so Host is not able to run the command HCI_LE_Connection_CTE_Request_-
Enable(Enable=0x1) again without explicit call to HCI_LE_Connection_-
CTE_Request_Enable(Enable=0x0).

The commit adds missing code responsible for disable of the procedure.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-22 09:45:14 +02:00
TOKITA Hiroshi
79ca2b9ae7 boards: riscv: longan_nano: Add support for TF-Card slot
Add definitions of the built-in TF-Card slot to support it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-04-22 09:45:07 +02:00
TOKITA Hiroshi
301e003279 dts: riscv: gigadevice: gd32vf103: add spi1
Add spi1 definition.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-04-22 09:45:07 +02:00
Veijo Pesonen
7c6cd4c9e6 net: lwm2m: adds LwM2M v1.1 overlay
Makes possible to enable LwM2M protocol v1.1 features. Uses SenML JSON
as default content format.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-22 09:44:36 +02:00
Veijo Pesonen
cfcc891d3d net: lwm2m: makes CBOR as one of the default...
...content formats

In case that SenML CBOR or SenML JSON are both disabled there is need to
use plain CBOR as backup.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-22 09:44:36 +02:00
Veijo Pesonen
11b8b4e7ba net: lwm2m: enables CBOR content format
With LwM2M v1.1 the content format is enabled by default.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-22 09:44:36 +02:00
Veijo Pesonen
8fd283a788 net: lwm2m: Single instance read&write with CBOR
Raw CBOR content format support.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-22 09:44:36 +02:00
Daniel DeGrasse
24e04a2159 boards: mimxrt11x0_evk_cm4: mark EDMA as supported
enable dma on rt1170 and rt1160 evk, since edma driver has been updated
to place TCD pools in correct location

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
a59b308e73 tests: uart_async_api: skip test cases if LPUART is present without DMA
if DMA support is not present, LPUART driver will not compile when async
API support is required. Skip test cases when dma support is not present
and LPUART driver is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
fee7de48d3 tests: uart_async_api: add nxp,loopback mode to boards with LPUART
add nxp,loopback mode to boards with LPUART. This will enable testing
the UART async api without a physical loopback connection.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
557a0c766c drivers: lpuart: enable loopback mode
NXP LPUART IP supports loopback mode, where TX is internally connected
to RX input. Allow setting loopback mode up via the "nxp,loopback" dts
property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
d800c6684c soc: k8x: select HAS_MCUX_CACHE
k8x SOCs have cache controller, so HAS_MCUX_CACHE should be selected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
17d9bea474 drivers: edma: allow transfer descriptors to be placed in SRAM
SOCs using the EDMA IP that supported caching must locate EDMA transfer
control descriptors (TCDs) in non cacheable memory. For M7 cores, this
can simply use the "nocache" section. For M4 cores, where the nocache
section does not exist, the chosen SRAM section must be a tightly
coupled memory block which cannot be cached. Add a note to all boards
with M4 SOCs that support caching explaining this issue, and enable EDMA
driver to locate TCDs in SRAM.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Daniel DeGrasse
fdc247fed3 drivers: mcux_lpuart: make async api use common LPUART ISR
LPUART driver should use shared ISR for all possible use cases,
including ASYNC API, so that multiple features requiring ISR can be
enabled simultaneously.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Aleksandr Khromykh
a7bb928420 Bluetooth: Mesh: subscription on fixed group addresses
There is errata clarification (Errata ID:18700)
about subscriptions on fixed group addresses.
It is possible to subscribe models on non primary elements
on any fixed group address except all nodes address.
Devices should be able to receive messages on fixed addresses
even if they do not support the feature
to which the fixed group address belongs.

Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
2022-04-22 09:44:00 +02:00
Benjamin Björnsson
a2c70666e4 boards: arm: arduino_nano_33_ble_sense: Add dmic device to DTS
This commit adds audio dmic to the boards dts and a regulator
to enable the microphone VDD and L/R pin.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-22 09:43:47 +02:00
Andrzej Głąbek
00f878f6f3 samples: bluetooth: mesh_demo: Align with changes in pwm_nrf5_sw driver
- add an overlay file for the bbc_microbit board with specification
  of GPIO that should be used as the PWM output to buzzer
- update a PWM related macro in the microbit specific code to refer
  to PWM channel instead of pin

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
92b3cc78e7 samples: servo_motor: Align with recent changes in pwm_nrf5_sw driver
- add `channel-gpios` property with GPIO assignment for the used PWM
  channel to the `sw_pwm` node
- replace ambiguous "pin 21" in the sample's README with "pin P19"
  that uses notation from the official micro:bit documentation and
  is consistent with this pin number within the edge_connector node

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
34630a81dd samples: bbc_microbit: Align with recent changes in pwm_nrf5_sw driver
- add `channel-gpios` property with GPIO assignments for PWM channels
  to `sw_pwm` nodes
- update PWM related macros to refer to channels instead of pins
- remove no longer needed inclusion of boards/arm/bbc_microbit/board.h

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00