Commit graph

23353 commits

Author SHA1 Message Date
Jordan Yates
7e7ab495c3 wifi: esp_at: compile without NET_NATIVE_IPV4
Allow the driver to compile without `CONFIG_NET_NATIVE_IPV4`. This can
happen if the driver is only desired for SSID scanning.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-17 14:42:19 +01:00
Mustafa Abdullah Kus
3135a4cd0b drivers: spi: spi_ll_stm32: add midi and mssi impl
Master Inter-Data Idleness and Master SS Idleness
can configure with STM32 low level spi driver apis.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-01-17 09:56:03 +01:00
Guennadi Liakhovetski
ac71dfae90 intel-adsp: use proper error codes
Use proper errno.h error codes in pd_intel_adsp_set_power_enable()
instead of -1.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Ian Morris
923201abc5 drivers: pinctrl: ra: fix write-protect register access
The write protect register (PWPR) found on RA Microcontrollers is an 8-bit
register at an odd address. It was being accessed using a pointer to a
uint32_t which causes a fault on some devices in the series.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-01-16 20:51:30 -05:00
Cong Nguyen Huu
9eb0a554f9 drivers: nxp_s32_canxl: add support RX FIFO
Driver supports both CAN classic and CAN FD frames
when using RX FIFO mode

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-01-16 20:50:49 -05:00
Chekhov Ma
e1d495be81 driver: add new gpio driver "gpio_mcux_rgpio"
Add RGPIO gpio driver. This driver is used for i.MX93 and i.MX8ULP.
GPIO pinctrl, read/write and interrupt is supported. Runtime mmio
configuration is enabled, so no need for region definition in
mimx9/mmu_region.c

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Martin Jäger
2effad3b11 drivers: rtc: pcf8563: fix ifdef for alarm_set_callback
The callback should only be available when CONFIG_RTC_ALARM is defined.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-16 20:49:19 -05:00
Alberto Escolar Piedras
a6ea4490a9 drivers serial nrfx: Speed up for simulation
Increase the busy wait time granularity while runing in simulation
for poll mode. In this mode, the driver spends a *lot* of time
waiting for the UART to be done. The smallest frame time is
~10µs @ 1Mbps, so busywaiting in very small increments
is very wastefull as we keep shuting down and turning on the simulated
MCU.
Let's increase the busy wait time increments of the driver to 3 micros,
which should not change much the behaviour.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-16 14:55:07 -05:00
Laurentiu Mihalcea
c82789c5ff drivers: serial: uart_mcux_lpuart: Switch to using DT_INST_IRQN_BY_IDX
After #63289, multi-level interrupts are now encoded using macro
magic. This means that using the generic DT_INST_IRQ_BY_IDX() to
fetch the INTID is no longer an option as the queried INTID will
be the one specified through the node's `interrupts` properties.
To fix this, switch to using DT_INST_IRQN_BY_IDX() which will
return the correctly encoded INTID.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-16 09:27:38 -06:00
Amrith Venkat Kesavamoorthi
879e3a42b0 drivers: gpio: PCF857x: Modify PCF8574 driver
Modify existing PCF8574 driver as PCF857x for:
PCF8574 - 8 channel I/O expander
PCF8575 - 16 channel I/O expander

Signed-off-by: Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>
2024-01-16 15:19:14 +00:00
Emil Lindqvist
342e10b0b8 modem_cellular: add RSRP & RSRQ to U-blox SARA-R5 modem
This commit implements parsing of the CESQ extended signal quality AT
command, extracting RSRP and RSRQ which is relevant for LTE connections.
It's used in the U-blox SARA-R5 modem instance. Furthermore, the IMEI,
IMSI is extracted in the same modem.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-01-16 14:15:56 +00:00
Erwan Gouriou
0a2876de26 drivers: timer: stm32: Clean up related to STM32_LPTIM_CLOCK
Now that STM32_LPTIM_CLOCK choice symbol is defined from device tree,
remove the prompt which was defining it as a user selectable entry.

