linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rudraksha Gupta <guptarud@gmail.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: qcom: msm8960: expressatt: Add coreriver,tc360-touchkey
Date: Fri, 5 Dec 2025 19:54:55 -0800	[thread overview]
Message-ID: <7c54fd46-d17a-4ee8-ad9f-e98546958dd5@gmail.com> (raw)
In-Reply-To: <arocrbzcwvyb2te3gcujeo7jaiaisgh3wuketqkif7xvkvmbct@r26gqpw6gb43>

>> +		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


  reply	other threads:[~2025-12-06  3:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 10:16 [PATCH] ARM: dts: qcom: msm8960: expressatt: Add coreriver,tc360-touchkey Rudraksha Gupta via B4 Relay
2025-12-06  2:18 ` Dmitry Baryshkov
2025-12-06  3:54   ` Rudraksha Gupta [this message]
2025-12-06  4:01     ` Dmitry Baryshkov
2025-12-08 16:35 ` Konrad Dybcio
2025-12-09  7:10   ` Rudraksha Gupta
2025-12-16 12:59     ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c54fd46-d17a-4ee8-ad9f-e98546958dd5@gmail.com \
    --to=guptarud@gmail.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).