Commit Graph

81971 Commits

Author SHA1 Message Date
David Brown a64f430d6f doc: release-notes: Update tf-m and mbed TLS
Describe the versions of TF-M and Mbed TLS being used.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-07-21 19:08:01 +00:00
David Brown a30dbd5fe8 manifest: Upgrade to trusted-firmware-m 1.8.0
Update trusted-firmware-m to 1.8.0, mbedtls to 3.4.0, and tf-m-tests to
1.8.0.  Includes minor cmake changes due to file renames and such, as well
as adjusting the return type of a callback function that has changed since
the previous version of trusted-firmware-m.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-07-21 19:08:01 +00:00
Fabio Baltieri 1fd372737b hwinfo: gecko: fix warning when building for efr32bg27_brd2602a
When building the driver for efr32bg27_brd2602a none of the condition
matches and the compiler warns for:

hwinfo_gecko.c: In function 'z_impl_hwinfo_get_reset_cause':
hwinfo_gecko.c:38:18: warning: unused variable 'rmu_flags'
   38 |         uint32_t rmu_flags = RMU_ResetCauseGet();

This fails the bi-weekly build, add a __maybe_unused to silence the
warning.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 12:54:01 -04:00
Fabio Baltieri 502ecaeac5 sensors: icm42688: ensure SENSOR_ASYNC_API is selected
This fix a build issue where ICM42688_DECODER is enabled but
SENSOR_ASYNC_API is not, which results in some structures in an
orphan section:

