Commit graph

23353 commits

Author SHA1 Message Date
Ryan McClelland
2b5c2748f6 drivers: disk: nvme: allow building of nvme without mmu
Some SoCs do not have MMUs. Create a new KConfig that `NVME_PRP_PAGE_SIZE`
that will define the PRP page size, and will default to `MMU_PAGE_SIZE` if
there is a MMU. Otherwise, it defaults to 0x1000.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-04-24 20:27:50 +02:00
Anders Nielsen
b469fc188b drivers: stepper: adi_tmc: Add progress log for stall guard tuning.
Replace stall guard retry error log on EAGAIN with enable/disable info log.
Log position, sg result and sg status on each rampstat_work_handler() call.
Treat only negative return values from tmc_spi_write_register() and
tmc_spi_read_register() as an error. Only log actual velocity when not 0.
Use helper functions rampstat_work_reschedule() and read_vactual().

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-24 16:55:15 +02:00
Anders Nielsen
4b4dc77340 drivers: stepper: adi_tmc: Use helper functions in tmc50xx.
Use rampstat_work_reschedule() and read_vactual().
Only log actual velocity when not 0.
Update log_stallguard() output.

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-24 16:55:15 +02:00
Hao Luo
b64a56362d dts: power: ambiq: change to use ambiq HAL to do power-on config
Changed to use ambiq HAL to do power-on config, no need to bind
pwrcfg any more

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-24 16:55:08 +02:00
Chaitanya Tata
49a8dd51e4 nrf_wifi: Move QSPI defines to buslib
These are QSPI related which is part of buslib.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-24 16:54:27 +02:00
Benedikt Schmidt
21c1a9ef09 drivers: fpga: use device_deinit in ICE40 bitbang driver
Replace reapplying the original pin configuration via pinctrl
in the ICE40 bitbang driver with a device_deinit/device_init.
Fixes #77983.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2025-04-24 16:53:49 +02:00
TOKITA Hiroshi
7237a2659d drivers: led: Add driver for AXP192/2101 LED control function
Add a driver to support AXP192/2101's LED control function.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-24 16:53:20 +02:00
Ruibin Chang
eb99158a80 drivers/sensor/ite/tach/it51xxx: implement tachometer driver
Implement tachometer driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-04-24 11:56:44 +02:00
Declan Snyder
e71aa649b2 spi_nxp_lpspi: Support SPI_HOLD_ON_CS FLAG
Support SPI_HOLD_ON_CS flag in the CPU-based driver. To do this we will
set CONTC bit to continue previous command. Technically it may not be
necessary right now, and could just not clear CONT bit...
but in the future in the lpspi driver we
will decouple the config/init of a transfer from the SDK
and therefore have more control over TCR,
and when we write the TCR, we need to take CONTC bit into account
otherwise a new command will be made. So this approach is how
it should be handled in the driver going forward in my opinion, even
if it might be possible without this bit right now, I want to introduce
it's usage now.

This commit also does a minor refactor in the ISR and adds some comments
to make the strange CS behavior and strange handling code more clear to
future readers.

Also, make the early predicted SPI xfer end code only happen for spi
versions where it is necessary, since I think that code is really the
best we can do but might have a race condition, where possible the last
word is not finished sending when we end the xfer. So limit the
potential affect to v1 lpspi where the workaround is actually required
due to stalling behavior.

Lastly, set the LPSPI into master mode at active low in init, due to
it being the most common case, we want the SPI CS lines to be
initialized at init of driver. I don't think it's worth it to make it
configurable at this time, but in the future it could be if needed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
17ec70c9c1 spi_nxp_lpspi: Use one logging module
Use one logging module for LPSPI driver instead of 3

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
9d0762a1b8 spi_nxp_lpspi: Fix word size > 8
Fix calculations for larger than 8 bit word sizes

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
d54d63d518 spi_nxp_lpspi: Support word size < 8
The LPSPI does support word sizes such as 6 or 7, anything as small as 2
bits. So fix the checks and the math to allow for this in the driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Declan Snyder
0cc535eedd spi_nxp_lpspi: Optimize TX fill for less interrupt
Optimize the TX fill algorithm to have less interrupts by filling the TX
fifo as much as possible during each interrupt handle.

