Commit graph

66039 commits

Author SHA1 Message Date
Kumar Gala 3cbf653b0e counter: native_posix: Convert driver to use DT_INST
Rather than using a devicetree node label, utilize the driver
compat and thus DT_INST which is standard means for most drivers.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 12:42:54 +02:00
Emil Gydesen 2ab42db41f Bluetooth: Audio: Fix broadcast sink LTV decode length issue
The broadcast sink did not properly decode the LTV data
from the BASE.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-04 12:42:39 +02:00
Erwan Gouriou 6656607d02 boards: nucleo_wb55rg: Fix documentation about BLE binary compatibility
Rather than stating a version information that will get out of date
at each release, refer to the source of information located in hal_stm32
module.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-07-04 12:41:52 +02:00
Jordan Yates 5407b54d2b tests: storage: flash_map: test disabled flash device
Add a test for `fixed-partition` nodes that exist on a disabled flash
device.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-04 10:28:41 +02:00
Jordan Yates a593a733e8 storage: flash_map: handle disabled flash nodes
Don't fail to compile when `fixed-partition`'s exist on a flash device
that is disabled. This does not fix the case where a `fixed-partition`
is on a flash device with `status = "okay"` but with no driver compiled
in.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-04 10:28:41 +02:00
Reto Schneider 7a6c5710ff cmake: Update cmake_minimum_required to 3.20.0
As Zephyr currently requires CMake version 3.20.0, update all
occurrences of cmake_minimum_required.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-04 10:18:45 +02:00
Kumar Gala 677aa22e23 boards: particle_xenon: Use GPIO_DT_SPEC for gpio handling
Convert gpio handling to use GPIO_DT_SPEC as this removes the use
of DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:51:05 +02:00
Kumar Gala 9c3ab19a93 boards: particle_boron: Use GPIO_DT_SPEC for gpio handling
Convert gpio handling to use GPIO_DT_SPEC as this removes the use
of DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:51:05 +02:00
Kumar Gala 0f2ec0222c samples: 96b_argonkey: microphone: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:50:47 +02:00
Kumar Gala 82f6a3e134 samples: 96b_argonkey: microphone: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:50:47 +02:00
Alex Sergeev f7f35af277 soc: gd32: Add HAS_SEGGER_RTT
Enable SEGGER RTT for GigaDevice family.

Signed-off-by: Alex Sergeev <asergeev@carbonrobotics.com>
2022-07-04 09:50:35 +02:00
Marcin Niestroj ec116a97cc drivers: adc: stm32: suppress stm32h7 build warning
There is a build warning of unused `adc_stm32_oversampling_ratioshift`
function: [-Werror=unused-function]. This makes twister fail, as all
warnings are treated as errors.

Fix that by ifndef'ing adc_stm32_oversampling_ratioshift().

