diff --git a/boards/renesas/ek_ra2a1/Kconfig.defconfig b/boards/renesas/ek_ra2a1/Kconfig.defconfig new file mode 100644 index 00000000000..842902a62b9 --- /dev/null +++ b/boards/renesas/ek_ra2a1/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2025 Renesas Electronics Corporation +# SPDX-License-Identifier: Apache-2.0 + +if !INPUT_RENESAS_RA_QE_TOUCH_CFG + +config INPUT_RENESAS_RA_CTSU_NUM_SELF_ELEMENTS + default 1 + +endif # INPUT_RENESAS_RA_QE_TOUCH_CFG diff --git a/boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi b/boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi index 690f5736c75..79fe9745813 100644 --- a/boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi +++ b/boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi @@ -51,4 +51,12 @@ renesas,analog-enable; }; }; + + ctsu_default: ctsu_default { + group1 { + /* TS01 TSCAP */ + psels = , + ; + }; + }; }; diff --git a/boards/renesas/ek_ra2a1/ek_ra2a1.dts b/boards/renesas/ek_ra2a1/ek_ra2a1.dts index 39d5d372cd9..6004c429c1e 100644 --- a/boards/renesas/ek_ra2a1/ek_ra2a1.dts +++ b/boards/renesas/ek_ra2a1/ek_ra2a1.dts @@ -83,6 +83,10 @@ status = "okay"; }; +&ioport4 { + status = "okay"; +}; + &port_irq6 { interrupts = <29 3>; status = "okay"; @@ -120,3 +124,40 @@ &wdt { status = "okay"; }; + +&ctsu { + pinctrl-0 = <&ctsu_default>; + pinctrl-names = "default"; + interrupts = <10 3>, <11 3>, <12 3>; + interrupt-names = "ctsuwr", "ctsurd", "ctsufn"; + clock-div = <1>; + pwr-supply-sel = "vcc"; + atune1 = "normal"; + measure-mode = "self-multi-scan"; + tscap-gpios = <&ioport4 9 0>; + status = "okay"; + + group1 { + ctsuchac = <0x00>, <0x80>, <0x00>, <0x00>, <0x00>; + ctsuchtrc = <0x00>, <0x00>, <0x00>, <0x00>, <0x00>; + rx-count = <1>; + tx-count = <0>; + ssdiv = "1.00"; + so = <0x108>; + snum = <0x01>; + sdpa = <0x0B>; + on-freq = <3>; + off-freq = <3>; + drift-freq = <255>; + cancel-freq = <0>; + num-moving-avg = <4>; + + ts1: button1 { + compatible = "renesas,ra-ctsu-button"; + event-code = ; + elements = <0>; + threshold = <2305>; + hysteresis = <115>; + }; + }; +};