Refactor the Microchip XEC tachometer driver to use DTS-encoded
GIRQ and PCR properties instead of series-specific ifdefs,
enabling a unified driver across MEC150x, MEC172x, and MEC175x.
Fix build error from incorrect PCR devicetree configuration.
Remove duplicate include and add missing static qualifier to
tach_xec_sample_fetch().
Co-authored-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Andy Chang <andy.chang@microchip.com>
Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
Fix misaligned break statements in pwm_xec_pm_action() switch-case
block to match the case indentation level.
Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
Refactor the Microchip XEC PWM driver to use DTS-encoded PCR
property via soc_xec_pcr_sleep_en_clear(), replacing per-SoC
ifdefs for PCR init. Move PCR enable before pinctrl apply in
the init sequence.
Signed-off-by: Srinivas Edireswarapu <srinivas.edireswarapu@microchip.com>
Added latch detection mode based on DTS property.
Required register is inaccessible in non-secure
builds and on nRF54H20 SoC. Added hidden Kconfig
to guard it.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Building mr_canhubk3 fails due to improper function declaration.
Fix issue by fixing declaration of eth_nxp_s32_start & eth_nxp_s32_stop.
Fixes issue #108630.
Signed-off-by: Gal Raifen <galraifen15@gmail.com>
Rather than passing every possible script into the common modem
instantiation macro, use a struct to hold all the scripts and pass the
struct instead.
The advantage of this approach is that it makes adding new optional
scripts much less invasive. The script only needs to be added to the
struct and populated in the drivers that will use it, no need to modify
the global macro.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use the correct timing properties for bee_keyscan configuration.
- use common.poll_period_us for manual scan timer
- calculate rel_cnt from release_time_us
- fix autoscan build assert guard
- remove stale debounce_down_us assertion
This fixes mismatched devicetree property usage in the driver.
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
the virtio driver is using k_aligned_alloc and therefore
uses the system heap, add the
HEAP_MEM_POOL_ADD_SIZE_VIRTIO Kconfig,
so we have enought heap for it.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fix two issues in DMA driver:
1. ISR was invoking callback for all interrupts including suspend.
Add check to invoke callback only for transfer complete (TCMPL)
or transfer error (TERR) interrupts.
2. dma_get_status returned stale pending_length after config/reload
because write-back descriptor was not synced with base descriptor.
Sync write-back in dma_mchp_config and dmac_desc_reload_block.
Also improve type safety by changing void* to dmac_descriptor_registers_t*
in descriptor setup functions.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Use dt_compat_any_has_prop for CONFIG_I2C_MCHP_DMA_DRIVEN to allow
mixed DMA/interrupt configurations. Added has_dma field and runtime
checks to select transfer mode per I2C instance based on device tree
dmas property presence.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
Add a retained memory driver for GD32 backup SRAM.
The driver exposes the memory region defined by devicetree reg, enables
the BKPSRAM clock gate, and optionally enables a vin-supply regulator
for retention power.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Add a regulator driver for the GD32 Backup SRAM LDO (BLDO) controlled via
PMU. This enables modelling BLDO as a standard supply in devicetree
(vin-supply) and allows consumers to request retention power through
the regulator API.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Introduce Kconfig symbol to add mutex lock protection to the driver API.
Prevent multi-threaded access from a pre-emptive thread.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Enable the optional clock described in devicetree during eDMA
driver initialization.
Keep RT7xx request-enable programming in board init so this
branch only moves the clock-control portion into the driver.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add RT7xx eDMA clock IDs to the MCUX SYSCON clock bindings and
handle them in the shared clock control driver.
This provides the common gate support needed for RT7xx eDMA
instances to be managed through the clock control API.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add optional devicetree reset support to the MCUX eDMA
driver and deassert the reset line during initialization
when a reset specifier is provided.
Boards which do not describe a reset remain unchanged.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Align eth_wch with updated ethernet API by passing net_if to
and eth_wch_stop/start() from PHY link state change handling.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Fix ENET QoS behavior needed for IEEE 802.3 PTP transport.
Strip received Ethernet FCS bytes before packets reach upper layers,
enable store-and-forward mode for reliable PTP timestamps, and only use
RX timestamp context descriptors when the normal RX descriptor reports a
valid timestamp. Also update the PTP clock callback signature to match
the current Ethernet API.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Add EDAC driver for NXP MECC64 IP providing ECC functionality
for On-Chip RAM (OCRAM). The driver supports:
- 4 independent OCRAM banks with ECC protection
- Single-bit error correction and double-bit error detection
- Error injection for testing purposes
- Interrupt-driven error reporting
- Device tree based configuration
- Standard Zephyr EDAC API implementation
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
For the STM32WL Low Power PA at max_power=15 dBm and frequencies above
400 MHz, the SX1261 datasheet specifies paDutyCycle=0x06. The drivers were
setting 0x07 instead, which is outside the documented range and can lead to
undefined behavior on the PA stage.
Fix the value to 0x06 in both the loramac-node and native SX126x
STM32WL HAL implementations.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
In target mode only, the IBI work queue is unnecessary and doesn't
compile. Take it out of the build chain by only selecting I3C_IBI_WORKQUEUE
if I3C_CONTROLLER is set
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
During bus initialization we conditionally execute
GETCAPS and CRCAPS, however we do not store them
in our tracking of that target device.
This stores the information so that we can look at it later
(e.g. via i3c_shell info)
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
User configurations can select to build with
CONFIG_TARGET_MODE_ONLY=y. This doesn't link because
the source file i3c_common registers the i3c log, and
is only compiled when CONFIG_I3C_CONTROLLER is set.
Instead, compile that file always. Take out compilation of the
(presumably unused) functions present in that file when compiling
for TARGET.
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
find_last_checkblock() passes a NULL error pointer to
find_checkblock(), which is forwarded to dhara_nand_read().
If a read error occurs, dhara_nand_read() attempts to write
to the NULL pointer, causing a crash.
Fix this by guarding all error assignments and using
dhara_set_error(), which safely handles NULL error pointers.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Restore the mcux LPTMR compare period to the default top value
when an alarm is cancelled.
The counter basic API alarm-capability probe can arm and cancel
a short LPTMR alarm before test_valid_function_without_alarm()
runs. Without restoring the compare period, a later
counter_start() may still use the previous short match value.
That causes the FRDM-MCXC444 test to fail with counter ticks not
in tolerance.
Reset the timer period back to max_top_value and clear the
compare flag during cancel so the device is left in the expected
state for subsequent starts.
Keep a clarifying code comment near the cancel path to note that
LPTMR uses one CMR register for both the period and alarm value.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Extend the shared BFLB HCI driver with BL60x (BL602) support: BL60x
include paths, controller init macros, IRQ setup, and platform shim
forward declarations.
Kconfig adds BT_BFLB_BL60X with two controller variant choices
(m1s1, m8s1) and smart defaults based on enabled BT roles.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add a driver for the MS5637-02BA03 digital pressure & temperature
sensor from TE Connectivity (Measurement Specialties).
The driver implements the Zephyr sensor API with support for
SENSOR_CHAN_PRESS (kPa) and SENSOR_CHAN_AMBIENT_TEMP (degrees C).
Oversampling ratio (OSR) is configurable at build time via Kconfig
and at runtime via SENSOR_ATTR_OVERSAMPLING.
Includes full PROM CRC-4 validation per AN520 and second-order
temperature compensation per the MS5637 datasheet.
Signed-off-by: William Markezana <william.markezana@gmail.com>
If first PWM sequence is set to 100% glitch free duty
cycle, period_cycles will remain uninitialized while
all used channels will use PWM. If following
sequences request non-100% duty cycle, period
cycles will have to be changed. Improve error
condition to allow changing period cycles for
running PWM if these are equal to 0.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Add Kconfig options to control whether the GRTC timer is stopped
and/or cleared when the driver is uninitialized (e.g. when
sys_clock_disable() is called).
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Use the Clock controller to get the frequency of the WDT clock instead
of hand roling with some defines owned/intendet for the clock
controller.
Signed-off-by: Fiona Behrens <me@kloenk.dev>
Add System Clock Controller for the M480 nuvoton MCU.
This only adds the base driver to setup HIRC, HXT, LIRC, LXT and
PLL. Configuring the PLL driver from a target frequency with
calculating values to best match this frequency.
Signed-off-by: Fiona Behrens <me@kloenk.dev>
Implement the counter_api reset callback for the NXP LPC CTimer
driver to zero the timer counter register
while keeping the timer running.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Don't report an error if the private data is empty when detaching.
This can happen if a device was attached, and then it didn't go
though entdaa, and was then detached.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Only disable the i2c and give the semaphore after the bus becomes
inactive.
Otherwise, software may observe that the transfer is complete while
data is still pending in the hardware fifo. Disabling the controller
too early can cut off the transfer and cause communication failure.
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
Add promisc mode capability for bridge.
There's no filtering really so enabling promisc is a noop but
pretending to have support is needed to allow these
to be added to a bridge.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This patch adds support for SCMI Base protocol.
It provides helpers if ARM_SCMI_BASE_HELPERS is enabled for:
- obtaining SCMI firmware revision information
- agent management helpers
scmi_base_discover_agent()
scmi_base_device_permission()
scmi_base_reset_agent_cfg()
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
DT_SCMI_PROTOCOL_DEFINE_NODEV previously failed for the base SCMI protocol,
as it relied on DT_REG_ADDR_RAW to fetch protocol IDs. The base protocol is
not represented as a separate child node in the devicetree, but is enabled
by default when the transport node is present.
Modify DT_SCMI_PROTOCOL_DEFINE_NODEV and DT_SCMI_PROTOCOL_DEFINE to
handle protocol IDs correctly for all SCMI protocols, including the base
protocol.
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
according to the api in include/zephyr/storage/disk_access.h
a negative errno value should be returned on fail.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>