arm64: dts: qcom: sc7280: Add touchscreen to villager
authorDouglas Anderson <dianders@chromium.org>
Tue, 24 May 2022 20:48:49 +0000 (13:48 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 26 Jun 2022 02:43:02 +0000 (21:43 -0500)
This adds the touchscreen to the sc7280-herobrine-villager device
tree. Note that the touchscreen on villager actually uses the reset
line and thus we use the more specific "elan,ekth6915" compatible
which allows us to specify the reset.

The fact that villager's touchscreen uses the reset line can be
contrasted against the touchscreen for CRD/herobrine-r1. On those
boards, even though the touchscreen goes to the display, it's not
hooked up to anything there.

In order to keep the line parked on herobrine/CRD, we'll move the
pullup from the qcard.dtsi file to the specific boards. This allows us
to disable the pullup in the villager device tree since the pin is an
output.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220524134840.1.I80072b8815ac08c12af8f379a33cc2d83693dc51@changeid
arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts
arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi

index d92575e8ab03e166dfd3222ff4042e6f51f0afce..e9ca6c5d24a168617a58a9ef228c009805f4d84c 100644 (file)
@@ -135,6 +135,17 @@ ap_ts_pen_1v8: &i2c13 {
        status = "okay";
 };
 
+/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */
+
+/*
+ * This pin goes to the display panel but then doesn't actually do anything
+ * on the panel itself (it doesn't connect to the touchscreen controller).
+ * We'll set a pullup here just to park the line.
+ */
+&ts_rst_conn {
+       bias-pull-up;
+};
+
 /* PINCTRL - BOARD-SPECIFIC */
 
 /*
index b69ca09d9bfb25ca4104a1a519df403e845e6ad7..c1647a85a371a4ff389861598907f578a70d2ab7 100644 (file)
@@ -128,6 +128,17 @@ ts_i2c: &i2c13 {
        status = "okay";
 };
 
+/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */
+
+/*
+ * This pin goes to the display panel but then doesn't actually do anything
+ * on the panel itself (it doesn't connect to the touchscreen controller).
+ * We'll set a pullup here just to park the line.
+ */
+&ts_rst_conn {
+       bias-pull-up;
+};
+
 /* PINCTRL - BOARD-SPECIFIC */
 
 /*
index d3d6ffad4eff221a8bcc4260dfd9c42fd3644871..950b69448109a799398949c7b062b8bbf8fe7d51 100644 (file)
@@ -46,6 +46,25 @@ ap_tp_i2c: &i2c0 {
        };
 };
 
+ts_i2c: &i2c13 {
+       status = "okay";
+       clock-frequency = <400000>;
+
+       ap_ts: touchscreen@10 {
+               compatible = "elan,ekth6915";
+               reg = <0x10>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_int_conn>, <&ts_rst_conn>;
+
+               interrupt-parent = <&tlmm>;
+               interrupts = <55 IRQ_TYPE_LEVEL_LOW>;
+
+               reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
+
+               vcc33-supply = <&ts_avdd>;
+       };
+};
+
 &ap_sar_sensor_i2c {
        status = "okay";
 };
@@ -81,6 +100,12 @@ ap_tp_i2c: &i2c0 {
        status = "okay";
 };
 
+/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */
+
+&ts_rst_conn {
+       bias-disable;
+};
+
 /* PINCTRL - BOARD-SPECIFIC */
 
 /*
index d59002d4492efe0c2d6c5dbb2330add8033c4a36..404936c6bf2043aa4cf4163675edee0f1b5c3d6e 100644 (file)
@@ -604,7 +604,6 @@ mos_bt_uart: &uart7 {
        ts_rst_conn: ts-rst-conn {
                pins = "gpio54";
                function = "gpio";
-               bias-pull-up;
                drive-strength = <2>;
        };
 };