This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: Getting I2C write error very intermittently with pixcir touchscreen sensor

Part Number: AM3358


Tool/software:

I finished upgrading of Linux kernel 3.12 to 5.10 version and custom application on AM335x based custom board.
As a part of my application's POST sequence, I am checking write and read same byte from connected i2c based pxcir touchscreen sensor.
While testing, I found that on few boards, application reboots due to failure in above POST step.
I am getting "ioctl failed: Connection timed out" error when I tried to write single byte on i2c bus.
[However this code works well in other duplicates of same custom board]

Since this error is occurring very intermittently, I can able to reproduce it only once / twice in approximately 30 power cycles

Also I observed that i2c error popup only when I get below message on console while booting kernel.

[ 38.017173][ T98] 8<--- cut here ---
[ 38.020980][ T98] Unhandled fault: imprecise external abort (0xc06) at 0xc22b9f54
[ 38.028677][ T98] pgd = f2f83db2
[ 38.032090][ T98] [c22b9f54] *pgd=8220041e(bad)
[ 38.36831][ T98] Internal error: : c06 [#1] ARM
[ 38.041558][ T98] Modules linked in: nf_log_ipv4 xt_limit xt_LOG xt_conntrack iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables sha256_generic libsha256 sha256_a4
[ 38.075620][ T98] CPU: 0 PID: 98 Comm: systemd-journal Tainted: G O 5.10.168psprr-g991c5ce91e #1
[ 38.085923][ T98] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 38.092764][ T98] PC is at __seccomp_filter+0x2c/0x6cc
[ 38.098113][ T98] LR is at syscall_trace_enter+0x88/0x13c
[ 38.103708][ T98] pc : [<c01c39c4>] lr : [<c010986c>] psr: 60000013
[ 38.110697][ T98] sp : c22b9ee0 ip : 10c5387d fp : 0003c52c
[ 38.116639][ T98] r10: 00800000 r9 : 00000000 r8 : c01002e4
[ 38.122582][ T98] r7 : 00000193 r6 : 0003c52c r5 : ffffe000 r4 : c22b9fb0
[ 38.129832][ T98] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000193
[ 38.137085][ T98] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 38.144948][ T98] Control: 10c5387d Table: 822ac019 DAC: 00000051
[ 38.151415][ T98] Process systemd-journal (pid: 98, stack limit = 0xa9f35bcb)
[ 38.158753][ T98] Stack: (0xc22b9ee0 to 0xc22ba000)
[ 38.163832][ T98] 9ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 38.172745][ T98] 9f00: 00000004 f9805506 c22b8000 c213cd00 c22b8000 f9805506 10c5387d c22b8000
[ 38.181657][ T98] 9f20: c22b9fb0 00000000 10c5387d 00000000 c22b8000 c0e0404c fffffe30 c010a6c4
[ 38.190571][ T98] 9f40: 00000100 c0e9b3b0 c22b8000 c0101390 00000025 f9805506 c1008200 c22b9fb0
[ 38.199484][ T98] 9f60: ffffe000 0003c52c 00000193 c01002e4 c22b8000 00800000 0003c52c c010986c
[ 38.208396][ T98] 9f80: be919f24 f9805506 b6273ab0 b6f04e44 00000001 be91a8c0 0003c52c 00000193
[ 38.217309][ T98] 9fa0: c01002e4 c010027c 00000001 be91a8c0 00000001 be91a8c0 b6fd5d00 00000000
[ 38.226223][ T98] 9fc0: 00000001 be91a8c0 0003c52c 00000193 000154e1 be91ad3c 00000000 0003c52c
[ 38.235136][ T98] 9fe0: 00000193 be91a8a0 b6d1239b b6cb1ae6 80000030 00000001 00000000 00000000
[ 38.244066][ T98] [<c01c39c4>] (__seccomp_filter) from [<c010986c>] (syscall_trace_enter+0x88/0x13c)
[ 38.253423][ T98] [<c010986c>] (syscall_trace_enter) from [<c010027c>] (__sys_trace+0xc/0x40)
[ 38.262156][ T98] Exception stack(0xc22b9fa8 to 0xc22b9ff0)
[ 38.267928][ T98] 9fa0: 00000001 be91a8c0 00000001 be91a8c0 b6fd5d00 00000000
[ 38.276841][ T98] 9fc0: 00000001 be91a8c0 0003c52c 00000193 000154e1 be91ad3c 00000000 0003c52c
[ 38.285751][ T98] 9fe0: 00000193 be91a8a0 b6d1239b b6cb1ae6
[ 38.291527][ T98] Code: e5922000 e58d2074 e3a02000 ee073f9a (e1510003)
[ 38.298349][ T98] ---[ end trace f5ead91bf57c8477 ]---
[ 38.305009][ T419] 8<--- cut here ---

