Skip to content

Commit 42b2624

Browse files
Phi Trankartben
authored andcommitted
tests: pwm: Add overlay to support pwm on RX130
Add pwm property in tests/pwm to support PWM on RSK-RX130-512KB board. Signed-off-by: Phi Tran <[email protected]>
1 parent e771f00 commit 42b2624

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
pwm-0 = &pwm1;
10+
};
11+
};
12+
13+
&pclkb {
14+
div = <2>;
15+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pwm/pwm.h>
8+
#include <zephyr/dt-bindings/pwm/rx_mtu_pwm.h>
9+
10+
/ {
11+
pwm_loopback_0 {
12+
compatible = "test-pwm-loopback";
13+
pwms =<&pwm4 RX_MTIOCxA 0 PWM_POLARITY_NORMAL>,
14+
<&pwm1 RX_MTIOCxA 0 PWM_POLARITY_NORMAL>;
15+
};
16+
};
17+
18+
&pinctrl {
19+
pwm4_default: pwm4_default {
20+
group1 {
21+
psels = <RX_PSEL(RX_PSEL_PAnPFS_MTIOC4A, 10, 0)>;
22+
};
23+
};
24+
};
25+
26+
&mtu4 {
27+
status = "okay";
28+
pinctrl-0 = <&pwm4_default>;
29+
pinctrl-names = "default";
30+
pwm4: pwm {
31+
status = "okay";
32+
prescaler = <RX_MTU_PWM_SOURCE_DIV_16>;
33+
};
34+
};
35+
36+
37+
&pclkb {
38+
div = <4>;
39+
};

0 commit comments

Comments
 (0)