Commit graph zephyr/drivers
Author SHA1 Message Date
Richard Mc Sweeney
e7410bd520 drivers: clock_control: infineon: add psc3m6 support
Extend the fixed-clock driver for PSC3M6. Map the 250M DPLL LP0/LP1
paths under SOC_SERIES_PSC3, guard the WCO startup error path
against PSOC4.

Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Signed-off-by: Niranjan M <niranjan@aerlync.com>
2026-09-12 07:53:00 -04:00
Johann Fischer
d63d26a5a9 drivers: udc_dwc2: add vendor quirk for xmc4xxx SoC family
Add DWC2 vendor quirk for xmc4xxx SoC family.

The driver does not seem to support DMA mode on the older core versions.
The symptoms are: stalled setup transfers, no responses to IN tokens on
control or other IN endpoints.
Disable internal DMA mode by default for XMC4XXX SoC series.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-09-12 07:52:51 -04:00
Brian Cain
91adc6ebdf hexagon: add timer functionality
Add the tickless Hexagon system timer driver on top of the generic
tickless core (system_timer_generic.h). The H2 hypervisor exposes a
free-running 64-bit nanosecond counter via vmtimerop(hvmt_gettime) and
an absolute-deadline timeout via vmtimerop(hvmt_settimeout); the driver
supplies only these cycle-domain primitives and lets the generic core
own all tick accounting.

hvmt_settimeout matches on equality only: a deadline at or before the
current time is mapped by the hypervisor to BIGBANG, which disables
the timer rather than firing it immediately. This classifies Hexagon
as a TIMER_CORE_BACKEND_COMPARE_EXACT backend, whose core-side verify
loop re-arms a deadline the counter has already passed, removing the
need for a driver-side minimum-delay fallback.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-09-12 07:52:39 -04:00
Iustin Stolniceanu
f7a0baa2d9 drivers: ethernet: xlnx_gem: fix pointer/integer casts on 64-bit
The GEM driver cast pointers to and from uint32_t in several places,
which truncates on 64-bit targets such as the ZynqMP Cortex-A53 and
warns with -Wpointer-to-int-cast / -Wint-to-pointer-cast there.

Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
2026-09-11 17:33:16 +02:00
Shontal Biton
da21277b1a drivers: counter: stm32: Add trigger output configuration
- Add required defines for configuration options
- Implement configuration of master mode during device init

Signed-off-by: Shontal Biton <shontal1005@gmail.com>
2026-09-11 17:31:40 +02:00
Fin Maaß
3346038654 drivers: ethernet: stm32: ptp: use dwc_mac when PTP_CLOCK on the stm32mp13
The HAL based stm32 ethernet driver has no support for PTP on the
stm32mp13, so use the dwc_mac driver when PTP support is needed,
like on the stm32f1, f2 and f4.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-11 17:29:40 +02:00
Fin Maaß
8058cf84a4 drivers: ethernet: dwc_mac: stm32: add STM32MP13 support
The STM32MP13 has two instances of the MAC, so rework the glue to
define a device per enabled devicetree instance, with the pins,
clocks, descriptor rings, MAC address configuration and interrupt in
a per-instance configuration wrapped around the core's one.

The PHY interface of each MAC is selected in SYSCFG_PMCSETR, which is
a set-only register with SYSCFG_PMCCLRR as its clear-only counterpart.
Both are written directly, as the PMCCLRR bits read back as the current
configuration and the read-modify-write the LL helpers do on it would
clear the bits of the other MAC. Which set of bits a MAC uses is
derived from its register address rather than its devicetree instance
number, so a board enabling only the second MAC keeps working. MII,
RMII and RGMII are supported, with st,ext-phyclk selecting the MAC
kernel clock as the RMII reference or RGMII 125 MHz clock.

