Commit graph

76623 commits

Author SHA1 Message Date
Pieter De Gendt 0b45710219 drivers: adc: adc_sam: Introduce Atmel SAM ADC driver
This commit adds support for Atmel SAM ADC driver with up to
16 channels.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Lucas Tamborrino 7486fe7a83 dts: esp32s3: add TRNG support
Add True Random Number Generator support on esp32s3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-23 09:40:50 +01:00
Henrik Brix Andersen d5672c9ee3 drivers: can: check timing parameters
Check the requested CAN timing parameters against the min/max values
supported by the driver and return an error if they are out of range.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-23 09:40:34 +01:00
Henrik Brix Andersen 9dc9f0a0fd drivers: can: common: add missing static for sample_point_for_bitrate()
Add missing static keyword for internal function
sample_point_for_bitrate().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-23 09:40:34 +01:00
Andrzej Głąbek 8cba27aab3 tests: drivers: uart_pm: Fix testing of no-RX case
Instead of checking the `rx-pin` property that got deprecated and
removed, the test needs to check the `disable-rx` property.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-23 09:40:11 +01:00
Andrzej Głąbek 2cbe097b29 tests: drivers: uart: Use "dut" node label to select UART to be tested
... to limit #if chains in these tests and make it easier to add new
boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-23 09:40:11 +01:00
Tristan Honscheid 368f2e729c microchip: espi: Fix bug in dependency on ESPI Kconfig
`Kconfig.xec` for the ESPI drivers requires
DT_HAS_MICROCHIP_XEC_ESPI_SAF_ENABLED and
DT_HAS_MICROCHIP_XEC_ESPI_SAF_V2_ENABLED for ESPI_XEC and ESPI_XEC_V2,
respectively, but SAF is not mandatory for using ESPI. This is a bug and
should be dependent on DT_HAS_MICROCHIP_XEC_ESPI_ENABLED and
DT_HAS_MICROCHIP_XEC_ESPI_ENABLED, respectively. Also make these default
to `y` so they can be automatically enabled by the device tree.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-03-23 08:24:18 +00:00
Declan Snyder 67d851fb64 boards: mimxrt101X_evk: Add flash chosen node
RT series now uses flash chosen node, add to RT101X boards

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-03-22 21:21:16 +01:00
Andrzej Głąbek 28d0789c37 tests: uart_mix_fifo_poll: Use "counter_dev" node label
This test needs a counter device. Introduce a node label that allows
selecting one in dts overlays instead of using hard-coded `timer0`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-22 21:21:06 +01:00
Mariusz Skamra 7c6f2d78d2 tests: Bluetooth: ascs: Fix bap_unicast_server_cb mocks
This fixes merge conflict issue by adding missing function
parameters that were introduced in
57784df5f0.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-03-22 21:20:43 +01:00
Jonathan Rico c84fdfe438 Bluetooth: controller: fix kconfig dependency
BT_TICKER_EXT is being selected undiscriminately, but it's a Zephyr
controller feature.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-22 21:20:22 +01:00
Sylvio Alves 8d21ea0d8a soc: esp32s3: enable zephyr toolchain
SDK 0.16 includes ESP32-S3 toolchain. This PR enable
its usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-03-22 21:20:12 +01:00
Franciszek Zdobylak 7e905604d7 boards: hifive_unmatched: Update openocd cfg name
Use name that matches board name.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-03-22 21:20:03 +01:00
Andy Sinclair a00713bc45 drivers: regulator: Added initial voltage configuration
The regulator driver has a configured min/max range that is used
to limit set values, and to initialise the regulator.

A new init value has been added, so that the startup voltage can
be higher than the lowest permitted value.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-03-22 21:19:51 +01:00
Alvaro Garcia 2380710020 drivers: Added fuel gauge max17048
Added support for fuel gauge max17048

Signed-off-by: Alvaro Garcia <maxpowel@gmail.com>
2023-03-22 14:51:33 -04:00
Nazar Palamar 8fb4a18667 boards: arm: cy8cproto-062-4343w: enable BLE features
Enable BLE features for CY8CPROTO-062-4343W board.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-22 16:40:55 +01:00
Nazar Palamar f91e35d447 driver: bluetooth: Added Infineon cyw43xxx BT driver
Added initial version of Infineon cyw43xxx BT (
H4 HCI extension drivers/bluetooth/hci/CMakeLists.txt)

Add initial version of binding file for Infineon CYW43xx BT
HCI extension driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-22 16:40:55 +01:00
Nazar Palamar a89b86a99e modules: hal_infineon: Added support of BT controller fw blobs
- Added Cmakefiles for modules\hal_infineon\btstack-integration\,
  where handle generation of Bluetooth include blob from HCD binary.

- Supported following device/modules:
 -- CYW43012/MURATA-1LV module
 -- CYW4343W/MURATA-1DX module
 -- CYW43439/MURATA-1YN module
 -- CYW4373/STERLING-LWB5plus module

- Added possibility to use user provided BT Firmware HCD file via
  kconfig (path must be defined in
  CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)

