Add a watchdog timer driver for all Bouffalo Lab SoC families.
Tested on Sipeed M0Sense (BL702) with tests/drivers/watchdog/wdt_basic_api.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Extract five helpers from i2c_bflb_transfer to reduce cognitive
complexity from ~45 to ~15:
- i2c_bflb_check_msgs: validate message lengths and 10-bit addressing
- i2c_bflb_wait_idle: busy-wait for bus idle
- i2c_bflb_wait_completion: wait for transfer end with error checks
- i2c_bflb_do_read: read path with scatter into msg buffers
- i2c_bflb_do_write: write path with 0-length probe workaround
Also check return values of i2c_bflb_read/i2c_bflb_write that were
previously ignored, and fix num_msgs <= 0 to == 0 (uint8_t).
Signed-off-by: William Markezana <william.markezana@gmail.com>
Fix uninitialized k_timepoint_t in read/write paths that caused
undefined timeout behavior. Add early NAK/error detection in the
transfer loops to fail fast instead of spinning until timeout.
Remove unnecessary __no_optimization attributes.
Tested on Sipeed M0Sense (BL702) with I2C peripherals across
PDS sleep/wake cycles.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add a hardware info driver for the Bouffalo Lab BL70x SoC family
that reads the unique device ID from the on-chip efuse.
Tested on Sipeed M0Sense (BL702).
Signed-off-by: William Markezana <william.markezana@gmail.com>
Mention the addition of a new devicetree property "ti,nwkrq-voltage-vio" to
the TI TCAN4x5x CAN controller binding ("ti,tcan4x5x").
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for configuring the voltage rail used for the nWKRQ
pin. Previously, the driver hard-coded this to VIO, open-drain.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Configure the nWKRQ pin for open-drain with an internal pull-up resistor,
already enabled on the device-state-gpios GPIO, to the VIO rail.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Configure the nWKRQ pin for open-drain with an external pull-up resistor,
present on the board, to the VIO rail.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add boolean devicetree property for setting the voltage configuration for
the nWKRQ pin GPO buffer.
The property name was chosen to match the one used in the Linux devicetree
binding.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Switch to use k_usleep() instead of k_busy_wait() in tcan4x5x_reset()
function, waiting for the reset to complete.
Initially, the tcan4x5x_reset() function was only ever called during driver
initialization, where busy waiting for 1000 microseconds was not an issue,
but since adding device power management support, this function can now
also be called during device resume.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When the TCAN4550 nWKRQ pin is configured for VIO, the pin is an open drain
output and requires an external pull-up resistor to the VIO rail.
Since the TCAN4550 EVM does not have such a pull-up, enable it on the GPIO
to which the nWKRQ pin is connected.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This PR adds support for W6100 spi ethernet controller.
This driver is tested on the w6100-evb-pico
https://docs.wiznet.io/Product/Chip/Ethernet/W6100
Signed-off-by: Sayed Naser Moravej <seyednasermoravej@gmail.com>
zeroing CNTHCTL_EL2 traps physical timer/counter access from EL1 to EL2,
but Zephyr has no hypervisor to handle those traps.
Enabling access is the standard EL2→EL1 drop behavior.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Use ate_end_addr >= data_end_addr instead of > to ensure the
last delete ATE is scanned and recovered correctly.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Fixeszephyrproject-rtos/zephyr#103442
Origin: Original
Adds a separate TX traffic class for CDC-ECM and CDC-NCM in USBD Next
to prevent a deadlock during interface provisioning.
Tested with a custom nRF53-app firmware which combines CDC-ECM /
CDC-NCM (both tested) with mDNS with USB hosts MacOS, iPadOS, and
Alpine Linux.
Signed-off-by: Jay Beavers <jay@tolttechnologies.com>
Update TF-M to prevent TF-M runtime secure firmware to lock the internal
non-secure flash when it erases or re-program a secure area (e.g., ITS
or PS). This prevents flash lock management conflicts when Zephyr
erases or re-program a non-secure flash area it owns.
In addition, it add a fix stale pFlash state which could cause a panic
when executing a swap using external memory.
Co-authored-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Calling sys_heap_runtime_stats_get on a valid but uninitialized heap
results in a NULL pointer access. Add an additional check in this
function that the heap is valid and has also been initialized.
Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
The sample has a main loop that sleep 5s every iteration. The sleep is
currently at the beginning of the loop, so we have to wait 5s before
getting the first transfer.
This make debugging with this sample troublesome.
Move the sleep of 5s at the end of the loop
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
HSLV now handled by stm32_iocell driver and board device tree.
LL_PWR_EnableXSPIM2 called already in SoC initialization:
soc/st/stm32/stm32h7rsx/soc.c
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Tests like log_backend_uart include an emulated UART driver which
gets selected for ITCM code relocation, as part of drivers__serial.
Filter by FILE instead of LIBRARY to avoid this.
Fixes#104275
Signed-off-by: Josuah Demangeon <me@josuah.net>
The GPIO ISR needs both a pointer to the device object and its data block
(because the callback linked list is stored in the data block). Sicne the
device object has a built-in pointer to the data block, using that as the
ISR's argument allows obtaining all we need "for free" whereas the current
approach wastes 4 bytes of RAM per GPIO port instance.
Note that once compiled, the reworked ISR is effectively identical to the
old one (only the offset of one `ldr Rt, [Rn, #off]` changes).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The same symbol may be found multiple times when a function is declared in
a header, which causes anytree.search.find() to throw a CountError.
Catch the exception and ignore duplicate symbols instead of crashing.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Includes mapping files for DFP macros to standardize macro
names across multiple SoCs for the SERCOM UART G1 driver.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
Changes added to make g1 driver to be used across multiple
SoC's and also avoids use of multiple SOC symbols in the
source file for selecting between the similar but differently
named macros and reg definitions across multiple DFP's.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
Includes files for mapping DFP macros to follow a common
macro name across multiple SoC for sercom uart g1 driver
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>