Commit graph

24538 commits

Author SHA1 Message Date
Luis Ubieda
7510a17c18 spi: mcux_lpspi: Refactor driver to extract common RTIO functionality
As a step to make them common code: spi_rtio.c.
Verified this refactorization builds and passes spi_loopback, both with
CONFIG_SPI_RTIO enabled, as well as disabled. Tested on mimxrt1010_evk.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-16 20:19:51 +02:00
Lucas Tamborrino
4385785f02 drivers: i2c: esp32: Fix DT node instance.
DT_INST macros were not getting the info from the correct
node.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-09-16 20:19:43 +02:00
Sven Ginka
686cbc90f6 driver: timer: Add support for sy1xx
Add sys timer driver for Sensry's RISCV32 based SY1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
Sven Ginka
7443a2c703 driver: serial: Add support for sy1xx
Add uart driver for Sensry's RISCV32 based SY1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
IBEN EL HADJ MESSAOUD Marwa
ec08e1c0e8 drivers: ethernet: Modify RX thread creation and update KConfig
This change will allow users to configure the Ethernet RX thread
according to their specific real-time requirements.
Adding preemptive threading helps to reduce jitter and
the impact of Ethernet traffic on real-time performance.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-09-16 20:19:16 +02:00
Nathan Olff
7a094e376f drivers: clocks: remove check for sysclock in h7 clocks
remove check for system clock frequency in clock_stm32_ll_h7 because of
addition of fracn (difficult to handle)

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Nathan Olff
f979252cea drivers: use fracn in clock stm32h7 driver
use fracn value if defined for each PLL 1, 2 and 3 based on stm32u5 code

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Sylvio Alves
0aec059630 drivers: sdhc: esp32: remove unused code
Removed unused entry in SDHC driver and initialize
variables accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-16 20:18:33 +02:00
Felipe Neves
a372220ade video: esp32_dvp: change default log level
to the recent CONFIG_VIDEO_LOG_LEVEL option.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-16 20:17:26 +02:00
Mathieu Choplain
3328d7cb01 drivers: adc: stm32: don't fail init if pinctrl is not provided
Commit 47187a9ec9 made the `pinctrl` property
of STM32 ADCs optional, to allow usage of internal channels without wasting
GPIO pins. However, the driver was not adapted to support this new usecase.

(The real bug comes from commit 93956b2073,
that transitioned from a custom `stm32_dt_pinctrl_configure` function to
the standard `pinctrl_apply_state`, without accounting for the fact that
the former returns 0 when pinctrl is empty, but the latter returns -ENOENT)

Modify the driver to work even if no `pinctrl` is present on the ADC node.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-16 13:50:42 +02:00
Maureen Helm
13ff70a6f9 drivers: sensor: tdk: Refactor cmake and kconfig to vendor subdirectory
Refactors the cmake and kconfig bits of the tdk sensor drivers into the
vendor subdirectory to make them consistent with other vendor-sorted
sensor drivers. The tdk driver implementations were previously moved
into the vendor subdirectory in commit
41f1c3a2b7.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-09-16 10:06:03 +02:00
Yong Cong Sin
475ff826d6 drivers: intc: plic: fix IRQ on every hart regardless of mapping
Allow IRQs to work on every hart regardless of the mapping
of the contexts.

