arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 4 Jul 2022 10:13:21 +0000 (12:13 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Thu, 7 Jul 2022 14:41:20 +0000 (16:41 +0200)
This platform carries a HID compatible I2C touchscreen on the i2c4 bus,
but it may be at a different address, depending on the board model.
Add the node for a touchscreen at 0x10, but enable it only in the
final board dts.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-12-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi

index 7ca344ccc22558595c948e52f93ce3e4c30e4104..3348ba69ff6cf63abb62a68c33982472385ca050 100644 (file)
@@ -9,3 +9,7 @@
        model = "Acer Tomato (rev1) board";
        compatible = "google,tomato-rev1", "google,tomato", "mediatek,mt8195";
 };
+
+&ts_10 {
+       status = "okay";
+};
index eb80f23273aa7382a389ab28f4f77c9c2b435503..4669e9d917f8cc8271691ba8a3bc54099b023737 100644 (file)
@@ -29,3 +29,7 @@
                bias-pull-down;
        };
 };
+
+&ts_10 {
+       status = "okay";
+};
index f9cdda07da88f8595f4b41510298bab377a1a376..5021edd02f7c1a6952e7b87d6609518b441417c9 100644 (file)
@@ -30,3 +30,7 @@
                bias-pull-down;
        };
 };
+
+&ts_10 {
+       status = "okay";
+};
index 2c8b760d0da11275e3e567eeb7f237d937c8ac85..fcc600674339a4b969885791d219bf531f34394b 100644 (file)
        clock-frequency = <400000>;
        pinctrl-names = "default";
        pinctrl-0 = <&i2c4_pins>;
+
+       ts_10: touchscreen@10 {
+               compatible = "hid-over-i2c";
+               reg = <0x10>;
+               hid-descr-addr = <0x0001>;
+               interrupts-extended = <&pio 92 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_pins>;
+               post-power-on-delay-ms = <10>;
+               vdd-supply = <&pp3300_s3>;
+               status = "disabled";
+       };
 };
 
 &i2c5 {
                        bias-pull-up;
                };
        };
+
+       touchscreen_pins: touchscreen-default-pins {
+               pins-int-n {
+                       pinmux = <PINMUX_GPIO92__FUNC_GPIO92>;
+                       input-enable;
+                       bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+               };
+               pins-rst {
+                       pinmux = <PINMUX_GPIO56__FUNC_GPIO56>;
+                       output-high;
+               };
+               pins-report-sw {
+                       pinmux = <PINMUX_GPIO57__FUNC_GPIO57>;
+                       output-low;
+               };
+       };
 };
 
 &pmic {