The descriptor rings go into the nocache section like on the other
series, which the MMU maps strongly ordered, with the physical
addresses the core expects on MMU platforms filled in.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-11 17:29:40 +02:00
Fin Maaß
f8e2525ede drivers: clock_control: stm32mp13: report the ethernet domain clock rates
Report the rates of the ethernet kernel clocks and PTP clocks, which
all live in ETH12CKSELR, so the PTP clock drivers can derive the
timestamp increment from the actual rate. A PLL that is not ready
gives an error rather than a zero rate.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-11 17:29:40 +02:00
Fin Maaß
c757e69c19 drivers: clock_control: stm32mp13: report the ethernet clock rates
The ETHxMAC gates run on hclk6, the ETHxCK gates on the ETHx kernel
clock. The DWC MAC MDIO driver needs the former to derive the CSR
clock divider from.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-11 17:29:40 +02:00
Fin Maaß
0c8496427f drivers: ethernet: dwc_mac: stm32: qos: put descriptors in noinit
the descriptors are later memset to 0, so we don't need
them to be init with 0.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-11 17:29:40 +02:00
Richard Mc Sweeney
1b7b7ebdd5 drivers: hwinfo: Add Infineon psc3
Added support for PSC3 devices

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
2026-09-11 17:28:01 +02:00
Fabio Baltieri
04beb2b7c8 drivers: i2c: target: add auto-register support to regset library
Add an auto-register boolean devicetree property to the regset target
library binding and call regset_target_lib_register() during
regset_target_lib_init() when enabled. This allows I2C target devices to
be automatically registered on the bus at init time without requiring
manual registration.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
2026-09-11 17:27:42 +02:00
Anas Nashif
9e65f6b48b drivers: counter: xlnx_ttc: use portable IRQ pending API
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.

This driver called arm_gic_irq_set_pending() directly; the portable
API removes the GIC-specific dependency.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-09-11 17:26:02 +02:00
Mathieu Choplain
a417cb333b drivers: ethernet: dsa: use autogenerated compatible variable
Thanks to the bindings reorganization, a variable is now generated
properly for `zephyr,dsa-port`: use it!

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-11 17:25:05 +02:00
Benjamin Cabé
fd33d5384d drivers: sensor: als31300: scale magnetic data by datasheet sensitivity
als31300_convert_to_gauss() built a scale factor by dividing the 500 G
from the part number by the 4096 codes of the 12-bit ADC. Both halves of
that are wrong.

The raw reading is a sign-extended 12-bit quantity, so it spans 2048
codes either side of zero, not 4096. That alone made every
sensor_channel_get() magnetometer reading half the actual field.

More fundamentally, the datasheet does not define the scale as a ratio
of range to code span. It gives sensitivity directly -- 4 LSB/G typical
for the ALS31300-500 -- and states the conversion as

    gauss = raw / sensitivity

with a worked example of -1018 LSB / 4 LSB/G = -254 G. The 500 G in the
part number is the "Optimized Sensing Range" (BIN), not the endpoint of
the code range: at 4 LSB/G the 2048 codes actually reach 512 G. Deriving
the scale from 500/2048 therefore implies 4.096 LSB/G, leaving a
systematic 2.3% error in a part whose own sensitivity error spec is
2.5% (3 sigma) on X/Y.

Use the specified sensitivity instead. Raw -1018 now converts to
-254.5 G, reproducing the datasheet example, and raw 2000 lands exactly
on the 500 G range endpoint. Document while here that the driver only
supports the -500 variant, since the -1000, -2000 and -JOY parts are
trimmed to different sensitivities.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:claude-opus-5
2026-09-11 17:24:41 +02:00
Benjamin Cabé
fdd6b088f9 drivers: sensor: als31300: fix Q31 encoding shift in decoder
The RTIO decoder encoded readings as (value << shift), but Zephyr's Q31
sensor convention is real = q31 * 2^shift / 2^31, so an encoder has to
scale by 2^(31 - shift) to agree with the shift it publishes in the
decoded data header.

The driver advertises a shift of 16 for both magnetic field and
temperature, so every reading came out of the decoder at twice its true
value. Encode with (31 - shift) instead, matching what e.g. the BME280
decoder already does.

