Commit graph

25,525 commits

Author SHA1 Message Date
Sarah Renkhoff
79d62944b1 drivers: stepper: Add driver for DRV8424 stepper motor controller
Adds a step/dir stepper driver for the drv8424 stepper driver.

Signed-off-by: Sarah Renkhoff <sarah.renkhoff@navimatix.de>
2024-12-19 15:21:44 +01:00
Sara Touqan
bc6c07b432 drivers: Add shared IRQ support for STM32U0 series in DMA driver.
This commit Modifies the DMA STM32 Kconfig to enable shared IRQ
support for the STM32U0 series.
This change ensures DMA channels with shared IRQs are properly
configured for stm32u0 devices.

Signed-off-by: Mohammad Badawi <zephyr@exalt.ps>
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
2024-12-19 15:19:56 +01:00
Benjamin Curtis Byers
fa1b93d148 drivers: clock_control: stm32 ll common: fix RCC pll disable
The clock_stm32_ll_common.c function set_up_plls calls
LL_RCC_PLL_Disable();and it was not waiting for the
disable to complete before trying to configure
the pll sysclock which creates a race condition for
pll configuration.The wait for re-enabling the RCC pll
is already there, it was just missing the wait for
the disable before configuration. Also added the wait for PLL2.

Signed-off-by: Benjamin Curtis Byers <ben.byers@ubcobikes.com>
2024-12-19 15:19:13 +01:00
Jilay Pandya
cb94a761de drivers: modem: modem_cellular: add missing break statement
add missing break statement to fix coverity issue

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-19 15:18:06 +01:00
Francois Ramu
2000ae6ac9 drivers: flash: stm32 flash register name for the stm32h7RS serie
Adapt the stm32 flash driver for the stm32h7rs serie where some
bit of the FLASH registers are named differently from stm32h7 serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-19 12:37:44 +01:00
Adrian Bonislawski
b0416f51b6 drivers: ssp: start with xtal clock on ssp ver >= 2.0
This patch will save configured link clock and ensure
ssp starts with xtal clock if ssp ver >= 2.0

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-12-19 12:37:24 +01:00
The Nguyen
69735397bd drivers: gpio: add support for gpio interrupt on Renesas RA family
First commit to add support for gpio interrupt on Renesas RA
- Add support for external interrupt driver
- Add support for gpio interrupt config

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-19 08:39:10 +01:00
Jun Lin
bc98a06771 driver: pwm: npcx: use CONFIG_PWM_LOG_LEVEL
This commit replaces the hard-coded log level with CONFIG_PWM_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Jun Lin
fb4574c89c driver: i2c: npcx: use CONFIG_I2C_LOG_LEVEL
This commit replaces the hard-coded log level with CONFIG_I2C_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Jun Lin
3727d2ed72 driver: gpio: npcx: use CONFIG_GPIO_LOG_LEVEL
This commit replaces the hard-coded log level with
CONFIG_GPIO_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Jun Lin
6064a1cf21 driver: flash: npcx: use CONFIG_FLASH_LOG_LEVEL
This commit replaces the hard-coded log level with CONFIG_FLASH_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Jun Lin
2fc2b19670 driver: eSPI: npcx: use CONFIG_ESPI_LOG_LEVEL
This commit replaces the hard-coded log level with
CONFIG_ESPI_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Jun Lin
17ccc5fdfb driver: clock_control: npcx: use CONFIG_CLOCK_CONTROL_LOG_LEVEL
This commit replaces the hard-coded log level with
CONFIG_CLOCK_CONTROL_LOG_LEVEL.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-12-19 04:18:34 +01:00
Ryan McClelland
eb93ba03a9 sensor: lsm6dsv16x: add i3c support
Add I3C support to the lsm6dsv16x.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-18 22:12:04 +01:00
Ryan McClelland
cbfabf8be8 sensor: lps22hh: fix null check for i3c ibi
A typo was made where if the i3c bus is not null, then it will not set
the ibi callback.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-12-18 22:12:04 +01:00
Fin Maaß
4b366384fa drivers: flash: spi_nor: use existing DT macros
use existing DT macros for `ANY_INST_HAS..` defines.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-18 22:11:20 +01:00
Yishai Jaffe
5694b24a6e soc: silabs: Add support for SiLabs EFR32ZG23 SoC
Add support for Silicon Labs EFR32ZG23 SoC.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-18 20:32:46 +01:00
Jilay Pandya
f6b24d6240 drivers: stepper: tmc: add CONFIG_STEPPER_ADI_TMC5041_RAMP_GEN
rename CONFIG_STEPPER_ADI_RAMP_GEN to CONFIG_STEPPER_ADI_TMC5041_RAMP_GEN

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-18 20:32:24 +01:00
Jilay Pandya
eef92b8719 drivers: stepper: tmc: create rampstat Kconfig template
create rampstat Kconfig template to enable respective tmc drivers to
reuse the common configurations

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-18 20:32:24 +01:00
Sylvio Alves
74d4008cc1 drivers: wifi: make WIFI_BUILD_ONLY_MODE global symbol
Convert vendor specific **_WIFI_BUILD_ONLY_MODE symbol as global
in order to provide common build flag to enable CI with no blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-18 18:17:16 +01:00
Karthikeyan Krishnasamy
b0389ce5b5 drivers: adc: add ads131m02 adc driver
ADS131M02 is Texas Instruments 2-channel, 24-Bit differential
input ADC which support wide range datarate.
Driver add support for adc read, channel configure, adc sampling
mode configuration and power management.