warning: orphan section
`._sensor_decoder_api.static.invensense_icm42688__decoder_api_' from
`libdrivers__sensor__icm42688.a(icm42688_decoder.c.obj)'
being placed in section
`._sensor_decoder_api.static.invensense_icm42688__decoder_api_'

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 14:12:13 +00:00
Derek Snell e44314aeee soc: nxp_imx: rt5xx: fix part numbers in WLCSP
Dropped R from part numbers to match MCUXpresso SDK

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2023-07-21 09:09:55 -05:00
Fabio Baltieri bb0135b64c sensor: bq274xx: use two bytes write for settings
Use a combination of sys_cpu_to_be16 and i2c_burst_write_dt for setting
16 bits registers. Get rid of a bunch of temporary variables, custom
conversions and few bus writes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri ec98bf7cbc sensor: bq274xx: add support for bq27427
The current ID for BQ274XX_DEVICE_ID is actually the one for the
BQ27421. The driver seems to work with the BQ27427 as well, at least the
common and extended commands are the same, so add that variant as well,
rename the existing one and print the currently read ID when the ID
check fails.

The configuration registers have a different offset though, so add a
register offset table and make the device rcognize the right one un
runtime based on the device ID.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 6390dd582a sensor: bq274xx: drop bq274xx_ctrl_reg_write
Use i2c_reg_write_byte_dt instead of bq274xx_cmd_reg_write. The wrapper
does not add anything anyway.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 4dc7437d45 sensor: bq274xx: support fetching all channels
Change bq274xx_sample_fetch to support SENSOR_CHAN_ALL. This makes it
possible to get the sensor data using the sensor shell, besides being
generally convenient.

Also drop a redundant comment.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 76509a73b1 sensor: bq274xx: clarify the unseal sequence
The device technical reference manual says "The Sealed to Unsealed key
has two identical words". Use two different defines with the same value
in the code so it's somewhat less ambiguous that the double write is
intentional.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 7b6430cc80 sensor: bq274xx: limit config update mode check loops
Add a retry count limit to config update mode loops, this way the system
can still boot if there's an issue with the device. The normal sleep
should be enough for correct operation, adding a conservative limit.

Rework the delays to be unambiguous while at it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 71bd63d007 sensor: bq274xx: fix few parameter calculations
Fix the calculation for designenergy_mwh, as right now it's using a
float casted straight to an int, which results in the factor rounded
from 3.7 to 3. Also rework both that and taperrate so that they don't
use floating point.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 35bb28abaf sensor: bq274xx: add few defines for magic numbers
Add a couple of define for the data memory block size and config flag
bit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 9bc43ac3ce sensor: bq274xx: simplify i2c write code
Control reg write seems to support two bytes mode (the technical
reference shows example of that), so use a single i2c_write_dt there.
Also drop a couple alias variables from bq274xx_cmd_reg_write.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 2dcaed3252 sensor: bq274xx: drop a bunch of redundant initialization
Drop various unnecessarily initialized variables from the driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri 1e2b7de13b sensor: bq274xx: remove forward declaration
Move bq274xx_gauge_configure up in the code, remove the forward
declaration.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri f6f568b712 sensor: bq274xx: drop unnecessary casting
Drop unnecessary casting from uint16_t to uint8_t.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Fabio Baltieri e68e623963 sensor: bq274xx: re-add function prefixes
Add the bq274xx_ back to the static function prefixes for the bq274xx
driver.

These have been removed recently but every other sensor and most Zephyr
driver have static function prefixed, this helps avoiding ambiguity in
list files, stack traces, setting debugging breakpoints etc.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:46 -05:00
Emilio Benavente 0798b68c64 tests: drivers: dma: scatter_gather: Added Overlay file.
Added an overlay file for the LPC55S36 to demonstrate
the DMA Support with the scatter_gather test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Emilio Benavente e8495d7668 tests: drivers: dma: loop_transfer: Added Overlay file.
Added an overlay file for the LPC55S36 to demonstrate
the DMA Support with the loop_transfer test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Emilio Benavente 7059b433ae tests: drivers: dma: chan_blen_transfer: Added Overlay file.
Added an overlay file for the LPC55S36 to demonstrate
the DMA Support with the chan_blen_transfer test.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Emilio Benavente 19b526f467 boards: arm: lpcxpresso55s36: Added DMA Support for LPC55S36
Added DMA Support for the LPC55S36 Board as well as
a creation for space on the HEAP when DMA Blocks are
required.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Emilio Benavente e12e026c95 dts: arm: nxp: lpc55s3x: Added DMA Nodes in dts files.
Added dts nodes for DMA support on LPC55S3X devices.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Emilio Benavente a50c26d80f drivers: dma: dma_mcux_lpx: Added parameter in macro for 55S36
Added a parameter inside the Channel Number macro since
the LPC55S36 expects an address rather than a static number.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05:00
Benjamin Cabé dde023fb8a lib: os: doc: Hashmap documentation fixes
Add missing documentation for SYS_HASHMAP_DEFAULT_ALLOCATOR and
sys_hashmap struct.
Fixed minor type in SYS_HASHMAP_DEFINE_STATIC_ADVANCED doc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-21 08:54:09 -05:00
Benjamin Cabé ea1e6b59f5 lib: os: doc: Cleanup doxygen groups
Cleaned up doxygen group for hash_map and hash_map_api
Adding brief/desc to the main group instead of the file to actually
surface them in the documentation

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-21 08:54:09 -05:00
Benjamin Cabé 1539c1c094 lib: os: doc: Show hash implementations in documentation
Added a Doxygen group for Hash implementations

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-21 08:54:09 -05:00
Benjamin Cabé b5cf5d1f24 lib: os: doc: Show hash functions in documentation
Show hash functions under Hashmap doc entry.
Also fixed minor issue with '.' character ending @brief early.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-21 08:54:09 -05:00
Mulin Chao 976474d194 doc: releases: Add release notes for npcx flash driver
Add release notes for npcx flash driver in 3.5 release.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-21 13:32:11 +00:00
Fabio Baltieri 41bbf18c25 MAINTAINERS: point release notes to Johan and Fabio
Change the release notes area to the release owners for 3.5.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 09:07:32 -04:00
Johan Lafon 9c69368b1d driver: clock-control: st: allow PLL1Q support for G0 and WL
LL name for PLL1Q is not the same across STM32G0, STM32WL, STM32H5 and
STM32H7 families. This allows to choose the proper definition depending on
the family.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-07-21 10:58:48 +00:00
Fabio Baltieri 34584c9e0c tests: build_all: input: add an alternate setting test case
Many touchscreen drivers have an option interrupt mode that enables a
different code path. Add an extra test for touchscreen drivers to build
the non-default case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-21 10:55:57 +00:00
David Leach a6a129c971 drivers: gpio: fix coverity memory overwrite error
memcpy of a sub-structure in a structure was using the structure size
of the parent structure instead of the sub-structure.

fixes: #59548

Signed-off-by: David Leach <david.leach@nxp.com>
2023-07-21 10:55:21 +00:00
Emil Gydesen cab52d23c4 footprint: Add BT TMAP broadcast samples
Add the BT Telephony and Media Audio Profile broadcast samples.
These reflect devices that control telephone and media audio
of LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-21 10:55:03 +00:00
Emil Gydesen bf153e576b Bluetooth: CCP: Fix coverity issue for current_inst == NULL
In discover_next_instance coverity did not consider the
ASSERT and warns about possibly dereferecing current_inst
which could be NULL. Modifed the code slightly to make
Coverity happy.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-21 10:54:01 +00:00
Daniel DeGrasse 351cb4bafe samples: drivers: add led_is31fl3733 sample to demonstrate usage
Add sample to demonstrate usage of IS31FL3733 LED using the LED API.
This led matrix controller has several custom APIs to expose
functionality not available within the standard led API, such as
limiting LED current.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
Daniel DeGrasse 85a41ae88a drivers: led: added support for is31fl3733 led driver
Enabled support for is31fl3733 driver. This driver supports
the full LED API, and enables the following features of the is31fl3733:
- individual LED dimming
- individual LED enable/disable
- bulk writes of LED enabled and dimming states
- global LED current limit
- blanking (via custom API)

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
Kornel Dulęba 8fc913374f include: util: Add DIV_ROUND_CLOSEST helper
It's similar to DIV_ROUND_UP, but rounds to the nearest integer.
Some basic unit tests were introduced to check that it works as
intended.

Signed-off-by: Kornel Dulęba <mindal@semihalf.com>
2023-07-21 10:49:41 +00:00
cyliang tw ecbaac60bd drivers: flash: support for Nuvoton numaker series FMC
Add Nuvoton numaker series flash memory controller(FMC) with erase,
 read & write features of soc-flash. Also update Nuvoton manifest
 to include zephyrproject-rtos/hal_nuvoton#6.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-07-21 10:41:40 +00:00
Christopher Friedt 748683fae6 posix: eventfd: remove redundant conditional
Since the argument is a 32-bit unsigned int, all possible
values satisfy the condition that intval < UINT64_MAX - 1.

Remove the redundant conditional.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-21 06:33:19 -04:00
Tim Lin 995444d5a9 ITE: drivers/i2c: Modify the condition of assert
Channel B or C do not necessarily have to use FIFO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-07-21 10:30:42 +00:00
Ryan McClelland f851d2a61b tests: lib: c_lib: fix test_sqrt double promotion warnings
Double promotion warnings are generated with the flag -Wdouble-promotion
Exponent was defined as a float, but was really be used a double here
Change the type of exponent in sqrt from float to double.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-21 06:30:32 -04:00
Carlo Caione d24880e358 test: Exclude qemu_cortex_a53_smp from portability.posix.eventfd
The test is failing for (so far) unknown reasons, blocking several PRs.
Exclude it until a proper investigation finds the root cause.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-21 06:23:00 -04:00
Alberto Escolar Piedras b69cd3cbc1 manifest: Update nRF HW models to latest
Which include a more complete model of the CLOCK peripheral.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-21 08:47:53 +02:00
Alberto Escolar Piedras b3f0a08512 doc: nrf52_bsim: Update list of supported peripherals
The GPIO, GPIOTE and FICR are now also modelled
to a reasonable degree.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-21 08:47:53 +02:00
Paul He 278563ed45 drivers: input: gt911: fix error 'ret' undeclared
When CONFIG_INPUT_GT911_INTERRUPT is set to 'y', it will get this
undeclared error, now fix it.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2023-07-20 20:52:19 +00:00
Al Semjonovs f856e7ba63 icm42688: Fix channels read BIT shift error
channel_pos_read bit was being cleared with a sensor channel enum value
instead of the encoded bit position.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-07-20 14:19:20 -05:00
David Leach 3038a3c4e0 MAINTAINERS: Add manuargue to NXP HAL maintainer list
Add manuargue to NXP HAL maintainer list

Signed-off-by: David Leach <david.leach@nxp.com>
2023-07-20 15:15:58 -04:00
Daniel Leung 4c80949ecf libc: remove no longer valid kconfig comment
After commit 9a0aebc5fd,
the exclusion of qemu_x86_tiny is no longer and the "depends on"
option was removed. However, the comment about that remained.
Remove the comment as it is no longer valid.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-20 12:58:36 -04:00
Flavio Ceolin ed8355ad3f kernel: userspace: Fix memory leak
Fix memory leak on dynamic object allocation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-20 16:10:32 +00:00