Commit graph

24538 commits

Author SHA1 Message Date
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
Martin Stumpf
acfd958f4b drivers: fpga: ice40: Fix log level
All FPGA driver implementations should respect `CONFIG_FPGA_LOG_LEVEL`.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2025-05-09 01:40:35 +02:00
e039b8d59c drivers: clock_control: set the flash wait state to match the RM
The flash latency needs to be configured before switching to the high
speed clock. Set the latency based on the CH32V003 and CH32V00x
reference manual.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
3dbf080698 hal: wch: widen the checks to include the CH32V family
Expand the current systick compatibility to include the CH32V00x
series. Change the HAL compatibility to include all of the CH32V
family.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
f4b1544bec drivers: pinctrl: add a driver for the CH32V00x series
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.

In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
Emilio Benavente
5fd6715917 drivers: watchdog: Added Driver for the EWM
Added a driver for the External Watchdog Driver

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-05-09 01:39:56 +02:00
Joel Guittet
54b826336b drivers: counter: counter_reset api support to stm32 timer
Add support to reset counter value.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-05-08 19:53:12 +02:00
Dhruv Menon
6b363634d8 drivers: gpio: update GPIO register addresses for TI davinci
This commit adds a padding of 0x10 bytes at the beginning of the
`gpio_davinci_regs` structure to correctly align the register
definitions with the actual register layout.

Previously, the DTS had to manually offset the base address by
0x10, introducing a special case in Zephyr's Davinci GPIO driver.
This change eliminates the need for that workaround
Adding the paddingi also help to maintain a similarly with also
to the linux counterpart.

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-05-08 19:50:31 +02:00
Seppo Takalo
673853ae5a drivers: eth: native_tap: Init MAC properly
Set static or random MAC before calling net_linkaddr_set().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-05-08 15:56:27 +02:00
Swift Tian
389103dfec drivers: ambiq: rework ambiq spi and i2c drivers cache handling
1. rework IOM cmdq buffer instantiation
2. rework spi and i2c cache handling as it is incorrect.
3. buffers need to be aligned with DCACHE on

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2025-05-08 14:00:52 +02:00
Martin Jäger
81cd7cacc4 drivers: input: input_adc_keys: add debouncing to avoid false events
The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.

This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).

A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-05-08 12:25:48 +02:00
Jeremy Dick
a167c2d895 drivers: input: cap12xx Add properties for sensitivity and guard signal
The Microchip CAP12xx series has a configurable sensitivity and
can drive an optional guard signal to reduce noise sensitivity.

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-05-08 12:25:18 +02:00
Michał Stasiak
16b9f60432 drivers: audio: dmic_nrfx: add support for audio clocks on nRF54
Added support for audio clock for nRF54L20 and AudioPLL
for nRF54H20 in DMIC PDM driver.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-05-08 12:24:31 +02:00
Pisit Sawangvonganan
77bb19c2a9 drivers: sensor: shell_battery: use shell_print where applicable
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
For partial-line outputs, use `shell_fprintf_normal` to preserve output
formatting.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Pisit Sawangvonganan
f74d2a79de drivers: sensor: shell: make channel and attribute name tables as const
Make `sensor_channel_name` and `sensor_attribute_name arrays` to use
`const char *const`. This ensures full immutability of the tables,
placing them entirely in the `.rodata` section and reducing usage
of the `.data` segment.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00
Pisit Sawangvonganan
6014ff392a drivers: sensor: shell: align struct shell * name to sh
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-05-07 17:45:39 +02:00