Skip to content

Commit 2e76631

Browse files
Hieu Nguyenkartben
authored andcommitted
tests: drivers: counter: Add support for RZ/G3S-SMARC
Add test support for Counter driver of RZ/G3S-SMARC Signed-off-by: Hieu Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]>
1 parent e5ce9d0 commit 2e76631

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&gtm0 {
8+
status = "okay";
9+
10+
counter {
11+
status = "okay";
12+
};
13+
};
14+
15+
&gtm1 {
16+
status = "okay";
17+
18+
counter {
19+
status = "okay";
20+
};
21+
};
22+
23+
&gtm2 {
24+
status = "okay";
25+
26+
counter {
27+
status = "okay";
28+
};
29+
};
30+
31+
&gtm3 {
32+
status = "okay";
33+
34+
counter {
35+
status = "okay";
36+
};
37+
};
38+
39+
&gtm4 {
40+
status = "okay";
41+
42+
counter {
43+
status = "okay";
44+
};
45+
};
46+
47+
&gtm5 {
48+
status = "okay";
49+
50+
counter {
51+
status = "okay";
52+
};
53+
};
54+
55+
&gtm6 {
56+
status = "okay";
57+
58+
counter {
59+
status = "okay";
60+
};
61+
};
62+
63+
&gtm7 {
64+
status = "okay";
65+
66+
counter {
67+
status = "okay";
68+
};
69+
};

tests/drivers/counter/counter_basic_api/src/test_counter.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ static const struct device *const devices[] = {
126126
#ifdef CONFIG_COUNTER_MCUX_LPTMR
127127
DEVS_FOR_DT_COMPAT(nxp_lptmr)
128128
#endif
129+
#ifdef CONFIG_COUNTER_RENESAS_RZ_GTM
130+
DEVS_FOR_DT_COMPAT(renesas_rz_gtm_counter)
131+
#endif
129132
};
130133

131134
static const struct device *const period_devs[] = {
@@ -1102,6 +1105,11 @@ static bool reliable_cancel_capable(const struct device *dev)
11021105
if (single_channel_alarm_capable(dev)) {
11031106
return true;
11041107
}
1108+
#endif
1109+
#ifdef CONFIG_COUNTER_RENESAS_RZ_GTM
1110+
if (single_channel_alarm_capable(dev)) {
1111+
return true;
1112+
}
11051113
#endif
11061114
return false;
11071115
}

0 commit comments

Comments
 (0)