[1]. https://www.ti.com/lit/ds/symlink/ads131m02.pdf

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-12-18 18:16:40 +01:00
Marcin Szymczyk
db7365e286 drivers: mbox: nrf_vevif_event: add workaround for nRF54L errata 16
Prevent events from being triggered again on the next CNT0 event.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-12-18 18:15:29 +01:00
Guillaume Gautier
2460e894e4 drivers: adc: stm32: remove unused cast
config->base is already defined as ADC_TypeDef so no there is no need to
cast it as such. Remove all occurrences throughout the file.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
47b2bb7652 drivers: adc: stm32: listify some tables
Listify the content of the tables used for sequencer and oversampling.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
420b2a053c drivers: adc: stm32: move define from dt-binding into driver
Now that clock source and sequencer are defined with strings in device
tree, move the old defines directly in the driver

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
e0554aa453 drivers: adc: stm32: use a string for sequencer and clock source property
Now that st,adc-sequencer and st,adc_clock-source use a string, update the
ADC driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>

fu drv adc update driver with string
2024-12-18 15:32:35 +01:00
Guillaume Gautier
afa97d12ec drivers: adc: stm32: simplify adc dma enable function
Remove specific cases for H7 and U5: group them together and only call a
single function. ADC3 of H72x/H73x and ADC4 of U5 are different from other
ADC of their series, and have dedicated functions in the LL for enabling
DMA, but they're doing the exact same operation as
LL_ADC_REG_SetDataTransferMode.

Incidentally, this change allows H7A/H7B to use the DMA (it seems to have
been missed before).

Last, this change enables the DMA support for F1x ADC.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
4cfbf78939 drivers: adc: stm32: simplify oversampling with new property
Use the new oversampler property to simplify the management of the
ADC oversampling.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
fb5ff902e8 drivers: adc: stm32: better express f3 and h7 adc versions
STM32F3 and H7 have multiple ADC versions difficult to differentiate.
Use clearer macros to make code more readable.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Guillaume Gautier
e978164a6b drivers: adc: stm32: add log message when adc overrun
Displays an error log message when an ADC overrun occurs.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Yishai Jaffe
1b4cef325b shell: use shell_device_get_binding
Use shell_device_get_binding() instead of device_get_binding() so that
we get the device based on its name and in addition by its label.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-18 15:32:10 +01:00
Hongquan Li
13ea58775b drivers/wifi/esp_at: Use mode 2 to connect when using as a UDP server
Mode 0 cannot establish a connection when used as a UDP server,
replace mode 0 with mode 2 to save the client's IP and port as
the communication address when a message is received.

Fixes #82898

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-12-18 15:31:55 +01:00
James Roy
3cf4347c15 drivers: gpio: Fix unchecked return value in gpio_pca_series
Fix unchecked return value scanned by Coverity.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-12-18 15:31:33 +01:00
Guennadi Liakhovetski
6f1fc6e96c drivers: dai: ssp: remove unused variables
Fix compiler warnings
/zep_workspace/zephyr/drivers/dai/intel/ssp/ssp.c:2079:18: error: \
unused variable 'ssrsa' [-Werror=unused-variable]
 2079 |         uint32_t ssrsa = 0;
      |                  ^~~~~
/zep_workspace/zephyr/drivers/dai/intel/ssp/ssp.c:2078:18: error: \
unused variable 'sstsa' [-Werror=unused-variable]
 2078 |         uint32_t sstsa = 0;
      |                  ^~~~~

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-18 15:31:18 +01:00
Khoa Nguyen
e95d18587f drivers: adc: Add ADC properties in Renesas RA ADC node
- Add "channel-available-mask" property in ADC node
to detect which channels are available to use

- Add "add-average-count" property in ADC node to chose
number of count of the addition or average mode

