Move RMII data plane pin selection to the pinctrl-0 property using
the RMII_* macros from the SoC pinctrl header. The pads use dedicated
EMAC IOMUX, so the driver reads the (slot, GPIO) pairs and routes them
directly instead of through pinctrl_apply_state(). Update the esp32
ethernet kit board to use the new rmii_default group.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The NXP SCTimer's outInitState field defines the output levels applied at
initialization, before any PWM channel is configured. Needed for active
low loads to not flicker at startup
Signed-off-by: Johan Eklund <Johan@meck.se>
Add conditional GPIO selects for ST sensor drivers when their
bindings expose *-gpios properties, including properties inherited
from included common binding files.
This aligns Kconfig GPIO dependencies with devicetree binding data.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
rcar already had a function to map timing mode to a string. Move that
function into the shared header and use it from multiple drivers. Also
use a shared function to convert voltage to a string instead of open
coding it everywhere.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
The dma_suspend() implementation detected end-of-transfer based on
a software flag (stream->busy) rather than hardware status flags. This
is an issue because dma_suspend() is isr-ok and may thus be called while
IRQs are suspended; this prevents the DMA ISR from running and updating
software flags to reflect the actual hardware state.
This causes a deadlock if, while IRQs are suspended, a transfer on a
channel N completes then dma_suspend() is called to suspend channel N
while IRQs are still suspended. In this situation, the channel is idle
but stream->busy is still true because the DMA ISR could not execute.
Since suspending an idle channel has no effect, the SUSPF flag will
never become set and a deadlock occurs because both of the conditions
for exiting the loop in dma_suspend() will never be met.
Modify the function to rely exclusively on hardware flags to detect the
channel's current state, such that the loop will not deadlock even if
the DMA ISR cannot run because IRQs are suspended.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
On some STM32 SoCs, multiple comparators share a common NVIC interrupt
line, they can only be enabled at the same time with
CONFIG_SHARED_INTERRUPTS set. This means the IRQ handler can be called
even though the EXTI flag is not set.
This change makes shure the comparator trigger callback is only executed if
the EXTI line is pending.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Nordic's nPM10 Series PMIC LED driver and Devicetree bindings.
LED driver outputs on nPM10 devices are multiplexed with GPIOs.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
On MCXW7x the clock controller does not auto-enable peripheral gates;
each driver enables its clock in init via device_is_ready() and
clock_control_on(), as already done by lpuart, lpi2c and gpio. Bring the
NXP CRC driver in line with that model: enable the CRC clock through the
clock-control framework when the node provides a "clocks" property
(guarded by COND_CODE_1, so MCXN/LPC parts without one are unchanged),
and add the clocks property to the MCXW70/MCXW71/MCXW72 CRC nodes.
The MCUX HAL CRC_Init() also ungates the clock, so the peripheral was
already functional; this expresses the clock dependency in devicetree
and lets the clock-control framework track it.
Tested with tests/subsys/crc on frdm_mcxw70 and frdm_mcxw71:
pass = 14, fail = 0.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The DMIC backend streams PCM samples from a host file via host-libc I/O
helpers, supports a command-line override for the input file path, is
documented in the native_sim board guide, and adds dmic to the supported
peripherals in native_sim.yaml.
Assisted-by: GitHub Copilot:GPT-5.4
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
Update common AIA coordinator shared by IMSIC and direct mode to
initialize based on which APLIC mode is configured in DT.
Signed-off-by: Omar Naffaa <onaffaa@qti.qualcomm.com>
Add ACP 7.X support to the AMD ACP SoundWire DAI driver
(drivers/dai/amd/sdw/acp_sdw_dai.c):
- Include ACP 7.X specific register headers (acp7x_chip_offsets.h,
acp7x_chip_reg.h) when CONFIG_ACP_7_X is selected
- Add a 4-instance SoundWire DMA channel map (SDW0-SDW3, 22 pins
each) for ACP 7.X
- Add acp_sdw_get_dma_channel() helper for per-instance channel
resolution, populating dma_hs_id for both DAI_DIR_RX and
DAI_DIR_TX directions
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Add ACP 7.X support to the AMD ACP interrupt controller driver
(drivers/interrupt_controller/intc_acp.c). When CONFIG_ACP_7_X is
selected the driver includes the ACP 7.X specific register headers
(acp7x_chip_offsets.h, acp7x_chip_reg.h) which define the interrupt
control and status register layouts for the ACP 7.X audio DSP.
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Add cellular modem driver for Nordic nRF93M1 Cat 1 bis module
The DTS binding was already submitted in #106289
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Initialized new_cfg in adc_ad7124_channel_setup.
In order to determine if two channel configurations
are identical, memcmp is used. The channel configurations
are stored in structs, which means that there are padding
bytes which are also compared when using memcmp.
The proposed solution is to initialize the struct with 0,
which forces the padding bytes to also be zero. Later,
when assigning values to the actual fields of the structure,
the padding remains 0. This means that comparing two
zero-initialized structs with memcmp will only compare
the respective values of the fields inside the struct,
which is the expected behavior. A better idea might be
to actually compare field-by-field values.
Signed-off-by: Raluca Bozdog <raluca.bozdog@analog.com>
Added runtime selection of current-source: reselected before each
read operation, allowing channels to be read regardless of having
a shared current-source with another channel or not.
Multiple ADC channels share the same current-source pin,
which means that after the init of the ADC the current-source
which actually is set is the one of the last configured channel.
Reading from other channels in the same application will not
return correct values, because the current-sources of the other
channels are only shortly configured during init and then
written over by the last channel configuration.
To overcome this, the application would need to call the
channel_setup function before each sample read, which
essentially means that a runtime reconfiguration should be
handled by the user, which comes against the expected ADC behavior.
To solve this, the proposed method is to apply the current source pin
inside the driver, before each read. The current_source_pin, thus,
becomes a property of an adc_channel itself, instead of being an adc
global field. The iout index value is also added to make sure that IOUT0
fields of the IO_CONTROL_1 register are not overwritten when modifying
the values of IOUT01 fields of the same register.
Signed-off-by: Raluca Bozdog <raluca.bozdog@analog.com>
Modified ADC configuration slot allocation logic:
The ADC has only 8 slots available for storing
channel configurations. The previous slot
allocation logic always tried to fill a new slot.
If none was available, it checked for an already
existing similar configuration to be used instead.
This caused problems when trying to read 9 channels.
Once all the slots are filled, no distinct configurations can be added.
The fix proposes this logic instead:
check if any similar configuration is already stored;
if so, use the similar one; otherwise, try to find a new slot;
if all spots are filled, an error code is returned
Signed-off-by: Raluca Bozdog <raluca.bozdog@analog.com>
Replace DT_NODE_HAS_PROP() instead DT_PROP() to test presence of
st,timeout property since it's more consistent. The DT property min value
is 1 hence testing against value 0 makes no sense.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Replace a COND_CODE_1() logic with use of DT_INST_PROP_OR() to get
the wakeup-line DT property for STM32 UART devices.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add "long press" reset and SHPHLD wake-up configurations to the nPM10
Series MFD driver's Devicetree properties.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
The capture-related code in the FlexPWM driver unconditionally
references kPWM_CaptureA*Flag / kPWM_CaptureB*Flag and CVAL2..CVAL5
registers, which do not exist on SoCs whose FlexPWM only supports input
capture on the X channel (for example MCXA153, where
FSL_FEATURE_PWM_HAS_CAPTURE_ON_CHANNELA/B are 0 and only CHANNELX is 1).
This caused a build failure as soon as CONFIG_PWM_CAPTURE was enabled
on such SoCs.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Implement the Zephyr PWM capture API using the CTIMER
capture-clears-timer feature.
One capture channel is configured to fire an IRQ on the active
edge while ENCC/SELCC clears TC+PC on the opposite (or same) edge so
that CR latches the period or pulse width directly with no software
subtraction. The INPUTMUX is configured at driver init from a new
inputmux-connections DT property that lists <captsel-index, connection>
pairs.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
CTIMER PWM mode emits LOW for MR[pulse_channel] ticks then HIGH for the
remainder of the period, so PWM_POLARITY_NORMAL must map pulse_cycles to
(period - pulse_cycles), not pass it through unchanged.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Set the Interrupt Mask Register (IMR) before the RX Control Register (RCR)
when initializing the DM9051 ethernet controller. This prevents potential
race conditions where the receiver is enabled before interrupt masking
is properly configured.
According to the DM9051A datasheet, IMR bit 7 (PAR - Pointer Auto-Return
Mode) affects memory read/write pointer behavior. Setting IMR first ensures
the memory pointer configuration is ready before RX is enabled.
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
Change STM32 I2C driver to report that I2C bus recovery is not supported
when there are no GPIO defined for the sequence instead of returning
a IO error, helper caller (possibly a tests samples) to handle this
specific error case.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The CLOCK_ATTRIBUTES reply structure has a clock_enable_delay field
only in protocol v3.0. When the platform implements v2.0 (e.g.
RK3588), the reply is 24 bytes but the driver expects 28 bytes,
causing "bad message len" errors.
Fix the inverted comparison in scmi_core_protocol_negotiate() and
store the resolved version in proto->version. Split the reply struct
into version-specific variants and select the expected reply length
in scmi_clock_attributes() based on the negotiated protocol version.
Signed-off-by: Piter Zhang <zhangtdvip@163.com>
Prevent flooding the log when a bus error occurs without a mailbox
generating an interrupt.
Fixes: #110654
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add rpi_fw_transfer_list() to send multiple property tags to the
VideoCore firmware in a single mailbox transaction. Takes an array
of rpi_fw_tag_list descriptors, each holding a tag, data buffer,
and size. All buffers are updated in-place with the firmware response.
Lower RASPBERRYPI_FIRMWARE_INIT_PRIORITY from 60 to 45 to ensure
firmware is ready before dependent drivers.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add a Raspberry Pi framebuffer display driver for the
Broadcom BCM2711 SoC. The driver communicates with the
VideoCore firmware via the Broadcom VideoCore mailbox interface.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
In target mode, read_in_progress is only cleared on STOP_DET.
When a master issues a compound transaction with multiple repeated
STARTs that transitions from read back to write and then read again,
read_in_progress remains set from the first read phase. On the
second read phase the ISR takes the read_processed path instead of
read_requested, returning data from the wrong offset.
For example, an EEPROM-style compound transaction:
S addr+W ptr Sr addr+R [data1] NAK
Sr addr+W ptr Sr addr+R [data2] NAK P
Where S = START, Sr = repeated START, P = STOP, W = write,
R = read, NAK = not-acknowledge (last byte of a read).
data1 reads correctly, but data2 returns stale EEPROM content
because read_requested (which returns the byte at the current
pointer) is skipped in favor of read_processed (which increments
first, then returns the next byte).
Reset read_in_progress when entering a new write phase (RX_FULL
with state != CMD_SEND). This ensures the subsequent read phase
correctly calls read_requested to fetch data at the updated pointer.
The bug can be reproduced with the following C test program using
the I2C_RDWR ioctl against any I2C EEPROM target:
/* 4-message compound: set ptr + read + set ptr + read */
struct i2c_msg msgs[4] = {
{ .addr = 0x54, .flags = 0, .len = 1, .buf = &ptr },
{ .addr = 0x54, .flags = I2C_M_RD, .len = 1, .buf = &rd1 },
{ .addr = 0x54, .flags = 0, .len = 1, .buf = &ptr },
{ .addr = 0x54, .flags = I2C_M_RD, .len = 1, .buf = &rd2 },
};
ioctl(fd, I2C_RDWR, &(struct i2c_rdwr_ioctl_data){msgs, 4});
/* Before fix: rd1 correct, rd2 wrong (stale offset) */
/* After fix: rd1 == rd2 == expected value */
Tested with FT232H master and RP2040 EEPROM target at 400 kHz:
10000 compound w+r+w+r cycles with 0 failures. Also verified with
libmpsse userspace I2C.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Guard Apollo3P Blue-only HAL fields (write latency, DMA boundary,
timing control, instruction/address size runtime control) behind
CONFIG_SOC_APOLLO3P_BLUE ifdefs so the driver also compiles and
runs correctly on Apollo3 Blue.
Add a dedicated MSPI_AMBIQ_BUFF_RAM_LOCATION default for Apollo3
Blue (0x40000) to account for its smaller SRAM layout. Gate the
MSPI_TIMING imply on SOC_APOLLO3P_BLUE since the timing API is
not available on Apollo3 Blue.
mspi_ambiq_timing_config() returns -ENOTSUP on Apollo3 Blue.
mem_boundary and time_to_break return -ENOTSUP if non-zero
values are requested on that SoC.
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Replace the two-line pattern:
net_buf_unref(buf);
buf = NULL;
with net_buf_drop(&buf) which performs both operations
atomically in a single step. Since net_buf_drop() also handles NULL
pointers checks for those before the call can be removed.
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The DTS binding documents fifo-depth range as 2-256, but the
struct field is uint8_t which silently overflows 256 to 0.
Widen to uint16_t so the full hardware range is representable.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Add support for interrup driven UART for the numicro uart driver
targeting the nuvoton m48x line.
This is mostly copied from the uart_numaker driver with some changes.
Signed-off-by: Fiona Behrens <me@kloenk.dev>