Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions boards/renesas/rsk_rx130/rsk_rx130.dts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
status = "okay";
};

&ioportc {
status = "okay";
};

&ioportd {
status = "okay";
};
Expand Down Expand Up @@ -118,6 +122,58 @@
clock-frequency = <DT_FREQ_K(400)>;
};

&ctsu {
pinctrl-0 = <&ctsu_default>;
pinctrl-names = "default";
max-num-sensors = <36>;
tscap-gpios = <&ioportc 4 0>;
status = "okay";

onboard_slider: touch_slider_0 {
component-type = "slider";
ssdiv = <1>;
so = <0x040>;
snum = <0x03>;
sdpa = <0x07>;
channels-num = <10>, <9>, <8>, <7>;
zephyr,code = <INPUT_ABS_THROTTLE>;
touch-count-threshold = <750>;

sld0 {
compatible = "renesas,rx-ctsu-slider";
status = "okay";
};
};

onboard_button_1: touch_button_1 {
component-type = "button";
ssdiv = <0x0>;
snum = <0x07>;
sdpa = <0x03>;
channels-num = <11>;
zephyr,code = <INPUT_KEY_1>;

button1 {
compatible = "renesas,rx-ctsu-button";
status = "okay";
};
};

onboard_button_2: touch_button_2 {
component-type = "button";
ssdiv = <0x0>;
snum = <0x07>;
sdpa = <0x03>;
channels-num = <12>;
zephyr,code = <INPUT_KEY_2>;

button2 {
compatible = "renesas,rx-ctsu-button";
status = "okay";
};
};
};

&port_irq1 {
status = "okay";
};
Expand Down
12 changes: 12 additions & 0 deletions boards/renesas/rsk_rx130/rsk_rx130_512kb-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@
renesas,analog-enable;
};
};

ctsu_default: ctsu_default {
group1 {
psels = <RX_PSEL(RX_PSEL_PHnPFS_TS7, 0x11, 3)>,
<RX_PSEL(RX_PSEL_PHnPFS_TS8, 0x11, 2)>,
<RX_PSEL(RX_PSEL_PHnPFS_TS9, 0x11, 1)>,
<RX_PSEL(RX_PSEL_PHnPFS_TS10, 0x11, 0)>,
<RX_PSEL(RX_PSEL_P5nPFS_TS11, 0x05, 5)>,
<RX_PSEL(RX_PSEL_P5nPFS_TS12, 0x05, 4)>,
<RX_PSEL(RX_PSEL_PCnPFS_TSCAP, 0x0c, 4)>;
};
};
};
1 change: 1 addition & 0 deletions drivers/input/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_INPUT_PINNACLE input_pinnacle.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_PMW3610 input_pmw3610.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_REALTEK_RTS5912_KBD input_realtek_rts5912_kbd.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_RENESAS_RA_CTSU input_renesas_ra_ctsu.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_RENESAS_RX_CTSU input_renesas_rx_ctsu.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_SBUS input_sbus.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_STM32_TSC_KEYS input_tsc_keys.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_STMPE811 input_stmpe811.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/input/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ source "drivers/input/Kconfig.paw32xx"
source "drivers/input/Kconfig.pinnacle"
source "drivers/input/Kconfig.pmw3610"
source "drivers/input/Kconfig.renesas_ra"
source "drivers/input/Kconfig.renesas_rx"
source "drivers/input/Kconfig.rts5912"
source "drivers/input/Kconfig.sbus"
source "drivers/input/Kconfig.sdl"
Expand Down
92 changes: 92 additions & 0 deletions drivers/input/Kconfig.renesas_rx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config INPUT_RENESAS_RX_CTSU
bool "Renesas Capacitive Touch Sensing Unit"
default y
depends on DT_HAS_RENESAS_RX_CTSU_ENABLED
select USE_RX_RDP_CTSU
select PINCTRL
help
Enable RX series CTSU driver

if INPUT_RENESAS_RX_CTSU

config INPUT_RENESAS_RX_QE_TOUCH_CFG
bool "Using QE Touch Workflow to config this driver"
help
If this config was enabled, setting for CTSU and Cap
Touch driver will be reflected the setting that generated
from QE Touch Workflow.
Please add the generated C source files into the app CMakeLists
to make the driver can using it.

config INPUT_RENESAS_RX_CTSU_SCAN_INTERVAL_MS
int "CTSU channels scan interval"
default 5
help
Interval time (milliseconds) between two scans.

if !INPUT_RENESAS_RX_QE_TOUCH_CFG

config INPUT_RENESAS_RX_CTSU_ON_FREQ
int "CTSU On Frequency"
default 3
help
Number of Debouncing count of touch-on filtering

config INPUT_RENESAS_RX_CTSU_OFF_FREQ
int "CTSU Off Frequency"
default 3
help
Number of Debouncing count of touch-off filtering

config INPUT_RENESAS_RX_CTSU_DRIFT_FREQ
int "CTSU drift frequency"
default 255
help
Sample count for drift correction (0 mean no use).

config INPUT_RENESAS_RX_CTSU_CANCEL_FREQ
int "CTSU Cancel Frequency"
default 0
help
Continuous Touch Cancel Count (0 mean no use).

config INPUT_RENESAS_RX_CTSU_NUM_MOVING_AVERAGE
int "CTSU Moving average"
default 4
help
Number of moving average for measurement data

config INPUT_RENESAS_RX_CTSU_POWER_SUPPLY_CAPACITY
int "CTSU Power supply capacity"
default 0
range 0 1
help
Power Supply Capacity Adjustment
- 0: Normal (40uA)
- 1: High-current output (80uA)

config INPUT_RENESAS_RX_CTSU_TRANSMISSION_POWER_SUPPLY
int "CTSU transmission power supply"
default 0
range 0 1
help
Transmission Power Supply Select
- 0: VCC selected
- 1: Internal logic power supply selected

config INPUT_RENESAS_RX_CTSU_PCLK_DIVISION
int "CTSU: Division of PCLK"
default 0
range 0 2
help
Division of PCLK
- 0: PCLK/1
- 1: PCLK/2
- 2: PCLK/4

endif #!INPUT_RENESAS_RX_QE_TOUCH_CFG

endif #INPUT_CTSU
Loading