Commit graph

18310 commits

Author SHA1 Message Date
Trung Hieu Le 206897658a drivers: display: elcdif: Modify interrupt enablement
The elcdif interrupt is enabled in the write function and disabled in
the IRQ handler for each new frame update. Disabling the interrupt when
no new frame needs to be sent gives the CPU the possibility to enter
low-power mode. However, when the application's frame rate
matches the LCD refresh rate, this adds additional latency.

This commit provides a config to choose between following options:
- Toggle the CUR_FRAME_DONE_IRQ_EN in the write function and in IRQ
handler for each new frame when the power mangement is a concern.
- Activate the CUR_FRAME_DONE_IRQ_EN once at the init function when
low latency is required.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-05-29 10:49:48 -07:00
Bjarki Arge Andreasen 79640aea09 drivers: console: remove uart_mux and gsm_mux
Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.

Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen e79428cda8 drivers: modem: remove gsm_ppp.c device driver
Remove the deprecated gsm_ppp.c device driver and associated
dts compatible.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen 40a44c2118 drivers: modem: modem_cellular: Remove support for gsm_ppp
The new modem_cellular driver had support for the deprecated
generic zephyr,gsm-ppp dts compatible for backwards compatibility.

zephyr,gsm-ppp is being removed, and as such, modem_cellular.c
no longer needs to support it.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen b0a9ae266b drivers: net: ppp: Remove integration with GSM_MUX
The gsm_ppp driver is deprecated, and will be removed, along with
its dependencies UART_MUX and GSM_MUX.

This commit removes the integration with GSM_MUX from ppp.c, making
it solely dependent on the chosen node zephyr,ppp-uart.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen 7e764610b1 drivers: modem: modem_iface_uart: Remove gsm_mux integration
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen a36545b72b drivers: modem: modem_shell: Remove integration with gsm_mux
gsm_mux and uart_mux are deprecated and will be removed.
Remove integration with gsm_mux and uart_mux from modem_shell.c

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Johan Carlsson bc2aba157b drivers: uart_mcux_flexcomm: remove incorrect dma_slot.
a change in the dma driver exposed that the dma_slot was incorrectly
set in the uart driver. this change is needed for async uart on lpc55
to work.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-05-29 10:48:44 -07:00
Juliane Schulze 90d8941b54 vcnl36825t: allow "force"-mode only if low-power mode is inactive
Behavior of "force"-mode as described in datasheet cannot be achieved if
low-power mode is enabled. After triggering a sampling, the sensor will
not sample again for the period specified in measurement-time.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-29 10:47:44 -07:00
Gerard Marull-Paretas 47e14dbf82 drivers: clock_control: nrf_auxpll: add initial driver
Add a new driver for the AUXPLL peripheral found in some new Nordic
SoCs, e.g. nRF54H20. AUXPLL is used to clock some peripherals like e.g.
CAN. Note that driver is implemented natively as Nordic HAL lacks
definitions for the AUXPLL IP, this may be changed once these become
available.

Note that usage of nrf_auxpll_config_set generates unnecessary extra
assembly code compared to the proposed API in
https://github.com/zephyrproject-rtos/hal_nordic/pull/185 which
guarantees static initialization and single write access, possible in
the Zephyr context. However, current solution has been enforced until
further discussion on raw access APIs takes place.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-29 08:30:42 -07:00
Ren Chen 766a5ea574 drivers: udc: add IT82xx2 USB device controller driver
Add UDC driver for IT82xx2 SoC. This commit passes tests with
1. samples/subsys/usb/cdc_acm/
2. samples/subsys/usb/console/
3. The extend endpoint test with CDC ACM tool
4. USB suspend/resume detection

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-05-29 14:03:10 +02:00
Jerzy Kasenberg 71ed2e4b02 drivers: spi: Add power management Smartbond SPI
Code adds pm action function that stores SPI configuration
before PD_COM is allowed to be turned off.

PM_DEVICE_RUNTIME scheme is also supported

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-29 12:03:29 +02:00
Tim Lin d1ca30e8f7 ITE: drivers/pwm: Optimize the PWM set cycles
It takes 11 CPU ticks to recalculate ctr and cxcprs at the same frequency.
The previously calculated ctr and cxcprs can be stored at the same
frequency without recalculation.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-29 12:00:22 +02:00
Tomasz Moń 2368623f32 drivers: udc_dwc2: Avoid IN endpoint dequeue race
Flushing TxFIFO is racing with actual use of the TxFIFO. The software
controls only one side of the race (flush trigger) while the host
controls the other side. Therefore, locking interrupts before flushing
TxFIFO is not protecting against the race condition.

