Commit graph

100998 commits

Author SHA1 Message Date
Chris Ruehl
8a154da914 tests: build_all: sensors: add bmp180@94, i2c.dtsi
Add bmp180 test case to tests/drivers/build_all/sensor/i2c.dtsi

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
03c942132d Drivers: Bosch bmp180 dts bindings
Add the yaml files needed for the dts binding of the Bosch bmp180 sensor.

V2 Fixup
--------
yaml fixup for complient checks
merge bmp180-i2c.yaml and bmp180.yaml

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
db5091c9f4 Drivers: Add support for Bosch bmp180 sensor
Add driver support for Bosch bmp180 pressure sensor running on i2c bus.
It pushes the driver files to the bmp180 directory under
drivers/sensor/bosch. The driver implement the Sensor API
and support channel DIE_TEMP and PRESSURE.
Driver had been tested with the NRF5340DK.

V2 fixup
---------
Drivers: Bosch bmp180 fixups for PR v2
fix BMP180 in CMakeLists.txt
rename regControl to ctrlreg
simplify the logic in set_attribute
use BMP180_GET_CMD_TEMP_DELAY

Drivers: Bosch bmp180 use system byteorder macros
To aware of ENDIANESS use the macros from byteorders.h

Drivers: Bosch bmp180 comments added to #endif
Add a comment to the #endif /* CONFIG_FOO */

Drivers: Bosch bmp180 , fix twister run error
twister report an error related to using floor() with a float
fix this using floorf() function.

Drivers: Bosch bmp180, rework review v2
fix code style issues
simplify the structure for bus and i2c.
prepare to remove the empty bmp180_i2c.c

Drivers: Bosch bmp180, remove bmp180_i2c.c
bmp180: update CMakeList.txt remove bmp180_i2c.c
bmp180: remove unused variable

fixups for complient checks

replace homebrew bitshift with byteorder.h macro
sys_get_be16 and sys_get_be24
cleanup remove unused spi.h
change struct reg16/24 to uint8_t[]
remove channel AMBIENT_TEMP
bmp180/Kconfig add missing help text
fix indent issue in bmp180_pm_action
merge BMP180_CONFIG_I2C into BMP180_INST
Move DT_DRV_COMPAT out of the header file
drop LOG_DBG() from read calibration data
remove bus_io implementation and header cleanup
move headers and structs out from bmp180.h
fix typo in comment
apply clang format changes, only if not line lenght violation
fix indent code error after joined lines
conversion from Pa to kPh was wrong, fixed it
Remove default=n from Kconfig, it is the default.
Move the conversion ready test into a function (duplicate code)
and apply retry policy
parameter naming with indicate the usage
change BMP180_INST(inst) to clang format
fix int32_t overflow in convension formular
fix wrong devider in convension formula
move BSWAP_s16 BSWAP_u16 from .h to .c

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Johan Hedberg
c15957e753 Bluetooth: drivers: Add module blobs dependencies to Kconfig
Now that there is an actual Kconfig symbol generated for blobs presence,
take advantage of that and declare appropriate dependencies to it. Also add
helpful CMake output if the blobs are missing by taking advantage of the
zephyr_blobs_verify() CMake function.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Johan Hedberg
5562bb9c3a scripts: zephyr_module: Add Kconfig symbol for blobs presence
For any module that defines blobs, add a new Kconfig symbol to indicate
whether the blobs have been fetched or not. Example output for the
hal_silabs module:

   # (no blobs present)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  endmenu
  $ west blobs fetch hal_silabs
   # (blob fetching output)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  	select TAINT_BLOBS

  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  	default y
  endmenu

The generated output for modules which do not define blobs is not affected.

Having this additional symbol for blobs lets us specify Kconfig
dependencies for features which require the blobs to be present.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Bjarki Arge Andreasen
ee1e517ccf ipc: icmsg: configure PBUF RX rx_buffer using kconfig
The size of the rx_buffer used by icmsg.c mbox_callback_process()
is not MISRA compliant, being "dynamically" allocated on the stack.