Below is DTS portion related to this i2c device
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;

status = "okay";
clock-frequency = <100000>;

tps: tps@2d {
reg = <0x2d>;
};
pixcir_tangoc: pixcir_tangoc@5c {
reg = <0x5C>;
compatible = "pixcir,pixcir_tangoc";
pinctrl-names = "default";
pinctrl-0 = <&pixcir_ts_pins>;
interrupt-parent = <&gpio0>;
interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
//interrupt-gpio = <&gpio0 28 0>;
attb-gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
touchscreen-size-x = <1024>;
touchscreen-size-y = <600>;
status = "okay";
linux,multi-touch;
};
};

Dry soldering issue or any other h/w issue is not possible as same POST is working correctly on same board with old Linux 3.12 version.

Please suggest any possible way to resolve/debug this issue.

Thanks,

Prafull Barpute

  • Additional information:

    In my board, PMIC TPS65910A31A1RSLR is present on same i2c bus with address 0x002d, Is it problem because of PMIC at boot time

    With bind command I am getting below log

    echo -n "1-005c" > /sys/bus/i2c/drivers/pixcir_ts/bind
    [2025-06-30 11:49:31] [ 537.856890][ T57] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:49:31] [ 537.864825][ T924] pixcir_ts 1-005c: probe
    [2025-06-30 11:49:31] [ 537.869371][ T924] pixcir_ts 1-005c: GPIO lookup for consumer attb
    [2025-06-30 11:49:31] [ 537.875700][ T924] pixcir_ts 1-005c: using device tree for GPIO lookup
    [2025-06-30 11:49:31] [ 537.882541][ T924] of_get_named_gpiod_flags: can't parse 'attb-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 537.898189][ T924] of_get_named_gpiod_flags: parsed 'attb-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]' - status (0)
    [2025-06-30 11:49:31] [ 537.914369][ T924] gpio gpiochip0: Persistence not supported for GPIO 28
    [2025-06-30 11:49:31] [ 537.921261][ T924] pixcir_ts 1-005c: GPIO lookup for consumer reset
    [2025-06-30 11:49:31] [ 537.927714][ T924] pixcir_ts 1-005c: using device tree for GPIO lookup
    [2025-06-30 11:49:31] [ 537.934436][ T924] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 537.950166][ T924] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 537.965711][ T924] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [2025-06-30 11:49:31] [ 537.972591][ T924] pixcir_ts 1-005c: No GPIO consumer reset found
    [2025-06-30 11:49:31] [ 537.978867][ T924] pixcir_ts 1-005c: GPIO lookup for consumer wake
    [2025-06-30 11:49:31] [ 537.985189][ T924] pixcir_ts 1-005c: using device tree for GPIO lookup
    [2025-06-30 11:49:31] [ 537.991947][ T924] of_get_named_gpiod_flags: can't parse 'wake-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 538.007518][ T924] of_get_named_gpiod_flags: can't parse 'wake-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 538.022973][ T924] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [2025-06-30 11:49:31] [ 538.029860][ T924] pixcir_ts 1-005c: No GPIO consumer wake found
    [2025-06-30 11:49:31] [ 538.036019][ T924] pixcir_ts 1-005c: GPIO lookup for consumer enable
    [2025-06-30 11:49:31] [ 538.042554][ T924] pixcir_ts 1-005c: using device tree for GPIO lookup
    [2025-06-30 11:49:31] [ 538.049306][ T924] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 538.065090][ T924] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pixcir_tangoc@5c[0]'
    [2025-06-30 11:49:31] [ 538.080737][ T924] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [2025-06-30 11:49:31] [ 538.087629][ T924] pixcir_ts 1-005c: No GPIO consumer enable found
    [2025-06-30 11:49:31] [ 538.136792][ T57] omap_i2c 4802a000.i2c: addr: 0x002d, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:49:32] [ 539.216833][ T57] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:49:32] [ 539.276922][ T924] omap_i2c 4802a000.i2c: addr: 0x005c, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:49:33] [ 540.336926][ T924] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:49:33] [ 540.367035][ T924] pixcir_ts 1-005c: pixcir_set_power_mode: can't read reg 51 : -110
    [2025-06-30 11:49:33] [ 540.374976][ T924] pixcir_ts 1-005c: Failed to set IDLE mode
    [2025-06-30 11:49:33] [ 540.397113][ T924] pixcir_ts: probe of 1-005c failed with error -110
    [2025-06-30 11:49:33] -bash: echo: write error: No such device[ 540.407381][ T57] omap_i2c 4802a000.i2c: addr: 0x002d, len: 1, flags: 0x0, stop: 0

  • Hello Prafull,

    Please note that Linux kernel 5.10 is now too old for us to support on the e2e forums. So I can offer some feedback or suggestions, but I will not be able to run tests on my side, or guarantee that things will work a certain way.

    For guidance on debugging Linux issues, there are some helpful videos here:
    https://www.ti.com/video/series/debugging-embedded-linux-systems-training-series.html

    I do not understand your question about the PMIC. Could I get you to reword the question?

    Regards,

    Nick

  • Thanks, Nick

    In my board, both touchscreens-sensor and PMIC connected on same i2c bus. Address of PMIC is 0x002d and that of touch screen is 0x005c.

    We are getting error message for both the devices. 

    [2025-06-30 11:51:30] [ 603.464557][ T924] pixcir_ts 1-005c: using lookup tables for GPIO lookup
    [2025-06-30 11:51:30] [ 603.471445][ T924] pixcir_ts 1-005c: No GPIO consumer enable found
    [2025-06-30 11:51:30] [ 603.487171][ T57] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:51:30] [ 603.546773][ T57] omap_i2c 4802a000.i2c: addr: 0x002d, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:51:30] [ 604.576881][ T57] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:51:30] [ 604.636925][ T924] omap_i2c 4802a000.i2c: addr: 0x005c, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:51:30] [ 605.697220][ T924] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:51:30] [ 605.726971][ T924] pixcir_ts 1-005c: pixcir_set_power_mode: can't read reg 51 : -110
    [2025-06-30 11:51:30] [ 605.734969][ T924] pixcir_ts 1-005c: Failed to set IDLE mode
    [2025-06-30 11:51:30] [ 605.754197][ T924] pixcir_ts: probe of 1-005c failed with error -110
    [2025-06-30 11:51:30] [ 605.767358][ T57] omap_i2c 4802a000.i2c: addr: 0x002d, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:51:30] [ 607.027379][ T57] omap_i2c 4802a000.i2c: controller timed out
    [2025-06-30 11:51:30] [ 607.056976][ T57] cpu cpu0: _set_opp_voltage: failed to set voltage (931000 950000 969000 mV): -110
    [2025-06-30 11:51:30] [ 607.066494][ T57] cpufreq: __target_index: Failed to change cpu frequency: -110
    [2025-06-30 11:51:30] [ 607.106923][ T57] omap_i2c 4802a000.i2c: addr: 0x002d, len: 1, flags: 0x0, stop: 0
    [2025-06-30 11:51:30] [ 608.176900][ T57] omap_i2c 4802a000.i2c: controller timed out

    Since it is "connection timeout failed" I just want to make it clear that if PMIC is causing bus to fail because of which touchscreen is also failing.

    Additional information is whenever described error occurs; I am not able to see any entry at /dev/input folder (but /dev/i2c-1 is always present)

  • Are you getting any helpful output logs during kernel boot?

    Regards,

    Nick

  • I have shared consol logs while kernel boot at start of this thread. apart from that I found below log line related to i2c

    [   37.056807][   T60] omap_i2c 4802a000.i2c: controller timed out