Add a test to validate the hart-context mapping.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-16 10:02:08 +02:00
Anuj Pathak
1471c2f814 drivers: led: lp5562: Add PM Device support
- Add PM_DEVICE support for power management

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-13 13:43:33 +02:00
Anuj Pathak
c13eabb059 drivers: led: lp5562: Add enable-gpios control
- Add handling of enable-gpios control on init

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-13 13:43:33 +02:00
Kapil Bhatt
be295a7f02 drivers: nrfwifi: Get RTS threshold
Add api support to get RTS threshold.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-13 13:42:26 +02:00
Jukka Rissanen
98a21a823c drivers: eth: native_sim: Fix error output when creating interface
The return value already contains the errno so use it when printing
the error message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Tomasz Moń
57666d3eff drivers: udc_dwc2: Send isochronous data on next SOF
Do not schedule isochronous data on current frame. While doing so can
work at Full-Speed, it is pretty much impossible to do it quickly enough
at High-Speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-13 09:21:58 +02:00
Damian Nikodem
8c997b35ab driver: ssp: add support for blob30 on PTL
Adding support for SSP blob handling in version 3_0 for PTL.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-09-13 09:17:56 +02:00
Ryan McClelland
f209e0aecf drivers: i3c: shell: add getmxds helper
Add a shell command for the CCC GETMXDS.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-12 13:11:37 -04:00
Ryan McClelland
10a0f01b4b drivers: i3c: add getmxds ccc helper
Add a CCC helper function for getmxds. Also include it with getting
the i3c basic info.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-12 13:11:37 -04:00
Lauren Murphy
474431b24e drivers: sensors: bme280: clang format files
Clang formats decoder and header files.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-12 13:04:18 -04:00
Lauren Murphy
3ef81feb2c drivers: sensor: bme280: use int math in decode q31 conv
Fix decoder to use integer math when converting readings to Q31.

Fixes #77295

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-12 13:04:18 -04:00
Felipe Neves
35c0cc7bf1 video: gc2145: add GC2145 sensor
support and basic controls.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-12 13:02:18 -04:00
Yong Cong Sin
3f3e37a68e drivers: intc: plic: refactor lock in plic_irq_enable_set_state()
Move the lock out from the `plic_irq_enable_set_state()` function
to cover the entire configuration process, so the whole of
enable/disable is atomic.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-12 13:01:37 -04:00
Matthew Mulloy Steinborn
f777030898 drivers: i3c: i3c_cdns Fix null pointer issue in i3c cadence driver.
Fixing a bug where during the bus_init routine, when a slave is
initialized, the target hardware can get an interrupt, and this can occur
before the target_config structure is assigned; the generic IRQ handler
attempts to use this structure to grab callback function pointers, but
with no target config it attempts to access the structure member from a
null pointer. Fix works by adding ternary operation during IRQ that first
checks if target_config is null or not.

Signed-off-by: Matthew Mulloy Steinborn <mulloystmatthew@meta.com>
2024-09-12 13:01:06 -04:00
Michal Smola
60c1c50895 drivers: pwm: Fix NXP TPM without combine channel feature
TMP variant without combine channel feature is used in some NXP SoCs.
Build error occurs for such socs because of accessing unavailable
struct member in hal.
Fix it by adding #if directive to check the feature presence.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-12 14:48:32 +02:00
Adrian Warecki
311ddf90e2 ace: mm: tlb: Check tlb translation enabled before flushing cache
Before unmapping a memory page, the cache is flushed. If the given memory
page is not mapped, this operation ends with a cpu exception on the
ptl platform. Add check if tlb translation is active before flushing.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-09-12 14:47:33 +02:00
Mathieu Choplain
1530c98a77 drivers: hwinfo: stm32: mark STM32WB0 series as incompatible
The existing hwinfo driver for STM32 is incompatible with STM32WB0 series.
Prevent compiling the driver if the target's series is STM32WB0.
This fixes the build failure on the drivers.hwinfo.api test.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e322fa9781 drivers: flash: stm32: add STM32WB0 flash controller
Adds a basic driver for the STM32WB0 flash controller (read/erase/write).
Extended operations are not supported by this driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
263b03feeb drivers: gpio: stm32: add support for STM32WB0
Adds support for the STM32WB0 series in the existing STM32 GPIO driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
32a1b0cc54 drivers: intc: add STM32WB0 GPIO interrupt controller
Adds a driver for the STM32WB0 series GPIO interrupt controller.
This driver implements the STM32 GPIO INTC API, along with an extension
function used to check if a specific line is available on current board.

This also extends the GPIO INTC API to support level-sensitive interrupts,
as this feature is available on STM32WB0.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
20c45fe10a drivers: clock: add STM32WB0 clock control
Add control driver for STM32WB0 series, with support for all clock sources.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Sadik Ozer
bfb21ced8d drivers: counter: Add MAX32xxx counter driver
Common counter driver based on timer for MAX32xxx MCUs
To use as wakeup source wakeup-source parameter shall be
defined as below

