Commit graph zephyr/drivers
Author SHA1 Message Date
Nam Nguyen
7e3328e262 drivers: mbox: renesas: rcar: mfis: fix format specifier for size_t
Use %zu instead of %u when logging msg->size and RCAR_MFIS_MBOX_SIZE,
both of which are size_t.

Signed-off-by: Nam Nguyen <nam.nguyen.xn@renesas.com>
2026-08-04 14:09:55 +01:00
Alexandre Rey
2fb62f1731 drivers: audio: codec: restore static on aic26_api
The migration from static const struct audio_codec_api to DEVICE_API()
accidentally removed the static qualifier from aic26_api. Restore static
to keep the symbol file-local and match the previous visibility
semantics.

Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
2026-08-04 14:09:42 +01:00
Antoniu Miclaus
85182dc9ae drivers: sensor: adxl367: add INT2 interrupt pin support
The driver so far hardcoded INT1 (INTMAP1_LOWER at 0x2A) for all
interrupt mappings, so a board that routes only INT2 to the host could
never receive trigger or FIFO watermark interrupts. INT1 and INT2 have
bit-for-bit identical event mapping registers (INTMAP2_LOWER at 0x2B).

Select the connected pin from the int1-gpios/int2-gpios devicetree
properties and route the interrupt mappings to the matching register,
following the pattern already used by the adxl345 driver. When only
int1-gpios is present the driver keeps using INT1, so existing device
trees continue to work unchanged.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2026-08-04 06:54:08 -04:00
Ruibin Chang
29d68c0640 drivers/pwm/it51xxx: support HW dimming mode for pwm driver
Support HW dimming mode for pwm driver, our HW dimming mode
only supports pwm channel 0, 1, 7.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2026-08-04 06:53:59 -04:00
Liam Ogletree
6d14af6d4f drivers: haptics: Multi write fixes for CS40L5x
For the power sequence writes, a previous PR accidentally
implemented standard writes instead of raw writes for a
number of register write sequences, which results
in CS40L5x devices never waking from hibernation. Just
need to change the existing writes to raw writes.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-04 06:53:12 -04:00
Andrew Yong
4028fc4c67 drivers: display: hx8353e: make GRAM bounds check rotation-aware
The HX8353E's GRAM is 132x162 (columns x rows). Setting rotation to 90
or 270 sets the MADCTL row/column-exchange (MV) bit, which swaps which
GRAM axis the width/height devicetree properties address. The existing
BUILD_ASSERT never accounts for this, so a panel wired at 90 or 270
degrees with e.g. width = 160, height = 128 (a valid 132x162 GRAM
config once swapped) is incorrectly rejected at compile time.

This mirrors the same fix already running in production on real
MD-UV390 PLUS hardware in a downstream out-of-tree board.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Andrew Yong <me@ndoo.sg>
2026-08-04 06:52:59 -04:00
Sylvio Alves
f4c7092ad6 drivers: sdhc: esp32: use sdmmc ll functions
Replace direct SDMMC register accesses with the equivalent
sdmmc_ll_* low-level helpers from hal_espressif for interrupt
handling, controller and fifo reset, DMA setup, the command
engine, timeout configuration, card data-busy polling and
bus-width selection. The two duplicated local DMA helpers are
dropped in favor of sdmmc_ll_init_dma and sdmmc_ll_stop_dma.
Register accesses with no low-level equivalent (whole-register
interrupt-mask save, restore and set, and the response fifo
read) are left unchanged.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-04 06:52:20 -04:00
Sylvio Alves
6661d46a14 drivers: sdhc: esp32: quiet routine bus configuration logs
Every bus width, clock and timing change logged at info level, so
enumerating a card printed a dozen lines of routine progress on
any build with info logging on. An sdio peripheral on the second
slot doubles that.

Drop those messages to debug level. The error paths are
unchanged, so a failure still reports at its original level.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-04 06:52:20 -04:00
Sylvio Alves
a2a3910f29 drivers: sdhc: esp32: support two slots on one controller
Both slots are served by a single sdmmc controller: one register
block, one command engine, one dma channel and one interrupt
line. The driver kept that state per instance, so enabling a
second slot had the two fight over the shared registers and the
build asserted on more than one slot.