Before, the algorithm was just a very simple, fill the TX fifo with as
much from only the current buffer as possible, then send it and wait for
the next interrupt. Now the algorithm is to fill the TX fifo as much as
possible, even if it means reading from multiple buffers during the
interrupt.

This has the advantage from master mode of having less interrupts. And
it is very important for slave mode because the slave mode does not
control the pacing of the transfer and so therefore should fill as much
as possible whenever possible in order not to miss a deadline.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-24 10:38:58 +02:00
Yangbo Lu
12ccaa1b46 drivers: ethernet: dsa_nxp_imx_netc: adapt to new DSA framework
Adapted to use new DSA framework. And related platforms converted
in samples too.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
2967b8db7e drivers: ethernet: eth_nxp_imx_netc: support no-tag type DSA conduit
Added support for no-tag type DSA conduit.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
f0b1cb578f net: dsa: introduce new DSA framework
The new DSA framework purpose and changes are as below.

- Aligned to Linux DSA framework which has been already mature framework
  for many years, For now in zephyr, the DSA components were splited
  as: switch, port, master(not need driver file for now), slave, and tag.
  Seperated drivers were used for maintaining and developing new
  features.

- The unified dts bindings (aligned to linux) were supported. The port
  driver would parse DTS to decide the port type (master port, slave
  port, or cpu port) to set up the switch. All the ports registered as
  standard ethernet devices. (dsa port and dsa switch tree was not
  supported.)

- How to add DSA device driver based on the framework? All the device
  driver needing to do is providing dsa_spi implementation and private
  data, and calling below initialization.

    DSA_INIT_INSTANCE(n, _dapi, data)

- For switch tag case, recv/xmit helpers in dsa_api could be used for
  taging/untagging. No modified ethernet drivers.
  For no-tag type case, ethernet driver of master port should support
  packet injection/extraction for slave ports leaving NULL recv/xmit.

The dsa_nxp_imx_netc.c driver will be the first example of the new DSA
framework.

The future work for DSA will be supporting bridge for ports. We may align
Linux to give users two options to use DSA device:

- Standalone mode: the switch ports work as regular ethernet ports.

- Bridge mode: switch mode with virtual bridge device which could be
  assigned IP address.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
b22db75cec include: ethernet: rename dsa master/slave to conduit/user
Renamed dsa master/slave to conduit/user for capabilities.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
018a718e12 net: dsa: make current DSA core driver obsolete
Current DSA TX/RX way was hard-coded in ethernet devices driver
with ETH_DSA_SUPPORT and NET_DSA.
This patch is to make such way obsolete, as we actually will support
a better DSA framework to handle this in NET/DSA core driver.
To make legacy devices not affected, below options are used instead.

- ETH_DSA_SUPPORT_DEPRECATED
- NET_DSA_DEPRECATED

Once the legacy devices are converted to new DSA framework, this code
could be removed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Gerson Fernando Budke
531915deda drivers: serial: bouffalolab: Add bflb serial driver
Add Bouffalo Lab serial driver. The driver uses pinctrl to configure
pins and have power management capabilities.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Gerson Fernando Budke
6520633a90 drivers: pinctrl: bouffalolab: Add bflb pinctrl driver
Add Bouffalo Lab pinctrl driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Yunshao Chiang
13087ee1b0 drivers: adc: add it515xx_evb board adc driver
Add it515xx analog to digital converter driver which supports 8 channels
ch0 ~ ch7 and 12-bit resolution.

