Commit graph

23353 commits

Author SHA1 Message Date
Fabio Baltieri
48cb3a2272 input: ili2132a: check i2c_read_dt return value
Check i2c_read_dt return value in ili2132a_process, fixes a coverity
warning.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/81965
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-27 22:51:16 -05:00
Valerio Setti
1e560e0a45 drivers: entropy: ease runtime requirements on BT HCI
On platforms like nrf5340 there are 2 CPUs:
- one is the cpu_net which takes care of the radio stuff and
  owns the HW random generator
- one is the cpu_app which holds application data and polls
  cpu_net through HCI commands when it needs some random data.

The PSA core implemented in Mbed TLS needs random data at initialization
time, which happens early in the boot process. If we wait for BT to
be ready before issuing the HCI command, then PSA core intialization
will fail. In facts there is no need for the BT to be completely
initialized just to ask for some random data from the cpu_app to
the cpu_net since the HW random generator will likely be already
functional in the cpu_net.
So let's just try the HCI command and, if something is not right,
it will fail anyway. There's no need to anticipate the failure.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-27 16:40:47 -05:00
Marcio Ribeiro
63ed84240f driver: wdt: esp32: remove incorrect status check inside isr
Reverts incorrect changes introduced by #79821

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-11-27 21:08:07 +00:00
Armando Visconti
a867dbdc47 sensors: lsm6dsv16x: add RTIO async and fifo stream
Add RTIO async and RTIO stream functionalities that enables,
among all the other things, the sensor data streaming from FIFO.

RTIO stream is using both SENSOR_TRIG_FIFO_WATERMARK and
SENSOR_TRIG_FIFO_FULL triggers. The decoder currently only supports
following FIFO tags:

  - LSM6DSV16X_XL_NC_TAG
  - LSM6DSV16X_GY_NC_TAG
  - LSM6DSV16X_TEMP_NC_TAG

Following FIFO parameters has to be defined in device tree to
correctly stream sensor data:

  - fifo-watermark (defaults to 32)
  - accel-fifo-batch-rate (defaults to LSM6DSV16X_DT_XL_NOT_BATCHED)
  - gyro-fifo-batch-rate (defaults to LSM6DSV16X_DT_GY_NOT_BATCHED)
  - temp-fifo-batch-rate (defaults to LSM6DSV16X_DT_TEMP_NOT_BATCHED)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-11-27 21:06:30 +00:00
Armando Visconti
01c1e1173f sensors: lsm6dsv16x: add attr_get driver API
Add attr_get() driver API

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-11-27 21:06:30 +00:00
Armando Visconti
5bdde779c1 sensors: lsm6dsv16x: save gyro_fs in data
Save gyroscope range set from DT or SENSOR_ATTR in data
structure.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-11-27 21:06:30 +00:00
Adam Kondraciuk
2e4cf197c1 drivers: timer: grtc: Add LFPRC as the source of GRTC
This commit allows to switch the GRTC clock source to an RC oscillator.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-27 21:06:20 +00:00
Abe Kohandel
5d5407ee7a drivers: timer: Disable prescalar for TI DM Timer
The timer count calculations are done with the assumption that the
prescalar is disabled. When using u-boot's SPL as an early boot stage,
the omap timer driver enables the prescalar leaving this driver to
calculate incorrect counts. So explicitly disable the prescalar to match
the driver expectation.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2024-11-27 10:39:21 -05:00
Adam Kondraciuk
db290a62f9 drivers: spi: nrfx_spim: set/clear pins retention
Add pins retention control when GPD is enabled for SPIM.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-27 10:39:00 -05:00
Jamel Arbi
70add85f9f drivers: openthread: nxp: Add a HDLC RCP communication
Add a HDLC RCP communication with its hdlc_api interface APIs
and a NXP driver.