- Change the source code of ADC to match with 2 new properties.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-18 12:46:31 +01:00
Gerard Marull-Paretas
bcb2b3620e drivers: clock_control: nrf54h-fll16m: use values from BICR
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-12-18 12:46:20 +01:00
Gerard Marull-Paretas
f267c339f7 drivers: clock_control: nrf54h-lfclk: use values from BICR
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-12-18 12:46:20 +01:00
Gerard Marull-Paretas
d5041aecec drivers: clock_control: nrf54h-common: add utility to obtain LFOSC acc
Add a utility function to obtain LFOSC accuracy in PPM from BICR.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-12-18 12:46:20 +01:00
Gerard Marull-Paretas
5415c42dd4 drivers: clock_control: nrf54h-hfxo: use values from BICR
The real, applicable and trusted values are the ones flashed into BICR.
So, drop DT properties that replicate BICR and use runtime reads to BICR
instead.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-12-18 12:46:20 +01:00
Qingling Wu
dbc6a50698 drivers: wifi: nxp: add set RTS threshold command support
Add set RTS threshold command support for sta and sap in nxp driver.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2024-12-18 10:17:24 +01:00
Benjamin Bigler
f1087d2042 drivers: adc: tla202x: add support for tla2022 and tla2024
This extends the tla2021 driver to support tla2022 and tla2024

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-12-18 08:33:49 +01:00
Benjamin Bigler
7609ceadc4 drivers: adc: tla2021: rename everything from tla2021 to tla202x
Rename everything from tla2021 to tla202x (except dtcompatible)
in preparation to add support for tla2022 and tla2024

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-12-18 08:33:49 +01:00
Benjamin Bigler
25c210e8eb drivers: adc: tla2021: sleep until sampling is done
Sleep until sampling is done instead of polling. This avoids
blocking of other threads.

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-12-18 08:33:49 +01:00
Nathan Olff
42e7095d1e drivers: adc: adc_emul: implement raw func set function in adc_emul
allow setting a function as generator of raw adc values in adc_emul

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Nathan Olff
d793b86a82 drivers: adc: adc_emul: write function to set const raw value
implement storage and retrieval of raw value in adc_emul

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Xavier Ruppen
06b7dc81a5 drivers: ethernet: enc28j60: disable/enable interrupts to avoid races
Currently, there is a small race window where we can miss an interrupt.
Right after we're done reading the RX buffer but just before decrementing
the RX counter to zero, the ENC28J60 may receive a packet. The chip will
raise an interrupt, but the line is still asserted. That means that the
callback will not be invoked since it is edge-triggered.

To avoid that, disable interrupts on the chip itself before processing
the RX buffer.

In fact, the ENC28J60 datasheet specifically says:

	"After an interrupt occurs, the host controller should
	clear the global enable bit for the interrupt pin before
	servicing the interrupt. Clearing the enable bit will
	cause the interrupt pin to return to the non-asserted
	state (high). Doing so will prevent the host controller
	from missing a falling edge should another interrupt
	occur while the immediate interrupt is being serviced.
	After the interrupt has been serviced, the global enable
	bit may be restored. If an interrupt event occurred while
	the previous interrupt was being processed, the act of
	resetting the global enable bit will cause a new falling
	edge on the interrupt pin to occur."

This is also what is being done in the Linux driver [1].

[1] https://elixir.bootlin.com/linux/v6.11.2/source/drivers/net/ethernet/microchip/enc28j60.c#L1126

Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
2024-12-18 08:32:49 +01:00
Xavier Ruppen
7d95cc4ce3 drivers: ethernet: eth_enc28j60: do not check PKTIF on interrupt
The enc28j60 errata sheet says:

	"The Receive Packet Pending Interrupt Flag
	(EIR.PKTIF) does not reliably/accurately report
	the status of pending packets."

	"In the Interrupt Service Routine, if it is unknown if
	a packet is pending and the source of the interrupt
	is unknown, switch to Bank 1 and check the value
	in EPKTCNT.
	If polling to see if a packet is pending, check the
	value in EPKTCNT."

A workaround has already been implemented inside of eth_enc28j60_rx().
But checking PKTIF before calling eth_enc28j60_rx() completely defeats
the purpose of the workaround. Do not check it.

Moreover, clearing ENC28J60_BIT_EIR_PKTIF is useless since it is
automatically cleared once all packets are read. So remove that check
and clarify comment.

Also please refer to the Linux driver [1].

[1] https://elixir.bootlin.com/linux/v6.11.2/source/drivers/net/ethernet/microchip/enc28j60.c#L1090

Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
2024-12-18 08:32:49 +01:00
Robin-Charles Guihéneuf
3a2ac9aa64 drivers: i2c: Fix SMBus build with stm32f4 family chip
The build condition was only dealing with the new line of SoC.

Signed-off-by: Robin-Charles Guihéneuf <robin-charles@hotmail.fr>
2024-12-18 08:32:32 +01:00
Mikhail Siomin
36bbd67653 drivers: gpio_pca95xx: add pins initialization to default state
After a non-power reset (wdt) pins may remain in non-default state.
To ensure that a system initialization is the same after any reset,
it is necessary to initialize pins to the default state.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-12-18 08:32:15 +01:00
Jiafei Pan
55f0b87143 drivers: gpio: mcux_igpio: add MMIO mapping support
Map MMIO memory by using DEVICE_MMIO_NAMED_x() APIs.

And some platforms has no soc.h, so use __has_include to check it
firstly.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-12-18 08:31:52 +01:00