Commit graph

25,525 commits

Author SHA1 Message Date
Shan Pen
bd2f4ef946 drivers: modem_cellular: fix eg25g dial cmd response
eg25g modem should respond "CONNECT <text> " when run dial cmd "ATD"

Signed-off-by: Shan Pen <bricle031@gmail.com>
2025-06-30 15:16:48 -05:00
Daniel DeGrasse
c8c1bf4131 drivers: modem: modem_cellular: fix variable declaration for clang
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>
2025-06-27 18:28:22 -05:00
Sylvio Alves
1df3403393 soc: esp32c6: add BLE support
Add BLE support to ESP32-C6 series.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-27 18:27:15 -05:00
Sylvio Alves
60cd83e6f2 clock: esp32c6: enable and calibrate digital regulators
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>
2025-06-27 18:27:15 -05:00
Yuval Peress
d8d6637a1f i2c_shell: Only include target commands if I2C_TARGET
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>
2025-06-27 18:26:33 -05:00
Mahesh Mahadevan
14b1ba15ac drivers: timer: Fix the logic to compensate the clock when turned off
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>
2025-06-27 18:21:25 -05:00
Luis Casas
d0f9ccc010 NXP drivers: spi_mcux_flexcomm: Adds PM low-power recovery support
Enables Sleep mode (PM3) in RW61x for SPI.

Signed-off-by: Luis Casas <luis.casas@nxp.com>
2025-06-27 18:20:52 -05:00
Eason Huang
f1b59c2cd2 drivers: i2c_dw: fix request_bytes overflow when receiving > 256 bytes
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>
2025-06-27 09:08:18 -10:00
Raymond Lei
dd90248a3a test: spi_loopback: nxp: Add Flexio spi test support
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>
2025-06-27 09:05:47 -10:00
Raymond Lei
581e7ff2aa drivers: spi: nxp: flexiospi spi_loopback test failed on flexio spi
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>
2025-06-27 09:05:47 -10:00
Gaetan Perrot
6d0f1aaef8 drivers: sensors: apds9253: remove unnecessary check
gain is an unsigned int so it can't be negative.

Fixes CID 516230

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-06-27 09:04:58 -10:00
Gaetan Perrot
e13f64ac47 drivers: sensor: bmm350: fix redundant return logic in init_chip
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>
2025-06-27 09:04:32 -10:00
Erwan Gouriou
48dc588636 clock_controller: stm32n6: Remove AXISRAM3/4/5/6 clocks handling
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>
2025-06-27 09:01:52 -10:00
Erwan Gouriou
84619fe8f7 drivers: misc: stm32n6: ramcfg driver
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>
2025-06-27 09:01:52 -10:00
sudarsan N
c9be1972b2 gpio: pca_series: fix shift overflow and use 3ULL instead of 0b11
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>
2025-06-27 09:00:35 -10:00
Miguel Gazquez
e42cfcf032 drivers: sensor: lsm9ds1: propagate errors in sample_fetch
`lsm9ds1_sample_fetch` did not propagate error codes.
Propagate them.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-27 08:54:42 -10:00
Peter Wang
f8b14155f0 boards: frdm_mcxa166, frdm_mcxa276: add ostimer support
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>
2025-06-27 08:54:06 -10:00
Johann Fischer
5ba44ffd3e usb: host: allow status stage to be omitted
For testing purposes, allow the status stage to be omitted.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
49e2630531 drivers: udc_virtual: drop queued control transfer on new setup packet
Drop the queued control transfer when a new setup packet arrives.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
cd7a6e5e54 drivers: udc: fix buffer leak when the host omits control data stage
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>
2025-06-27 08:52:22 -10:00
Kate Wang
826b1187f7 drivers: mipi_dsi: dsi_mcux_2l: support non-contiguous frame buffer
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>
2025-06-27 08:49:44 -10:00
Kate Wang
5b06b1871b drivers: display: display_rm67162: update method to transfer frame data
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>
2025-06-27 08:49:44 -10:00
Pieter De Gendt
f38527035a drivers: watchdog: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
bd4d65107d drivers: virtio: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
696442fab0 drivers: video: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
1a7eb61f02 drivers: serial: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
6c6d3523ca drivers: sdhc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
d4139d3d8d drivers: pwm: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
70ee055caf drivers: gpio: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
ee78942c67 drivers: dac: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
c57d76e1e5 drivers: counter: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
8e2405207e drivers: clock_control: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
5a051b4db3 drivers: can: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
efecfe2678 drivers: adc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Guillaume Gautier
dff6673808 drivers: spi: stm32: fix h7 issue with spi_hold_on_cs
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>
2025-06-27 10:05:23 -05:00
Mert Ekren
b6085ef997 drivers: spi: MAX32657 fix related to register name change
MAX32657 introduces changes for registers named (master, slave) to
(controller, target) this causes build issues

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2025-06-27 10:01:27 -05:00
Josuah Demangeon
a1ef239249 drivers: video: dcmi: fix DMA channel configuration
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>
2025-06-27 10:00:35 -05:00
Sebastian Huber
2724a1e53c drivers: spi: mchp_mss_qspi: Add reset support
Add support to reset the device through a reset controller.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2025-06-27 09:59:08 -05:00
Sebastian Huber
269773fff4 drivers: spi: mchp_mss: Add reset support
Add support to reset the device through a reset controller.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2025-06-27 09:59:08 -05:00
Sebastian Huber
9832973bec drivers: gpio: mchp_mss: Add reset support
Add support to reset the device through a reset controller.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2025-06-27 09:59:08 -05:00
Sebastian Huber
9132ac48bf drivers: i2c: mchp_mss: Add reset support
Add support to reset the device through a reset controller.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2025-06-27 09:59:08 -05:00
Frank Kühndel
dbb8ee38f2 drivers: reset: Add MPFS MSS driver
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>
2025-06-27 09:59:08 -05:00
sudarsan N
6efb1b40ce drivers: spi_rtio: Fix potential null pointer dereference
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>
2025-06-27 09:58:33 -05:00
Yangbo Lu
2cf5c7091a drivers: eth_nxp_imx_netc: support PTP timestamping
Added PTP timestamping support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-06-27 09:54:21 -05:00
Yangbo Lu
e0aa603f9c dts: bindings: nxp,enet-mac: convert to use ptp-clock property
Convert to use ethernet-controller ptp-clock property.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-06-27 09:54:21 -05:00
Ryan McClelland
68a3fc64f4 drivers: i3c: cdns: only init bus if known i3c devices on bus
Only call `i3c_bus_init` if there are known i3c devices on the bus

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-27 09:53:50 -05:00
Peter Wang
aa7618ba59 sensor: add nxp_lpadc_temp40 temperature sensor driver
1. add nxp_lpadc_temp40 temperature sensor driver
2. tested with frdm_mcxa166 and frdm_mcxa276 board

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-06-27 09:53:28 -05:00
Jani Hirsimäki
4ec4351657 drivers: modem_cellular: changes due to net_link_addr struct changes
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>
2025-06-27 14:15:03 +02:00
Daniel Marjamäki
eb80530618 sca: Fix undefined behavior during preprocessing
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>
2025-06-27 14:14:35 +02:00
Ren Chen
caeda699f5 drivers: spi: add it51xxx spi driver
This commit adds it51xxx spi driver.

Tested with: samples/drivers/spi_flash

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-06-27 14:14:16 +02:00