TinkerBoard2 Android11配置MIPI7LCD屏

运行时遇到的问题

1、<<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -6! Process reset.

[    0.993718] goodix_ts_probe() start
[    0.993760] Goodix-TS 8-005d: 8-005d supply tp not found, using dummy regulator
[    0.993842] Goodix-TS 8-005d: Linked as a consumer to regulator.0
[    1.126398] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -6! Process reset.
[    1.222314] <<-GTP-ERROR->> GTP i2c test failed time 1.
[    1.239727] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -6! Process reset.
[    1.318991] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    1.335653] <<-GTP-ERROR->> GTP i2c test failed time 2.
[    1.353059] <<-GTP-ERROR->> I2C Read: 0x8047, 1 bytes failed, errcode: -6! Process reset.
[    1.448981] <<-GTP-ERROR->> GTP i2c test failed time 3.

解决方法:确保reset-gpio没有被其他设备使用,或者reg改为0x14

+       goodix_ts@5d {
+               compatible = "goodix,gt9xx";
+               reg = <0x5d>;//也可以填0x14
+               touch-gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //中断IO
+               reset-gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //复位IO
+               max-x = <1024>;  //x方向解析度
+               max-y = <600>;   //y方向解析度
+               tp-size = <911>; //与源码中选择的配置相关
+               status = "okay";
+       };

2、pwm-backlight: probe of backlight failed with error -22

[    0.710269] rockchip-pinctrl pinctrl: pin gpio1-8 already requested by pinctrl; cannot claim for backlight
[    0.710288] rockchip-pinctrl pinctrl: pin-40 (backlight) status -22
[    0.710303] rockchip-pinctrl pinctrl: could not request pin 40 (gpio1-8) from group lvds_bl_en  on device rockchip-pinctrl
[    0.710315] pwm-backlight backlight: Error applying setting, reverse things back
[    0.710334] pwm-backlight: probe of backlight failed with error -22
解决方法:移除backlight的pinctrl调用
@@ -1448,15 +1461,46 @@
                post-pwm-on-delay-ms = <15>;//EDP T15,min 10ms, Backlight node:post-pwm-on-delay-ms = <15>;
                pwm-off-delay-ms = <15>;//EDP T16,min 10ms, Backlight node:pwm-off-delay-ms = <15>;
                disable_delay = <15>;//EDP T17,min 10
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_lvds_bl_en>;
 };

3、panel-simple-dsi: probe of ff960000.dsi.0 failed with error -22

[    0.747954] panel_simple_probe-
[    0.747968] panel_simple_dsi_probe-
[    0.748081] panel-simple-dsi: probe of ff960000.dsi.0 failed with error -22
[    0.748359] midgard ff9a0000.gpu: Linked as a consumer to regulator.11
[    0.748416] midgard ff9a0000.gpu: leakage=27
# 解决方法,新增display-timings
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-tinker-board-2.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-tinker-board-2.dtsi
index 331bb6db7973..db1c74b56e56 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-tinker-board-2.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-tinker-board-2.dtsi
@@ -1855,6 +1887,56 @@
                        };
                };

+               display-timings {
+                       native-mode = <&timing10>;
+                       timing10: timing10  {
+                               clock-frequency = <65000000>; //DCLK
+                               hactive = <1024>;             //hactive
+                               vactive = <600>;              //vactive
+                               hfront-porch = <160>;         //hfp
+                               hback-porch = <160>;          //hbp
+                               hsync-len = <10>;             //hsa
+                               vfront-porch = <12>;          //vfp
+                               vsync-len = <1>;              //vsa
+                               vback-porch = <23>;           //vbp
+                               hsync-active = <0>;           //hync
+                               vsync-active = <0>;           //vsync
+                               de-active = <1>;              //DEN
+                               pixelclk-active = <0>;        //dclk
+                       };

4、屏幕触摸不准确

[    0.989699] <<-GTP-INFO->> GTP driver installing...
[    0.989862] goodix_ts_probe() start
[    0.989888] <<-GTP-INFO->> GTP Driver Version: V2.2<2014/01/14>
[    0.989908] <<-GTP-INFO->> GTP I2C Address: 0x14
[    0.989971] Goodix-TS 8-0014: 8-0014 supply tp not found, using dummy regulator
[    0.990037] Goodix-TS 8-0014: Linked as a consumer to regulator.0
[    1.011463] goodix_ts_probe() cfg_file_num = 0
[    1.011530] <<-GTP-INFO->> Guitar reset
[    1.099001] <<-GTP-INFO->> IC Version: 911_1060
[    1.121213] <<-GTP-INFO->>   <gtp_init_panel>_1614
[    1.121233] <<-GTP-INFO->> X_MAX: 4096, Y_MAX: 4096, TRIGGER: 0x00


[   54.197447] #### goodix_ts_work_func() line:974 coor_data[0] input_x:3269 input_y:2704 input_w:11
[   54.197449] #### gtp_touch_down() line:424 gtp_touch_down abs_x_max=4096, abs_y_max=4096
[   54.197454] #### gtp_touch_down() line:427 gtp_touch_down x=3269, y=2704
[   54.197458] #### gtp_touch_down() line:428 gtp_touch_down (!bgt911 && !bgt970)=0
[   54.197461] #### gtp_touch_down() line:437 gtp_touch_down x=3269, y=2704
[   54.197465] #### gtp_touch_down() line:448 GTP_ICS_SLOT_REPORT:0
[   54.197474] #### gtp_touch_down() line:457 ID:0, X:3269, Y:2704, W:11
[   54.197478] <<-GTP-DEBUG->> [458]ID:0, X:3269, Y:2704, W:11

通过打印可以看到屏幕初始化没问题,但是X_MAX和Y_MAX没有从dtsi里面获取到,看代码发现获取参数的地方屏蔽了,如下

diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.c b/drivers/input/touchscreen/gt9xx/gt9xx.c
index db86c4ec94b3..89d3e0231adb 100644
--- a/drivers/input/touchscreen/gt9xx/gt9xx.c
+++ b/drivers/input/touchscreen/gt9xx/gt9xx.c
@@ -2684,12 +2682,12 @@ static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id
        dev_err(&client->dev, "no max-x defined\n");
        return -EINVAL;
     }
-    //ts->abs_x_max = val;
+    ts->abs_x_max = val;
     if (of_property_read_u32(np, "max-y", &val)) {
        dev_err(&client->dev, "no max-y defined\n");
        return -EINVAL;
     }
-    //ts->abs_y_max = val;
+    ts->abs_y_max = val;
     if (of_property_read_u32(np, "configfile-num", &val)) {
            ts->cfg_file_num = 0;
     } else {

触摸不准的话需要导入该屏的cfg配置文件

diff --git a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h
index c667948b165d..028c81d36175 100644
--- a/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h
+++ b/drivers/input/touchscreen/gt9xx/gt9xx_cfg.h
@@ -20,8 +20,8 @@

 /* CFG for GT911 */
 u8 gtp_dat_gt11[] = {
-       /* <1200, 1920>*/
-       #include "WGJ89006B_GT911_Config_20140625_085816_0X43.cfg"
+       /* <1024, 600>*/
+       #include "WGJ89006B_GT911_Config_20230908_085816_0X43.cfg"
 };

补丁下载地址:

0001-YYT-MIPI7LCD-tinker-2s-android11.zip资源-CSDN文库

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zoipuus

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值