Signed-off-by: Yunshao Chiang <Yunshao.Chiang@ite.com.tw>
2025-04-23 15:02:36 +02:00
Chaitanya Tata
9c7e8ba679 drivers: nrf_wifi: Move AP mode depedency to LPM
Recovery only needs LPM, rest dependencies come through LPM, so, move
them to the source.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-23 15:00:27 +02:00
Chaitanya Tata
52c156a53d drivers: nrf_wifi: Disable LPM for radio test
This is only meant for operational modes not test modes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-23 15:00:27 +02:00
Łukasz Iwaszkiewicz
2fa0afbc37 drivers: mdio_esp32: let the REF_CLK be initialized before the PHY.
When GPIO17 or 16 is used as an external REF_CLK signal, the output is
enabled in eth_esp32.c This was added in PR number #65759 and then refined
in PR #74442. However this does not work for PHYs which need the REF_CLK
for MDIO communication, such as LAN8720A. In such cases phy_mii driver
tries to get the ID of such a PHY before REF_CLK is present. Therefore
in this PR I propose to move REF_CLK initialization from eth_esp32.c to
mdio_esp32.c which gets initialized before PHY and ETH.

Signed-off-by: Łukasz Iwaszkiewicz <lukasz.iwaszkiewicz@gmail.com>
2025-04-23 14:59:36 +02:00
Cong Nguyen Huu
b985b9437c drivers: uart_nxp_s32_linflexd: support config via devicetree
Added support for initialization configuration via Devicetree.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-04-23 11:48:24 +02:00
Fin Maaß
3237fd2a54 drivers: ethernet: atmel_sam_gmac: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Fin Maaß
ddfb3909f6 drivers: ethernet: nxp_imx_netc_psi: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Fin Maaß
0e55a9565d drivers: ethernet: esp32: move net_if_carrier_off()
move net_if_carrier_off() before
phy_link_callback_set() to ensure the carrier is
not truned off, when the link is already up.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Kate Wang
90c0af2018 drivers: clock_control: update clock_control_mcux_syscon driver for RT700
Update pixel clock control to support RT700.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
d628bfc148 drivers: mipi_dsi: dsi_mcux_2l: Use NXP DCNano DBI driver for memory write
There is no smartdma on RT700, so to perform DCS memory write the CPU has
to write APB buffer word by word, which is too slow for most applications.
But the DCNano in DBI mode can be used to interface with the MIPI-DSI on
RT700, and send data to MIPI-DSI to transfer, once it is properly
configured, which solves the issue.
First added new parameter first_write in display_buffer_descriptor to let
NXP DCNano DBI driver know to use MIPI_DCS_WRITE_MEMORY_START or
MIPI_DCS_WRITE_MEMORY_CONTINUE.
Second updated the MCUX MIPI-DSI driver to support using the NXP DCNano DBI
driver for memory write.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
0017bfcedc drivers: mipi_dbi: introduce NXP DCnano driver
Introduce NXP NCNano driver using MIPI DBI class. This peripheral
supports 8080 and 6800 mode. The driver also supports used with
nxp,mipi_dsi_2l driver, for the panel with DPHY bus, such as g1120b0mipi.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
058a162baf drivers: display: Update nxp,dcnano-lcdif to support IP change on RT700
Update nxp,dcnano-lcdif to support IP change on RT700. There are extra
registers need to be configured for the lcdif on RT700. Add new binding
item "version" to tell which version of the IP the SoC has.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Kate Wang
ed63240804 drivers: display: Fix typo in kconfig comment of nxp,dcnano-lcdif.
Should be DISPLAY_MCUX_DCNANO_LCDIF instead of DISPLAY_MCUX_ELCDIF.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Jilay Pandya
82c6add9b1 drivers: stepper: gpio: refactor work rescheduling logic
update remaining steps should just update the remaining steps, rescheduling
should happen after updating steps and hence is moved to position mode task
which is also in coherence with velocity mode task

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-04-23 02:16:19 +02:00
Luis Ubieda
0a4d86c557 sensor: icm45686: Add I2C bus support
Validated for read/decode APIs, as well as Streaming mode (FIFO).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Luis Ubieda
b22299d262 sensor: icm45686: Rename REG_SPI_READ_BIT to REG_READ_BIT
So it's generic irrespective to the bus. Tested for I2C and SPI.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-23 02:15:34 +02:00
Matt Ihnen
132289ec33 drivers: entropy: stm32: fix compile errors for STM32L4 series
The low level function names in the stm32l4xx low level driver are
different than all the other stm32's even though the functionality is the
same. This breaks the entropy module for these parts. This patch fixes the
build and has been tested on a custom stm32l4p5 board.

