Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    mq-dual , mq-r T113 tina gt911适配

    MR Series
    4
    6
    3543
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mangogeek
      mangogeek LV 8 last edited by

      硬件连接

      首先,查原理图,GT911触摸挂在TWI2上(PE12,PE13),CTP中断PB3,CTP复位控制:PB2

      0f51088f-bcb6-47bd-9582-8d7493e93a69-image.png

      DTS

      然后修改对应dts的twi2部分(Tina-Linux/device/config/chips/t113/configs/mq_r/linux-5.4/board.dts),修改好如下:
      ctp.png

      配置内核驱动

      make kernel_menuconfig

      Device Drivers --->
          Input device support --->
              [*] Touchscreens --->
                    [M] gt9xxnew touchscreen driver
      

      配置文件系统部分

      检查启动模块加载控制:Tina-Linux/target/allwinner/t113-mq_r/busybox-init-base-files/etc/init.d/rc.modules
      文件内容如下,这里我们重点将gt9xxnew_ts.ko前的注释去掉,同时根据实际mangopi板子选择需要加载的wifi驱动模块。

      #!/bin/sh
      echo "------run rc.modules file-----"
      #export boot_partition=$(fw_printenv -n boot_partition 2>/dev/null)
      # if [ x${boot_partition} == xboot ];then 
      	/sbin/insmod /lib/modules/5.4.61/usb-storage.ko
      	/sbin/insmod /lib/modules/5.4.61/sunxi_gpadc.ko
      	/sbin/insmod /lib/modules/5.4.61/gt9xxnew_ts.ko
      	echo 0x07090160 0x083F10F7 > /sys/class/sunxi_dump/write
      #	/sbin/insmod /lib/modules/5.4.61/8723ds.ko
      	/sbin/insmod /lib/modules/5.4.61/8189fs.ko
      	sleep 4
      	wpa_supplicant  -Dnl80211 -iwlan0 -c /etc/wifi/wpa_supplicant.conf -B
      # fi
      

      然后编译打包:make;pack

      上电信息

      [    6.076660] sunxi_gpadc_init,2151, success
      [    6.081641] sunxi_gpadc_setup: get channel scan data failed
      [    6.088244] input: sunxi-gpadc0 as /devices/virtual/input/input1
      [    6.100435] get ctp_power is fail, -22
      [    6.104646] get ctp_power_ldo_vol is fail, -22
      [    6.109692] sunxi_ctp_startup: ctp_power_io is invalid.
      [    6.115586] get ctp_gesture_wakeup fail, no gesture wakeup
      [    6.121812] gt9xxnew_ts 2-0014: 2-0014 supply ctp not found, using dummy regulator
      [    6.329053] input: gt9xxnew_ts as /devices/virtual/input/input2
      

      此时得到gt911的设备节点是event2:
      root@TinaLinux:/# ls /dev/input/event*
      /dev/input/event0 /dev/input/event1 /dev/input/event2

      修改自带lvgl8中的input配置部分,实现lvgl触摸功能

      因为我们的tina-linux默认勾选了lvgl8,所以直接修改文件461行即可:/home/mango/1/Tina-Linux/package/gui/littlevgl-8/lv_examples/src/lv_drv_conf.h
      4751d887-1d58-4433-a149-a7b4f8f012d6-image.png

      重新打包编译:m;p

      启动进入shell后,运行lv demo

      root@TinaLinux:/# lv_examples 0
      wh=800x480, vwh=800x480, bpp=32, rotated=0
      
      mangogeek 1 Reply Last reply Reply Quote Share 3
      • mangogeek
        mangogeek LV 8 @mangogeek last edited by

        固件T113+8189F:2356.img

        F 1 Reply Last reply Reply Quote Share 0
        • mangogeek
          mangogeek LV 8 last edited by

          1 Reply Last reply Reply Quote Share 0
          • F
            fanfan LV 6 @mangogeek last edited by

            @mangogeek 谢谢大佬

            1 Reply Last reply Reply Quote Share 0
            • W
              wuzhujian LV 6 last edited by

              我试了一下,电阻屏的效果也不差,很流畅.

              1 Reply Last reply Reply Quote Share 0
              • Q
                Qiao15839037953 LV 3 last edited by

                你好,我使用的MQ-R在添加触摸的时候touchscreens里面没有触摸设备列表,请问怎么解决啊?214fc3da-e7f0-40c6-8124-fe536a7040b9-image.png

                1 Reply Last reply Reply Quote Share 0
                • 1 / 1
                • First post
                  Last post

                Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                行为准则 | 用户协议 | 隐私权政策