From e22e788b7dfc34c7f55cb6d00da5fd84ee544739 Mon Sep 17 00:00:00 2001 From: Anisetti Avinash Krishna Date: Mon, 26 Jun 2023 21:17:44 +0530 Subject: [PATCH] tests: drivers: pwm: pwm_api: Enable pwm test for intel blinky Enable pwm api test for intel blinky on rpl_crb board. Signed-off-by: Anisetti Avinash Krishna --- boards/x86/rpl_crb/rpl_crb.yaml | 1 + tests/drivers/pwm/pwm_api/src/test_pwm.c | 8 ++++++++ tests/drivers/pwm/pwm_api/testcase.yaml | 1 + 3 files changed, 10 insertions(+) diff --git a/boards/x86/rpl_crb/rpl_crb.yaml b/boards/x86/rpl_crb/rpl_crb.yaml index 807ca8d8d3be60d..d46c99e487e1b49 100644 --- a/boards/x86/rpl_crb/rpl_crb.yaml +++ b/boards/x86/rpl_crb/rpl_crb.yaml @@ -10,6 +10,7 @@ supported: - smbus - watchdog - rtc + - pwm testing: ignore_tags: - net diff --git a/tests/drivers/pwm/pwm_api/src/test_pwm.c b/tests/drivers/pwm/pwm_api/src/test_pwm.c index 1ca33efe1d09c04..47b6e5b41352445 100644 --- a/tests/drivers/pwm/pwm_api/src/test_pwm.c +++ b/tests/drivers/pwm/pwm_api/src/test_pwm.c @@ -47,6 +47,9 @@ #elif DT_HAS_COMPAT_STATUS_OKAY(nxp_kinetis_ftm_pwm) #define PWM_DEV_NODE DT_INST(0, nxp_kinetis_ftm_pwm) +#elif DT_HAS_COMPAT_STATUS_OKAY(intel_blinky_pwm) +#define PWM_DEV_NODE DT_INST(0, intel_blinky_pwm) + #else #error "Define a PWM device" #endif @@ -58,6 +61,11 @@ #define DEFAULT_PULSE_CYCLE 512 #define DEFAULT_PERIOD_NSEC 2000000 #define DEFAULT_PULSE_NSEC 500000 +#elif DT_HAS_COMPAT_STATUS_OKAY(intel_blinky_pwm) +#define DEFAULT_PERIOD_CYCLE 32786 +#define DEFAULT_PULSE_CYCLE 16393 +#define DEFAULT_PERIOD_NSEC 2000000 +#define DEFAULT_PULSE_NSEC 500000 #else #define DEFAULT_PERIOD_CYCLE 64000 #define DEFAULT_PULSE_CYCLE 32000 diff --git a/tests/drivers/pwm/pwm_api/testcase.yaml b/tests/drivers/pwm/pwm_api/testcase.yaml index 9e9e8fd815c4647..608a4d0a0e1f49f 100644 --- a/tests/drivers/pwm/pwm_api/testcase.yaml +++ b/tests/drivers/pwm/pwm_api/testcase.yaml @@ -6,4 +6,5 @@ tests: - userspace filter: dt_alias_exists("pwm-0") or dt_alias_exists("pwm-1") or dt_alias_exists("pwm-2") or dt_alias_exists("pwm-3") or dt_compat_enabled("st,stm32-pwm") + or dt_compat_enabled("intel,blinky-pwm") depends_on: pwm