Replace the direct memcpy() in flash_nrf_read() and nrf_rram_read()
with an inline check against soc_secure_flash_range_is_secure().
Reads that overlap a "nordic,tz-secure" partition go through
soc_secure_mem_read(); all others stay a plain memcpy() /
nrf_nvmc_buffer_read().
For secure builds and for NS builds without a tz-secure DT node the
predicate folds to a constant false and the secure branch is dropped
by the optimiser, so this is a no-op for any layout that does not
opt in.
Signed-off-by: Dag Erik Gjørvad <dag.erik.gjorvad@nordicsemi.no>
Add support for full SMIF hardware initialization for the serial
memory flash driver when booting from internal RRAM.
On PSE84, the ROM extended boot only configures the SMIF subsystem
when the device boots from external flash. When the first application
(MCUboot or CM33 secure) runs from RRAM, the SMIF pins, clocks,
peripheral groups, and peripheral itself are left uninitialized.
Introduce CONFIG_FLASH_INFINEON_SMIF_HW_INIT to conditionally
perform these steps before mtb_serial_memory_setup() is called.
Extract the info as much as possible from DT. Some are still hardcoded
in the driver and will require additional polishing in a follow-up PR.
Assisted-by: Claude:claude-opus-4.7
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
The qspi flash controller uses the Serial Memory Interface (SMIF) to
interact with an external memory. This is done through dedicated
data pins which reside in the SMIF HW block. These were not exposed
up until now in the Infineon devices because the extended boot takes
care of initializing the pins properly when booting from external flash.
However this might not always be the case so expose the pin info and
configuration. Additionally, correct the flash controller address to
match the SMIF CORE base address corresponding to the SMIF instance
in use.
Assisted-by: Claude:claude-opus-4.7
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Add cellular_modem_pause_periodic_script() /
cellular_modem_resume_periodic_script() so a consumer can suppress
the periodic AT poll while holding the command channel for a
long-running operation (firmware update, eSIM, factory test). The
gate is at the timer-fire site, so an in-flight script is not
interrupted. Resume fires the script immediately if at least one
scheduled run was skipped while paused; otherwise it restarts the
periodic timer.
Pause and resume are single-owner: pausing while already paused and
resuming while not paused both return -EINVAL so misuse surfaces at
the call site instead of being swallowed.
Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>
Encode the SF32LB52x slew-rate pinctrl property into HPSYS_PINMUX.
The devicetree value 0 selects slow slew rate and 1 selects fast
slew rate, while the hardware bit uses 1 for slow and 0 for fast.
PA39-PA42 reuse the same bit as MODE instead of SR. Mask SR out for
those pads and drive MODE separately from the selected pinctrl
function, setting it only for I2C routing and clearing it otherwise.
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
PA39-PA42 reuse bit 8 as MODE instead of slew rate. The GPIO
driver always set bit 8, which forced those pads into I2C mode
whenever they were configured as GPIOs.
Configure GPIO pads with read-modify-write, clear MODE on PA39-PA42
to select GPIO mode, and stop modifying bit 8 on other pads. Slew
rate is now left to pinctrl or hardware defaults instead of the GPIO
configuration path.
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
Nuvoton USBD/HSUSBD peripherals support VBUS detect functionality, but
some PCB designs may choose to use mutually exclusive USB-C peripheral
for VBUS detection. In this case, the USB controller backed VBUS detect
functionality won't work and needs to be disabled.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
- Read write_block_size from devicetree (default 4 in binding) to
allow board-level override for finer write granularity.
- Add CONFIG_FLASH_MCUX_XSPI_WRITE_BUFFER (default n) to copy
write data to a RAM buffer before transfer, preventing faults
when source data resides in flash and padding transfer size to
4-byte boundary for the XSPI IP Tx limitation.
- When write buffer is disabled, reject non-4-byte-aligned offset
or length with -EINVAL.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
- Clamp write_size to remaining bytes in the current 256-byte page
to prevent page program address wrap, consistent with the FlexSPI
NOR drivers.
- Set write_block_size to 2 because OPI DTR mode requires all writes
to be 2-byte aligned and multiples of 2 bytes.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Honor regulator-init-microvolt and the boot-on / always-on
properties at init so on-chip LDOs come up before the kernel
runs.
Switch the binding from the custom espressif,ldo-channel
property to a standard reg + unit-address layout, and read the
channel via DT_REG_ADDR().
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The same 16-field shell_print format string was duplicated verbatim in
the single-target and all-devices branches of cmd_i3c_info. Extract it
into a shared static helper to eliminate the duplication.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Both CCC vendor commands open-coded the three-step dev+tdev+desc lookup
that i3c_parse_args() already provides. Switch to the helper.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Seven CCC command handlers declared and assigned a local `data` pointer
but never read it. Drop the dead declarations and assignments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Replace two identical 9-entry DT_FOREACH_STATUS_OKAY blocks with a single
I3C_FOREACH_STATUS_OKAY(fn) wrapper macro so adding a new controller
compatible requires only one edit.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Corrected PSE84 autanalog DAC index calculation. The DAC index is
contiguous and starts from dac0 instance. The previous implementation
was depending on the DT_NODE_CHILD_IDX, which returns the position
among all autanalog siblings (CTB, PTC, DAC, SAR, PRB). Therefore
it was returning an incorrect DAC index.
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Fix an out of bounds array read, which causes the test to read
beyond the stack and fail (probably at random).
The issue can be pinpointed building with ASAN.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Updated bbram compatible in mec5 dtsi
Added macro required to port the bbram driver for MEC174x/5x.
Signed-off-by: Manimaran A <manimaran.a@microchip.com>
TMP108/AS6212 status alert bit masks are driver-internal. Move them from
the public header into tmp108.h.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Status register bit macros are driver-internal and only used in
ti_hdc302x.c. Remove them from the public header.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Wake-up feature should be available even if user selects only
POWEROFF function. PM and PM_DEVICE are related to IDLE and
also possibly with calling PM_STATE_SOFT_OFF, so it is kept
as check/guard for the wake-up function as well.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
The I2C driver clears the TC and TCR interrupt flags not in the ISR, but
in thread context later on. If there is an interrupt on another I2C
peripheral (but sharing the same interrupt vector) after the first I2C
peripheral processed a TC or TCR interrupt, but before it cleared the
corresponding status flag in thread context, this interrupt will be
processed twice, leading to corrupted transfers.
Added a check to only process the TC and TCR interrupts if they are
enabled for the corresponding peripheral (indicated by the TCIE bit in
the CR1 register).
Fixeszephyrproject-rtos/zephyr#109993
Signed-off-by: Oliver Schmidhauser <oliver.schmidhauser@leica-geosystems.com>
LDO soft start fix will not be available in the next revision of the device
but is instead pushed to a later one. The check is invalid, therefore needs
to be reverted.
This reverts commit da56fe6ee0.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Replace manual pointer transfer with net_buf_take() for better
readability and atomic operation.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
When enabling RX with a timeout of 0 in the mcux lpuart driver, the
driver silently skipped starting the async work timer, making partial
DMA transmissions fail. This commit handles the scenario by
immediatelly flushing the RX data, if any.
Make it so the async timer for TX is skipped if timeout is 0, disabling
TX timeout.
Signed-off-by: Guilherme Costa <guilhermecosta@stratioautomotive.com>
Compiling the mcux lpuart driver with format string validation led to a
runtime warning about pointer types. This commit fixes the issue by
casting the offending parameter to void * as recommended.
Signed-off-by: Guilherme Costa <guilhermecosta@stratioautomotive.com>
Update all drivers to use "flags" instead of "sense" when accessing
interrupt properties from device tree. This aligns with the updated
interrupt controller bindings that now consistently use "flags" as
the cell name for the IRQ type field.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
- Manually trigger TX IRQ when the buffer is empty to work around the
hardware limitation where the IRQ is not automatically generated.
Signed-off-by: Steven Chang <steven@ene.com.tw>
Add driver for NXP MCUX Segment LCD (SLCD) controller to support
segment-style auxiliary displays.
The driver provides a unified implementation that handles both
the SLCD controller (nxp,slcd) and a generic SLCD panel.
It supports the generic SLCD panel with common header and binding
which includes the following panel features:
- Segment types(7, 14, 16 segments)
- Configurable front plane pins and back plane COMs
- pin/COM for each segment
- Optional pin/COM for each indicator
- Optional colon/dot indicators
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Add new API to the auxiliary display subsystem to support display
custom indicator management, for segmet LCD panels
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Add a driver for the Generic Quad SPI hardware that is part of the
Xilinx MPSoC. This is mostly commonly used with QSPI flash devices which
are also used for initial image loading, but can also be used with other
SPI devices.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Fix a format string build error on platforms where uint32_t types
do not match standard unsigned format specifiers.
Fix this by using the PRIu32 format macro for both frame_size and
vbuf->size, ensuring type safety across all target architectures.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
- Add JEDEC case for Macronix MX25U6432F to skip SFDP auto-parsing.
- Forces 24-bit addressing to prevent breaking active XIP loops.
Signed-off-by: Deepika R <deepika@aerlync.com>
Use RCR.ALL to enable reception of all multicast frames. MAR[7] is set
to 0x80 for broadcast only. This follows Zephyr driver convention
where a simple multicast-enable flag is preferred.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
Add TDM DMA driver for AMD Audio Co-Processor 7.0. This includes:
- DMA driver (dma_acp_tdm.c) with support for memory-to-device and
device-to-memory transfers using ACP DMA engine
- Device tree bindings and node for ACP TDM DMA controller
- Kconfig and CMake build integration
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add TDM DAI driver and ACP 7.0 register
definitions for AMD Audio Co-Processor. This includes:
- TDM DAI driver (tdm_dai.c) with support for I2S format
- ACP 7.0 chip register definitions and offset mappings
- Device tree bindings and nodes for TDM DAI instances
- Kconfig and CMake build integration
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>