Commit 61f363a6 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Bjorn Andersson

arm64: dts: qcom: msm8916-samsung-a2015: Add touch key

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: default avatarMichael Srba <Michael.Srba@seznam.cz>
Signed-off-by: default avatarMichael Srba <Michael.Srba@seznam.cz>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20210604172742.10593-1-stephan@gerhold.netSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent eb59cd3e
...@@ -95,6 +95,35 @@ muic: extcon@25 { ...@@ -95,6 +95,35 @@ muic: extcon@25 {
pinctrl-0 = <&muic_int_default>; 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 { &blsp_i2c2 {
...@@ -333,6 +362,22 @@ muic_int_default: muic-int-default { ...@@ -333,6 +362,22 @@ muic_int_default: muic-int-default {
bias-disable; 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 { tsp_en_default: tsp-en-default {
pins = "gpio73"; pins = "gpio73";
function = "gpio"; function = "gpio";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment