Commit graph

23353 commits

Author SHA1 Message Date
Alberto Escolar Piedras
98b05b3062 drivers/timer/native_sim: Use upper case long suffix
For better readability

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-13 12:09:30 +02:00
Robert Hancock
3a2639a9de drivers: flash: spi_nor: Add fast read support
Most SPI NOR flash devices support a "fast read" command which uses
dummy bits between the address and the start of the data transfer. In
many cases, the maximum SPI clock speed of the device is lower for the
regular read command due to the limited time between the address and
data phases, so using the fast read command will remove this restriction
and allow for faster transfers.

Add a device tree flag to indicate that fast reads should be used for
the device.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-13 12:09:06 +02:00
Robert Hancock
ecacf3d5e3 drivers: flash: spi_nor: Added flag status register support
Some Micron (and possibly other) SPI NOR devices implement a flag status
register which provides more information on the success/failure of erase
and program operations. In addition to better error checking, some of
these devices actually don't function properly if the flag status
register is not read after a program operation (subsequent reads will
only return 0xFF bytes).

Add a device tree parameter to indicate that the flag status register is
supported. When specified, the flag status register will be used for
ready/error checks rather than the standard status register.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-13 12:09:06 +02:00
Robert Hancock
1fdb43cf27 drivers: flash: spi_nor: optimize SPI buffer usage
This driver was providing SPI buffers for both TX and RX on the data
payload portion of read transfers, even though the TX buffer is not
meaningful in these cases. As well as being less efficient, this also
caused likely uninitialized data to be transferred to the device, which
is possibly problematic.

Update to not include the TX buffer for the read data payload SPI
transfer, so that the SPI driver can generate dummy TX data internally.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-13 12:09:06 +02:00
Francois Ramu
4278e98210 drivers: flash: stm32 octospi supports the 4Bytes address mode
Add the 4Bytes program mode to the stm32_ospi driver
to enter 4-Byte Address Mode (SPI_NOR_CMD_4BA) when flash is supporting it.
This is given by the JESD216 SFDP table.
Based on the stm32 qspi driver.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-05-13 12:08:51 +02:00
Jeremy Dick
b5c0984eb1 drivers: flash: flash_hp_ra: perform blank check before reading
The value read from unwritten areas of Renesas RAxxx SoCs data
flash is undefined. To prevent reading unwritten areas a
blank check command is performed first. If the area is blank, we
return dummy data so it behaves the same as other flash devices.

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-05-13 07:24:39 +01:00
Dipak Shetty
4c38b16f03 drivers: stepper: adi_tmc: tmc5xxxx: fixed standstill detection
The standstill detection logic now stands corrected. Moving would
be indicated when the standstill bit is not zero.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-13 03:20:39 +02:00
Florijan Plohl
7692e3db3f drivers: dac: add driver for the NXP DAC12
Add driver shim for the NXP Digital-to-Analog (DAC12) module.

Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
2025-05-13 03:20:29 +02:00
Camille BAUD
90f57f8b7d drivers: display: Introduce SSD1351
This introduces ssd1351 128x128 RGB PMOLED controller

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-05-12 21:09:36 +02:00
Srishtik Bhandarkar
09ab462e10 drivers: sensor: pzem004t: add pzem004t AC parameter sensor driver
Adds driver for Peacefair pzem004t multifunction AC parameter sensor.

Signed-off-by: Srishtik Bhandarkar <srishtik.bhandarkar2000@gmail.com>
2025-05-12 21:09:27 +02:00
Konrad Sikora
8959d2857d drivers: sensor: Fixed issues in DHT20 measurement
Refactor DHT20 sensor init and measurement handling.
Added 100ms power-on wait to comply with datasheet.
Simplified measurement frame handling.
Initialize status register only once after power-on.

Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
2025-05-12 21:09:22 +02:00
Josuah Demangeon
e1f4181c29 drivers: video: common: turn ASSERT(false) into CODE_UNREACHABLE
The assert message was not very helpful, CODE_UNREACHABLE is more
readable and requires fewer effort while proofreading.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-05-12 19:20:45 +02:00
Josuah Demangeon
ee21d397d2 drivers: video: common: optimizations for video_closest_frmival()
In video_closest_frmival(), immediately stop searching when an exact
match is found, as a small performance optimization. Variables
that could be computed only once were moved further outside.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-05-12 19:20:45 +02:00
Josuah Demangeon
84f0eec62e drivers: video: common: fix video_closest_frmival() fie.index
Fix bug introduced in 46a262ffe6 where the
fie.index field was expected to be incremented by the driver, while it
is the responsibility of the caller to increment it.

