Commit graph zephyr/drivers
Author SHA1 Message Date
Sylvio Alves
09091b15d7 drivers: clock_control: split esp32 driver by clock ip
Move the per-SoC clock logic out of the single clock_control_esp32.c
into two family files selected at build time: one for the RTC_CNTL
based parts (esp32, s2, s3, c2, c3) and one for the PMU/LP_CLKRST
based parts (c5, c6, h2, p4). Shared device API ops, init and the
common includes move to a shell file and a private header.

This removes the cross-series preprocessor chains that dominated the
CPU and slow-clock routines and matches how other multi-SoC clock
drivers are organized in the tree.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-07-07 17:24:03 +01:00
Alberto Escolar Piedras
5c1462d0b7 drivers: i2c: stm32: Avoid unused variable warning
data is only used if CONFIG_I2C_TARGET is enabled.
Let's move its declaration into that ifdef to avoid a compiler
warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-07-07 13:39:40 +02:00
Jamie McCrae
3ef4d9ecc2 drivers: power_domain: kconfig: Fix bleed
Fixes a Kconfig bleeding through when it should not

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-07 13:39:28 +02:00
Jamie McCrae
b25ae451dd drivers: virtio: kconfig: Fix bleed
Fixes a Kconfig bleeding through when it should not

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-07 13:39:28 +02:00
Jamie McCrae
22bb801e48 drivers: crypto: kconfig: Fix bleed
Fixes a Kconfig bleeding through when it should not

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-07 13:39:28 +02:00
Jamie McCrae
3498347519 drivers: clock_control: kconfig: Fix bleed
Fixes a Kconfig bleeding through when it should not

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-07 13:39:28 +02:00
Collins Culbert
b45cef16db drivers: spi: stm32: add Kconfig help for SPI_STM32_BUSY_FLAG_TIMEOUT
The SPI_STM32_BUSY_FLAG_TIMEOUT option had no help text, leaving
users with no explanation of its purpose when browsing menuconfig. Add
a description that documents how long the driver polls for the BSY flag
to clear after a DMA transfer on STM32F7 and STM32L4 devices affected
by the busy-flag errata.

Assisted-by: OpenAI Codex:gpt-5
Signed-off-by: Collins Culbert <coculbert@icloud.com>
2026-07-07 13:38:52 +02:00
Etienne Carriere
a1524aa516 drivers: i2c: stm32: Report bus overflow error in v2 RTIO driver
Report I2C OVR errors in STM32 I2C v2 RTIO driver that was missing.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 13:37:47 +02:00
Etienne Carriere
ee69a32d50 drivers: i2c: stm32: ignore spurious BERR in controller mode in RTIO
The STM32 I2C V1 and V2 peripherals can generate spurious Bus Error
(BERR) flags in controller mode. This is documented in multiple
errata sheets:
  - ES0182 (STM32F40x/41x), Rev 18, section 2.10.1
  - ES0392 (STM32H74x/75x), Rev 15, section 2.19.4

The recommended workaround is to clear the BERR flag and take no
further action, letting the transfer continue normally. If a real
bus error occurs, the transfer will time out.

This change (including description above) port commit 74ae38ceeb
("drivers: i2c: stm32: ignore spurious BERR in controller mode") in
the STM32 I2C RTIO drivers.

Reword inline comments and make them consistent across STM32 I2C v1 and
v2 drivers, non-RTIO and RTIO.

Co-authored-by: Raguraj Rajendran <raguraj.rajendran@rapyuta-robotics.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 13:37:47 +02:00
Etienne Carriere
23968afb51 drivers: i2c: stm32: fix ISR storm on write-read repeated START in RTIO
When BTF fires after the last byte is transmitted, it calls handle_txe()
with data->xfer_len already at 0. The else branch generates a stop
condition and signals completion, but does not disable ITBUFEN first.
Since TXE is level-triggered and remains asserted until DR is written,
the event ISR can re-fire on the stale TXE flag.

During a write-read combined transfer (e.g., register read), the write
phase completes and msg_read() calls enable_transfer_interrupts() which
re-enables ITBUFEN. However, the TXE flag from the write phase is still
asserted (hardware only clears it on DR write or ADDR clear). The event
ISR sees TXE=1 but is_write is now false, so no handler matches and the
ISR returns without clearing TXE — causing an infinite interrupt loop.

Catch TXE active during a read transfer Iin i2c_stm32_event() and
disable ITBUFEN to quench the stale TXE interrupt source.

