Commit graph

23353 commits

Author SHA1 Message Date
Anders Nielsen
242e6ea12a drivers: stepper: adi_tmc: Prepare for tmc51xx support
Add Kconfig option. Find common regs. Update ramp generator data.

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-22 12:09:18 +02:00
Jordan Yates
86385590c2 wifi: nrf_wifi: net_if: allocate memory before mutex
Allocate the memory in `nrf_wifi_if_send` *before* taking the nrf70
global mutex. This prevents the function from deadlocking the
application if attempting to send under memory-pressure, since many of
the memory release paths also happen under the global mutex.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-22 10:00:19 +02:00
Hugues Fruchet
24c584d2a4 drivers: clock: stm32: h7: fixed domain clock configuration
In some case, we may need to describe a domain clock for a device
while there is no way to configure it.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Hugues Fruchet
83b33d1e87 drivers: display: stm32_ltdc: configure RIF for LTDC layer 1
Configure RIF for LTDC layer 1.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Hugues Fruchet
873bba0a1b drivers: display: stm32_ltdc: add support of clock_configure
Add support of clock_configure() for clock source selection
through devicetree.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Hugues Fruchet
0da7671977 drivers: display: stm32_ltdc: add support of framebuffer in psram
Add support of framebuffer in PSRAM memory.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Hugues Fruchet
e15312bdb5 drivers: memc: stm32 xspi: add psram linker section
Add stm32_psram PSRAM linker section.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Daniel Mangum
8e037fd89a drivers: console: uart_mcumgr: rename callback
Updates uart_mgumgr_recv_cb to uart_mcumgr_recv_cb to reflect the context
in which it is used.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2025-04-22 09:58:40 +02:00
Steven Chang
95edcf70fc driver: i2c: ene_kb1200 i2c slave address
Fix slave address,
Notify transfer completion via semaphore

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-04-22 09:58:32 +02:00
Brandon Hurst
7ae44ec850 drivers: i2c: i2c_max32.c: Fix handling of 0-length I2C scan transactions
The I2C shell allows a user to input "i2c scan i2c0" for instance, to
scan addresses on the i2c0 bus enabled in DT. This currently causes
an infinite loop when CONFIG_I2C_MAX32_INTERRUPT is enabled.
The infinite loops happens because 0-length transactions
(tx_len == rx_len == 0) not being handled both by the Async
i2c_max32_transfer and by the controller ISR.

This commit makes two changes:
1) [ISR] When an address ACK is received, if there is simply no data to
send or receive, then just give up the semaphore, preventing the
i2c_max32_transfer function from waiting infinitely.
2) [i2c_max32_transfer] After getting the semaphore back, if there is no
data to send or receive, then avoid waiting for the BUSY flag to clear
since clock stretching should not occur by definition for transactions
which merely contain an address ACK.

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
2025-04-22 04:34:28 +02:00
Luis Ubieda
a6c76c4dd9 drivers: i2c_rtio: max32: fix i2c_configure to return 0 on success
To comply with the API definition. This was caught by running i2c_ram
test.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-22 04:33:42 +02:00
Armando Visconti
242f3e2364 sensor: lsm6dsv16x: fix rtio/iodev prefix names
Use prefix for rtio_ctx and iodev instance names in
I2C case.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-04-22 04:33:28 +02:00
Tomasz Chyrowicz
2f6ac20654 drivers: flash: Optimize mspi_nor driver memory
Move MSPI NOR commands to rodata.
Replace array with empty padding (~1kB) with macro-based assignments.

