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>
Add driver for Microchip PolarFire SoC (MPFS) peripheral clock and soft
reset control.
Normally, the peripheral clocks and reset state are controlled by the
Hart Software Services (HSS) running on the Monitor processor. As an
alternative to using HSS services, applications can now enable the reset
controller in a device tree overly, for example:
&reset {
status = "okay";
};
&uart4 {
resets = <&reset MSS_RESET_ID_MMUART4>;
};
Embedded the reset controller node in system controller node.
Signed-off-by: Frank Kühndel <frank.kuehndel@embedded-brains.de>
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
Avoid accessing tx_bufs or rx_bufs when they are NULL by adding proper
conditional checks before dereferencing. This addresses Coverity issue
CID 516225 (CWE-476).
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
Recent changes to net_link_addr structure to not use pointers
have made it necessary to update the modem_cellular driver
to ensure compatibility with the new structure definition.
Otherwise, an assertion failure occurs in subsys/net/l2/ppp/ipv6cp.c:40.
This commit updates that link address is set to NET_LINK_ADDR_MAX_LENGTH
least significant bytes of IMEI instead of IMEI total length.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
According to the C standard it is undefined behavior to use preprocessor
directives inside macro invocations.
Cppcheck stops when it see this UB with an error message, and so this
change will improve Cppcheck analysis
This is a refactoring to fix UB, no logical change is intended.
Signed-off-by: Daniel Marjamäki <daniel.marjamaki@cppchecksolutions.com>