Remove the warning related to possible symbol misalignment with
device tree setting.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-01-16 10:07:02 +00:00
Jaro Van Landschoot
a897005b98 drivers: serial: sam u(s)art: correct interpretation of RXRDY flag
The receiver ready flag of the (channel) status register
for the sam controller was not being interpreted correctly
for both the uart and usart implementation,
according to the uart api.
Tested and confirmed using the sam4sa16ca.

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
2024-01-16 10:01:17 +01:00
Yuval Peress
9381e86cbe bmi160: fix value calculation
As an example, when the gyro range is set to 250 deg/sec the scale
was set to 133 where it really should be 133.160058662. This leads
to a 0.12% error in the value returned. By separating the numerator
and denominator, we're able to drastically reduce the error.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress
c743e72756 bmi160: Fix gyro range map
The range map was sorted wrong since the function
bmi160_range_to_reg_val() that uses it checks for the user value less
than the range component of the bmi160_range struct. This means that
no matter what range is set, the value will always end up 2000dps.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress
b58b03196b bus: emul: Update i2c/spi emulators with mock transport
Adding a hook for tests to inject a mock transport and migrating the
accel test to test bmi160 specific things. The old version of the test
which checks for read values is now covered by the generic test in
the sensor build_all target.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress
fd07f8ce69 bmi160: Implement attr_get
Add support for getting the following attribute values:
- SENSOR_ATTR_OFFSET
- SENSOR_ATTR_SAMPLING_FREQUENCY
- SENSOR_ATTR_FULL_SCALE

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress
9898b2fc3f bmi160: Make changes to align driver to datasheet
The logic in the driver was not aligned to the datasheet. Also,
temperature reading was not being done in fetch, but in channel_get.
There was also some extra conversions from SI->register->SI when
setting the range, this was causing the register value calculation to
produce an incorrect scale in some cases.

Tests were added to cover these cases.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress
be563239c8 sensor: testing: Update sensor emul backend
Update the backend for sensor emulators to include a function for
setting the offset as well as a function to query an attribute's
metadata such as bounds and increment size. Additionally, add
backend support for setting the _xyz channel values.

Make the appropriate test changes to accomodate.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Benedikt Schmidt
cb2e3a86b4 drivers: gpio: ignore communication faults of TLE9104 during startup
Ignore communication faults of the TLE9104 which are reported
before the communication watchdog is configured.

Fixes #67370

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-16 10:00:13 +01:00
Yuval Peress
9f096e9816 bma4xx: Optimize calculation
Reduce some of the arithmetic required to decode a sample. Math is
documented in bma4xx_convert_raw_accel_to_q31.

This improved the accuracy from roughly 0.865mm/s2 to 0.001mm/s2 when
stationary and using a range of 4g.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-15 15:41:58 -06:00
Alberto Escolar Piedras
5c06d60cce drivers eth_native_linux: Avoid using ssize
ssize is a POSIX.1-2001 extension, which may or may
not be provided by the C library, or may be defined
to a different size in the host and embedded C library.

Two internal functions were returning ssize.
As these functions were just trampolines
into the same host API, which are already provided
by the native simulator let's just use those.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-15 21:59:56 +01:00
Alberto Escolar Piedras
5382f827d6 drivers can_native_linux: Avoid using ssize
ssize is a POSIX.1-2001 extension, which may or may
not be provided by the C library, or may be defined
to a different size in the host and embedded C library.

Two internal functions were returning ssize, but
one of them was a trampoline into the same host API,
which is already provided by the native simulator
so let's just use that instead.

The other is only carrying data that fits into an
int and is anyhow being cast in/to ints, so let's just
avoid the trouble by defining it as returning int.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-15 21:59:56 +01:00
Paulo Santos
92af172159 drivers: adc: iadc_gecko: fix sample bits reading
The current driver initializes the IADC with the default configuration
(IADC_INITSINGLE_DEFAULT), which aligns the data to the right.
To correctly read the 12-bit sample, it should be masked from the right
instead.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2024-01-15 14:08:11 -05:00
Xuyang Shen
6f6fc4e25c drivers: sensors: icm42688: fix bug in Kconfigfile
Fix Bug in Kconfig file of icm42688 driver

Signed-off-by: Xuyang Shen <shenyi97@hotmail.com>
2024-01-15 10:22:38 -06:00
Tomasz Moń
07d9e521b8 drivers: i2s_nrfx: Support less than block size writes
Calling I2S write with less bytes than I2S TX memory block size makes it
possible to synchronize the time when next block is used against some
other, possibly externally sourced, signal. Example use case includes
USB Audio where audio sink and/or source has to be synchronized against
USB SOF. In Asynchronous synchronization type the rate matching is
achieved by varying the number of samples sent/received by 1 sample
(e.g. for 48 kHz audio, 47 or 49 samples are transmitted during frame
instead of 48).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-01-15 13:54:13 +01:00
Tomasz Moń
2dee952a95 modules: hal_nordic: nrfx: update API version to 3.3.0
Update i2s nrfx driver to pass buffer size alongside buffer pointers.
No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-01-15 13:54:13 +01:00
Marc Herbert
8042e73915 dai: intel: dmic: demote spurious LOG_ERR in dai_nhlt_get_clock_div()
Fix the log level of two LOG_ERR() statements which should have always
been LOG_INF(). As confirmed by the author Adrian in #60172

