- BUS_FREE_AVAIL_TIMING (offset 0xD4) holds two independent counts:
a. [15:0] BUS_FREE_TIME / MST_FREE: controller tCAS, tCBP, tCASr
and tBUF_I3C (pure bus) or I2C tLOW (mixed bus)
b. [31:16] BUS_AVAILABLE_TIME: target tAVAL used to start an IBI
- DWC MIPI I3C Databook (Altera/Intel UG-683130 16.8.43): both fields
share one 32-bit register. Dual-role instantiations
(1 < IC_DEVICE_ROLE < 5, DW_HAS_BUS_IDLE) always program tAVAL and
tIDLE even when the IP is the active controller, so a later
mastership request still has legal target timing.
- dw_i3c_init_scl_timing() wrote BUS_I3C_MST_FREE() then overwrote the
same register with BUS_I3C_AVAIL_TIME(), which clears bits [15:0].
With MST_FREE = 0 the controller no longer inserts a programmed
bus-free / clock-after-START gap. On the wire START, STOP and
repeated-START (including SETDASA Sr) stretch out to the target
tAVAL (1 us) / tIDLE (1 ms) path instead of tCAS.
- Do not skip AVAIL/IDLE programming when is_secondary is false:
DEVICE_CTRL_EXTENDED can switch the role at run time. Read-modify-
write each half of 0xD4 instead.
- Tested on Alif Ensemble dual-role DW I3C, START/STOP/Sr on the scope.
Assisted-by: Cursor:Grok-4.6
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
Commit d374d84cd0 ("drivers: i3c: dw: program the DAT static
address field") writes DEV_STATIC_ADDR when a device is known only
by its static address, and writes DEV_DYNAMIC_ADDR only when
desc->dynamic_addr is already non-zero.
That does not match how this driver, or the DWC MIPI I3C IP, uses
the Device Address Table.
i3c_bus_setdasa() attaches the descriptor before the CCC, while
desc->dynamic_addr is still 0 (RSTDAA has just cleared it). The
requested DA from DT assigned-address lives in init_dynamic_addr
and is sent as the SETDASA payload. dw_i3c_do_ccc() then issues
SETDASA as a Transfer Command (CMD_ATTR=0, CP=1, DEV_INDEX), not
as an Address Assignment Command (CMD_ATTR=3).
DWC MIPI I3C Databook (Altera/Intel UG-683130, DWC_mipi_i3c):
- 16.5.2.4.1 DAT Data Structure: "For transfer commands, the
Dynamic Address is used as the Target address for all
communications." DEV_DYNAMIC_ADDR[23:16] is that address
(bit 23 is odd parity of bits 22:16). STATIC_ADDRESS[6:0] is
not the transfer-command target.
- 16.8.53 DEV_ADDR_TABLE_LOCx: LEGACY_I2C_DEVICE=1 selects I2C
(STATIC); 0 selects I3C (DYNAMIC).
On the wire the Transfer-Command SETDASA therefore becomes:
7E W + SETDASA + Sr + DEV_DYNAMIC_ADDR W
With DYNAMIC left at 0 that is Address 00 W NACK. Observed on
Alif Ensemble with BMI323 (SA 0x69, assigned-address 0xA).
Restore DEV_DYNAMIC_ADDR(dynamic ?: static) as in the original
driver (PR #64528) and Linux dw-i3c-master.c, and keep writing
DEV_STATIC_ADDR. After SETDASA succeeds, i3c_bus_setdasa()
sets desc->dynamic_addr and reattach updates DYNAMIC to the
assigned DA.
Assisted-by: Cursor:Grok-4.6
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
Making DAT entry program unconditional, and instead gate only the
SIR_REQ_REJECT write on the role. The DAT entry conditional is
problematic for dual-role devices - without it a dual-role controller
rejects IBIs from the target that should have been enabled by
i3c_ibi_enable.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Add a clamp to lcnt to avoid an underflow scenario when calculating
achievable SCL. Issue observed when requesting an unachievable rate,
resulting in an underflow and thus getting the slowest possible rate.
Also adds a LOG_WRN to inform the user that we got the best SCL we
could, not the one they asked for.
Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
After a NACK (e.g. an expected NACK during MCTP polling), the NPCX
I3C controllerterminates the transfer and returns to the IDLE state
on its own. However, npcx_i3c_xfer_stop() only handled the NORMACT
and MSGDDR states and logged a warning for anything else, making
such NACK produced a spurious "xfer_stop state not supported".
Change so IDLE is silently handled, removing the spurious warning.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Private transfers that intentionally probe a target (e.g. MCTP
polling) may legitimately receive a NACK on the target address.
Use new I3C_MSG_NOACK_EXPECTED flag to track when a NACK is expected and
silently return -ENODATA instead of loudly erroring.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Direct CCC commands were queued without a TID, so every response came
back as TID 0 and was recorded against cmds[0], each overwriting the
last. With more than one target, the first target took the rx_len and
error of the last one, and the others kept their requested lengths.
num_xfer was then wrong, and a target ending a read early could
misalign the data read back for the others.
Tag each command with its index as private transfers do, and cap direct
CCCs at the eight user TIDs instead of the descriptor array size. No
in-tree caller addresses more than one target.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Every command was written up front, so a transfer was capped at what the
Command Queue holds. A controller command occupies two DWORDs, cmd_hi
then cmd_lo, so a Command Queue of eight DWORDs only fits four messages.
Write as many whole commands as currently fit and let CMD_QUEUE_READY
refill the queue from the ISR as the controller drains it, which also
keeps it fed past the point where the controller stalls SCL waiting for
the next command. Payload is still bounded by the txfifodepth and
rxfifodepth checks.
A transfer is now capped at the eight user TIDs, one per command, which
match responses to commands. TIDs above that range are generated by the
IP and are not counted against the transfer. In target mode a Master
Write status still has its RX data delivered to the target callbacks;
such a write can arrive before i3c_target_register(), so the callback
lookup tolerates a NULL target_config.
The ISR can now run while start_xfer() is still queueing commands, so
cmd_idx, the CMD_QUEUE_READY enable and QUEUE_THLD_CTRL are accessed
under a spinlock. start_xfer() holds it from resetting the transfer
state through arming CMD_QUEUE_READY; otherwise an error torn down by
the ISR in between would be re-armed by a stale INTR_STATUS_EN write,
and the ISR would push the rest of the aborted transfer. The flush after
the disarm needs no lock, as a disarmed refill cannot write the queue.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
The response-ready threshold was set to the full command count, but the
field is a FIFO occupancy level, so any transfer with more commands than
the response FIFO holds stalled until the timeout. The command FIFO guard
does not cover this, as the two depths are synthesized independently.
Drain the responses across several interrupts instead, completing only
once every command is accounted for.
The error check now covers every response, where it used to scan
cmds[0..nresp-1] regardless of TID, and returns the first error. A
TRANSFER_ERR without an error response now fails the transfer with -EIO
instead of reporting success.
QUEUE_THLD_CTRL_RESP_BUF() now masks its result to the field, as the
other QUEUE_THLD_CTRL setters do. A count of zero wrapped to 0xFFFFFF00
and overwrote the IBI status and IBI data thresholds, which are only
programmed at init.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
dw_i3c_do_ccc() indexed the command descriptor array with
payload->targets.num_targets without checking it, so a direct CCC
addressing more targets than the array holds would write past the end.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
A timed-out transfer was abandoned with the controller still running, so
its late responses and semaphore give leaked into the next transfer.
Callers masked the false completion by seeding xfer->ret with -1.
Tear the transfer down instead: flush the FIFOs and queues, clear the
TRANSFER_ERR and TRANSFER_ABORT status and resume, then return
-ETIMEDOUT rather than the -EAGAIN from k_sem_take(). The error path
shares the helper, which waits for the self-clearing RESET_CTRL bits,
something the driver never did. The wait is bounded, as it runs in the
ISR; if the bits do not clear, the controller stays halted rather than
resuming over the aborted commands.
recover_bus() uses the same reset and returns -EBUSY, as documented for
i3c_recover_bus(), when the flush does not complete.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
The ESP32-C5 MCPWM prescaler registers store the programmed
prescaler value minus one.
Increment the group and timer prescaler values before passing
them to the ESP HAL low-level functions. Without this adjustment,
the generated PWM frequency differs from the requested frequency.
Signed-off-by: Yoichi Tachibana <kombunorino2@gmail.com>
The offloaded interface has no Zephyr-side IP addresses because the host
stack owns them, so responders such as mDNS cannot answer hostname
queries (e.g. zephyr.local).
Enumerate the represented host interface's addresses and register them on
the offloaded net_if when it comes up, including the netmask. The
snapshot is taken once at interface-enable; later host address changes
(DHCP renew, add or remove) are not reflected. Raise the default
per-interface unicast address counts for NSOS builds to hold them.
Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier.ext@siemens.com>
The offloaded socket layer maps the single Zephyr interface to one host
interface. Resolve that interface and pin all multicast to it:
- Add nsos_adapt_host_ifindex(), returning the configured host interface
index or, when none is set, the default-route interface via a route
lookup (preferring IPv4 when the families disagree).
- Route IP_ADD_MEMBERSHIP / IPV6_ADD_MEMBERSHIP joins and the
IP_MULTICAST_IF / IPV6_MULTICAST_IF egress control through that ifindex.
- Set the IPv6 scope_id on mid translation so link-local groups bind to
the represented interface.
Add NET_NATIVE_OFFLOADED_SOCKETS_HOST_IF_NAME to name the host interface
explicitly; empty selects the default-route interface.
Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier.ext@siemens.com>
Forward the IPv4/IPv6 multicast TTL, hop-limit and loop socket options
from the offloaded (nsos) socket layer to the host socket. These are
plain integer options with no interface dependency and are needed before
a responder such as mDNS can control its multicast egress.
Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier.ext@siemens.com>
Use sys_ref to track the lifetime of the transfer when it is passed
between the layers. The semantics is similar to net_buf's
net_buf_ref()/net_buf_unref(). This also removes the need to call
uhc_xfer_free() and simplifies the reuse of the transfer by the class
drivers.
uhc_xfer_free() should be removed once all the users are ported to use
uhc_xfer_unref().
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The shell could only reach the LoRa modem, so the GFSK one had no way of
being exercised by hand. Give it a command of its own, matching the two
calls the driver API offers, so neither has to say which of its
parameters apply.
Both configurations carry the direction, so an operation names it in the
one it is about to apply, and whichever was named last is the one
applied, the way the driver acts on the configuration that reached it
last.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
Set the radio up for GFSK: modulation and packet parameters of its own,
the sync word written to the register the modem matches on, and the CRC
and whitening seeds LoRaWAN's FSK datarate asks for. A bandwidth request
takes the narrowest receive filter at least as wide.
All of that lives in sx126x_gfsk.c, built only when the modem is wanted,
so the shared file carries neither it nor the guards it would need. The
handful of helpers it calls lose their static.
The whitening seed is a nine-bit value and only the low bit of its high
byte belongs to it. What the rest of that register holds is the radio's,
so the byte is read back and only the one bit replaced.
Bit rate, deviation and their combined occupied bandwidth are held to the
ranges the datasheet gives, which also keeps the values inside the
registers they are written to. A fixed-length frame is clocked out at the
configured length, so any other length is refused rather than putting
whatever the buffer still held on air, and airtime reports that length.
Frequency and transmit power are reached the same way whichever modem
follows, so they move into a helper the two configurations share, as does
taking and releasing the radio. Selecting the modem resets part of the
radio, so it now comes before that rather than after.
The packet status bytes mean different things under the two modems, so
the read follows the one in use. The four operating paths each rebuilt
the LoRa packet parameters by hand to set a payload length; they call one
function now, which builds them for the modem the radio is on.
The packet type was selected once, while bringing the radio up. Adding a
path that selects the other one left nothing to put it back, so from the
first GFSK setup onwards LoRa parameters went to the GFSK modem and
nothing left the antenna. It is stated on every configuration now.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
Set the radio up for GFSK, where bandwidth is named in Hz rather than
picked from the steps the LoRa modem offers. The setup lives in
lbm_gfsk.c, built only when the modem is wanted, so the shared file
carries neither it nor the guards it would need.
The send and receive paths used the LoRa packet parameters and packet
status whatever the radio was set up for. Both follow the modem in use
now, as does airtime. GFSK measures no signal-to-noise ratio, so a
received packet carries zero rather than a reading never made.
Whether a transmission had anything to go on was decided by looking for a
spreading factor, which GFSK has none of. Ask instead whether the stored
parameters still describe the radio, and record the modem only once it
has taken them, so a rejected configuration cannot leave the radio marked
as a modem it was never put into.
A fixed-length frame keeps the length it was configured with rather than
taking the one being sent, and any other length is refused.
The CRC-16-CCITT seed and polynomial LoRaWAN asks for are what these
parts reset to. The whitening seed is not: they come up at 0x0100 and
LoRaWAN wants the register full of ones.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
The library takes the modem as the first argument of every radio call and
the backend named the LoRa one everywhere, so a GFSK configuration had
nowhere to go.
Store the modem the last configuration selected and name it in the four
calls that act on the running one: the three that set a maximum payload
length, and the RSSI read. Airtime reads the GFSK settings when that is
the modem, and reports the configured length for a fixed-length frame,
which is what the radio clocks out whatever it is handed.
The library states FSK bandwidth across one sideband, so the value is
halved on the way in. Under FSK its datarate argument carries the bit
rate and the preamble length counts bytes.
Bit rate and deviation are held to the ranges the datasheet gives, which
also keeps the registers the library writes from taking a truncated
value, and a transmission that does not match a fixed length is refused.
Sync word, pulse shape and whitening are fixed by the library, so a
configuration asking for anything else is refused rather than quietly
ignored. What it writes is what RP002 asks of an end-device.
Only the library's SX126x radio reaches the FSK modem this way. Its
SX127x one leaves the sync word and whitening at reset values, so a frame
it sent would match nothing, and that radio goes on answering -ENOSYS.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
These parts carry a GFSK modem alongside the LoRa one with no way to
reach it, which leaves out the 50 kbps FSK that LoRaWAN defines as EU868
DR7 and the plain FSK links the radios are equally built for.
Add struct lora_modem_config_gfsk and lora_config_gfsk() rather than a
modulation field in the LoRa configuration. Almost nothing carries over:
of the two fields that share a name, bandwidth is a filter width in Hz
rather than one of the LoRa steps, and the sync word is up to eight bytes
rather than one.
Bandwidth is stated across both sidebands, the way radio datasheets state
their channel filters, so a single-sideband figure from a regulation is
halved by the caller who read it.
The preamble counts bytes where a radio counts bits in sixteen of them,
so LORA_GFSK_PREAMBLE_MAX caps it. A fixed-length frame carries no length
byte, so payload_len is what the radio clocks out and a transmission of
any other length is refused.
Declarations stay unconditional so a driver can fork on the modem with
IS_ENABLED() rather than the preprocessor. CONFIG_LORA_GFSK keeps the
implementation out of drivers that have no use for it, and one without
the operation answers -ENOSYS.
Nothing implements it yet.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
When operating in Buffer DMA mode, DWC2 driver would stop responding to
control transfer under following scenario:
1. USB host issues control transfer, device ACKs it
2. USB device stack starts processing control transfer
3. USB host suspends the bus
4. DWC2 driver enters hibernation
5. USB stack finishes processing control transfer, enqueues buffers
6. USB host issues bus reset or resumes the bus
7. DWC2 driver exits hibernation
8. USB host issues new control transfer, device ACKs it
9. USB device stack never gets the setup buffer because the controller
did not issue any interrupt. DWC2 driver is completely unaware that
the host started control transfer.
Fix the issue by detecting the problematic condition on hibernation exit
and cancelling obsolete requests and/or enqueueing SETUP buffer.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The VL53L5CX is a TimeOfFlight sensor allowing to get
multi-area range information.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The driver was marked experimental because frame intervals and controls
are not implemented yet. Adding them later extends what the driver
supports through the video API without changing its devicetree binding,
so there is no reason to keep it experimental. Drop the EXPERIMENTAL
selection and the prompt suffix.
Assisted-by: Antigravity:gemini-3-pro
Signed-off-by: Changyeon Jo <changyeon@google.com>
A host pipe holds 64 KiB by default, less than a single frame of the
default 320x240 RGB565 format. The host writer then blocks mid-frame
until the driver drains the pipe, and the driver waits poll-interval-ms
between two reads, so every larger frame takes several polls to arrive.
The default format could not keep up with a 30 fps writer, and 640x480
YUYV frames arrived at under 6 fps whatever the writer rate.
Enlarge the pipe with F_SETPIPE_SZ when the stream starts, and when a
larger format is selected while streaming, so that it holds two frames:
with room for a single one, the host writer stalls until each frame is
read. The pipe is never shrunk, so smaller frames are unaffected.
Unprivileged processes cannot go beyond /proc/sys/fs/pipe-max-size,
1 MiB by default, nor /proc/sys/fs/pipe-user-pages-soft for all their
pipes together. The largest allowed capacity is used instead, and the
driver warns that the frame rate may be limited.
F_SETPIPE_SZ needs _GNU_SOURCE, which the bottom half defines as other
native simulator bottoms do. Also spell out that when the pipe runs
dry mid-frame, the rest of the frame is read on a later poll.
Assisted-by: Antigravity:gemini-3-pro
Signed-off-by: Changyeon Jo <changyeon@google.com>
Reword EEPROM driver Kconfig prompts to follow the style guide
from #95132, using the "{Driver Name} EEPROM driver" format.
Part of #7272.
Signed-off-by: Minh Anderson <minh.anderson@dojofive.com>
Distinguish dropped frames from an empty RX queue so the RX thread
continues processing after a drop. This allows HAL API v2 to rebuild
pending DMA descriptors and prevents reception from remaining stalled
after temporary packet exhaustion.
Signed-off-by: Tomas Choat <trc@ixys.no>
The SCB reinit block in spi_set_frequency() only runs when
data->is_peripheral is false, so the spiMode ternary always evaluated
to CY_SCB_SPI_MASTER. Assign CY_SCB_SPI_MASTER directly.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
`ifx_cat1_spi_int_frequency()` stores `(hz * oversample_value)` in
`oversampled_freq` at the top of each loop iteration, but the range
checks and the divider calculation recompute the product. Use the
stored value instead.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Nothing keeps the PM policy from putting the SoC into Stop while the
controller is enabled. On STM32F4, Stop disables the PLLs (RM0090
Rev 22 sections 5.3.4 and 5.3.5), including the one whose Q output
clocks the OTG controllers, so on an STM32F429I-DISC1 with CONFIG_PM=y
the device never enumerates.
Lock PM_STATE_SUSPEND_TO_IDLE, and PM_STATE_SUSPEND_TO_RAM with
CONFIG_PM_S2RAM, from udc_stm32_enable() until udc_stm32_disable(), as
uart_stm32, spi_stm32 and the other STM32 drivers do while they are
busy. udc_disable() marks the controller disabled even when
udc_stm32_disable() fails, so the states are released on every path
out of it.
Tested on the STM32F429I-DISC1: samples/subsys/usb/cdc_acm enumerates
with CONFIG_PM=y, and the SoC no longer enters Stop while the
controller is enabled.
Fixes#120448
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: YunHung Hua <oliverhua.us@gmail.com>
Every read went to the start of the RX buffer, so data from an earlier
UART_RX_RDY could be overwritten before the user had read it. Advance
the offset through the buffer instead, wrapping once it is full.
Signed-off-by: Eden Frosst <eden.frosst@rbr-global.com>
The async RX thread sleeps 10 ms whenever the pty is empty, adding up
to 10 ms of latency to every received byte. Make the period
configurable, keeping 10 ms as the default.
Signed-off-by: Eden Frosst <eden.frosst@rbr-global.com>
ifx_hppass_sar_configure_group() composes SEQ_ENTRY from scratch and
writes the whole register, but never sets SAMP_TIME_SEL. The field is
therefore written as 0 on every conversion, which the PDL defines as
CY_HPPASS_SAR_SAMP_TIME_DISABLED: no sampling timer, so the group gets
only the minimum fixed acquisition window.
That is enough for a channel that is already selected, but not for one
reached through an analogue mux. Channels 12-27 are four mux inputs on
each of four samplers, so moving between two channels of the same
sampler always reconfigures the mux, and the conversion then latches
before the hold capacitor has charged to the new input. The value
reported for a channel is largely the previous channel's voltage.
This does not add a configurable field. The driver already programs
all three sampling timers to 32 cycles in
ifx_hppass_sar_pdl_cfg_struct_default and then selects none of them,
so the timers are populated and simply left unused. Infineon's Device
Configurator emits those same {32, 32, 32} values together with
.sampTime = CY_HPPASS_SAR_SAMP_TIME_0 for this part. Select timer 0,
to match.
Measured on KIT_PSC3M5_EVK, alternating channel 12 (the onboard
potentiometer) and channel 15 on muxed sampler 0, reading each twice
and sweeping the pot across its full range. Worst-case difference
between the first and second read of the potentiometer channel:
sampling timer disabled 3068 counts
timer 0, 32 cycles 2 counts
Unpatched, the first read of channel 12 sits at ~830 wherever the pot
is set, which is channel 15's voltage. Patched, it tracks the pot to
within 2 counts over the whole 0-4095 range, in both directions of
transition. KIT_PSC3M5_CC2 behaves the same way.
Directly sampled channels are unaffected either way. Channel 4 is the
mikroBUS AN pin on a direct sampler; driven from a Click board it
reads the same before and after this change, both at ground and at
4063 counts, with no difference between its first and second read in
either build.
tests/drivers/adc/adc_api passes on the same board (7 pass, 1 skip).
Signed-off-by: Clark Jarvis <Clark.Jarvis@infineon.com>
The fake stepper file implements both the controller and the
driver compatibles. A devicetree that enables only one of them
leaves the other init function unreferenced, which fails the
build under -Werror. Mark both init functions __maybe_unused.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add a "snps,dw-apb-uart" binding that includes ns16550.yaml, and make
UART_NS16550_DW8250_DW_APB default to y whenever a node with that
compatible is enabled. This removes the need for each SoC to opt in
to the DesignWare 8250 quirks through a configdefault in its
Kconfig.defconfig.
Drop the now-redundant configdefault from the Allwinner H3/H618,
Rockchip RV1106 and Silabs SiWx91x SoCs, and add the
"snps,dw-apb-uart" compatible to the SiWG917 UART nodes so the
Kconfig default picks them up.
The UART nodes in dts/arm/intel_socfpga_std/socfpga.dtsi already list
"snps,dw-apb-uart", so the option is now also enabled on
cyclonev_socdk, where it was previously off. The Cyclone V HPS UARTs
are DesignWare APB UARTs.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Long runs of erase and write operations keep the flash cache
disabled, and on multi-core SoCs the other core parked, for the
whole run unless the driver yields between windows. Add the
options that size that yield: whether to yield at all, the
cumulative cache-off budget, the yield length and the write
window size. The flash layer reads them through its port.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
netc_eth_tx() only entered the TX-timestamp wait loop when opt.flags
had kEP_TX_OPT_REQ_TS set. That flag is set only for endpoint
timestamps; a DSA conduit-port frame requests its timestamp via a
separate txDesc TSR_MASK flag. So a DSA-only timestamp request skipped
the wait loop, its TX descriptor was never reclaimed, the ring filled
up, and the driver blocked forever on tx_sem.
Track the request in a local req_ts flag set by either path, and use
it to enter the wait loop. The endpoint isTsAvail branch still checks
opt.flags so an endpoint timestamp is only reported when requested.
Signed-off-by: Youri Tils <youri.tils@nxp.com>
Add support for the AMS TCS34725 color light-to-digital converter
driver. Supports RGBC channel reads via the sensor API, color
temperature calculation, and illuminance (lux) calculation.
Signed-off-by: Darshan Maru <darshan.maru@dnkmail.in>
CMDREADDRR holds the last address of the range, inclusive, as the STM32
HAL does with addr + size - 1. The driver wrote addr + size, so a range
ending on a cache line boundary also covered the next line, and an
invalidate then discarded pending CPU writes to that line.
Return 0 early for size 0, where size - 1 would wrap around.
Signed-off-by: Kirill Shypachov <kshypachov@outlook.com>
The DWC MAC PTP clock can drive a pulse-per-second output on a SoC pin.
That pin belongs to the PTP clock, not to the MAC, so boards need a way
to mux it only when the ptp-clock node is enabled.
Add pinctrl-device.yaml to the snps,dwmac-ptp-clock binding and let the
PTP clock driver apply the default pinctrl state during init. Pinctrl is
optional: the driver keeps building for nodes without pinctrl-0, and the
Kconfig symbol selects PINCTRL only when a ptp-clock node uses it,
following the pattern of the DWC MAC MDIO driver.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The EMAC timestamp clock was taken from the RMII/MII transmit clock the
PHY drives into the SoC, divided to the MII-side rate. That ties the PTP
clock to the PHY: it is 25 MHz at best, giving an 80 ns sub-second
increment, and on an MII link at 10 Mbps it drops to 2.5 MHz, where the
800 ns increment no longer fits the 8-bit SSINC field and the system time
runs slow.
Attach MUX_9 to PLL_PHI0 undivided instead, as the S32K3 clock driver
does for the same EMAC. It is locked to the crystal, independent of the
PHY and the link speed, and 160 MHz on the FRDM-MCXE31B. This also meets
the two requirements the MCXE31x reference manual places on this clock:
at least 1.5 times AIPS_SLOW_CLK for the timestamp memory self-test and,
because FlexCAN timestamping shares EMAC_TS_CLK, at least the FlexCAN
protocol engine clock.
Each domain now carries its own divider, since the timestamp clock no
longer shares the pad clock divider with the receive and transmit
domains.
Assisted-by: Claude:claude-fable-5.1
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The driver now works on the STM32F107, verified on an STM32F107VCT6 with
a DP83848 PHY in MII mode.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
CCM32K registers survive a warm boot. If a previous application selected
osc32k as the 32k source and this one disables it, CCM32K_Set32kOscConfig()
asserts. Switch the 32k source back to fro32k first when that happens.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Add 802.11k/v/r support to the station path: advertise radio
measurement and BSS transition capability on association, and
implement the neighbor report, BSS transition query and
capability management operations on top of the supplicant.
A low RSSI watch reports a worsening signal to the application,
which decides when to roam; the driver never picks an AP on its
own. Over a BSS transition the address is kept and DHCP is not
restarted, which the application can turn off when the access
points are in different subnets.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
(SRAMC), the external asynchronous parallel SRAM interface found on i.MX
RT118x SoCs (e.g. MIMXRT1189). At init the driver reads the async-SRAM
bus timing from devicetree, so the external SRAM becomes accessible as
a memory-mapped region. No runtime data-transfer API is implemented.
The SRAMCR0/SRAMCR1 timing registers reside in the BLK_CTRL_WAKEUPMIX
block; each populated chip-select is described as a sram child node.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
The implementation of WKUP event dispatch as GPIO interrupts had a small
flaw: any pin that gets configured as wake-up pin would implcitly have
interrupt dispatch enabled for it, even if the pin was never explicitly
configured as interrupt source. This would most likely have no nefarious
effect since it wouldn't make sense to register GPIO callbacks for a pin
which is known to not be used for interrupts, but it was a possibility
nevertheless. A more realistic case where this causes issues is that if
interrupts were really enabled for the pin, but disabled later on, we
would still dispatch a WKUP event for that pin even though interrupts
were explicitly disabled.
Separate enablement of a pin as wake-up line source from enablement of
interrupt dispatching, and modify the GPIO driver such that it enables
the dispatch from gpio_pin_interrupt_configure() at the same time that
the regular interrupt is also enabled (ditto for disable).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add driver for the TI TPS6287x family of Step-Down Converters
Assisted-by: Claude:claude-sonnet-5 coccinelle
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>