Part Number: PROCESSOR-SDK-AM335X
Tool/software: Linux
Hello All,
We have designed custom board based on AM3354 processor where AM335x-evm and beagle bone used as reference design.We have interfaced FT5x06(FT5406 ) capacitive touchscreen over i2c bus.following changes done for bring up the touch screen driver.
processor Side Touch screen
I2C2_SDA <------------------------------> TOUCH_SDA
I2C2_SCL <------------------------------> TOUCH_SCL
GPIO3_18 ------------------------------> TOUCH_WAK
GPIO3_20 <------------------------------ TOUCH_INT
1. Modified device tree for touch screen & i2c related then build the "dtb" and loaded to the board
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
0x17c ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (D17) uart1_rtsn.I2C2_SCL */
0x178 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (D18) uart1_ctsn.I2C2_SDA */
>;
};
edt_ft5406_ts_pins: edt_ft5406_ts_pins {
pinctrl-single,pins = <
0x1a8 ( PIN_INPUT | MUX_MODE7 ) /* (D13) mcasp0_axr1.gpio3[20] */
0x1a0 ( PIN_OUTPUT | MUX_MODE7 ) /* (B12) mcasp0_aclkr.gpio3[18] */
>;
};
&i2c2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins>;
clock-frequency = <400000>;
edt-ft5406@38 {
status = "okay";
compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
pinctrl-names = "default";
pinctrl-0 = <&edt_ft5406_ts_pins>;
reg = <0x38>;
interrupt-parent = <&gpio3>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
/* reset-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>; */
wake-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
};
};
2. Added edt-FT5x06 driver as build-in and "zImage" loaded to the board.
But touch screen driver giving issue during probing and also i2c-2 devices address not detected.Following are the lof for touch screen
1. Following boot message are for the touch and i2c during booting
[ 2.029642] edt_ft5x06 2-0038: touchscreen probe failed
[ 2.034956] edt_ft5x06: probe of 2-0038 failed with error -121
[ 2.049657] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
2. dmesg printed following log:
[ 2.007054] edt_ft5x06 2-0038: GPIO lookup for consumer reset
[ 2.007080] edt_ft5x06 2-0038: using device tree for GPIO lookup
[ 2.007100] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
[ 2.007115] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
[ 2.007128] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
[ 2.007142] edt_ft5x06 2-0038: lookup for GPIO reset failed
[ 2.007155] edt_ft5x06 2-0038: GPIO lookup for consumer wake
[ 2.007166] edt_ft5x06 2-0038: using device tree for GPIO lookup
[ 2.007200] of_get_named_gpiod_flags: parsed 'wake-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]' - status (0)
[ 2.029642] edt_ft5x06 2-0038: touchscreen probe failed
[ 2.034956] edt_ft5x06: probe of 2-0038 failed with error -121
[ 2.049657] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
3. I2c address not detected by "i2cdetect" command
root@am335x-evm:~# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
4. "cat /proc/bus/input/devices" command not listing any touchscreen related device.
5. "cat /proc/interrupt" command did not shows incremented count for touch screen when touch on LCD panel.
Kindly suggest the possible reason and solution to the problem.
Thanks,
Anil