On the magnetometer path this was masked until now: the scale factor in
als31300_convert_to_gauss() was low by the same factor of two, so the
two errors cancelled and only the streaming temperature channel was
visibly wrong. The next commit fixes the scale factor.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:claude-opus-5
2026-09-11 17:24:41 +02:00
Rupert Englbrecht
e9b030e998 drivers: clock_control: stm32mp2: Add spi8 clock
Add SPI8 clock rate reading to the STM32MP2 clock driver.

Signed-off-by: Rupert Englbrecht <renglbrecht@dh-electronics.com>
2026-09-11 17:22:16 +02:00
Li Wan
1f2a81619d drivers: pcie: msi: map MSI-X table as non-cacheable
MSI-X table is device memory. Map it with K_MEM_CACHE_NONE so
vector and control register writes are not cached on architectures
that require uncached MMIO for MSI-X programming.

Signed-off-by: Li Wan <wanli@kylinos.cn>
2026-09-11 17:22:01 +02:00
Nicolas Pitre
742f7c3d22 drivers: timer: riscv_machine: use the generic timer core
Convert the RISC-V machine timer to system_timer_generic.h. The mtime
counter with its absolute mtimecmp compare is a COMPARE_ORDERED backend:
the driver keeps only timer_driver_cycle_get() (mtime) and
timer_driver_set_compare() (set_mtimecmp), and the core takes over the
cycle-to-tick accounting, the deadline math, the range clamp and the
announce. smp_timer_init() primes the per-hart comparator through
timer_core_smp_prime() rather than reaching into the core's baseline.

The public cycle counter applies the DT clock divider to raw mtime, so
the driver keeps its own sys_clock_cycle_get_32/64() and says so with
TIMER_CORE_HAVE_CYCLE_GET_32/64.

Tested with timer_api and context on qemu_riscv64.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-09-11 17:21:47 +02:00
Nicolas Pitre
cfd647a1d5 drivers: timer: riscv_machine_timer: disarm the compare in the ISR
MTIP is level sensitive: it stays asserted for as long as mtime is past
mtimecmp, and writing mtimecmp is the only way to clear it. The ISR never
did, relying instead on sys_clock_set_timeout() being called after the
announce to move the compare forward.

That holds only as long as something does call it. On SMP with a per-hart
mtimecmp, every hart takes the interrupt when a shared deadline expires,
but sys_clock_announce_locked() returns early on all but one of them, so
only the announcing hart gets its compare rewritten. The others return
from the ISR with the compare still in the past and take the interrupt
again immediately, once per hart until each has had a turn as announcer.

It is not specific to SMP either. Nothing guarantees the kernel arms
another deadline: with no timeout pending it may legitimately choose not
to, and a driver has no business depending on that to stop its own
interrupt.

Push the compare out of reach on entry instead, so the interrupt fires
once for the deadline it was armed with. The arming path overwrites it
with the real deadline in the normal case.

Fixes: #115442
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-09-11 17:21:47 +02:00
Henrik Maier
9a8289c986 drivers: ethernet: eth_renesas_ra: drain RX ring fully per interrupt
ETHER_EVENT_RX_COMPLETE is driven by the EDMAC's FR (Frame Received)
bit in EESR, a level/sticky status bit meaning "at least one frame
arrived", not a count. If several frames complete reception between
two interrupt services, the ISR still only gives rx_sem one credit.
The RX thread drained exactly one frame per credit, so under bursty
traffic completed-but-undrained frames piled up in the 8-entry RX
descriptor ring until it filled, causing the EDMAC to genuinely drop
incoming frames.

Drain the RX ring in a loop per wakeup instead of assuming one credit
equals one frame; the loop is inherently bounded by the ring size.

Also fix a related bug this exposed: renesas_ra_eth_rx() fell through
to call R_ETHER_RxBufferUpdate() with an uninitialized buffer pointer
whenever R_ETHER_Read() legitimately reported no data available; it
now returns NULL immediately in that case.

