Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
The driver is based on the linux driver for the same family of devices.
It has the same limitations:
Y1 is always connected to the input clock,
Y2/Y3 is always connected to PLL1 (Y4/Y5-PLL2, Y6/Y7-PLL3, Y8/Y9-PLL4)
In addition it assigns ownership to the first output that requests a PLL.
The vco frequency calculation of the PLL prefers the owner, trying to
provide the best possible result for it. If a second output frequency is
requested a vco frequency based on the least common multiple is calculated
and used, if the "perfect" result for the owner can be achieved. If not,
the second output can only use its divider to get the best possible
approximation of its requested rate. Ownership is transferred if the
current owner request a output rate of 0.
The output frequencies can be configured via device tree and changed
during runtime.
A sample has been added to control the driver via a shell.
Assisted-by: Claude:claude-sonnet-5 coccinelle
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
The AD559x needs up to 250 us to recover after a reset, per the
datasheet, before it will accept new data on the bus. The driver
previously issued the software reset immediately after de-asserting
reset-gpios, without waiting for this recovery time.
Add a reset-recovery-time-us devicetree property (default 250 us) and
busy-wait for it in mfd_ad559x_init(), after de-asserting reset-gpios
and before the software reset. The delay is only applied when
reset-gpios is present. Boards whose reset line needs extra settling
time can increase the property to match their hardware.
Tested on an STM32 Nucleo-H563ZI paired with a MikroElektronika ADAC
Click board (AD5593R). The click board's RESET pull-up was replaced
with a pull-down so RESET is guaranteed low until the MCU drives it
high, matching what the driver assumes.
A Saleae logic analyzer captured RESET and I2C activity at startup
to measure the delay between RESET going high and the first I2C
transaction. A test application swept reset-recovery-time-us across
several values: with the delay set to 0, the software reset write in
mfd_ad559x_init() failed and device_is_ready() returned false,
logging "AD559x device is not ready". With the datasheet's 250 us
default restored, init and the following I2C traffic succeeded
reliably. The reset-recovery delay is applied in mfd_ad559x_init()
before the bus-specific init, so this exercises the same code path
used by the SPI variant.
Signed-off-by: Esben Dueholm Nørgaard <esbendn@tutanota.com>
Assisted-by: Claude:claude-opus-4.8
On newer STM32 families (STM32U5, STM32H5, STM32N6, STM32MP1, STM32MP2,
STM32L5, STM32G4), the Flexible Memory Controller (FMC) features a
2-bit DATAHLD[1:0] field in FMC_BTRx and FMC_BWTRx registers to
configure data-hold cycles for asynchronous read and write accesses.
Currently, memc_stm32_nor_psram.c skips initializing .DataHoldTime in
both normal and extended timing configurations, forcing the field to
0 cycles and causing timing violations on external devices requiring
non-zero data hold duration (such as parallel display controllers).
Older FMC v1 controllers (STM32F4, STM32F7, STM32H7) lack DATAHLD
bits entirely and their HAL timing structs omit the DataHoldTime
member.
Add optional Devicetree properties st,data-hold-cycles and
st,data-hold-cycles-ext to st,stm32-fmc-nor-psram binding without a
YAML default to prevent generating existence flags on unsupported
targets.
In memc_stm32_nor_psram.c, conditionally populate DataHoldTime when
FMC_BTRx_DATAHLD_Pos or FMC_BTR1_DATAHLD_Pos is defined, and add
compile-time assertions to prevent misconfiguration on legacy SoCs.
Fixes#118296
Signed-off-by: Priyanshu Singh <singhpriyanshu9838@gmail.com>
the defined clock configuration works out of
the box only if HSE works at 24 MHz.
Different HSE configurations need adjustments
in the configuration to make the USB HS
working correctly
Signed-off-by: Daniele Aimo <d.aimo@arduino.cc>
Add devicetree sources, Kconfig, CMakeLists, and early-init source
for the Infineon PSOC4000T SoC series (CY8C4046LQI-T452), an
Arm Cortex-M0+ MCU with 64 KB flash and 8 KB SRAM.
Signed-off-by: Yurii Lozynskyi <Yurii.Lozynskyi-EE@infineon.com>
Update the row-gpios property description in gpio-kbd-matrix.yaml to
document that up to 16 row GPIOs are supported when
CONFIG_INPUT_KBD_MATRIX_16_BIT_ROW is enabled, rather than only 8.
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add the rtc0 node to the PSC3M6 SoC secure devicetree to support
RTC driver enablement on the platform.
Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
RP2350 PIO addresses a 32-pin window selected by GPIOBASE, which the
driver never writes, so PIO is limited to GP0-GP31. Add a gpio-base
property so a board can select the upper window and reach GP32-GP47 on
packages that have those pins.
GPIOBASE must be set before a program is loaded, so it is applied in
this driver's init.
Tested on an RP2350B with pio1 at gpio-base 16 driving a PIO UART on
GP37/GP39.
Assisted-by: Claude:claude-opus-5
Signed-off-by: John Goble <john.goble@nimbusdigital.com>
The SDO pin (previously known as MOSI) of the STM32 SPI controller is
floating when the SPI is idle. As we use a pull-up on that pin (it is
used as a multi-function pin), this causes an idle-high voltage
on the SDO pin. We use the SDO pin for control of WS2812 LEDs, and they
require an idle-low voltage.
Add a devicetree setting 'st,gpio-control' so the SPI controller keeps
control of the SDO pin also between transmissions.
This enables the AFCNTR bit in the STM32 SPI controller, via the
LL_SPI_EnableGPIOControl() HAL function.
The functionality is available for SPI in STM32H7, STM32H5, STM32C5
and some other series: all that rely on "st,stm32h7-spi"
DT compatible ID.
Tested on STM32H562.
Signed-off-by: Jonas Berg <jonas.berg@voiapp.io>
edtlib binds a node with the first compatible that has a binding, so
listing zephyr,memory-region first left the backup SRAM bound by the
generic memory-region binding, which does not declare vin-supply and
made that property unusable. Put the device compatible first and have
its binding include the memory-region properties the node still sets.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
Gets the clock speed from dts rather than a magic number, and
fixes invalid stack size configuration
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add support for the C-DAC THEJAS32 SoC, based on the VEGA ET1031 32-bit
(RV32IM) single-core, in-order RISC-V processor developed under India's
Digital India RISC-V (DIR-V) programme.
The image is loaded into and executed from the 256 KB internal SRAM,
which is mapped at 0x00200000, so execute-in-place is not used. The
kernel system clock is driven by the CLINT machine timer.
THEJAS32 follows the RISC-V privileged specification for trap handling
but uses a custom (non-PLIC) interrupt controller, so the SoC does not
select RISCV_PRIVILEGED. Instead it provides its own reset entry, machine
trap acknowledge and interrupt-management code that routes second-level
interrupts to the THEJAS32 interrupt controller driver and first-level
interrupts to the mie CSR.
The memory map and register definitions were cross-checked against the
C-DAC VEGA board support package.
Signed-off-by: Anuj Deshpande <anuj@makerville.io>
Add a GPIO driver for the two 16-pin GPIO controllers on the C-DAC
THEJAS32 SoC. Pin data is accessed through address masking, where bits
[17:2] of the address select the pins a data access operates on, so
individual pins are set and cleared without read-modify-write. The
direction register sits above the data window at offset 0x40000.
The controllers have no pull resistors and pin interrupts are not yet
wired to the SoC interrupt controller, so both are reported as
unsupported.
Signed-off-by: Anuj Deshpande <anuj@makerville.io>
Add a driver for the C-DAC THEJAS32 interrupt controller. It is a simple
second-level aggregator that ORs the SoC peripheral interrupt sources
into the RISC-V machine external interrupt line. Unlike a RISC-V PLIC it
has no per-source priority and no claim/complete protocol: it exposes a
single enable bitmask and a single (enabled and pending) status bitmask,
and a source is cleared by servicing the peripheral that raised it.
The driver registers as a second-level interrupt aggregator and exposes
enable/disable/is-enabled helpers for the SoC interrupt-management code
to route level-2 interrupts to.
Register definitions were derived from the open-source Taurus SDK
(https://github.com/rnayabed/taurus).
Signed-off-by: Anuj Deshpande <anuj@makerville.io>
Add a driver for the WIZnet W5100S standalone 10/100 Ethernet
controller with an SPI interface. The driver uses socket 0 in MACRAW
mode as the raw Ethernet MAC for the Zephyr networking stack.
The W5100S uses a flat register map with an opcode-first SPI frame and
supports N-byte burst read and write operations. Read link state from
PHYSR0 and program the source MAC after unlocking NETLCKR.
Add the concrete binding on top of the shared WIZnet Ethernet helper,
wire the build, extend build_all SPI coverage, and add the release note
entry for the new compatible.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
Factor the common SPI and Ethernet controller properties from the
existing W5500, W6100, and W6300 bindings into a shared WIZnet helper
binding.
Keep the leaf bindings responsible only for chip identity and per-part
requirements. Add title fields to each concrete binding and leave W6100
and W6300 to require int-gpios.
Move the common interrupt and reset descriptions into the shared
helper. Keep the polling fallback note there for parts that do not mark
int-gpios as required. This prepares the layout before the W5100S
binding is added.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. The lpc54xxx iap flash
controller and flash node had none.
The flash controller gets an identity ranges, while the flash memory
node gets an explicit ranges whose child address, parent address and
length are taken from its own reg, so the mapping is bounded by the
flash size.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. On lpc55xxx the flash is reached
through a peripheral-bus alias window, so the chain follows the pattern
already used by lpc55S6x: the peripheral node maps the 0x10000000
window to the 0x0 flash base, the iap flash controller maps 0x0 to
0x10000000, and the flash node carries an identity ranges.
Apply that chain to the lpc55S0x, lpc55S1x, lpc55S2x and lpc55S3x
common dtsi and to the 55S06, 55S16 and 55S26 non-secure peripheral
overrides so the whole family is converted consistently.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. The s32k344 flash node had none;
its c40 flash controller already maps offset 0x0 to the 0x00400000
flash base.
Add an explicit ranges plus address/size cells to the flash node, with
the child address, parent address and length taken from its own reg, so
the partitions can be converted.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. The kw2xd and kw41z flash
controllers and flash nodes had none.
The flash controller gets an identity ranges, while the flash memory
node gets an explicit ranges whose child address, parent address and
length are taken from its own reg, so the mapping is bounded by the
flash size.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. The mcxw7x and mcxw23x flash
controllers and flash nodes had none.
The flash controller gets an identity ranges, while each flash memory
node gets an explicit ranges whose child address, parent address and
length are taken from that node's own reg. The mcxw7x flash size is set
by the per-variant dtsi, so the ranges lives there next to the reg it
mirrors.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition needs an unbroken chain of ranges from the
partition up to the CPU address space. The mcxc and mcxn23x flash nodes
had none.
The flash controller gets an identity ranges, while each flash memory
node gets an explicit ranges whose child address, parent address and
length are taken from that node's own reg. The mcxc flash size is set by
the per-variant dtsi, so the ranges lives there next to the reg it
mirrors.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
zephyr,mapped-partition resolves a partition's address through
devicetree address translation, which needs an unbroken chain of
ranges from the partition up to the CPU address space. The mcxa flash
controllers and flash nodes had none.
The flash controller gets an identity ranges, while each flash memory
node gets an explicit ranges whose child address, parent address and
length are taken from that node's own reg, so the mapping is bounded by
the flash size.
The common dtsi covers the mcxa5x and mcxaxx6 families; the mcxa153,
mcxa156 and mcxa344 variants redefine the flash node and are updated in
place.
Assisted-by: Vero-Coder:claude-opus-4.8
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Use the common framebuffer configuration and data structures to
simplify the Intel multiboot framebuffer driver and replace the
driver-specific read and write implementations with the common
framebuffer helpers.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Use the common framebuffer configuration and data structures to
simplify the QEMU ramfb driver and replace the driver-specific read
and write implementations with the common framebuffer helpers.
Update the ramfb devicetree binding to use simple-framebuffer.yaml
and rename the fwcfg property to firmware.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Use the common framebuffer configuration and data structures to
simplify the Raspberry Pi BCM2711 framebuffer driver and replace
the driver-specific read and write implementations with the common
framebuffer helpers.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add a shared display_framebuffer library providing generic
read/write implementations for framebuffer-backed display
drivers (config/data structs, DT helper macros, and
display_framebuffer_read()/write()).
Add CONFIG_DISPLAY_FRAMEBUFFER to gate the new source file.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add #address-cells/#size-cells to the MCXW7x internal flash node and a
ranges property matching its reg in nxp_mcxw71.dtsi. This is required by
the zephyr,mapped-partition binding.
Signed-off-by: Tarang Patel <tarang3399.patel@gmail.com>
This commit enables the new clock managers by switching the device
tree to use the new bindings. It also moves some initialization code
from the old clock manager to soc_early_init_hook() since some clocks
configuration needs to be done before the clock drivers are initialized.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Rename and extend SiWx91x clock IDs, then update the existing legacy
clock manager and current siwg917 DTS users to the new names.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Deep Sleep Retention collapses the Compute domain's peripheral supply, so a
peripheral that survives the window comes back with its registers at their
reset values. Nothing tells the drivers that, and the action their hardware
bring-up lives in, PM_DEVICE_ACTION_TURN_ON, only runs once per boot. The
console is what this hurts most: the LP_FLEXCOMM wrapper loses
PSELID[PERSEL] and the LPUART loses its whole register bank, so the first
print after a DSR window bus-faults on the block.
Add a power-domain-soc-state-change node that lists only the DSR state and
tag the LP_FLEXCOMM wrappers and their LPUART children with it. The domain
driver then turns those devices off before the window and on again after
it, which re-runs TURN_ON and lets each driver rebuild its hardware from
scratch. Plain Deep Sleep retains the supply and is deliberately not
listed, so it keeps the cheaper suspend/resume path.
This only adds the description. Nothing enters DSR until the cm33
pm_state_set integration later in this series, so the node has no effect
on its own.
LPSPI and LPI2C are left untagged: they do their hardware setup in the init
function rather than in TURN_ON, so the domain has nothing to hand them
yet. They only need the same one-line power-domains property once that
changes.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The PM policy chooses a state from a core's cpu-power-states list and
weighs it by the residency and latency figures published there. Without
those nodes the RT700 cores expose no state at all, so pm_state_set() is
never reached.
Describe the CM33 states for both cores: runtime-idle and suspend-to-idle
(deep sleep) on each, plus standby (deep sleep retention) on CPU0 only,
which is the only core that implements it.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer sits in VDD2_COMP, which both deep sleep and deep sleep
retention reset. Across either state the timer can neither keep time nor
wake the core, so leaving it as the system timer loses the sleep duration
and the wakeup with it.
Name both states in handoff-power-states so the driver hands timekeeping
and wakeup to /chosen/zephyr,system-timer-companion for their duration and
takes them back on resume.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add a BCM2835-specific vendor quirk that acquires the VideoCore
power domain through the runtime PM API in pre_enable, disable
and shutdown, and translate physical addresses to the DMA bus
address space using dma_addr_xlate hook.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add support for NXP PNG decoder hardware module. This driver provides
memory-to-memory (M2M) video transformation capability to decode PNG
compressed images into raw pixel formats.
Key features:
- Supports PNG input format (VIDEO_PIX_FMT_PNG)
- Resolution support: 1x1 to 1024x65535 pixels (1-pixel step)
- Fixed RGBA32 output format (VIDEO_PIX_FMT_RGBA32)
- Interrupt-driven operation with input/output buffer queues
- 8-byte buffer alignment requirement
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Add self-contained QEMU virtual SoCs for the AURIX tc3x (TC1.6.2P)
and tc4x (TC1.8P) cores under a single soc/qemu/tricore directory,
selected per board via SOC_QEMU_TC3X / SOC_QEMU_TC4X. This lets the
architecture be exercised under qemu-system-tricore without any
silicon or HAL dependency; ENDINIT and the watchdog are handled by
the arch weak stubs, which QEMU does not model.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add UART driver for the ASCLIN module found on TC3x and TC4x.
Supports polling mode with configurable baudrate via the ASCLIN
fractional divider. Uses a private register header to handle
TXDATA/RXDATA layout differences between TC3x and TC4x.
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add driver for the AURIX Service Request Router (IR) which maps
peripheral service requests to CPU interrupt priorities. The IR
handles priority-based dispatch and is shared across TC3x and TC4x.
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add system timer drivers using the STM (System Timer Module)
on TC3x and TC4x. The STM provides the kernel tick source for
scheduling and timeouts.
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add TriCore architecture port supporting TC1.6P and TC1.8P core
variants used in Infineon AURIX TC3x and TC4x SoC families.
Includes context switching using TriCore upper/lower context save
areas (CSA), interrupt management, trap and exception handling,
syscall interface, reset vector and linker script.
Supports cooperative and preemptive threading, nested interrupt
handling with priority-based preemption.
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>