AnsweredAssumed Answered

tsc2007 working strangely

Question asked by David Luberger on Sep 21, 2018
Latest reply on Sep 25, 2018 by igorpadykov

I'm using a tsc2007 touchscreen controller, and if i set status="disabled" in my device tree, i can see it with i2cdetect (shows up as address 49), however, if i enable the driver to load during boot, the kernel first hangs until i tap the touchscreen, then the OS loads, but during that time i get lots of errors that show "tsc2007 1-0049: i2c io error: -11" over and over. eventually the OS comes up but the touchscreen doesn't respond to my touches.  I was able to get it to work on the imx6ull eval board (though it was really jumpy and sensitive).  I found other posts on this site and a recommendation I saw was to copy an existing device tree.  Here's the relevant info from my device tree:

 

&i2c2 {
  clock_frequency = <100000>;
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_i2c2>;
  status = "okay";


  touchscreen: tsc2007@49 {
    compatible = "ti,tsc2007";
    reg = <0x49>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_tsc2007>;
    interrupt-parent = <&gpio1>;
    interrupts = <0x0 0x8>;
    gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
    ti,x-plate-ohms = <660>;
    linux,wakeup;
  };

};

&iomuxc {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_hog_1>;

  pinctrl_hog_1: hoggrp-1 {
    fsl,pins = <
          MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00 0x17059
    >;
  };

  pinctrl_i2c1: i2c1grp {
    fsl,pins = <
      MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
      MX6UL_PAD_UART4_RX_DATA__I2C1_SDA 0x4001b8b0
    >;
  };

  pinctrl_tsc2007: tsc2007grp {
    fsl,pins = <
      MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0x1b0b0
    >;
  };

};

 

Outcomes