Signed-off-by: Henrik Maier <hwmaier@gmail.com>
2026-09-11 17:21:26 +02:00
Henrik Maier
c89163264c drivers: ethernet: eth_renesas_ra: wait for free TX buffer, don't drop
renesas_ra_eth_tx() used k_sem_take(&ctx->tx_sem, K_NO_WAIT), so once
the TX descriptor ring filled up under sustained bulk traffic, every
subsequent send() returned -ENOBUFS immediately. Zephyr's net_if_tx()
only logs a rate-limited warning on a negative send() status and
drops the packet, with no retry or backoff. TCP was left to detect
and recover the loss itself via duplicate-ACK fast retransmit or,
when a burst overran the ring by more than one frame, a full RTO
timeout - both cap achievable throughput well below link rate.

Use K_MSEC(ETHER_TX_TIMEOUT_MS), a pre-existing but previously-unused
timeout constant, so the driver blocks briefly for a descriptor to
free up instead of dropping immediately. This gives real backpressure
so TCP's sending rate gets throttled to the actual link drain rate.

Signed-off-by: Henrik Maier <hwmaier@gmail.com>
2026-09-11 17:21:26 +02:00
Henrik Maier
46a1829bc7 drivers: ethernet: eth_renesas_ra: fix duplicate R_ETHER_Write() call
renesas_ra_eth_tx() called R_ETHER_Write() twice for every packet:
once unconditionally, and again after taking the TX semaphore. The
first call bypassed the semaphore gate entirely, transmitting from
the buffer before the descriptor slot was actually reserved. Move
the semaphore take before the single R_ETHER_Write() call.

Signed-off-by: Henrik Maier <hwmaier@gmail.com>
2026-09-11 17:21:26 +02:00
Arbab Haider
4d633161a0 drivers: fpga: agilex: fix NULL deref and leak in mailbox path
Fix two error-path bugs in the Agilex FPGA bridge driver:

1. smc_callback() used the result of k_malloc() without checking it.
   On heap exhaustion the copy loop dereferences a NULL pointer, and
   fpga_config_ready_check() would pass the NULL response buffer to
   fpga_reconfig_status_validate(). Return -ENOMEM instead, after
   releasing the semaphore so the waiting caller does not block
   forever.

2. smc_send() leaked the command and response buffers when
   sip_svc_send() failed. Free them before returning -EBUSY.

Signed-off-by: Arbab Haider <arbabhaider649@gmail.com>
2026-09-11 17:21:13 +02:00
Alexpandi Muniyandi
7d13ace190 drivers: serial: Adapt UART PDL driver for CYT4DN
Update the existing UART PDL driver to work with the CYT4DN SoC in
the TRAVEO family. This adds CYT4DN-specific clock, interrupt, and
DMA handling using the INFINEON_TRAVEO_FAMILY Kconfig option.

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-09-11 17:19:46 +02:00
Alexpandi Muniyandi
ee6a67fdd3 drivers: pinctrl: infineon: Extend GPIO port support
Extend the gpio_ports[] table from prt21 up to prt30 for the wider
port range on newer CAT1C SoCs, and generate it with LISTIFY()
instead of a copy-pasted GPIO_PORT_OR_NULL() list. Absent ports
still resolve to NULL, so behaviour is unchanged.

Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
2026-09-11 17:19:46 +02:00
Sanjay Vallimanalan
a32a0ad61a drivers: interrupt_controller: add Infineon CAT1 intc driver
Add interrupt controller driver for the Infineon CAT1 CPUSS system
interrupt multiplexer found on TRAVEO T2G series SoCs. The driver
implements the MULTI_LEVEL_INTERRUPTS interface, mapping
system interrupts to NvicMux lines.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
2026-09-11 17:19:46 +02:00
Karthikeyan Krishnasamy
b5ad65b7a2 drivers: clock_control: add infineon peripheral clock driver
added support for infineon peripheral clock group driver where
driver is enabled for peripheral group instead of peripheral
dividers. so this makes easy to control the clock configuration
and driver also supports to method to define the peripheral clock
divider settings:
 - use clock-div dts property for define divider value for static
