stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
stallguard_threshold_velocity is always present on the controller node,
so COND_CODE_1(DT_PROP_EXISTS()) always evaluates true making the
BUILD_ASSERT unreachable and futile. Remove it.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
as in the spi_nor driver, so that the DPD mode can be used even if
the flash API caller does not perform the runtime device PM calls.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add proper handling of the `has-dpd`, `t-enter-dpd`, and `t-exit-dpd`
devicetree properties that could be applied to "jedec,mspi-nor" nodes,
but caused no effect so far.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Correct alignment of `\` characters in the `FLASH_MSPI_NOR_INST(inst)`
macro definition.
Use `NSEC_PER_USEC` symbols instead of 1000 when doing conversion from
nanoseconds to microseconds.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The GPIO subsystem forwards GPIO_INT_WAKEUP from dt_flags into the trig
argument of pin_interrupt_configure(). Wakeup source configuration is
already handled in gpio_esp32_config(); strip the bit before passing trig
to convert_int_type() to avoid -EINVAL return.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Convert the ENC424J600 Ethernet driver from a single hardcoded
devicetree instance to the standard Zephyr multi-instance pattern using
DT_INST_FOREACH_STATUS_OKAY().
Before this change, only instance 0 was registered, so boards with
multiple microchip,enc424j600 nodes could only create one Ethernet
interface.
This allows all status = "okay" ENC424J600 devicetree instances to be
registered.
Fixes#109849
Signed-off-by: Arayik Gharibyan <arayik.gharibyan.1999@gmail.com>
Accepted sockets had uninitialized poll fields and timeouts. A zero
k_timeout_t equals K_NO_WAIT (not K_FOREVER), so blocking recv()/send() on
accepted sockets returned immediately instead of waiting.
Signed-off-by: Jonas Remmert <j.remmert@smight.com>
The I2C Rise Time Register (TRISE) is present on the CH32V20x and
CH32V30x but not on the CH32V003 or CH32V00X. Change the test from
"not on the CH32V003" to "only present if the HAL defines the macro".
Tested by patching the board DTS to enable i2c1 and then building
`tests/drivers/i2c/i2c_api` for the ch32v003evt, ch32v006evt, and
linkw.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Route the ESP32_BT_* defaults through the generic BT_CTLR_* symbols
so a standard BT_CTLR_* toggle reaches the vendor knobs without
further user intervention. Select the matching BT_CTLR_*_SUPPORT
capabilities from BT_ESP32, and add Kconfig entries for the BLE 5.x
feature gates, controller power placement and light-sleep XTAL.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The MFX does not natively support BOTH direction edge
detection. In order to support it, adapt the requested edge
depending on the level at configuration time and toggle the
edge whenever an interrupt is received.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
So far the driver was setting the PU/PD bit properly however
missed setting another bit indicating of a Pull-Down or Pull-Up
are necessary.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The four irq_{rx,tx}_{enable,disable} helpers each wrote a single
constant value to IER -- BIT(N) on enable, ~BIT(N) on disable. As
a result they did not toggle a single bit; they overwrote the
entire register. Two side effects:
* irq_tx_disable() set the RX-enable bit (because ~BIT(1) has bit 0
set), and vice versa. The expected sequence
irq_rx_disable(); irq_tx_disable();
ends with the RX bit on, even though the caller asked for both
channels to be quiesced.
* On the BCM283x mini-UART, the upper bits of IER carry FIFO-clear
shortcuts (see BCM2837 ARM Peripherals manual, "AUX_MU_IER_REG").
Writing 0xfffffffd or 0xfffffffe arbitrarily perturbs them.
Fix: each helper reads IER, sets or clears its own bit, writes
back. The TX/RX-enable side now also preserves the other channel's
state correctly.
Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
The current implementation spins forever waiting for a character and
unconditionally returns 0. The uart_poll_in() API contract is that
the function returns -1 (or another negative value) immediately when
no character is currently available, and 0 only after writing a
received character to *c.
Without this, callers that use the canonical drain pattern --
while (uart_poll_in(dev, &c) == 0) {
;
}
-- hang. drivers/console/uart_console.c::console_input_init() does
exactly this when registering an input handler, so any application
that calls uart_register_input() (e.g. via Zephyr's console handler
subsystem) can deadlock at startup waiting on idle UART RX.
The fix is to test once and return -1 on the no-char path. The
"got a character" path is unchanged.
Signed-off-by: Jonathan Elliot Peace <jep@alphabetiq.com>
WIFI_SILABS_SIWX91X_FEAT_HIDE_PSK_CREDENTIALS impacted the way the NWp
print the log message. However, these logs are not available on production
firmware. So, it does not make sense to expose this parameter.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Until now, the siwx91x wifi driver used the default log level. It make more
sense to the use the log level provided b the Wifi subsystem.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reorganize the Kconfig options in preparation for a future rework of the
Wi-Fi driver. The new ordering groups related options together:
1. Hidden configdefault entries that tune network stack parameters
2. Native vs. offloaded network stack choice
3. Driver feature options
4. Scan and roaming fine-tuning options
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Defining a Kconfig symbol several times is dangerous. It is better to use
configdefault for the CMSIS related symbols.
Bluetooth configdefault depends on NWP driver. It is more accurate to
depend on the Si91x Bluetooth driver.
Finally, configdefault is supposed to be only used in Kconfig.defconfig
files. So, relocate BT_HCI_ACL_FLOW_CONTROL.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Remove the redundant cast to struct device * from struct device * in
some of the GPIO API syscall handlers in gpio_handlers.c
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The following APIs
- gpio_port_set_masked()
- gpio_port_set_bits()
- gpio_port_clear_bits()
- gpio_port_set_clr_bits_raw()
- gpio_port_set_clr_bits()
- gpio_pin_get_raw()
- gpio_pin_get()
- gpio_pin_set_raw()
- gpio_pin_set()
- gpio_pin_toggle()
are currently not syscalls, while the following are:
- gpio_port_set_bits_raw()
- gpio_port_get_raw()
It is therefore possible to set and get any pin of the entire port
from userspace, but only through a few of the APIs.
These APIs should all be either syscalls, or not syscalls.
Align the APIs so they are all syscalls and add syscall handlers for
them in gpio_handler.c
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
After DWC2 core is disabled the registers should no longer be accessed
to prevent CPU hangs. While the concurrent access is guarded by mutex,
there was no mechanism to ensure that driver thread won't access any
register after udc_disable() was called. Solve the issue by executing
disable in driver thread context.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add driver for Nordic USB PD Charging-Type detector.
This driver depends on the USBHS wrapper driver.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Use USBHS wrapper driver to register VREGUSB regulator callback and
enable USB peripheral.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Nordic USBHS wrapper is a set of registers used by both USB BC12 driver
and vendor specific part in UDC driver. The wrapper can be considered
to be MFD device. Both drivers depends on the VBUS regulator driver and
require some synchronisation when accessing wrapper register.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add the option to explicitly request the HFXO while the UARTE peripheral
is active for nRF54L series devices. While the UARTE peripheral requests
a high frequency clock from the clock controller, both the HFINT and
HFXO oscillators satisfy this request. The problem is that the HFXO
oscillator is required to reach the highest bitrate accuracies (and
mitigate errata 30).
Signed-off-by: Jordan Yates <jordan@embeint.com>
make CONFIG_SSD135X a hidden symbol similar to other display driver groups
so that it doesn't bleed into the main display drivers menu.
Fix spelling of the prompt for the actual drivers to also align with other
drivers.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In addition to `ERROR`, also abort on `+CME ERROR`, which is a 3GPP
documented (TS.128.007 v18.6.0 9.2) alternative error code.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move standalone (not using `modem_cellular.c`) drivers to a dedicated
subfolder, keeping the top level folder clean for common utilities.
Signed-off-by: Jordan Yates <jordan@embeint.com>
A flash manager thread is created and allocated to
process Flash Manager Process.
Definition of KConfigs STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE,
and STM32WBA_FLASH_MNGR_THREAD_PRIO to configure the
flash manager thread.
STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE is setting by default
to 768 bytes. This value was chosen empirically since reasonable
to cover generic cases.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Repeat the call to `i2c_nrfx_twim_rtio_start` until there are either
no more operations queued, or an asynchronous operation is pending
completion. This fixes a queue of operations that contains an operation
that completes inside of `i2c_nrfx_twim_rtio_start` (e.g.
`RTIO_OP_I2C_CONFIGURE`) from not starting the remaining operations,
which then forever blocks any pending callers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fixes a compilation failure on NXP MCX E-series (and other NXP SoCs)
where FSL_FEATURE_SAI_HAS_BIT_CLOCK_SWAP is 0 or undefined.
The driver was unconditionally assigning to a non-existent struct
member. Resolved by wrapping the assignment in the proper feature
macro checks.
Signed-off-by: Jan Willem Smaal <usenet@gispen.org>
3GPP TS 27.010 section 5.4.6.3.2 specifies a PSC frame exchange when
entering power save and section 5.4.7 specifies a flag-byte exchange
when exiting. modem_cmux blocks at T3 timeout on either half if the
peer does not implement the exchange, which is the case for modems
that manage sleep and wake out-of-band (hardware lines or
modem-control AT commands).
Add an opt-in DT property cmux-no-powersave-handshake (default off)
on the cellular-modem common binding. When set,
modem_cmux_runtime_pm_handler skips modem_cmux_send_psc and the T3
reschedule on entry and transitions directly to STATE_POWERSAVE;
powersave_wait_wakeup skips the wake-pattern transmission and the
STATE_RESYNC wait on exit and transitions directly to STATE_CONNECTED.
Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>
spi_mcux_init_common() can fail, propagate the error on TURN_ON
instead of silently ignoring it.
Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
For PM2 (suspend-to-idle), flexcomm registers are retained so a full
init_common is not needed. Instead, disable the I2C master before
applying the sleep pinctrl state on SUSPEND, and re-enable it after
restoring the default pinctrl state on RESUME.
Initialize the master with enableMaster = false in init_common so that
TURN_ON does not prematurely enable the master before RESUME restores
the pinctrl state. pm_device_driver_init always calls RESUME after
TURN_ON so the master is enabled correctly on both first boot and PM3
wakeup.
Signed-off-by: Sofian Elmotiem <sofianelmotiem@gmail.com>
Re-added irq_update API for UART.
It is required to clean the FIFO status, which flushes
the content correctly.
Signed-off-by: Davide Di Lello <Davide.Dilello@Infineon.com>
Install default stepper and stepper_ctrl API delegates to avoid
unitialized variables when no delegate is installed by the
application/test suite.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit fixes the command packet size allocation. It allocates an
'hci_cmd_buf' buffer to store the HCI command packet to send. The buffer
size supports the maximum command packet size and the maximum event size.
This commit also fixes an issue where the buf argument was not unreferenced
when bt_buf_get_evt() failed in the BT_HCI_H4_CMD command case.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
IT8XXX2 currently enables I2C_TARGET_BUFFER_MODE for all I2C targets.
This affects unrelated drivers such as the LPC55S69 custom target sample.
Limit the IT8XXX2 target defaults to the ITE enhance I2C driver, so
non-ITE targets stay in byte mode unless they opt in.
Guard Ambiq IOS buffer callbacks behind I2C_TARGET_BUFFER_MODE and enable
buffer mode explicitly for Nordic TWIS target API test builds.
Fixes#108902
Signed-off-by: Manjae Cho <manjae.cho@samsung.com>