Add a counter driver for the MCUX wake timer. The hardware is a
one-shot down-counter with one load/count register, so the driver
uses the register either for periodic top handling or for relative
single-shot alarms.
Absolute alarms are reported as unsupported because programming an
alarm reloads the hardware counter and changes the value space that
an absolute target would be measured against. Clear stale pending IRQ
state around start, stop, cancel, and alarm setup.
Built and ran tests/drivers/counter/counter_basic_api on frdm_mcxa153
with CONFIG_COUNTER_MCUX_WAKE_TIMER_ALARM=y.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Set min/max properties for PLL/PLLI2S/PLLSAI multiplier and consider
F401xx and F2xx specific min value at build time in driver implementation.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Set min/max properties for PLL/PLLSAI1/PLLSA2 multiplier, input divisor
and PLL/PLLSAI1/PLLSAI2 P divisor on STM32L4/L5 and consider L4 non-L4+
specific ranges at build time in driver implementation.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
enable the nvme disk by default, if enabled in the
devicetree, also select all PCIE dependencies.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Previously, the `pac194x_sample_fetch` function would always read data
from all enabled physical channels over the I2C bus, regardless of which
specific sensor channel was actually requested by the caller. This commit
updates the fetch routine to respect the requested channel.
Signed-off-by: Albert Jakieła <jakiela@google.com>
Add microchip,refresh-mode property to Mictochip PAC194X/195X.
This property allows configuring the sensor's refresh behavior
directly from the devicetree.
Signed-off-by: Albert Jakieła <jakiela@google.com>
Move the main property logic to dai_ssp_get_properties_copy() and reuse
it for dai_ssp_get_properties(). This allows to avoid the extra memcpy for
dai_ssp_get_properties_copy().
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The current dai_ssp_get_properties() implementation requires additional
layer of locking on user side as the properties object is modified in
the function, but the data is not same for TX and RX directions. If the
DAI is used concurrently for TX and RX, this can lead to a race with
invalid data returned.
Fix the issue and align the ssp driver to other DAI drivers by
separating TX and RX state, and only modifying object for one
direction at a time.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Added FIFO support for PSE84 autanalog SAR. The FIFO is 512 elements
deep. It can be subdivided into x8 64 elements to support 8 independent
streams of ADC data.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Added support for FIR filters in the PSE84 autanalog SAR ADC. There
are two filters, each supporting up to 64 taps. The output can
optionally be fed into the SAR FIFOs.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
expose option bytes reading / writing via flash_ex_op interface
flash_stm32_option_bytes_write fails if flash is not unlocked
Signed-off-by: Mariusz Kryński <mrk@sed.pl>
Move the main property logic to dai_alh_get_properties_copy() and reuse
it for dai_alh_get_properties(). This allows to avoid the extra memcpy for
dai_alh_get_properties_copy().
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The current dai_alh_get_properties() implementation requires additional
layer of locking on user side as the properties object is modified in
the function, but the data is not same for TX and RX directions. If the
DAI is used concurrently for TX and RX, this can lead to a race with
invalid data returned.
Fix the issue and align the alh driver to other DAI drivers by
separating TX and RX state, and only modifying object for one
direction at a time.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
dai_alh_get_properties() used the caller-provided stream_id without
any validation. The value is used to index the fixed-size
alh_handshake_map[] array and to compute the FIFO register offset, so
an out-of-range stream_id results in an out-of-bounds read and a bogus
FIFO address.
Reject negative and too-large stream_id values up front and return
NULL. dai_alh_get_properties_copy() already maps a NULL result to
-ENOENT, so the error is propagated cleanly to the caller.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
- Selects CRC_DRIVER_HAS_CRC16_ITU_T for the NXP LPC CRC driver.
- The NXP LPC CRC peripheral is able to compute CRC-16/ITU-T
(polynomial 0x1021, init 0x0000, noreflection, no XOR-out).
- Tested by private code (Zephyr does not test it).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
In counter_renesas_ra_agt_cancel_alarm(), the early return when
agtcmai_irq is BSP_IRQ_DISABLED skipped the spinlock release at
the out: label. Convert to goto out pattern to match the style of
the rest of the function. Also fix the out: label to return ret
rather than 0, so FSP errors are correctly propagated.
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Add NXP_WIFI_SLIM and NXP_WIFI_SLIM_DISABLE_DEBUG Kconfig options
for resource-constrained platforms.
NXP_WIFI_SLIM disables some advanced Wi-Fi features by default.
NXP_WIFI_SLIM_DISABLE_DEBUG disables Wi-Fi error and warning logs.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
The out_ack capability is meant for the exact silicon design that
the nRF chip family uses. By setting it to the correct value, a lot of
workaround code can be cleaned up.
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
Remove obsolete Kconfig options that are no longer referenced
in the codebase:
- NXP_WIFI_CAPA: uAP Wi-Fi Capability
- NXP_WIFI_EU_VALIDATION: EU Validation Support
Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
This commit adds units to fields in enums and union. It marks the
legacy enum/union fields as __deprecated as they will be removed in next
release.
It also updates the release notes and migration notes with the
deprecation notice as required by the policy.
Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
Add a Zephyr cache backend for NXP LPCAC instances whose control
signals are wired through the MCM CPCR2 register. The backend exposes
instruction-cache enable, disable, and full invalidation through the
standard cache API.
Select the matching MCUX cache_lpcac HAL component with the new
HAS_MCUX_MCM_LPCAC capability. This keeps MCM-controlled LPCAC separate
from the existing SYSCON LPCAC backend.
Build coverage is provided by the MCXW7xx enablement that uses this
backend in the following commit.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Don't write to "DEVICE_MMIO_GET(dev)". Instead, store the register
base address in the data struct and use it for accessing the
registers later.
Also return a volatile pointer with DEV_UART and change
DEVICE_MMIO_NAMES_x to DEVICE_MMIO_x.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
The Zephyr GPIO subsystem requires struct gpio_driver_config and
struct gpio_driver_data as the first members of the driver's config
and data structs respectively, since the subsystem casts pointers
to these types directly. Initialize port_pin_mask from devicetree.
Switch DEVICE_MMIO to named variants since the unnamed macros assume
MMIO is the first struct member, which is no longer the case.
Also fix DEV_CFG to return a const pointer.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Don't write to "DEVICE_MMIO_GET(dev)". Instead, store the register
base address in the data struct and use it for accessing the
registers later.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Adds a display driver for the Himax HX8353E 132RGB×162 TFT LCD
controller, driven via MIPI DBI Type B (Intel 8080 parallel bus).
Features:
- Standard MIPI DCS init sequence (SLPOUT, MADCTL, COLMOD, DISPON)
- GRAM cleared to black before display-on to prevent pixel flash
- 20 ms post-DISPON backlight delay: one full frame scan (~16 ms) for
GRAM to paint plus ~4 ms LC layer settling, before enabling backlight
- Four display orientations via MADCTL
- Window caching to skip redundant CASET/PASET on consecutive writes
- RGB565X pixel format: 8-bit bus sends high byte first;
PIXEL_FORMAT_RGB_565X signals byte order to callers
- Optional GPIO backlight on/off
- Optional PWM brightness control via set_brightness()
Signed-off-by: Andrew Yong <me@ndoo.sg>
The driver drove subtimer 0 as a fixed periodic source whose ISR always
called sys_clock_announce(1), and sys_clock_elapsed() returned 0. Two
consequences:
- A periodic interrupt serviced more than one tick period late dropped
the missed ticks (announce(1) cannot catch up), so uptime fell behind
real time.
- With elapsed() pinned at 0, k_uptime_ticks() advanced only at tick
interrupts, so it lagged real time by a variable 0..1 tick. At a fine
tick rate this made tick-quantized measurements (e.g. the time-slice
tests) come up a tick short.
The hardware already exposes what a proper driver needs: subtimer 1 runs
as a free-running 1 MHz up-counter. Use it as the definitive time base
and make the driver tickless:
- sys_clock_elapsed() reports whole ticks since the last announce, read
from the free-running counter.
- sys_clock_set_timeout() computes an absolute tick-aligned deadline
(announced + (last_elapsed + ticks) periods) and programs it as a
one-shot relative delay on subtimer 0, since GPTIMER has no absolute
compare register.
- The ISR derives the elapsed tick count from the free-running counter
and announces all of it, so a late or coalesced interrupt no longer
drops ticks.
When CONFIG_TICKLESS_KERNEL=n the driver keeps subtimer 0 periodic and
announces from the same free-running base, so the non-tickless path is
preserved. select TICKLESS_CAPABLE accordingly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
A pin requesting both input-enable and output-enable matched neither
switch case and left both disabled. Test the two bits independently
so a bidirectional pin keeps both directions enabled.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Disable the EUSART transmitter and receiver immediately upon
completion of a transfer, rather than deferring it to PM Device
Runtime suspend.
The transmitter and receiver are always re-enabled as part of
configuring a new transfer.
This fixes an issue when CONFIG_PM=y where the driver would
not block deep sleep when it was idle, but would wake up with
an inconsistent internal shift register state. Safely shut down
the transmitter and receiver whenever they are not used to
avoid this scenario.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Adopt the new HAL/LL interfaces: ADC_LL_* macros,
esp_clk_tree_* clock helpers, and rng_ll_* entropy reads
across the adc, i2c, pwm, mdio and entropy drivers.
Update the Radio blobs to latest version.
Update linkers to include new sleep cache calls.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
In Multi-LED mode, nothing prevents sending an incorrect slot to the chip.
One could unintentionally send a "reserved" slot code, which could result
in unexpected behavior. Values must be between 0 (time slot disabled)
and 3 (Green LED channel). For the MAX30102, the max value should be 2.
This fix limits the sensor binding using min/max properties and simplifies
the translate map generation by testing if the time slot is not disabled.
Signed-off-by: Alban Chauvel <a.chauvel@catie.fr>
The MAX30101 sensor driver does not correctly support the Multi-LED mode.
If a user sets four LEDs in the "led-slot" binding property, the fourth
measurement in the FIFO will be lost. Fix it by separating the number
of slots available in each FIFO sample (four) from the number of LED
channels available (three for the MAX30101, two for the MAX30102).
Signed-off-by: Alban Chauvel <a.chauvel@catie.fr>
Adds OWE security mapping for scan, connect and SoftAP security
configuration in the NXP Wi-Fi driver.
Signed-off-by: Anton Rejoe <antonrejoe@gmail.com>
Adds OWE security mapping for scan, connect and status operations
in the ESP32 Wi-Fi driver. OWE is supported for STA mode only;
AP mode is not supported.
Signed-off-by: Anton Rejoe <antonrejoe@gmail.com>
Add a fake LED controller driver which can be used as either a stub or a
mock in Zephyr test suites.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for checking and marking bad blocks in the shell via the
new commands:
- `flash is_bad [<device>] <address>`
- `flash mark_bad [<device>] <address>`
This allows users to identify and manage bad blocks on flash devices
that support these operations.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
I/DCACHE_LINE_SIZE is only defined when I/DCACHE is enabled.
Also fix wrong usage of DCACHE_LINE_SIZE when operation is for ICache.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Make the MCUX LPTMR system timer follow the devicetree
zephyr,system-timer chosen node again. The symbol still depends on the
chosen node being enabled and compatible with nxp,lptmr, so the driver
is only selected when DTS names an LPTMR as the system timer.
This keeps devicetree as the source of truth for the selected system
timer and avoids builds where DTS points at LPTMR but Kconfig silently
keeps SysTick.
Validated with configure-only builds for FRDM-MCXW70, FRDM-MCXW71,
FRDM-MCXW72, TWR-KE18F, FRDM-MCXC444, and i.MX95 M7. Also ran
FRDM-MCXW72 hello_world and FRDM-MCXC444 power_mgmt_soc on hardware.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The DMAMUX driver used direct calls to functions in the drivers for the
actual DMA controllers... but was doing so using a dispatch table, which
was effectively a duplicate of the existing DMA API.
Use the DMA API directly and drop the handrolled dispatch table, while
also cleaning up the DMA drivers which don't need to export functions
anymore when the DMAMUX driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Switch back to target io mode after sfdp_read().
If target io mode is not single, sfdp_read() will switch to single
and leave it that way. This would cause the subsequent mspi_xip_config()
call to be issued in the wrong io mode. This change makes sure
the target io mode is switched to again after the sfdp_read().
Signed-off-by: Mike J. Chen <mjchen@google.com>
Use CONFIG_KERNEL_LOG_LEVEL in STM32 radio timer driver to rely on kernel
log level instead of the default generic log level configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use CONFIG_OTP_LOG_LEVEL in STM32 BSEC OTP driver to rely on OTP
drivers generic log level instead of the default generic log level
configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Each BLE controller blob variant reports a fixed number of ACL TX
packets in the HCI LE Read Buffer Size response (extracted from the
binaries): 2 to 16 for BL70x, 2 or 8 for BL60x, 2 to 8 for BL70xL and
4 or 10 for BL61x. Set the BT_BUF_ACL_TX_COUNT default per selected
variant so the host allocates exactly as many bt_conn_tx contexts as
the controller has buffers, silencing the hci_core mismatch warning
and using the controller queue fully.
Signed-off-by: William Markezana <william.markezana@gmail.com>