Commit graph

83840 commits

Author SHA1 Message Date
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
Paulo Santos 395395b266 soc: arm: efr32bg22: add missing GPIO flag
Add the missing SOC_GECKO_GPIO selection to the EFR32BG22 SoC Series.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2023-09-13 11:49:27 +02:00
Andy Sinclair dd52908fcf drivers: regulator: npm1300: Set voltage checks existing setting
Regulator voltage setting is not applied if the device output
is already configured for the requested voltage.
This change is needed to ensure correct device behaviour.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-09-13 11:48:33 +02:00
Andy Sinclair 49ef9be4b9 drivers: regulator: npm1300: Add PFM mode
Set regulator mode updated to support forced PFM mode

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-09-13 11:48:33 +02:00
Vivekananda Uppunda 450dbb15ef net: l2: wifi: Add support for W-Fi mode setting and selection
This change brings in support for setting various Wi-Fi modes and
enables a specific Wi-Fi interface to be also placed into a sniffer
operation via monitor mode and promiscuous mode. A raw TX- packet
Injection mode is also introduced

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2023-09-13 11:47:28 +02:00
Patryk Duda a17fe86de2 arch: common: Force linker to fill empty spaces in rom_start with 0x00
LLVM LLD fills empty spaces (created using ALIGN() or moving the
location counter) in executable segments with TrapInstr pattern,
e.g. for ARM the TrapInstr pattern is 0xd4d4d4d4. GNU LD fills
empty spaces with 0x00 pattern.

We may want to have some section (e.g. rom_start) filled with 0x00,
e.g. because MCU can interpret the pattern as a configuration data.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-09-13 11:46:56 +02:00
Benjamin Cabé 12ba4dff1e doc: include: add missing doxygen comments in math_extras.
While the existing named sections were nice and to the point, it is
better to also document each function separately.
Also mounted this utility header under the "Utilities" doxygen group.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 11:38:54 +02:00
Max van Kessel 5670bad505 drivers: clock: stm32: overdrive after sysclock
According to the reference manual the overdrive should be enabled after
setup of the sysclock (HSE or HSI) and enabling the PLL (PLLON).
The flash latency should be enabled after the PLL has been turned on,
but before switching the system clock to the PLL.

Signed-off-by: Max van Kessel <max_van_kessel@msn.com>
2023-09-13 11:37:05 +02:00
Krzysztof Chruściński 3168623abb tests: drivers: clock_control: nrf_lf_clock_start: Clean up
After 31767a0bc there is no need to disable boot banner because
initial clock state is read in POST_KERNEL stage before the boot
banner is printed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-09-13 11:36:30 +02:00
Benjamin Cabé 4d53ae8a42 doc: shell: fix incorrect use of :kbd: role
Key combinations described using the sphinx :kbd: role should not have
a white space around + sign
i.e. should be :kbd:`Ctrl+d` not :kbd:`Ctrl + d`

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 11:35:44 +02:00
Fabian Blatz ca56084244 modules: lvgl: move existing includes to folder
Moves the includes to the exisiting `include` folder within the
module.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Fabian Blatz c64724e5db samples: subsys: display: lvgl: Add lvgl-encoder-input device
Adds a zephyr,lvgl-encoder-input compatible to the native_posix board
overlay and the required code to control an arc widget.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Fabian Blatz 094342866f modules: lvgl: input: add zephyr,lvgl-encoder-input device binding
Add a pseudo device which can be used to hook into qdec events and
optionally a button and relay the input_event to lvgl.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Ederson de Souza 1f51a0e0e1 scripts/pylib/pytest-twister-harness: Do not fail on Unicode garbage
If pylib twister harness reads bytes that can't be decoded to Unicode,
it would raise an exception at a separate "serial reader" process, that
would fail without any warning.

This patch uses "errors='replace'" parameter for Python str.decode()
method, so that this doesn't happen.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-09-13 11:34:27 +02:00
Huifeng Zhang 80e1b37fdb doc: release-notes: Add Aarch32 v3.5.0 notes
Adds release notes for Aarch32 for Zephyr 3.5.0.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang 37a6118372 arch: arm: Separate common kernel_arch_func code
This commit separates kernel_arch_func.h into two header file,
'cortex_a_r/kernel_arch_func.h' and 'cortex_m/kernel_arch_func.h', it
also removes some functions which is empty.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang 9ba3d31310 arch: arm: Separate common cpu_idle codes
This commit separates cpu_idle.S into two asm files,
'cortex_a_r/cpu_idle.S' and 'cortex_m/cpu_idle.S'.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang 7e5e08b3ab arch: arm: Separate common thread code
This commit separates thread.c into two source files,
'cortex_a_r/thread.c' and 'cortex_m/thread.c, it also introduces some
changes.

1. Migrate 'thread.c' and 'cortex_m/thread.c'.
2. Migrate 'thread.c' and 'cortex_a_r/thread.c'
3. Remove the 'z_arm_mpu_stack_guard_and_fpu_adjust' function as this is
   obviously written for Cortex-M architecture.
4. Remove the 'z_arm_prepare_switch_to_main' function as this is only
   used by Cortex-M architecture.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00