WPA3 (aka SAE) uses different fields for password and password length,
pass the proper ones to whd_wifi_join depending on usr_result.security.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add sys_clock_is_locked(), the analog of z_spin_is_locked() for the
timer lock exposed via sys_clock_lock(). Use it to assert lock
ownership in sys_clock_set_timeout() and sys_clock_elapsed() of the
six timer drivers that were migrated to sys_clock_lock() and
consequently no longer acquire anything internally in those callbacks
(arm_arch_timer, riscv_machine_timer, xtensa_sys_timer, hpet,
apic_tsc, intel_adsp_timer).
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The straightforward way to convert cycles to nanoseconds with
x * y / z
will easily overflow the multiplication in the numerator. Rewriting the
operation as
y * (x / z + (x % z) / z)
or NSEC_PER_SEC * (quot + (rem / cycles_per_sec)) improves the situation
and allows useful sensor timestamps for a bit longer before overflows are a
concern.
The API in sys/time_units.h handles exactly this type of numerical
manipulation for time units which might overflow. The predefined macros
only handle conversions between the various Z_HZ_* macros so a wrapper for
z_tmcvt_64 is required for the external clock case.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Add PWM driver support for Realtek Bee series SoCs,
including RTL87x2G and RTL8752H.
This driver supports:
- Pulse width modulation output
- Period and pulse width configuration
- Polarity inversion
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
add reset controller support to the NXP LPSPI driver and
use reset controller APIs if available.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
add reset controller support for the mcux lpi2c driver and
use reset controller APIs if available.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add optional devicetree reset support to the i.MX USDHC
driver and deassert the reset line before controller
initialization.
Keep existing behavior unchanged when no reset is described.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
add reset controller support for NXP SEMA42 hardware
spinlock driver, and use reset controller APIs if available.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
RT700 numbers PRSTCTL registers in a global namespace across
multiple RSTCTL instances, while the existing driver assumes
per-instance local offsets.
Add an optional offset-base devicetree property and normalize
reset IDs before accessing the controller registers. When the
property is not present, keep the existing behavior unchanged.
This keeps the driver backward compatible for current users while
allowing RT700 reset specifiers to follow the SDK/manual numbering.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add support for the i2c .recover_bus api in Infineon's i2c_pdl
driver. This uses the functions defined in i2c_bitbang.c to cause a
release of an improperly held sda line.
Additionally, changes are made to the driver's relevant Kconfig
and i2c binding .yaml files. This adds definitions for the sda and scl
bins for recovery purposes. The .recover_bus api is set to depend on the
"scl_gpios" and "sda_gpios" variables being set up in devicetree.
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
In #90652 we removed phy related config from eth api,
unfortunatly ETHERNET_CONFIG_TYPE_T1S_PARAM was forgotten
to be removed.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
When the transmit FIFO is full and poll_out checks for availability,
it will read the register value only once and block forever. Make
the uart_aesc_regs struct volatile to read the FIFO availability
during each check.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Even though compat "st,stm32f1-flash-controller" is also used by stm32f0,
stm32f3, stm32l0 and stm32l1 series, these series don't share exactly
the same members of FLASH_TypeDef and OB_TypeDef structures.
For example, the CR member is available on F1 but not on the L0 series.
There is also issue with missing variables or naming conventions :
- FLASH_OBR_RDPRT (F1) vs FLASH_OBR_RDPRT1 (F0)
- RDP_KEY present in F1 series and not in others.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add support for STM32WB0 series to the STM32 HWINFO driver, using the SoC's
`UID64` as source for both UID and EUI64.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The modem_cmd_handler_config struct doesn't have any return value.
The modem_cmd_send_data_nolock function returns 0 if ok, < 0 otherwise.
This behavior is expected to have been implemented in the called write
function.
Signed-off-by: Eliott Speyser <eliott.speyser@st.com>
Instead of performing series check, use the new common Kconfig option
CONFIG_HAS_STM32_UNCACHED_ACCESS_ONLY_OTP in drivers which access the
internal NVM's OTP/read-only area.
While at it, use the public `sys_cache_xxx()` API in flash_stm32 instead
of the internal `cache_xxx()` API.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
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 (STM32F405/407/415/417) section 2.10.1
- ES0305 (STM32F412) section 2.11.1
- ES0206 (STM32F2) section 2.10.1
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.
The V2 driver already had a comment documenting this errata but
the code still aborted the transfer with is_err=1 and goto end.
Fix both V1 and V2 drivers to return 0 (continue) in controller
mode when BERR is detected. In target mode, BERR is still reported
as a real error since the errata only applies to controller mode.
Signed-off-by: Raguraj Rajendran <raguraj.rajendran@rapyuta-robotics.com>
Simplify the `modem_cellular.c` file by pulling out all the individual
modem macros and instantiation to a dedicated file per modem.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the common 3GPP message handlers to the header to enable OOT modems
to use the common implementations.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Replace the placeholder help text for BT_STM32_IPM with a short
description of the driver. This makes the option clearer in Kconfig
interfaces and avoids leaving a visible TODO in user-facing text.
Signed-off-by: Manaam Rehan <manaamrehan2k19@gmail.com>
Current implementation does not allow omitting a port. Also, if a port is
disabled, the last port is not present in ports array.
Use fixed index for each port in ports array, i.e. porta is always index 0,
portb is index 1, etc. If a port is ommitted or disabled, NULL is assigned
instead of port address.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Create a parent-child relation for I2C-I3C APIs, this allow
DEVICE_API_IS(i2c, i3c_dev) to return true.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add driver supporting the comp module in TI MSPM0 G and L series
with interrupt trigger and reference voltage support.
Add a window comparator mode feature for mspm0 g series
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
The supplicant's mbedTLS crypto backend always compiles
crypto_mbedtls-ec.c when ESP32_WIFI_MBEDTLS_CRYPTO is enabled, so
the ECC PSA primitives it references are required regardless of
WPA3-SAE. Building with only ESP32_WIFI_MBEDTLS_CRYPTO=y previously
emitted PSA warnings because the ECC selects lived solely under
ESP32_WIFI_ENABLE_WPA3_SAE.
Move the always-needed ECC selects (ECDH, ECDSA, SECP_R1_256,
KEY_PAIR_BASIC, KEY_PAIR_IMPORT, PUBLIC_KEY) onto
ESP32_WIFI_MBEDTLS_CRYPTO. Keep KEY_PAIR_GENERATE and
KEY_PAIR_EXPORT under ESP32_WIFI_ENABLE_WPA3_SAE since those paths
are exercised only by SAE/DPP keypair generation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
During read operations, the same buffer was previously used for both TX
and RX, causing arbitrary data from the RX buffer to be transmitted on
MOSI. This could lead to unintended signaling on the bus and unreliable
device behavior, including corrupted reads (e.g. incorrect JEDEC ID).
Fix this by separating TX and RX buffers:
- Do not drive MOSI during read transactions (TX buffer set to NULL)
- Initialize the RX buffer to 0 before use
This ensures clean read operations without spurious data on MOSI.
During SPI operation, the TX buffer supports a maximum length of
6 bytes. It was set to 5 bytes, which could lead to a potential
overflow.
Signed-off-by: Flavien Carvalho <flavien.carvalho@wiifor.com>
- Initial implementation for the numaker watchdog timer peripheral.
- Add binding to the m48x series soc.
Signed-off-by: Scott Laboe <scottyl2.718@gmail.com>
Set poll revents even when epoll didn't signal any event. This particularly
fixes the case when epoll didn't have a chance to run (blocking APi with
timeout=0).
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Propagate 'revents' after calling nsos_adapt_poll_update(), by copying
'poll->mid.revents' (which gets updated by this function) to the
'pfd->revents' object (which is read by caller function).
Fixes: ea44e2715a ("drivers: net: nsos: update unwatched file descriptor
with poll()")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Use nsi_host_{*alloc,free,strdup} to utilize host side libc heap memory.
This removes dependency on Zephyr heap configurations: kernel heap and
embedded libc heap.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
If both CONFIG_MSPI_DMA and
CONFIG_MSPI_DW_HANDLE_FIFOS_IN_SYSTEM_WORKQUEUE are enabled then
a compilation error would occur as dev_data would be defined twice.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Add logging/log.h include instead of relaying on it being included
indirectly from other headers
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add logging/log.h include instead of relaying on it being
included indirectly from other headers
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Don't clear DMA status flags when DMA controller is managed by the HAL.
The same logic was introduced in the dmav1/dmav2 driver by commit
110c61bfea.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
config->adc is of type 'const struct device *', assigned via
DEVICE_DT_GET(). It has no '.dev' member — that field exists only
in 'struct adc_dt_spec'.
The LOG_ERR_DEVICE_NOT_READY() call in lpadc_temp40_init() was
using config->adc.dev, causing a compile error on all platforms
that select NXP_PMC_TMPSNS:
error: 'config->adc' is a pointer; did you mean to use '->'?
Remove the spurious '.dev' dereference. LOG_ERR_DEVICE_NOT_READY()
accepts 'const struct device *' directly, so passing config->adc
is correct and consistent with the device_is_ready() call on the
line above.
Signed-off-by: Bartlomiej Fijal <StaryAnoda@Gmail.com>