Fixes commit 3fbaed4de9 ("dai: intel: ace: dmic: Refactor of
dai_nhlt_dmic_dai_params_get function")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-15 09:59:29 +01:00
Pisit Sawangvonganan
70c7ac704d drivers: i2c: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/i2c directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-15 09:59:17 +01:00
Guennadi Liakhovetski
ca12fd13c6 xtensa: intel_adsp: fix a cache handling error
.bss and .data are uncached in Zephyr builds for intel_adsp. No need
to try to manipulate cache of objects in those sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-15 09:59:07 +01:00
Gerard Marull-Paretas
3ed16b38e5 drivers: serial: b91: add missing RISC-V PLIC header
Driver was using PLIC without including necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
87bb281a9f drivers: ieee802154: b91: add missing PLIC include
Driver was using RISC-V PLIC API without including the necessary
headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
992f25b0c9 drivers: gpio: b91: add missing PLIC header
Driver is using the RISC-V PLIC interrupt controller without including
the necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
36069b6c9a drivers: gpio: sifive: add missing PLIC header
Driver is using the PLIC API without including the right header.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
c725c91d95 arch: riscv: define RISC_IRQ_MSOFT/MEXT
Instead of relying on spread definitions within SoC files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Pisit Sawangvonganan
b4567fa551 drivers: serial: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/serial directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:36 +00:00
Pisit Sawangvonganan
6a50bbdb3a drivers: spi: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/spi directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:19 +00:00
Pisit Sawangvonganan
6a815d47e2 drivers: gpio: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/gpio directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:04 +00:00
Lucas Tamborrino
11fc182315 soc: esp32: refactor esp32_net
SOC_ESP32_NET is now SOC_ESP32_APPCPU, following espressif's
naming convention in the same manner as ESP32S3 app cpu.

SOC_ESP32_APPCU is now a subset of SOC_SERIES_ESP32.

This commit also changes the necessary files, samples and tests
for bisect purposes.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Rander Wang
e021ccfc74 drivers: dma: intel-adsp-hda: add delay to stop host dma
According to hardware spec, host dma needs some delay to completely stop.
In the bug the host dma is disabled in different path in a few microseonds.
The first setting disabled the host dma and called pm_device_runtime_put
to power off it. The second setting found the host dma was still alive
and calle pm_device_runtime_put again. This results to pm->usage
checking failed.

BugLink: https://github.com/thesofproject/sof/issues/8686
Signed-off-by: Rander Wang <rander.wang@intel.com>
2024-01-12 15:56:30 -05:00
Nick Ward
e9b56bd1ec drivers: sensor: bq274xx: remove float use
Remove float usage in calculation of
SENSOR_CHAN_GAUGE_TEMP

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-01-12 09:00:33 -06:00
Mahesh Mahadevan
08705f51f2 drivers: mcux_lpc_rtc: Add support for 1KHz counter
Add support for the 1KHz counter. Update the RTC
driver to allow the 1Hz and high resolution counters
to exist together.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-01-12 13:34:19 +01:00
Henrik Brix Andersen
24b68fa67f drivers: adc: shell: update list of compatibles
Update the list of ADC compatibles based on the compatibles from
dts/bindings/adc/*.yaml.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-12 12:09:53 +00:00
Henrik Brix Andersen
0cd776e7dd drivers: adc: shell: sort the list of compatibles
Sort the list of supported ADC compatibles alphabetically.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-12 12:09:53 +00:00
Armando Visconti
765519ea92 drivers/sensor: fix some ST drivers dependency to HAL_ST module
In order to avoid build failures as described in issue #67242,
make all ST drivers using HAL_ST module dependent to HAL_STMEMSC
and HAS_STLIB libs, which need to be configured in all samples
referring to them.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-12 12:55:46 +01:00
Yuval Peress
2772843cf1 bbram: npcx: Add emulator
Add an emulator for the NPCX BBRAM which supports reading and writing

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-12 09:59:31 +01:00
Yuval Peress
69dfb2fee3 bbram: mcp7940c: Add emulator
Add an emulator for the mcp7940c BBRAM that supports reading and writing.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-12 09:59:31 +01:00
Yuval Peress
59675bf682 bbram: it8xxx2: Add emulator implementation
Add an emulator that supports reading and writing to the it8xxx2 bbram.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-12 09:59:31 +01:00
Mahesh Mahadevan
5bda339058 Revert "drivers: usb: device: add start of frame notifications to nxp mcux driver"
This reverts commit 21c9c4abfe.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-01-12 09:59:02 +01:00
Tristan Honscheid
0f95b6fbb0 sensors: Add Bosch BMA4xx-series driver
This is a driver targetting the Bosch BMA 4-series accelerometers. It
has been specifically developed for the BMA422 but should be compatible
with others in that line, excepting the BMA400. Supports key attributes
and async RTIO one-shot operation. I2C operation is supported, with
stubs for a SPI implementation provided for future improvement.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2024-01-11 09:58:29 -06:00