The counter API devices are the MRT channel nodes, but only the module has
a pm_device. Runtime requests on channel devices return success without
acquiring a domain reference.
Define a pm_device for every enabled channel and initialize it through
pm_device_driver_init(). Serialize channel PM actions with the existing
channel spinlock. Reject SUSPEND with -EBUSY while RUN is set, retaining
both the counter state and its policy lock.
Channel TURN_ON and TURN_OFF need no register writes: the module
initializes every channel through their shared reset and clock. The
consumer holds a runtime reference from configuration through
counter_stop() and releases it afterwards.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
counter_start() and counter_stop() unconditionally acquire and release
policy references. A repeated start leaks a reference, and stopping an idle
channel can release a reference it does not hold.
Track each channel's policy reference with power_locked and serialize the
register and policy updates with a per-channel spinlock. Keep top-value
reads and configuration under the same lock.
Snapshot the callback and its user data under the channel lock in the ISR,
then invoke it after unlocking. A callback can stop or reconfigure its own
channel without recursively taking the lock.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Initialization ignores clock_control_on() errors before writing channel
registers, and the TURN_ON action discards failures from
nxp_mrt_init_common(). The frequency getter also ignores
clock_control_get_rate() errors.
Propagate bring-up failures to device initialization and return zero from
the frequency getter when the clock rate cannot be read, instead of
returning an uninitialized value.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The ISR clears INTFLAG through a read-modify-write of STAT. STAT contains
two write-one-to-clear flags, so a flag read as one can be cleared even
when it is not the interrupt flag.
Write MRT_CHANNEL_STAT_INTFLAG_MASK alone when acknowledging a channel
interrupt, leaving the other status flag unchanged.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
nxp_mrt_get_top_value() reads INTVAL. An idle channel returns zero from
that register even after counter_set_top_value() has saved a period in
data->top.
Return the saved period, or max_top_value when no period has been
configured. The configured top value remains available while the channel is
stopped.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
nxp_mrt_init_common() reads MODCFG before enabling the bus clock. The ISR
also reads MODCFG to obtain the channel count, although num-channels
already sizes the channel arrays.
Store num-channels in the shared configuration and use it in initialization
and interrupt dispatch. This removes the pre-clock register access and the
repeated MODCFG read.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
nxp_mrt_get_freq() is reached only through the counter API table. It is not
declared in a header or called outside this file.
Give the function internal linkage instead of exporting its symbol from
every image that builds the MRT driver.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT device-definition macros use inconsistent indentation and
continuation alignment. Reformat the driver with clang-format, including
the macro block.
No functional change.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
mcux_lpc_syscon_clock_control_off() handles EQDC cells but not MCUX_MRT_CLK
or MCUX_FREEMRT_CLK. An MRT clock disable request returns success without
changing its gate.
Handle the MRT clock cells using the same SoC guards and gate names as
clock_control_on(): kCLOCK_Mrt, kCLOCK_Mrt0 and kCLOCK_FreeMrt. This makes
clock_control_off() close the requested MRT gate.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add an optional "st67 atcmd" shell command that sends a raw AT command
to the module and prints the reply. This is useful for debugging and for
reading module state the driver has no API for, such as the module's
free heap. Example usage: st67 atcmd AT+SYSRAM?
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
The driver set the interface MTU to the max-frame-size devicetree
property. That property is a frame size including the 14 byte header
and the 4 byte FCS, so even the default of 1518 gave an MTU of 1518
instead of 1500, and the agilex5_socdk board value of 9018 made TCP and
IP fragmentation build jumbo packets, which the Ethernet L2 does not
support.
Register the interface with NET_ETH_MTU and drop the MTU config member
and the net_if_set_mtu() call.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
ADE7978_SHUNT_RESISTOR and ADE7978_VOLTAGE_DIVIDER had no dependency
on ADE7978, so they appeared in the .config of every build with
CONFIG_SENSOR=y, even without an adi,ade7978 devicetree node.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
enable the or1k time that is part of the cpu
by default, just like it is already done at
ARCV2_TIMER and XTENSA_TIMER.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Call psa_aead_set_lengths() before psa_aead_set_nonce(). The PSA Crypto
API allows either order and the built-in Mbed TLS implementation accepts
both, but a CCM engine needs the lengths when the nonce is set, and the
NXP ELS PKC PSA driver rejects psa_aead_set_lengths() with
PSA_ERROR_BAD_STATE once a nonce is set. With that driver active, CCM and
GCM through the shim fail on MCXN947. Setting the lengths first is the
order the specification lists and works with both implementations.
Tested on frdm_mcxn947/mcxn947/cpu0 and native_sim; not tested with
other PSA drivers.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Dimitrios Kafetzis <dimitrioskafetzis@gmail.com>
cyhal only parks the pad when it knows the TX pin exists. Passing NC
left it floating for the whole sleep. Resolve it from the mux table.
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
cyhal_uart_putc() returns once the byte is in the FIFO, so poll_out
returned early and a draining shifter made the SCB veto DeepSleep.
This now blocks until the byte is shifted out.
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Take pm_policy_device_power_lock_get() at the end of RESUME and release
it in SUSPEND. RESUME sets OPAMP_CTRL[OPA_EN] and SUSPEND clears it,
and the block has no call that starts or stops the output on its own,
so the amplifier drives its output for exactly as long as the device is
active.
Both calls sit on the far side of the register work they belong to:
RESUME takes the lock once the output is driven, and SUSPEND releases
it once the clock is gated. Neither error path has a lock to account
for, because a resume that returns an error never took it and a
suspend that returns an error never released it.
The get and the put pair without the driver recording which one it did
last. pm_device_action_run() answers a repeated resume or suspend with
-EALREADY before reaching the callback, device runtime PM resumes only
on the first reference and suspends only on the last, and
pm_device_driver_init() runs at most one RESUME.
On a CONFIG_PM_DEVICE=y build with no device runtime PM,
pm_device_driver_init() runs TURN_ON and then RESUME, so the device is
active from boot and holds the lock from boot: the two states stay
blocked until the application suspends the device. With
CONFIG_PM_DEVICE_RUNTIME the device starts suspended and the lock
follows the consumer's references.
With CONFIG_PM_POLICY_DEVICE_CONSTRAINTS=n both calls are empty inline
stubs.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain this instance now
declares, so the block comes back with OPAMP_CTRL and its clock gate
at their reset values. Driver init does not re-run on that path: the
register writes mcux_opamp_fast_init() made are gone, while the device
object still reports the devicetree configuration as applied.
TURN_ON is the action the core runs once the block has power again, so
move clock_control_on() and mcux_opamp_fast_configure() out of
mcux_opamp_fast_init() and into it. pm_device_driver_init() runs the
same action for the initial bring-up. Init keeps only the clock
readiness check, so an instance whose power domain is still off at
init is skipped instead of having its registers written with no power
behind them.
TURN_ON leaves OPAMP_CTRL[OPA_EN] clear, which is the state the core
records for the device once it returns; RESUME is what turns the
amplifier on. A device that is not active needs no clock: SUSPEND
gates it, RESUME ungates it, and TURN_ON gates it again once the
rebuild is done. TURN_OFF has nothing left to do, since the core runs
it only on a device it already recorded as suspended.
The clock now outlives a failed transition, so every path that returns
with it ungated gates it again: a RESUME that cannot apply its pin
state leaves the device suspended, and a suspended device holds no
clock. A clock gate that fails during SUSPEND restores the default pin
state and the enable bit instead, since the core keeps the device
active there.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
mcux_opamp_fast_init() is the only place that writes the bias current
and the compensation capacitor into OPAMP_CTRL, which makes it the only
place that can rebuild a block whose registers were reset. Move those
writes into mcux_opamp_fast_configure() so a second caller can be added
without duplicating them.
No functional change.
Assisted-by: Vero Coder:Sonnet 4.6
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
mcux_opamp_fast_init() set OPAMP_CTRL[OPA_EN] on an instance declaring
is-reference-source, outside the device's power state. With
CONFIG_PM_DEVICE_RUNTIME pm_device_driver_init() leaves the device
suspended, so the amplifier drives its output while the core records
the device as suspended, and nothing clears the bit again: no consumer
resumes such an instance, and the core answers a suspend on a device
it never resumed with -EALREADY.
On frdm_mcxa346 and frdm_mcxa366, whose sample and test overlays mark
opamp0 as the reference source, opamp0 then drives its output from
boot until the block loses power, including while every amplifier it
feeds is suspended.
pm_device_driver_init() runs RESUME, which sets OPAMP_CTRL[OPA_EN], so
drop the write in init(). Without device runtime PM the instance comes
up enabled exactly as before. With CONFIG_PM_DEVICE_RUNTIME it
suspends and resumes like every other instance: whoever uses the
amplifiers it feeds holds a runtime reference on it for as long as it
needs the reference input.
config->is_reference_source has no user left and goes with it. The
devicetree property stays in place with no reader.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The binding includes pinctrl-device.yaml, and frdm_mcxa344,
frdm_mcxa346 and frdm_mcxa366 all hand opamp0 a pinctrl-0 group, but
the driver never called pinctrl_apply_state(), so those groups had no
effect.
Apply the default state on RESUME and the sleep state on SUSPEND, the
two points where the amplifier itself is turned on and off. No in-tree
board declares a sleep state, so -ENOENT from the sleep state is not
treated as an error.
A sleep state that does fail arrives after OPAMP_CTRL[OPA_EN] is
already clear, while the core keeps a device whose suspend failed
active and device runtime PM restores the usage count the device had
before the call. Restore the default pin state and the enable bit on
that path, so the hardware matches the state the core reports.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
fsl_opamp.h's OPAMP_Init()/OPAMP_Deinit() manage the instance's clock
themselves, calling CLOCK_EnableClock()/CLOCK_DisableClock() through a
per-instance lookup table rather than through clock_control. This
driver calls neither function, and the only things it does use from
the header -- OPAMP_Enable(), OPAMP_SetBiasCurrent() and
OPAMP_SetCompensationCapcitor() -- are each a one-line OPAMP_CTRL
read-modify-write using masks that live in the device's own CMSIS
register header, not in fsl_opamp.h.
Inline all three as the same read-modify-write on OPAMP_CTRL. Retype
bias_current from the HAL's opamp_bias_current_t to uint8_t: it was
only ever assigned a DT_INST_ENUM_IDX() index and passed to a uint8_t
parameter, never used as an enum.
Drop the #include entirely: OPAMP_Type and the register masks come
from the device's own CMSIS header, which the SoC's fsl_common.h
already makes available to every driver, so no explicit include is
needed here.
CONFIG_MCUX_COMPONENT_driver.opamp_fast only ever gated the MCUX
HAL's own fsl_opamp.c/.h; with that dependency gone, drop the
drivers.cmake line that turned it on for this driver's Kconfig
symbol.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Take pm_policy_device_power_lock_get() at the end of RESUME and release
it in SUSPEND. RESUME sets OPAMP_CTR[EN] and SUSPEND clears it, and the
block has no call that starts or stops the output on its own, so the
amplifier drives its output for exactly as long as the device is
active.
Both calls sit on the far side of the register work they belong to:
RESUME takes the lock once the output is driven, and SUSPEND releases
it once the clock is gated. Neither error path has a lock to account
for, because a resume that returns an error never took it and a
suspend that returns an error never released it.
The get and the put pair without the driver recording which one it did
last. pm_device_action_run() answers a repeated resume or suspend with
-EALREADY before reaching the callback, device runtime PM resumes only
on the first reference and suspends only on the last, and
pm_device_driver_init() runs at most one RESUME.
On a CONFIG_PM_DEVICE=y build with no device runtime PM,
pm_device_driver_init() runs TURN_ON and then RESUME, so the device is
active from boot and holds the lock from boot: the two states stay
blocked until the application suspends the device. With
CONFIG_PM_DEVICE_RUNTIME the device starts suspended and the lock
follows the consumer's references.
With CONFIG_PM_POLICY_DEVICE_CONSTRAINTS=n both calls are empty inline
stubs.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
A call that lands on a suspended instance writes OPAMP_CTR and returns
success while the amplifier itself stays off. On a device the core
has turned off the write goes into a register block that has lost its
contents, and the gain the driver has cached then disagrees with the
hardware until the next resume replays it.
Check the device state at the point where the API call is about to
touch the register and return -EBUSY instead. Argument validation is
left ahead of the check so that a bad gain still reports -EINVAL
regardless of the power state. With CONFIG_PM_DEVICE=n,
pm_device_state_get() reports PM_DEVICE_STATE_ACTIVE and the check
always passes.
-EBUSY leaves the runtime reference to the consumer, so write that
contract down at the top of the file: an amplifier output has no
completion event the driver could hang a pm_device_runtime_put() on,
so the driver takes no reference of its own and the consumer holds a
pm_device_runtime_get() for as long as it needs the output.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
TURN_ON reruns the devicetree configuration from mcux_opamp_configure(),
which does not write OPAMP_CTR[NGAIN]/[PGAIN]. A device coming back from
a power cycle therefore finds those fields at their reset values, losing
whatever gain the application selected through opamp_set_gain().
Track the last gain index the application selected and write it back
from TURN_ON, through the same helper mcux_opamp_set_gain() uses. A
suspend clears only OPAMP_CTR[EN] and gates the clock, so the gain
fields survive it and the gain is lost only to a power cycle.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain this instance now declares,
so the block comes back with OPAMP_CTR and its clock gate at their
reset values. Driver init does not re-run on that path: the register
writes mcux_opamp_init() made are gone, while the device object still
reports the devicetree configuration as applied.
TURN_ON is the action the core runs once the block has power again, so
move clock_control_on(), the LPC reset line assert and
mcux_opamp_configure() out of mcux_opamp_init() and into it.
pm_device_driver_init() runs the same action for the initial bring-up.
Init keeps only the clock and reset readiness checks, so an instance
whose power domain is still off at init is skipped instead of having
its registers written with no power behind them.
TURN_ON leaves OPAMP_CTR[EN] clear, which is the state the core records
for the device once it returns; RESUME is what turns the amplifier on.
A device that is not active needs no clock: SUSPEND gates it, RESUME
ungates it, and TURN_ON gates it again once the rebuild is done.
TURN_OFF has nothing left to do, since the core runs it only on a
device it already recorded as suspended.
The clock now outlives a failed transition, so every path that returns
with it ungated gates it again: the core records the device as
suspended whether TURN_ON succeeds or fails, and a RESUME that cannot
apply its pin state leaves the device suspended as well. A clock gate
that fails during SUSPEND restores the default pin state and the
enable bit instead, since the core keeps the device active there.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
mcux_opamp_init() is the only place that writes the devicetree
configuration into OPAMP_CTR, which makes it the only place that can
rebuild a block whose registers were reset. Move those writes into
mcux_opamp_configure() so a second caller can be added without
duplicating them.
No functional change.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The binding includes pinctrl-device.yaml, and frdm_mcxa156 and
lpcxpresso55s36 both hand opamp0 a pinctrl-0 group, but the driver
never called pinctrl_apply_state(), so those groups had no effect.
Apply the default state on RESUME and the sleep state on SUSPEND, the
two points where the amplifier itself is turned on and off. No in-tree
board declares a sleep state, so -ENOENT from the sleep state is not
treated as an error.
A sleep state that does fail arrives after OPAMP_CTR[EN] is already
clear, while the core keeps a device whose suspend failed active and
device runtime PM restores the usage count the device had before the
call. Restore the default pin state and the enable bit on that path,
so the hardware matches the state the core reports.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The HAL's OPAMP_Init()/OPAMP_Deinit() manage the instance's clock
themselves, calling CLOCK_EnableClock()/CLOCK_DisableClock() through a
per-instance lookup table rather than through clock_control. This
driver calls neither function.
Every register mask this file uses (OPAMP_OPAMP_CTR_*) is defined in
the device's own CMSIS register header, not in fsl_opamp.h; the only
things fsl_opamp.h was actually supplying were two one-line static
inline wrappers (OPAMP_DoNegGainConfig/OPAMP_DoPosGainConfig, both
just an OPAMP_CTR read-modify-write) and three enum constants used
only as fixed field encodings (kOPAMP_NegGainBufferMode,
kOPAMP_PosGainNonInvert1X, kOPAMP_PosRefVoltVrefh4). Inline the
wrappers as the same read-modify-write on OPAMP_CTR, and replace the
enum constants with local named constants carrying the same values.
Drop the #include entirely: OPAMP_Type and the register masks come
from the device's own CMSIS header, which the SoC's fsl_common.h
already makes available to every driver, so no explicit include is
needed here.
CONFIG_MCUX_COMPONENT_driver.opamp only ever gated the MCUX HAL's own
fsl_opamp.c/.h; with that dependency gone, drop the drivers.cmake line
that turned it on for this driver's Kconfig symbol.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The .on handler for MCUX_OPAMP0_CLK..MCUX_OPAMP3_CLK already calls
CLOCK_EnableClock() per family (kCLOCK_GateOPAMPn on MCXA, kCLOCK_Opampn
elsewhere), gated on the corresponding opampn node being okay. .off had
no OPAMP case at all, so clock_control_off() on an OPAMP clock subsys
compiled, returned 0, and gated nothing.
Add the missing cases, mirroring the .on block with CLOCK_DisableClock
in place of CLOCK_EnableClock. Needed before an OPAMP driver can turn
its own clock off on a real power transition.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPSCI stores no data while S1[OR] is set and only uart_err_check()
cleared it, so interrupt-driven RX stalled after an overrun. Clear OR
in the ISR after the callback and enable the overrun interrupt, as
uart_mcux_lpuart does. Not tested on hardware.
Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The partial scale of the LPADC is 30/64, which the driver selected
for the 1/2 gain, the closest gain of the ADC API, so that the
conversions of the API were 6.25% too low. Select it for the 15/32
gain, which converts exactly. The 1/2 gain still selects it, for the
devicetrees that use it, with a warning, and the migration guide
recommends the 15/32 gain to them.
Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add ADC_GAIN_15_32 for converters that scale their inputs by 15/32,
as the NXP LPADC does with its partial scale of 30/64. Without it,
the LPADC driver selects that scale for the 1/2 gain, and the
conversions of the ADC API are then 6.25% too low.
Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use the unified cy_cryptolite_sha API for SHA-256/384/512 on PSC3M6
(SOC_DIE_PSC3M6). Other MXCRYPTOLITE devices keep using the legacy
cy_cryptolite_sha256 API, which only supports SHA-256.
Signed-off-by: Niranjan M <niranjan@aerlync.com>
Flash drivers call memc_flexspi_transfer() with interrupts locked while
the XIP flash is busy, polling its status until a program or erase
completes. Each call looks up the controller base with get_base(), and
without an MMU DEVICE_MMIO_NAMED_GET() reads it from the ROM config,
which lives in that same flash. On a D-cache hit nothing happens; on a
miss the read goes out on AHB in the middle of the IP sequence, the
status read loses its data and FLEXSPI_ReadBlocking() spins on an empty
RX FIFO forever (INTR shows IPCMDDONE without IPRXWA, IPRXFSTS is 0).
Whether the line is cached depends on the code and data layout, so an
unrelated change can make every OTA write hang the board. Seen on
MIMXRT1170-EVK writing a 5.2 MB payload through flash_map: adding three
idle threads was enough.
Copy the base into memc_flexspi_data at init and return it from
get_base(). The data is in RAM already, as the struct comment asks for
read-while-write safety.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hashimoto Kenichi <hashimoto.kenichi@genetec.co.jp>
The ISR read the enabled interrupt status and passed it to
disableInterrupt at the end of every callback invocation. This
silently disabled whichever UART interrupt had just fired, causing
the shell and any other interrupt-driven consumer to stop receiving
input after the first event.
Remove the disable call. The TX interrupt flag is level-sensitive and
stays set while the transmit buffer is empty; the registered callback
is responsible for disabling TX interrupts once it has no more data
to send.
Signed-off-by: Gail Rojas <gailroco@gmail.com>
Assisted-by: Claude
The function checked the transmit-complete flag after writing each
byte rather than the transmit-ready flag before. Transmit-complete
fires after the shift register empties, not when the buffer is ready
to accept a new byte, so the old check had the wrong contract and
dropped bytes under load.
Check the transmit-ready flag before writing and extract it into a
local variable so the loop condition stays within the 80-column limit.
Signed-off-by: Gail Rojas <gailroco@gmail.com>
Assisted-by: Claude
The function read from the receive buffer unconditionally and returned
0 even when no byte had arrived, giving callers stale or uninitialized
data. Check the receive interrupt flag before reading and return -1
immediately if the buffer is empty, matching the poll_in contract
required by the Zephyr UART API.
Signed-off-by: Gail Rojas <gailroco@gmail.com>
Assisted-by: Claude
The conversion from sensor_value to q31 would overflow if the value was
outside of -4294.967296-4294.967295 range, causing incorrect readings.
Signed-off-by: Mikołaj Rosowski <mrosowski@antmicro.com>
Fixing bit logic in dw_i3c_configure around calculating "val" - dcr is an
8 bit value, which gets shifted 8 bits right by SLV_CHAR_CTRL_DCR, so it
always resolves to 0.
Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
Introduce WIFI_NRF70_VHT_HT_FALLBACK (default y) so 802.11ac
connections may fall back from VHT to HT. It will only affects
802.11ac 80 MHz access points; no other modes are impacted. Intended
for certification testing.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Replace nrf_wifi_utils_chan_to_freq() with the common
wifi_utils_chan_to_freq() helper in the display scan path.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
The init function rejected any ngpios above 4 with -EINVAL, so a wider
GPIO block failed to initialise. The Sapphire IP offers widths of 1, 2,
4, 8, 16 or 32.
Restrict ngpios to those values in the binding, drop BIT_MASK() from
the latch read-modify-write as BIT_MASK(32) shifts by 32, and remove the
empty init function.
Not tested on silicon.
Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
port_get_raw read the OUTPUT register at offset 0x04. That register is
the output latch and returns what was last written, so an external
signal on an input pin was never seen.
Read the INPUT register at offset 0x00 instead, masked to the port pin
mask.
Not tested on hardware.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
Manually clear SIR_DATA_LENGTH + MDB between IBIs. Observed that
between repeated target interrupt requests, it would send stale
MDB and length
Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
Replace direct NVIC_*PendingIRQ()/NVIC_EnableIRQ()/NVIC_DisableIRQ()
calls with k_irq_clear_pending()/k_irq_set_pending()/k_irq_is_pending() and
irq_enable()/irq_disable(), dropping the driver's dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_*PendingIRQ()/NVIC_EnableIRQ()/NVIC_DisableIRQ()
calls with k_irq_clear_pending()/k_irq_set_pending()/k_irq_is_pending() and
irq_enable()/irq_disable(), dropping the driver's dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_*PendingIRQ()/NVIC_EnableIRQ()/NVIC_DisableIRQ()
calls with k_irq_clear_pending()/k_irq_set_pending()/k_irq_is_pending() and
irq_enable()/irq_disable(), dropping the driver's dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_*PendingIRQ()/NVIC_EnableIRQ()/NVIC_DisableIRQ()
calls with k_irq_clear_pending()/k_irq_set_pending()/k_irq_is_pending() and
irq_enable()/irq_disable(), dropping the driver's dependency on
cmsis_core.h where nothing else needed it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>