Signed-off-by: Jamel Arbi <jamel.arbi@nxp.com>
2024-11-27 10:37:21 -05:00
Fin Maaß
a45e5f0424 drivers: spi: remove unused register
core_mmap_dummy_bits is not used by the
driver and also optional in litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-27 06:58:11 -05:00
Josuah Demangeon
217f053ccd drivers: video: controls: rename controls to Linux-like names
This uses Linux V4L2 controls as a reference to give names to the
CIDs. Apply the renaming down to the drivers that use them.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-27 10:31:54 +01:00
Jilay Pandya
719cd2639c drivers: stepper: refactor set_actual_position to set_reference_position
This commit refactos set_actual_position to set_reference_position.
stepper_set_reference_position is more apt in regards to what this func
actually does

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-27 10:29:47 +01:00
Gerard Marull-Paretas
f812de2026 drivers: input: gpio_keys: select GPIO
Instead of depending on GPIO. This allows to just enable
CONFIG_INPUT=y + DT node in the application layer. The same
pattern is nowadays followed by most drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-27 10:29:04 +01:00
Tomáš Juřena
b4dcdaaeab drivers: sensor: ti: ina230: Fix dts warning if INA230_TRIGGER enabled
Updates the Kconfig condition to support trigger functionality for INA236.
This will get rid of `warning: INA230_TRIGGER (defined at
drivers/sensor/ti/ina23x/Kconfig:43) was assigned the value 'y' but got
the value 'n'.` if INA230_TRIGGER is enabled.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-11-27 08:18:57 +01:00
Vladislav Pejic
04c70d681e driver: sensor: adxl367: Fix for extra 0
Fix for extra 0 in conversion of acceleration values in
adxl367_accel_convert.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-11-26 15:44:31 -05:00
Vladislav Pejic
19fe816f28 driver: sensor: adxl367: Temp conversion
Fix for conversion of temperature values in adxl367_temp_convert
and missing break statement.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-11-26 15:44:31 -05:00
Vladislav Pejic
eb15f306b6 driver: sensor: adxl367: Fix for SPI
Fix for SPI communication when RTIO is used in SPI driver. When in
adxl367_bus_access, const struct spi_buf buf[3] is used,
spi_rtio_copy function won't set correct buffers and length
for buf[2] and that will cause exception when that buffer is
processed.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-11-26 15:44:31 -05:00
Elias Speinle
bc43826703 drivers: fpga: renesas slg471x5: evaluate return value
Eveluate return value of i2c read during verification of
loaded bitstream.

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-11-26 15:42:57 -05:00
Elias Speinle
676d0c1554 drivers: fpga: renesas slg471x5: correct Kconfig
Correct Kconfig of Renesas SLG471X5.

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-11-26 15:42:57 -05:00
Johan Hedberg
76400b362c drivers: spi: gecko: Add PINCTRL dependency
The gecko_eusart and gecko_usart SPI drivers should use pinctrl on all
Series 2 boards.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-26 15:42:02 -05:00
Johan Hedberg
4053529658 drivers: serial: gecko: Add PINCTRL dependency
This driver should use PINCTRL also on Series 2 boards.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-26 15:42:02 -05:00
Johan Hedberg
4bd61408c7 drivers: i2c: gecko: Add PINCTRL dependency
This driver should use PINCTRL on all Series 2 boards.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-26 15:42:02 -05:00
Johan Hedberg
19a6ffd403 drivers: timer: gecko_burtc: Remove unused include
This driver doesn't use any pinctrl APIs, so remove the include.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-26 15:42:02 -05:00
Adam Kondraciuk
9b252855fd soc: nordic: Add LRCCONF management
Due to the possibility of simultaneous accesess to LRCCONF registers,
additional management is required.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Tomasz Moń
cb1e7d6b6b nrf_usbd_common: Do not trigger DMA in low power mode
DMA transfers do not execute when the USBD peripheral is in Low Power
mode. Make sure that there is no DMA active transfer when entering Low
Power mode and that new DMA transfers are not started when in Low Power
mode because the transfer won't ever finish.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-26 14:45:01 +00:00
Tomasz Moń
4dfae0b0d1 drivers: udc_nrf: Handle Suspend and Resume in thread
Low Power mode can only be entered when there are no active DMA
transfers. Move the Suspend and Resume processing to thread to allow
waiting for the DMA available semaphore in USB Suspend handler.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-26 14:45:01 +00:00
ee8990e2e0 drivers: add the gpio driver for wch ch32v003
This commit adds the gpio driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
ef475cbf71 drivers: add the pfic interrupt controller
This commit adds the pfic interrupt controller driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
01a9061d67 drivers: add the ch32v00x usart driver
This commit adds the usart driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
7e810abc05 drivers: add the ch32v00x systick driver
This commit adds the systick driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
c1c0413eed drivers: add the ch32v00x clock controller
This commit adds the clock driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
6d3348bd83 drivers: add ch32v00x pinctrl support
This commit adds the pinctrl driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
Jilay Pandya
6d87bd65ae drivers: stepper: fix fake stepper controller cid issues
Fix: Write to const-qualified field. (WRITE_CONST_FIELD)
- #81915, #81920, #81922, #81924, #81932, #81940, #81941
- #81946, #81947, #81959, #81961, #81970, #81973, #81977

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-26 10:37:35 +00:00
Jilay Pandya
92fce644e5 drivers: stepper: tmc5041: fix cid issues
fix cid issues related to unchecked return values.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-26 10:37:27 +00:00
Khoa Nguyen
0fd6c97f98 drivers: spi: Add condition check for close before open spi
Add condition check for close before open to prevent
invalid pointer access

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-26 10:36:55 +00:00
Krzysztof Chruściński
13ed9e4210 drivers: serial: nrfx_uarte: Fix runtime PM for interrupt driven API
TX part of interrupt driven API was not calling PM device runtime
API. Additionally, when txstopped occurred after poll out it was
not handled correctly.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 10:36:21 +00:00
Jordan Yates
91e006cb7c sensor: bme280: bme280_wait_until_ready timeout
Add a timeout to the `bme280_wait_until_ready` loop to ensure that we
never get stuck in this loop even if the bus enters an error condition.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-26 08:45:29 +01:00
Emil Dahl Juhl
d6ac9e8424 drivers: led: lp5569: implement write_channels api
The lp5569 has multiple pwm outputs, and thus implementing the
write_channels api to set multiple values in a single call makes sense.

