Commit graph

162 commits

Author SHA1 Message Date
Piotr Krzyzanowski
09d5b9d80f tests: pwm: pwm_gpio_loopback: add nrf platforms
Add Nordic platforms and rename the defines
to avoid redefining a nrf driver internal symbols

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-01-20 16:26:21 +01:00
Raffael Rostagno
713375a51f tests: drivers: ledc_pwm: Add test cases
Add test cases to include coverage for ESP32 HS channels.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Dat Nguyen Duy
82b3e2fc78 boards: s32z2xxdc2: add support PWM eMIOS
Add support PWM eMIOS for s32z2xxdc2 board. There is no LED
on-board dedicated for PWM, so no sample is supported. Only
enabling some pwm tests

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-01-18 02:32:50 +01:00
Dat Nguyen Duy
e72af321d5 drivers: emios_pwm: do not configure period, duty and polarity at boot
Removing period, duty and polarity configuration from
channel devicetree. At boot time, only minimal setup like
pinctrl, prescaler, etc should be initialized. PWM signal
is produced by using pwm_set* API

Also after this change, PWM period, duty are changed at the
next counter period boundary

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-01-18 02:32:50 +01:00
Raffael Rostagno
d20140d014 tests: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Raffael Rostagno
16d7bbf63f tests: pwm_gpio_loopback: esp32: Add test overlays
Add test overlays for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-06 14:41:56 +01:00
Raffael Rostagno
ef96ed96cb tests: pwm: Add test suite with GPIO loopback
Add PWM test suite which uses GPIO as loopback input to check
the programmed timings.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-06 14:41:56 +01:00
Declan Snyder
8ed80ddb37 boards: mimxrt1060_evk: Convert to variants
Convert qspi and hyperflash to variants instead of revisions by popular
demand.