Move the controller-wide state into a shared struct and run the
bring-up once, on whichever slot initialises first. A controller
mutex serialises transactions across slots and records the owner,
so the interrupt handler routes completion events to the right
queue and the per-slot clock divider is reprogrammed through a
clock update command when the bus changes hands. Restore the
saved interrupt mask on every error path in the clock helper,
which previously left the mask blanked and killed the other
slot's interrupts.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-04 06:52:20 -04:00
Sylvio Alves
eebcedc85e drivers: sdhc: esp32: add sdio cmd53 and card interrupt support
The esp32 sdhc driver routed its slot pins directly and had
no path for block-mode CMD53 transfers or for the DAT1 card
interrupt, so an sdio card function could not be driven from
it.

Route the slot pins through the gpio matrix and add CMD53
block and byte transfers plus card interrupt enable and
disable, which an sdio client needs to move frames and to be
woken by the card. The card interrupt is masked in the
handler and re-armed by the consumer, so the enable and
disable helpers avoid sleeping primitives and stay callable
from the callback.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-04 06:52:20 -04:00
Florian Moesch
5b73c5ef2b soc: st: stm32: add USB support for STM32L1 family
Enable the full-speed USB device controller on STM32L1:
- Assert PLL VCO = 96 MHz at build time (USB clock = VCO / 2).
- Skip the runtime 48 MHz clock check; the clock is deterministic.
- Drive the DP pull-up via SYSCFG_PMC USB_PU (no disconnect GPIO).
- Add the usb controller node and a nop USB PHY in devicetree.

Signed-off-by: Florian Moesch <florian.moesch@draeger.com>
2026-08-04 06:51:43 -04:00
Benjamin Cabé
2dd6d12654 drivers: mipi_dbi: spi: Remove unused global variable
The MIPI_DBI_SPI_READ_REQUIRED macro is used directly in
preprocessor conditionals; the leftover file-scope variable named
var is unused and pollutes the global namespace.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-04 06:50:42 -04:00
Benjamin Cabé
121c894bce drivers: serial: uart_sedi: Accumulate error flags in err_check
Each detected error was assigned with '=', so simultaneous conditions
reported only the last one checked. OR the flags together.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-04 06:50:31 -04:00
Grabowski Łukasz
bc6c713d73 drivers: display: uc81xx: add support for uc8253
Add support for uc8253 e-paper display driver. This chip shares most
registers layout with uc8151, hence the extension of the uc81xx driver
to also support the uc82xx without changing the filename.

Tested with Waveshare sku22698 e-paper HAT connected to Nucleo f446re
via SPI.

Signed-off-by: Grabowski Łukasz <lukasz.grabowski@pcosa.com.pl>
2026-08-04 06:50:11 -04:00
Liam Ogletree
5e46314663 drivers: haptics: cirrus: Add monitor support to CS40L26/27
Adds monitor support via haptics_monitor_get()/_set() to
the CS40L26/27 driver.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-04 06:49:56 -04:00
Liam Ogletree
763f54d2dd drivers: haptics: Port haptics API changes to CS40L26/27 driver
Propagates haptics API changes to the CS40L26/27 driver, notably
*_calibrate(), *_select_source(), and *_set_level(). Removes
CS40L26/27-specific API functions that were exposed in the
public header that have now been replaced by the haptics API.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-04 06:49:56 -04:00
Mathieu Choplain
2f54804d96 drivers: regulator: stm32_vrefbuf: implement software-loaded trimming
The VREFBUF output voltage is factory-calibrated by ST. On series such
as STM32H5 or STM32U5, the VREFBUF loads trimming data automatically
when changing voltage scale. However, on series such as STM32WB, the
software is responsible for loading the correct trimming data from OTP.

Implement reading of trimming data from OTP and manual application of
the proper trimming data by software, gated behind a new Kconfig option
for the driver, CONFIG_REGULATOR_STM32_SOFTWARE_TRIM, enabled by default
on series without automatic loading by hardware (these series' DTSI are
updated to provide the `nvmem-cells` property which gates the option).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-08-04 06:49:30 -04:00
Vinit Mehta
727a786ade drivers: bluetooth: Update IR to work without PDN toggle
-Add option to have IR using vendor command without PDN toggle
 to over come resetting of a non BT CPU in case of COEX scenarios

Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
2026-08-04 06:49:03 -04:00
Vladyslav Goncharuk
3132526614 drivers: xen: add domctl unbind pt irq op
Add a Dom0 wrapper for XEN_DOMCTL_unbind_pt_irq.