This commit adds a kconfig to set the size of the read buffer and
asserts that it is large enough to read all received data.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-30 11:45:38 -04:00
Emil Gydesen
303d0b786f tests: Bluetooth: BAP: Add test to test invalid bcode
Add a babblesim test for testing the behavior when providing
an invalid broadcast code as the broadcast sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 11:44:05 -04:00
Pavel Vasilyev
1fa27888f4 bluetooth: mesh: Fix proxy client compilation
When building proxy client without proxy server, it fails to find
the `identity` field in the `struct bt_mesh_subnet_keys` because the
latter only compiles when Proxy server is enabled. It should be
possible to compile Proxy Client without Proxy server.

This commit compiles the field if any of GATT features is enabled.

Fixes #75914

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-08-30 11:43:51 -04:00
Alberto Escolar Piedras
5c17f51bda Bluetooth: Controller: Initialize BIG info RFU field
The BIG info new Framing Mode field was not initialiazed, so
random garbage was being sent to the air in this field.
For the controller this field is still RFU.
The spec specifies RFU fields must be initialiazed to
0. So let's do so to avoid sending invalid data,
and avoid having random data in the air which can cause
random differences in testcases.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:40 -04:00
Luca Burelli
f889c4e288 samples/llext/modules: sample.yaml fixes
Apply cleanups suggested by Anas in a Github discussion to the
sample.yaml file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Luca Burelli
030c1c8308 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Alberto Escolar Piedras
d112549140 manifest: Update bsim to version v2.3
Includes an updated libcrypto with new APIs
for CCM packet encryption/decryption.
Also some other components have got very minor updates.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:20 -04:00
Alberto Escolar Piedras
55f9d6965a manifest: Update nRF hw models to latest
Update the HW models module to:
da5f426e7f3aff192a93e5874146260d4dcd943e

Including the following:
* 6e70c2d hal: hack: Support also AAR, CCM & ECB for 54L
* da5f426 Tests for AAR, CCM & ECB
* 03b8461 54: Added AAR, CCM & ECB models
* 2ebcc88 Add EVDMA model
* 71913e3 54: Enable AAR hal build
* 0f3a04b BLECrypt_if: Add new interfacing for latest libCrypto

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:08 -04:00
Emil Gydesen
494f88070f samples: Bluetooth: Add streaming callback for unicast server
The unicast server now prints when a steam enters the streaming
state.

This commit also slightly increases the metadata size to increase
interoperability with other devices such as Android.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 09:09:44 +02:00
Benedikt Spranger
d6ef80ca3b boards: st: nucleo_h745zi_q: Wire up SPI tests
The previously added overlay can now be used. Wire up SPI tests for the
Nucleo h745zi-q board.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
7775a08739 tests: drivers: spi loopback testing on the nucleo_h745zi_q boards
Connect D12(PA6) & D22(PB5) pins on the board to pass the test.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
205e971f29 boards: st: nucleo_h745zi_q: Enable SPI on Arduino extention
The board is capable to serve SPI on the Arduino extention header.
Configure and enable SPI to work on the extention.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
5e6bbdc8e4 tests: drivers: Remove unnessesary include
The nucleo_h7X3zi overlays use memory attributes and therfore the
dedicated include file. This is unnessesary, since the memory attribute
include is already included from the underlaying CPU base file
"stm32h7.dtsi". Remove the unnessesary includes.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Fin Maaß
3887f41ef9 doc: fix links to wiki
This fixes the broken links to the zephyr wiki.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-30 09:07:52 +02:00
Tom Burdick
7e9cd5e414 boards: intel: ish: Set flasher to misc-flasher
Set the intel ish board flasher to use misc-flasher.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-30 09:06:58 +02:00
Jordan Yates
ffc46baeb7 tests: rtio: test rtio_sqe_prep_callback_no_cqe
Test that SQE's created with `rtio_sqe_prep_callback_no_cqe` run, but
don't create a completion queue event.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-30 09:06:36 +02:00
Jordan Yates
559f58b710 rtio: add helper function rtio_sqe_prep_callback_no_cqe
Add a helper function that constructs a callback operation that doesn't
generate a completion queue event.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-30 09:06:36 +02:00
Marc Herbert
674cf30a00 MAINTAINERS.yml: removing marc-hb
New assignment.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-30 09:06:12 +02:00
Benjamin Cabé
bd29c5c410 doc: extensions: Add Doxygen tooltips to main documentation
Add Doxygen tooltips in the main documentation.

