Commit graph

23353 commits

Author SHA1 Message Date
Ryan McClelland
1ef18bd97d drivers: i3c: shell: add shell command for the ccc setaasa
Add a shell command for the CCC SETAASA.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
6a824079df drivers: i3c: add ccc setaasa helper
Add a function helper for the CCC SETAASA.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
dda3585cf6 drivers: i3c: shell: add vendor ccc shell cmds
Add vendor shell commands for ccc

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
3067b41ccc drivers: i3c: add vendor ccc helpers
Add helper commands for sending Vendor CCCs

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
2ba06ffc47 drivers: i3c: shell: set values in desc with ccc
Including setting the respective value in the i3c descriptor with
it's CCC.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
c122c53409 drivers: i3c: shell: include reattachment for setdasa
If the dynamic address is not the same as the static address during
setdasa, perform the reattachment.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
fd063dd017 drivers: i3c: shell: fix info cmd display for max_read_turnaround
Max read turnaround is only 3 bytes. Fix the zero padding.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
ff7c20e894 drivers: i3c: shell: remove bcr check for getcaps
All I3C v1.1+ devices are required to support GETCAPS. Remove BCR
check as it was the requirement for v1.0.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Muhammad Haziq
91b688a666 driver: wifi: esp32: add APSTA support
The ESP32 Wi-Fi driver previously did not support APSTA mode,
enabling AP mode would disable STA mode and vice versa.
Support for APSTA has been added by introducing additional
network interface: one for STA (Interface 2) and one for
AP (Interface 1). The CONFIG_ESP32_WIFI_AP_STA_MODE option in
Kconfig now allows enabling or disabling this support.

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-09-06 11:28:15 -04:00
Quy Tran
79fb5a391a drivers: flash: Add support for flash driver on MCK-RA8T1
Initial commit to support flash driver on MCK-RA8T1 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Quy Tran
beba6685af drivers: flash: Add support for flash driver on EK-RA8D1
Initial commit to support flash driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Duy Phuong Hoang. Nguyen
e1f990c176 drivers: flash: Initial support flash driver on EK-RA8M1
Initial commit for flash driver support on board using RA8 MCUs
* drivers: flash: implementation for flash driver on EK-RA8M1
* dts: arm: add device node for flash of EK-RA8M1
* boards: arm: enable support flash driver for ek_ra8m1, update
board documentation

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-06 11:28:04 -04:00
Armin Kessler
576fc209c4 drivers: video: esp32s3: add support for cam interface
Adding support for the esp32s3 LCD_CAM peripheral.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-09-06 11:26:59 -04:00
Erwan Gouriou
0e30625eec drivers: clock_control: stm32: Default driver selection out of soc
Rather setting the driver default in soc, make it directly at symbol
level rather than soc and clean up redundant `select` occurrences.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Ryan McClelland
82f8c3e3c5 drivers: i3c: shell: add cmd for enttm
Add a shell command for the i3c ccc enttm.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland
b4d9c9dea6 drivers: i3c: add ccc enttm
Add helper function for the i3c ccc enttm

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland
f32ad971cd drivers: i3c: shell: add i3c ccc entas
Add shell commands for the i3c ccc entas0, entas1, entas2, and entas3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Ryan McClelland
9d2dd99ee8 drivers: i3c: add i3c ccc entas
Add helper functions for the I3C CCC ENTAS0, ENTAS1, ENTAS2, and
ENTAS3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Daniel DeGrasse
4658ed5652 drivers: input: input_gt911: fix OOB buffer write to touch points array
GT911 driver was reading an additional touch point into the stack
defined touch point array, causing an out-of-bounds write on the stack.
Fix this issue by adjusting the limit on the for loop, and add a note
to the driver as to why we don't need to validate the number of points
reported for future developers

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-06 10:13:14 -05:00
Lukas Gehreke
f0c8693931 drivers: usb_dc_rpi_pico: Fixed connected handling
A connected state was reported as a disconnected state.
This led to wrong reports of the connected state to all systems
relying on it.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-09-06 09:59:43 -05:00
Santosh Male
8467c10447 drivers: ethernet: dwc_xgmac: Added dwc-xgmac
ethernet driver

This driver is capable of supporting basic features
of synposys dwc-xgmac ethernet MAC IP. Basic features
includes,
1. Tx and Rx, multiple Tx and Rx DMA channels, multiple
   Tx and Rx queues
2. Check Sum Offloading on Tx and Rx for IPv4, IPv6,
   TCP, UDP and ICMP packets