And convert evkb into a revision instead of a different board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-12-20 22:59:59 +01:00
Manuel Argüelles
c16ccf8e7d dts: bindings: rename nxp,kinetis-ftm-pwm compatible
Rename "nxp,kinetis-ftm-pwm" compatible to "nxp,ftm-pwm" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-20 23:53:14 +02:00
Danh Doan
7c55a540f4 tests: drivers: pwm: Support RA2, RA4, RA6 to test pwm_loopback
Add overlay to support test pwm_loopback on boards: ek_ra2a1,
ek_ra4e2, ek_ra4m2, ek_ra4m3, ek_ra4w1, ek_ra6e2, ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1, fpb_ra6e2.

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-20 18:31:12 +01:00
Danh Doan
2e0688878b drivers: pwm: update namming of pwm driver for RA family
- update namming for pwm driver.

Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
2024-12-20 18:31:12 +01:00
Raffael Rostagno
ffa676dd44 tests: pwm_loopback: esp32c6: Add test config
Add test config file to test MCPWM loopback on ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-20 18:30:59 +01:00
Raffael Rostagno
30542797d9 tests: drivers: pwm: Revert PWM capture change for pulse check
Reverts a change regarding how the test checks the pulse output
from a capture event. A pulse capture will produce a value that has
the same polarity (and range) as programmed by pwm_capture().
Checking 'pulse_capture' against 'period - pulse' means expecting
the driver to return a capture value that is not inverted as well,
which would cause test cases to fail.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-18 15:32:23 +01:00
Raffael Rostagno
b98bedeeb9 drivers: mcpwm: overlays: Move test config files
Move test config files to 'socs' folder, for cleanup.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-17 23:14:19 +01:00
Nathan Olff
85e8303861 tests: drivers: test fake-pwm on native_sim for pwm_api test
create native_sim overlay to use fake pwm for test of pwm_api

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-14 16:14:57 +01:00
Rafał Kuźnia
07ee796c7d tests: nrf: enable twister tests for nrf54l20pdk
Enabled the following tests on nrf54l20
- i2c_slave
- clock_control_api
- nrf_clock_calibration
- nrf_lf_clock_start
- onoff
- retained_mem/api
- uart_elementary
- uart_errors
- uart_mix_fifo_poll
- uart_pm
- uart_async_api
- wdt_error_cases
- wdt_basic_api
- counter_basic_api
- fcb
- nrf/qdec

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-13 20:04:51 +01:00
Lucien Zhao
30c45057ae tests: drivers: pwm: pwm_api: support mimxrt1180_evk board
Set tpm5 status as ok
add pwm-0 as aliases

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-06 12:13:54 +01:00
Ioannis Karachalios
221c4d3e4d tests: pwm_loopback: Fix inverted pulse measurement deviation
For the inverted pulse measurements, that should reflect
the duty-cycle off interval, the 1% deviation in test_capture
should be adjusted so it reflects duty-cycle off.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Ioannis Karachalios
b1e863e3e7 tests: pwm_loopback: Capture disable omission issue
As per the PWM API definition, -EBUSY should be returned
when pwm_enable_capture is called and capturing
is already enabled. This commit deals with adding
a ztest_suite_before_t function that should disable
capturing at the end of a single test. Some tests, though,
such as test_pulse_capture, execute two sub-tests
and so, capturing is disabled in between. In fact, the omission
of pwm_disable_capture should not only result in aborting
a single test, but it can also raise system exception
due to invalid context. This is the case for
z_impl_pwm_capture_cycles where z_pwm_capture_cycles_callback
can be fired whilst the routine has already aborted and so
struct z_pwm_capture_cb_data data, defined within function
declaration, should not longer be valid.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-12-03 13:06:53 +01:00
Mahesh Mahadevan
21d0a3b699 tests: pwm: Add support for SCTimer PWM on FRDM-MCXN947
Add overlay files to enable test of PWM over SCTimer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Furkan Akkiz
ee1d4da864 tests: Add MAX78002EVKIT test overlay files
Enable following tests for MAX78002EVKIT:
 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/flash/common
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/i2c/i2c_target_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/spi/spi_loopback
 - tests/drivers/w1/w1_api

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Carles Cufi
cb47c62259 boards: nordic: Remove nRF54L15 PDK
The nRF54L15 Development Kit is now available, so remove the Preview
Development Kit (PDK).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-21 01:46:39 +01:00
Gerard Marull-Paretas
eb45da5a44 tests: pwm_api: enable dma_fast_region in nRF54H20 DK overlay
The overlay makes use of the dma_fast_region without enabling it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-16 09:55:08 +02:00
Adam Kondraciuk
dd7cfbc92e test: drivers: pwm: add fast PWM
Add fast PWM instance for nRF54H20 device.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-15 19:08:03 +01:00
Quy Tran
4793e00ae8 boards: renesas: Add configurations to support pwm on EK-RA8D1
Add support for PWM driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-10-11 09:28:29 +02:00
Quy Tran
1391355ac4 boards: renesas: Add configurations to support pwm on MCK-RA8T1
Add support for PWM driver on MCK-RA8T1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-10-11 09:28:29 +02:00
Duy Phuong Hoang. Nguyen
59dbbb347d drivers: pwm: Initial support for PWM driver on RA8
Add PWM driver code support for RA8. This support is using
GPT HW

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-10-11 09:28:29 +02:00
TOKITA Hiroshi
cf871692f4 tests: drivers: pwm: pwm_api: Add rpi_pico test configuration
Add test configuration for rpi_pico

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-10 10:07:47 +02:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Furkan Akkiz
679547495b tests: drivers: pwm: Add MAX32662EVKIT overlay file
Enable PWM test for MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
ee2a48e310 tests: drivers: pwm: Add MAX32675EVKIT overlay file
Enable PWM test for MAX32675EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
e3bb2f1098 tests: drivers: pwm: Add MAX32672 boards overlay file
Enable PWM test for MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
3b75e9e042 tests: drivers: pwm: Add MAX32670EVKIT overlay file
Enable PWM test for MAX32670EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
886319d3f2 tests: drivers: pwm: Add MAX32690EVKIT overlay file
Enable PWM test for MAX32690EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
e315ae12bb tests: drivers: pwm: Add MAX32666 board overlay files
Add MAX32666FTHR and MAX32666EVKIT pwm overlay file