Ref: NCSDK-32779

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2025-04-22 04:33:05 +02:00
Marcin Szymczyk
b6642bb996 drivers: flash: mspi_nor: support MODE_SINGLE and MODE_QUAD_1_4_4
Extend driver to support single lane and 1-4-4 IO modes.
Move flash chip quirks to a separate file.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-04-22 04:33:05 +02:00
Paul Timke Contreras
503f6388e4 drivers: sensor: paj7620: added driver
Added driver for the PAJ7620 gesture sensor. For now,
just added basic gesture mode, although sensor also
has other modes (proximity and cursor modes).

Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
2025-04-22 04:32:54 +02:00
Qiang Zhao
c412ee4597 drivers: firmware: scmi: add cpu domain protocol
Added helpers for NXP SCMI cpu dmomain protocol.

Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
2025-04-21 22:03:27 +02:00
Hao Luo
706770b50f drivers: watchdog: Add support for Apollo510 watchdog
This commit adds support for Apollo510 SoC in ambiq wdt driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Hao Luo
6618a673e5 drivers: gpio: Add support for Apollo510 GPIO
This commit adds support for Apollo510 SoC in ambiq gpio driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Hao Luo
b9f05070be drivers: timer: Add support for Apollo510 SoC system timer (STIMER)
This commit adds support for Apollo510 SoC in ambiq stimer driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Hao Luo
1e8fb26b67 drivers: serial: pl011: Add support for Ambiq Apollo510 SoC UART
Added more clock sources for Apollo510 support

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Hao Luo
7090605026 drivers: pinctrl: Add pinctrl driver for Apollo510 SoCs
This commit adds pinctrl support for Apollo510 SoCs,
and unified pinctrl bindings across apollo families.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Laurentiu Mihalcea
eaa1addb5e drivers: intc: irqstr: refactor level 1 interrupt recounting
So far, it has been assumed that only level 2 interrupts can be shared
via the `CONFIG_SHARED_INTERRUPTS` option, but this is not true. In the
case of i.MX95, for instance, level 1 interrupt 143 is shared among EDMA
channels 30 and 31.

Due to the previous assumption, the irqsteer driver currently performs
reference counting for all level 2 interrupts aggregated by each
dispatcher and, of course, for the level 1 interrupts the dispatchers are
attached to. For instance, assuming a machine with 100 level 1 interrupts
and 1 irqsteer dispatcher attached to line 50 this would mean reference
counting is performed solely for line 50 (and the level 2 interrupts MUX'd
into this line).

Going back to i.MX95, since there's no dispatcher attached to IRQ line 143
that means there's no reference counting for it. In turn, this means that
the IRQ line can be disabled accidentally on a channel release() operation
while the other channel is active.

To protect against such cases, refactor the level1 interrupt reference
counting. Now, reference counting is performed for _all_ level 1
interrupts.

Additionally, simplify the locking logic. Ideally, there would be a lock
for each dispatcher protecting the level 2 interrupts and 1 global lock
protecting the level 1 interrupts. Instead of this approach (which is a
bit more complex), simply use a global lock for all interrupts. If finer
granularity is required then it can be added later on.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-04-21 20:04:19 +02:00
Laurentiu Mihalcea
bb7efcf03b drivers: intc: irqstr: change name of level1 IRQ enable/disable
Add the "_raw" suffix to the macros handling the level 1 IRQ enable and
disable operation to signify that these operations perform no refcounting.
Additionally, shorten some portions of the name.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-04-21 20:04:19 +02:00
Isaev Denis
d34ed32846 drivers: display: elcdif: remove backlight enable pin dependency
The driver no longer requires a backlight enable GPIO pin to be defined,
which allows compatibility with displays that do not provide such a pin.

Signed-off-by: Isaev Denis <anelderlyfox@yahoo.com>
2025-04-21 20:03:50 +02:00
Phi Bang Nguyen
7a1285efe5 drivers: video: Add support for controls of menu types
Add support for controls of menu types, standard menu and drivers'
defined menu.

Rework the ov5640's test pattern and power line frequency controls using
this new support.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
3378d683e9 drivers: video: Add support for composite controls
For controls that are dependent from others, we need to "cluster" them.
Whenever one or more controls of the same cluster are set or gotten,
only the callback of the 1st control of the cluster, i.e. the master
control, is called. The master control is the one that represents the
whole cluster.

A common type of control cluster is "auto"-cluster, e.g. auto_gain/gain,
auto_exposure/exposure, auto_white_balance/red_balance/blue_balance,
etc. If the cluster is in automatic mode, then the manual controls are
marked inactive and volatile which are read via get_volatile_ctrl().
If the cluster is put in manual mode, then the manual controls should
become active again and the volatile flag is cleared.