3. 10M/100M/1G speeds, Autonegotiation, Link speed
   configuration, Promiscuous mode, Full/Half
   duplex configuration
4. Added source files for synopsys dwc xgmac mdio driver.
   synopsys dwc xgmac mdio driver fetures includes:
   It supports clause 22 of IEEE 802.3 for ethernet PHY devices
   management.
5. Extended mdio shell support for dwcxgmac mdio driver.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Michal Smola
88f838b0d2 drivers: uart: Fix build error for lpuart without modem support
LPUART without modem support is used in some NXP socs. Build error
occurs for such socs because of accessing unavailable register.
Fix it by adding #if directive for checking modem support availability.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Fabian Pflug
cdfab15b99 charger: bq25180: Add threshold voltage for precharge
Charging a battery has three phases (compare Figure 8-2 in
https://www.ti.com/lit/ds/symlink/bq25180.pdf)

First is a pre-charge phase, then a constant current, then a constant
voltage phase.
During the pre-charge phase, the battery is only charged with a very low
current, to not damage the cells, because they are below a threshold,
that is considered healthy for the battery and need to be brought back
up to a healthy voltage.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug
6b2442244d charger: bq25180: add support for recharge voltage threshold
The battery charger will stop charging the battery if it believes,
that is is completely charged. If the battery drops below a certain
voltage threshold, then the battery charger starts charging the
battery again.

For the bq25180 the threshold can only be one of either 100mV or
200mV below the VSET voltage.

See table 8-16 Bit 5 in https://www.ti.com/lit/ds/symlink/bq25180.pdf

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug
f698832410 charger: bq25180: add control for battery charge limit
The linear battery charger will charge the connected battery up
to a specific voltage. This is different depending on the chemistry
of the battery. Most LiPo Batteries have a nominal voltage of 4.2V,
which is why the default voltage of the bq25180 is 4.2V.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Andrzej Głąbek
7a2ce2882a drivers: clock_control: Add support for nRF54H20 clock controllers
Add custom clock_control API for nRF platforms that allows requesting
clocks with specified minimal required attributes (accuracy, precision,
and frequency). Provide an implementation of this API for FLL16M, HFXO,
HSFLL, and LFCLK controllers in the nRF54H20 SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Emil Lindqvist
5520486e38 modem_cellular: adjust CMUX max frame size for LARA-R6
It has been observed that using a CMUX max frame size of 127
causes FCS errors; smaller or larger works. This commit sets the max
frame size to the modem's default value.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-05 16:58:44 -04:00
Emil Lindqvist
621338ec78 modem_cellular: add U-Blox LARA-R6 and implement change of baudrate
U-Blox LARA-R6 was added to modem_cellular, and an additional state
was introduced where the UART baudrate is changed if the modem supports
it

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-05 16:58:44 -04:00
Erwan Gouriou
853b6feb52 drivers: stm32: Make some config symbols menuconfig symbols
Move some STM32 drivers  related Kconfig symbols from `config`
to `menuconfig` when driver options depends on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-05 16:58:04 -04:00
Johann Fischer
c41071d2ac drivers: udc: add UDC driver for RP2040 USB device controller
This driver is mostly rewritten from scratch, with some parts borrowed
from the usb_dc_rpi_pico driver implemented by Pete Johanson.
This driver does not use any function from RPI PICO HAL and actually
could be furter improved to not use any defines or types from the HAL as
they are confusing and overdo it with volatile qualifiers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-05 16:57:46 -04:00
Alberto Escolar Piedras
e58a491900 entropy: native_posix: Add kconfig to not seed by default
Provide a new kconfig option which can be used to disable
the default seeding of the host standard library random
generator by this driver.
This allows some other component to do so without this component
default initialization interfering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-05 16:56:33 -04:00
Josuah Demangeon
0ac91da3a4 drivers: video: introduce CONFIG_VIDEO_LOG_LEVEL
Zephyr drivers have typically one log level defined per class. The video
drivers were making exception. This adds the missing log level for video
drivers.

Since all headers had to be modified, this also:

- Update the log initialization to the new syntax from 5e34681

- Sort the #include list to something like #41543

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-05 13:11:35 -05:00
Tom Burdick
1c29f98e68 i2c: nrf_twi: Add cast to const buffer pointers
A warning was issued in the build as the rtio tx and tiny_tx buffer
pointers are now labeled const. The internal API expects mutable buffers
so an explicit cast is needed here to avoid the warning.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-05 12:41:45 -05:00
Luis Ubieda
64a038aca3 spi: all: Add default iodev_submit to drivers without native support
So that all SPI drivers are compatible with RTIO APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-05 11:44:32 -05:00
Luis Ubieda
3efc69ebd3 spi: rtio: Add default iodev_submit handler
To emulate SPI RTIO behavior for drivers that do not have native
support yet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-05 11:44:32 -05:00
Chris Desjardins
84572a6532 drivers: i2s: Do not ignore the return value from queue_put.
If failure occurs the caller can free the buffer.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Chris Desjardins
34f09e3bd5 drivers: i2s: Fix I2S channel count.
Fixes incorrect channel count in case of I2S format.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Daniel Mangum
126e3ee6c3 driver: wifi: esp_at: fix typo in CIPDINFO option
Fixes typo in the CIPDINFO option description.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-05 09:49:33 +02:00
Andriy Gelman
3a4f868084 drivers: uart_xmc4xxx: Forward DMA overrun errors to user
Currently DMA overrun errors are ignored. Forward the error
to the user using the UART_RX_STOPPED with UART_ERROR_OVERRUN
reason.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Andriy Gelman
e9fd49f180 drivers: dma_xmc4xxx: Clear request before callback when overrun happens
If an overrun happens the user may decide to stop the dma which
unsets the DMA line. Currently, the line is always re-enabled after the
callback.

Switch the order around to fix the problem. Also, always reset the line
even if the user doesn't provide a callback.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Yuval Peress
8974c248cf rtio: Add default i2c submit handler
Use the RTIO work queue to fake the i2c submit calls for drivers which
haven't yet implemented the API. Applications can change the size of
the work queue pool depending on how much traffic they have on the buses.

Signed-off-by: Yuval Peress <peress@google.com>
2024-09-04 21:28:26 +02:00
Duy Phuong Hoang. Nguyen
bec9952ce8 driver: spi: Add initial support for spi driver on ra8
Add initial SPI driver support for RA8 MCUs

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-04 21:28:19 +02:00
Furkan Akkiz
11a172a610 drivers: adc: Add ADC driver for MAX32xxx MCUs
Added ADC driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-04 21:28:08 +02:00
Anuj Pathak
645beff897 drivers: led: lp5562: reuse engine already linked
Right now "lp5562_led_blink" unconditionally find and assign a engine
that is not executing at the moment. This is an issue, if 3 "led" are
already using an engine. That is a call to "lp5562_led_blink" could
terminate with error, even if the "led" is already using an engine.
This commit fixes this issue by adding a check to see if engine is
linked and reuse it, otherwise assign a free engine.

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-04 21:27:53 +02:00
Lucien Zhao
62e5805c57 drivers: sensor: mcux_acmp: update mcux_acmp drivers
add MCUX_ACMP_HAS_HYSTCTR macro to adapt feature if IP
don't exist HYSTCTR bit

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Jeppe Odgaard
20fb6b6d24 drivers: sensors: explorir_m: fix uart flush early termination
`explorir_m_uart_flush_until_end` terminates immediately if the read
variable is initially equal to `EXPLORIR_M_MAX_RESPONSE_DELAY` and
`uart_poll_in` does not read anything.

Fix this by only checking the read variable if `uart_poll_in` reads a char.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-04 21:26:36 +02:00
Bjarki Arge Andreasen
28b9f55a0a drivers: serial: uart_nrfx_uarte: Patch RX init
The initialization of the UARTE is attempting to handle potential
improper handover from the bootloader. This handling is additional
complexity which should be fixed in the bootloader or whatever
component is failing to deinit the UART properly.

This commit removes the handling of improper handover from the
bootloader, while additionally clearing the ERROR flag when suspending
the UARTE component.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-04 06:55:43 -04:00
Sebastian Głąb
06b56c7971 drivers: mbox: Fix error code in Nordic's implementation
According to the official MBOX API documentation available at
https://docs.zephyrproject.org/latest/hardware/peripherals/mbox.html
mbox_sen() shall return
-EMSGSIZE – If the supplied data size is unsupported by the driver.

Fix error code returned by the mbox_send().

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Jordan Yates
cbc4100eda i2c: i2c_nrfx_twim: init semaphores in init function
Initialise the semaphores in the init function so that a copy of the
data structure does not need to exist in `.data`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00
Jordan Yates
4c15cd119b i2c: i2c_nrfx_twim: move msg_buf to config
This is a constant pointer, there is no need for it to be in the mutable
data struct.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00