Skip to content

Commit b8186b4

Browse files
mstasiaknordicnordic-piks
authored andcommitted
tests: pwm: add nRF54LS05B support
Added support for nRF54LS05B in pwm tests. Signed-off-by: Michał Stasiak <[email protected]>
1 parent 00682c8 commit b8186b4

File tree

6 files changed

+110
-2
lines changed

6 files changed

+110
-2
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <zephyr/dt-bindings/pwm/pwm.h>
8+
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
9+
10+
&pinctrl {
11+
pwm20_alt: pwm20_alt {
12+
group1 {
13+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
14+
};
15+
};
16+
17+
pwm20_sleep_alt: pwm20_sleep_alt {
18+
group1 {
19+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
20+
low-power-enable;
21+
};
22+
};
23+
};
24+
25+
&pwm20 {
26+
status = "okay";
27+
pinctrl-0 = <&pwm20_alt>;
28+
pinctrl-1 = <&pwm20_sleep_alt>;
29+
pinctrl-names = "default", "sleep";
30+
};
31+
32+
/ {
33+
pwm_to_gpio_loopback: pwm_to_gpio_loopback {
34+
compatible = "test-pwm-to-gpio-loopback";
35+
pwms = <&pwm20 0 0 PWM_POLARITY_NORMAL>;
36+
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
37+
};
38+
};

tests/drivers/pwm/gpio_loopback/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ tests:
1616
- nrf54h20dk/nrf54h20/cpuapp
1717
- nrf54l15dk/nrf54l15/cpuapp
1818
- nrf54lm20dk/nrf54lm20a/cpuapp
19+
- [email protected]/nrf54ls05b/cpuapp
20+
- nrf54ls05dk/nrf54ls05b/cpuapp
1921
- nrf7120pdk/nrf7120/cpuapp
2022
integration_platforms:
2123
- nrf54h20dk/nrf54h20/cpuapp
2224
- nrf54l15dk/nrf54l15/cpuapp
2325
- nrf54lm20dk/nrf54lm20a/cpuapp
26+
- nrf54ls05dk/nrf54ls05b/cpuapp
2427
- nrf7120pdk/nrf7120/cpuapp
2528

2629
drivers.pwm.gpio_loopback.fast_p7_0:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&pinctrl {
8+
pwm20_default_test: pwm20_default_test {
9+
group1 {
10+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
11+
};
12+
};
13+
14+
pwm20_sleep_test: pwm20_sleep_test {
15+
group1 {
16+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
17+
low-power-enable;
18+
};
19+
};
20+
};
21+
22+
&pwm20 {
23+
status = "okay";
24+
pinctrl-0 = <&pwm20_default_test>;
25+
pinctrl-1 = <&pwm20_sleep_test>;
26+
pinctrl-names = "default", "sleep";
27+
};

tests/drivers/pwm/pwm_instances/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ tests:
1111
- nrf54h20dk/nrf54h20/cpuapp
1212
- nrf54l15dk/nrf54l15/cpuapp
1313
- nrf54lm20dk/nrf54lm20a/cpuapp
14+
- [email protected]/nrf54ls05b/cpuapp
15+
- nrf54ls05dk/nrf54ls05b/cpuapp
1416
integration_platforms:
1517
- nrf54h20dk/nrf54h20/cpuapp
1618
- nrf54l15dk/nrf54l15/cpuapp
1719
- nrf54lm20dk/nrf54lm20a/cpuapp
20+
- nrf54ls05dk/nrf54ls05b/cpuapp
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
pwms = <&pwm20 0 160000 PWM_POLARITY_NORMAL>;
10+
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
11+
};
12+
};
13+
14+
&pinctrl {
15+
pwm20_alt: pwm20_alt {
16+
group1 {
17+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
18+
};
19+
};
20+
21+
pwm20_alt_sleep: pwm20_alt_sleep {
22+
group1 {
23+
psels = <NRF_PSEL(PWM_OUT0, 1, 10)>;
24+
low-power-enable;
25+
};
26+
};
27+
};
28+
29+
&pwm20 {
30+
pinctrl-0 = <&pwm20_alt>;
31+
pinctrl-1 = <&pwm20_alt_sleep>;
32+
pinctrl-names = "default", "sleep";
33+
status = "okay";
34+
};

tests/zephyr/drivers/pwm/pwm_gpio_loopback/testcase.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ common:
99
fixture: gpio_loopback
1010
tests:
1111
nrf.extended.drivers.pwm.gpio_loopback.nrf:
12-
depends_on:
13-
- future_target
12+
platform_allow:
13+
- [email protected]/nrf54ls05b/cpuapp
14+
- nrf54ls05dk/nrf54ls05b/cpuapp
15+
integration_platforms:
16+
- nrf54ls05dk/nrf54ls05b/cpuapp

0 commit comments

Comments
 (0)