Commit graph

57083 commits

Author SHA1 Message Date
Glauber Maroto Ferreira
dcf26d72f5 soc: esp32s2: drivers: flash: add support
to host SPI Flash driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-28 06:47:21 -04:00
Daniel DeGrasse
813a74d415 boards: mimxrt1020_evk: Enable ADC on RT1020 EVK
Enables ADC1 on the RT1020 evaluation board. Channels 10 and 11 of this
ADC are exposed as pins 1 and 2 of J18 on the evk.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Daniel DeGrasse
ac174d3075 boards: mimxrt1015_evk: Enable ADC on RT1015
Enables ADC on RT1015 evaluation board. Channels 1 and 13 are exposed as
pins 2 and 1 of J18 on the EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Daniel DeGrasse
4e6ac9324b boards: mimxrt1010_evk: Added ADC support to RT1010
Added ADC support to RT1010 evaluation board. ADC channels 1 and 2 are
exposed as pins 10 and 12 of J26.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Daniel DeGrasse
b0d613d9ba boards: mimxrt1024_evk: Add ADC support to RT1024
Adds ADC support to RT1024 EVK. ADC channels 10 and 11 are enabled as
pins 2 and 4 on J18 of the evaluation board

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Daniel DeGrasse
19983e605a boards: mimxrt1060_evk: Enable ADC on RT1060
Enables the ADC on the RT1060 evaluation board. Channels 0 and 15 of
ADC1 are available on pins 1 and 0 of J23, respectively.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Daniel DeGrasse
478d6a45ee boards: mixmrt1064_evk: Enable ADC on RT1064 EVK
Enables ADC inputs 0 and 15 on the RT1064

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-10-28 11:20:55 +02:00
Dominik Ermel
6546397035 fs/shell: Fix formatting for output of ssize_t variable
Fix compilation error for devices where ssize_t can not
be formatted with %d, due to ssize_t not being equal int.

Fixes #39629

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-28 11:19:04 +02:00
Morten Priess
cd470da214 Bluetooth: controller: Send disconnect complete when CIS is terminated
Previously the host would handle disconnecting associated CISes and
invoking callbacks when a host ACL conn was disconnected.

This responsibility has now been moved to the controller, which needs to
send a NODE_RX_TYPE_TERMINATE with the CIS handle for proper
disconnection in the host. This is in accordance with the spec.

As disconnect reason, the CIS uses the ACL reason, which is passed to
the host along with the handle.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-10-28 11:18:40 +02:00
Gerson Fernando Budke
57ca5298b3 CODEOWNERS: Add nandojve for gigadevices
Add myself as codeowners for GigaDevice related files.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
cea116da72 boards: arm: Introduce gd32f403z_eval board
Add gigadevice gd32f403z_eval board initial version.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
45d60c4d4c drivers: serial: Add gd32 uart driver
Introduce minimal serial driver support for gigadevice soc.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
087be00b58 soc: arm: Introduce gigadevice soc
Add gigadevice soc initial version.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
158bb10740 dts: arm: Introduce gigadevice soc bindings
Add gigadevice soc initial version.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
c22d36fb42 dts: bindings: vendor-prefixes: Add gigadevice prefix
Add gigadevice manufacturer binding prefix.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
6d8c03422c modules: Add gigadevice hal module
This add access to modules/hal/gigadevice with three firmware
libraries by updating west.yaml file:

 - GD32E10X ARM (Cortex-M4F)
 - GD32F403 ARM (Cortex-M4F)
 - GD32VF103 RISC-V (Nucleisys Bumblebee core)

It introduce module/hal_gigadevice, which contains all Cmake
and Kconfig rules to build GigaDevice SoCs into zephyr main
tree.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Jordan Yates
3b8e2f8983 drivers: regulator: convert to gpio_dt_spec
Convert regulator_fixed GPIO usage to utilize `struct gpio_dt_spec`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-10-28 11:15:12 +02:00
Bartosz Bilas
1502c6631d runners: jlink: exit with error in case of a failure
Add "ExitOnError 1" argument that treats any command-error
as fatal thus in the case of a programming error the "west flash"
command will return the correct error code instead of the default 0. It
fixes the false positive return codes when e.g we call west flash
command without a connected programmer or with the disconnected board.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-10-28 10:57:28 +02:00
Emil Gydesen
f6e829a68b Bluetooth: ISO: Make bt_iso_remove_data_path static
Make bt_iso_remove_data_path static as it is only used by iso.c

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 15:12:43 -04:00
Emil Gydesen
6f09a69679 Bluetooth: ISO: Make iso_new static
Make iso_new static as it is only used by iso.c

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 15:12:43 -04:00
Emil Gydesen
9d17138f92 Bluetooth: ISO: Make hci_le_remove_cig static
Make the function static as it is only used by iso.c

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 15:12:43 -04:00
Martin Jäger
053ee94d49 drivers: can: Improve rendering of API comments
- Hide internal driver API from public documentation
- Use consistent upper-case naming for CAN, RTR, etc.
- Fix indentation of some comments so that they are
  rendered with monospace font.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-10-27 15:11:48 -04:00