Fixes: c57a41c5d2 ("drivers/adc: stm32: do not disable the ADC if
  resolution is unchanged")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-07-04 09:49:40 +02:00
Kumar Gala 75f44cf991 drivers: usb: usb_dc_stm32: Update driver to use gpio_dt_spec
Move driver to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:49:29 +02:00
Nicolas Pitre 83de5b4532 riscv: _isr_wrapper: get rid of the ASSUME_EQUAL() macro
This is really useful only for one case i.e. when testing against zero.
Do that test inline where it is needed and make the rest of the code
independent from the actual numerical value being tested to make code
maintenance easier if/when new cases are added.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-07-04 09:49:16 +02:00
Kumar Gala e70933d7dc drivers: sensor: sx9500: Update driver to use gpio_dt_spec
Move driver to use gpio_dt_spec for GPIO interrupt handling.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:49:01 +02:00
Kumar Gala 5c93b3d79a drivers: sensor: sx9500: Update driver to use i2c_dt_spec
Move driver to use i2c_dt_spec for I2C bus access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:49:01 +02:00
Kumar Gala 015a667667 samples: sx9500: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:49:01 +02:00
HaiLong Yang ec0e8424ef dst: gigadevice: change usart3 address to lower case
DTS node address should use lower case. This fix an incorrect
gd32f403 usart3 node address.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
HaiLong Yang 314f9b8978 MAINTAINERS: add cameled as gd32 platform collaborator
Add cameled as gd32 platform collaborator.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
HaiLong Yang de052b2993 samples: drivers: adc: add gd32 boards support
This add gd32 boards support for the adc sample.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
HaiLong Yang f54df1640f boards: add adc support for gd32 boards
This add adc support for gd32f350r_eval, gd32f450i_eval and
gd32vf103v_eval boards.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
HaiLong Yang cd8e8f3826 drivers: adc: introduce gd32 adc driver
This driver based on single conversion mode with regular channel.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
HaiLong Yang 9bb8ae9f13 dts: introduce gd32 adc
Add support for gd32 adc.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
Aleksander Wasaznik db3f8c16e9 CODEOWNERS: Remove alwa-nordic from bluetooth audio
Remove alwa-nordic from /include/zephyr/bluetooth/audio

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-07-03 06:48:20 -04:00
Reto Schneider 35f9a32781 twister: Remove testcase-root reference
--testcase-root got renamed to --testsuite-root

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-02 19:24:58 -05:00
Kumar Gala 998c03a603 drivers: lora: sx126x: Replace use of DT_INST_LABEL
As we work to phase out devicetree 'label' properties, convert
driver to just use sx126x instead of DT_INST_LABEL for logging
purposes.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-02 18:11:10 -05:00
Jordan Yates b8a2d2724a tests: storage: flash_map: close flash area
Close the flash_area at the end of individual tests to demonstrate
correct usage of the API.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Jordan Yates 75680f7ae0 treewide: update flash_area name retrieval
Update usage of `flash_area->fa_dev_name` to `flash_area->fa_dev->name`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Jordan Yates 4543f82c12 storage: flash_map: remove device_get_binding
Remove all usage of `device_get_binding` in the subsys by directly
storing the `const struct device*` in the `struct flash_area`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Ederson de Souza a6a9a35d0a doc/hardware/arch: Add RISC-V information
This is just a stub with bits of information about RISC-V support on
Zephyr, that can and should be improved over time.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-07-02 14:16:39 +02:00
Jordan Yates f12d36a51e lorawan: move REQUIRES_FULL_LIBC dependency
Move the `REQUIRES_FULL_LIBC` dependency from `config LORA` to
`config LORAWAN`. The commit that added the `select` (f590d4fa) mentions
that this is required by `loramac-node`, which is only used by LoRaWAN,
not the base LoRa code.

This results in small FLASH savings when compiling the samples, but can
result in larger savings in more complex applications:
```
// With REQUIRES_FULL_LIBC
west build -b 96b_wistrio zephyr/samples/drivers/lora/send/
[162/162] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       37708 B       128 KB     28.77%
            SRAM:        8832 B        32 KB     26.95%
        IDT_LIST:          0 GB         2 KB      0.00%

// Without REQUIRES_FULL_LIBC
[181/181] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       37444 B       128 KB     28.57%
            SRAM:        8832 B        32 KB     26.95%
        IDT_LIST:          0 GB         2 KB      0.00%
```

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 14:16:18 +02:00
Jeppe Odgaard 4503377cac drivers: modem: delay after each AT command
Change logic in `modem_cmd_handler_setup_cmds` and
`modem_cmd_handler_setup_cmds_nolock` to always sleep
after each sent AT command.

The issue was found using a logic analyzer while debugging 'NO CARRIER'
from a BG95 modem while being in data mode.
The reason 'NO CARRIER' occured was due to crosstalk to DTR which
terminated data mode.

The logic analyzer also revealed that without the delay the next AT
command is sent before the whole 'OK\r\n' is received. This is not
addressed in this commit.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/47082

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-07-02 14:15:49 +02:00
Krzysztof Chruscinski 3bcd14f420 logging: Reduce code size for frontend only case
Add early returns from functions which are not used when
there is only one frontend in the system (no backends). This
allows to significantly reduce logging code size in that
configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-02 14:13:54 +02:00
Marcin Niestroj 48a9334826 modules: mbedtls: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs
According to mbedTLS' Changelog "Mbed TLS 3.0.0 branch released
2021-07-07" -> "Removals":

   MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it
   is now determined automatically based on supported curves.

Hence remove MBEDTLS_ECP_MAX_BITS from configuration files to fix build
issues with Zephyr when there is unfortunate order of include
statements.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-07-02 14:13:45 +02:00
Kumar Gala 560ccb1f5c bluetooth: controller: openisa/RV32M1: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-02 14:08:04 +02:00
Kumar Gala ded6f43b0d Bluetooth: controller: nRF5: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-02 14:07:54 +02:00
Christopher Friedt 3f6fbe1ab3 api: gpio: correct doxygen for return values in error cases
If a method is not supported by the driver, it should return
-ENOSYS, not -ENOTSUP.

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-02 07:07:11 -04:00
Christopher Friedt 283ecc1ded tests: drivers: gpio: direction: use new ztest api
Adjust suite to use new ztest API.

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-02 07:07:11 -04:00
Christopher Friedt e46afe75ca tests: drivers: gpio: skip unsupported tests / drivers
Some drivers may not support simultaneous input-output
configuration or disconnect.

In such cases, the driver should return `-ENOTSUP` and the
test should be skipped.

Fixes #46917

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-02 07:07:11 -04:00
Enjia Mai a1e388ea2e soc: xtensa: keep the CAVS old flasher still works
Keep the cavstwist.sh it is still working by specifying an
environment variable when CAVS_OLD_FLASHER is set. Provide
a fallback once the client-server-based tool does not work
well in some conditions.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-02 06:06:19 -04:00
Maureen Helm 5dd9c21b98 samples: sensor: Remove hmc5883l magnetometer sample
The magn_polling sample application now supports the hmc5883l driver, so
we can remove this driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 331de27f5a samples: sensor: Remove bmm150 magnetometer sample
The magn_polling sample application now supports the bmm150 driver, so
we can remove this driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 0e917af9e3 samples: sensor: Extend magn_polling to support additional drivers
Extends the magn_polling sample application to support additional
magnetometer drivers. This is a first step towards reducing the number
of driver-specific sensor sample applications.

Integration platforms were selected to exercise different magnetometer
drivers.

Tested on hardware with the following configurations:
- fxos8700 driver with the on-board sensor on the frdm_k64f board
- lis2mdl driver with a x_nucleo_iks01a3 shield attached to a frdm_k64f
  board

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm e0208be634 samples: sensor: Remove GPIO references from magn_polling
The magn_polling sample application doesn't use GPIO.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm adc37bad40 boards: Configure I2C/SPI default for boards with magnetometer alias
For all boards that have a magnetometer devicetree alias, configure the
appropriate bus (I2C or SPI) default to be enabled when the sensor
driver class is enabled. This will simplify enabling the magn_polling
sample application for these boards (and using the magnetometer in
general) because it will eliminate the need to add a bunch of
board-specific configuration overlays to the application.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 627c253cab drivers: gpio: Change DW driver to use depends on instead of select
In prepration for configuring I2C/SPI defaults at the board level,
change the DesignWare GPIO driver's clock gate option to depend on clock
control instead of selecting clock control. This breaks a Kconfig
dependency loop when adding the following to a board's
Kconfig.defconfig:

config SPI
	default y if SENSOR

There aren't any in-tree users that enable the clock gate option, so
there aren't any places in-tree that now need to enable the clock
control driver. Out-of-tree users that set CONFIG_GPIO_DW_CLOCK_GATE=y
will now also need to set CONFIG_CLOCK_CONTROL=y.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 87fc3f0934 boards: Set magnetometer devicetree alias for lsm303dlhc-magn nodes
Sets a magnetometer devicetree alias for all boards that contain the
LSM303DLHC sensor to enable the magn_polling sample application.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm ee868a5e06 boards: Set magnetometer devicetree alias for lsm303agr-magn nodes
Sets a magnetometer devicetree alias for all boards that contain the
LSM303AGR sensor to enable the magn_polling sample application.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 99f7701a72 boards: Set magnetometer devicetree alias for lis2mdl nodes
Sets a magnetometer devicetree alias for all boards that contain the
LIS2MDL sensor to enable the magn_polling sample application.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm 82dfaf2443 boards: Set magnetometer devicetree alias for bmm150 nodes
Sets a magnetometer devicetree alias for all boards that contain the
BMM150 sensor to enable the magn_polling sample application.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00