Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.
Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fix a null pointer dereference in akm09918c_submit(), where writeByte_sqe
was dereferenced before checking if it was NULL.
Coverity reported this as CID 516247: the pointer returned by
i2c_rtio_copy_reg_write_byte() may be NULL, and accessing its `flags`
field before checking leads to undefined behavior.
Move the access to writeByte_sqe->flags after confirming both
writeByte_sqe and cb_sqe are valid.
Fixes: CID 516247
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
In case the dmic had previous been run and stopped,
make sure active_buf_idx is initialized to 0 when
setting up dma on start, otherwise the dma callback
can return the wrong buffer.
Also purge the rx_queue before freeing the slab buffers,
to minimize risk of any async read request getting
back a slab buffer that is freed.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The interrupt handling was not deterministic before because it relied
on "guessing" if the lpspi was a v1 type that was stalling due to design
errata. This obviously ended up being wrong in some cases. So we really
need to fix this so that it is deterministic, and my idea to do that is
to explicitly count how many words we have written to the TX fifo
throughout the whole transfer.
As a side effect of making the IRQ more deterministic, we can't support
the SPI_HOLD_ON_CS flag for v1 LPSPI anymore. It is fundamentally
impossible due to the fact that the transfer can only complete in
hardware as a result of CS deasserting. If this is absolutely a
requirement to support this flag in the future, my recommendation is to
update the driver so that it muxes the pin to a gpio before ending the
transfer, but that would kind of defeat the point of having a native CS,
at least at the end of the xfer.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Update the driver to handle -ENOSYS from phy_configure_link(), which is
now returned when the cfg_link callback is missing (e.g., in fixed-link
PHYs).
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Avoid the following clang error
`error: label followed by a declaration is a C23 extension`
by writing this switch case as a codeblock.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Until register ABB->STATUSANA is visible it must be checked using
defined offset to base ABB register.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Add a log for the device name on bitrate changes, without this it's very
hard to understand what's going on in a system with multiple bridges.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The GRTC counter is not cleared at startup, therefore the
`last_count` variable needs to be initialized accordingly.
This change:
- Prevents overflow of the `sys_clock_announce()` int32_t parameter
- Ensures the correct uptime value, which should be reset during
initialization
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Previously, FUNC_3 related setting were cleared unconditionally,
regardless of the selected alternate function. This could
unintentionally disable FUNC_3 settings when configuring other
alternate functions.
This change ensures that FUNC_3 gcr/ext bits are only cleared
when alt_func is IT8XXX2_ALT_FUNC_3.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Fix for compiling i2s drivers on the NXP mimxrt1010_evk board.
For mimxrt1011, the defines kCLOCK_Sai2... are not defined as the sai2
peripheral does not exist. Trying to compile gives error. Fixed by adding
check for device tree node around code that uses the defines. Also added
same for sai1 and sai3. Thanks @lucien-nxp, @ZhaoxiangJin from NXP.
Signed-off-by: Imran Sajjad <imran.sajjad@iconfitness.com>
Fix variable declaration so that this driver will compile with clang,
which does not support variable declarations within switch statements
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Enable the RTC-domain and main digital regulators early in clock init,
then load and program the factory/runtime calibrated bias values for
high-power and low-power regulators into the PMU. This ensures the
correct voltage/current settings for stable, low-noise clock operation
in active, modem and sleep modes.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The extra shell commands are useless unless you also enable
I2C_TARGET. Conditionally include them based on the I2C_TARGET
kconfig.
Signed-off-by: Yuval Peress <peress@google.com>
The original logic relied on the tick passed in. This method
is inaccurate as the tick value passed in was the exit latency.
Update the code to calculate the remaining time left and set
a counter using this value.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
The original definition of request_bytes as uint8_t caused incorrect
behavior when attempting to receive more than 256 bytes, as the variable
would overflow. This patch changes its type to uint32_t to allow
correct tracking of large I2C transfers.
Signed-off-by: Eason Huang <eason.huang@tronfuture.com>
Add overlay file for RT1170 EVK and simply existing flexio spi overlay
file for RT1060 EVKC and RT1064 EVK. One flexio-spi interface for both slow
and fast tests. Fast baud rate set to 16Mbps now.
Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
Several reason cause loopback test failed:
a) FlexIO input frequency is not correct, on RT11xx, input freq is 24M,
while max baud rate can reach 1/4 of input freq, so it can only support
6Mbps.
b) Flexio shift register depend on correct timer output to triggger TX
and RX, if timer comparison value is not accurate, RX error happens on
high baud rate. This is the reason why test fails on RT1060.
also fix a error on FlexIO clock ID calculation.
Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
Add an explicit log message if setting suspend mode fails during error
handling in bmm350_init_chip(), to improve debuggability.
This addresses Coverity issue CID 520279 (Incorrect expression - CWE-398),
which flagged a conditional block where both branches effectively led to
the same outcome (return -EIO), making it appear redundant.
By adding a log before returning, we clarify the purpose of the condition
and avoid the issue of "identical code for different branches", while
keeping the functional behavior unchanged.
Coverity-CID: 520279
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Now that they are handled through their dedicated driver, remove
clock activation for AXISRAM3/4/5/6 (which was useless anyway as
RAMCFG part was missing).
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add a driver to handle AXISRAM3/4/5/6 configurations.
Provide the required changes to add RAM sections into the build system.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Replaces binary literal with 3ULL to avoid shift overflow and align
with Zephyr coding style.
Fixes: #81963
Fixes: CID 434591
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
1. add the ostimer
2. by default, the systick is used.
3. The ostimer could be tested with below configure in xxx.overlay:
&systick {
status = "disabled";
};
&ostimer0 {
status = "okay";
};
And below configure in xxx.conf:
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
The previous setup packet reference will simply be overwritten when the
host omits data (OUT) stage. If a new setup packet arrives before the
previous data stage is complete, free the last setup packet buffer.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The mipi_dbi_nxp_dcnano_lcdif driver support non-contiguous frame
buffer, so when mipi_dbi_nxp_dcnano_lcdif cannot be used to send
the frame buffer data, the driver needs to check whether the data
is non-contiguous first. If it is then extra methods need to be
applied. First the data of each write must not exceed the line
width, second if each line's data exceeds the max payload, it also
needs to be sent seperately.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
display_rm67162 uses mipi_dsi API(s) to update transfer frame data, some
low level IP can while some cannot handle non-contiguous buffer(the frame
pitch is larger than frame width). In this case, pass the frame descriptor
as the user data in the message to the low level driver and let it
handle how many data to send. The display_rm67162 driver only need to
set the address correctly for each transfer according to the pitch/width.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
STM32H7 spi_loopback test fails since the introduction of a test enabling
SPI_HOLD_ON_CS.
This uncovered an issue where the SPI ISR is constantly called if the SPI
is not disabled, even if the interrupt enable register is completely
cleared.
A workaround is to disable the SPI IRQ at the NVIC level when
SPI_HOLD_ON_CS is used.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
MAX32657 introduces changes for registers named (master, slave) to
(controller, target) this causes build issues
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
Commit 64149e4df6 added an "#if defined()"
for configuring DMA channels differently depending on SOC family of the
STM32 HAL, but did not include the STM32H7 family in the same group as
STM32F7. Fix it by adding the STM32H7 in the same #ifdef filter.
Fixes#92015
Signed-off-by: Josuah Demangeon <me@josuah.net>