Re-enable ITBUFEN after clearing ADDR in handle_addr(). The ADDR
clear implicitly clears TXE, so re-enabling ITBUFEN at this point
is safe and ensures RXNE interrupts work correctly for the read
phase.

This change (including the above description) ports commit 83f8c21a23
("drivers: i2c: stm32_v1: fix ISR storm on write-read repeated START")
in the STM32 I2C v1 RTIO driver.

Co-authored-by: Gowtham Palanichamy <gowtham.palanichamy@rapyuta-robotics.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 13:37:47 +02:00
Etienne Carriere
d7d3fe90d2 drivers: i2c: stm32: disable ITBUFEN on Tx on completion in RTIO
When BTF fires after the last byte is transmitted, it calls handle_txe()
with data->xfer_len already at 0. The else branch generates a stop
condition and signals completion, but does not disable ITBUFEN first.
Since TXE is level-triggered and remains asserted until DR is written,
the event ISR can re-fire on the stale TXE flag.

Add LL_I2C_DisableIT_BUF() at the top of the else branch as a defensive
measure so the level-triggered TXE cannot re-enter the ISR after the
transfer is logically complete.

This change (including the description above) ports commit 83f8c21a23
("drivers: i2c: stm32_v1: disable ITBUFEN in handle_txe on completion")
in the STM32 I2C v1 RTIO driver.

Co-authored-by: Gowtham Palanichamy <gowtham.palanichamy@rapyuta-robotics.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 13:37:47 +02:00
Mark Wang
755b39f26f drivers: usb: udc: mcux: fix cancelled transfer handling
Fix handling of cancelled transfers in MCUX USB device controller
drivers (EHCI and IP3511). When a transfer is cancelled, the MCUX
controller returns USB_CANCELLED_TRANSFER_LENGTH as the transfer
length. Previously, this special value was treated as a valid
transfer length and callback 0 for this transfer, causing incorrect
transfer operations in class codes.
Add proper detection of cancelled transfers by checking for
USB_CANCELLED_TRANSFER_LENGTH and returning -ECONNABORTED error
code.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-07-07 13:35:11 +02:00
William Markezana
abbc3a0e34 drivers: wifi: add Bouffalo Lab BL61x WiFi driver
Add a native Zephyr WiFi driver for the BL616/BL618 SoC family.

The driver interfaces with the vendor macsw blob through wl80211 and
implements the Zephyr wifi_mgmt API for station connect/disconnect,
scanning, and AP mode. WPA supplicant integration is provided via
the hostap subsystem.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-07-07 13:34:51 +02:00
William Markezana
28f7ea4b49 soc: bflb: bl61x: add WiFi RF calibration and platform support
Extend bflb_rf_init() to support WiFi mode (WL_API_MODE_ALL) with
TX power targets and country code configuration when CONFIG_BFLB_WIFI
is enabled.

Add WiFi platform glue: MAC ISR wiring, task creation, low-power
stubs, wl80211 RTOS primitives (heap, RNG, timers), and the linker
section for WiFi shared RAM.

Introduce CONFIG_BFLB_BL61X_WL_RMEM_SIZE for PHY/RF retention memory
sizing.

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-07-07 13:34:51 +02:00
Etienne Carriere
e4c2f19046 drivers: wifi: ameba: Refer to DT_DRV_INST(), not DT_DRV_COMPAT
Correct inline comment that should refer to DT_DRV_INST() macro
instead of DT_DRV_COMPAT macro.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 09:57:10 +02:00
Marek Maškarinec
501b79fb05 drivers: nrf-sw-pwm: Fix missing comma in iterator macro
The comma was removed during the migration in commit ad1e5ac253. All
usages of this driver inside the Zephyr tree use only one channel,
which doesn't trigger the issue.

Signed-off-by: Marek Maškarinec <marek@mrms.cz>
2026-07-07 09:50:50 +02:00
Alberto Escolar Piedras
a148f403a7 drivers: ethernet: sensry: Remove unused variable
The variable ret was not used, and the compiler warned as much.
Let's just remove it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-07-06 15:09:28 -04:00
Tiago Medicci
7d66ebe1f8 driver: input: update Espressif driver for the touch sensor
Update the driver used for ESP32, ESP32-S2 and ESP32-S3 to the
latest version and add support for ESP32-P4.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-07-06 15:09:21 -04:00
Andrej Butok
05d260ffaa watchdog: nxp: mcux_wwdt: enable peripheral clock at init
- Removes the compile-time guard so the peripheral clock is always
   enabled in the driver init path, ensuring the WWDT registers
   are accessible.
   Otherwise, at least for MCXA, WWDT register access by
   mcux_wwdt_config_func()->WWDT_ClearStatusFlags() triggers
   data bus fault.
 - Tested on frdm-mcxa266.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-07-06 15:09:05 -04:00
