lin
2025-03-21 36aaa54056c4f4e150f6ee0636610d9a68470a08
fix(touchscreen) fixed the problem of gt9xx touch abnormality

Signed-off-by: lin <lin@kickpi.com>
7 files modified
35 ■■■■■ changed files
android/device/softwinner/ceres-c3/dtbo.img patch | view | raw | blame | history
longan/device/config/chips/a133/configs/c3/dtbo/board1.dtbo patch | view | raw | blame | history
longan/device/config/chips/a133/configs/c3/dtbo/board1.dts 9 ●●●●● patch | view | raw | blame | history
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi 4 ●●●● patch | view | raw | blame | history
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi 4 ●●●● patch | view | raw | blame | history
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi 8 ●●●● patch | view | raw | blame | history
longan/kernel/linux-4.9/drivers/input/touchscreen/gt9xx/gt9xx.c 10 ●●●● patch | view | raw | blame | history
android/device/softwinner/ceres-c3/dtbo.img
Binary files differ
longan/device/config/chips/a133/configs/c3/dtbo/board1.dtbo
Binary files differ
longan/device/config/chips/a133/configs/c3/dtbo/board1.dts
....@@ -19,12 +19,3 @@
1919 dtbo_type = <1>;
2020 };
2121 };
22
-&twi0 {
23
- ctp {
24
- ctp_screen_max_x = <1280>;
25
- ctp_screen_max_y = <800>;
26
- ctp_revert_x_flag = <0>;
27
- ctp_revert_y_flag = <1>;
28
- ctp_exchange_x_y_flag = <0>;
29
- };
30
-};
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-lvds-7-1024-600.dtsi
....@@ -206,8 +206,8 @@
206206 reg = <0x5D>;
207207 ctp_screen_max_x = <1024>;
208208 ctp_screen_max_y = <600>;
209
- ctp_revert_x_flag = <0x1>;
210
- ctp_revert_y_flag = <0x1>;
209
+ ctp_revert_x_flag = <0x0>;
210
+ ctp_revert_y_flag = <0x0>;
211211 ctp_exchange_x_y_flag = <0x0>;
212212 ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
213213 ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-10-800-1280.dtsi
....@@ -228,8 +228,8 @@
228228 reg = <0x5D>;
229229 ctp_screen_max_x = <800>;
230230 ctp_screen_max_y = <1280>;
231
- ctp_revert_x_flag = <0x1>;
232
- ctp_revert_y_flag = <0x1>;
231
+ ctp_revert_x_flag = <0x0>;
232
+ ctp_revert_y_flag = <0x0>;
233233 ctp_exchange_x_y_flag = <0x0>;
234234 ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
235235 ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/lcd-mipi-8-800-1280.dtsi
....@@ -226,10 +226,10 @@
226226 ctp_twi_id = <0x0>;
227227 ctp_name = "gt9xx";
228228 reg = <0x5D>;
229
- ctp_screen_max_x = <800>;
230
- ctp_screen_max_y = <1280>;
231
- ctp_revert_x_flag = <0x1>;
232
- ctp_revert_y_flag = <0x1>;
229
+ ctp_screen_max_x = <0x320>;
230
+ ctp_screen_max_y = <0x500>;
231
+ ctp_revert_x_flag = <0x0>;
232
+ ctp_revert_y_flag = <0x0>;
233233 ctp_exchange_x_y_flag = <0x0>;
234234 ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
235235 ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
longan/kernel/linux-4.9/drivers/input/touchscreen/gt9xx/gt9xx.c
....@@ -1583,11 +1583,11 @@
15831583 return ret;
15841584 }
15851585 #else
1586
- //ret = of_property_read_u32(np, "ctp_screen_max_x", &screen_max_x);
1587
- //of_property_read_u32(np, "ctp_screen_max_y", &screen_max_y);
1588
- //of_property_read_u32(np, "ctp_revert_x_flag", &revert_x_flag);
1589
- //of_property_read_u32(np, "ctp_revert_y_flag", &revert_y_flag);
1590
- //of_property_read_u32(np, "ctp_exchange_x_y_flag", &exchange_x_y_flag);
1586
+ ret = of_property_read_u32(np, "ctp_screen_max_x", &screen_max_x);
1587
+ of_property_read_u32(np, "ctp_screen_max_y", &screen_max_y);
1588
+ of_property_read_u32(np, "ctp_revert_x_flag", &revert_x_flag);
1589
+ of_property_read_u32(np, "ctp_revert_y_flag", &revert_y_flag);
1590
+ of_property_read_u32(np, "ctp_exchange_x_y_flag", &exchange_x_y_flag);
15911591 #endif
15921592 sunxi_gpio_to_name(CTP_IRQ_NUMBER,irq_pin_name);
15931593 pr_err("gt %s, line:%d irq_pin_name = %s \n",__FUNCTION__, __LINE__, irq_pin_name);