arm64: dts: qcom: msm8916-samsung-j5-common: Add touchscreen
authorLin, Meng-Bo <linmengbo0689@protonmail.com>
Sat, 15 Jul 2023 21:41:01 +0000 (21:41 +0000)
committerBjorn Andersson <andersson@kernel.org>
Sat, 22 Jul 2023 04:00:04 +0000 (21:00 -0700)
J5 and J5X use an Imagis IST3038C touchscreen that is connected to
blsp_i2c5. Add it to the device tree.

MFD driver for SM5703 is unavailable at the moment, which is required
to power up the touchscreen on J5, so it's disabled on J5 for now.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Link: https://lore.kernel.org/r/20230715214046.14902-1-linmengbo0689@protonmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts
arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts

index f4fd5d72b28bcec028c115a1cb7651efc1c4b4d8..cb0e4a7faf91b442796cc1dc6ca4d3d41a942ac6 100644 (file)
        };
 };
 
+&blsp_i2c5 {
+       status = "okay";
+
+       touchscreen: touchscreen@50 {
+               compatible = "imagis,ist3038c";
+               reg = <0x50>;
+
+               interrupt-parent = <&tlmm>;
+               interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+               touchscreen-size-x = <720>;
+               touchscreen-size-y = <1280>;
+
+               vddio-supply = <&pm8916_l6>;
+
+               pinctrl-0 = <&tsp_int_default>;
+               pinctrl-names = "default";
+       };
+};
+
 &blsp_uart2 {
        status = "okay";
 };
        sdc2_cd_default: sdc2-cd-default-state {
                pins = "gpio38";
                function = "gpio";
+
+               drive-strength = <2>;
+               bias-disable;
+       };
+
+       tsp_int_default: tsp-int-default-state {
+               pins = "gpio13";
+               function = "gpio";
+
                drive-strength = <2>;
                bias-disable;
        };
index 0a32d33e9778bba432b1b3953fa236015569eb63..3e1ff5b4d2d78066a54e3aaec827cbad3bf71b10 100644 (file)
        chassis-type = "handset";
 };
 
+&blsp_i2c5 {
+       status = "disabled";
+};
+
+&touchscreen {
+       /* FIXME: Missing sm5703-mfd driver to power up vdd-supply */
+};
+
 &usb_hs_phy {
        qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>;
 };
index 7e1326cc13c5a3bb85afd5eb3e8d8da11fd31951..b2fe109723d843d595850a190e4c6c0d56788f12 100644 (file)
@@ -8,12 +8,38 @@
        model = "Samsung Galaxy J5 (2016)";
        compatible = "samsung,j5x", "qcom,msm8916";
        chassis-type = "handset";
+
+       reg_vdd_tsp_a: regulator-vdd-tsp-a {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_tsp_a";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+
+               gpio = <&tlmm 108 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&tsp_ldo_en_default>;
+               pinctrl-names = "default";
+       };
 };
 
 &muic {
        interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
 };
 
+&touchscreen {
+       vdd-supply = <&reg_vdd_tsp_a>;
+};
+
+&tlmm {
+       tsp_ldo_en_default: tsp-ldo-en-default-state {
+               pins = "gpio108";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+       };
+};
+
 &muic_int_default {
        pins = "gpio121";
 };