Commit graph

83957 commits

Author SHA1 Message Date
Piotr Narajowski 38c9181642 bluetooth: tester: Service init
VCS and AICS service init will be handled in auto-pts

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-13 17:23:13 +02:00
Sylvio Alves a6756c36e9 samples: wifi: esp32s2_saola: reduce RAM usage
This modification frees up around ~10kB of RAM and make sample code
working again.

1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-13 17:00:28 +02:00
Marko Sagadin 5f0bb1d277 samples: drivers: uart: native tty: Add native_sim overlay
Also include it in the twister tests.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Marko Sagadin 3d5e660903 drivers: serial: native tty: Split in top and bottom
Split the native tty serial driver in a top and bottom to enable using it
with embedded libCs.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Daniel DeGrasse 11f6f2f7e8 samples: subsys: display: Add RK055HDMIPI4M shield testcase to LVGL
Add RK055HDMIPI4M specific testcase to LVGL. This allows LVGL to be
verified on the RT1170 and RT595 EVKs from NXP, which support LVGL using
this shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 16:36:10 +02:00
Jeppe Odgaard 30a2326d0b drivers: sensor: qdec_mcux: update phase bit in register
Update single phase bit in register when changing data->qdec_config.
Otherwise the changed settings has no effect.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-09-13 16:35:07 +02:00
Keith Packard 8084ea55b7 boards/arc/qemu_arc: Disable use of branch delay slots
I spent several hours debugging a weird stack pointer corruption bug and
discovered that QEMU appears to mess up register contents when an interrupt
fires during the execution of a branch with a delay slot.

Instead of trying to fix qemu, let's just tell the compiler to not generate
code that uses the branch instructions with delay slots.

Closes: #60071

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-13 16:34:53 +02:00
Ryan McClelland 10b85602e6 drivers: i3c: fix cdns-i3c builds with I3C_USE_IBI=n
The Cadence I3C was not building with CONFIG_I3C_USE_IBI, this fixes
the build and will give a small code size reduction when enabled.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:32:55 +02:00
Manimaran A 9b6c933678 drivers: mchp: kscan: low power mode enabled
KSCAN driver updated to support low power feature

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 16:32:37 +02:00
Manimaran A dd97ed1307 drivers: mchp: kscan: dts update for low power mode
pinctrl and dts updated to support low power feature

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 16:32:37 +02:00
Marcin Niestroj f15e7c5909 soc: arm: st: set SWO reference frequency based on 'rcc'
Configure SWO reference frequency to be the same as
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC. This should make all ST boards ready to
be used with SWO, without configuring any other devicetree property.

Tested with NUCLEO-L476RG and NUCLEO-H563ZI.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-09-13 16:29:56 +02:00
Marcin Niestroj a9fbcd2785 logging: swo: add Kconfig option for SWO reference frequency
SWO reference frequency was set based on `swo-ref-frequency` under `itm`
nodelabel or `/cpus/cpu@0/clock-frequency` property. Not all platforms
configure those.

All ST devices configure CPU frequency in `clock-frequency` under `rcc`
nodelabel. Configuring the same value for each board in
`/cpus/cpu@0/clock-frequency` would be one way to make SWO work out of the
box. There is lots of copy-pasting involved in this, which makes this very
error-prone.

Introduce Kconfig option, which will default to values configured in `itm`
or `/cpus/cpu@0`. The main advantage will be for platforms like ST, where
CPU clock frequency is already configured in another place. Thsoe could
override default value in SoC, board or any other platform specific layer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-09-13 16:29:56 +02:00
Ryan McClelland 1b63e49b3f drivers: i3c: cdns: fix transfers while not idle
If a transfer happen in rapid sucession. It was possible for
the core to not be ready to accept another command. Poll on
the idle status bit until the core is ready to accept new data.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:28:55 +02:00
Ryan McClelland 696acc78e0 drivers: i3c: cdns: fix reading error after transfer
Due to a bug, after a completed transfer happen. Only the first
command response error was read. This fixes the issue so all
commands are read for if an error occurred.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-13 16:28:55 +02:00
Benjamin Lemouzy 75bc80d86f drivers: audio: tas6422dac: add driver
Add Texas Instruments TAS6422 DAC driver.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-09-13 16:27:11 +02:00
Andreas Wiesinger cb76aab9d3 dts: sensor: bosch,bmi270: Move interrupt handling to parent binding
Moved the interrupt handling code from a bus-specific binding file to
the parent binding file. This modification ensures that interrupt
handling, which is inherently independent of the type of BUS used
(either i2c or spi), is located in the appropriate location within
the code.

Previously, this code was found in a bus-specific file, despite its
functionality being applicable to all buses. This change ensures a
more logical placement and will help to maintain coherence within the
codebase.

This change aligns with the existing implementation where the interrupt
handling code already operates independently of the BUS type.

Tested this on a nrf52840 with a bmi270 on spi bus with the sample from
zephyr/samples/sensor/bmi270 by adding an interrupt handler in main.c
which uses the bmi270_trigger.c implementation and verified this with
breakpoints and log output.