Implement the write_channels function with a basic range check on the
channel range.
Since the lp5569 supports auto-increment, all of the channels can be
written in one i2c transfer, starting from the pwm register of the
start_channel.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-11-26 00:12:37 +01:00
Emil Dahl Juhl
45744b436f drivers: led: lp5569: enable auto-increment
The lp5569 controller supports auto-increment for its registers. This is by
default enabled in the chip, but the driver actively disabled it.

Since auto-increment is useful for writing multiple consecutive registers,
enable the feature. The driver, however, doesn't perform such consecutive
writes and thus the existing behavior is not altered.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-11-26 00:12:37 +01:00
Fin Maaß
1e3b106435 drivers: ethernet: phy_mii rename functions
rename internal reg_* functions.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-26 00:11:43 +01:00
Kai Vehmanen
a14ae39e74 driver: ssp: remove use of out-of-tree CONFIG_INTEL_MN
The SSP driver has odd dependency to outside definition of
CONFIG_INTEL_NM. This is in practise tied to SSP hardware
version and always enabled for SSP block version 1.0.

Use the new SSP_IP_VER define to replace the CONFIG_INTEL_MN
preprocssor checks. Also modify the board test case to
remove the obsolete config setting.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-11-25 21:51:56 +01:00
Ahmed Zamouche
305ceba920 drivers: eth: enc28j60: Misc fixes
- Bank select mask should be 0x03:

| b7    | b6    | b5    | b4     | b3    | b2   | b1     | b0     |
|------:|------:|------:|-------:|------:|-----:|-------:|-------:|
| TXRST | RXRST | DMAST | CSUMEN | TXRTS | RXEN | BSEL1  | BSEL0  |

See  **REGISTER 3-1: ECON1: ETHERNET CONTROL REGISTER 1**

- ENC28J60_BIT_PHCON2_HDLDIS should be 0x0100

|b15| b14   |b13   |b12|b11|b10    |b9|b8     |b7|b6|b5|b4|b3|b2|b1|b0|
|--:|------:|-----:|--:|--:|------:|-:|------:|-:|-:|-:|-:|-:|-:|-:|-:|
| - |FRCLNK |TXDIS |r  |r  |JABBER |r |HDLDIS |r |r |r |r |r |r |r |r |

see **REGISTER 6-5: PHCON2: PHY CONTROL REGISTER 2**

- remove duplicate definitions

ENC28J60Data Sheet:
https://ww1.microchip.com/downloads/en/DeviceDoc/39662c.pdf

Signed-off-by: Ahmed Zamouche <ahmed.zamouche1@assaabloy.com>
2024-11-25 17:43:57 +01:00
Alvis Sun
c9a95ddbdd drivers: i3c: npcx: add npcx i3c target driver
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Alvis Sun
bb03d1a472 include: i3c: target_device: add target driver buffer mode
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Chaitanya Tata
b8cab9e144 drivers: wifi: Fix blobs handling
The blobs are now part of nrf_wifi module, and remove the manual check
and add verifying the blobs and their integrity using helper function.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
da26d02d63 nrf_wifi: Move shim files from driver to module
The shim files should be part of the Zephyr module directory within
Zephyr, as they are coupled with the module implementation which os OS
agnostic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
459f972785 drivers: nrf_wifi: Remove OSAL code handling
This is now taken care by the Zephyr module shim.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
f7dc9f82d2 drivers: nrf_wifi: Fix the path to OSAL code
The OSAL code now lives in it's own repo nrf_wifi.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
139ce48c8b nrf_wifi: Fix the directory name
Following the naming convention add an underscore and update path in the
maintainers file too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00