Disable the endpoint on dequeue to make sure that TxFIFO flushing won't
conflict with host actions (because the endpoint would be forced to NAK
the IN tokens before the TxFIFO is flushed).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-29 12:00:08 +02:00
Tomasz Moń 4db14f83e5 drivers: udc_dwc2: Fix timeouts when disabling endpoints
Do not set NAK bit again for endpoints that already have NAK bit set.
Do not wait for OUT endpoint 0 disable because it cannot be disabled by
application (DOEPCTL0 EPDis bit is Read-Only).

Disable endpoints before disabling interrupts because it is necessary to
handle RXFLVL interrupt (in Slave mode) for GOUTNAKEFF to become active.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-29 12:00:08 +02:00
Ioannis Karachalios 245c7db0da drivers: display: smartbond: Update PM policy
Since the display port should be enabled
by default and sleep is bound to the
blanking status, PM constraints should
be acquired at initialization.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-29 11:59:36 +02:00
Henrik Brix Andersen 88fb5e2edb drivers: can: shell: print device name in RX path
Include the device name when printing received CAN frames. This improves
the user experience when working with multiple CAN controllers via the CAN
shell.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-29 11:58:54 +02:00
Ioannis Karachalios c140053654 drivers: i2c: smartbond: Add support for PM
This commit should add all the functionality needed for the I2C
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-29 08:42:00 +02:00
Nicolas Pitre 99dcbdf933 drivers/timer/apic_timer: move to periodic mode
This driver is impossible to make time-accurate using single-shot
mode. Time accuracy may be obtained only by using periodic mode, meaning
it is not tickless capable either. Let's simplify the code by only
supporting periodic mode and strip out the TSC stuff. Any hardware with
TSC capability should now use the apic-tsc driver instead.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Nicolas Pitre 3c2e57c923 drivers/timer/apic_tsc: use ICR as a fallback timeout event source
This adds support for the local APIC in one-shot mode as the timeout
event source for those cases where the CPU supports invariant TSC but
no TSC deadline capability. It is presented as another timer choice.
Existing Kconfig symbols were preserved to minimize board config
disturbance.

