Add an option to enable the secondary chained buffer mechanism for
the RX direction to improve its ability to adapt to high SPS rates
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Clean code, update clock calculation to avoid wrong truncate when
mixing double and integer calculation
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Clean up i2s_configure flow
Use singleton active configuration instead of concurent for each
stream buffer
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add dependencies for the dt props for the
SPI_NOR_SFDP choice.
Also removes the no no longer needed build asserts.
Nice benefit is, that we fallback to SPI_NOR_SFDP_RUNTIME,
if the required dt props for the other options are not set.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The MSPI API exposes xfer.packets as const, but the driver assigned
it to a non-const pointer, triggering -Wdiscarded-qualifiers.
Update packet to be a const struct mspi_xfer_packet * and remove
the cast.
No functional changes.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Rename FLASH_SIZE(inst) to FLASH_SIZE_INST(inst) and
FLASH_PAGE_SIZE(inst) to FLASH_PAGE_SIZE_INST(inst) in
flash_mspi_nor_sfdp.h to avoid redefinition conflicts with
STM32 HAL headers (stm32l562xx.h and stm32l5xx_hal_flash.h).
Note: Several HAL STM32 files use this macro naming convention;
this issue is not specific to STM32L5.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This adds initial support for the CH32V ethernet peripheral.
The driver supports both internal and external PHY configurations.
Signed-off-by: James Bennion-Pedley <james@bojit.org>
The infineon i2c driver will lock the calling thread on an error event
because the transfer semaphore is never released. This change allows the
driver to recover and resume normal operation.
Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
Max32 PWM already has built-in support for interrupts at the end of
each PWM period so added baseline support for the PERIOD event type
in CONFIG_PWM_EVENT. Updated PWM Event sample to support
Max32672EvKit.
Signed-off-by: Ryan Wiebe <ryan.wiebe@analog.com>
Now that obtaining the GPIO port device object is always done, the IOsync
configuration logic can be cleaned up. Notably, we can perform it while
still holding the PM Device Runtime reference to avoid an unnecessary
clock_disable and clock_enable.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `gpio_stm32_configure()` function is used by both the GPIO and PINCTRL
drivers to configure I/O pins. Move it to the GPIO port manager module's
code so it can be shared properly and update both drivers accordingly.
With this change, the GPIO and PINCTRL drivers are completely decoupled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
On STM32 hardware, the GPIO port's MMIO interface is used for two purposes
which have their own separate Zephyr API: controlling the state of digital
I/O pins directly (GPIO API) and configuring I/O pins for a specific usage
(PINCTRL API). Historically, this was handled by having the PINCTRL driver
call inside the GPIO driver which works but creates a dependency loop.
Introduce a new `GPIO port manager` module in SoC-specific common code that
takes over various from the existing GPIO/PINCTRL drivers: GPIO port device
instantiation and `GPIO port index -> device` mapping respectively.
Modify the GPIO and PINCTRL drivers to make use of this GPIO port manager
module - a first step in decoupling both drivers from each other.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the helper function which computes the LL pin value from a pin number
to the <stm32_gpio_shared.h> header as this function can be useful for
modules other than the GPIO driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the ports list from the GPIO driver to a shared SoC-specific header.
This will allow reuse from other drivers such as pinctrl.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The function is only used from the device's PM action and is very trivial.
Inline it inside gpio_stm32_pm_action to simplify the driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The STM32 pinctrl dt-bindings headers were full of definitions used by the
SoC-specific pinctrl header (<pinctrl_soc.h>) rather than from Devicetree.
Move these definitions to the appropriate header. While at it, include the
<pinctrl_soc.h> header from GPIO driver instead of series-specific pinctrl
header since it uses these definitions.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix warnings about using char * for %p argument in cbprintf. It's
recommended to cast it to void * because it may cause misbehavior
in certain configurations.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The ED value measured during ED scanning is converted
to RSSI in dBm at the ieee802154 driver level before
it is reported to upper layer through the scan callback.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Fix issue in the function
stm32wba_802154_configure_mac_key() : avoid keys copy
in case of the value field of first key in the mac_key
pointer is null.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
As of commit c92c8ab461
("firmware: scmi: core: merge send_message() logic"), the SCMI core is
able to figure out that it needs to use polling-based messaging whenever
in PRE_KERNEL stage. Thus, consumers are no longer required to query the
kernel's state via a `k_is_pre_kernel()` call and pass its value to
`scmi_send_message()`.
Furthermore, said commit also changes the semantic of the "use_polling"
parameter. Now, for interrupt-based messaging, the core may choose to
ignore the caller's request and use polling instead.
Thus, replace all usages of `k_is_pre_kernel()` with a hardcoded value.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Enabling and disabling interrupts may happen concurrently from thread
and interrupt context. Add locks to synchronize the access to the ctrl
register.
This was observed to improve the stability of the zephyr,bt-hci-uart
driver when used with the cmsdk_apb uart driver.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Similar to the TX interrupt, the RX interrupt is also an edge interrupt
that only fires when a new bytes is received. When enabling the RX
interrupt, data may be already present in the RX FIFO. Call the
interrupt handler manually to start processing.
Also check if calling the interrupt handler is really required.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
irq_is_pending should not return 1 when interrupts are disabled through
irq_XX_disable. Check the interrupt enable bit before returning.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
For use in tests where the existing "vnd,dac" driver doesn't work as it
returns error codes for all API functions. The approach is mimicked from
the adc-emul driver.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Instead of using MCOX specific check with STM32MP1 devices,
the dedicated enable bit is defined in device tree.
This breaks compatibility with old DT overlays for
STM32MP13 devices.
The new overlay should now have 2 clocks, where the 1st one
is the enable bit, e.g. like:
clocks = <&rcc MCO1CFGR_REG BIT(12)>, <&rcc ...>;
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
The change introduces clock-names into the MCO device tree.
This shouldn't break compatibility with existing DT overlays.
It clarifies the clock configuration for devices
with dedicated enable bit for MCO.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.
Main changes:
- clock control: delegate peripheral clock gating to HAL
layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add an opt-in Kconfig option to use the RP2350 untranslated XIP alias
for flash reads. This ensures the flash API can still access physical
partitions when Address Translation has remapped the primary window.
It otherwise introduces no changes for existing applications.
Signed-off-by: Raul Hernandez <raul.hernandez@spaceface.dev>
Move the get_regs(dev) call after DEVICE_MMIO_MAP() to ensure the MMIO
region is mapped before retrieving the register base.
This fixes the potential invalid MMIO access.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add missing dummy macro define HSUSBD_BUSINTEN_SOFIEN_Msk for when
CONFIG_UDC_ENABLE_SOF is enabled to pass compile for USBD
Fixes: #102173
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Add support for PM policy device constraints to the MCUX LPADC driver.
This allows the driver to specify that certain power states should be
disabled when the device is active, which can help ensure proper operation
and reduce power consumption.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>