frequency meaning it is not changing at runtime. divider value is
set at peripheral clock driver init time.
 - second method is runtime clock frequency setting for that absence
of clock-div property in the respective peripheral divider is fall
into this method

Peripheral will define clock property with peripheral divider node
along with the peripheral clk/peripheral mux id.

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2026-09-11 17:19:46 +02:00
Karthikeyan Krishnasamy
0263e89f8d drivers: clock: add clock driver support for traveo
added clock driver support for Infineon Traveo series MCU
this driver handles oscillators, pll configuration and
high frequency clocks.

Traveo series MCU has 3-cores,1 Cortex-M0P and 2 Cortex-M7/M4.
Cortex-M0P is main CPU which is going to set clock for M7/M4
cpus, enable M7/M4 cpus. So driver is designed that the clock
configuration part is handled by Cortex-M0P, only other cpus
are just consumer of the configured clock. Currently this driver
supports ECO oscillator configuration, other oscillators will be
supported in future.

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2026-09-11 17:19:46 +02:00
Flavio Ceolin
ce2ec9b3a3 drivers: eeprom: simulator: reject out-of-range offsets
eeprom_range_is_valid() tested only (offset + len) <= size. off_t is
signed and len unsigned, so a negative offset with a compensating len
wrapped the sum into range while the subsequent memcpy() addressed
memory before mock_eeprom, letting an unprivileged thread read or write
kernel SRAM. Reject negative offsets and bound-check without overflow.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-09-11 05:25:24 -04:00
Yangbo Lu
eeba198baa drivers: pcie: fix bar counter not advancing past 64-bit BARs
When enumerating BARs, a 64-bit BAR occupies two consecutive BAR
register slots (low 32-bit in slot N, high 32-bit in slot N+1).
The loop increments `reg` to skip the high-word slot, but it did
not increment `bar` accordingly. As a result, the loop consumed
two register slots while only counting one BAR, causing subsequent
iterations to read the wrong register (e.g. BAR2 was treated as a
second independent BAR on a Type 1 bridge that only has two slots).
This produced an incorrect size value and a spurious
"Failed memory allocation" error for the phantom BAR..

Fix it by incrementing `bar` alongside `reg` in both early-continue
and normal-exit paths when a 64-bit BAR is detected.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-09-11 05:25:19 -04:00
Felix Wang
bad91e4679 drivers: pwm: nxp_flexio: fix high-frequency output during init
Init left each channel's timer in dual 8-bit PWM mode with
timerCompare = 0, always enabled and its output routed to the pin.
Since a FlexIO timer has no start bit, the pin free-ran at
flexio_clk / prescaler / 2 until the first pwm_set_cycles().

Park it disabled with output zero so the pin stays driven low;
pwm_set_cycles() reprograms it anyway.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-09-11 05:25:14 -04:00
Krzysztof Chruściński
3a9e2cfd7f drivers: console: uart: if disabled, avoid pm_device_runtime_put_async
Use pm_device_runtime_put if CONFIG_PM_DEVICE_RUNTIME_ASYNC=n.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-09-11 05:25:09 -04:00
Benjamin Cabé
3c13bfd3d3 drivers: serial: check the u16 driver ops in syscall verifiers
The verifiers for uart_poll_out_u16(), uart_tx_u16() and
uart_rx_enable_u16() checked for the 8-bit driver op rather than the
16-bit one the implementation calls, so the check passed for drivers
that provide only the 8-bit op.