Use SPI-only argument handling, matching the existing bind_pt_irq wrapper.

Signed-off-by: Vladyslav Goncharuk <vladyslav_goncharuk@epam.com>
2026-08-03 15:07:36 -04:00
Vladyslav Goncharuk
7f8baaec2e drivers: xen: add sysctl trace buffer op
Expose a Dom0 wrapper for XEN_SYSCTL_tbuf_op using the Xen public
headers provided by zephyr-xenlib.

The wrapper follows the existing sysctl helper pattern: validate the
caller-provided request, copy it into xen_sysctl, issue
HYPERVISOR_sysctl(), and copy Xen-updated fields back on success.

Signed-off-by: Vladyslav Goncharuk <vladyslav_goncharuk@epam.com>
2026-08-03 15:07:36 -04:00
Daniel Leung
48fb236912 counter: ace_v1x: fix header include issue
Fix build error on the ace_v1x_{art,rtc} drivers where compiler
cannot find the register header files. Since those header files
reside at the same directory, convert it to local include.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-08-03 15:07:13 -04:00
Fin Maaß
1f3212f789 drivers: ethernet: dwc_mac: 1000: make non-default offsets generic
make the part that is needed for the esp32 to
change the offsets for the mac and base registers
more generic and use the devicetree for it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-08-03 15:06:36 -04:00
Holt Sun
8cd4590d7f drivers: rtc: pcf8523: Fix calibration get sign extension
pcf8523_get_calibration() decodes the offset register with
(offset << 1U) >> 1U, intended to clear the mode bit and sign
extend the signed 7-bit offset field. Under C integer promotion
the expression operates on a 32-bit int, so it is a no-op: the
MODE bit is not cleared and acts as the sign bit of the int8_t
register value instead of the actual field sign at bit 6.

In fast offset mode every readback is decoded through the set MODE
bit, e.g. a stored offset of +9 (register 0x89) reads back as -119
steps. In slow mode, with the offset field now written correctly
masked, a stored offset of -9 (register 0x77) would read back as
+119 steps. Mask the offset field and decode it with
sign_extend().

Built tests/drivers/build_all/rtc (i2c_devices.overlay) for
qemu_cortex_m3 with CONFIG_RTC_CALIBRATION=y. No hardware run;
register-level analysis against the PCF8523 data sheet.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-08-03 15:06:26 -04:00
Holt Sun
e41dcbe532 drivers: rtc: pcf8523: Fix offset register write in calibration set
pcf8523_set_calibration() converts the requested frequency
correction into a period offset and writes it to the offset
register without masking. A positive calibration request becomes a
negative period offset, and bit 7 of its two's complement
representation lands in the MODE bit of the offset register: with
the default slow offset mode, every positive calibration request
silently switches the device into fast mode, where the hardware
applies a 4069 ppb step while the driver computed the value with
the 4340 ppb step (about 6.7% scale error and a different
correction cadence).

Mask the value with the signed 7-bit offset field so the MODE bit
is controlled only by the configured offset mode. The unused
PCF8523_OFFSET_MASK define matches the field exactly.

Built tests/drivers/build_all/rtc (i2c_devices.overlay) for
qemu_cortex_m3 with CONFIG_RTC_CALIBRATION=y. No hardware run;
register-level analysis against the PCF8523 data sheet (offset
register, table 29).

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-08-03 15:06:26 -04:00
Leo Li
7add3c7ea2 drivers: sensor: adi: add ADXL313 accelerometer driver
Add an I2C driver for the Analog Devices ADXL313 3-axis accelerometer
with classic sensor API support for range and ODR configuration.

Use i2c_reg_update_byte_dt for register read-modify-write, reconfigure
range/ODR in standby, and add build_all coverage plus a release-notes
entry.

