Move all vendor specific configuration that doesn't come from devicetree
to a dedicated struct that is passed by reference to the common creation
macro. This enables new optional configuration to be added without the
headache of the common macro parameter changing. It also makes it much
clearer in the vendor files what the millisecond delays are without
having to refer back to the macro argument order.
Additionally fixes the the `autostart` parameter from the common macro.
`DT_INST_PROP_OR` only uses the `OR` value if the property doesn't
exist, but the `autostart` property is boolean, and boolean devicetree
properties always exist.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a dedicated modem driver module for the Telit LEx10Q1 family
(LE910Q1 and LE310Q1) LTE Cat 1 modules. The driver defines the
device-specific AT command sequences for modem initialization, dial
connection, periodic network registration polling and shutdown.
The LEx10Q1 modules support CMUX multiplexing with N1=127 MTU and are
targeted for IoT and M2M applications with integrated IP connectivity.
This module is part of the vendor-specific modem cellular framework
that consolidates individual modem definitions into separate files
for better modularity and maintainability.
Signed-off-by: Luca Impagliazzo <Luca.Impagliazzo@telit.com>
Add support for IT8951 EPD controller, tested on reTerminal E1003
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Cursor:composer-2
uart_rx_disable() may be called when RX was never enabled (e.g. test init).
Do not report this case as an error; log it at debug level instead.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
Remove call of LPUART_Deinit() from mcux_lpuart_configure().
LPUART_Deinit() disables the LPUART clocks. If the configuration is not
supported, this may leave the LPUART in an uninitialized state with its
clocks disabled. Any subsequent access to LPUART registers can then
cause a hard fault.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
NXP MCXC devices use the 4-channel DMA controller (nxp,4ch-dma) which
does not support eDMA-style "live reload" while the channel is busy.
This causes async RX double-buffering to fail when the next buffer is
preloaded from uart_rx_buf_rsp().
Introduce a per-instance rx_dma_live_reload flag derived from the DT DMA
controller compatible, and adjust async handling accordingly:
- Preload the next RX buffer only when live reload is supported.
- For nxp,4ch-dma, re-arm RX DMA from the DMA completion callback.
- Stop the TX DMA channel on completion to prevent repeated IRQs and treat
DMA errors as TX aborts.
- Set DMA block address adjustment fields explicitly for RX and TX.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
Some devices do not provide LPUART FIFO support and therefore
lack LPUART_GetRxFifoCount(). Guard the FIFO-drain loop with
FSL_FEATURE_LPUART_HAS_FIFO and fall back to draining the RX data
register based on status flags.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
MCUX LPUART async DMA configuration currently assumes eDMA-style DMA
specifiers (<mux source>). MCXC boards using nxp,4ch-dma describe DMA as
<channel source> instead.
Select the correct DT cell name based on the DMA controller compatible
and guard DMA config generation for instances without a 'dmas' property.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
All supported controllers (ILI9340/9341/9342C/9163C/9488) use
identical MADCTL register bit definitions. Hence the current separate
command sets CMD_SET_1/CMD_SET_2 is unnecessary. Remove it and
implement a single, datasheet-compliant orientation mapping for all
ILI9xxx controllers.
Replace rotation logic with the universal datasheet mappings:
- 0°: 0x00
- 90°: MV + MX
- 180°: MX + MY
- 270°: MV + MY
Add devicetree properties for panel-specific corrections:
- h-mirror/v-mirror: for mirroring variations
- bottom-top-refresh/right-left-refresh: for non-standard scan
directions
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/105521 and
https://github.com/zephyrproject-rtos/zephyr/issues/106489
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Update Infineon AIROC Wi-Fi driver to use the new WIFI_STA_AUTO_DHCPV4
config option instead of directly checking CONFIG_NET_DHCPV4 when
deciding whether to automatically restart the DHCPv4 client after STA
connection is established.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Update NXP Wi-Fi driver to use the new WIFI_STA_AUTO_DHCPV4 config
option instead of directly checking CONFIG_NET_DHCPV4.
This allows the driver to respect the application's preference for
automatic DHCPv4 startup behavior, while still supporting the DHCPv4
functionality when enabled in the network stack.
The driver now only manages the DHCP timer and automatic DHCP client
startup when CONFIG_WIFI_STA_AUTO_DHCPV4 is enabled. When disabled,
the DHCPv4 client can still be used if CONFIG_NET_DHCPV4 is enabled,
but must be manually controlled by the application layer.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
When using the LoRa Basics Modem or Native backends, the SYNC word is
user-configurable. Allow users to set it to a specific (non-zero) value.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In the 'off' path, sensor_trigger_set clears the hardware trigger
then find_sensor_trigger_device removes the bookkeeping entry. If the
device was not in sensor_trigger_devices[] (inconsistent state),
shell_error was printed but err remained 0 and the function returned
success. Return -ENOENT so the caller sees the failure.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
Replace four scattered k_mutex_unlock/return pairs with a single
goto unlock label. Each error path sets err and jumps to the label;
the lock and unlock are paired at the top and bottom of the function.
Adding a new error path now only requires goto unlock rather than a
manually-added unlock call.
The goto on sensor_read_async_mempool failure also prevents a thread
deadlock. sensor_processing_with_callback calls rtio_cqe_consume_block
which blocks with K_FOREVER waiting for a CQE. If the mempool call
fails (e.g. -ENOMEM from SQE pool exhaustion) no SQE is submitted and
no CQE ever arrives. Without the goto, the shell thread spins inside
sensor_processing_with_callback while holding cmd_get_mutex, causing
all subsequent 'sensor get' calls to fail with -EBUSY permanently.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
cmd_get_sensor discarded the error from sensor_read_async_mempool and
always returned 0. Return err so callers can detect a failed read.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
cmd_sensor_attr_set and cmd_sensor_attr_get never acquire cmd_get_mutex.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Assisted-by: Claude:claude-sonnet-4-6
Current code keeps polling the matrix and processing debouncing events
as long as keys are currently pressed, this works fine on an idle system
as long as the poll timeout is long enough to include few debouncing
cycles after the last key has been released, but if the system has been
busy enought that the keyboard task has not been scheduled for a while
and all keys have been released in the meantime, the system will do a
debouncing cycle and fall back into idle even if there are keys that are
waiting to be released.
Fix this by keep polling the matrix as long as any key is pressed
(current condition, bit set in matrix_new_state) OR any key was pressed
and is pending release (bit set in matrix_stable_state) or is currently
being debounced (just to play safe).
The check is implemented in a new function for clarity and efficiency
reasons, so it's not piggybacked into input_kbd_matrix_scan anymore.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a driver for the TM6605 haptic motor driver IC from Titan Micro
Electronics, found on the DFRobot DRI0056 Gravity module. The device is
a write-only I2C peripheral exposing 44 pre-programmed effects selected
through an effect register and triggered via a control register.
The driver implements the haptics subsystem start_output/stop_output
callbacks and adds a tm6605_select_effect() extension API to choose the
active effect at runtime. A devicetree binding is included.
Tested on Seeed XIAO nRF54L15.
Signed-off-by: Anuj Deshpande <anuj@makerville.io>
Add `modem_cellular_emit_event` declaration to the driver header so that
vendor instances can use the function.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix a typo in mcux_igpio_configure() for CONFIG_SOC_MIMX8MQ6_M4
where `flag` was used instead of `flags` when checking
GPIO_PULL_DOWN.
Signed-off-by: Paolo Wattebled <paolo.wattebled@savoirfairelinux.com>
This commit fixes two boundary calculation bugs within read_non_aligned()
in the nrf_qspi_nor driver:
1. Prefix Alignment: Removed the `if (flash_prefix > size)` check. This
check artificially capped the prefix, resulting in unaligned addresses
being passed to the nrfx HAL.
2. Suffix Out-of-Bounds: Replaced the hardcoded WORD_SIZE * 2 suffix
read with a dynamic size check. Previously, if a read ended near the
physical boundary of the flash chip, the hardcoded 8-byte read would
request memory outside the chip's physical address space.
Fixes#109139Fixes#109140
Signed-off-by: T Madhusudhan Rao <tetakalam@aerlync.com>
Added the ability to capture a RAW8 capture by using the GREY FourCC format
through the dump pipe.
Without this patch you could get Grey RAW8 via the pipes 1 and 2 but
not through pipe 0 "dump" pipe. To use Pipe 0 you would have to pretend
the format is a bayer pattern with RAW_BAYER_UNPACKED(8).
Which would cause mismatches when you tried to actually use the buffer.
Signed-off-by: Brenden Adamczak <cerebralasylum1@gmail.com>
Add a guard for `eth_esp32_iomux_rmii_clk_input` function to fix the
following error:
error: 'eth_esp32_iomux_rmii_clk_input' defined but not used
[-Werror=unused-function] 245 | static void
eth_esp32_iomux_rmii_clk_input(void)
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
Include zephyr/logging/log.h in the AIROC WHD HAL files that use
LOG_MODULE_DECLARE() and LOG_ERR().
This fixes builds of samples/net/wifi/shell for
cy8cproto_062_4343w/cy8c624abzi_s2d44.
Fixes#109151
Signed-off-by: Shan Pen <bricle031@gmail.com>
Add optional devicetree properties to configure SEDI I2C bus timing and
program those values during driver initialization.
Update the binding with standard, fast, fast-plus, and high-speed timing
properties so boards can provide bus-specific values from DTS instead of
relying only on built-in defaults.
Also update hal_intel revision in west.yml to get code for new changes in
the driver to work properly.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Add a driver for the Diodes/Pericom PI4IOE5V6408 8-bit I2C-bus I/O
expander.
The chip provides eight independently configurable GPIO lines, each
with optional pull-up or pull-down resistor and an interrupt source
that fires on transitions away from a programmable default state.
Link: https://www.diodes.com/datasheet/download/PI4IOE5V6408.pdf
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Use dma-coherent dt prop to determine, if
cache operations are needed before and after
DMA operations.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Copy the information filled in the Tx packet by the link layer
during IEEE 802.15.4 transmission before exiting the
stm32wba_802154_tx() function.
Drop the packet from the Tx_done callback issued by the
link layer after a radio reset.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
memcpy is not optimized for the Cortex-M core due to this :
https://github.com/zephyrproject-rtos/zephyr/issues/95154
Modify this by writing each word individually only when source address
is aligned to 4 bytes boundary.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
When requesting/releasing the no_latency mode for the mram, verify that
the request/release is successful to avoid running into infinite loop if
the mram controller is in autopowerdown mode.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
Fix the case where the MRAM writes get corrupted in some conditions.
After each "MRAM_WORD_SIZE write", a read of the written/erased MRAM word
is performed while masking the bus faults to avoid halting the system.
If an error is detected in the BFSR status bits, retry the write for a
maximum of CONFIG_NRF_MRAM_MAX_RETRIES (default 20) times.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
When writes are issued to the mram controller without verifying that it
is ready, it can cause the reads to be stalled until all writes finish.
Fix this by adding a wait busy loop before each MRAM_WORD aligned write
and disable autopowerdown before starting the write.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
Add a BULID_ASSERT to make sure that the write_block_size defined in the
device tree is a multiple of the MRAM_WORD_SIZE which is 16B (128 bits)
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
Determine the expiry status before the read to ensure that this function
only returns `-ETIMEDOUT`` if the flash still isn't ready *after* the
provided `timeout_us`. Checking after the read (in the while condition)
can result in the status being read once on function entry, then the
thread not resuming from the `k_sleep` until after the timeout expires.
The changes the timeout behaviour of `spi_nand_wait_until_ready` from
"Flash not ready at some point before expiry" to "Flash still not ready
after at least `timeout_us`".
Signed-off-by: Jordan Yates <jordan@embeint.com>
This reverts commit 67a29d7f98.
After this commit a BT testcase
tests/bsim/bluetooth/ll/throughput/tests_scripts/\
gatt_write_no_phy_update.sh
started failing, where the RTC1 interrupt fires
in an infinite loop after 4m:17s.
This is blocking all BT related PRs.
Let's revert this commit while the issue is debugged to unblock
development.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Refactors the adltc2990 sensor driver to extract sample fetching into
static functions, and uses the new functions to support fetching
individual channels or all channels at once.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
The MAX30102 is register-compatible with the MAX30101 but has only
Red and IR LED channels (no Green LED). Re-use the existing MAX30101
driver by switching DT_DRV_COMPAT to maxim_max30102 and guarding
Green LED operations with an is_max30102 flag in the config struct.
A shared MAX3010X_INIT macro with a chip argument avoids duplicating
the device instantiation code between the two variants.
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Implements the counter_api reset callback for the NXP LPTIMER
driver to reset the counter to the initial value.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
CS40L26/27 is a family of haptics drivers designed for mobile
applications.
This PR provides basic functionality for ROM features and serves
as a starting point for the upstream driver. Notably, RAM firmware,
SPI, and certain ROM features (e.g., GPIO triggers and custom PCM
and PWLE effects) are not supported.
Tested I2C and all included features with both device variants (A1
and B2), including ROM and buzz playback, calibration, and gain
configuration.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Set pmf_cfg.capable for WPA2-PSK so the station advertises PMF
capability, which transition-mode APs require to associate.
Add WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL handling. STA path uses
WPA2-PSK threshold with PMF capable so it can still associate to
WPA2-only and transition APs. AP path advertises WPA2/WPA3 mixed
mode, guarded by CONFIG_ESP32_WIFI_SOFTAP_SAE_SUPPORT.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Lift the unsol_matches table out of modem_cellular.c.
Each driver now declares its own match table via the new
MODEM_CELLULAR_UNSOL_DEFINE() helper, which generates the matches array
and a small modem_cellular_config_unsol descriptor in one go. Drivers
point at it through the new `unsol` field on modem_cellular_config.
Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>