The unit address of the node was correct, but not its `reg` properties
(and thus not its `ranges` property either). Fix the latter two.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add WWDT (Windowed WatchDog Timer) support for all LPC55Sxx variants
(LPC55S06/S16/S28/S36/S69):
DTS / board changes:
- Add wwdt0 node (compatible = "nxp,lpc-wwdt", reg = 0xc000) and
watchdog0 alias to nxp_lpc55S0x/S1x/S3x_common.dtsi
- Enable wwdt0 and add watchdog to supported features on
lpcxpresso55s06, lpcxpresso55s16, lpcxpresso55s36 boards
SoC / clock:
- soc.c: call CLOCK_SetClkDiv(kCLOCK_DivWdtClk, 1U, true) when
wwdt0 is enabled, alongside the existing FRO1MHz enable
Driver hardening (per hakehuang review):
- Add `bool started` flag to mcux_wwdt_data to track post-setup state
- Set started=true in mcux_wwdt_setup(), clear in mcux_wwdt_disable()
and PM_DEVICE_ACTION_TURN_OFF
- Guard mcux_wwdt_isr() with early return when !started, preventing
spurious callbacks from warm-reset stale WWDT status on LPC55S36
- Clear WWDT status flags + NVIC pending bit before irq_enable() in
the IRQ init macro
Tests:
- Add per-board .conf files for wdt_basic_api; lpcxpresso55s06/s16
use SRAMX noinit section to survive TrustZone NS Boot ROM clears;
all boards enable WDT_MCUX_WWDT_WARNING_INTERRUPT_CFG=10
- Update testcase.yaml filter to allow SOC_SERIES_LPC55XXX and
exclude lpcxpresso55s69 NS variant
Tested with tests/drivers/watchdog/wdt_basic_api on lpcxpresso55s36:
SUITE PASS 100% [wdt_basic_test_suite]: pass=1, fail=0, skip=0
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
The dmas property in flexcomm1-7 and hs_lspi nodes was using an
invalid phandle-array format, missing the required comma separator
between entries:
dmas = <&dma0 6 &dma0 7>; /* incorrect */
Correct it to use the valid comma-separated form, consistent with
flexcomm0 which already had the right format:
dmas = <&dma0 6>, <&dma0 7>; /* correct */
Affected nodes: flexcomm1, flexcomm2, flexcomm3, flexcomm4,
flexcomm5, flexcomm6, flexcomm7, and hs_lspi.
Build-tested with tests/drivers/dma/loop_transfer,
tests/drivers/i2s/i2s_api, and samples/drivers/i2s/i2s_codec
on lpcxpresso55s69/lpc55s69/cpu0.
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Add single-core and SMP RISC-V AIA APLIC+IMSIC board variants as
nested variants of the qemu_virt_riscv32 SoC, mirroring the
qemu_riscv64 'smode' variant precedent.
The APLIC+IMSIC variants:
qemu_riscv32/qemu_virt_riscv32/aia-imsic
qemu_riscv32/qemu_virt_riscv32/aia-imsic/smp
These variants select a common APLIC topology include and add the IMSIC
nodes and properties needed for MSI delivery. They override the per-cpu
riscv,isa-extensions list to advertise smcsrind, which the RISC-V
indirect-CSR (Smcsrind) extension uses to access AIA external-interrupt
CSRs.
The board Kconfig selects RISCV_HAS_AIA on the APLIC+IMSIC variants,
which flips the SoC-level PLIC default off (see the prior commit). The
QEMU command line gates -machine virt,aia=aplic-imsic on the same flag.
The bare qemu_riscv32 identifier is preserved unchanged so existing
downstream platform_allow entries keep resolving.
The APLIC+IMSIC variant yamls intentionally do not set
testing.default=true: interrupt-driven UART through APLIC+IMSIC is not
yet routed for the generic shell/perf/pytest samples, so leaving them as
default would schedule those samples onto a target where they cannot
reach the shell prompt. Tests that explicitly cover the AIA path opt in
via platform_allow / integration_platforms.
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Assisted-by: Codex:GPT-5.5
Assisted-by: Claude:Fable-5
Move the PLIC node and PLIC-specific interrupt wiring out of the shared
virt-riscv include.
Add them to a QEMU PLIC topology include used by the board files that
still use PLIC. This leaves the shared QEMU virt include interrupt
controller neutral, so AIA variants can select their own topology without
deleting or overriding inherited PLIC nodes and interrupt maps.
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Assisted-by: Codex:GPT-5.5
Add and modify nodes to feature the new SF controller
Update boards to use the new controller,
significantly increase performance for a lot of them
Allow effectively truly representing the flash,
Allow setting the flash offset via ranges
use ranges properly
Signed-off-by: Camille BAUD <mail@massdriver.space>
Handle necessary code relocation better,
clearly delimiting what is required and what is not
Also group RAM together
Signed-off-by: Camille BAUD <mail@massdriver.space>
BFLB flash driver is updated:
- Add support for bank 2
- Add support for SFDP
- Add ability to use writable devices (MRAM, PSRAM, FRAM) via bank2 mapping
- Improve overall organization
- Add QPI and continous read support
Signed-off-by: Camille BAUD <mail@massdriver.space>
- add a `title` to the binding
- add description for the `interrupts` property indicating expected use
- rework description to be simpler and mention the LPDMA/GPDMA/HPDMA
controller names explicitly
- simplify cells description, refering to the dedicated header instead
of repeating the information for `channel-config`
- make examples proper snippets instead of being in the description
(and make them use named constants from stm32_dma.h)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
UART5 had incorrect unit address and reg value set.
Replace both with correct address as stated in RM0522.
Signed-off-by: Marin Jurjević <marinjurjevic@outlook.com>
Add basic description for the STM32 Chrom-ART (DMA2D).
For the time being description is kept to the minimum since
DMA2D is only used from within the LVGL framework and the node
is used in order to check the IRQ informations.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Keep the RT1170 MICFIL Audio PLL initialization in the CCM clock
control path, but stop rewriting the MIC root clock while serving
PDM rate queries.
Reprogramming the MIC root caused RT1170 regressions during runtime.
It broke the i2s_codec sample and led to MICFIL capture starvation in
dmic_api. This keeps the safe Audio PLL bring-up while preserving the
working MIC root configuration used by the board.
The RT1170 dmic_api overlay and testcase enablement are included so the
test covers the board directly.
Assisted-by: GitHub Copilot:GPT-5.4
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
The message_ram reg entry for the stm32l5 fdcan1 node had a type-o
digit (0x400ac000), placing it outside the peripheral memory map. The
correct SRAMCAN base is 0x4000ac00 (APB1PERIPH_BASE + 0xAC00) per the
STM32L5 reference manual and HAL, and it matches the identical fdcan
nodes on the U3/U5/H5 SoCs that share the same m_can base at 0x4000a400.
The Bosch M_CAN driver derives the message RAM address from this reg
entry and zeroes the region during init (can_mcan_sys_clear_mram), so
the wrong address triggers a fault before main() on any STM32L5 board
with FDCAN enabled.
Fixes: 4866cfcc9d ("dts: arm: st: l5: update dtsi file with fdcan node")
Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
The nRF7120 exposes its external MSPI NOR flash through 2 memory-mapped
windows: an uncached window at 0x6000_0000 (512 MB) usable by both the
CM33 and the VPR, and a cached window at 0x0200_0000 (224 MB) reachable
only by the CM33.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
The QingKe V2A, V2C, and V4C have a Debug Module with two data
registers `data0` and `data1`. These can be used with SDI compatible
debuggers such as `minichlink` to send console data to the host.
Add a console driver communicates with the host and fails gracefully
if the driver is enabled but the debugger is not connected.
Compared to the UART console, the debug console uses 916 bytes less
flash and frees up a UART.
Tested on the ch32v006evt and bluepillplus_ch32v203. To test, add
`&sdiconsole { status = "okay"; };` to the board Devicetree, set
`zephyr,console = &sdiconsole`, and enable the driver.
Signed-off-by: Michael Hope <michaelh@juju.nz>
use DT_INST_ENUM_HAS_VALUE for
phy_connection_type, that way we don't have to do
string operations.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Extends the SCMI shared memory structure to phandles,
allowing TX and RX channels to use different shared memory regions.
This is necessary for platforms like i.MX95, where TX and RX
notifications are mapped to different addresses.
RX channel is not mandatory and depends on the platform's support
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
The flash on the ch32v series starts at 0x8000000 and, depending on
the system configuration, is aliased to 0x0. When the ch32v003 support
was first submitted, `minichlink` would accept either the real or the
alised address, but became stricter sometime in the last two years.
Fix the base address in the ch32v00{3,6}.dtsi, change
`minichlink.py` to always use the flash address from the build
configuration, and remove the `--dt-flash=y` work-arounds from the
more recent board configurations.
Tested by building `hello_world` for `ch32v003evt`, `ch32v006evt`,
`bluepillplus_ch32v203`, `ch32v303vct6_evt`, and `ch32v307v_evt_r1`;
running `west -v flash` and checking the command uses `0x8000000`.
Signed-off-by: Michael Hope <michaelh@juju.nz>
- add clocks and resets to MCXA CRC nodes.
- crc_nxp: deassert in init if a dt reset is given.
On MCXA SoCs the CRC peripheral boots held in reset, so enabling its
clock is not enough. Deassert the reset during driver init.
- nxp,crc.yaml: include reset-device.yaml for the resets property.
- mcxa Kconfig.defconfig: enable CONFIG_RESET
when MRCC reset is present.
- clock_control_mcux_syscon: enable the CRC clock gate.
- mcxa344: fix reset controller compatible to nxp,mrcc-reset.
Tested on frdm_mcxa344, frdm_mcxa156, frdm_mcxa266.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
On MCXW23 the OS event timer is reserved as the low-power companion
to SysTick and could not be used as the kernel system timer:
selecting CONFIG_MCUX_OS_TIMER left CORTEX_M_SYSTICK enabled, which
fails to link (duplicate sys_clock_* symbols), and no OS-timer clock
rate was defined for it.
Disable CORTEX_M_SYSTICK by default when MCUX_OS_TIMER is selected
(as already done for MCUX_LPTMR_TIMER) so only one system timer is
active, and define the OS timer clock rate. The MCXW23 OS event
timer is clocked from the 32.768 kHz RTC oscillator: PMC
OSTIMERCLKSEL resets to 32.768 kHz and is left at reset, and the
HAL only enables (never reselects) the clock. The rate is taken from
a clk_32k fixed-clock devicetree node rather than a hardcoded Kconfig
literal: SYS_CLOCK_HW_CYCLES_PER_SEC = 32768 and
SYS_CLOCK_TICKS_PER_SEC = 1024 (exactly 32 cycles per tick), unlike
other NXP parts where the OS timer runs at 1 MHz.
Selecting OSTIMER trades timing precision (~1 ms tick, ~30 us
resolution) for low-power always-on operation, so SysTick stays the
default where fine-grained timing is needed.
The default SysTick configuration is unchanged: both defaults are
gated on MCUX_OS_TIMER, which is off by default. A before/after
defconfig diff on frdm_mcxw23 is byte-identical (OSTIMER resolves to
HZ=32768/TICKS=1024, SysTick to HZ=32000000/TICKS=10000).
Link: MCXW23 RM section 45.4.11.2.24 (PMC OS timer control register)
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Like in nrf54lm20, reserve last 1kB from RAM for FLPR hibernation
if FLPR is in use. Hibernation is the default and recommended sleep
mode. Align nordic-flpr snippet.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The Devicetree recommends "crypto" as a generic name. Use it for nodes
representing cryptographic accelerators on STM32: AES, CRYP and HASH.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add a system clock driver built on top of the NXP System Counter
(SYS_CTR) block, which provides a 56-bit free-running counter and two
compare frames capable of generating maskable interrupts.
The driver is a free-running counter paired with an absolute compare
register. Compare frame 0 is used for the system timer, leaving frame
1 available for other consumers. The instance is selected via the
zephyr,system-timer chosen property.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
extended-channels node property is required to enable interval mode
support for nRF7120.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Add a nocache memory region to mimxrt685s/hifi4's DT
(adsp_data_nocache). Move adsp_text and adsp_data from non-cached views
to cached views. Add Kconfig variables and symbols to SoC's memory.h
describing that region. Enable nocache memory support. Modify SoC's
linker script to set up linking against that memory region and add
nocache section initialisation to soc.c.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
The E8 SoC includes an APSS (Cortex-A32) cluster whose peripherals
are routed through a GIC. Add the GIC interrupt definitions for these
peripherals, complementing the NVIC definitions added earlier, so the
same peripheral instances can be reached from either the RTSS (NVIC)
or APSS (GIC) cluster with the correct interrupt routing.
As with the NVIC interrupt files, ae822fa0e5597ls0_gic_irq.dtsi
composes and presents the GIC interrupt routing for that SoC's resources,
and a board building for the APSS (GIC) core includes it instead of the
_nvic_irq variant.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Move interrupt properties from common peripheral definitions to
separate interrupt controller-specific files. This enables support
for SoCs where the same peripheral is wired to different interrupt
controllers.
Ensemble SoCs contain both RTSS (Cortex-M55 with NVIC) and APSS
(Cortex-A32 with GIC) clusters sharing the same peripherals. The
shared peripherals have different interrupt numbers depending on
the interrupt controller that routes the interrupts to the
corresponding CPU cluster. Moreover, NVIC and GIC use incompatible
interrupt specifier formats: NVIC requires two cells <irq priority>
while GIC requires four cells <type irq flags priority>. A single
peripheral node cannot carry both formats simultaneously, making
controller-specific interrupt files necessary.
Just as a <soc>.dtsi currently composes and presents the information
about the mem/io resources available in an SoC to the board layer,
the interrupt file <soc>_nvic_irq.dtsi (or <soc>_gic_irq.dtsi, to be
introduced later) composes and presents the information about the
interrupt routing for those resources. The decision to use either
of these (NVIC/GIC) interrupt files is taken at the board level as
the target CPU is only known at that level.
This commit introduces NVIC interrupt definitions while maintaining
existing functionality for all RTSS boards. GIC support will be
added in a subsequent commit.
No functional changes to existing boards.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Some SoC series in the Ensemble family contain a Cortex-A32 cluster
residing in their Application Processor SubSystem (APSS). Add a
device tree include file describing this cluster's CPU, GIC and Arm
generic timer.
This is the APSS counterpart of the existing ensemble_rtss_he.dtsi
and ensemble_rtss_hp.dtsi cluster files: the cluster-specific core
details are kept separate from the SoC-level on-chip resources so a
board can compose them per CPU variant.
Signed-off-by: Silesh C V <silesh@alifsemi.com>
Rename the DSI connector gpio-nexus compatible used on STM32 board
and name it st,dsi-lcd-qsh-030-connector to match with other
names of connectors used within the Zephyr tree.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
While the bindings file is refering (via its filename and
compatible) to st,dcmi-camera-fpu-330zh, the compatible
st,stm32-dcmi-camera-fpu-330zh is being used on board
device-tree.
Fix this align with other connectors by having the name contain
the type of connector and kind of usage.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>