Radoslaw Koppel
d1a93c1426 drivers: sensor: Const sensor trigger data in trigger handler
This commit adds const modifier in second argument for
sensor trigger handler.
There is no reason to modify this data and this change
would allow to store trigger configuration also in FLASH.

Fixes: #38929

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2021-10-27 15:09:35 -04:00
Felipe Neves
1e328fe109 clock_control: esp32c3: added clock control
gating driver support for esp32c3 SoC family

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-27 15:09:08 -04:00
Pieter De Gendt
421ecb77a3 net: coap: Add coap_next_block_for_option function
Add a function to update the coap block context from a
packet, according to the block option enum provided.

The existing coap_next_block does not handle block1 transfers
properly because we need to inspect the block1 option
returned by the server. This function is reworked to make use
of the newly introduced one.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-10-27 13:46:19 -04:00
Pieter De Gendt
b966ba16a9 net: coap: Fix size1 for block1 transfers
According to RFC-7959:
When uploading with coap block1 requests the server may respond
with a size1 option (together with the response code 4.13).
This to indicate the maximum size the server is able and willing
to handle.

This commit changes the total_size in the current block context
being handled to the optional size1 option value from the server.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-10-27 13:46:19 -04:00
Marek Pieta
07b9e4e992 drivers: led_pwm: Fix power management action callback
A single PWM driver can be used for multiple LED numbers. In that
case -EALREADY may be reported. It should be ignored.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-10-27 13:45:43 -04:00
Henrik Brix Andersen
3c6177a445 MAINTAINERS: include the CANopenNode module in the CAN bus group
Include the CANopenNode module integration files in the CAN bus
maintainers group and assign ownership to me.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-10-27 13:44:10 -04:00
Carlo Caione
af94cf55d0 sample: mbox: Introduce MBOX NRFX IPC sample
Make use of the new MBOX APIs to create a ping-pong sample application.
This sample is using the NRFX IPC peripheral to send and receive signals
on different channels

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Carlo Caione
012591c4a5 mbox: Introduce MBOX NRFX IPC driver
Rewrite the NRFX IPC driver to properly support multi-channel addressing
leveraging the newly introduced MBOX APIs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Carlo Caione
1976f33e87 drivers: mbox: Introduce MBOX driver class
One limitation of the current IPM API is that it is assuming that the
hardware is only exporting one single channel through which the data can
be sent or signalling can happen.

If the hardware supports multiple channels, the IPM device must be
instantiated (possibly in the DT) several times, one for each channel to
be able to send data through multiple channels using the same hw
peripheral. Also in the current IPM API only one callback can be
registered, that means that only one driver is controlling all the
signalling happening on all the channels.

This patch is introducing a new MBOX API that is supporting
multi-channel signalling and data exachange leveraging and extending the
previous (and outdated) IPM API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Nicolas Pitre
bc41234104 ethernet: Synopsys DesignWare MAC driver
This is a driver for the Synopsys DesignWare MAC. It should work
with the "DesignWare Cores Ethernet Quality-of-Service" versions 4.x
and 5.x.

This driver uses a zero-copy strategy, meaning that the hardware
reads and writes data directly from/to packet fragment buffers
provided by the network subsystem without first copying the data into
a dedicated DMA bounce buffer.

Platform specific setup is necessary for the hardware to work.
Currently, only the STM32H7X series is implemented and tested.
While this part needs refinement, this driver performs better and uses
far less code space than the HAL-based alternative.

Not yet implemented:

- MDIO (it is WIP, currently relying on default PHY config)
- PTP support
- VLAN support
- various hardware offloads (when available)

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-10-27 10:43:05 -04:00
Nicolas Pitre
bd73cd5512 sys: util: provide bitfield construction/extraction utility macros
Those are especially useful with hardware device registers.
They behave the same way as their Linux equivalent, with a much
simpler implementation for now.

Example:

 #define REG_FIELD_A  GENMASK(6, 0)
 #define REG_FIELD_B  BIT(7)
 #define REG_FIELD_C  GENMASK(15, 8)
 #define REG_FIELD_D  GENMASK(31, 16)

Get:
 a = FIELD_GET(REG_FIELD_A, reg);
 b = FIELD_GET(REG_FIELD_B, reg);

Set:
 reg = FIELD_PREP(REG_FIELD_A, 1) |
       FIELD_PREP(REG_FIELD_B, 0) |
       FIELD_PREP(REG_FIELD_C, c) |
       FIELD_PREP(REG_FIELD_D, 0x40);