This hybrid approach was implemented kind of backward in the apic_timer
driver but it is far cleaner to carry this here.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Nicolas Pitre e34369ce31 drivers/timer/apic_tsc: move to common code pattern
Let's replicate a common code pattern for this to be abstracted more
easily in the future. In addition to duplicating the correctness fixes
implemented in the ARM and RISC-V drivers, this eliminates a couple large
runtime divisions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-29 08:40:43 +02:00
Fin Maaß c8fda13b4c drivers: interrupt_controller: litex: add prefix
add litex prefix to its interupt controller.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-29 08:40:11 +02:00
Tomi Fontanilles 3efdbe6c0c modules: mbedtls: rename CONFIG_MBEDTLS_MAC_*_ENABLED and rm duplicates
Remove the `_MAC` part because those Kconfig options enable only hash
algorithms, nothing MAC-related, and the `_ENABLED` part to align the
naming to the Mbed TLS defines (plus we don't need such a part).

As a bonus, enabling SHA-256 does not automatically enable SHA-224
anymore.

See the migration guide entries for more details on the practical
changes.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 08:39:26 +02:00
Ethan Lu 9baf77dd39 sensor: ms5837: fix compensate parameters for 30BA variant
The previous parameters seems wrong if we refer to:
https://www.te.com/usa-en/product-CAT-BLPS0017.html

Signed-off-by: Ethan Lu <ethan@cpdesign.com.au>
2024-05-29 07:34:51 +02:00
Fredrik Gihl 649d9d31af drivers: w1: Ensure DQ pin is both input and output.
Driver did not work on ESP32c3, by specifying pin to be output and
input solve the issue. Improve documentation, to highlight that driver
is requiring open-drain support.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-29 07:34:29 +02:00
Declan Snyder eae316ebc9 dts: bindings: Rename nxp,kinetis-lptmr compat
Rename nxp,kinetis-lptmr compat to nxp,lptmr.
Because of concerns over breaking downstream users,
keep support for the old compatible temporarily and
make it clear it should be changed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-29 07:32:25 +02:00
Pisit Sawangvonganan 75165050f7 drivers: gpio: remove '&' when assigning gpio_xxx_init function
Remove address-of operator ('&') when assigning `gpio_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/gpio`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-29 07:32:17 +02:00
Margherita Milani 885d271e57 drivers: sensor: si7006: fix redundant include in si7006
Remove redundant include of `zephyr/logging/log.h` in si7006.c.

Signed-off-by: Margherita Milani <margherita.milani@amarulasolutions.com>
2024-05-29 07:31:53 +02:00
Sadik Ozer 0480b2625b drivers: Add MAX32690 uart driver
UART driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer d6e1753125 drivers: Add MAX32690 gpio driver
GPIO driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer f76256d2f1 drivers: Add MAX32690 pinctrl driver
Pincontrol driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer 45df8963f1 drivers: Add MAX32690 clock control driver
Clock control for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Xavier Ruppen 225e28bf35 drivers: ethernet: enc28j60: ESTAT TXABRT bit should be cleared on error
If the TXABRT bit from ESTAT is ever set (because of a single failed
transmission), the driver will continue showing an error on every
subsequent packet sent, although it is correctly sent:

	 <err> eth_enc28j60: TX failed!

The enc28j60 datasheet says under
"12.1.3 TRANSMIT ERROR INTERRUPT FLAG (TXERIF)":

	"After determining the problem and solution, the
	host controller should clear the LATECOL (if set) and
	TXABRT bits so that future aborts can be detected
	accurately."

Therefore, clear the TXABRT and LATECOL bits in case of transmission error.

Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
2024-05-28 18:57:58 +02:00
Alexander Kozhinov 1c968a4a8f drivers: usb: device: fix cbprintf_package warning
cbprintf_package complains about char usage for %p
string argument and suggests void * usage.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-05-28 18:57:22 +02:00
Adam Kondraciuk 2cd2d5fef3 tests: drivers: timer: grtc: Fix GRTC test
The `z_nrf_grtc_timer_get_ticks()` function converts system ticks
to GRTC ticks. It gets the current system tick to calculate an
absolute GRTC value. The same does the test function to provide
an argument to be converted. If the system tick occurs between those
`sys_clock_tick_get()` calls the `z_nrf_grtc_timer_get_ticks()` will
take into account the newer tick while the test estimate bases on
the old tick value. Due to that the maximum result error is 1 system
tick minus 1 GRTC tick which equals (`CYC_PER_TICK` - 1) for GRTC
ticks.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Adam Kondraciuk cac0da313b drivers: timer: grtc: Update GRTC driver
This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Adam Kondraciuk b4047307fa drivers: timer: grtc: Fix ticks calculation for GRTC
Fixed calculation of GRTC ticks inside
`z_nrf_grtc_timer_get_ticks()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Ioannis Damigos 4b40c11c42 smartbond_timer: Fix convertion of watchdog value to LP clock ticks
Fix convertion of watchdog value to LP clock ticks

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-05-28 17:49:29 +02:00
IBEN EL HADJ MESSAOUD Marwa fdd6627df9 drivers: i2s: i2s_ll_stm32: tx_stream_disable: Add busy wait
Add a k_busy_wait to the function tx_stream_disable
to be able to complete the drain of the TX queue before disabling.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Franck Thebault c27ed31eb3 drivers: i2s : correct TRIGGER_DRAIN and TRIGGER_STOP commands
Correction of the handling of Tx audio samples via DMA

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa f3004dc671 drivers: i2s: Add DMA busy function
Add the function ll_func_i2s_dma_busy to be able to check the
transmission of all the DMA TX packet.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa 6cef92a908 drivers: dma: u5: fix dma reload
In dma_stm32_reload, the size is the number of bytes and not number
of elements.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
IBEN EL HADJ MESSAOUD Marwa f000e1a58a drivers: i2s : enable rx path for H7 and H5
In i2s_stm32_isr, remove the errors from SR register
   i2s_stm32_configure, enable the rx path for H7 I2S compatible IP

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Ioannis Karachalios d4209ab6c4 drivers: dma: smartbond: Add support for PM
This commit should add all the functionality needed for the DMA
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-28 12:49:46 +02:00
Bjarki Arge Andreasen 51bcc5d20d drivers: gnss: LCX6G use modem chat runtime API
Update the Quectel LCX6G device driver to use the modem chat
runtime API to modify the dynamic pair chat script.

This change makes the driver safer and more readible by
ensuring safe modification of the members of the modem chat
structures.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Yong Cong Sin af450ea3cc drivers: gpio: add Broadcom iProc GPIO controller driver
Add device driver, bindings and build-only test for
Broadcom iProc GPIO controller.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 09:59:20 +02:00
Yong Cong Sin 97ba7fd48d drivers: i2c: add Broadcom iProc I2C driver
Add device driver, bindings and build-only test for
Broadcom iProc I2C.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 09:57:40 +02:00
Fin Maaß cefbcc5323 drivers: i2c: i2c_sbcon: use frequency from device tree
use the clock frequency from the device tree.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00
Fin Maaß dd1f9c346d drivers: i2c: litex: add get_config and recover_bus
add get_config and recover_bus for the litex i2c driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 09:56:48 +02:00