&lptimer0 {
	status = "okay";
	clock-source = <ADI_MAX32_PRPH_CLK_SRC_ERTCO>;
	wakeup-source;
	counter {
		status = "okay";
	};
};

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Krzysztof Chruściński
ffdf9a978d drivers: serial: nrfx_uarte: Use ENDTX_STOPTX short if possible
Use short which is available on some devices.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-11 20:14:30 -04:00
Sylvio Alves
b4117f97d3 drivers: wifi: fix esp32 build error
There is a regression caused by #76177, which
causes build to fail due to missing includes and others.
This wraps it with proper checks and fixes wifi scan call.

This also remove unused variable present in the same driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-11 20:14:07 -04:00
Fabrice DJIATSA
688c9d3101 drivers: i2c: update i2c driver to integrate stm32u0
- enabled combined interrupt configuration for stm32u0x serie.
- since stm32u0 serie doesn't support SMBUS we need to avoid
use SMBHEN and SMBDEN bits register.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Pisit Sawangvonganan
847a4eaad2 style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Chekhov Ma
e79507b5e3 drivers: gpio: pca_series: handle byteorder
Add byteorder handling to support big-endian machine.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
d45497e4c8 drivers: gpio: pca_series: add api to get per-port register size
This commit add get per-port reg size api to make it more clear to
understand the design.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
5253eb1692 drivers: gpio: extend pca_series driver to pca953x and pca955x
This commit extends pca_series gpio driver to devices pca9538, pca9539,
pca9554 and pca9555.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
ac2d8993cc drivers: gpio: add pca_series gpio expander driver
There are numbers of drivers for different PCA(L) series chip. They
share similiar register layout and control logic. This driver intends
to unify these drivers for PCA(L)xxxx series i2c gpio expanders.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Benedikt Schmidt
4b657f7a2c drivers: gpio: implement possible manual reset of PCAL64XXA
Implement an option manual reset of the PCAL64XXA to allow the external
implementation of a retention of the port expander state.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Benedikt Schmidt
74476c45b0 drivers: gpio: extract method to apply initial state of PCAL64XXA
Extract method which applies the initial state in the driver
for the port expander PCAL64XXA.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Yangbo Lu
5bec2a3dde driver: pinctrl: add SCMI-based pinctrl driver for NXP i.MX SoCs
On some i.MX SoCs, such as i.MX95, the System Manager is running on a
Cortex-M core to manage the hardware resources and provide services for
SCMI requests.

So add the SCMI-based pinctrl driver to support these i.MX SoCs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
4f99a57b81 drivers: mbox: make mbox_nxp_imx_mu use PRE_KERNEL_1 init level
The MU init should be very early for some platforms. For examples,
i.MX95 is using MU for ARM SCMI. It should be initialzied early
for next power, pinctrl, clock etc. management.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Adam Kondraciuk
bae4ff6cf0 drivers: timer: grtc: Switch GRTC clock source to LFXO
GRTC needs to use direct clock source path instead of system clock path
to support ELV mode for nRF54L targets.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-11 09:30:48 +02:00
Ryan McClelland
0469de9626 drivers: i3c: shell: add ccc deftgts command
Add a command for the ccc deftgts to the i3c shell.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 21:52:18 -04:00
Ryan McClelland
e31a96cbda drivers: i3c: add ccc deftgts
Add support the ccc deftgts. This also includes a function to check if
there is a secondary controller on the bus, and will transmit deftgts
after initialization or a hotjoin event.

This also adds dynamic_addr to the config_target in order to retrieve
the currently configured dynamic address to be used with deftgts.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 21:52:18 -04:00
Ryan McClelland
9d345fc447 drivers: i3c: add support for setaasa initialization
Adds a new DTS prop for i3c devices as support for the CCC SETAASA
requires prior knowledge of the target if it supports it according
to i3c spec v1.1.1 section 5.19.3.23.

This will be used as an optimization for bus initialization.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 17:17:04 -04:00
Neil Chen
810e6a19c3 drivers: flash: support flash driver for MCXA156
Add MCXA156 romapi support in flash driver

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00