Add support for the AMD/Xilinx AXI Timer as a Zephyr system
clock driver for soft-core CPUs such as MicroBlaze and
MicroBlaze V.
The driver targets the common dual 32-bit timer configuration
where timer1 is used as a free-running clock source and
timer0 is used as a clock event source.
Timer1 operates as an up-counter with auto-reload enabled.
Timer0 supports both periodic and one-shot operation and is
used to implement tickful and tickless kernel modes
respectively.
Signed-off-by: Alp Sayin <alpsayin@gmail.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Satya Sri <satyasri.katru@amd.com>
Implement the target error callback in the driver to support the new
common I2C target API error callback.
Report timeout through the target error callback based on the target
status.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Implement the target error callback in the driver to support the new
common I2C target API error callback.
Report timeout and arbitration errors through the target error callback
based on the target status.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Add support for processing buffers with non-multiple-of-block-size
lengths.
Fix mchp_aes support for test_ctr_encrypt_partial which was added by:
e3ac7e9ed5 "tests: crypto: Add AES test cases for Infineon MXCRYPTO"
Signed-off-by: Tony Han <tony.han@microchip.com>
siwx91x_on_join runs on the WiseConnect event-engine thread. Sync NWP
commands from that context (multicast filter via net_if_dormant_off,
DHCP, power-save) block the engine so BLE RX buffers cannot be freed and
the shared pool exhausts. Defer that work to the system workqueue.
Signed-off-by: Devika Raju <Devika.Raju@silabs.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Devika Raju <Devika.Raju@silabs.com>
Add device pm support so the LPUART can be re-initialized
after a low-power state that collapses its power domain
(for example i.MX RT700 deep-sleep-retention), which loses
all peripheral state.
The suspend action saves and masks the enabled interrupts
so a pending interrupt cannot fire its ISR against the
powered-down register bank; the resume action re-initializes
the peripheral and restores those interrupts, and the ISR
bails out while suspended. pm_device_driver_init() establishes
the initial device state.
This relies on the LP_FLEXCOMM parent being resumed first
to re-select the peripheral in the wrapper, which device PM
guarantees via init-priority ordering.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add device pm support to the LP_FLEXCOMM multi-function
wrapper so it can be brought back after a low-power state
that collapses its power domain (for example i.MX RT700
deep-sleep-retention).
Such a state resets the wrapper: PSELID[PERSEL] clears,
so no communications function is selected and, per the
reference manual, the selected module's register-interface
clock is internally gated -- any access to a child
(LPUART/LPSPI/LPI2C) register then bus-faults.
Add a resume PM action that re-deasserts reset and re-selects
the peripheral, and call pm_device_driver_init() to establish
the initial device state. device PM resumes the wrapper before
its children (it has the lower init priority), so PERSEL is
restored before a child driver touches its registers.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Move the child scan and the LP_FLEXCOMM_Init peripheral-selection logic
out of nxp_lp_flexcomm_init() into a new nxp_lp_flexcomm_select_periph()
helper so it can be reused. No functional change.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The HAL2 mspi_stm32_xspi_memmap_off() checked whether memory-mapped mode
was active before stopping it, while the legacy one did not, and the
check already exists in mspi_stm32_xspi_abort_memmap_if_enabled().
Drop the check from the adapter and let mspi_memmap_config() go through
that helper, like every other caller already does. The stop is now only
issued while memory-mapped mode is active, which is the documented
precondition of HAL_XSPI_StopMemoryMappedMode(), and both adapters behave
the same again.
On the legacy HAL this means HAL_XSPI_Abort() is no longer called when
memory-mapped mode is not active; that abort had nothing to abort on this
path.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Add the STM32Cube2 (HAL2) implementation of the HAL adapter section,
selected by CONFIG_STM32_HAL2, so the driver also works on series
delivered with STM32Cube2 only, such as STM32C5. Everything below the
adapter section is compiled unchanged for both HAL generations.
The HAL2 adapters mirror the legacy ones one-to-one; the differences
come from the HAL2 API itself:
- HAL_XSPI_Init() takes the instance as an argument and the
controller configuration goes through HAL_XSPI_SetConfig() and
HAL_XSPI_SetFifoThreshold() instead of handle Init fields
- the memory size values are the DCR1 DEVSIZE field content rather
than the raw value, and the memory type constants use a different
prefix, both derived from the same devicetree properties
- commands are sent with HAL_XSPI_SendRegularCmd(), auto-polling is
started with HAL_XSPI_ExecRegularAutoPoll_IT()
- memory-mapped state is read back with HAL_XSPI_GetState() and left
with HAL_XSPI_StopMemoryMappedMode() instead of a plain abort
- the delay block is set up with DLYB_CalculateMaxClockPhase() and
SetConfigDelay(max / 4), matching the legacy PhaseSel = period / 4.
Both calls restore the delay block to the state they found it in,
so it is enabled explicitly afterwards
- the DMA channel is initialized with HAL_DMA_Init(hdma, channel)
plus HAL_DMA_SetConfigDirectXfer() and linked to the XSPI handle
with HAL_XSPI_SetTxDMA()/HAL_XSPI_SetRxDMA()
- the weak HAL_DMA_Abort stubs are not needed, and stm32_bitops.h
does not exist there, so both are legacy-only now
The legacy code kept the SIOO, prefetch, wrap size, delay block
bypass and 16-line data gates; the HAL2 structures have no such
fields. The DMA transfer path compiles against HAL2 but has not been
exercised on hardware yet (no supported board routes DMA to the XSPI
node).
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Prepare the parts shared between the MSPI drivers for STM32Cube2
(HAL2):
- mspi_stm32.h: under CONFIG_STM32_HAL2, use the HAL2 type names for
the XSPI handle (hal_xspi_handle_t) and the XSPI DMA handles
(hal_dma_handle_t). The OSPI/QSPI members are untouched.
- mspi_stm32_common.c: provide the HAL2 GPDMA LL spellings of the
priority, data width and direction values under the existing
driver-local MSPI_DMA_* names, and switch the direction table to
those names (for legacy they map 1:1 to the HAL constants the table
used before, so the table content is unchanged).
Legacy builds compile exactly the same code as before; nothing
selects CONFIG_STM32_HAL2 together with this driver yet.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
When the auto-polling wait times out, the driver aborts the ongoing
operation but ignored the result of the abort. A failed abort likely
leaves the controller stuck, so check it and emit a warning; the
function still returns -EIO either way.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Collect every remaining piece of code that touches a HAL name whose
spelling or call shape differs between the legacy STM32Cube HAL and
STM32Cube2 (HAL2) into small adapter functions, and group them (with
prepare_cmd/send_cmd, the HAL init, the delay block setup, the DMA
init and the weak HAL_DMA_Abort stubs) in one section at the top of
the file:
- memmap_start(): the memory-mapped mode activation tail of
memmap_on(); the rest of memmap_on() is HAL-independent now
- autopoll_start(): builds and starts the auto-polling configuration;
the semaphore/PM handling stays in wait_auto_polling()
- abort(): wraps HAL_XSPI_Abort(), which takes an extra timeout
argument in HAL2
- is_busy(): wraps the busy flag check used by get_channel_status()
- dma_link_tx()/dma_link_rx(): wrap __HAL_LINKDMA(), which HAL2
replaces with HAL_XSPI_SetTxDMA()/HAL_XSPI_SetRxDMA() calls that
can fail, so the adapters return an errno value
Pure code movement plus the listed extractions; no functional change.
A later commit compiles an HAL2 implementation of this section, so
everything below it becomes common code.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Make read_write_in_indirect_mode() return 0 or a negative errno value
instead of HAL_StatusTypeDef, and let the DMA callback pass its
opaque argument straight to HAL_DMA_IRQHandler() instead of going
through a typed local variable.
Every failure return already ended up as -EIO in the caller, so the
behavior is the same. The point is to keep HAL type names out of the
code that will be shared between the two HAL generations: the status
type and the DMA handle type are named differently in STM32Cube2
(hal_status_t, hal_dma_handle_t), while function names like
HAL_XSPI_Receive() and HAL_DMA_IRQHandler() are the same in both, so
the function bodies can stay common.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Introduce a driver-local command structure (opcode, operation type,
address and its length in bytes, dummy cycles, data length) and one
function, mspi_stm32_xspi_send_cmd(), that translates it into the HAL
command structure and sends it. mspi_stm32_xspi_access(),
mspi_stm32_xspi_status_reg() and mspi_stm32_xspi_memmap_on() now fill
the neutral structure instead of the HAL one.
This is the main preparation for STM32Cube2 (HAL2) support: the two
HAL generations use different names for the command type, its fields
and its enum values, so the translation has to live in exactly one
HAL-specific place for the rest of the driver to be shared.
The callers pass an address length of 0 (no address phase, previously
AddressMode = HAL_XSPI_ADDRESS_NONE), 3 or 4 bytes, matching what
mspi_stm32_xspi_hal_address_size() returned for every input, so the
sent commands are unchanged; the helper is removed and the two
"24-bit address" checks compare the address length directly. The
single-line RDSR case reuses the 1-line settings of prepare_cmd()
instead of patching the command afterwards, which results in the same
command. The duplicated SIOOMode assignment in memmap_on() is dropped
(prepare_cmd() already sets the same value).
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Move the XSPI handle Init fields from the compile-time initializer in
the device instantiation macro into mspi_hal_init(), together with
the Instance assignment that mspi_stm32_xspi_config() did. The values
are unchanged; the devicetree-derived data they need (st,csbound,
st,ssht-enable, and the memory size and type of the child node) is now
carried in the driver config structure. The prescaler search loop
moves to a small helper so the Init assignments read as one block.
The Init fields are only read by HAL_XSPI_Init(), which runs at the
end of this function, so filling them at runtime behaves the same.
This prepares for STM32Cube2 (HAL2) support: the HAL2 handle has no
Init member (configuration is passed to HAL_XSPI_SetConfig() at
runtime instead), so a compile-time initializer cannot be expressed
for it and the device macro must stay HAL-agnostic.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Move the Zephyr DMA driver part of mspi_stm32_xspi_dma_init() (device
ready check, dma_config() call, data size check) into a separate
function. This part does not touch the HAL DMA handle, so it can be
reused as-is by the STM32Cube2 (HAL2) variant of the DMA init, which
configures the HAL side with a different API. No functional change.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Replace HAL_XSPI_TIMEOUT_DEFAULT_VALUE with a driver define of the
same value (5000 ms). The STM32Cube2 (HAL2) XSPI driver does not
provide this macro and its transfer functions take an explicit
timeout, so a driver-owned define lets the same call sites work with
both HAL generations. No functional change.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
The DMA priority lookup table pulled its values from DMA_LOW_PRIORITY_*
and DMA_HIGH_PRIORITY, redefining those HAL-namespaced macros as a
fallback on series whose HAL does not provide them. Shadowing HAL
primitive names is best avoided and does not extend cleanly to a second
HAL generation whose priority constants live under different names.
Introduce driver-local MSPI_DMA_PRIORITY_* macros that map to the
per-series constant, mirroring the existing MSPI_DMA_*_DATAWIDTH_*
handling, and populate the table from them. No functional change: each
macro resolves to the same value as before on every series.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
Across the tree, I/DCACHE_LINE_SIZE is required at compile-time for
macros, compiler attributes, & linker scripts to function correctly
even if run-time cache line detection is available.
So remove the dependency of ICACHE_LINE_SIZE on
ICACHE_LINE_SIZE_DETECT=n, and of DCACHE_LINE_SIZE on
DCACHE_LINE_SIZE_DETECT=n.
DCACHE_LINE_SIZE_DETECT & ICACHE_LINE_SIZE_DETECT Kconfig options
enable querying some SoC register for finding the i/d-cache line size
at the expense of taking more memory and code and a slightly
increased boot time.
Add new hidden options D/ICACHE_LINE_SIZE_DETECT_SUPPORT only selected
by the software component (arch/SoC layer, driver) implementing the system
cache API.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Recently reworked ICBMSG IPC service backend executes receive callback
from an interrupt context of the mailbox driver. Additional thread is
needed and processing of received messages is deferred to that thread.
It is a similar approach like in case of uart (h4.c). Implementation
utilizes RX buffer holding feature so no need to allocate additional
buffer. IPC RX buffer is hold in the receive callback and thread
releases it.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Added pm_action suspend/resume/turn_on routine for PWM
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
install_timeout() reports the timeout it settled on with LOG_ERR, on every
call, whether or not anything was rounded, and the message carries an
embedded newline that breaks the log's own framing.
Nothing here is an error: the driver granularity is fixed and a requested
window that does not land on it is rounded by design. Warn instead, only
when a value actually changed, and say what was asked for beside what was
installed - which is the part a caller needs and the old message left out.
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
The driver waits one millisecond for TCC_SYNCBUSY-style synchronization to
finish, but the watchdog is clocked from the internal ultra low power
oscillator, which reaches the peripheral at about 1.024 kHz on parts of
this family. A single synchronization therefore costs milliseconds rather
than microseconds: enabling the watchdog on a PIC32CM GC00 was measured at
1.12 ms.
The consequence is not only a logged timeout on every boot. The wait
returns while the peripheral is still synchronizing and the driver carries
on writing registers the hardware discards in that state, so the
configuration that ends up in the watchdog is not the one that was asked
for.
Five milliseconds covers the measured value with margin and costs nothing
on a part whose synchronization is quicker, because the wait ends on the
flag rather than on the timeout.
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
Four properties are read with DT_PROP(DT_NODELABEL(wdt), ...), so the
driver compiles only against a devicetree that labels its watchdog node
exactly `wdt`. Nothing in the binding says so, and a board that picks
another label gets an unknown-node error out of the devicetree macros
rather than anything pointing at the cause. Every other property in the
driver already comes through DT_INST.
The driver is single instance in practice - it defines DT_DRV_COMPAT and
iterates with DT_INST_FOREACH_STATUS_OKAY, but these four values size a
structure and bound a loop at compile time, so they cannot vary per
instance without a larger change. DT_INST_PROP(0, ...) keeps that
restriction exactly as it is and drops the dependency on a label.
Left alone deliberately, and worth a maintainer's eye: the neighbouring
WDT_FLAG_ONLY_ONE_TIMEOUT_VALUE_SUPPORTED reads
only_one_timeout_val_supported_flag from DT_NODELABEL(wdog), a label no
devicetree in the tree defines, and the property appears in no binding.
It survives only because it is tested with #if defined(), which is true
for any object-like macro, so the code it guards is compiled
unconditionally and the macro itself is never expanded. Making the guard
honest would change behaviour on every part this driver serves, which is
not a change to make from one board.
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
On Microchip SAM0/SAMx54 family SoCs, the MCAN peripheral uses a 16-bit
Message RAM Base Address (MRBA) register relative to 0x20000000.
If MRAM buffers are placed above 0x20010000, the address truncates
and DMA operations access invalid memory locations.
This change introduces a dedicated .mram_noinit section via
zephyr_linker_sources_ifdef in SAM0 common CMake scripts to guarantee
that MRAM buffers are allocated at the start of RAM, staying strictly
within the 64 KB offset limit.
Signed-off-by: Xavier Douville <github@douville.org>
Cap the reinitialization retries in the recovery path: after a fixed
number of consecutive failures, with a growing backoff between
attempts, fail the submission with -EIO instead of retrying forever,
so a detached or dead device cannot spin the RTIO work queue.
Guard the hand-off points the recovery flow relies on: submitting a
work item without a checked-out submission is rejected, and an error
reported with no submission in progress returns the driver to idle so
the next submission can recover. Complete a successful recovery with
rtio_iodev_sqe_ok() instead of an error completion carrying result 0.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Stopping and restarting the measurement timer does not bring the device
back once it reports an error: the data stream stays dead until the
board is rebooted. Argus_StopMeasurementTimer() also blocks, and it was
called for every data-ready trigger seen while the device was in error,
delaying the data evaluation that frees the internal buffer and holding
the device in the failed state.
Track the error and the recovery as explicit states so the stop is done
once per error occurrence and an in-progress recovery is distinguishable
from a new failure. Recover by tearing the Argus handle down and
initializing it again through a shared reinitialization sequence, which
restores the stream in place. The initialization and configuration steps
that afbr_s50_init open-coded are factored into that shared sequence so
the recovery path and the initial bring-up run the same code.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
The SiWG917 has a data cache in front of PSRAM (family reference manual
rev 1.2 section 5.4.5). The bootloader leaves it enabled and nothing in a
Zephyr build maintains it: the SoC does not select CPU_HAS_DCACHE and
sys_cache_data_*() return -ENOTSUP. The network processor writes the same
memory, so contents read back stale or torn under load.
Disable it with the vendor call at the top of the memory controller init,
before PSRAM is set up.
Signed-off-by: Mikey Sklar <mikeysklar@gmail.com>
The RTIO path updated the transfer command with read-modify-writes of
TCR while the transmit FIFO held queued entries: clearing CONT and
CONTC when the last data word enters the FIFO, in the DMA TX complete
callback, and in the end-of-transfer touch. TCR reads are not reliable
in that state. The reference manual advises reading TCR only with an
empty transmit FIFO or reading it twice and comparing, and ERR050606
adds that a polled TCR read can return a stale value. A stale or torn
readback written back is queued as a command word and silently alters
the frame for the remaining words with no error flag raised.
On a 17 byte half duplex probe read of an AFBR-S50 on MCXN947 LPSPI
with its 8 word RX FIFO the transfer completes reporting success while
the payload arrives displaced: the device's 0x00..0x10 test ramp
returns ten 0x00 bytes with the values 0x01..0x07 landing at offsets
10..16. Reads at or below the FIFO size are unaffected.
Compose the transfer command once at start of transfer, while the
transmit FIFO is empty and the read is defined, cache it per instance,
and write the cached value with CONT and CONTC cleared at every later
command write instead of reading TCR back.
For transmit only transfers on the interrupt path, mask RX in the
cached command before the first FIFO fill rather than after it, so no
unread words collect in the RX FIFO behind the queued data. The DMA
path keeps RX unmasked since it drains every received word and its
completion is signaled by the RX channel. Skip the RX drain pass when
the receive data flag is clear, keeping the receive interrupt armed,
so transmit and completion interrupts no longer run empty drain loops.
The watermark scheme, FIFO tuning, and DMA support are unchanged.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
The transfer() function passes rx + carry to the DMA, but carry is not
guaranteed to be aligned to ESP_HOSTED_MCU_DMA_ALIGN, causing DMA
alignment errors (EINVAL/-22) on some platforms.
Fix by introducing a 'pad' offset. The address passed to transfer()
becomes rx + pad + carry, where pad is calculated as
ROUND_UP(carry, ESP_HOSTED_MCU_DMA_ALIGN) - carry, guaranteeing that
the read lands on an aligned boundary while keeping the carried bytes
contiguous. The frame processing starts at rx + pad, and when a partial
frame is carried over, a new pad is calculated for the next cycle.
Fixes: #117626
Signed-off-by: Matheus Alencar <sletezes@gmail.com>
Move esp_hosted_mcu_ap_authmode() into the soft-AP Kconfig guard
next to its only caller. Station-only builds compile out the AP
management code and emitted an unused-function warning.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
spi_config() stored the config in the context before calling
am_hal_ios_configure(), so a failed HAL configure left the context
marked as configured. The next transceive then passed the
spi_context_configured() check and ran on unconfigured hardware, and
the raw HAL status leaked through the SPI API as a positive value.
Only publish the new config once the HAL accepts it and map a configure
failure to -EIO.
Fixes#116324
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
spi_ambiq_transceive() returned early when spi_config() failed, skipping
the runtime PM put and leaking the usage count taken by the get; the
device could then never runtime-suspend again. It also overwrote the
transfer status with the return of pm_device_runtime_put_async(), hiding
transfer errors from the caller, and continued into the HAL after a
failed get.
Route the config-failure path through the common exit, keep the put
status in its own variable, and bail out when the get fails.
Fixes#116324
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Instantiate the native_sim TAP ethernet driver from devicetree using a
new `zephyr,native-tap` compatible. Each interface is described by its
own devicetree node, so multiple interfaces are created by adding
multiple nodes rather than increasing an interface count
(`CONFIG_ETH_NATIVE_TAP_INTERFACE_COUNT`).
Per-interface configuration moves from Kconfig to devicetree properties:
- the host interface name comes from the `host-interface` property
- the MAC address from the common `local-mac-address` or
`zephyr,random-mac-address` properties loaded through
`net_eth_mac_load()`
- the PTP clock from a child node
The `CONFIG_ETH_NATIVE_TAP_DRV_NAME`, `CONFIG_ETH_NATIVE_TAP_MAC_ADDR` and
`CONFIG_ETH_NATIVE_TAP_RANDOM_MAC` options are removed.
The `--eth-if`, `--mac-addr` and `--ipv4-*` command line options keep
applying to the first interface. In addition, per-interface variants
prefixed with the node name are added for the remaining interfaces.
Assisted-by: Claude:opus-4.8
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Modified the driver file and the Kconfig file to include the Target
buffer mode support.
Signed-off-by: Santhosh Easwaramoorthy <santhosh.easwaramoorthy@microchip.com>
The interrupt handler only exited its drain loop once every data ready
flag in STATUS_REG was clear, but those flags are cleared by reading the
output registers, which only happens from a registered handler. A flag
set for a source with no handler (or a handler deferring the fetch) made
the loop spin forever and never re-enable the GPIO interrupt. Only
consider sources that have a handler registered, cap the number of
iterations, and re-arm the interrupt on a status read error as well.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The enable_{t,xl,g}_int() helpers hardcoded the data-ready route bit
to 1, so a sensor_trigger_set() with a NULL handler never cleared
INT1_CTRL/INT2_CTRL and the sensor kept asserting the interrupt line.
Assign the enable parameter to the route bit instead.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The sensor hub humidity converters stored the whole relative humidity
value scaled by 1e6 into val2 instead of only the fractional remainder,
so the reading was counted twice (e.g. 45.5 %RH became 90.5 %RH) and
val2 exceeded the 1000000 micro-unit bound. Use
sensor_value_from_float() to pack the value correctly.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The die temperature conversion multiplied the int16_t raw sample by
1000000 in 32-bit arithmetic, which overflows (signed overflow UB) once
the temperature is more than ~8.4 C away from 25 C. Widen to 64-bit
before scaling, matching the lsm6dsv16x driver.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The SENSOR_ATTR_CONFIGURATION handler in lsm6dso16is_gyro_config()
called lsm6dso16is_xl_hm_mode_set(), leaving the gyroscope power mode
untouched while silently changing the accelerometer one. Use
lsm6dso16is_gy_hm_mode_set() so the attribute acts on CTRL7_G.g_hm_mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
The gyroscope full-scale tables were copied from the lsm6dso driver and
used that part's FS_G encoding, so a gyro-range of 2000 dps yielded a
zero gain (readings always 0 rad/s), 125 dps read past the end of the
tables, and the other ranges applied a wrong sensitivity. Lay the tables
out per the LSM6DSO16IS encoding and index them through a helper that
maps the FS_125 register value.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
If the current state is I2S_STATE_ERROR, the peripheral has already been
stopped through nrfx_i2s_stop. Do not try to stop it again when
i2s_nrfx_trigger is called with I2S_TRIGGER_DROP, as this may cause the
hal to assert on p_cb->state != NRFX_DRV_STATE_UNINITIALIZED.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Replace hardcoded MSPM0_MCAN_MRBA (0x8000) with
CAN_MCAN_DT_INST_MRBA(inst). The constant accidentally produced
correct SIDFC offsets for canfd0 via mask truncation but computed
wrong filter addresses for canfd1 (base 0x40510000), causing the
controller to hang when starting.
Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
MCANSS muxes LINE0 and LINE1 onto a single CPU IRQ. Loop up to the
number of lines per ISR entry instead of handling only the first
pending line, preventing latency spikes under concurrent TX+RX load.
Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add a new NXP_WIFI_SUPP_DEBUG Kconfig option to control the
supplicant interface debug logs. It defaults to enabled when
WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_DBG is set. Previously the
CONFIG_SUPP_DEBUG macro had no Kconfig entry to enable it.
Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Remove NXP_WIFI_DEBUG_BUILD and NXP_WIFI_OS_DEBUG Kconfig
options that are not referenced anywhere in the source code.
Also remove the depends on NXP_WIFI_DEBUG_BUILD from
NXP_WIFI_NET_DEBUG and NXP_WIFI_WLCMGR_DEBUG so that
individual debug options can be enabled independently
without the unnecessary intermediate toggle.
Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Use gnttab_query_size() in the grant table initialization path instead
of calling the low-level grant table hypercall entry point directly.
This keeps the existing max-frame fallback behavior while making the
driver use the public grant table helper API for the operation it
performs during initialization.
Signed-off-by: Vladyslav Goncharuk <vladyslav_goncharuk@epam.com>
Assisted-by: Codex:gpt-5