Skip to content

Commit 77170fb

Browse files
committed
drivers: input: initial support for renesas,ra-ctsu
First commit to add support for Renesas RA Capasitive Sensing Unit Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
1 parent 275a84b commit 77170fb

File tree

10 files changed

+1230
-0
lines changed

10 files changed

+1230
-0
lines changed

drivers/input/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ zephyr_library_sources_ifdef(CONFIG_INPUT_PAW32XX input_paw32xx.c)
3131
zephyr_library_sources_ifdef(CONFIG_INPUT_PINNACLE input_pinnacle.c)
3232
zephyr_library_sources_ifdef(CONFIG_INPUT_PMW3610 input_pmw3610.c)
3333
zephyr_library_sources_ifdef(CONFIG_INPUT_REALTEK_RTS5912_KBD input_realtek_rts5912_kbd.c)
34+
zephyr_library_sources_ifdef(CONFIG_INPUT_RENESAS_RA_CTSU input_renesas_ra_ctsu.c)
3435
zephyr_library_sources_ifdef(CONFIG_INPUT_SBUS input_sbus.c)
3536
zephyr_library_sources_ifdef(CONFIG_INPUT_STM32_TSC_KEYS input_tsc_keys.c)
3637
zephyr_library_sources_ifdef(CONFIG_INPUT_STMPE811 input_stmpe811.c)

drivers/input/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ source "drivers/input/Kconfig.pat912x"
3232
source "drivers/input/Kconfig.paw32xx"
3333
source "drivers/input/Kconfig.pinnacle"
3434
source "drivers/input/Kconfig.pmw3610"
35+
source "drivers/input/Kconfig.renesas_ra"
3536
source "drivers/input/Kconfig.rts5912"
3637
source "drivers/input/Kconfig.sbus"
3738
source "drivers/input/Kconfig.sdl"

drivers/input/Kconfig.renesas_ra

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config INPUT_RENESAS_RA_CTSU
5+
bool "Renesas RA Capacitive Touch driver"
6+
default y
7+
depends on DT_HAS_RENESAS_RA_CTSU_ENABLED
8+
select USE_RA_FSP_CTSU
9+
select USE_RA_FSP_TOUCH
10+
select SYS_MEM_BLOCKS
11+
select GPIO
12+
select PINCTRL
13+
help
14+
Enable Renesas RA Touch Sensing driver.
15+
16+
if INPUT_RENESAS_RA_CTSU
17+
18+
config INPUT_RENESAS_RA_DEVICE_VCC
19+
int "SoC VCC input in minivolt"
20+
default 3300
21+
help
22+
SoC VCC input in milivolt.
23+
24+
config INPUT_RENESAS_RA_QE_TOUCH_CFG
25+
bool "Using QE Touch Workflow to config this driver"
26+
help
27+
If this config was enabled, setting for CTSU and Cap
28+
Touch driver will be reflected the setting that generated
29+
from QE Touch Workflow.
30+
Please add the generated C source files into the app CMakeLists
31+
to make the driver can using it.
32+
33+
if !INPUT_RENESAS_RA_QE_TOUCH_CFG
34+
35+
config INPUT_RENESAS_RA_CTSU_NUM_SELF_ELEMENTS
36+
int "Number of self-capacitance elements"
37+
default 0
38+
help
39+
Number of self-capacitance elements in the CTSU.
40+
41+
config INPUT_RENESAS_RA_CTSU_NUM_MUTUAL_ELEMENTS
42+
int "Number of mutual-capacitance elements"
43+
default 0
44+
help
45+
Number of mutual-capacitance elements in the CTSU.
46+
47+
choice INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE
48+
prompt "Type of chattering suppression"
49+
default INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_A
50+
51+
config INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_A
52+
bool "Counter of exceed threshold is hold within hysteresis range"
53+
help
54+
Counter of exceed threshold is hold within hysteresis range.
55+
56+
config INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_B
57+
bool "Counter of exceed threshold is reset within hysteresis range"
58+
help
59+
Counter of exceed threshold is reset within hysteresis range.
60+
61+
endchoice # INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE
62+
63+
endif # !INPUT_RENESAS_RA_QE_TOUCH_CFG
64+
65+
config INPUT_RENESAS_RA_CTSU_POLLING_INTERVAL_MS
66+
int "CTSU debounce interval time"
67+
range 20 500
68+
default 100
69+
help
70+
Debouncing interval time in milliseconds.
71+
72+
config INPUT_RENESAS_RA_CTSU_STABILIZATION_TIME_US
73+
int "CTSU stabilization time"
74+
default 20
75+
help
76+
Stabilization time required to wait between 2 scans.
77+
78+
config INPUT_RENESAS_RA_CTSU_DRV_STACK_SIZE
79+
int "CTSU internal thread stack size"
80+
default 512
81+
help
82+
CTSU driver internal thread stack size.
83+
84+
config INPUT_RENESAS_RA_CTSU_DRV_PRIORITY
85+
int "CTSU internal thread priority"
86+
default 8
87+
help
88+
CTSU driver internal thread priority.
89+
90+
config INPUT_RENESAS_RA_CTSU_MSG_MEM_BLOCK_SIZE
91+
int "CTSU internal sys_mem_blocks allocator size"
92+
default 10
93+
help
94+
CTSU driver internal sys_mem_blocks allocator maximum num blocks.
95+
96+
endif # INPUT_RENESAS_RA_CTSU

0 commit comments

Comments
 (0)