Fixes #89663

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-05-12 19:20:45 +02:00
Tsi-Chung Liew
e483b229de Counter_nxp_mrt: Adds PM low-power recovery support
Enables Sleep mode (PM3) in RW61x for MRT.

Signed-off-by: Tsi-Chung Liew <Tsi-Chung.Liew@nxp.com>
2025-05-12 19:19:40 +02:00
Tsi-Chung Liew
8ac0a675ee Counter_mcux_ctimer: Adds PM low-power recovery support
Enables Sleep mode (PM3) in RW61x for Ctimer.

Signed-off-by: Tsi-Chung Liew <Tsi-Chung.Liew@nxp.com>
2025-05-12 19:19:40 +02:00
Camille BAUD
4b3fc3159d drivers: display: Introduce SSD1331
Introduces driver for SSD1331 RGB OLED controller

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-05-12 19:19:15 +02:00
Jiafei Pan
51e0fcf80c drivers: sdhc: imx_usdhc: enable MMIO mapping
Enable MMIO mapping in the driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-12 16:47:49 +02:00
Jiafei Pan
819125f726 drivers: sdhc: imx_usdhc: run clang-format on the driver
Format the driver by using clang-format.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-12 16:47:49 +02:00
Fin Maaß
003aa520d0 drivers: ethernet: litex: add length to log
log the length, if obtaining a rx buffer fails.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-12 16:47:41 +02:00
Titouan Christophe
7e26a7130e drivers: flash: stm32: fix FLASH_ constants renamed in hal_stm32
In hal_stm32 commit "update stm32h7rs to cube version V1.2.0"
e5eba65b76
the constants FLASH_OPTKEY1/2 for the STM32H7RS have been renamed to
FLASH_OPT_KEY1/2. For backward compatibility, 2 defines have been added
to Legacy/stm32_hal_legacy.h, so that FLASH_OPTKEYx is an alias for
FLASH_OPT_KEYx.

However, in Zephyr's STM32 flash driver, the alias is defined the other
way around since 5dc537389a, which leads to
Twister build failures, for example
https://github.com/zephyrproject-rtos/zephyr/actions/runs/14927867714/job/41936931524#step:12:1335

To fix the build issue, we can simply remove that alias in Zephyr, since
it is no longer needed.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-05-12 13:31:23 +02:00
Leon Mariotto
f411f48d37 drivers/auxdisplay: format jhd1313 driver.
Format jhd1313 driver to comply with CI rules.

Signed-off-by: Leon Mariotto <leon2mariotto@gmail.com>
2025-05-12 13:31:13 +02:00
Leon Mariotto
2d98a7225c drivers/auxdisplay: add support for dfrobot LCD1602 I2C module
Move backlight i2c controller address into DTS configuration
to be able to use jhd1313 driver for dfrobot's LCD1602.

