Skip to content

Commit 99cbbba

Browse files
nordic-pikrrlubos
authored andcommitted
[nrf fromlist] tests: drivers: pwm_gpio_loopback: Add more channels
Add more channels testing nrf platforms. Upstream PR #: 93776 Signed-off-by: Piotr Krzyzanowski <[email protected]>
1 parent 0878bed commit 99cbbba

File tree

2 files changed

+48
-14
lines changed

2 files changed

+48
-14
lines changed

tests/drivers/pwm/pwm_gpio_loopback/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,55 @@
44
*
55
* Test requires wire connection between:
66
* - PWM130 OUT[0] at P0.00 <-> GPIO input at P0.01
7+
* - PWM130 OUT[1] at P0.02 <-> GPIO input at P0.04
8+
* - PWM130 OUT[2] at P0.03 <-> GPIO input at P0.05
9+
* - PWM130 OUT[3] at P0.06 <-> GPIO input at P0.07
710
* - PWM120 OUT[0] at P7.00 <-> GPIO input at P1.09
8-
* - PWM120 OUT[1] at P7.01 <-> GPIO input at P1.05
911
*/
1012

1113
/ {
1214
zephyr,user {
1315
pwms = <&pwm130 0 160000 PWM_POLARITY_NORMAL>,
14-
<&pwm120 0 80000 PWM_POLARITY_NORMAL>,
15-
<&pwm120 1 80000 PWM_POLARITY_NORMAL>;
16+
<&pwm130 1 160000 PWM_POLARITY_NORMAL>,
17+
<&pwm130 2 160000 PWM_POLARITY_NORMAL>,
18+
<&pwm130 3 160000 PWM_POLARITY_NORMAL>,
19+
<&pwm120 0 80000 PWM_POLARITY_NORMAL>;
1620
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>,
17-
<&gpio1 9 GPIO_ACTIVE_HIGH>,
18-
<&gpio1 5 GPIO_ACTIVE_HIGH>;
21+
<&gpio0 4 GPIO_ACTIVE_HIGH>,
22+
<&gpio0 5 GPIO_ACTIVE_HIGH>,
23+
<&gpio0 7 GPIO_ACTIVE_HIGH>,
24+
<&gpio1 9 GPIO_ACTIVE_HIGH>;
1925
};
2026
};
2127

2228
&pinctrl {
2329
pwm130_default: pwm130_default {
2430
group1 {
25-
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
31+
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>,
32+
<NRF_PSEL(PWM_OUT1, 0, 2)>,
33+
<NRF_PSEL(PWM_OUT2, 0, 3)>,
34+
<NRF_PSEL(PWM_OUT3, 0, 6)>;
2635
};
2736
};
2837

2938
pwm130_sleep: pwm130_sleep {
3039
group1 {
31-
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
40+
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>,
41+
<NRF_PSEL(PWM_OUT1, 0, 2)>,
42+
<NRF_PSEL(PWM_OUT2, 0, 3)>,
43+
<NRF_PSEL(PWM_OUT3, 0, 6)>;
3244
low-power-enable;
3345
};
3446
};
3547

3648
pwm120_default: pwm120_default {
3749
group1 {
38-
psels = <NRF_PSEL(PWM_OUT0, 7, 0)>,
39-
<NRF_PSEL(PWM_OUT1, 7, 1)>;
50+
psels = <NRF_PSEL(PWM_OUT0, 7, 0)>;
4051
};
4152
};
4253
pwm120_sleep: pwm120_sleep {
4354
group1 {
44-
psels = <NRF_PSEL(PWM_OUT0, 7, 0)>,
45-
<NRF_PSEL(PWM_OUT1, 7, 1)>;
55+
psels = <NRF_PSEL(PWM_OUT0, 7, 0)>;
4656
low-power-enable;
4757
};
4858
};

tests/drivers/pwm/pwm_gpio_loopback/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,36 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Test requires jumper between:
6-
* - PWM20 OUT[0] at P1.10 <-> GPIO input at P1.11
6+
* - PWM20 OUT[0] at P1.08 <-> GPIO input at P1.09
7+
* - PWM20 OUT[1] at P1.10 <-> GPIO input at P1.11
8+
* - PWM20 OUT[2] at P1.12 <-> GPIO input at P1.13
79
*/
810

911
/ {
1012
zephyr,user {
11-
pwms = <&pwm20 0 160000 PWM_POLARITY_NORMAL>;
12-
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
13+
pwms = <&pwm20 0 160000 PWM_POLARITY_NORMAL>,
14+
<&pwm20 1 160000 PWM_POLARITY_NORMAL>,
15+
<&pwm20 2 160000 PWM_POLARITY_NORMAL>;
16+
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>,
17+
<&gpio1 11 GPIO_ACTIVE_HIGH>,
18+
<&gpio1 13 GPIO_ACTIVE_HIGH>;
19+
};
20+
};
21+
22+
&pinctrl {
23+
pwm20_default: pwm20_default {
24+
group1 {
25+
psels = <NRF_PSEL(PWM_OUT0, 1, 8)>,
26+
<NRF_PSEL(PWM_OUT1, 1, 10)>,
27+
<NRF_PSEL(PWM_OUT2, 1, 12)>;
28+
};
29+
};
30+
31+
pwm20_sleep: pwm20_sleep {
32+
group1 {
33+
psels = <NRF_PSEL(PWM_OUT0, 1, 8)>,
34+
<NRF_PSEL(PWM_OUT1, 1, 10)>,
35+
<NRF_PSEL(PWM_OUT2, 1, 12)>;
36+
};
1337
};
1438
};

0 commit comments

Comments
 (0)