On some series, use of Delay Block could be possible on OSPI device but
not on HSPI one (which uses this drivers).
As a quick fix check the presence of XSPI Delay Block by-pass
configuration bit instead of the Delay Block presence.
Note: This fix works because we don't have cases today where this driver
is used for OSPI and HSPI instances with mixed DLYB compatibility.
This may have to be reviewed one day and may require a more complex fix
with instantiable configuration, but this day may never come as well.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Enables sleep mode (PM3) on RW61x. The driver
re-enables the wdt on wake-up based on the previous
configuration. Note that the wdt counter value always
resets to the max window value on wake-up
Signed-off-by: Alex Rodriguez <alejandro.rodriguezlimon@nxp.com>
There was a race condition where `lpspi_end_xfer` can be called multiple
times per transfer. There was the case where a TX interrupt gets
triggered without the RX interrupt being set, and TX finishes writing
its last byte. Then, `spi_context_rx_len_left() == 0` is true and
`lpspi_end_xfer` happens, but the RX interrupt is still active. Then,
when the RX interrupt happens, `lpspi_end_xfer` will get called again.
To fix that, the architecture was adjusted to only call `lpspi_end_xfer`
once no interrupts are active any more, and the disabling of the
interrupts gets used to signal the end of the TX and RX part.
Minor adjustments were necessary to use the interrupt enable signals for
this purpose; the TX irq handler had its internal order reversed,
otherwise it wasn't guaranteed that the physical transfer is finished
when we disable the interrupt.
Also, the code where the RX interrupt gets disabled had to be moved out
of the RX irq handler, because the RX interrupt also needs to be
disabled if RX is finished but no RX interrupt is currently active.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Assertion checked whether pointer is NULL.
Assertion should check whether pointer is *not* NULL.
Fixed by changing check in assertion.
Signed-off-by: Frank Duerr <frank.duerr@ipvs.uni-stuttgart.de>
The NXP ENET driver used a mutex inside an ISR.
Since mutexes are not allowed in ISR, an assertion had been triggered.
The mutex is not required since a semaphore ensures sequential writing
(in ISR) and subsequent reading (after eth_wait_for_ptp_ts()).
Fixed by removing calls to mutex.
Signed-off-by: Frank Duerr <frank.duerr@ipvs.uni-stuttgart.de>
Add drivers/interrupt_controller/intc_nxp_pint/power.h abstracting
EnableDeepSleepIRQ and DisableDeepSleepIRQ invocations from
intc_nxp_pint.c. Modify intc_nxp_pint.c to use that file.
fsl_power.c and fsl_power.h can't be built on the
mimxrt685_evk/mimxrt685s/hifi4 target, so it's excluded from it in hal_nxp.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
M2M devices like ISPs or PxP have two separate buffer queues, i.e.
incoming and outcoming queues. For each API, the driver needs to
distinguish on which queue it needs to take action.
Add video buffer type to support this kind of devices.
- get_caps(), set/get_format(), enqueue()/dequeue(): the buffer type
is embeded in the video_caps, video_format and video_buffer structs
- video_stream_start/stop() : buffer type needs is sent as a parameter
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The video endpoints are already described in the devicetree. The
video_endpoint_id parameter in each video API is not necessary and has
no usage. Drop it.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
When stopping, the framework calls driver's stop callback then driver's
flush callback. Hence, driver's flush callback does not need to call
stop callback again.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
If an on-off service records an error while transitioning to the on
state, it stays in the error state and does not allow new requests
to be made until its state is reset. Add resetting of the services
associated with particular clock controllers so that requests can
be retried after failures.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Due to source data pointer having no alignment constraint,
extra care needs to be taken when reading source data
as dword
Signed-off-by: Yonas Alizadeh <yonas.alizadeh@alfalaval.com>
This supports nuvoton numaker m55m1x series soc. Besides, it also
has relevant modifications, including:
1. Fix failure to enable HICR48M, which is to clock usbd and phy
2. Support HWINFO for USB device serial number
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Add all the base controls present like they are in Linux into Zephyr,
limited to those that can apply in the current system:
- Buttons are left as integer for now.
- Some description is modified to fit the Zephyr situation.
- For the minimum number of buffer, Zephyr uses a different mechanism.
- No audio support through the video subsystem.
- Homogenize the wording
Signed-off-by: Josuah Demangeon <me@josuah.net>
Since it's directly related (we can't just burst-read the fifo at
once). This patch includes a comment block explaining this rationale.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Allow for users to define the fifo-watermark on a per-instance basis
through device-tree properties. This setting is validated at build
time, so missing it when required, or setting an invalid value should
not end up in a run-time errror (as in: it runs but nothing happens).
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This patch fixes previous overriding of ODR setting through DTS (it
would always be 25-Hz, irrespective of what the DTS property said).
While doing so, create dt-binding enum to improve settings clarity.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Introduced WIFI_SILABS_SIWX91X_LIMIT_PACKET_BUF_PER_STA.
This flag limits packet queues in AP mode.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Add support for configuring the master clock (MCLK) direction in the
I2S MCUX SAI driver. This allows controlling whether the MCLK pin acts
as an input or output based on device tree configuration, improving
flexibility when interfacing with external audio codecs.
The change leverages the mclk_output property from device tree to
properly set the direction of the MCLK pin during initialization.
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
- Implemented `siwx91x_set_twt_setup` and `siwx91x_set_twt_teardown` for
handling TWT setup and teardown requests.
- Added validation for TWT parameters, including negotiation type,
device state, and operation type.
- Integrated TWT functionality into the `wifi_mgmt_ops` structure for
seamless management via the Zephyr Wi-Fi API.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Don't block the system workqueue for 2 seconds (default value) when
attempting to perform RPU recovery. The system workqueue is a shared
resource which should not be blocked for significant periods of time.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Silabs siwx91x includes a memory controller for (Quad-)SPI PSRAM. It
allows the application to use the PSRAM as if it was any other RAM.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add a reusable uart-bridge driver that echoes data between two serial
devices. It's mainly meant to be used with one of the devices being an
USB CDC-ACM, the data is buffered, there's a pause feature to stop the
USB endpoint when the hardware UART is filling up to avoid overrun and
there's a helper function used to propagate the USB uart configuration
to the hardware one.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The API specifies that brightness is 0 to 100, no point checking it in
the individual drivers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>