Etienne Carriere
d9858b2170 drivers: i2c: stm32: Add bus recovery in RTIO drivers
Add bus recovery in STM32 I2C RTIO drivers using a work to ensure it
does not execute from an interrupt context. For sake of simplicity,
always use this sequence even if the initial call already executes
from a thread context.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-06 15:08:31 -04:00
Etienne Carriere
5dc6baa4a1 drivers: i2c: stm32: Move bus recovery sequence to common driver
Move the STM32 bus recovery sequence to STM32 I2C common driver
to factorize when used with the RTIO drivers flavors.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-06 15:08:31 -04:00
Tim Pambor
da7c9df028 ethernet: dwc_mac: collect ethernet stats
Support collection of the most common ethernet statistics.
This currently does not utilize any hardware statistics counters,
but rather collects the stats in software.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-07-06 11:30:11 -04:00
Vincent Tardy
c956191164 drivers: ieee802154: stm32wba: add CONFIG_BUILD_ONLY_NO_BLOBS for CI tests
Adds an option to enable CI tests without binary blobs.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-07-06 11:30:01 -04:00
Vincent Tardy
a2133bc6a9 ieee802154: drivers: stm32wba : Add module blobs dependencies to Kconfig
Add blobs presence dependency to the KConfig IEEE802154_STM32WBA

Add zephyr_blobs_verify() CMake function for STM32 HAL

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-07-06 11:30:01 -04:00
Vincent Tardy
b50a9bdb8b drivers: bt: stm32wba: add CONFIG_BUILD_ONLY_NO_BLOBS to allow CI tests
Adds an option to enable CI tests without binary blobs.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-07-06 11:30:01 -04:00
Tim Lin
eac92173cf drivers: i2c: it51xxx: Fix write OOB in target FIFO ISR
Add pre-checks on w_index before accessing target_in_buffer to prevent
OOB memory access triggered by an oversized I2C transaction.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-07-06 11:29:46 -04:00
Matthias Alleman
c37125204c drivers: sensor: lis2dh: Add down event int to any motion configuration
Lis2dh interrupts were only fired for up events. Fixed it by adding
down event enable bits to the ANYM_CFG.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2026-07-06 11:29:30 -04:00
Georgij Černyšiov
928ad81c18 drivers: crypto: stm32: add constant time comparison
Adds constant time comparison to replace memcmp.

Co-Authored-By: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2026-07-06 11:28:32 -04:00
Georgij Černyšiov
3c3e00bc5c drivers: crypto: stm32: add mbedtls ct memcmp option
* Use if, endif to scope the configuration options.
* Add an option to use mbedtls_ct_memcmp instead of memcmp.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2026-07-06 11:28:32 -04:00
Georgij Černyšiov
52a86fddc9 drivers: crypto: stm32: h7: support AES GCM and CCM
Adds AES GCM and CCM support to the STM32 crypto driver.

As the implementation has only been validated on a
limited number of STM32 SoCs, it is enabled only
for platforms that set the DT boolean property
`gcm_ccm_supported`.

Note: To use CCM with additional authenticated data (AD),
the heap memory pool size must be large enough to
accommodate the AD length, rounded up to the nearest
multiple of 16 bytes. For an AD length of 8 bytes,
the heap size must be at least 16 bytes. For an AD
length of 17 bytes, you'll need at least 32 bytes.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2026-07-06 11:28:32 -04:00
Georgij Černyšiov
49fcd2be6f drivers: crypto: stm32: mark default case as unreachable
Marks default case for cipher mode as unreachable.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2026-07-06 11:28:32 -04:00
Georgij Černyšiov
ec2885e373 drivers: crypto: stm32: move device_sem from do_aes
Device semaphore handling is being moved out of the do_aes function.
This is necessary to support upcoming GCM and CCM modes,
which require the semaphore to be held during tag generation.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2026-07-06 11:28:32 -04:00
Furkan Akkiz
04d263dc54 drivers: usb: udc: Fix nodata setup status issue on MAX32
Calling MXC_USB_Ackstat(0) immediately on SETUP receipt causes the
hardware to send the STATUS IN ZLP autonomously. The host then
issues the next SETUP before the Zephyr stack enqueues its own
STATUS IN.