Check the matching _u16 op instead. Those ops only exist under
CONFIG_UART_WIDE_DATA, so uart_poll_out_u16() falls back to a plain
object check when it is disabled. uart_poll_in_u16() uses the object
check unconditionally because its implementation already tests the op
for NULL.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-09-11 05:24:19 -04:00
Venkatesh Odela
e855508a18 drivers: ethernet: xilinx_axienet: fix TX DMA fragment count
The networking stack splits TCP transmit packets into separate
net_buf fragments for protocol headers and payload.
no memcopy TX in xilinx_axienet requires one DMA SG entry per fragment,
so the maximum fragment count must reflect how the stack actually
builds packets.

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-09-11 05:24:14 -04:00
Tahsin Mutlugun
6c533deca8 drivers: timer: max32_wut: Remove 32kHz clock source selection
Clock source selection for the 32 kHz clock is now handled by the clock
control driver. Remove the redundant clock source configuration from the
WUT timer driver and rely on the clock control subsystem to provide the
selected source.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-09-11 05:24:06 -04:00
Tahsin Mutlugun
f6aa8bebfb drivers: counter: max32_wut: Remove 32 kHz clock source selection
Clock source selection for the 32 kHz clock is now handled by the clock
control driver. Remove the redundant clock source configuration from the
WUT driver and rely on the clock control subsystem to provide the
selected source.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-09-11 05:24:06 -04:00
Tahsin Mutlugun
a51ddee16b drivers: counter: max32_rtc: Remove 32 kHz clock source selection
Clock source selection for the 32 kHz clock is now handled by the clock
control driver. Remove the redundant clock source configuration from the
RTC driver and rely on the clock control subsystem to provide the
selected source.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-09-11 05:24:06 -04:00
Tahsin Mutlugun
87d49949a0 drivers: clock_control: max32: Handle 32 kHz clock source selection
Move 32 kHz clock source selection into the clock control driver.

This centralizes clock configuration management and allows peripherals
such as the RTC to rely on the clock control subsystem for 32 kHz
clock source configuration.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-09-11 05:24:06 -04:00
Andrej Butok
9658e7bfa2 hwinfo: nxp: src_rev2: make WDOG4 reset flag optional
- Fixes building of NXP SRC rev2 hwinfo driver for frdm-imxrt1152.
- The NXP SRC rev2 hwinfo driver unconditionally referenced
  SRC_SRSR_WDOG4_RST_B_M7_MASK. But not every RT11xx SoC exposes
  a fourth watchdog.
- Guards the WDOG4 reset bit.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-09-11 05:24:01 -04:00
Linus Ruettimann
2782312dfa drivers: serial: esp32: source ESP32-C6 UART clock from XTAL
On the C6, UART_SCLK_DEFAULT is PLL_F80M, and programming the UART
clock mux/divider while the PLL is still settling after a cold boot
intermittently latches a wrong effective clock: the port then corrupts
essentially every frame (CRC failures at the frame rate, occasional
merged frames when a delimiter byte is hit) for the entire session.
Warm resets never reproduce it - the PLL is already settled - and
re-running uart_configure() with identical values once the clock tree
is stable heals the port instantly, which pins the fault to the latch,
not the programmed values. Observed on ~50% of cold boots on affected
hardware; bench-validated 2026-08-26.

Source the UART from the always-stable XTAL instead, following the
same reasoning as the existing P4 handling (keep a settle-independent
source) and IDF practice under DFS. The fractional divider keeps
standard rates within ~0.02% from the 40 MHz XTAL.

Signed-off-by: Linus Ruettimann <linus@noxblanc.com>
2026-09-11 05:23:57 -04:00
Janez Ugovsek
cd70546bc1 drivers: counter: add RV3028 counter support
Add a counter child driver for the Micro Crystal RV-3028 RTC.

The driver provides access to the RV-3028 counter functionality through
the Zephyr counter API and uses the RV3028 MFD parent driver for
register access.

Signed-off-by: Janez Ugovsek <janez@ugovsek.info>
2026-09-11 05:23:39 -04:00
Marvin Gnad
03fa5a117e drivers: gpio: mcux_igpio: do not read-modify-write the W1C ISR
pin_interrupt_configure() cleared the configured pin's stale edge with
WRITE_BIT(base->ISR, pin, 1), which expands to base->ISR |= BIT(pin).

ISR is write-1-to-clear, so that read returns every latched flag on the
port and writing the value back clears them all, discarding the pending
interrupts of every other pin on the same port.

