ARM: dts: qcom: msm8974-hammerhead: add touchscreen support
authorJonathan Marek <jonathan@marek.ca>
Mon, 3 Jun 2019 01:04:54 +0000 (21:04 -0400)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 16 Jun 2019 18:25:41 +0000 (11:25 -0700)
Add support for the Synaptics RMI4 touchscreen that is found on the
Nexus 5.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts

index b3b0473..fe760a3 100644 (file)
                        };
                };
 
+               i2c2_pins: i2c2 {
+                       mux {
+                               pins = "gpio6", "gpio7";
+                               function = "blsp_i2c2";
+
+                               drive-strength = <2>;
+                               bias-disable;
+                       };
+               };
+
                i2c3_pins: i2c3 {
                        mux {
                                pins = "gpio10", "gpio11";
                                input-enable;
                        };
                };
+
+               touch_pin: touch {
+                       int {
+                               pins = "gpio5";
+                               function = "gpio";
+
+                               drive-strength = <2>;
+                               bias-disable;
+                               input-enable;
+                       };
+
+                       reset {
+                               pins = "gpio8";
+                               function = "gpio";
+
+                               drive-strength = <2>;
+                               bias-pull-up;
+                       };
+               };
        };
 
        sdhci@f9824900 {
                };
        };
 
+       i2c@f9924000 {
+               status = "ok";
+
+               clock-frequency = <355000>;
+               qcom,src-freq = <50000000>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_pins>;
+
+               synaptics@70 {
+                       compatible = "syna,rmi4-i2c";
+                       reg = <0x70>;
+
+                       interrupts-extended = <&msmgpio 5 IRQ_TYPE_EDGE_FALLING>;
+                       vdd-supply = <&pm8941_l22>;
+                       vio-supply = <&pm8941_lvs3>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&touch_pin>;
+
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       rmi4-f01@1 {
+                               reg = <0x1>;
+                               syna,nosleep-mode = <1>;
+                       };
+
+                       rmi4-f12@12 {
+                               reg = <0x12>;
+                               syna,sensor-type = <1>;
+                       };
+               };
+       };
+
        i2c@f9925000 {
                status = "ok";
                pinctrl-names = "default";