Signed-off-by: Leon Mariotto <leon2mariotto@gmail.com>
2025-05-12 13:31:13 +02:00
Alvis Sun
d0e488e071 drivers: pinctrl: npcx: add pinctrl driver support for npck3
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-05-12 13:30:46 +02:00
Martin Stumpf
2c1cef9659 display_sdl: Fix incorrect blend mode during display_read
The blend mode was set in a way that multiplied pixels with the alpha
value during read, which caused tests to fail.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2025-05-12 09:48:07 +02:00
Alberto Escolar Piedras
f01a96c2f3 drivers/ethernet/eth_native_tap: Avoid reusing tag name
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-12 09:47:59 +02:00
Alberto Escolar Piedras
fe70e480f4 drivers/counter native_sim: Avoid reusing tag name
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-12 09:47:59 +02:00
Alberto Escolar Piedras
919de4ec5f drivers/entropy native_sim: Add copyright line
Add a copyright line to comply with the coding guidelines.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-12 09:47:59 +02:00
Lars Thiemann
03c557b004 drivers: gpio: pca-series: Cast pointer to void * in logging statements
This silences warnings created at runtime, as the %p format specifier
expects a void pointer.

Signed-off-by: Lars Thiemann <thiemann@cognid.de>
2025-05-10 13:02:12 +02:00
Lars Thiemann
13fe09c5b9 drivers: gpio: pca-series: Reset device before register access
Reset the port expander before accessing any register
or updating the cache.

Signed-off-by: Lars Thiemann <thiemann@cognid.de>
2025-05-10 13:02:12 +02:00
Liang Jiaxiang
b2c6d960cb sensor: bmi08x: Fix variable name in bmi08x_acc_trigger_mode_init
Fix undeclared variable error by changing 'config' to 'cfg' in the
data_sync condition check, matching the variable name declared at the
beginning of the function.

Signed-off-by: Liang Jiaxiang <moonbite233@gmail.com>
2025-05-09 21:09:04 +02:00
Chen Xingyu
5be38c6996 drivers: auxdisplay: Add driver for common 7-segment display
This commit introduces a new driver for a common GPIO-driven 7-segment
display. supporting both common anode and common cathode configurations.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2025-05-09 21:08:32 +02:00
Henrik Brix Andersen
81ee157876 drivers: can: common: mark unused function argument as such
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
b04d6f876c drivers: can: common: declare prescaler variable inside loop
Declare the prescaler variable inside the loop where it is used.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
d5f07eb8c9 drivers: can: common: terminate if ... else if ... constructs with else
Terminate "if ... else if ..." constructs with an empty "else" clause to
indicate that consideration has been given regarding the behaviour when all
other conditions evaluate to false.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Henrik Brix Andersen
404d92d516 drivers: can: common: define each identifier in a dedicated statement
Define each identifier in a dedicated statement.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-05-09 18:00:27 +02:00
Adam Berlinger
c1a173a884 driver: uart: stm32: Add workaround for DMAT errata in low-power modes
This change adds additional workaround for following errata:
"USART does not generate DMA requests after setting/clearing DMAT bit"
Instead of keepint DMAT bit set, it sends first byte by polling
in firmware. This prevents additional power consumption in STOP mode,
caused by keeping DMAT bit set.

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2025-05-09 17:59:49 +02:00
Adam BERLINGER
ccf07d45b5 driver: uart: stm32: Clear buffer length only in UART TC event
The buffer_length != 0 is used to check if there is transfer ongoing
inside the uart_stm32_async_tx function. uart_stm32_dma_tx_cb clears
it to 0 when TX DMA is finished, but before the USART send all
the data from shift register.
buffer_length is also cleared in callback async_evt_tx_done,
which is called when USART finished sending all the bytes.
If the uart_stm32_async_tx would be called after
uart_stm32_async_tx, but before async_evt_tx_done there
could be race condition on buffer_length.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2025-05-09 17:59:49 +02:00
Hieu Nguyen
a82a5187dd drivers: can: Initial support for RZ/G3S
Add CAN driver support for Renesas RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-05-09 17:59:38 +02:00
Chen Xingyu
95996c7bbe drivers: display: Select LED_STRIP when LED_STRIP_MATRIX is enabled
The LED_STRIP driver is not enabled by default on all boards. As a result,
building the LED_STRIP_MATRIX display driver fails if LED_STRIP is not
manually enabled.

