nrf54x devices have UARTE instance capable of using baudrate higher
than 1M. Higher baudrates does not have predefined values for
BAUDRATE register. A formula can be used to calculate BAUDRATE
value that shall be used for desired baudrate. Add UARTE_ANY_HIGH_SPEED
macro which is set when high speed is enabled (uart00 in nrf54lx or
uart120 in nrf54h20). For high speed instance use formula for getting
value that shall be written to BAUDRATE register.
When runtime configuration is not used then same formula is used to
calculate fixed BAUDRATE value.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Rename UARTE_ANY_FAST to UARTE_ANY_FAST_PD. There are 2 types of
'fast' UARTE instances. In nrf54h20 instance uart120 is in fast
power domain that requires additional power and clock management
of that domain. In nrf54lx fast uart00 instance does not require
that. Add _PD to indicate fast power domain.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This implements the comparator driver for silabs acmp peripherals
using the silabs,acmp compatible binding.
Signed-off-by: Christian Galante <christian.galante@silabs.com>
Update the irq_enable macro to use the DT_INST_IRQN_BY_IDX helper.
This ensures proper handling of IRQ numbers in systems with multi-level
interrupt configurations.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Fixed a typo in BUILD_ASSERT macro causing driver to effectively fail to
compile as seen in:
west twister -p sam_v71_xult/samv71q21b -s drivers.dac.api
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Implement the HAL callback function `HAL_PCD_ISOINIncompleteCallback` in
which the endpoint write semaphore is given back, thus allowing subsequent
writes to the endpoint after an isochronous transfer has been incompleted
(not read by the host).
This approach was chosen because it is similar to what is done in the
already implemented HAL callback `HAL_PCD_DataInStageCallback` which also
gives the write semaphore back but also calls the endpoint callback
function.
The reason for not also calling the endpoint callback function is because I
do not see any appropriate cb_status (`enum usb_dc_ep_cb_status_code`) to
pass. If passing `USB_DC_EP_DATA_IN` is okay even though "In transaction
done on this EP" is not completely true, then this should also be added.
This has been tested by setting up an isochronous endpoint, writing to it,
and verify that `HAL_PCD_DataInStageCallback` is called and subsequent
writes are possible.
Signed-off-by: Algot Axelzon <algot.axelzon@satcube.com>
Remove the LL_RCC_PLLI2S_ConfigDomain_48M for the stm32f4
w/o Q divider on the PLLI2S to configure the PLL48CK
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Check that the plli2s has a DIV-Q output or not. That depends
on the PLLi2S of some stm32F4xx devices
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fixes a multitude of Kconfigs that wrongly appear on devices
where support is literally impossible
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Introduce `UDC_STM32_CLOCK_CHECK` Kconfig option since
`USB_DC_STM32_CLOCK_CHECK` was intended for use with `usb_dc_stm32.c`,
which is mutually exclusive with `udc_stm32.c`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add a Kconfig option which can be used to enable vendor HCI extensions for
Silicon Labs EFR32 devices.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
In case channel_setup is called with a new attenuation
config, make sure previous calibration scheme is deleted properly.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Without this patch the hdlc_iface_init() function assigns to
ot_hdlc_rcp_context structure pointer (*ctx) value of 0, as in the
NET_DEVICE_DT_INST_DEFINE() preprocessor macro the 'data' field is
set to NULL.
Afterwards, the ctx->iface is set to iface address passed to the function
(as well as the ctx->ot_context is set).
Writing those values to address 0x0 is catastrophic to for example
mimxrt1020, which uses ITCM memory (mapped from 0x0) to store flash
handling functions, as those are used to XIP code directly from
SPI NOR memory (as mximxrt1020 doesn't have internal flash).
In this particular case - the flash_flexspi_nor_erase() function is mapped
(i.e. relocated) to ITCM's 0x0 address. Overwriting first 8 bytes of it
causes the SoC to enter "Precise data bus error" exception.
The fix is to define the static instance of struct ot_hdlc_rcp_context
and pass its address to the NET_DEVICE_DT_INST_DEFINE() macro. As a result
its storage is now in RAM, not ITCM.
This issue has been discovered on UART based HDLC RCP communication, but as
it also may be problematic on the NXP driver, this patch fixes it too.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
To fix the native hardware chip select, we need to rewrite this driver
to not use the MCUX SDK handle abstraction, which does not fit the
zephyr use case.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add functions to get remaining length in the transfer. Refactor a bit to
avoid duplicate code for the for loop that is the same as in the total
length function.
The difference between the total length and left length function is that
the current buffer total length is counted in the former and the current
buffer remaining length is counted in the latter.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add properties for describing RX and TX fifo sizes.
Also reformat some descriptions and fix the description of the
transfer-delay property which was incorrect. Since zephyr spi bufs are
not continuous, every possible Zephyr LPSPI driver must use
continuous transfer mode, for which the meaning of this delay has
nothing to do with the chip select.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The GPIO peripheral on Silabs Series 2 devices is responsible for
allocating analog buses to analog peripherals. Enable support for
this in the pinctrl driver. Since these bus allocations are not
digital pins, introduce a new property silabs,analog-bus for this
purpose.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Makes the esp_console_init() calling during hardware initialization
conditioned to CONFIG_ESP_CONSOLE
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
properly check return code from i2c_reg_write_byte_dt effectively
making it possible for gpio_npm2100_port_set_masked_raw to error out since:
if (ret != 0U) {
return ret;
}
was dead code before this fix.
Fixes CID-444376
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a check to ensure the frame size does not exceed the video buffer
size defined by `CONFIG_VIDEO_BUFFER_POOL_SZ_MAX`. Even if the sensor
supports the resolution, the frame size could overflow the buffer.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Ensure the DCMI video buffer is released only after the DCMI
has been fully stopped. This prevents potential access to the
buffer while the DCMI is still active, avoiding undefined behavior.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
The strcpy is unsafe so use strncpy and pass the ssid length
as a maximum amount of chars to copy.
Fixes#81917
Coverity-CID: 434719
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The wifi_scan_result struct needs to be initialized to 0 so that
the ssid gets properly null terminated.
Fixes#81971
Coverity-CID: 434570
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The user of the ft8xx driver can register a callback function called
on a touch detection interrupt event. This function is extended to
include a user-defined pointer. The user-defined pointer helps to share
a callback with multiple driver instances.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Improve the FT8xx display driver to support multiple driver instances.
The ft8xx_reference_api.h still follows the FT8xx programming guides,
limiting the usage of the driver to one instance.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
The station-mode channel scan method is currently set to WIFI_FAST_SCAN
which ignores the signal strength and connects to the first channel found
which may result in poor WiFi bandwidth.
Change the scan mode to scan all channels and connect to the channel with
the highest RSSI.
Fixes#84488
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
i2/3c_burst_write comes with a warning where this combined write
synthesized by thsi API may not be supported by all I2/3C
devices. Replace with i2c_write instead with a buffer combining
the address and data.
The Kconfig STMEMSC_I2C_WRITE_BUFFER_SIZE was added to set the
size of the buffer pushed to the stack.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The #83556 fixes an error related to DMA initialization which resets
the DMA CRC part. However, the samd/e5x do not have this module inside
DMA controller which causes a compile error. This fixes the issue
checking if the DMAC_CTRL_CRCENABLE macro is defined.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Makes driver actually build again.
Fixes scaling, q32 encoding, bit shifts, and register mappings.
Also enables High Resolution mode (a unique and beneficial
feature of the chip when used with streaming).
Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
There is a HW bug in nPM1300 LDO which causes the LDO output voltage to
reach its target very slowly in specific cases. This is worked around by
performing an additional i2c read shortly after an LDO is enabled.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Some NXP socs use USBFS0 macro as base address for accessing the USB
registers, rather than USB0.
It generates compile-time errors, since USB0 is not defined.
Fix by defining USB0 if USB0 is not defined and USBFS0 is.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Currently altitude is only provided above MSL. Adding
geoid seperation allows for ellipsoidal height to be
determined.
Signed-off-by: Maxmillion McLaughlin <max@sorcerer.earth>
Initialize the cyhal_sdio_config, such that the init
function won't do the pin configuration.
The gpios are setup using the zephyr pinctrl driver already.
Before the latest hal update the values were ignored and
the gpio configuration completely skipped.
But this is no longer the case and this commit
fixes that by setting the gpio pins to nc,
Also, explicitly set sdio_config.clock to NULL, to make
it clearer that the driver will check for that.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The driver should use resource type SDHC not SDIODEV.
In a older HAL version the value was not used as parameter
for clock initialization so it didn't matter, but breaks
the initialization of the driver with the latest hal.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This PR adds support for BQ32002 RTC chip.
Supported functionalities:
* Time setting/reading
* Alarm setting/reading
* Calibration setting/reading
* IRQ frequency configuration
Tested on nRF52833-DK board.
Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
Some peripherals (e.g. ethernet) have remaps only on some of the pins.
Pins without remaps do not conflict and must be ignored to correctly
process the remaps.
Signed-off-by: Vegard Storheil Eriksen <zyp@jvnv.net>