Co-authored-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
95a73023ab tests: drivers: pwm: Add MAX32655 board overlay files
Add MAX32655EVKIT and MAX32655FTHR pwm overlay file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Raffael Rostagno
02af64400f boards: esp8684_devkitm: PWM sample and document update
Added sample for ESP32C2/ESP8684 SoC and updated document
indicating LEDC PWM support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 18:05:12 +02:00
Anke Xiao
59655d4e08 tests: drivers: add flexio pwm and spi support for ke17z
pwm: pwm_api: update testcase.yaml and add new overlay configuration
to support flexio pwm driver.
spi: spi_loopback: update testcase.yaml and add new overlay
configuration to support flexio spi driver.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Raffael Rostagno
a205fe9155 samples: esp32c3: Move config files from boards to socs
Move samples config files from 'boards' to 'socs' in order to
remove multiple files with the same configuration and render
available samples for new boards. Only changed sample files
which are not board or hardware specific.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Anke Xiao
6987120cc8 tests: drivers: pwm: add pwm configuration for mke17z
Add pwm configuration for frdm_ke17z and frdm_ke17z512 boards.
Set the alias of pwm-0 to ftm2 and test the pwm_api sample.
Update the ftm and pwt configuration to test pwm_loopback sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Piotr Krzyzanowski
de664204a7 tests: drivers: pwm: extend test coverage
Extend nrf pwm driver test coverage by testing invalid port number

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2024-07-31 12:55:58 +02:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Raffael Rostagno
ec10f1b97f boards: esp32c6: Added PWM test file for esp32c6_devkitc
Added basic PWM test for esp32c6_devkitc

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-06-14 18:51:46 -04:00
cyliang tw
10f0859967 tests: drivers: pwm: pwm_loopback: correct numaker_pfm_m467 pinmux
Fix pinmux of numaker_pfm_m467.overlay to meet pinmux format.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
cyliang tw
07e2e87fde tests: drivers: pwm: pwm_loopback: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for TEST_USERSPACE, so set CONFIG_TEST_USERSPACE=n.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-21 16:43:46 -04:00
Hake Huang
16d709e54f test: pwm: add mimxrt1060_evk support for pwm
add missing board and overlay support

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-05-10 18:07:55 -04:00
Nikodem Kastelik
539a428032 tests: drivers: pwm: boards: nrf54h20dk: add memory-region property
This property will ensure that PWM driver allocates data buffer
in appropriate location.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-25 17:59:27 -04:00
Sylvio Alves
4a4d7584ff boards: rename and update esp32 related conf and overlay files
There are several esp32-based boards that its conf and overlay
files are missing proper renaming to match cpu cluster.

This also removes all _SOC_ name from files.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-23 15:36:13 +02:00
Manuel Argüelles
5d2670ac1f drivers: pwm: mcux_ftm: allow to select clock source
FTM internal counter can be clocked by one of three clock sources
independent of the module bus clock. This patch introduces a DT property
to perform the clock selection from DT.

DT sources are updated to keep the current clock selection for all boards,
with exception of ucans32k1sic board which is migrated to use system
clock by default, as this seems to be a better choice for most cases.
Some PWM LED samples require slower clock so overlays are added for
those cases.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-04-19 10:08:53 +02:00
Torsten Rasmussen
b9f3d68863 samples: tests: additional overlay and conf file adjustments
Adjustments of overlay and conf files to adjust for the MERGE removal.

The revert of MERGE requires specific overlay and conf files for boards
which relied on the MERGE feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-04-09 23:35:54 +02:00