The tooltips are triggered when hovering over C symbols in the
documentation and display a preview of the Doxygen documentation for the
symbol.

Some shadow DOM magic is needed to style the tooltips correctly, without
affecting the rest of the page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-29 16:13:41 -04:00
Tomasz Moń
22bde52b37 dt-bindings: usb: uac2: Add configuration speed selectors
Every High-Speed capable device must be able to enumerate at Full-Speed.
The functionality at different speeds can be different. Sometimes it is
possible to support exactly the same functionality on both High-Speed
and Full-Speed, but sometimes it is not. The problem is particurarly
relevant for UAC2 because it utilizes isochronous endpoints which means
that the available bandwidth is drastically different between High-Speed
and Full-Speed.

Full-Speed isochronous endpoint can support up to 1023 bytes per frame.
Typical 48 kHz 16-bit stereo stream consumes 48 * 2 * 2 = 192 bytes per
frame. Zephyr UAC2 instances with such streams are fine to work both at
Full-Speed and High-Speed.

An example stream that is too much for Full-Speed is the sometimes used
192 kHz 24-bit stereo (whether or not it is useful is out-of-scope here,
because it should be up to application developer) which would require
192 * 3 * 2 = 1152 bytes per frame.

Because the bandwidth required for audio stream depends on three
different parameters (sample rate, bit resolution and number of
channels), the UAC2 implementation should not automatically limit
available parameters to fit bandwidth requirements.

Adding explicit full-speed and high-speed boolean options to zephyr,uac2
compatible seems to be not only the easiest solution to the problem, but
also the most flexible one. Depending on the use case, the application
developer can then decide for example:
 * to not support High-Speed at all - by having one zephyr,uac2 instance
   with full-speed property
 * to not support Full-Speed at all - by having one zephyr,uac2 instance
   with high-speed property
 * to support limited number of channels at Full-Speed and all channels
   at High-Speed - by having one zephyr,uac2 instance with full-speed
   property and separate instance with high-speed property
 * to have exactly the same functionality at both speeds - by having one
   zephyr,uac2 instance with both full-speed and high-speed properties

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-29 16:12:45 -04:00
Jordan Yates
6ad8ca9c64 boards: thingy53: define composite fuel gauge
Add a composite fuel-gauge device to the Thingy53 to enable converting
the raw voltage to a battery percentage.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
bbee47c030 tests: build_all: sensor: test composite fuel gauge
Test the composite fuel-gauge driver compiles.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
39a582a9ec fuel_gauge: composite analog fuel gauge
Construct a device that implements the fuel-gauge API from a collection
of analog sensing inputs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
597ed491c7 battery: support additional properties
Support additional properties from the linux `battery.yaml`.

The `ocv-capacity-table-0` definition differs from the Linux version as
we do not have a good way to generate variable length arrays in our
config structs, or a good way to separate out the percentage vs voltage
in the mapping.

We reduce the flexibility by enforcing a step size of 10%, which removes
the need for the percentage to be in the array and solves the variable
length problem.

To simplify the effort of defining these voltage curves, default curves
for a variety of chemistries have been added, extracted from datasheet
graphs of discharge curves from reputable manufacturers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
291fc517e3 tests: lib: interpolation: added
Add tests for the linear interpolation math functions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
5cb2e019de math: interpolation: linear interpolation
Add linear interpolation function that respects floating point rounding
rules (away from zero).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Anuj Pathak
6585b4a540 samples: bluetooth: peripheral: added HRM control point support
- added support for HRM control point write

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 16:12:12 -04:00
Anuj Pathak
7e1dc5ae3e bluetooth: services: hrs: added control point write callback
- HRS control point was added to server but no write callback is
defined, this causes issues if control point characterstic is
written by the client

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 16:12:12 -04:00
Marcio Ribeiro
0705aaeb81 drivers: dac: esp32: clock initialization fix
Fixed ESP32 DAC clock initialization

