linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] arm64: dts: qcom: msm8916-samsung-a2015: Add touch key
@ 2021-06-04 17:27 Stephan Gerhold
  2021-06-04 17:27 ` [PATCH 2/5] arm64: dts: qcom: msm8916-samsung-a3u: Add touch key regulators Stephan Gerhold
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Stephan Gerhold @ 2021-06-04 17:27 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, phone-devel,
	~postmarketos/upstreaming, Michael Srba, Stephan Gerhold

The Samsung Galaxy A3/A5 both have two capacitive touch keys,
connected to an ABOV MCU. It implements the same interface as
implemented by the tm2-touchkey driver and works just fine with
the coreriver,tc360-touchkey compatible. It's probably actually some
Samsung-specific interface that they implement with different MCUs.

Note that for some reason Samsung decided to connect this to GPIOs
where no hardware I2C bus is available, so we need to fall back
to software bit-banging using i2c-gpio.

The vdd/vcc-supply is board-specific and will be added separately
for a3u/a5u.

Co-developed-by: Michael Srba <Michael.Srba@seznam.cz>
Signed-off-by: Michael Srba <Michael.Srba@seznam.cz>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 .../qcom/msm8916-samsung-a2015-common.dtsi    | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 230ba3ce3277..3c77e7ef9eda 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -95,6 +95,35 @@ muic: extcon@25 {
 			pinctrl-0 = <&muic_int_default>;
 		};
 	};
+
+	i2c-tkey {
+		compatible = "i2c-gpio";
+		sda-gpios = <&msmgpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&msmgpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tkey_i2c_default>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		touchkey: touchkey@20 {
+			/* Note: Actually an ABOV MCU that implements same interface */
+			compatible = "coreriver,tc360-touchkey";
+			reg = <0x20>;
+
+			interrupt-parent = <&msmgpio>;
+			interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
+
+			/* vcc/vdd-supply are board-specific */
+			vddio-supply = <&pm8916_l6>;
+
+			linux,keycodes = <KEY_APPSELECT KEY_BACK>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&tkey_default>;
+		};
+	};
 };
 
 &blsp_i2c2 {
@@ -333,6 +362,22 @@ muic_int_default: muic-int-default {
 		bias-disable;
 	};
 
+	tkey_default: tkey-default {
+		pins = "gpio98";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	tkey_i2c_default: tkey-i2c-default {
+		pins = "gpio16", "gpio17";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	tsp_en_default: tsp-en-default {
 		pins = "gpio73";
 		function = "gpio";
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-10 14:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 17:27 [PATCH 1/5] arm64: dts: qcom: msm8916-samsung-a2015: Add touch key Stephan Gerhold
2021-06-04 17:27 ` [PATCH 2/5] arm64: dts: qcom: msm8916-samsung-a3u: Add touch key regulators Stephan Gerhold
2021-06-04 17:27 ` [PATCH 3/5] arm64: dts: qcom: msm8916-samsung-a5u: Add touch key regulator Stephan Gerhold
2021-06-04 17:27 ` [PATCH 4/5] arm64: dts: qcom: msm8916-samsung-a2015: Add rt5033 battery Stephan Gerhold
2021-06-04 17:27 ` [PATCH 5/5] arm64: dts: qcom: msm8916-samsung-a2015: Add NFC Stephan Gerhold
2021-06-07  8:23   ` Krzysztof Kozlowski
2021-06-10 14:50 ` [PATCH 1/5] arm64: dts: qcom: msm8916-samsung-a2015: Add touch key patchwork-bot+linux-arm-msm

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).