Signed-off-by: Leo Li <leo.li@rakwireless.com>
2026-08-03 15:06:00 -04:00
Vladislav Pejic
c627cf26d1 drivers: sensor: adxl345: RTIO stream fix
Fix for RTIO streaming. When stream is canceled
with rtio_sqe_cancel before IRQ or when sequence
for getting data from FIFO, data->sqe is set to NULL.
This will result with early exit from some functions.
Because data->fifo_watermark_irq remain set, it was
not possible to start new stream.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2026-08-03 15:05:43 -04:00
Yu He
1bdac9e22d drivers: sensor: bmp581: fix SPI multi-byte writes
The BMP581 SPI protocol requires every data byte in a multi-byte write
to be preceded by its register address. The driver currently submits
one address followed by all data bytes, so the second data byte is
interpreted as another register address.

Build one two-byte RTIO SQE for each register-address/data pair and
chain the SQEs as one transaction to keep CSB asserted. Leave the I2C
and I3C paths unchanged.

Update the SPI emulator to parse address/data pairs independently of
SPI buffer boundaries. This supports the corrected transaction layout
and rejects the previous malformed write sequence.

This allows OSR_CONFIG and ODR_CONFIG to be programmed correctly
during initialization and prevents the data registers from remaining
at their reset values.

Tested by building samples/sensor/pressure_polling for an STM32F407
target.

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Yu He <auhy@mail.scut.edu.cn>
2026-08-03 15:05:34 -04:00
Yu He
0b2a5c505e drivers: sensor: bmp581: fix SPI soft reset sequence
After a soft reset, BMP581 returns to its power-up I2C/I3C mode.
The first SPI transaction selects SPI mode and returns invalid data.

The driver performs the post-reset dummy read only after soft_reset()
returns. However, soft_reset() reads INT_STATUS first, so the status read
is consumed as the SPI activation transaction and initialization fails
with -EFAULT.

Move the dummy read into soft_reset(), after the reset delay and before
reading INT_STATUS. The I2C and I3C paths remain unchanged.

Tested by building samples/sensor/sensor_shell for
arcap/stm32f407xx.

Link: https://github.com/zephyrproject-rtos/zephyr/pull/109240
Link: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp581-ds004.pdf

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Yu He <auhy@mail.scut.edu.cn>
2026-08-03 15:05:34 -04:00
Fin Maaß
aabf691d12 drivers: cmake: remove redunant conditions
these drivers are already conditionally
included/added in drivers/CMakeLists.txt
so we dont' need another if.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-08-03 15:05:27 -04:00
Fin Maaß
49f8197f85 drivers: ethernet: dwc_mac: ptp: add rx timestamp filtering
Only timestamp PTP packets instead of all received packets, when
CONFIG_PTP is enabled.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
5f9a193136 drivers: ethernet: stm32: ptp: use dwc_mac when PTP_CLOCK
the hal based stm32 ethernet driver has no support
for PTP on the stm32f1, f2 and f4, so use the dwc_mac
driver when PTP support is needed.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
684350e4d5 drivers: ethernet: esp32: ptp: use dwc_mac when PTP_CLOCK
the hal based esp32 ethernet driver has no support
for PTP, so use the dwc_mac driver when PTP
support is needed.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
a44f7a766a drivers: ethernet: dwc_mac: ptp: add esp32p4
add support for the esp32p4 for PTP.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
c17d264b71 drivers: ethernet: dwc_mac: qos: add timestamping
Add support for hardware timestamping
for the dwc mac qos core.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
06f0d98de5 drivers: ethernet: dwc_mac: 1000: add timestamping
Add support for hardware timestamping
for the dwc mac 1000 core.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Fin Maaß
5e73cd8ad1 drivers: ethernet: dwc_mac: ptp: add ptp_clock driver
add a ptp clock driver for the dwc mac cores.

Signed-off-by: Fin Maaß <info@finmaass.de>
2026-08-03 15:05:12 -04:00
Sylvio Alves
bf0c26b7bb drivers: clock_control: esp32: add emac ptp clock
Describe the EMAC PTP reference clock as a second clock on the
esp32p4 Ethernet node so it can be enabled and queried through
the clock control driver.