Re-implement the ov5640's autogain/analogue_gain controls with the new
auto cluster mechanism so that it work correctly and fully.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
cbf104f3d0 drivers: video: Add get_volatile_ctrl driver's API
Add get_volatile_ctrl() driver's API to retrieve the current value of a
control marked as volatile, e.g. gain, exposure. This function triggers
a hardware register reading instead of returning a cached value to ensure
that users always get a fresh value which is constantly updated by the HW.

Note that the driver is responsible for marking a control as volatile by
setting VIDEO_CTRL_FLAG_VOLATILE when registering a control because not
all hardwares work the same way for the same control.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
f363bd6e36 drivers: video: Support controls of 64-bit integer type
Add supports for controls that need 64-bit integer such as pixel rate.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
c95387a815 drivers: video: Add video query control API
Application can query information about a control given the control id,
the framework fill the rest of the structure. Application can also
enumerate all kinds of device's supported controls by iterating with
VIDEO_CTRL_FLAG_NEXT_CTRL on the same API.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
135528a1be drivers: video: Implement video control framework
Implement the video control framework with the following features:

- Drivers initialize the control with a valid value range at boot which
  guides the application developer and the framework. Hence, the video
  framework could do all common works for drivers e.g., sanity check.

- Controls need to be cached to memory. Video framework handles
  get_ctrl(), drivers don't need to implement this API. It is because
  reading control value directly from registers are not only inefficient
  but also sometimes impossible, e.g. controls that scatter through
  several registers. Only "volatile" control needs to be updated at
  runtime.

- Only the devices (e.g., sensors) owning the controls need to
  implement set_ctrl(). Other devices of the pipeline do not need to
  propagate set_ctrl() and hence, do not need to implement this API

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Phi Bang Nguyen
2b46cc0b78 drivers: video: Introduce video device structure
Introduce a new video device structure representing a device in a
video pipeline. Each video device embeds a pointer to its "source"
device and other "video" characteristics.

This structure give the video framework an access to all video features
of the device and a hierachical view of the video pipeline that the
device belongs to.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-04-21 20:03:31 +02:00
Titan Chen
5179463750 drivers: timer : fix rtmr and slow timer.
RTMR use slow timer be the busy_wait timers,
only ARCH_HAS_CUSTOM_BUSY_WAIT if slow timer disabled.

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-04-21 12:42:28 +02:00
Hu Dou
25564f73dc drivers: i3c: stm32: fix clock init for i2c fast mode plus
The logic of clock initialization for i2c fast mode (FM) and fast
mode plus (FMP) is as follows:
 1 compute how many system clock cycles for SCL to be low
 2 compute how many system clock cycles for SCL to be high by
   subtracting the low duration computed above from the SCL period
 3 verify the high duration computed in 2 is larger than a minimum
The bug is that the step 3 for the FMP is compared with the
minimum value for FM, and causes it to fail.

The fix corrects the bug.

Signed-off-by: Hu Dou <hugh.dou@gmail.com>
2025-04-21 12:42:01 +02:00
Fin Maaß
1ace896425 ethernet: dwc_xgmac: use phy api correctly
use phy_configure_link() instead of phy_api->cfg_link().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-18 17:47:14 +02:00
Tim Pambor
d68929c64a drivers: flash_stm32_xspi: fix DT accessor for flash size
The flash size is the second part (size) of the first reg value, not the
first part (address) of a nonexistent second reg value.

