How To make it Touch Screen work?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How To make it Touch Screen work?

3,261 Views
nandishguruling
Contributor III

Hello ALL,

I want to interface the touch screen(LCD Driver is ST7789s and Touch Driver is FT6306DMB) LCD Is UP properly now i want to interface this Touch Driver to  imx6q-Sabre AI board and Imx6dl- Mars board, For Mars Board  i added the below code to work for Touch screen in imx6q-marsboard.dts file, 

 // MY TOUCH PANEL CODE  

  &i2c3 {
    clock-frequency = <100000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c3>;
    status = "okay";        

      polytouch: edt-ft5x06@38 {
        compatible = "edt,edt-ft6306", "edt,edt-ft5x06";
        reg = <0x38>;
        pinctrl-names = "default";
        pinctrl-0 = <&edt_ft5x06_pins>;
        interrupt-parent = <&gpio2>;
        interrupts = <11 2>;
        reset-gpios = <&gpio7 13 1>;
      };  
  };

//MY TOUCH PANLE CODE END

             //MY TOUCH PANEL CODE

            edt_ft5x06_pins: edt-ft5x06grp {
            fsl,pins = <
                                MX6QDL_PAD_SD4_DAT3__GPIO2_IO11         0x1b0b0  //Interrupt
                                MX6QDL_PAD_GPIO_18__GPIO7_IO13            0x1b0b0 //Reset
                             >;
        };                
                   //MY TOUCH PANEL CODE END

but i am getting the bellow following boot log error and i enabled i2c driver in kernel also,

hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
 MY TOUCH PANEL PROBE FUNCTION GET CALLED

usb 1-1: new high-speed USB device number 2 using ci_hdrc
edt_ft5x06 2-0038: touchscreen probe failed
edt_ft5x06: probe of 2-0038 failed with error -5
check_alarm_past: alarm in the past
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized

can any one help me to solve this issue, you help would be very appreciation,

Best Regards.

nandish SG

Labels (4)
0 Kudos
6 Replies

1,884 Views
nandishguruling
Contributor III

Hi  Martin,

Congrats for resolved the issue. if further any other issue regarding this board please let me know,

Best Regards

Nandish S.G

0 Kudos

1,884 Views
nandishguruling
Contributor III

Hello Martin,

Please check the reset and interrupt pin values.

pinctrl_BuyDisp: BuyDispgrp {
fsl,pins = <
MX6QDL_PAD_SD2_CMD__GPIO1_IO11 0x80000000 // Touch Reset   in my case it is 0x1b0b1
MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30 0x80000000 // Touch Interrupt in my case it is 0x1b0b1
>;
};

polytouch: edt-ft5x06@70 {

compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
reg = <0x70>;       //please check the proper REG value
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_BuyDisp>;
interrupt-parent = <&gpio5>;
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;  // <30  IRQ_TYPE_EDGE_FALLING>
reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; //<&gpio1 11 IRQ_TYPE_NONE> or IRQ_TYPE_LEVEL_HIGH
status = "okay";
};

in  ****.dts file add the " i2cX"( X is your 2 or 3 ), for you below one,

&i2c3 {
            status = "okay";
           };

for more info setting the value please refer the imx6DQRM.pdf  file from NXP,

i.MX6DL|i.MX 6DualLite Processors|3D Graphics|NXP ,

if once you done please let me know,

Best Regards

Nandish S.G

0 Kudos

1,884 Views
martinkeppler
Contributor I

Hi Nandish,

I solved my problem.

There was another device that uses the same pin as my touch: MX6QDL_PAD_SD2_CMD__GPIO1_IO11

Anfter disabling ac97link touch was working.

Thanks for your fast reply.

Many greetings and a nice weekend,

Martin

0 Kudos

1,884 Views
nandishguruling
Contributor III

Hi igor

Thank you for suggestion, i am tried what you suggested  in above link and little bit change i done in the code but i am getting the same error, please see the below modified code,


  &i2c3 {
    clock-frequency = <100000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c3>;
    status = "okay";
        

      polytouch: edt-ft5x06@38 {
        compatible = "edt,edt-ft5206", "edt,edt-ft5x06";
                //compatible = "ft5x06,ft5x06-touch";
        reg = <0x38>;
        pinctrl-names = "default";
        pinctrl-0 = <&edt_ft5x06_pins>;
        interrupt-parent = <&gpio2>;
        interrupts-extended = <11 2>;
        //reset-gpios = <&gpio7 13 1>;
                wakeup-gpios = <&gpio7 13 0>;
                linux,wakeup;
    };  
        
    };

OUTPUT :

                   edt_ft5x06 2-0038: touchscreen probe failed
                   edt_ft5x06: probe of 2-0038 failed with error -5
                    check_alarm_past: alarm in the past

Second Change in code is;

 polytouch: edt-ft5x06@38 {
        //compatible = "edt,edt-ft5206", "edt,edt-ft5x06";
                compatible = "ft5x06,ft5x06-touch";
        reg = <0x38>;
        pinctrl-names = "default";
        pinctrl-0 = <&edt_ft5x06_pins>;
        interrupt-parent = <&gpio2>;
        interrupts = <11 2>;
        //reset-gpios = <&gpio7 13 1>;
                wakeup-gpios = <&gpio7 13 0>;

              linux,wakeup;
    };

OUTPUT:

mousedev: PS/2 mouse device common for all mice
ft5x06-ts 2-0038: reset fffffffe
ft5x06-ts 2-0038: Could not detect touch screen -19.
check_alarm_past: alarm in the past

             

Please Guide me where i am wrong in this case,

Thanks in advance,

Best Regards

Nandish SG

0 Kudos

1,884 Views
martinkeppler
Contributor I

Hi andish gurulingappan,

could you solute your problem?

I got the same error messages

edt_ft5x06 2-0070: touchscreen probe failed
edt_ft5x06: probe of 2-0070 failed with error -5

My pinctrl:

pinctrl_BuyDisp: BuyDispgrp {
fsl,pins = <
MX6QDL_PAD_SD2_CMD__GPIO1_IO11 0x80000000 // Touch Reset
MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30 0x80000000 // Touch Interrupt
>;
};

my i2c3:

&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

codec_sgtl5000: sgtl5000@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&clks IMX6QDL_CLK_CKO>;
VDDA-supply = <&reg_2p5v_sgtl5000>;
VDDIO-supply = <&reg_3p3v_sgtl5000>;
status = "disabled";
};

st1232-ts@55 {
compatible = "sitronix,st1232";
reg = <0x55>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_st1232>;
interrupt-parent = <&gpio4>;
interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio1 11 GPIO_ACTIVE_LOW>;
status = "disabled";
};

polytouch: edt-ft5x06@70 {

compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
reg = <0x70>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_BuyDisp>;
interrupt-parent = <&gpio5>;
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
status = "okay";
};

};

I would be so happy for any hints.

0 Kudos

1,884 Views
igorpadykov
NXP Employee
NXP Employee

Hi nandish

for ft5x06 bringup one can look at BD resources:

https://boundarydevices.com/tag/touch-screen/
https://community.nxp.com/thread/430812

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos