Hello all,
I am trying to bring up the touch for New haven display which is using FT5406 touch controller . For that purpose I used the drivers given in the Boundary device kernel f5x06_ts.c.Please see the attached driver file.The slave address given for this controller is 0x70.My device tree Node is as follow:
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
polytouch: edt-ft5x06@70 {
//compatible = "edt,edt-ft5406","edt,edt-ft5x06";
compatible = "ft5x06,ft5x06-touch";
//compatible = "ft5x06-ts","ft5x06,ft5x06-touch";
reg = <0x70>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06>;
interrupt-parent = <&gpio4>;
interrupts = <17 2 IRQ_TYPE_EDGE_FALLING>;
//reset-gpios = <&gpio7 12 1>;
wake-gpios = <&gpio3 21 0>;
linux,wakeup;
};
};
pinctrl_edt_ft5x06:edt-ft5x06grp {
fsl,pins = <
MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x1b0b0 // For Touchscreen Wake up
MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x1b0b0 //For Touch Interrupt
>;
};
After that when I am booting kernel sometimes I am fetting kernel panic
[<802b00a4>] (gpiod_to_irq) from [<8042c0d4>] (ts_probe+0x16c/0x390)
[<8042c0d4>] (ts_probe) from [<8033568c>] (driver_probe_device+0x110/0x24c)
[<8033568c>] (driver_probe_device) from [<80335898>] (__driver_attach+0x8c/0x90)
[<80335898>] (__driver_attach) from [<80333be4>] (bus_for_each_dev+0x6c/0xa0)
[<80333be4>] (bus_for_each_dev) from [<80334e44>] (bus_add_driver+0x148/0x1f0)
[<80334e44>] (bus_add_driver) from [<80335e94>] (driver_register+0x78/0xf8)
[<80335e94>] (driver_register) from [<804377f8>] (i2c_register_driver+0x30/0xb8)
[<804377f8>] (i2c_register_driver) from [<80d466ac>] (ts_init+0x14/0x40)
[<80d466ac>] (ts_init) from [<8000897c>] (do_one_initcall+0xf8/0x154)
[<8000897c>] (do_one_initcall) from [<80d16c54>] (kernel_init_freeable+0x138/0x1d8)
[<80d16c54>] (kernel_init_freeable) from [<806d54bc>] (kernel_init+0x8/0xe8)
[<806d54bc>] (kernel_init) from [<8000e5f8>] (ret_from_fork+0x14/0x3c)
Code: 15d3004c e12fff1e e2503000 0a00000e (e5930000)
---[ end trace a2c9ca4310e0cf39 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
and some times I am getting :
Ft5x06:Could not detect touch screen -1
If any one has brought up this controller before then please help me.
已解决! 转到解答。
Hi,
This means that your wakeup and reset gpio are not set properly. Indeed you called it wake-gpios instead wakeup-gpios.
linux-imx6/ft5x06_ts.c at boundary-imx_3.14.52_1.1.0_ga · boundarydevices/linux-imx6 · GitHub
Please make sure to look at our device tree and start from there:
Regards,
Gary
Hi Hrushi Nale
I am also facing the same problem ( ft5x06-ts 2-0038: reset fffffffe & ft5x06-ts 2-0038: Could not detect the touch sreen-19)
can you please share your working code, it would be help to solve my problem,
Thanks & Regards
Nandish Sg
Hi I've got a similar problem.
recieving
edt_ft5x06 2-0070: touchscreen probe failed
edt_ft5x06: probe of 2-0070 failed with error -5
at boot up.
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 = <®_2p5v_sgtl5000>;
VDDIO-supply = <®_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.
hey please find https://community.nxp.com/thread/305927l
link..download the all zip file..don't forget to add header file(.h) in that to your kernal files...it is working fine but i2c read error i'm getting bec i'm not find i2c address in the log(i2cdetct) command
Hi,
Your interrupt is not properly set in the touch node. It is set to be GPIO4 17 whereas your pin muxing suggest it should be GPIO4 20.
Also, in the "interrupts" property you have "17 2 IRQ_TYPE_EDGE_FALLING" whereas it should just be "17 IRQ_TYPE_EDGE_FALLING" (2 and IRQ_TYPE_EDGE_FALLING being the same).
Regards,
Gary
Hi Gary,
I tried with whatever modifications you suggested but still its not working.Below are the kernel logs related to FT5x06
ft5x06-ts 2-0038: reset fffffffe
ts_probe: wakeup fffffffe
The modified DTSI file nod is as below:
polytouch: edt-ft5x06@38 {
//compatible = "edt,edt-ft5406","edt,edt-ft5x06";
compatible = "ft5x06,ft5x06-touch";
//compatible = "ft5x06-ts","ft5x06,ft5x06-touch";
reg = <0x38>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06>;
interrupt-parent = <&gpio4>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
//reset-gpios = <&gpio7 12 1>;
wake-gpios = <&gpio3 21 0>;
linux,wakeup;
};
Now I am unable to understand where its failing.Please Guide Me.
Thanks & Regards,
Hrushi
Hi,
The suggestions I made were based on the pin muxing you copied in your first post. Since it is not working, I suspect the wrong GPIOs are being used. Please make sure that you use the proper one by checking the schematics.
Regards,
Gary
Hi Gary,
I checked the schematics and the GPIO mentioned are correct according to the schematics.
Also after your modifications its probing successfully and its detecting the touchscreen in : detect_ft5x06(client); function.
Also when I checked the value for these GPIO's thr' sysfs its giving very high values instead of 0 and 1. And its not allowing me to change that values.
ft5x06-ts 2-0038: reset fffffffe
ts_probe: wakeup fffffffe
In this logs I am unable to understand what are these values?
Hi,
This means that your wakeup and reset gpio are not set properly. Indeed you called it wake-gpios instead wakeup-gpios.
linux-imx6/ft5x06_ts.c at boundary-imx_3.14.52_1.1.0_ga · boundarydevices/linux-imx6 · GitHub
Please make sure to look at our device tree and start from there:
Regards,
Gary
Hello Gary,
I am facing issues with touch.When I am loading the driver as module after kernel boots up then the touch is working fine.
But when I am loading driver as buitl-in from kernel then the touch is not working (once you touch the screen the cursor will go to one of the corner and will not move from there).
As I wanted the touch should work instantly after kernel login so for that I insert the modules from rc.local but still I got the same issue as above .
How Can I solve this issue?
Thanks & Regards,
Hrushi
Hi Gary ,
Thanks for you replies.
Is it necessary to have both the wake-up and reset GPIO 's available in schematics.
In our schematics the RESET GPIO is not there so I tried gving the wakeup GPIO as reset and commented the driver code related to wakeup GPIO .After that when I inserted the module ft5x06_ts.ko I am getting below logs:
root@imx6qdlsolo:/home# insmod ft5x06_ts.ko
ft5x06-ts 2-0038: reset 80e1b720
ft5x06 resolution is 800x480
input: ft5x06 as /devices/virtual/input/input1
I checked the waveforms also ,when I am touching to the screen then I am getting waveforms on Interrupt pin but the toucscreen is not working.
when I run the ts_calibrate its giving below output:
root@imx6qdlsolo:/home# ts_calibrate
xres = 800, yres = 480
tslib: Selected device is not a touchscreen (must support ABS and KEY event types)
Took 6 samples...
Top left : X = 1009843976 Y = 5
Took 6 samples...
Top right : X = 1009843976 Y = 5
Took 6 samples...
Bot right : X = 1009843976 Y = 5
Took 6 samples...
Bot left : X = 1009843976 Y = 5
Took 6 samples...
Center : X = 1009843976 Y = 5
-69.999992 0.000000 94.000000
-41.999996 0.000000 56.399998
Calibration constants: -4587519 0 6160384 -2752511 0 3696230 65536
The commented code is as below:
/*ts->wakeup_gpio = devm_gpiod_get_index(dev, "wakeup", 0);
pr_info("%s: wakeup %p\n", __func__, ts->wakeup_gpio);
if (IS_ERR(ts->wakeup_gpio)) {
err = -ENODEV;
goto exit1;
}
printk(KERN_INFO "%s: %s touchscreen irq=%i, wakeup_irq=%i\n", __func__,
client_name, ts->irq, gpiod_to_irq(ts->wakeup_gpio));*/
Kindly guide me regarding this issue.
Thanks & Regards,
Hrushi
Hi Hrushi
one can try its latest kernel, many BD boards use FT5406, please check below
GitHub - boundarydevices/linux-imx6 at boundary-imx_4.1.15_1.0.0_ga
http://boundarydevices.com/tweaking-froyo-for-nitrogen-part-1-touch-support/
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Igo,
i'm using Focaltech touch IC FT5316 for my customed board (based on Sabresd_6q), but it's not working, can you help me!
My board use: Linux kernel 4.1.15, Android 6.0.
i use driver ft5x06_ts.c from your link above: GitHub - boundarydevices/linux-imx6 at boundary-imx_4.1.15_1.0.0_ga
My device tree file (.dtsi) as follow:
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
ft5x06@38 {
compatible = "ft5x06,ft5x06-touch";
reg = <0x38>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3_ft5x06_int>;
interrupt-parent = <&gpio6>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
wakeup-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <1024>;
touchscreen-size-y = <600>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
linux,wakeup;
};
};
pinctrl_i2c3: i2c3grp {
fsl,pins = <
MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
>;
};
pinctrl_i2c3_ft5x06_int: edt-ft5x06_intgrp {
fsl,pins = <
MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x1b0b0 /* Interrupt pin*/
MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x1b0b0 /* Wakeup pin */
>;
};
When kernel running, it shows:
ft5x06-ts 2-0038: reset fffffffe
ft5x06-ts 2-0038: wakeup d41b7ccc, retry=0
ft5x06-ts 2-0038: touchscreen irq=219, wakeup_irq=50
ft5x06 resolution is 1024x600
input: ft5x06 as /devices/virtual/input/input0
i2c /dev entries driver
i check pin in cat /sys/kernel/debug/pinctrl/20e0000.iomuxc/pingroups:
group: edt-ft5x06_intgrp
pin 188 (MX6Q_PAD_NANDF_CS3)
pin 207 (MX6Q_PAD_SD1_DAT1)
i check cat /proc/bus/input/devices:
I: Bus=0018 Vendor=0000 Product=0038 Version=0000
N: Name="ft5x06"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=2608000 1000003
I touch on screen, it not respond anything! I don't know where is problem and what to check?
Can you give me any suggestion?
Thank you!
Regards,
Hi igor,
I tried with the drivers you suggested but still its not working.Below are the kernel logs related to FT5x06
ft5x06-ts 2-0038: reset fffffffe
ts_probe: wakeup fffffffe
The modified DTSI file nod is as below:
polytouch: edt-ft5x06@38 {
//compatible = "edt,edt-ft5406","edt,edt-ft5x06";
compatible = "ft5x06,ft5x06-touch";
//compatible = "ft5x06-ts","ft5x06,ft5x06-touch";
reg = <0x38>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06>;
interrupt-parent = <&gpio4>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
//reset-gpios = <&gpio7 12 1>;
wake-gpios = <&gpio3 21 0>;
linux,wakeup;
};
Now I am unable to understand where its failing.Please Guide Me.
Thanks & Regards,
Hrushi