Fixes: #70295

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 16:11:57 -04:00
IBEN EL HADJ MESSAOUD Marwa
2353b9391b drivers: i2s: i2s_ll_stm32: Handle single clock source
Modify the function "i2s_stm32_set_clock" to handle the case where pclk_len
it is not greater then 1 and to ensure that the freq_in
variable is correctly set in both cases.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-29 16:11:30 -04:00
Declan Snyder
630faa1592 soc: nxp: rt1011: Fix RT1011 FCB offset
RT1011 expects it's flash configuration block at a different offset than
the rest of the RT10xx series. Add default to fix the platform not
booting.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-29 16:11:18 -04:00
Fin Maaß
235033f4b7 drivers: hwinfo: litex: depend on devicetree
make litex hwinfo dependent of enabled state of device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 16:10:57 -04:00
Sylvio Alves
f099bcd497 hotfix: drivers: i2s: update esp32s3/c3 I2S dtsi
I2S driver was merged after interrupt .dtsi was changed,
causing CI to fail. This updates it accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-29 16:10:28 -04:00
Marcio Ribeiro
91a1e70653 samples: drivers: i2s echo supported by esp32s3_devkitc
Added esp32s3_dedvkitc board to the i2s echo sample

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
e9a1e4056d samples: drivers: led_strip supported by esp32s3_devkitc via i2s driver
Added esp32s3_dedvkitc board supporting led_strip sample via i2s driver

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
f4e89a06f5 boards: espressif: enable support for i2s
i2s support added for:
 - esp32s3_devkitm
 - esp32s3_devkitc
 - esp32c3_devkitm

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
902104d795 drivers: i2s: esp32s3/esp32c3
i2s support added for esp32s3 and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Hao Luo
b532a3ea7f boards: ambiq: apollo3: add connector dtsi for apollo3 boards
Added connector dtsi files for apollo3_evb and apollo3p_evb,
and ran gpio_basic_api to test, all cases pass

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-08-29 18:06:07 +02:00
Raffael Rostagno
02af64400f boards: esp8684_devkitm: PWM sample and document update
Added sample for ESP32C2/ESP8684 SoC and updated document
indicating LEDC PWM support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 18:05:12 +02:00
Raffael Rostagno
ba078b4032 pinctrl: esp32c2: Add LEDC config
Add LEDC pinctrl configuration for ESP32C2/ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 18:05:12 +02:00
Tom Burdick
9dffac0107 llext: flush logging before unloading extensions
Extensions could have used logging, when log processing is
deferred, the logging thread can run after the extension has
been unloaded and thereby access invalid memory addresses.
Make sure to flush all logs before unloading extensions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-08-29 18:05:04 +02:00
Peter van der Perk
c09b3bcbd6 soc: nxp: rt11xx: Enable FlexIO
Zephyr already has various FlexIO drivers but imxrt11xx didn't enable
the base flexio peripheral.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-29 18:04:56 +02:00
Peter van der Perk
44f7928ecf clock: mcux_ccm: add flexio clock
Adds flexio1 and flexio2 clock definitions to get the clock rate

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-29 18:04:56 +02:00
Patryk Kuniecki
05609d0379 tests: include drivers/watchdog/wdt_basic_api on it8xxx2_evb
Due to issues with running the watchdog test in a fully
automated manner on the IT8XXX2_EVB, it was previously removed.
However, a fix has now been merged, and it should be operational
on this board once again.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2024-08-29 18:04:43 +02:00
Ha Duong Quang
725610ebe9 samples/tests: adc: enable samples/tests for s32z270
enable samples/tests adc for s32z270

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-29 18:04:36 +02:00