From 6f4f7a76e03a46fefb056a4b18197f1d9e8aa939 Mon Sep 17 00:00:00 2001
From: lin <lin@kickpi.com>
Date: Tue, 11 Mar 2025 12:42:23 +0000
Subject: [PATCH] feat(mipi): touch node binding screen device tree

---
 longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts                   |   23 +----------
 longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi  |   22 +++++++++++
 longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi |   22 +++++++++++
 longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi  |   22 ++++++++++
 4 files changed, 67 insertions(+), 22 deletions(-)

diff --git a/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
index bf96176..b3f8d69 100755
--- a/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
+++ b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
@@ -288,25 +288,6 @@
 			pinctrl-0 = <&twi0_pins_a>;
 			pinctrl-1 = <&twi0_pins_b>;
 			status = "okay";
-                        ctp {
-                                compatible = "gt9xx_ts";
-				ctp_used = <1>;
-                                device_type = "ctp";
-				status = "okay";
-                                ctp_twi_id = <0x0>;
-				ctp_name = "gt9xx";
-                                reg = <0x5D>;
-                                ctp_screen_max_x = <1024>;
-                                ctp_screen_max_y = <600>;
-                                ctp_revert_x_flag = <0x1>;
-                                ctp_revert_y_flag = <0x1>;
-                                ctp_exchange_x_y_flag = <0x0>;
-                                ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
-                                ctp_wakeup =   <&pio PE 4 1 0xffffffff 0xffffffff 1>;
-                                ctp_power_ldo = <3300>;
-                                ctp_power_ldo_vol = <3300>;
-                                ctp_power = <3300>;
-                        };
 		};
 
 		spi0: spi@05010000 {
@@ -1465,7 +1446,7 @@
 
 
 //#include "lcd-lvds-21-1920-1080.dtsi"
-//#include "lcd-lvds-7-1024-600.dtsi"
+#include "lcd-lvds-7-1024-600.dtsi"
 //#include "lcd-mipi-10-800-1280.dtsi"
 //#include "lcd-mipi-8-800-1280.dtsi"
-#include "lcd-mipi-5-720-1280.dtsi"
+//#include "lcd-mipi-5-720-1280.dtsi"
diff --git a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi
index ff2dccd..9ea766e 100644
--- a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi
+++ b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi
@@ -194,3 +194,25 @@
                         pinctrl-1 = <&lvds0_pins_b>;
                 };
 };
+
+&twi0 {
+        ctp {
+                compatible = "gt9xx_ts";
+        	ctp_used = <1>;
+                device_type = "ctp";
+        	status = "okay";
+                ctp_twi_id = <0x0>;
+        	ctp_name = "gt9xx";
+                reg = <0x5D>;
+                ctp_screen_max_x = <1024>;
+                ctp_screen_max_y = <600>;
+                ctp_revert_x_flag = <0x1>;
+                ctp_revert_y_flag = <0x1>;
+                ctp_exchange_x_y_flag = <0x0>;
+                ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
+                ctp_wakeup =   <&pio PE 4 1 0xffffffff 0xffffffff 1>;
+                ctp_power_ldo = <3300>;
+                ctp_power_ldo_vol = <3300>;
+                ctp_power = <3300>;
+        };
+};
\ No newline at end of file
diff --git a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi
index e0fdaba..379a9cd 100644
--- a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi
+++ b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi
@@ -216,3 +216,25 @@
                         //pinctrl-1 = <&lvds0_pins_b>;
                 };
 	};
+
+&twi0 {
+        ctp {
+                compatible = "gt9xx_ts";
+        	ctp_used = <1>;
+                device_type = "ctp";
+        	status = "okay";
+                ctp_twi_id = <0x0>;
+        	ctp_name = "gt9xx";
+                reg = <0x5D>;
+                ctp_screen_max_x = <800>;
+                ctp_screen_max_y = <1280>;
+                ctp_revert_x_flag = <0x1>;
+                ctp_revert_y_flag = <0x1>;
+                ctp_exchange_x_y_flag = <0x0>;
+                ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
+                ctp_wakeup =   <&pio PE 4 1 0xffffffff 0xffffffff 1>;
+                ctp_power_ldo = <3300>;
+                ctp_power_ldo_vol = <3300>;
+                ctp_power = <3300>;
+        };
+};
\ No newline at end of file
diff --git a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi
index 5ba178d..4f48679 100644
--- a/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi
+++ b/longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi
@@ -217,4 +217,24 @@
                 };
 	};
 
-
+&twi0 {
+        ctp {
+                compatible = "gt9xx_ts";
+        	ctp_used = <1>;
+                device_type = "ctp";
+        	status = "okay";
+                ctp_twi_id = <0x0>;
+        	ctp_name = "gt9xx";
+                reg = <0x5D>;
+                ctp_screen_max_x = <800>;
+                ctp_screen_max_y = <1280>;
+                ctp_revert_x_flag = <0x1>;
+                ctp_revert_y_flag = <0x1>;
+                ctp_exchange_x_y_flag = <0x0>;
+                ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
+                ctp_wakeup =   <&pio PE 4 1 0xffffffff 0xffffffff 1>;
+                ctp_power_ldo = <3300>;
+                ctp_power_ldo_vol = <3300>;
+                ctp_power = <3300>;
+        };
+};

--
Gitblit v1.6.2