Fix by deferring MXC_USB_Ackstat(0) to udc_event_xfer_in() when
the stack enqueues the STATUS IN ZLP. A nodata_setup flag tracks
whether the pending transfer is a no-data SETUP status stage.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2026-07-06 14:51:05 +01:00
Josuah Demangeon
94d2ebbab1 drivers: flash: bflb: tune comment
Adjust comment QO -> QIO.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-07-06 14:49:59 +01:00
Josuah Demangeon
86c195b2a1 drivers: flash: bflb: make flash_bflb_set_sahb() return void
The return value of flash_bflb_set_sahb() is not used so make it return
void instead.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-07-06 14:49:59 +01:00
Samuel MARTIN
89f36fd686 drivers: clock_control: stm32u5: Add support for SHSI
Add support for STM32U5 secure-HSI clock.

Signed-off-by: Samuel MARTIN <samuel.martin@vossloh.com>
2026-07-06 14:48:17 +01:00
Khai Do
c5ba1c9559 drivers: gpio: Add Allwinner H618 GPIO driver
Add standard Zephyr GPIO driver for Allwinner H618 SoC.
This driver supports pin configuration, reading/writing,
and basic external interrupt configuration.

Signed-off-by: Khai Do <dovankhai97@gmail.com>
2026-07-06 14:48:00 +01:00
Lucy Wong
80aa6cddaa fix: address coding style and DTS review comments
- systick: split multi-statement lines into one per line (Zephyr style)
- ch32v103.dtsi: add missing reg property alongside ranges in flash0 node

Signed-off-by: Lucy Wong <mova845@outlook.com>
2026-07-06 14:47:28 +01:00
Lucy Wong
a631c09c75 drivers: wch: add CH32V10x clock and systick support
Extend the WCH RCC clock controller with CH32V10x flash wait-state
configuration. Update the systick driver to handle the V3A register
difference: CTLR.CNTIF is used instead of SR for interrupt clearing.

Signed-off-by: Lucy Wong <mova845@outlook.com>
2026-07-06 14:47:28 +01:00
Anton Vynohradov
0c72d9163a drivers: clock_control: add SmartFusion2 clock controller support
Add initial clock controller driver support for the Microchip
SmartFusion2 platform.

This commit introduces a SmartFusion2-specific clock control
driver together with the required Devicetree binding definitions
for clock and interrupt integration. The implementation enables
basic clock management infrastructure required for SoC and future
peripheral support.

Signed-off-by: Anton Vynohradov <vynohradov.external@bavariamatic.com>
2026-07-06 14:46:11 +01:00
Michael Zimmermann
fada4797ac drivers: counter: silabs: Allow compiling sleeptimer for gecko_sdk
This works, because the API stayed the same between gecko_sdk and
simplicity_sdk.

This driver allows xg13 SoCs to use an RTCC based counter while the RTCC
peripheral is used for the silabs sleeptimer service.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-07-06 10:28:50 +02:00
Michael Zimmermann
30c7db8c77 drivers: timer: silabs_sleeptimer: add support for gecko sdk
The sleeptimer service from the gecko_sdk is a generic API which supports
multiple hardware timer peripherals internally. The reason we want to use
this rather than a Zephyr native driver, is that sleeptimer is what's used
by the power_manager service from the SDK which in turn is used by librail.

Combined with other, future commits, this will allow reducing the power
consumption of gecko_sdk based SoCs while they are idle.

Since the APIs between gecko_sdk and simplicity_sdk are the same, all
that's needed is to adjust the Kconfig dependencies and compile the
relevant sdk code. For now, this supports the RTCC peripheral only, which
is used on efr32mg13p, which is what I test with.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-07-06 10:28:50 +02:00
Holt Sun
68c94c402c drivers: intc: nxp: enable WKPU on NXP MCXE31x
The NXP MCXE31x Wake-up Unit (WKPU) is register-compatible with the
S32K3 WKPU already supported by the intc_wkpu_nxp_s32 driver: same
register map, base address 0x402B4000, IRQ 83, and 64 wake-up
sources. Bind the MCXE31x WKPU node to that driver by switching its
compatible from the placeholder "nxp,wkpu" (which had no binding or
driver behind it) to "nxp,s32-wkpu".

Every SoC that instantiates this controller exposes 64 wake-up
sources, so generalise NXP_S32_WKPU_SOURCES_MAX to a plain
"default 64" instead of a per-SoC-series default; the range 32-64
still lets a future 32-source part override it.

The node lives in the shared nxp_mcxe31x_common.dtsi, so this enables
the WKPU on MCXE315/316/317/31B. The driver source itself is not
modified.

