The i2c bus may be pulled low by unstable environment.
Check the status before I2C transfer and
skip transmission if the bus is not ready.
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
- Switch binding to zephyr,cellular-modem-device.yaml
- Use MODEM_DT_INST_PPP_DEFINE to properly associate PPP with the modem
device and preserve runtime PM integration
Signed-off-by: Luca Impagliazzo <Luca.Impagliazzo@telit.com>
Add an event for broadcasting the current network status (Cell tower
info) to application users. There is no common 3GPP AT command that
provides this information, but vendor-specific commands appear to exist
for most modems. e.g. `AT%XMONITOR` for Nordic and `AT#RFSTS` for Telit.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Store the current registration access technology internally.
Switch cellular drivers to request the long form registration events to
extract this information. The `+CREG`, `+CGREG` and `+CEREG` commands
are 3GPP standards, but no effort has been made to check that each modem
supports the `2` mode beyond the nRF91 and Telit LE910C1 modems.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add the i2c_target_register and i2c_target_unregister callbacks
for the ESP32 I2C driver. The target path uses the SCL stretch
interrupt to feed one byte per controller clock, supports the
byte-by-byte and buffer-mode callbacks, and reports bus errors
through the optional error callback.
The same instance can act as controller between target
callbacks, since i2c_transfer temporarily switches it to
controller mode and restores the target configuration when the
transaction ends.
Target mode requires the SCL stretch-cause hardware feature and
is therefore enabled on ESP32-S2, S3, C3, C5, C6 and H2 only.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Having an interface library named "mbedTLS" and the real library named
"mbedtls" (as provided by the Mbed TLS module) is misleading.
This commit replaces:
- mbedTLS -> mbedtls_iface for the CMake library. "mbedTLS" is still
available as alias to "mbedtls_iface" for backward
compatibility, but this should be removed in the future.
- mbedTLS -> Mbed TLS in comments and documentation.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The DM9051 IC automatically appends a 4-byte CRC to each frame
stored in internal SRAM. The original driver did not account for
this, causing potential buffer overflow for large frames.
Add ETH_DM9051_CRC_SIZE constant and increase TX/RX buffer sizes
accordingly. Use IN_RANGE macro for RX length validation and
sizeof(data->rx_buf) for length checks.
Fixes: buffer overflow when receiving frames close to MTU (1500 bytes)
Fixes: potential RX length check issues with hardcoded values
Fixes: missing minimum frame size validation
Suggested-by: jukkar
Signed-off-by: Ching Ping Sun <tom_sun@davicom.com.tw>
There is such situation where the PINCTRL is enabled but no pinctrl
state for i2c dw, we need to skip the pinctrl_apply_state() otherwise
the driver can't be initialized successfully.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Remap brightness values from the [0, 255] range to the
[0, LED_BRIGHTNESS_MAX] range before calling
led_set_brightness_dt().
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The FLEXCAN_MbHandleIRQ function expects the last mailbox index as a
parameter, not the total number of mailboxes. Mailbox indices are
zero-based (0 to N-1), so passing the mailbox count directly causes
an off-by-one error that could lead to accessing an invalid mailbox
index during interrupt handling.
This fix changes the fourth parameter from `config->number_of_mb` to
`config->number_of_mb - 1U`, ensuring the correct last mailbox index
is passed to the IRQ handler.
The issue could manifest as incorrect interrupt handling or potential
memory access violations when processing CAN mailbox interrupts,
particularly when all available mailboxes are configured in classical
CAN.
Signed-off-by: William Tang <william.tang@nxp.com>
Drop scmi_system_protocol_message_attributes() checks and rely on
scmi_system_power_state_set() return value instead, since protocol
attributes do not guarantee support for specific power states.
This simplifies the logic and ensures consistent handling of reboot
requests. Also improve error logging by including the requested
power state.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
After GPIO-based I2C bus recovery, pinctrl_apply_state() restores
the SCL/SDA pin configuration, but the I2C peripheral registers
remain in a faulted state. This causes the bus to remain unusable
after recovery completes.
Call i2c_stm32_runtime_configure() after restoring pin state to
fully reinitialize the peripheral registers, leaving the bus in
a known-good working state.
Fixes#108956
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Select the internal 4.096V reference during init. The REF_SEL register
defaults to external, causing 0V output when no external reference is
connected.
Signed-off-by: Radu Ciobanu <Radu-rares.Ciobanu@analog.com>
Replace the custom bee_keyscan_all_released_and_debounced function with
input_kbd_matrix_active.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add CPU PLL initialization, configuration, and clock gating for BL808.
The CPUPLL uses the same WAC PLL register layout as AUPLL, located at
CCI_BASE + 0x7D0 with CCI_CPUPLL_* field prefixes.
Config tables provide per-crystal analog parameters and SDMIN values
for the 480 MHz reference frequency. CPUPLL is the default root clock
source in bl808.dtsi at 320 MHz, with BCLK at 80 MHz. Boards can
override up to 480 MHz via DTS overlay.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add Audio PLL initialization, configuration, and clock gating to the
BL808 clock controller. The AUPLL uses the CCI register block at
offset 0x750 with the same WAC PLL layout as WIFIPLL.
Config tables provide per-crystal analog parameters and SDMIN values
targeting 442.368 MHz (48 kHz audio family). BFLB_MUL_CLK scales to
other frequencies such as 451.584 MHz for the 44.1 kHz family.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add support for the TI TMP451 remote and local temperature sensor.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
The pinmux controller for the aesc silicon platform is a simple
controller to mux differnt input outputs to one output option.
Since this is an internal controller, pull, drive strength and slew
rate are not implemented due missing IO pad features.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Add pm_device_action callback to handle the display's power
management actions. The driver initializes via
pm_device_driver_init. First-time hardware setup lives in the
TURN_ON action so the framework runs it once the device's power
domain is on. On suspend the driver sends DISPOFF followed by
SLPIN. On resume it sends SLPOUT followed by DISPON, with delays
per datasheet.
Datasheet delays in suspend and resume branch on k_can_yield():
yield-safe contexts use k_msleep, otherwise k_busy_wait. This
keeps both runtime-PM (regular thread) and system-managed (idle
thread, IRQs locked) callers safe.
Register the driver with PM_DEVICE_DT_INST_DEFINE so the PM
framework or runtime PM can control the display power state.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Install default EEPROM read API delegate to avoid unitialized "out"
variable when no delegate is installed by the application/test suite.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Install default CAN API delegates to avoid unitialized "out" variables when
no delegate is installed by the application/test suite.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Handle GAMC register with device memory-mapped input/output management.
As the MMIO is used, remove the MMU configurations for GMAC accordingly.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add a driver for the WIZnet W6300 stand-alone Ethernet controller
with SPI interface. The driver operates in MACRAW mode using Socket 0
to send and receive raw Ethernet frames via Zephyr's Ethernet L2 layer.
PHY link state is monitored via the W6300 interrupt pin combined with
a periodic polling thread. The SPI protocol uses a 4-byte command
frame (instruction + address high + address low + dummy) for both
read and write operations, as required by the W6300 hardware.
Signed-off-by: Manjae Cho <manjae.cho@samsung.com>
Fix the race between restoring interrupt enable register (ier)
states and runtime interrupt enabling that caused ec watchdog
timeouts on Google Ciri platform during stress testing. The
issue occurs if the adc interrupt enable bit is set right
before restoration, overwriting it with the outdated disabled
status and stucking adc thread.
To address this, this commit synchronizes `ier_setting[]` with
runtime enable/disable operations so
`ite_intc_restore_interrupts()` uses the latest ier state.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Wi-Fi on PSRAM-enabled builds was failing because the shared multi
heap overlapped relocated .ext_ram.data noinit content. Anchor the
heap on the linker-reserved window, size esp32c5 and esp32s3 ext
segments to the cache window and bump the Wi-Fi SPIRAM heap floor.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add ESP32_WIFI_TASK_STACK_SIZE to control the stack size used by the
Wi-Fi tasks spawned through the blobs. The adapter applies the
value as a floor: when the Wi-Fi library passes a larger stack,
at runtime, the larger value wins, so a higher Kconfig only
raises the minimum and never shrinks the request.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
dma_init() performs a soft-reset to put the DMA into a known state, but
this reset is not repeated on subsequent stop/start cycles. If the DMA
stopped with error bits set, the next configure picks up the dirty state.
Add a needs_dma_soft_reset flag that is set by dma_stop() and checked at
the top of dma_configure(). When set, dma_configure() issues a soft-reset
via the RX channel DMACR (which resets both TX and RX), polls until the
reset bit clears, then continues with normal configuration.
Fixes DMA re-use after network interface down/up cycles.
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
adds a #if defined(CONFIG_CPU_CORTEX_M7) compilation gate for the
set_up_plls() function. This eliminates compiler errors on dual core
STM32H7 SoCs where the secondary core (Cortex-M4) enables pll since
according to the Zephyr docs, the clock configuration is only accessible
to the M7 core.
For example on the stm32h755xx soc the secondary Cortex-M4 core may choose
to enable the spi3 peripheral and have its kernel clock use pll2. Without
this fix, an implicit declaration of function errors related to the
following functions: get_vco_input_range and get_vco_output_range.
Signed-off-by: Jay Pacamarra <jay.pacamarra@sanctuary.ai>
Add basic `LOG_INF` messages notifying users of the updated charging
state when callbacks to users are run notifying them of the changes.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Relax the voltage clamping applied when configuring the maximum charge
voltage from software. Instead of treating the devicetree value as the
top limit, allow the full IC charge range to be selected.
Signed-off-by: Jordan Yates <jordan@embeint.com>
KSO16 and KSO17 may be used as GPIO function,
so the property can't be claimed "required: true".
Also, add the condition, if kso16/kso17 is used as kbs function,
then switch pin function to output temporarily before pin control
to kbs mode.
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Some architectures require aligned accesses so the recv_cbs address must be
aligned. With this fix, Virtio will work on riscv32_virtual platform.
Signed-off-by: Jérémy Lefaure <jlefaure@antmicro.com>
On 32 bits platforms, the 32 bits shift leads to undefined behavior. This
fix makes the driver build without warning on 32 bits platforms.
Signed-off-by: Jérémy Lefaure <jlefaure@antmicro.com>
Some reset reason masks are now guarded by symbols.
Include them in WDT reset reason definition.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>