- Updated top makefile

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-22 16:40:55 +01:00
Alberto Escolar Piedras b6c6de386c tests bsim/net: Add simple echo test over OpenThread
Expand the tests/bsim/net/sockets/echo_test
with a variant using OpenThread

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Alberto Escolar Piedras 6decd2d55f samples echo_client/server: Add overlay for nrf52_bsim
To disable the flash by default so the openthread RAM
settings backend is used instead.
This allows using this samples with the overlay-ot.conf
directly in the simulated nrf52_bsim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Alberto Escolar Piedras fc3d8a83aa tests bsim/net: Add simple echo test over 802.15.4
Add a simple selfchecking test for the 15.4 stack,
based on the echo client / server sample apps.
It relies on the bs_tests hooks to register a test timer
callback, which after a deadline will check how many
packets the echo client has got back as expected, and if
over a threshold considers the test passed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Dean Sellers 5a0834f16f west: hal_espressif: Update to latest revision
Espressif hal to 8ee9650.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-03-22 13:52:25 +01:00
Dean Sellers 8eddd48615 drivers: uart: esp32: Add RS485 half duplex hardware mode
Support for the hardware mode where pin configured as DTR
is asserterted when UART transmits.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-03-22 13:52:25 +01:00
Franciszek Zdobylak 3ff1e97367 fs: Fix Kconfig formatting
- use tabs instead of spaces in indentation
- use 2 spaces instead of tab in help message

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-03-22 13:52:07 +01:00
Szymon Janc 1ebb49eeee bluetooth: ascs: Fix NULL pointer dereference in ascs_ase_read
"The (ATT attribute read) callback can also be used locally to
read the contents of the attribute in which case no connection
will be set."

This means that callback may be called with NULL conn. Since
for ascs_ase_read NULL conn object have no meaning just return
error.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-03-22 13:51:58 +01:00
Anas Nashif 0f2a352cbd Revert "xtensa: remove ELF section address rewriting"
This reverts commit 7a85983ebc.

This commit was merged prematurely and is causing issues on multiple
platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-22 08:35:52 -04:00
Andrei Emeltchenko b0e6a6f8a7 tests: smbus: Fix testing for disabled configuration
When some configuration options are disabled, test for -ENOSYS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 9b95e3d64a tests: smbus: Test disabling configuration options
Add tests with some configuration option disabled:
CONFIG_SMBUS_INTEL_PCH_HOST_NOTIFY and
CONFIG_SMBUS_INTEL_PCH_SMBALERT.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko e829b72ad5 drivers: smbus: pch: Wrap respective code with ifdefs
Wrap code for SMBALERT and HOST_NOTIFY with configuration ifdefs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 97c55ce46c smbus: Update CODEOWNERS and MAINTAINERS files
Update CODEOWNERS and MAINTAINERS files.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko a42ab2729f smbus: Convert to use runtime BDF lookup
Convert PCH SMBus driver, tests and samples to use new dynamic BDF
lookup.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 14923f4131 smbus: Refactor callbacks API
The callbacks API was similar to gpio / espi callbacks API. Refactor
it to use more intuitive names for set / remove callbacks.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko a35c889687 tests: smbus: Add SMBus unit tests
Add SMBus unit tests which emulate SMBus controller and connected test
peripheral device. This allows to test also rare SMBus protocols like
Process Call and Block Process Call.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko a242e572ce tests: drivers: Add tests for Intel PCH SMBus driver
Add test testing Intel PCH SMBus driver using Qemu x86_64 with
machine q35 SMBus controller emulation and default "eeprom"-like
peripheral.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko cf423b3eaa samples: Add smbus shell sample application
Add smbus sample for testing SMBus commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 3e0a88e8da board: qemu_x86_64: Add SMBus DTS configuration
Add SMBus specific configuration to qemu_x86_64 device tree since
this board does not have issues with dynamic IRQ allocation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko f2b6fb9cd2 board: elkhart_lake: Add smbus to the board's DTS
Add PCH SMBus to Elkhart Lake device tree.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko fe9dfcfcd1 board: raptor_lake: Add smbus to the board's DTS
Add PCH SMBus driver to Raptor Lake device tree.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko fe46408ff2 drivers: smbus: Implement Host Notify and SMBALERT for PCH
Implement SMBus Host Notify and SMBALERT for Intel PCH driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 2146b19cc7 smbus: Add Host Notify and smbalert API
Add API for SMBus Host Notify and SMBALERT.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 2de1936acc drivers: smbus: pch: Add Block Process Call operation
Add SMBus Block Process Call implementation for Intel PCH SMBus
driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko cb2a10c254 smbus: dts: Add Intel PCH SMBus driver bindings
Add bindings for Intel PCH SMBus driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 4099bc2e63 drivers: smbus: Add Intel ICH / PCH SMbus driver
Add driver supporting Intel I/O Controller Hub (ICH), later renamed
to Intel Platform Controller Hub (PCH).

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko af984aa58b drivers: smbus: Add Intel PCH driver register header
Add header file for Intel PCH SMBus driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 90e6bf8e9f smbus: doc: Add Documentation for SMBus subsystem API
Add some basic documentation and API reference for SMBus.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 5fc55364a2 smbus: shell: Add SMBus subsystem shell module
Add SMBus shell module for testing. This allows arbitrary boards with
SMBus driver supported exploring the SMBus communication with
peripheral devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko adff73d618 smbus: Introduce SMBus subsystem driver API
Introduces SMBus driver API for SMBus controllers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 0633b8c75c smbus: dts: Add bindings for SMBus peripherals
Add bindings for SMBus peripheral devices on a bus.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 70f1e83c21 smbus: dts: Add bindings for SMBus controllers
Adds bindings for SMBus controllers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Henrik Brix Andersen 26ebceed55 kconfig: add note about increasing default stack sizes for -O0
Add a note about increasing default stack sizes to the
CONFIG_NO_OPTIMIZATIONS help text.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-22 08:10:53 -04:00