[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c54fd46-d17a-4ee8-ad9f-e98546958dd5@gmail.com>
Date: Fri, 5 Dec 2025 19:54:55 -0800
From: Rudraksha Gupta <guptarud@...il.com>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: dts: qcom: msm8960: expressatt: Add
coreriver,tc360-touchkey
>> + sda-gpios = <&tlmm 71 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> + scl-gpios = <&tlmm 72 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> I don't have docs at hand, but it looks like these pins belong to
> GSBI10. Have you tried using it directly?
This is the log when I use GSBI10:
samsung-expressatt:~$ dmesg | grep tm2
[ 79.555802] input: tm2-touchkey as
/devices/platform/soc/1a200000.gsbi/1a280000.i2c/i2c-4/4-0020/input/input3
[ 110.242881] leds tm2-touchkey: Setting an LED's brightness failed (-110)
[ 167.074920] tm2-touchkey 4-0020: failed to read i2c data: -110
[ 182.435009] tm2-touchkey 4-0020: failed to read i2c data: -110
I could be doing something wrong, so here are the changes I made on top
of this diff
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
index c4b98af6955d..fde5f739a314 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
@@ -60,33 +60,6 @@ touchkey_enable: touchkey-enable {
enable-active-high;
regulator-boot-on;
};
-
- i2c-gpio-touchkey {
- compatible = "i2c-gpio";
- #address-cells = <1>;
- #size-cells = <0>;
- sda-gpios = <&tlmm 71 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- scl-gpios = <&tlmm 72 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- pinctrl-names = "default";
- pinctrl-0 = <&touchkey_i2c_pins>;
- status = "okay";
- i2c-gpio,delay-us = <2>;
-
- touchkey@20 {
- compatible = "coreriver,tc360-touchkey";
- reg = <0x20>;
-
- interrupts-extended = <&tlmm 52 IRQ_TYPE_EDGE_FALLING>;
- pinctrl-names = "default";
- pinctrl-0 = <&touchkey_irq_pin>;
-
- vddio-supply = <&touchkey_enable>;
- vdd-supply = <&pm8921_l29>;
- vcc-supply = <&pm8921_l29>;
-
- linux,keycodes = <KEY_MENU KEY_BACK>;
- };
- };
};
&gsbi2 {
@@ -572,3 +545,28 @@ magnetometer@2e {
/* TODO: Figure out Mount Matrix */
};
};
+
+&gsbi10 {
+ qcom,mode = <GSBI_PROT_I2C>;
+
+ status = "okay";
+};
+
+&gsbi10_i2c {
+ status = "okay";
+
+ touchkey@20 {
+ compatible = "coreriver,tc360-touchkey";
+ reg = <0x20>;
+
+ interrupts-extended = <&tlmm 52 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchkey_irq_pin>;
+
+ vddio-supply = <&touchkey_enable>;
+ vdd-supply = <&pm8921_l29>;
+ vcc-supply = <&pm8921_l29>;
+
+ linux,keycodes = <KEY_MENU KEY_BACK>;
+ };
+};
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
index fd28401cebb5..c598fb324e7d 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi
@@ -223,7 +223,7 @@ i2c8-pins {
i2c10_default_state: i2c10-default-state {
i2c10-pins {
- pins = "gpio73", "gpio74";
+ pins = "gpio71", "gpio72";
function = "gsbi10";
drive-strength = <8>;
bias-disable;
@@ -232,7 +232,7 @@ i2c10-pins {
i2c10_sleep_state: i2c10-sleep-state {
i2c10-pins {
- pins = "gpio73", "gpio74";
+ pins = "gpio71", "gpio72";
function = "gpio";
drive-strength = <2>;
bias-bus-hold;
diff --git a/arch/arm/configs/qcom_defconfig
b/arch/arm/configs/qcom_defconfig
index 29a1dea500f0..49baa91937ca 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -321,3 +321,4 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
# CONFIG_SLUB_DEBUG is not set
# CONFIG_SCHED_DEBUG is not set
+CONFIG_KEYBOARD_TM2_TOUCHKEY=m
\ No newline at end of file
Powered by blists - more mailing lists