tests: drivers: pwm: add support for nRF54 devices

Add missing alignments and overlays so that nRF54H20 and nRF54L15
can run the test.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This commit is contained in:
Nikodem Kastelik 2024-04-03 12:42:21 +02:00 committed by Carles Cufí
commit 53a7a402a7
4 changed files with 45 additions and 2 deletions

View file

@ -0,0 +1,20 @@
&pinctrl {
pwm_default: pwm_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
};
};
pwm_sleep: pwm_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
low-power-enable;
};
};
};
&pwm130 {
status = "okay";
pinctrl-0 = <&pwm_default>;
pinctrl-1 = <&pwm_sleep>;
pinctrl-names = "default", "sleep";
};

View file

@ -0,0 +1,20 @@
&pinctrl {
pwm_default: pwm_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 8)>;
};
};
pwm_sleep: pwm_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 8)>;
low-power-enable;
};
};
};
&pwm20 {
status = "okay";
pinctrl-0 = <&pwm_default>;
pinctrl-1 = <&pwm_sleep>;
pinctrl-names = "default", "sleep";
};

View file

@ -38,6 +38,9 @@
#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_3), okay)
#define PWM_DEV_NODE DT_ALIAS(pwm_3)
#elif DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_pwm)
#define PWM_DEV_NODE DT_INST(0, nordic_nrf_pwm)
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_pwm)
#define PWM_DEV_NODE DT_INST(0, st_stm32_pwm)
@ -76,7 +79,7 @@
#if defined CONFIG_BOARD_SAM_E70_XPLAINED
#define DEFAULT_PWM_PORT 2 /* PWM on EXT2 connector, pin 8 */
#elif defined CONFIG_PWM_NRFX
#define DEFAULT_PWM_PORT DT_PROP(DT_ALIAS(pwm_0), ch0_pin)
#define DEFAULT_PWM_PORT 0
#elif defined CONFIG_BOARD_ADAFRUIT_ITSYBITSY_M4_EXPRESS
#define DEFAULT_PWM_PORT 2 /* TCC1/WO[2] on PA18 (D7) */
#elif defined CONFIG_BOARD_MIMXRT685_EVK

View file

@ -6,5 +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")
or dt_compat_enabled("intel,blinky-pwm") or dt_compat_enabled("nordic,nrf-pwm")
depends_on: pwm