Announcement

Collapse
No announcement yet.

How to fix a A10 AllWinner ft5X touch screen!

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to fix a A10 AllWinner ft5X touch screen!

    OK so maybe your like me and screwed around and flashed some ROM with livesuite and now even flashing the stock ROM does not fix your touch screen? Well thats what happened to me!

    I have a MOMO8 Bird and I flashed a CWM release and after that my touch screen either did not work or it was WAY out of calibration! Flashing ALL of the available stock Momo8 bird ROMs did not fix it period! I figured it was trashed!

    So 2 days of searching and research and I learned something about AllWinner A10 and the ft5x touch screen chip. The chip has a EEPROM in it than can also be flashed or ERASED by accident with a ROM. For me none of the Momo8 ROMs would reflash this EEPROM. If the Stock ROM for yout tablet does not support flashing this ft5x EEPROM, your screwed!

    Well until now

    This tutorial will explain what I did and how it may fix your touch screen if you hosed it.

    __________________________________

    First you have to find a ft5x_ts.ko module that supports writing to the EEPROM for the screen chip. My MOMO8 ft5x_ts.ko did not. This was why I could never fix it!
    You will know if your KO module supports that by seeing this line in the dmesg under
    =============ft5x_ts_init=============
    ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0

    If you do not see that line, your KO module does not support flashing the touch driver EEPROM. I happen to find a KO module from the Momo9 ROM that worked. Some tips as your searching for a KO module. It has to be for your SDK level of your kernel. e.g. ICS, Gingerbread, etc. I also found a KO module from a CM10 build that worked as well.


    OK so once you have found a KO that works, then we have to do more work!
    We have to mod script.bin (sysconfig1.fex) in bootfs. You actually have to get the linux tools bin2fex and fex2bin. You will take script.bin from bootfs and use fex2bin to convert it to editable text.
    Then you will go to the CTP section under [ctp_para]. There you will see something like this:
    ctp_int_port = port:PH21<6><default><default><default>
    ctp_wakeup = port:PB13<1><default><default><1>
    ctp_io_port = port:PH21<0><default><default><default>
    We need to tell the script we want to program the EEPROM and we will ADD these 2 lines.
    ctp_upgrade_used = 1
    ctp_firmware_name = "ft5x_newfw"
    Please note, the firmware name you use here must be used in the ADB commands below! You can use whatever name you like but it needs to be whats is used below.
    Now use fex2bin and make a new script.bin

    OK getting closer.... Now we need to actually FIND the required EEPROM firmware. This was a MAJOR pain in the butt. Only site I found it on was Chinese web sites. But I found a RAR file containing many different firmwares. I am not even sure this contains ALL of them but it had the one I needed.
    I have uploaded the firmware files to FreakTab here:
    http://www.freak-tab.de/finless/ft5x_firmware.zip

    Now you just have to figure out which firmware is for your chip. The files have a resolution in the name so that helps. However I had to do this several times to find my correct version.


    OK now that you have a KO file that supports programming the EEPROM, you have a firmware file, and you have a modified script.bin, we can go to town with ADB and get the screen fixed!
    For this example we have these files:
    ft5x_ts.ko
    script.bin
    and the firmware file which for me was: ft5406-sc3052-1024X768.bin

    In Windows fire up a command shell or you can script this as a .bat file. We will do the following:

    adb remount
    adb shell cd /
    adb shell mount -o remount,rw -t ext4 /dev/root /
    adb shell mkdir bootfs
    adb shell mount -t vfat /dev/block/nanda /bootfs

    OK now we need to puch the files

    adb push "script.bin" /bootfs/script.bin
    adb push "script.bin" /bootfs/script0.bin
    adb push "ft5x_ts.ko" /vendor/modules/ft5x_ts.ko
    adb shell chmod 644 /vendor/modules/ft5x_ts.ko
    adb push "ft5406-sc3052-1024X768.bin" /vendor/firmware/ft5x_newfw
    adb shell chmod 644 /vendor/firmware/ft5x_newfw
    adb reboot



    OK tablet should reboot and your screen should be fixed! You should make a new script.bin and remve these lines:
    ctp_upgrade_used = 1
    ctp_firmware_name = "ft5x_newfw"
    Then push once again the new script.bin like above.

    However, if your screen now works BACKWARDS which it did for me, then once again you need to make a new script.bin. Go in and make these changes under [ctp_para]
    If your script originally had this:
    ctp_revert_x_flag = 0
    ctp_revert_y_flag = 0
    Then change the 0 to a 1 or visa versa. This should fix the backwards screen.


    So..... 2 days of trying to figure this all out and success. I hope this information can help someone.

    Bob
    Last edited by Finless; 06-13-2014, 09:06.
    "Pzebacz im, bo nie wiedzą, co czynią"
    "Прости им, они не ведают, что творят"
    "Perdona loro perché non sanno quello che fanno"
    "Vergib ihnen, denn sie wissen nicht, was sie tun"
    "Vergeef hen want ze weten niet wat ze doen"
    "Pardonne-leur car ils ne savent pas ce qu'ils font"
    "Perdónalos porque no saben que lo que hacen"
    "Oprosti im, jer ne znaju što čine"
    "Forgive them as they know not what they do"






  • #2
    AllWinner A10 with Goodix Touchpad not working

    Originally posted by Finless View Post
    OK so maybe your like me and screwed around and flashed some ROM with livesuite and now even flashing the stock ROM does not fix your touch screen? Well thats what happened to me!

    I have a MOMO8 Bird and I flashed a CWM release and after that my touch screen either did not work or it was WAY out of calibration! Flashing ALL of the available stock Momo8 bird ROMs did not fix it period! I figured it was trashed!

    So 2 days of searching and research and I learned something about AllWinner A10 and the ft5x touch screen chip. The chip has a EEPROM in it than can also be flashed or ERASED by accident with a ROM. For me none of the Momo8 ROMs would reflash this EEPROM. If the Stock ROM for yout tablet does not support flashing this ft5x EEPROM, your screwed!

    Well until now

    This tutorial will explain what I did and how it may fix your touch screen if you hosed it.

    __________________________________

    First you have to find a ft5x_ts.ko module that supports writing to the EEPROM for the screen chip. My MOMO8 ft5x_ts.ko did not. This was why I could never fix it!
    You will know if your KO module supports that by seeing this line in the dmesg under
    =============ft5x_ts_init=============
    ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0

    If you do not see that line, your KO module does not support flashing the touch driver EEPROM. I happen to find a KO module from the Momo9 ROM that worked. Some tips as your searching for a KO module. It has to be for your SDK level of your kernel. e.g. ICS, Gingerbread, etc. I also found a KO module from a CM10 build that worked as well.


    OK so once you have found a KO that works, then we have to do more work!
    We have to mod script.bin (sysconfig1.fex) in bootfs. You actually have to get the linux tools bin2fex and fex2bin. You will take script.bin from bootfs and use fex2bin to convert it to editable text.
    Then you will go to the CTP section under [ctp_para]. There you will see something like this:
    ctp_int_port = port:PH21<6><default><default><default>
    ctp_wakeup = port:PB13<1><default><default><1>
    ctp_io_port = port:PH21<0><default><default><default>
    We need to tell the script we want to program the EEPROM and we will ADD these 2 lines.
    ctp_upgrade_used = 1
    ctp_firmware_name = "ft5x_newfw"
    Please note, the firmware name you use here must be used in the ADB commands below! You can use whatever name you like but it needs to be whats is used below.
    Now use fex2bin and make a new script.bin

    OK getting closer.... Now we need to actually FIND the required EEPROM firmware. This was a MAJOR pain in the butt. Only site I found it on was Chinese web sites. But I found a RAR file containing many different firmwares. I am not even sure this contains ALL of them but it had the one I needed.
    I have uploaded the firmware files to FreakTab here:
    http://video.freaktab.com/?subpath=f...x_firmware.zip

    Now you just have to figure out which firmware is for your chip. The files have a resolution in the name so that helps. However I had to do this several times to find my correct version.


    OK now that you have a KO file that supports programming the EEPROM, you have a firmware file, and you have a modified script.bin, we can go to town with ADB and get the screen fixed!
    For this example we have these files:
    ft5x_ts.ko
    script.bin
    and the firmware file which for me was: ft5406-sc3052-1024X768.bin

    In Windows fire up a command shell or you can script this as a .bat file. We will do the following:

    adb remount
    adb shell cd /
    adb shell mount -o remount,rw -t ext4 /dev/root /
    adb shell mkdir bootfs
    adb shell mount -t vfat /dev/block/nanda /bootfs

    OK now we need to puch the files

    adb push "script.bin" /bootfs/script.bin
    adb push "script.bin" /bootfs/script0.bin
    adb push "ft5x_ts.ko" /vendor/modules/ft5x_ts.ko
    adb shell chmod 644 /vendor/modules/ft5x_ts.ko
    adb push "ft5406-sc3052-1024X768.bin" /vendor/firmware/ft5x_newfw
    adb shell chmod 644 /vendor/firmware/ft5x_newfw
    adb reboot



    OK tablet should reboot and your screen should be fixed! You should make a new script.bin and remve these lines:
    ctp_upgrade_used = 1
    ctp_firmware_name = "ft5x_newfw"
    Then push once again the new script.bin like above.

    However, if your screen now works BACKWARDS which it did for me, then once again you need to make a new script.bin. Go in and make these changes under [ctp_para]
    If your script originally had this:
    ctp_revert_x_flag = 0
    ctp_revert_y_flag = 0
    Then change the 0 to a 1 or visa versa. This should fix the backwards screen.


    So..... 2 days of trying to figure this all out and success. I hope this information can help someone.

    Bob
    I have a similar problem to what you were facing but mine is an AllWinner A10 with Goodix Touchpad. Lsmod with original firmware shows gt80x. Can you please help me with this. Thank you.

    Comment


    • #3
      So are you sure it's gt80x? My tablet also has that KO module loaded but obviously it is not needed. DO you also have the ft5x_ts.ko loaded? I noticed many script.bin setups load more than one screen module even though they are not used. Mine wass the same way. But in fact even though 2 other screen drivers were being inmod, only one was really being used. They way I found out for sure was to just delete the different KO modules until I found the one that made the screens stop workign all together. Thats how I knew I had a ft5 screen driver chip and not a goodix.

      Now in my studying, I not sure I saw that the goodix chip works the same way. e.g. it has a EEprom that can be flashed. As you see above the ft5 does. Are you sure the goodix chip works this way?
      If so your going to need to find the firmware for that chip like I did for the ft5! Without them there is nothing you can do.

      Bob
      "Pzebacz im, bo nie wiedzą, co czynią"
      "Прости им, они не ведают, что творят"
      "Perdona loro perché non sanno quello che fanno"
      "Vergib ihnen, denn sie wissen nicht, was sie tun"
      "Vergeef hen want ze weten niet wat ze doen"
      "Pardonne-leur car ils ne savent pas ce qu'ils font"
      "Perdónalos porque no saben que lo que hacen"
      "Oprosti im, jer ne znaju što čine"
      "Forgive them as they know not what they do"





      Comment


      • #4
        Originally posted by Finless View Post
        So are you sure it's gt80x? My tablet also has that KO module loaded but obviously it is not needed. DO you also have the ft5x_ts.ko loaded? I noticed many script.bin setups load more than one screen module even though they are not used. Mine wass the same way. But in fact even though 2 other screen drivers were being inmod, only one was really being used. They way I found out for sure was to just delete the different KO modules until I found the one that made the screens stop workign all together. Thats how I knew I had a ft5 screen driver chip and not a goodix.

        Now in my studying, I not sure I saw that the goodix chip works the same way. e.g. it has a EEprom that can be flashed. As you see above the ft5 does. Are you sure the goodix chip works this way?
        If so your going to need to find the firmware for that chip like I did for the ft5! Without them there is nothing you can do.

        Bob
        Extremely sorry for the late reply and thank you for hepling me out. Haven't been at home nor had the time to look at it.
        Anyways I had opened up the device to check which Touchpad IC is being used for the tablet. It seems that it has a Goodix logo with GT811 written on the chip. I am pretty sure that the issue which you were facing is pretty much similar to what I am and just for sake of troubleshooting it I wanted to try out the steps which you have done but I cannot find the firmware for Goodix. Could you please help me with it ? As for the ft5x_ts.ko module it is there within the file system but its not loaded at boot up.

        Comment


        • #5
          I am not going to be able to help without the firmware. I would think your not the first to have this happen so it has to be around some where?

          Bob
          "Pzebacz im, bo nie wiedzą, co czynią"
          "Прости им, они не ведают, что творят"
          "Perdona loro perché non sanno quello che fanno"
          "Vergib ihnen, denn sie wissen nicht, was sie tun"
          "Vergeef hen want ze weten niet wat ze doen"
          "Pardonne-leur car ils ne savent pas ce qu'ils font"
          "Perdónalos porque no saben que lo que hacen"
          "Oprosti im, jer ne znaju što čine"
          "Forgive them as they know not what they do"





          Comment


          • #6
            thank you but i need how to convert .fex to .bin, .bin to .fex

            Comment


            • #7
              Originally posted by yutt1996 View Post
              thank you but i need how to convert .fex to .bin, .bin to .fex
              https://github.com/amery/sunxi-tools


              Bob
              "Pzebacz im, bo nie wiedzą, co czynią"
              "Прости им, они не ведают, что творят"
              "Perdona loro perché non sanno quello che fanno"
              "Vergib ihnen, denn sie wissen nicht, was sie tun"
              "Vergeef hen want ze weten niet wat ze doen"
              "Pardonne-leur car ils ne savent pas ce qu'ils font"
              "Perdónalos porque no saben que lo que hacen"
              "Oprosti im, jer ne znaju što čine"
              "Forgive them as they know not what they do"





              Comment


              • #8
                Originally posted by Finless View Post
                video step by step please

                Comment


                • #9
                  I have an Allwinner A13 tablet with ft5x. While trying to install CM9 using the PMID 702c compatibility zip, my touchscreen has gone bonkers. The longer axis is ok but the shorther axis appears to be mirrored about centre.

                  I tried a couple of roms for a suitable ft5x_ts.ko's but no joy. So I am stuck on the very first step. Any help will be highly appreciated.

                  Comment


                  • #10
                    Originally posted by Finless View Post
                    OK so maybe your like me and screwed around and flashed some ROM with livesuite and now even flashing the stock ROM does not fix your touch screen? Well thats what happened to me!
                    .
                    .
                    .
                    So..... 2 days of trying to figure this all out and success. I hope this information can help someone.

                    Bob
                    Hi Finless. First off thanks for sharing your awesome work. I am trying to recover an A13 with ft5x with this procedure. I couldn't find suitable ft5x_ts.ko for my factory kernel 3.0.8+

                    So I flashed CM9 with PMID702c compatibility zip and used a momo9 ko which was compatible. was getting errors with script.exe when compiling fex to bin. I just removed the errornous parts as they were after the ctp_para. That should not be a problem I think as the firmware flash should be completed before that part is executed. The downside is, the tab is unusable afterwards and I have to flash factory img just to check if the flash worked.

                    Now the dmesg out put i get in ft5x_ts init part is :

                    Code:
                    <6>[    4.790000] ===========================ft5x_ts_init=====================
                    
                    <6>[    4.800000] ctp_fetch_sysconfig_para. 
                    
                    
                    <6>[    4.800000] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe 
                    
                    
                    <6>[    4.820000] ctp_fetch_sysconfig_para: ctp_twi_id is 1. 
                    
                    
                    <6>[    4.820000] ctp_fetch_sysconfig_para: screen_max_x = 800. 
                    
                    
                    <6>[    4.830000] ctp_fetch_sysconfig_para: screen_max_y = 480. 
                    
                    
                    <6>[    4.830000] ctp_fetch_sysconfig_para: revert_x_flag = 0. 
                    
                    
                    <6>[    4.840000] ctp_fetch_sysconfig_para: revert_y_flag = 0. 
                    
                    
                    <6>[    4.840000] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0. 
                    
                    
                    <6>[    4.850000] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe 
                    
                    
                    <4>[    4.860000] script parser fetch err. 
                    
                    
                    <4>[    4.860000] ctp_init_platform_resource: tp_reset request gpio fail!
                    
                    
                    <6>[    4.870000] ctp_wakeup. 
                    
                    
                    <6>[    4.920000] ctp_detect: Detected chip ft5x_ts at adapter 1, address 0x38
                    
                    
                    <6>[    4.930000] ====ft5x_ts_probe begin=====.  
                    
                    
                    <6>[    4.930000] fts_ctpm_fw_upgrade_with_i_file. 
                    
                    
                    <6>[    5.050000] =========buf[0] = 0x14 
                    
                    
                    <6>[    5.050000] =========buf[1] = 0x1 
                    
                    
                    <6>[    5.050000] a == 20,  b== 20 
                    
                    
                    <6>[    5.060000] input: ft5x_ts as /devices/virtual/input/input1
                    
                    
                    <6>[    5.070000] ==register_early_suspend =
                    
                    
                    <6>[    5.070000] CONFIG_FT5X0X_MULTITOUCH is defined. 
                    
                    
                    <6>[    5.080000] ctp_set_irq_mode: config gpio to int mode. 
                    
                    
                    <6>[    5.080000] ctp_set_irq_mode, 224: gpio_int_info, port = 7, port_num = 11. 
                    
                    
                    <6>[    5.090000]  INTERRUPT CONFIG
                    
                    
                    <6>[    5.090000] ==ft5x_ts_probe over =
                    Does that seem right? Cuz my touchscreen is still not working

                    Comment


                    • #11
                      Well if the screen did not get fixed then it did not write the Eprom in the screen. So I think the key is finding a KO module that works with A13. The stuff I wrote above is for A10. So find a ROM or something that dmesg shows a KO module that has this line in dmesg:
                      ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0

                      If you never see this line, then it will never write to the screen Eprom.

                      Even if the ROM does not boot to the OS but ADB comes up and you can see this dmesg, it should write the Eprom.

                      Also key point in fixing the screen is getting the correct resolution screen firmware. I see your dmesg above says 800 x 480. If thats not your correct screen size then you still will have a broken screen.

                      Bob
                      "Pzebacz im, bo nie wiedzą, co czynią"
                      "Прости им, они не ведают, что творят"
                      "Perdona loro perché non sanno quello che fanno"
                      "Vergib ihnen, denn sie wissen nicht, was sie tun"
                      "Vergeef hen want ze weten niet wat ze doen"
                      "Pardonne-leur car ils ne savent pas ce qu'ils font"
                      "Perdónalos porque no saben que lo que hacen"
                      "Oprosti im, jer ne znaju što čine"
                      "Forgive them as they know not what they do"





                      Comment


                      • #12
                        Originally posted by Finless View Post
                        Well if the screen did not get fixed then it did not write the Eprom in the screen. So I think the key is finding a KO module that works with A13. The stuff I wrote above is for A10. So find a ROM or something that dmesg shows a KO module that has this line in dmesg:
                        ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0

                        If you never see this line, then it will never write to the screen Eprom.

                        Even if the ROM does not boot to the OS but ADB comes up and you can see this dmesg, it should write the Eprom.

                        Also key point in fixing the screen is getting the correct resolution screen firmware. I see your dmesg above says 800 x 480. If thats not your correct screen size then you still will have a broken screen.

                        Bob
                        Thanks for the prompt reply Bob.

                        Yes the rom didn't boot but got to the point that I got ADB and hence dmesg i posted earlier.

                        Yes the screen resolution is 800x480. I found a package online with two firmware for this resolution and I have tried both.

                        So I think its down to rom hunt now. I have not seen the line you have mentioned in any rom so far.

                        I have two queries though:

                        1. The CM9 rom or the compatibility zip I used somehow flashed / damaged the ft5x firmware. Does that not mean that the ft5x_ts.ko in that rom should be capable of writing another firmware too? But I don't see the line you have mentioned in cpt_para when i dmesg with that rom running.

                        2. The ft5x_ts.ko I used was indeed from an A10. But it did work atleast to the extent that the touchscreen worked to whatever limit it was working with factory rom after wrong ft5x flash. As far as I know A13 is just a stripped down A10. If is shows that line in A10, should it not in A13 too?

                        Comment


                        • #13
                          did you take note of dmesg output just after successful ft5x firmware flash?

                          Comment


                          • #14
                            No it does not mean it can flash the screen eprom. What a bad ROM does is ERASE the eprom thus the screen is default. This is what breaks most peoples screen. Erasure of the screen eprom. So you must find a ROM or a KO module that gives that line in dmesg.

                            Bob
                            "Pzebacz im, bo nie wiedzą, co czynią"
                            "Прости им, они не ведают, что творят"
                            "Perdona loro perché non sanno quello che fanno"
                            "Vergib ihnen, denn sie wissen nicht, was sie tun"
                            "Vergeef hen want ze weten niet wat ze doen"
                            "Pardonne-leur car ils ne savent pas ce qu'ils font"
                            "Perdónalos porque no saben que lo que hacen"
                            "Oprosti im, jer ne znaju što čine"
                            "Forgive them as they know not what they do"





                            Comment


                            • #15
                              Originally posted by Finless View Post
                              No it does not mean it can flash the screen eprom. What a bad ROM does is ERASE the eprom thus the screen is default. This is what breaks most peoples screen. Erasure of the screen eprom. So you must find a ROM or a KO module that gives that line in dmesg.

                              Bob
                              Ok.

                              I have been trying all day. Flashed all ROMs i could find for A13. Tried all ko i could lay my hand on. NOTHING!!

                              I just can't get that golden line.

                              Comment

                              Working...
                              X