ASSERT are not always enabled, leading to not catching
invalid arguments in situation where it is not enabled.
Replace all ASSERT statement with argument check, properly
returning error instead of accessing invalid addresses.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
ASSERT aren't always enabled hence add return value in
video_auto_cluster_ctrl and video_cluster_ctrl functions
in order to avoid accessing invalid parameter and return
an error.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Nordic's nPM10 Series PMIC Sensor Devicetree bindings and minimal driver
supporting only battery current, voltage and temperature measurements.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Adds CAN driver for Infineon devices using the Bosch M_CAN IP core. The
driver is structured using a parent-child architecture to match the
Infineon hardware implementation:
- Parent (infineon,canfd-controller): Manages Shared MRAM
initialization, enables controller level timestamp-counter and ECC.
- Child (infineon,can): Individual CAN channel initialization.
Configures pinctrl, peripheral clock assignment, MRAM configuration,
and interrupts. Remaining initialization is handled by can_mcan.
This driver was originally written by Karthikeyan Krishnasamy
<karthikeyan@linumiz.com> in PR#101930. Clocking updates and CAN
controller wrapper were added by John Batch.
Co-authored-by: John Batch <john.batch@infineon.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Signed-off-by: John Batch <john.batch@infineon.com>
Remove the duplicated ifx_cat1_get_hfclk_for_peri_group() function and
replace with the version from the clock_control header.
Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
Remove the duplicated ifx_cat1_get_hfclk_for_peri_group() function and
use version from shared header file.
Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
Add a regulator driver for the internal general-purpose LDO channels
found in some Espressif SoCs. These LDO channels can supply power to
internal and external peripherals such as SPI flash and PSRAM.
The driver supports:
- Enable/disable LDO output channels
- Continuously adjustable voltage from 500mV to 2700mV
- Rail bypass mode at 3300mV
- Standard regulator device tree properties (boot-on, always-on, etc.)
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
start rx and link status thread in iface init,
as only then the iface pointer in the data
struct is set.
ALso simplify link status update logic.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Implement a device driver for XSPI manager.
This allows to define the xspi controllers configuration that should
be applied towards the xspi IO ports:
- Muxed
- Swapped
- ...
Since its configuration has impact on final application location and
implies the deactivation of xspi clocks, it should be run only at fsbl
stage and not later.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
There is no such thing as XSPIM1/XSPIM2 and not all XSPIM compatible
devices declare HAL_XSPIM_IOPORT_1/2.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
If user selects a band, then we should restrict scanning channels to
that band. This can be used to speed up scanning by limiting scans
to specific channels when the network is known to not use all possible
channels.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
The low RX FIFO threshold of 1 could lead to issues during higher baud
rates, thus the threshold is increased and the RX Timeout feature on the
MSPM0 is introduced.
Signed-off-by: Jackson Farley <j-farley@ti.com>
The isr implementation would clear pending interrupts that had fired
since the first check for pending interrupts, leading to missed events.
This PR amends that issue and fixes typos in comparing IIDX types rather
than bitmasks to explicit comparisons
Signed-off-by: Jackson Farley <j-farley@ti.com>
Currently, PINCTRL_IMX_SCMI depends on the SCMI stack being enabled and
the existence of the pinctrl protocol node. This, by itself, is not enough
since this condition can be met by any vendor wanting to use the pinctrl
protocol. Thus, the IMX SCMI pinctrl driver will end up being selected for
other vendors as well, which is not correct.
Fix this by adding a dependency on the IMX-specific pinctrl child being
present. By doing this, the driver will remain auto-selected.
Fixes#105673.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The driver implements the QEMU ramfb as a framebuffer-based display.
It only implements the basic capabilities necessary (ARGB8888) with
resolution configurable via DTS. For initialization it uses the fwcfg
driver.
Signed-off-by: Maximilian Zimmermann <gitmz@posteo.de>
Fixes the no-mt test at tests/arch/riscv/pmp/isr-stack-guard
by making the driver work without MULTITHREADING primitives
if they are disabled.
Signed-off-by: Maximilian Zimmermann <gitmz@posteo.de>
Add video_import_buffer() API and necessary changes to support buffers
allocated from outside, not from the video heap.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Currently, the video_enqueue() API enqueues the whole external video
buffer container structure from the application and the driver stores
this container in its FIFO queue.
While it works in simple applications where the enqueued video_buffer
container persists for the whole program lifecycle, it does not work in
situations where we cannot keep this container, e.g. enqueuing a buffer
inside a function, the local variable will be destroyed when the function
returns and hence the buffer is no longer valid.
Video buffers can be tracked via their indices in the buffer pool.
Set the index field when buffers are allocated and enqueue the internal
buffer rather than the external one to fix the issue.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
PM suspend operation cannot be performed for UART using asynchronous
API is there are any active operations. Instead of asserting return
error.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
1. Keep drivers/timer/cortex_m_systick.h as a compatibility
shim for legacy Cortex-M-specific names.
2. Switch to use the generic low-power companion timer API
for the Cortex-M SysTick driver.
3. Mark the global CORTEX_M_SYSTICK_LPM_* kconfig options
as 'DEPRECATED' and replace them with SYSTEM_TIMER_LPM_*
4. Rename 'zephyr,cortex-m-idle-timer' to
'zephyr,system-timer-companion'
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The supported pixel formats are the most important thing in
get_capabilities() but not reported. Fix it.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add PIXEL_FORMAT_XRGB_8888 and the corresponding panel format.
Add support for this format in display_sdl driver as well.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
syscon does not support clock get rate function for lpuart
for MCXL family.
Enable lpuart clock get rate function for MCXL family.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
MCXL family has only PORT1, 2 and 3 controlled by syscon.
Do not enable clock for PORT0 in syscon driver.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
The async mode ISR silently cleared RX error flags (overrun, parity,
framing, noise) without notifying the application. This violates the
Zephyr async UART API which requires a UART_RX_STOPPED event followed
by UART_RX_BUF_RELEASED and UART_RX_DISABLED.
Enable RX error interrupts alongside the idle-line interrupt, and
handle them in the ISR by reporting UART_RX_STOPPED with the
appropriate reason bitmask, then calling rx_disable() for the full
API-mandated teardown sequence.
Also set rx_dma_params.buf to NULL in rx_disable() after releasing
buffers, so stale pointers are not left behind.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Clear rx_dma_params.buf to NULL in mcux_lpuart_rx_disable() after
releasing all buffers. Without this, the stale pointer remains set
after RX teardown, which can cause subsequent checks against buf
to incorrectly assume RX is still active.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
The PSOC4 flash driver accepted unaligned write offsets and sizes,
using a read-modify-write path to handle sub-row writes. This
violated the flash API contract, as the driver advertises
write_block_size=256 via devicetree.
Additionally, the Infineon HAL function Cy_Flash_WriteRow() requires
row-aligned addresses and exactly CY_FLASH_SIZEOF_ROW bytes of data.
The R-M-W path was passing unaligned addresses to the HAL, which
would reject them, but the driver was not checking the return value
and silently reported success after failed writes.
Add write alignment validation for both offset and size. Remove the
dead read-modify-write code path. Add missing error checking on
Cy_Flash_WriteRow() return value in the write loop, consistent with
the erase function.
Handle caller-provided data buffers that are not 4-byte aligned by
staging each row through a local aligned buffer before calling
Cy_Flash_WriteRow(), which requires a uint32_t-aligned source
pointer. When the source is already aligned, it is passed directly
with no copy overhead.
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
remove redundant net_pkt_set_iface() it is already set in
net_recv_data() and net_pkt_rx_alloc_with_buffer().
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The previous 40 KB default heap was at the edge for the Wi-Fi driver,
which can lead to allocation failures. Increase to 50 KB to provide
adequate memory for Wi-Fi operation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Extend the ESP32 Wi-Fi driver to support ESP32-C5, the first
Espressif SoC with dual-band Wi-Fi 6 (2.4 GHz and 5 GHz).
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Extend the ESP32 LEDC PWM driver to support ESP32-C5. Clear the
gamma RAM fade function on SoCs that have it to prevent stale
fade parameters from affecting duty cycle output.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Extend the ESP32 GDMA driver to support ESP32-C5. Add the C5 SoC to
the AHB GDMA configuration and define the per-channel interrupt
source mappings.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>