Author Topic: NHD-3.5-320240MF-ATXL#-CTP-1 Ft5x06 Linux device tree  (Read 2421 times)

rajarajan.r

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
NHD-3.5-320240MF-ATXL#-CTP-1 Ft5x06 Linux device tree
« on: November 11, 2015, 05:47:14 AM »
Hi ,

I have issue with ft5x06 interrupt pin mapping and i have trouble with linking ft5x06.ko with device tree file.

I bought NHD-3.5-320240MF-ATXL#-CTP-1 and beaglebone black REVC.
I have connected ft5x06 touch screen controller signals with beaglebone i2c1 pins (P9.18-i2c1_sda, P9.17-i2c1_scl ). Connected interrupt pin of ft5x06 to beaglbone P9.25. Connected wakeup pin to P9.21.

I am using beaglebone black. Linux version 3.8.13-bone70 (root@a5-imx6q-wandboard-2gb) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Fri Jan 23 02:15:42 UTC 2015.

Above pins are not mapped with any other functionality, so i created device tree file to map the pins for touch controller.
I have added device tree file for touch controller, please check it. (NOTE: I have already developed device tree file for LCD separately and i can see LCD working properly. I have problem with touch inputs !

Code: [Select]
/dts-v1/;

/plugin/;
/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        part-number = "BB-BONE-TS";
        version = "00A0";

        exclusive-use =
                /* the pin header uses */
                "P9.18",        /* i2c1_sda */
                "P9.17",        /* i2c1_scl */
                "P9.25",         /*interrupt, def state mcasp0_ahclkx , change to input pin gpio3_21*/
                //"P9.21",         /*wake up from host am33  to slave ft5x ,  i didnt mapped time being, because i am controlling externally using gpio export function */
                /* the hardware ip uses */
                "i2c1";

        fragment@0 {
                target = <&am33xx_pinmux>;
__overlay__
   {
        bb_i2c1_pins: pinmux_bb_i2c1_pins
       {
pinctrl-single,pins = <
0x158 0x72      /* i2c1_sda*/
  0x15c 0x72      /* i2c1_scl */
>;
       } ;

      edt_ft5x06_pins:pinmux_edt_ft5x06_pins
      {
       pinctrl-single,pins =<
       0x1AC 0x37 /* P9.25 = interrupt pin, mode7 as gpio, enable input, enable input pullup*/
       //0x154 0x17 /* P9.21 = wake up pin, control to slave from host: pullup,mode7 gpio0_3 */
       >;
      };
  };
};


        fragment@1 {
                target = <&i2c1>;       /* i2c1 is numbered correctly */
                __overlay__
     {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_i2c1_pins>;
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;


edt-ft5x06@38
{
status =  "okay";
compatible = "edt,edt-ft5306","edt,edt-ft5x06";
reg = <0x38>;
pinctrl-names="default";
pinctrl-0=<&edt_ft5x06_pins>;
interrupt-parent = <&gpio3>;
interrupts = <21 0>;

            //  wake-gpios = <&gpio0 3 0>; //3rd para:0 - active hig, 1-active low
touchscreen-size-x = <320>;
touchscreen-size-y = <240>;
};

     };
  };
};


I have created dtbo file and  echoed device tree file to beaglebone bone_capemgr.9/slots, after this i can see the dtbo file added inside slots.
Then i have checked the pinmux ,

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
registered pin groups:
group: pinmux_userled_pins
pin 21 (44e10854)
pin 22 (44e10858)
pin 23 (44e1085c)
pin 24 (44e10860)

group: pinmux_rstctl_pins
pin 20 (44e10850)

group: pinmux_i2c0_pins
pin 98 (44e10988)
pin 99 (44e1098c)

group: pinmux_i2c2_pins
pin 94 (44e10978)
pin 95 (44e1097c)

group: pinmux_mmc1_pins
pin 88 (44e10960)