Added the irq-gpios to tests/drivers/build_all/sensor/i2c.dtsi and
tests/drivers/build_all/sensor/spi.dtsi and fixed whitespace formatting.

Fixes: #58843

Signed-off-by: Andreas Wiesinger <awiesing90@gmail.com>
2023-09-13 16:26:24 +02:00
Rick Talbott 829b91ab2f shell: Fix scrolling long commands in history
This fixes scrolling long commands in command history in the shell

Signed-off-by: Rick Talbott <richard.talbott1@t-mobile.com>
2023-09-13 16:26:02 +02:00
Torsten Rasmussen 25d82ddead cmake: armclang version detection
The armclang version detection introduced in #55133 does not correctly
detect a valid ARM Compiler (armclang) installation in all situations.

When ARM Compiler for Embedded is installed as part of ARM-DS or Keil,
then it may report itself in following output:
> Product: Arm Development Studio ... <year>.<no>
> Component: ARM Compiler x.y(.z)
> Tool: armclang [...]
>
> Target: ...

Correct the version extraction by turning each line into a list of
strings which can then be looped to find the ARM compiler component to
ensure the correct line is used for retrieving the version information.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-09-13 16:23:30 +02:00
Mourad Kharrazi a85ffa8130 drivers: sdhc: allow bandwidth selection
The current implementation uses both, host and card capabilites to derive
the maximum bus width to be used. However, in cases where a MMC device is
not connected to the host via shdc using the full bus width of 8 lines,
device initialization fails. Introducing the `bus-width` property
circumvents this by reducing the host bus capabilites and forcing
communication with the MMC device using 1, 4 or 8 lines.

Signed-off-by: Mourad Kharrazi <mourad.kharrazi@ithinx.io>
2023-09-13 16:20:59 +02:00
Andrzej Głąbek e3ee5c09f2 samples: code_relocation_nocopy: Make linker script more generic
Instead of depending on the nRF5340 DK, use a path specific to just
the nRF5340 SoC and get the size of the external flash in this case
from devicetree so that the sample could be easily run on other boards
based on the nRF5340 SoC (after just adding proper overlays).

On the occasion, correct the attributes of the EXTFLASH memory region.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
Andrzej Głąbek 6bd6f4be65 samples: code_relocation_nocopy: Use nrf_qspi_nor driver to init XIP
Use the Nordic QSPI NOR flash driver instead of the specific code
for the nRF5340 DK to initialize the external flash chip for XIP.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
J M 9cf437728e sys: lists: Add tests for newly-added list len functions
This commit adds tests for the newly added list len APIs to the
corresponding test cases. It is noted that the test functions calculate
equivalent values manually using several different internal list
functions. This has been left unmodified to ensure that the manual ways
using each of the various for_each functions results in the same value
as the new list_len() functions.

Signed-off-by: J M <montytyper@msn.com>
2023-09-13 16:19:33 +02:00
J M dbb786dae1 sys: lists: Add list functions to compute list length
This commit adds functions to slist, sflist, and dlist to return the
length of provided lists, which will allow future commits to refactor
code that implements this manually.

The new functions all take a reference to any node in the list and compute
the length of the entire list. If the list is empty, they return 0.

Signed-off-by: J M <montytyper@msn.com>
2023-09-13 16:19:33 +02:00
TOKITA Hiroshi 5119af0422 tests: counter: counter_basic_api: Add support for rpi_pico boards
Add support for rpi_pico board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
TOKITA Hiroshi 10057d54d9 samples: drivers: counter: alarm: Add support for rpi_pico
Add the rpi_pico board to the supported boards for the counter
alarm sample

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
TOKITA Hiroshi 66857e7072 boards: rpi_pico: Add timer support
Add timer support for the rpi_pico board

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
TOKITA Hiroshi cf242016b4 drivers: counter: Add support for rpi_pico timer
Adds support for rpi_pico timer

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
TOKITA Hiroshi 8d98e7064e modules: hal_rpi_pico: Enable TIMER driver
Enable TIME driver.
Add the path of the TIME driver header into include paths.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
TOKITA Hiroshi e79ef00596 manifest: Update hal_rpi_pico module
Update hal_rpi_pico to commit fba7162c to introduce
the hardware_timer modification.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Torsten Rasmussen 73605f1ee8 cmake: armlink: update CMake library to arch__arm__core__cortex_m
Fixes: #62589
Follow-up: #60031

The PR #60031 moved CMake code to new folder location causing generated
library names to change.
This change impacted the use of those libraries in the Zephyr armlink
CMake code, causing CMake failures at configure time.

This PR fixes this failure by updating the armlink CMake code to use
the new library names.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-09-13 14:37:08 +01:00
Fabio Baltieri c99f7ec019 drivers: fuel_gauge: fix i2c_dump_msgs_rw argument
Fix another i2c_dump_msgs_rw:

