Add a node for the ESWIN EPH8621 touchscreen connected via SPI and the
pinctrl state for the two GPIOs connected to the touchscreen.

Signed-off-by: Luca Weiss <[email protected]>
---
 arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts | 29 +++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts 
b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
index 4b7ae87270ac..498fde3d3d18 100644
--- a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
+++ b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts
@@ -983,7 +983,27 @@ &sdhc_2 {
 };
 
 &spi0 {
-       /* Eswin EPH8621 touchscreen @ 0 */
+       status = "okay";
+
+       touchscreen@0 {
+               compatible = "eswin,eph8621";
+               reg = <0>;
+
+               avdd-supply = <&vreg_l22b>;
+               vddio-supply = <&vreg_l9b>;
+
+               interrupts-extended = <&tlmm 19 IRQ_TYPE_LEVEL_LOW>;
+               reset-gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
+
+               pinctrl-0 = <&touchscreen_default>;
+               pinctrl-names = "default";
+
+               spi-max-frequency = <2000000>;
+
+               touchscreen-size-x = <1116>;
+               touchscreen-size-y = <2484>;
+               touchscreen-inverted-x;
+       };
 };
 
 &tlmm {
@@ -991,6 +1011,13 @@ &tlmm {
                               <13 1>, /* NC */
                               <63 2>; /* WLAN UART */
 
+       touchscreen_default: touchscreen-default-state {
+               pins = "gpio19", "gpio20";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+       };
+
        sdc2_card_det_n: sdc2-card-det-state {
                pins = "gpio65";
                function = "gpio";

-- 
2.55.0


Reply via email to