This STM32CubeL4 issue has been reported (ST Internal Reference: 207828).

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/88621

Signed-off-by: Matt Ihnen <matt.ihnen@gmail.com>
2025-04-22 16:54:52 +02:00
Sai Santhosh Malae
0d547d4e8a drivers: dma: siwx91x: SRAM desc alignment bug fix
Addressed an issue where alignment of dma desc varaible
of dma0 is corrected to 1024 instead of 512.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Sai Santhosh Malae
19e4c56e23 drivers: dma: siwx91x: Bug fix for regular DMA transfers
Addressed an issue where regular/non-scatter-gather DMA
transfers were not explicitly using the primary DMA descriptor
structure. This ensures a smooth regular DMA transfer after
any scatter gather transfer.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Sai Santhosh Malae
a7c06773fe drivers: dma: siwx91x: distinguishing mem to mem transfers
Introduced a new variable in the `dma_siwx91x_channel_info`
structure to provide a clean way to differentiate transfer
directions. This enhancement is utilized to trigger software
requests specifically for memory-to-memory transfers

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-22 16:54:11 +02:00
Josuah Demangeon
0b2d45595e drivers: video: hotfix: force use of constant value for 'source_dev'
In Clang 16 run with some flags, the compiler does not accept a static
const variables as struct initializer. This caused build errors in only
some contexts. Always use the devicetree macros to access the source
device node as a workaround.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-04-22 15:04:47 +02:00
Simon Gilbert
5c04df9127 i2c: stm32: add DMA callback stubs to avoid nullptr calls in ISR context
Add stub functions for the I2C DMA callbacks, which are invoked
during or upon completion of DMA-based I2C transactions. Without
these, NULL pointer calls occur on DMA transfer complete or error
events, leading to faults within ISR context.

Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
2025-04-22 15:04:11 +02:00
Simon Gilbert
4348be608d i2c: stm32: add missing DMA configuration fields
Add missing fields for DMA tx and rx configuration macros

Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
2025-04-22 15:04:11 +02:00
Fin Maaß
70a787cd18 drivers: mdio: Update shell commands to include device argument
Update shell commands to include device argument

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-22 14:02:51 +02:00
Amneesh Singh
d7bb10d85c drivers: timer: ti_dmtimer: provide timer IRQ for tests
This patch allows ti_dmtimer to provide the symbol z_sys_timer_irq_for_test
whenever tests are enabled. Not providing this results in failing some
kernel test cases which require this symbol.

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
2025-04-22 14:02:44 +02:00
Dylan Hsieh
f3bc550117 driver: adc: add adc driver for rts5912
Add adc driver for Realtek rts5912.

Signed-off-by: Dylan Hsieh <dylan.hsieh@realtek.com>
2025-04-22 14:02:37 +02:00
Titan Chen
2bca8d4e59 drivers: counter: rts5912: add support timer32 counter driver
Port rts5912 timer32 counter driver on Zephyr

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-04-22 14:02:27 +02:00
Tahsin Mutlugun
c1c31e68b5 drivers: i2c_rtio: max32: Inform the rtio executor on errors
Call i2c_rtio_complete with a non-zero status code in case of an error
so that application does not get stuck waiting for the completion queue
event. An example to this situation could be an I2C target device
responding with a NACK to a read or write request by the controller.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-04-22 12:10:12 +02:00
Hao Luo
f28f4120ef drivers: pinctrl: Add sdif configs to ambiq pinctrl driver
Added sdio cd and wp pin configs to ambiq pinctrl driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-22 12:10:01 +02:00
Anders Nielsen
b98bd7c145 drivers: stepper: adi_tmc: Add tmc51xx support
Add tmc51xx support based on tmc50xx implementation.

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-22 12:09:18 +02:00