/drivers/fuel_gauge/bq27z746/emul_bq27z746.c:282:26: warning: passing
argument 1 of ‘i2c_dump_msgs_rw’ from incompatible pointer type

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-13 12:37:32 +01:00
Weiwei Guo 2779dd9d9b drivers: sensor: bmm150: Add trigger support for bmm150 magnetometer sensor
Add bmm150 magetometer sensor data ready trigger support.

Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
2023-09-13 12:07:57 +02:00
J.P. Hutchins d7313388c9 drivers: flash: fix hw write protect before sw
This change sets write-protect pin disabled BEFORE SW write-protect disable
and  write-protect pin enabled AFTER SW write-protect enable.

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
J.P. Hutchins b403fdee00 drivers: flash: cleanup #ifs; fix missing ;
Fixes made running tests/drivers/flash

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
J.P. Hutchins a9ac01c457 drivers: flash: add LOG_ERR for pin init
-ENODEV returned in 4 cases, logs can distinguish

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
J.P. Hutchins 477ff70230 test: drivers: flash: build spi_nor.c wp & hold
Test spi_nor.c driver builds with or without wp-gpios and hold-gpios.

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
J.P. Hutchins 19ba93c896 drivers: flash: implement wp-gpios and hold-gpios
Adds the wp-gpios & hold-gpios from jedec,spi-nor compatible to spi_nor.c.

Signed-off-by: J.P. Hutchins <jp@intercreate.io>
2023-09-13 12:07:27 +02:00
Stanley Huang 73a87d14df boards: arm: add raytac_mdbt53v_db_40_nrf5340
Adds new raytac_mdbt53_db_40_nrf5340 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-09-13 12:06:48 +02:00
Stanley Huang 52ba1ee621 boards: arm: add raytac_mdbt53_db_40_nrf5340
Adds new raytac_mdbt53_db_40_nrf5340 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-09-13 12:06:48 +02:00
Daniel DeGrasse fdd7e78d3c boards: arm: mimxrt1060_evk: added additional PWM outputs
Added PWM outputs to arduino header, to make testing PWM support with
this EVK simpler. These PWM outputs are enabled by the pwm_api test,
although they are not used. The user can enable the PWM shell in order
to test these PWM outputs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 12:06:23 +02:00
Nick Ward 43be17a5fe tests: drivers: build all: sensor: add current_amp
Add current sense amplifier driver to tests.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-13 12:05:52 +02:00
Nick Ward 17f2046821 drivers: sensor: current_amp: add driver
Add current sense amplifier driver.

Implements https://github.com/zephyrproject-rtos/zephyr/issues/60415

Co-authored-by: Marco Argiolas <marco.argiolas@ftpsolutions.com.au>

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-13 12:05:52 +02:00
Jordan Yates 1e06ba2328 soc: arm: nordic: handle nRF52832 anomaly 109
Enable workaround for anomaly 109 by default when affected peripherals
are enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-09-13 12:05:27 +02:00
Marcel Krüger 387f3c2092 drivers: fuelgauge: Add TI BQ27z746 driver
Add driver for the Texas Instruments BQ27z746 fuel gauge

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2023-09-13 12:05:04 +02:00
Vladimir Graudt d40dbdf96f modules: mbedtls: use proper memory alignment on 64-bit platforms
This commit instructs mbedtls to use 64-bit alignment in its internal
memory allocation routines when targeting 64-bit platforms. By default
mbedtls uses 32-bit alignment regardless the platform, what may result
in misaligned memory accesses, possibly inducing access time overhead or
exceptions

Signed-off-by: Vladimir Graudt <vladimir.graudt@syntacore.com>
2023-09-13 12:02:06 +02:00
Manimaran A 5e2498b54f tests: boards: mec172xevb_assy6906 Add SPI driver test
Add a test for the Microchip MEC172x SPI driver using the
mec172xevb_assy6906 board with an external SPI dongle.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 12:01:18 +02:00
Manimaran A b328e920b6 drivers: spi: Microchip MEC172x SPI fix for Zephyr 3.4 breakage
Zephyr version 3.4 changed the SPI context structure and macros
which broke the logic in the MEC172x SPI driver configuration API.
This was not detected by CI due to no tests for this driver are in
the tree. The driver now behaves like most other SPI drivers requiring
a different configuration structure pointer to be passed if any item
in the configuration changes.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-09-13 12:01:18 +02:00
Dong Wang dbc4cfabdb manifest: intel_hal: update to get more PM patches
It contains SEDI PM enhancements and bug fixing.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-09-13 05:51:55 -04:00
Erwan Gouriou 9f52fac1ea driver: entropy: stm32: Enable PM
Enable PM on STM32 entropy driver.
Only supports PM_DEVICE for now, runtime support will be added later.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-09-13 11:50:04 +02:00
Erwan Gouriou 0829d59925 dts: stm32wba: Add missing SoC compatible
SoC compatible is now expected in soc .dtsi files

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-09-13 11:49:44 +02:00