The rate is resolved from the PTP reference clock source, so
Ethernet PTP support does not need to assume a fixed frequency.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-03 15:05:12 -04:00
Benjamin Cabé
ce02f6c10f drivers: sdhc: cdns: Invalidate the whole read buffer
After a read the cache invalidation only covered one block even
for multi-block transfers, leaving the remaining blocks to be read
from stale cache lines. Invalidate the full transfer size, which
matches the range flushed when the DMA descriptors are prepared.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-03 15:04:23 -04:00
Benjamin Cabé
7cd42ac23f drivers: ipm: stm32_ipcc: Fix receive channel disable on processor 1
In the processor 1 macro block, every helper maps to the LL_C1
variant except IPCC_DisableReceiveChannel, which used the LL_C2
function and therefore masked the other core's receive channel.
Disabling reception was a no-op on the local core and corrupted
the remote core's mask instead.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-03 15:03:54 -04:00
Mateusz Karlic
6357e3f184 drivers: gicv3: Fix Affinity Routing init if CONFIG_ARMV*_A_NS is set
This patch fixes the initialization of Affinity Routing if Zephyr is ran
as a Non-secure software. The layout of the Distributor Control register
is different, when accessed from Secure or Non-secure world.

Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
2026-08-03 15:03:12 -04:00
Tiago Medicci
41e242a075 drivers: comparator: Add Espressif ESP32 ana_cmpr driver
Add a driver for Espressif's analog comparator (ana_cmpr) peripheral
against the generic comparator API, for ESP32-P4, ESP32-C5 and
ESP32-H2.

This IP revision only latches edge-cross events; there is no register
reflecting the instantaneous comparison result, so get_output() is not
supported and returns -ENOTSUP. Source and reference GPIO pads are
fixed per SoC/unit and configured as pure analog inputs during init.
Units whose interrupt source is shared with another unit (ESP32-P4) or
another peripheral (ESP32-H2's GPIO driver) use
esp_intr_alloc_intrstatus() with a per-instance status register/mask
so the interrupt controller can dispatch to each handler
independently.

The ISR is the only code that ever touches the hardware status
registers: it clears whatever int_st reports (already masked to the
armed trigger by int_ena) and either invokes the user callback or
latches a software pending flag, which trigger_is_pending() then just
reads and clears.

Hardware-validated on ESP32-C5-DevKitC-1, ESP32-H2-DevKitM and
ESP32-P4-Function-EV-Board via the gpio_loopback comparator test (see
next commits).

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-08-03 15:03:02 -04:00
Tiago Medicci
19143c7d22 drivers: gpio: esp32: esp32h2: share GPIO IRQ line with ana_cmpr
On ESP32-H2, the analog comparator (ana_cmpr) unit shares its
interrupt source (GPIO_INTR_SOURCE) with the GPIO peripheral, but uses
its own separate status/enable/clear registers (GPIO_EXT.*). Register
the GPIO driver's own interrupt via esp_intr_alloc_intrstatus() with
ESP_INTR_FLAG_SHARED, scoped to the GPIO status register/mask, so both
drivers can coexist on the same line independently.

Only takes effect when the new ana_cmpr driver is enabled, so this is
a no-op otherwise.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-08-03 15:03:02 -04:00
Tiago Medicci
8c1998b488 drivers: gpio: esp32: format file with clang-format
This commit just formats drivers/gpio/gpio_esp32.c with the
clang-format tool.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-08-03 15:03:02 -04:00
Janez Ugovsek
bae3b293b2 drivers: rtc: convert RV3028 driver to MFD
Convert the RV3028 driver from an RTC-only driver into a
multi-function device driver.

The RV3028 provides multiple functional blocks including RTC,
EEPROM, RAM and timestamp functionality. Split the existing
driver into an MFD parent and RTC child driver to allow the
additional features to be supported through their respective
Zephyr subsystems.

The existing RTC functionality remains unchanged.

Signed-off-by: Janez Ugovsek <janez@ugovsek.info>
2026-08-03 15:02:33 -04:00
Ryan McClelland
5bfb3a758b drivers: sensor: bmp581: fix timestamps in FIFO stream
Capture the timestamp at GPIO callback time (IRQ time) rather than
in the RTIO completion callback after the data has been read. Add odr
to the encoded header, fix base_timestamp_ns to reflect the time of
the first FIFO sample, and add timestamp_delta per sample, matching
the lsm6dsv16x reference implementation.

Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 8cdcdeb189e63e0fed1cc06b2eb7a74fd9e9ce5d)
2026-08-03 15:02:04 -04:00
Felix Wang
b01b0d61bd drivers: mux: add ADI ADGM3121 MEMS switch backend
Add a MUX controller backend for the Analog Devices ADGM3121 DPDT MEMS
switch (DC-24GHz). The four switches are modeled as a single control line
whose state is a 4-bit switch bitmask (bit i = SW(i+1), 1 = closed):
mux_control_set() drives all four at once, mux_control_disconnect() opens
them all, and mux_state_get() reads the mask back. Both SPI (adi,adgm3121)
and parallel GPIO (adi,adgm3121-gpio) control modes are supported.