To address this, this commit changes the dependency from `depends on` to
`select`, ensuring that the required driver is automatically enabled and
build failures are avoided.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2025-05-09 15:42:50 +02:00
Krzysztof Chruściński
2f7d799c99 drivers: adc: nrfx_saadc: Add validation of channel configuration
On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-09 15:40:53 +02:00
Chun-Chieh Li
75e7d0eeae drivers: can: support nuvoton m55m1x series
This supports Nuvoton m55m1x series can-fd controller.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-05-09 14:01:32 +02:00
Chun-Chieh Li
d1e8590b6b drivers: can: numaker: fix m2l31x core clock
This fixes canfd core clock for m2l31x soc.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-05-09 14:01:32 +02:00
Bjarki Arge Andreasen
0826996337 drivers: gpio: gpio_nrfx: store init output val for get_config
The nRF GPIO hardware does not store the initial output value
set resulting from gpio_pin_configure() and thus, when
gpio_get_config() is used, the initial value is not returned.

This commit just reads the output value and sets the INIT
value to match in gpio_get_config().

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-09 12:55:45 +02:00
Titouan Christophe
25b326bc1f flash: stm32h7x: fix implicit declaration for LL_GetFlashSize
Since https://github.com/zephyrproject-rtos/zephyr/pull/83114 was merged,
I get twister errors unrelated to my pull requests for the STM32H7S78-DK
(for example https://github.com/zephyrproject-rtos/zephyr/actions/runs/14900504138/job/41851537049#step:12:1369)

This is because the function LL_GetFlashSize() was removed from hal_stm32
on the STM32H7RS series in
e5eba65b76

I am unsure if the removal from hal_stm32 is intentional. If yes, then this
commit should be merged into Zephyr to fix compilation for that target.
Otherwise, hal_stm32 must be patched, Zephyr's west manifest updated, and
this commit can be discarded.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-05-09 12:52:12 +02:00
Neil Chen
9a58c44544 drivers: syscon: support mcxa153 lpi2c clock
MCXA153 only have one I2C, support its clock in syscon driver.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-05-09 12:51:20 +02:00
Nhut Nguyen
bc429da9fb drivers: gpio: rz: Mass renaming
Mass renaming is carried out to unify some prefixes and shorten some
macros, making the code easier to maintain and support new devices.

- Rename `int_dev` to `gpio_int_dev` for gpio interrupt
- Rename `eirq` to `ext_irq` for external interrupt
- Rename `gpio_rz_hw_config` to `gpio_rz_flags`
- Rename `p_pm` to `gpio_flags`
- Rename `pre_flags` to `rz_flags`
- Remove `_IOPORT` and `_PIN_CONFIGURE` in some macros
- Rename `GPIO_RZ_PIN_CONFIGURE_GET_FILTER`,
  `GPIO_RZ_PIN_CONFIGURE_GET`, `GPIO_RZ_PIN_SPECIAL_FLAG_GET` to
  `GPIO_RZ_FLAG_GET_FILTER`, `GPIO_RZ_FLAG_GET_CONFIG`,
  `GPIO_RZ_FLAG_GET_SPECIFIC` respectively

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-05-09 12:51:11 +02:00
Jianxiong Gu
31d65aac5d drivers: pinctrl: wch_20x_30x_afio: fix afio remap
- Enable AFIO clock prior to remap configuration
- Consolidate remap logic in a single conditional block
- Correct USART1 remap detection by checking pcfr_id
- Apply changes to pinctrl_wch_afio.c

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-05-09 08:22:40 +02:00
Robert Hancock
35b843b52e drivers: serial: serial_test: Support irq_update call
This driver doesn't need to do anything in its irq_update
implementation, but add a dummy one so that calls to uart_irq_update
don't fail with -ENOSYS.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-09 01:40:57 +02:00
Robert Hancock
c3f9e6d1ba drivers: serial: serial_test: support IRQ callback user data
This driver previously caused an assertion error if non-NULL user_data
was passed to uart_irq_callback_set. Add support for this by storing the
user data and passing it back to the IRQ callback function.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-09 01:40:57 +02:00