Commit 3fb76057 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Bjorn Andersson

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

Add the CORERIVER TC360 touch key together with the two necessary
fixed regulators for it.

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.
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211004201921.18526-4-stephan@gerhold.net
parent c6b4ddc0
......@@ -91,6 +91,32 @@ reg_vdd_tsp: regulator-vdd-tsp {
pinctrl-0 = <&tsp_en_default>;
};
reg_touch_key: regulator-touch-key {
compatible = "regulator-fixed";
regulator-name = "touch_key";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
gpio = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&tkey_en_default>;
};
reg_key_led: regulator-key-led {
compatible = "regulator-fixed";
regulator-name = "key_led";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&msmgpio 60 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&tkey_led_en_default>;
};
i2c-muic {
compatible = "i2c-gpio";
sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
......@@ -113,6 +139,35 @@ muic: extcon@14 {
pinctrl-0 = <&muic_irq_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@20 {
compatible = "coreriver,tc360-touchkey";
reg = <0x20>;
interrupt-parent = <&msmgpio>;
interrupts = <98 IRQ_TYPE_EDGE_FALLING>;
vcc-supply = <&reg_touch_key>;
vdd-supply = <&reg_key_led>;
vddio-supply = <&pm8916_l6>;
linux,keycodes = <KEY_APPSELECT KEY_BACK>;
pinctrl-names = "default";
pinctrl-0 = <&tkey_default>;
};
};
};
&blsp_i2c5 {
......@@ -333,6 +388,38 @@ muic_irq_default: muic-irq-default {
bias-disable;
};
tkey_default: tkey-default {
pins = "gpio98";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tkey_en_default: tkey-en-default {
pins = "gpio86";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tkey_i2c_default: tkey-i2c-default {
pins = "gpio16", "gpio17";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tkey_led_en_default: tkey-led-en-default {
pins = "gpio60";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
tsp_en_default: tsp-en-default {
pins = "gpio73";
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