Split V1 and V2 code from the common file of STM32 ethernet
driver.
Whenever it is possible, make use of v1 or v2 version of functions
that are call from the common file in order to maximize factorization.
Review definitions to put them where they are used.
Review header inclusions to minimize them.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In an effort to make stm32 eth driver files easier to read and maintain,
split the ptp code in a dedicated file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 678e226045.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 29750ac05d.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Commit bc8d66d538931e650dd2855fabe768720dcb4b02 introduced a
result argument to some RTIO callback handlers. Update for the IIS3DWB
sensor.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
flushing rx pending already happens in
uart_litex_fifo_read, which should be called
by the callback, so don't do it again, also
it can lead to the drop of chars, as flushing
removes the current entry in the fifo.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Process all in one callback, in order to reduce latency.
The following changes have been done:
- Process FIFO read-out and/or Data-ready in GPIO callback.
- FIFO Full is handled on completion if needed.
- Omit fifo-count fetching, to optimize cycles. The watermark
count is the number of samples we're going for.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
By introducing three states: Off -> On -> Busy -> (Offf)
This allows us to more clearly guard on-going events and detect
overlapping triggers.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Since the driver knows how many samples it wants (because of the
watermark threshold), stick to that per event in order to facilitate
batches of N number of samples.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to allow the error-handling scheme to take action, instead
of crashing when asserts are enabled. Now possible since we have RTIO
error handling for streaming mode.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Similar pattern applied to other in-tree sensor drivers, where
preparing a set of SQEs for writing/reading on registers is a recurrent
syntax.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The IIS3DWB is a system-in-package featuring a 3-axis digital vibration
sensor with low noise over an ultrawide and flat frequency range.
The wide bandwidth, low noise, very stable and repeatable sensitivity,
together with the capability of operating over an extended temperature
range (up to +105 C), make the device particularly suitable for vibration
monitoring in industrial applications.
Datasheet: https://www.st.com/en/mems-and-sensors/iis3dwb.html
This driver is currently only supporting the polling-mode read_and_decode
APIs (both blocking and non-blocking).
This driver is based on stmemsc HAL i/f v2.9.1.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
- Add the pdl-based version of the i2c driver for infineon devices
like the one found on the kit_psc3m5_evk board.
- In the pull request review it was decided that the
I2C_INFINEON_CAT1_ASYNC option was not needed. The driver would
always be interrupt driven. This meant that the existing driver
had to be updated as well.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
The new nrf-802154 now has the updated API signatures. The migration
code is no longer needed.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Make the STM32 I2C transfer timeout configurable via Kconfig.
- Add CONFIG_I2C_STM32_TRANSFER_TIMEOUT_MSEC Kconfig symbol.
- Use this Kconfig value in both STM32 I2C drivers.
Tested on STM32WBA55CG.
Fixes: #95819
Signed-off-by: Pablo Bacho <pablobacho@gmail.com>
This IPM driver is not being used by SOF and is there simply for
a test which does not provide much additional value compared to
the existing host IPC tests. That IPM specific test has been
removed so there is no need to keep this driver in the tree.
This is in preparation to rewrite the host IPC driver to utilize
the IPC API. There is no need to maintain another driver that is
not being used in SOF.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Support reporting the reset cause for native_sim. The default is to
report POR (Power-On Reset). If CONFIG_NATIVE_SIM_REBOOT was enabled and
the system is rebooted using sys_reboot(), the reset cause is set to
SOFTWARE.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
This header file isn't required, and prevents the driver building for
the RISC-V based Hazard3 cores.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
The RP2350 uses the Xh3irq interrupt controller, which supports nested
and prioritised interrupts. This adds initial support, configuring the
controller in 'direct' (non-vectored) mode.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
There's no benefit to starting a subset of them, and this ensure that
everything is ready, regarless of RP2040 vs RP235xx, and whether the
Cortex-M33 or Hazard3 cores are in use in the latter case.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
In case one defines an RGB led that is bigger than the led_rgb struct,
ws2812_gpio_update_rgb would overflow the buffer it writes to while
iterating. This could lead to crashes, as the code would also support
GRBW (as supposed in one comment).
As a 'proper' fix would require another buffer and therefore more
memory, I added a BUILD_ASSERT to ensure it does not compile.
Signed-off-by: Stefan Kraus <dev@stefankraus.org>
Due to the alias of ptr on pixels, one iterates over the same area
one reads from to set values. Therefore, if the strip is not 'RGB' but
GBR, one would overwrite the pixels 'r' value with the 'g' value in the
first loop, leading to a wrong read afterwards.
By writing to a temporary variable, we have a clean, unmodified copy
of the original values.
Additionally, this removes the dependency on 'LED_STRIP_RGB_SCRATCH',
as the scratch part (that masked most error cases) is not necessary
anymore.
Signed-off-by: Stefan Kraus <dev@stefankraus.org>
Move the TRNG peripheral enable from the clock/SoC init path to the
Espressif entropy driver init.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Smbus implementation for stm32 lacks of smbus_block_read(), so add the
functionality.
Fix some indentations.
Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
Return `enum wifi_conn_status` after failed connection attempt. Parse
`+CWJAP:` messages to get failure reason.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
In several functions, the UART registers are accessed multiple times
through the `get_uart(dev)` inline function. This results in repeated
dereferencing of the device's base address.
This commit caches the UART register struct pointer in a local variable
`uart` at the beginning of each relevant function.
For registers where repeated access is not needed, the value is read once
into a temporary variable. Modifications, if any, are applied to
the temporary copy, and the result is written back once.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Kconfig option UDC_DWC2_USBHS_VBUS_READY_TIMEOUT depends on services
exclusively available for nRF54H20, but the option can also be used for
nRF54LM20A, where there are no service dependencies, and VREG can be
accessed by the driver directly. Let depend the option on the SOC
series, as the controller can be used by the different CPUs on the SOC.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move macros derived from the VIRTIO specification to a shared include.
This change allows the VIRTIO standard definitions to be referenced
from outside the driver implementation.
The following definitions have also been added:
- VIRTIO_F_VERSION_1
- VIRTIO_F_ACCESS_PLATFORM
- VIRTIO_RING_F_INDIRECT_DESC
- VIRTIO_RING_F_EVENT_IDX
- VIRTQ_AVAIL_F_NO_INTERRUPT
- VIRTQ_USED_F_NO_NOTIFY
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in ST's dedicated folder
hal_stm32 (modules/hal/stm32).
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
This fixes system crashes in `i2s_buf_write`, because this function
internally calls `i2s_config_get`, which resulted in a NULL pointer on
stm32 i2s devices.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>