Skip to content

Commit 203be5e

Browse files
committed
boards: renesas: ek_ra2a1: add support for ctsu on Renesas RA
Enable support for CTSU button on ek_ra2a1 board Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
1 parent 2a7cd20 commit 203be5e

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,12 @@
5151
renesas,analog-enable;
5252
};
5353
};
54+
55+
ctsu_default: ctsu_default {
56+
group1 {
57+
/* TS01 TSCAP */
58+
psels = <RA_PSEL(RA_PSEL_CTSU, 0, 1)>,
59+
<RA_PSEL(RA_PSEL_CTSU, 4, 9)>;
60+
};
61+
};
5462
};

boards/renesas/ek_ra2a1/ek_ra2a1.dts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
status = "okay";
8484
};
8585

86+
&ioport4 {
87+
status = "okay";
88+
};
89+
8690
&port_irq6 {
8791
interrupts = <29 3>;
8892
status = "okay";
@@ -120,3 +124,42 @@
120124
&wdt {
121125
status = "okay";
122126
};
127+
128+
&ctsu {
129+
pinctrl-0 = <&ctsu_default>;
130+
pinctrl-names = "default";
131+
interrupts = <10 3>, <11 3>, <12 3>;
132+
interrupt-names = "ctsuwr", "ctsurd", "ctsufn";
133+
clock-div = <1>;
134+
pwr-supply-sel = "vcc";
135+
atune1 = "normal";
136+
measure-mode = "self-multi-scan";
137+
tscap-gpios = <&ioport4 9 0>;
138+
status = "okay";
139+
140+
group1 {
141+
ctsuchac = <0x00>, <0x80>, <0x00>, <0x00>, <0x00>;
142+
ctsuchtrc = <0x00>, <0x00>, <0x00>, <0x00>, <0x00>;
143+
rx-count = <1>;
144+
tx-count = <0>;
145+
ssdiv = "1.00";
146+
so = <0x108>;
147+
snum = <0x01>;
148+
sdpa = <0x0B>;
149+
on-freq = <3>;
150+
off-freq = <3>;
151+
drift-freq = <255>;
152+
cancel-freq = <0>;
153+
num-moving-avg = <4>;
154+
status = "okay";
155+
156+
ts1: button1 {
157+
compatible = "renesas,ra-ctsu-button";
158+
event-code = <INPUT_KEY_1>;
159+
elements = <0>;
160+
threshold = <2305>;
161+
hysteresis = <115>;
162+
status = "okay";
163+
};
164+
};
165+
};

0 commit comments

Comments
 (0)