group: pinmux_emmc2_pins
pin 32 (44e10880)
pin 33 (44e10884)
pin 0 (44e10800)
pin 1 (44e10804)
pin 2 (44e10808)
pin 3 (44e1080c)
pin 4 (44e10810)
pin 5 (44e10814)
pin 6 (44e10818)
pin 7 (44e1081c)

group: pinmux_userled_pins
pin 21 (44e10854)
pin 22 (44e10858)
pin 23 (44e1085c)
pin 24 (44e10860)

group: pinmux_bone_lcd3_cape_keys_00A0_pins
pin 16 (44e10840)
pin 17 (44e10844)
pin 105 (44e109a4)
pin 30 (44e10878)
pin 89 (44e10964)

group: pinmux_bone_lcd3_cape_lcd_pins
pin 40 (44e108a0)
pin 41 (44e108a4)
pin 42 (44e108a8)
pin 43 (44e108ac)
pin 44 (44e108b0)
pin 45 (44e108b4)
pin 46 (44e108b8)
pin 47 (44e108bc)
pin 48 (44e108c0)
pin 49 (44e108c4)
pin 50 (44e108c8)
pin 51 (44e108cc)
pin 52 (44e108d0)
pin 53 (44e108d4)
pin 54 (44e108d8)
pin 55 (44e108dc)
pin 56 (44e108e0)
pin 57 (44e108e4)
pin 58 (44e108e8)
pin 59 (44e108ec)

group: pinmux_bb_i2c1_pins
pin 86 (44e10958)
pin 87 (44e1095c)

> I can see i2c1 pins are mapped, but interrupt pin is not present. I checked proc/interrupts also my ft5x06 interrupt not mapped there

What will be issue ?
Note till this time , edt-ft5x06.ko file not listed in kernel module file. So i thought edt-ft5x06 probe function will map interrupts and pin init. then i installed .ko file using insmod ( tried by modprobe also). After this i can see edt-ft5x06.ko module name added inside "$cat /proc/modules"

But still my ft5x06  interrupt pins are not mapped in pinmux and interrupt is not listed in proc/interrupt , ft5x is not listed as device inside /dev?

Is my device tree file is correct ?
How to verify ft5x06.ko linked properly with kernel, because i cant see ft5x as input device inside /dev .

Please help me to solve this issue



Code: [Select]

UART

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: NHD-3.5-320240MF-ATXL#-CTP-1 Ft5x06 Linux device tree
« Reply #1 on: July 05, 2016, 01:21:43 PM »
I know this is old but I'm having the same problem. Since you made a device tree file, does it work?
I have this driver: edt-ft5x06.ko available on my debian-shipped beaglebone black and would like to manually load it, then connect it to your .dts device tree somehow to make touch work.
Is this possible?

 

NHD‐4.3‐480272EF‐ATXL#‐CTP | FAN5333 | BBB | Nothing on the Display

Started by Alias_AliasBoard TFTs

Replies: 2
Views: 3406
Last post November 20, 2017, 08:40:38 PM
by tolikkk
NHD-5.0-800480TF-ATXL#-T and NHD-5.0-800480TF-20 Controller Board No Touch?

Started by dfanslerBoard TFTs

Replies: 5
Views: 889
Last post May 26, 2017, 11:10:57 AM
by Saurabh_B
NHD-5.0-800480TF-ATXL#-CTP why don't typical timing values work?

Started by jkelleherBoard TFTs

Replies: 2
Views: 2699
Last post August 31, 2015, 05:08:45 AM
by jmag999
NHD-5.0-800480TF-ATXL#-CTP electrical noise interfering with touch

Started by Les.GrantBoard TFTs

Replies: 3
Views: 2229
Last post July 07, 2016, 02:56:01 PM
by Paul_B
y-axis of image is offset : SSD1963 for NHD-5.0-800480TF-ATXL#-CTP -

Started by davidbBoard TFTs

Replies: 2
Views: 1047
Last post September 01, 2016, 02:09:43 AM
by davidb