Co-authored-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Declan Snyder
47b91bfa64 drivers: mux: add GPIO-based mux driver
Add a generic GPIO-backed mux controller: the selected state value is
binary-encoded LSB-first across the GPIO lines listed in the mux-gpios
property (bit N -> mux-gpios[N]). Useful for board-level analog/digital
muxes that are simply wired to MCU GPIOs.

Single-channel by design, so the binding pins #mux-control-cells = 0
and #mux-state-cells = 1. The driver plugs into the existing mux
subsystem (set / get_state ops) and reuses CONFIG_MUX_INIT_PRIORITY, so
consumers reference it through the generic mux-controls / mux-states
model.

Co-authored-by: Felix Wang <fei.wang_3@nxp.com>
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2026-08-03 15:00:55 -04:00
Felix Wang
1a021e9d1d drivers: pwm: mcux_sctimer: migrate inputmux capture to mux subsystem
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells). The SCTimer PWM
capture path still programmed the INPUTMUX directly through the
fsl_inputmux HAL using two parallel "input-channels" /
"inputmux-connections" arrays, so on SoCs that expose the mux
controller node the two models conflicted. Move SCTimer capture onto
the generic mux model:

- nxp,lpc55S3x: add the INPUTMUX mux controller node (disabled by
  default) so capture consumers can reference it; enabled per board.
- nxp,sctimer-pwm.yaml: drop the input-channels / inputmux-connections
  arrays and include mux-consumer.yaml; the capture routing is now a
  single "mux-states" phandle-array carrying <&inputmuxN index
  connection>.
- pwm_mcux_sctimer: drop the direct fsl_inputmux HAL calls and apply
  the routing through mux_state_apply(), guarded by device_is_ready().
  The mux controllers init at priority 40, before PWM at 50, so they
  are ready at SCTimer init time.
- Migrate the lpcxpresso55s36 pwm_loopback overlay to the mux-states
  syntax and enable the INPUTMUX node.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Felix Wang
cae5334d28 drivers: sensor: nxp: eqdc_mcux: migrate to mux subsystem
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells), which collided with
the EQDC driver's use of the same compatible through a
"specifier-space: inputmux" phandle-array. Reconcile the two by moving
the EQDC PHASEA/PHASEB input routing onto the generic mux model:

- nxp,mcxa156 / nxp,mcxa344 / nxp,mcxaxx6: switch the inputmux node
  from #inputmux-cells to #mux-control-cells / #mux-state-cells so it
  validates against the new binding (nxp,mcxa153 was already done).
- nxp,mcux-eqdc.yaml: drop the local inputmux-connections property and
  include mux-consumer.yaml; routing is now described with "mux-states".
- eqdc_mcux: drop the direct fsl_inputmux HAL calls and apply the
  routing through mux_state_apply(), guarded by device_is_ready(). The
  mux controllers init at priority 40, before the sensor at 90, so they
  are ready at EQDC init time.
- Migrate the frdm_mcxa153/156/266/344/346/366 QDEC sample overlays to
  the mux-states syntax.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00
Felix Wang
9c829759e2 drivers: pwm: mcux_ctimer: migrate inputmux capture to mux subsystem
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells), which collided with
the previous ctimer PWM-capture use of the same compatible through a
"specifier-space: inputmux" phandle-array. Reconcile the two by moving
ctimer PWM capture onto the generic mux model:

- nxp,mcxa153: switch the inputmux node from #inputmux-cells to
  #mux-control-cells / #mux-state-cells.
- nxp,ctimer-pwm.yaml: drop the local inputmux-connections property and
  include mux-consumer.yaml; routing is now described with "mux-states".
- pwm_mcux_ctimer: drop the direct fsl_inputmux HAL calls and apply the
  routing through mux_state_apply() guarded by device_is_ready(). The
  route is applied when capture is configured, where all devices are
  ready. Update the test overlay to the mux-states syntax.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-08-03 15:00:55 -04:00