Verified on frdm_mcxe31b: the WKPU device binds and initializes, and
an RTC-timeout event (WKPU internal source 1) triggers the WKPU ISR.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-07-06 10:28:17 +02:00
Thomas Hebb
ec46c494a9 drivers: sdhc: imx_usdhc: revert Zephyr-side cache maintenance
NXP's USDHC SDK driver knows how to do its own cache maintenance and
does so on platforms that set HAS_MCUX_CACHE[1]. Recently, a copy of
that cache maintenance logic was added on the Zephyr side because
certain cores, like the Cortex-M33 of the i.MX RT1180, use an external
cache controller and instead set HAS_MCUX_XCACHE.

However, the Zephyr-side cache logic is buggy: it clobbers the response
data in cases when the SDK can't use DMA (specifically, when the RX
buffer isn't 4-byte aligned[2]): in those cases, the SDK code writes to
the buffer, those writes go to cache, then Zephyr invalidates the cache
discarding the written data.

NXP's SDK abstracts over different cache drivers just like Zephyr does,
so it's fine to enable its cache control for platforms with any type of
cache. Do that instead of reimplementing cache maintenance in Zephyr.

This partially reverts commit 0b8babdcc3 ("drivers: sdhc: imx_usdhc:
add cache maintenance on DMA path"), leaving only the new default value
for CONFIG_SDHC_BUFFER_ALIGNMENT.

[1] 2d8b1b1133/modules/hal_nxp/mcux/CMakeLists.txt (L140-L142)
[2] cddb388583/mcux/mcux-sdk-ng/drivers/usdhc/fsl_usdhc.c (L1343-L1346)

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-07-06 10:27:10 +02:00
Chidvilas Yerramsetti
b54efaee98 drivers: intc_gicv3: extend NS support to ARMv7-A
Extend the GICv3 driver's Non-Secure mode handling to cover ARMv7-A
platforms via CONFIG_ARMV7_A_NS, alongside the existing
CONFIG_ARMV8_A_NS.

Signed-off-by: Chidvilas Yerramsetti <cyerrams@qti.qualcomm.com>
2026-07-06 10:21:36 +02:00
Daniele Cloralio
29c92983ee drivers: wifi: infineon: clear scan callback on scan start failure
airoc_mgmt_scan() sets data->scan_rslt_cb before calling whd_wifi_scan().
If whd_wifi_scan() fails, the function returnes -EAGAIN without clearing
scan_rslt_cb. The next scan request may return -EINPROGRESS even if no scan
was actually running.

Clear data->scan_rslt_cb in the whd_wifi_scan() error path so driver
state remains consistent.

Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
2026-07-04 11:41:32 -04:00
Etienne Carriere
26fc2c977e drivers: i2c: bitbang: Add missing header file and guards
Add missing header guards in i2c_bitbang.h local header file.
Add missing inclusion of i2c.h needed for struct i2c_msg definition.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-04 11:41:09 -04:00
2bcb7bbff7 drivers: pwm: add support for the CH32V Advanced-control Timer (ADTM)
The ADTM is a superset of the GPTM and has the same core register
layout. See section 11.2.2 of the CH32V003RM for details on the
differences.

Use the same technique as the GD32 driver, i.e. use the same basic
driver with tweaks based on the features.

Add the common 3x GTPM and 1x ADTM Devicetree and pinctrl entries for
the 20x and 30x series and the extra 1x GPTM for the CH32V208 used in
linkw. I can follow up with the other chips in a separate PR.

Tested on the ch32v006evt and linkw by running
`samples/basic/blinky_pwm` and `tests/drivers/pwm/pwm_api` and
checking the output with a logic analyser.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2026-07-04 11:40:54 -04:00
Sylvio Alves
834f3197a5 drivers: dma: esp32: add esp32p4 axi and ahb dma support
Wire the gdma driver to the esp32p4 AXI and AHB DMA instances,
selecting the per-bus LL calls and 8-byte aligned descriptors so
both buses work through the common driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-07-03 19:25:47 -04:00
Filip Kokosinski
ddec762ad2 arch/riscv: support RV32I in the internal SBI
Right now, the SBI hard-codes the usage of ld/sd instructions, which are
not available on 32-bit platforms. This commit changes this to sr/lr from
`asm_macros.inc`, which automatically resolves them to proper load/store
instructions on 32-bit and 64-bit configurations. It also ensures proper
timer handling through 32-bit registers.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Co-authored-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2026-07-03 19:25:39 -04:00