Based-on-patch-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-04-18 12:36:20 +02:00
Tom Chang
eb5597e90a drivers: espi: npcx: ensure the host receives the value from eSPI VW
This commit adds an option to verify weather the host has read the value
after the wire 3-0 bits have been updated.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2025-04-18 10:40:23 +02:00
Dipak Shetty
8f6b0b2e2e drivers: stepper: refactor stepper move_to and move_by calls
Refactored stepper move_to calls and move_by calls.
Now, relative movement required or absolute target position
is calculated and then redirected to move_by or move_to calls
respectively.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-04-17 21:17:55 +02:00
Andrei-Edward Popa
e4c2cecb7d drivers: i2c: added wch i2c driver
added i2c driver for wch platforms

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2025-04-17 21:17:06 +02:00
Ryan McClelland
3932794aee drivers: i3c: shell: add direct rstdaa shell command
This adds a shell helper for a direct rstdaa for I3C v1.0 devices

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-17 21:16:45 +02:00
Ryan McClelland
c0503597ba drivers: i3c: add rstdaa direct helper
In I3C v1.0, there was a RSTDAA direct CCC. It is deprecated in I3C v1.1
and later. This adds a CCC helper for it.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-17 21:16:45 +02:00
Ryan McClelland
2e8c911fa3 drivers: i3c: add v1.0 support flag
This adds a v1.0 support dts flag for devices. This also makes it so it
doesn't try to send a GETCAPS (GETHDRCAP) ccc if this flag is set and it
doesn't support any HDR modes.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-17 21:16:45 +02:00
Jérôme Pouiller
8e5c95ed4b drivers: dma: siwx91x: Allow static allocation of DMA channel descriptors
Some instances of DMA (dma0) can use the normal sram to store their
descriptors. In this case, it makes sense to allow the linker to
allocate the memory rather than tweaking the memory layout.

So, if the attribute silabs,sram-region is not defined, use a statically
allocated buffer.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-04-17 17:23:32 +02:00
Jérôme Pouiller
832a006806 drivers: dma: siwx91x: Early init is not required
DMA can be initialized with the other devices. The user only need to the
ensure CONFIG_DMA_INIT_PRIORITY is less than the DMA consumers.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-04-17 17:23:32 +02:00
Jérôme Pouiller
164bbdf294 drivers: dma: siwx91x: Use DT to declare descriptors
Silabs siwx91x hardware use specific memory areas to store descriptors
for DMA requests. These areas are tightly coupled between the CPU and
the hardware. This helps in reducing the wait cycles.

Until now these addresses was also hard coded in the DT and in the
linker script. This patch leverage the zephyr,memory-region driver to
centralize the information in the DT.

Then, with this new implementation, the memory mapping is easier to
understand for the reader.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-04-17 17:23:32 +02:00
Maochen Wang
90cd350c5a drivers: serial: fix console hang when waken up from PM3
The console can't input when waken up from PM3, as get the wrong
usart_intenset when process PM_DEVICE_ACTION_TURN_ON and the
USART interrupt is not enabled. Only saving usart_intenset after
PM action of PM_DEVICE_ACTION_TURN_OFF can fix this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-04-17 09:06:38 +02:00
Tim Lin
db4344b06b drivers/i2c: ite: Use i2c_bitbang API for bus recovery
Replace the manually implemented GPIO-based I2C recovery logic
with Zephyr's i2c_bitbang API.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-04-17 09:06:29 +02:00
Hao Luo
6f4b92d64d soc: ambiq: Optimize the inclusion relationship of header files
Optimized the inclusion relationship of header files

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-17 09:06:18 +02:00
Ryan McClelland
2c66a2adc0 drivers: i3c: add i3c controller and target kconfigs
I3C can contain a lot of features that may be unused. Add Kconfigs for
enabling controller and/or target code. Choosing just one can reduce
the code size footprint.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-17 09:05:36 +02:00
Aditya Bhutada
2c36616dd2 drivers: espi: espi_mchp_xec: Fix the VW change check time
Adjusted the VW change check timings:
- Polling time changed from 100 uSec to 1 uSec.
- Timeout value changed from 10 mSec to 1 mSec.

This is to achieve the lowest possible pulse width for SCI VW in S0,
while ensuring that the VW change check is still reliable for S0iX
where SoC may take longer to process upstream events.

Also added -ETIMEDOUT error when failure.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
2025-04-17 00:57:28 +02:00
Mika Braunschweig
d19c499037 drivers: interrupt-controller: vim: Compare interrupt numbers
To avoid misconfigurations a comparision has been added which compares the
amount of reported interrupts from the VIM interrupt controller with the
configured number of interrupts via Kconfig.

Signed-off-by: Mika Braunschweig <mika.braunschweig@siemens.com>
2025-04-17 00:56:59 +02:00