Clear the single flag with a plain write.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Marvin Gnad <marvin.gnad@gmail.com>
2026-09-11 05:23:35 -04:00
Daniel Leung
c21850fdd6 arch: change arch_mem_unmap() to return an error code
Mirror the arch_mem_map() change and give arch_mem_unmap() the same
treatment: change the prototype to return int instead of void, so
architecture code has a consistent way to report unmapping failures.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-09-11 05:23:20 -04:00
Daniel Leung
aec25bce22 arch: change arch_mem_map() to return an error code
Previously arch_mem_map() was a void function, so architecture
code had no consistent way to report mapping failures to callers
other than panicking or asserting. Change arch_mem_map() to
return int.

Note that this mostly maintains the k_panic() calls unless
the error is easy to handle (like invalid arguments). Each
architecture will need to be amended in the future to properly
handle the error conditions. Also some of the users are
converted to do k_panic() after failure. This is to keep
the signature change commit easier to review.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-09-11 05:23:20 -04:00
Dharun krithik k
7af8243d2f drivers: flash: generalize Infineon PDL flash driver for PSoC4 and PSC3
Rename CONFIG_FLASH_INFINEON_PSOC4 to CONFIG_FLASH_INFINEON_PDL to
support both PSoC4 and PSC3 families. Replace SoC-series ifdefs with
devicetree properties (infineon,explicit-erase, infineon,
cache-invalidate, erase-value) to describe hardware capabilities.

Add explicit erase support for PSC3, per-instance mutex for thread safety,
and cache invalidation after flash operations. Update Kconfig to select
appropriate erase flags. PSoC4 hardware auto-erases on write, while PSC3
requires explicit erase.

Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
2026-09-11 05:22:57 -04:00
Aman Lachhiramka
eb025d2e19 drivers: pinctrl: mspm0: convert to native register writes
The MSPM0 pinctrl driver called DL_GPIO_initPeripheralFunction() and
DL_GPIO_initPeripheralAnalogFunction() from TI DriverLib to configure
IOMUX PINCM registers. These are single-register writes that can be
expressed directly using sys_write32(), removing the dependency on the
vendor HAL.

The IOMUX base address is obtained from the pinctrl node reg property
via DT_INST_REG_ADDR(0), which now returns the correct hardware address
after the DTS reorganization.

The pinctrl_soc_pin_t iomux field already encodes configuration bits at
positions that match the PINCM hardware register layout, so values can
be written directly without translation.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
2026-09-11 05:22:53 -04:00
Paulo Santos
06fb039f44 modem: cellular: handle a PPP drop while awaiting registration
MODEM_CELLULAR_EVENT_PPP_DEAD had no case in the await registered state,
so it was discarded. A vendor with no network script enters that state
after a successful dial, with PPP attached and the carrier on, so a drop
reported there as an LCP phase change went unnoticed: the driver settled
into the registered state and stayed there, never re-dialling, because
the periodic script keeps passing on a module that is itself healthy.
Entering that state also clears the dormant flag, taking the interface
operationally up over a dead PDN.

An in-band NO CARRIER is not addressed here, as it raises no event in
this state. The interface stays dormant until the registered state
clears it, so the net_if_carrier_off modem_ppp performs takes it from
dormant to down, which notifies nothing and leaves the PPP L2 phase
unchanged.

Handle the event as the registered state already does, entering await
ppp dead so its existing timeout re-dials.

Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
2026-09-10 19:18:27 +02:00
Jordan Yates
de6e451e88 modem: cellular: normalise modem info string handling
Ensuse that the output string from `modem_cellular_get_modem_info` is
always `NUL` terminated.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 19:16:53 +02:00
Jordan Yates
77689f9563 modem: cellular: nrf93m1: fix IMEI and SN queries
The modem cellular driver was sending `AT+CGSN` expecting an IMEI to be
returned, but `AT+CGSN` returns the serial number, not the IMEI, which
are not the same as each other for the nRF93M1.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 19:16:53 +02:00