Modify:
 reg &= ~REG_FIELD_C;
 reg |= FIELD_PREP(REG_FIELD_C, c);

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-10-27 10:43:05 -04:00
Jordan Stein
aeee57bfe1 samples: fxos8700: fp support for accel devices
Adds a config flag to enable floating point support for fxos8700
compatible accelerometer devices.

Signed-off-by: Jordan Stein <jordan.stein@fortrobotics.com>
2021-10-27 09:37:05 -05:00
Johann Fischer
b92ce9a6c1 usb: function_rndis: do not force USB_COMPOSITE_DEVICE for IAD
Just always prove interface association descriptor for RNDIS
function instead of forcing it via Kconfig USB_COMPOSITE_DEVICE
option.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-27 11:56:00 +02:00
Johann Fischer
70c25119d1 usb: function_rndis: align rndis_cmd_pool to request buffer size
Set reasonable range for the request buffer in case RNDIS
function is used. Align net_buf size from rndis_cmd_pool to
request buffer size since request is copied there before
it is queued.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-27 11:56:00 +02:00
Vinayak Kariappa Chettimada
7496e3f0cf Bluetooth: Controller: Select CSA#2 for Extended Advertising Support
Select CONFIG_BT_CTLR_CHAN_SEL_2 when CONFIG_BT_CTLR_ADV_EXT
is enabled.

Relates to commit 651137ee11 ("Bluetooth: Controller: Fix
Extended Advertising channel use").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-27 11:33:07 +02:00
Vinayak Kariappa Chettimada
c6ae4d52f7 Bluetooth: Controller: Fix LOW_LAT_ULL_DONE synchronization counting
Fix BT_CTLR_LOW_LAT_ULL_DONE synchronization counting so
that done events are processed before pipeline enqueue
decisions are taken in LLL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-27 11:32:48 +02:00
Maureen Helm
9eef764c65 drivers: dac: Refactor drivers to use shared init priority
Refactors all of the DAC drivers to use a shared driver class
initialization priority configuration, CONFIG_DAC_INIT_PRIORITY, to
allow configuring DAC drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The
exceptions are dacx0508, dacx3608, and mcp4725 drivers which have
dependencies on SPI or I2C drivers and must therefore initialize later
than the default device priority.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-27 10:58:33 +02:00
Maureen Helm
fc9347cf52 boards: arm: Configure DAC driver on bl5340_dvk
Moves DAC driver configuration defaults from the application level to
the board level for the bl5340_dvk board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-27 10:58:33 +02:00
Maureen Helm
1d7d294a58 boards: arm: Configure DAC on bl654_dvk
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl654_dvk board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-27 10:58:33 +02:00
Maureen Helm
96c7875f40 boards: arm: Configure DAC on bl653_dvk
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl653_dvk board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-27 10:58:33 +02:00
Maureen Helm
192d710c45 boards: arm: Configure DAC on bl652_dvk
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl652_dvk board.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-27 10:58:33 +02:00
Emil Gydesen
254108bcf5 Bluetooth: Audio: Mark VOCS and VOCS_CLIENT as experimental
The implementation and its API is still considered experimental.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 10:53:24 +02:00
Emil Gydesen
6cf9138eac Bluetooth: Audio: Mark MICS and MICS_CLIENT as experimental
The implementation and its API is still considered experimental.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 10:53:24 +02:00
Emil Gydesen
46e299daa8 Bluetooth: Audio: Mark AICS and AICS_CLIENT as experimental
The implementation and its API is still considered experimental.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 10:53:24 +02:00
Emil Gydesen
864d1aa4ed Bluetooth: Audio: Mark VCS and VCS_CLIENT as experimental
The implementation and its API is still considered experimental.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-27 10:53:24 +02:00
Vinayak Kariappa Chettimada
39a667659f Bluetooth: Controller: Fix incorrect periodic advertising interval
Fix incorrect Periodic Advertising interval when Coded PHY
support is built, chain PDUs is used and Extended
Advertising is disable while the Periodic Advertising
continues to be active.

Related to commit a379196b48 ("Bluetooth: controller:
nRF5: Back-to-Back Radio Tx interface").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-27 10:51:55 +02:00
Joakim Andersson
4748777126 modules: tfm: Fix not defined configuration for TF-M log options
Fix configuration options for TF-M log levels configured to an empty
string when not defined. This can happen when none of the options
have been selected due to dependencies not being met.
For example when TFM_MINIMAL=y then TFM_PARTITION_LOG_LEVEL will not be
defined.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-27 10:51:34 +02:00
Maureen Helm
b88111bcf0 tests: build_all: Add device pm configuration for sensor drivers
Adds another test configuration to ensure we build sensor drivers with
device power management enabled, in addition to the existing test that
builds sensor drivers with device power management disabled.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-26 20:51:13 -04:00