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.

Linux/PROCESSOR-SDK-AM437X: Touchscreen doesn't work on GP EVM

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4372, ADS7846, TSC2046, TPS65218

Tool/software: Linux

Hi,

I download SDK ti-processor-sdk-linux-am437x-evm-05.01.00.11-Linux-x86-Install.bin and update  old SDK  tl-processor-sdk-linux-am437-evm-01.00.00.03, in my am437x-gp-evm board,  then the Touch screen cann't work. I did following:

1)modifed the dts file, added follow lines (from the old dts file)in the dts file:

    spi2_pins: spi2_pins {           /*4 wire touch screen driver chip */
        pinctrl-single,pins = <
            AM4372_IOPAD(0xa60, INPUT_EN | MUX_MODE0)  /* mcspi2_sclk mode 0*/
            AM4372_IOPAD(0xa64, INPUT_EN | MUX_MODE0)  /* 268 mcspi2_d0 mode 0*/
            AM4372_IOPAD(0xa68, INPUT_EN | MUX_MODE0)  /* 264 mcspi2_d1 mode 0*/
            AM4372_IOPAD(0xa6c, PIN_OUTPUT_PULLUP | MUX_MODE0)  /* mcspi2_cs0 mode 0*/
        >;
    };

    ads7846_pins: ads7846_pins {
        pinctrl-single,pins = <
            AM4372_IOPAD(0xa5c, PIN_INPUT_PULLUP | MUX_MODE7)  /* spi4_cs0..gpio5_7 */
        >;
    };
    edt_ft5x06_pins: edt_ft5x06_pins {
        pinctrl-single,pins = <
            AM4372_IOPAD(0xa78, PIN_INPUT_PULLUP | MUX_MODE7)  /* H20:clkreq..gpio0_24 */
        >;
    };
&spi2 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi2_pins>;

    ads7846@0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ads7846_pins>;

        compatible = "ti,ads7846";
        vcc-supply = <&ads7846reg>;

        reg = <0>;            /* CS0 */
        spi-max-frequency = <1500000>;

        interrupt-parent = <&gpio5>;
        interrupts = <7 0>;        /* gpio5_7 */
        pendown-gpio = <&gpio5 7 0>;

        ti,x-min = /bits/ 16 <0x0>;
        ti,x-max = /bits/ 16 <0x0fff>;
        ti,y-min = /bits/ 16 <0x0>;
        ti,y-max = /bits/ 16 <0x0fff>;

        ti,x-plate-ohms = /bits/ 16 <180>;
        ti,pressure-max = /bits/ 16 <255>;

        ti,debounce-max = /bits/ 16 <10>;
        ti,debounce-tol = /bits/ 16 <30>;
        ti,debounce-rep = /bits/ 16 <1>;

        ti,settle-delay-usec = /bits/ 16 <150>;
        ti,keep-vref-on = <1>;

        linux,wakeup;
    };
};

2)configed kernel: Device Driver->Input device support->Touchscreens->    <M>ADS7846/TSC2046/AD7837 and AD(s)7843 based touchscreens

<*>EDT FocalTech FT5x06 I2C Touchscreen support 

<M> TI Touchscreen Interface

3)save the config and compile the kernel to get zImage and modules

4)put the modules to filesystem

When update the system and reboot, the Touchscreen cann't work yet. when lsmod, there is no ads7846 in the list.

I attachment my dts file here.

Bests Regards,

7484.am437x-gp-evm.rar

  • Did you make modifications to your hardware? If you did not modify the hardware, why are you modifying the dts file of the updated software?

    Regards,
    Nick
  • Hi Nick,

    I don't modifify hardware. the  new SDK( version 05.01.00.11) DTS file only support capactive touch screen which is I2C controlled, Our hardware is from old SDK which support resistence touch screen  which is controlled by spi2 conection(ADS7846). So I want to modified the DTS according to the old DTS to support the resistence touch screen.

    Bests Regards,

  • Hi Nick,
    I have resolved this issue, There are errors in the DTS file. Thank you for your response!
  • Part Number: PROCESSOR-SDK-AM437X

    Tool/software: Linux

    Hi,

    Our am437x board support touchscreen with ads7846 module, now I update my system from SDK-01-00-00-03 to  SDK-05.01.00.11.  the new SDK's DTS file only support capactive touch, so I modified the DTS file and  configed kernel driver to support ads7846 module, add following  node in DTS file:

        spi2_pins: spi2_pins {           /*4 wire touch screen driver chip */
            pinctrl-single,pins = <
                AM4372_IOPAD(0xa60, INPUT_EN | MUX_MODE0)  /* mcspi2_sclk mode 0*/
                AM4372_IOPAD(0xa64, INPUT_EN | MUX_MODE0)  /* 268 mcspi2_d0 mode 0*/
                AM4372_IOPAD(0xa68, INPUT_EN | MUX_MODE0)  /* 264 mcspi2_d1 mode 0*/
                AM4372_IOPAD(0xa6c, PIN_OUTPUT_PULLUP | MUX_MODE0)  /* mcspi2_cs0 mode 0*/
            >;
        };

        ads7846_pins: ads7846_pins {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xa5c, PIN_INPUT_PULLUP | MUX_MODE7)  /* spi4_cs0..gpio5_7 */
            >;
        };
        edt_ft5x06_pins: edt_ft5x06_pins {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xa78, PIN_INPUT_PULLUP | MUX_MODE7)  /* H20:clkreq..gpio0_24 */
            >;
        };
    &spi2 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi2_pins>;

        ads7846@0 {
            pinctrl-names = "default";
            pinctrl-0 = <&ads7846_pins>;

            compatible = "ti,ads7846";
            vcc-supply = <&ads7846reg>;

            reg = <0>;            /* CS0 */
            spi-max-frequency = <1500000>;

            interrupt-parent = <&gpio5>;
            interrupts = <7 0>;        /* gpio5_7 */
            pendown-gpio = <&gpio5 7 0>;

            ti,x-min = /bits/ 16 <0x0>;
            ti,x-max = /bits/ 16 <0x0fff>;
            ti,y-min = /bits/ 16 <0x0>;
            ti,y-max = /bits/ 16 <0x0fff>;

            ti,x-plate-ohms = /bits/ 16 <180>;
            ti,pressure-max = /bits/ 16 <255>;

            ti,debounce-max = /bits/ 16 <10>;
            ti,debounce-tol = /bits/ 16 <30>;
            ti,debounce-rep = /bits/ 16 <1>;

            ti,settle-delay-usec = /bits/ 16 <150>;
            ti,keep-vref-on = <1>;

            linux,wakeup;
        };
    };

    I update DTB , zImage and filesystem  files, when  system up, I can find in /dev:

    root@am437x-evm:/dev/input# ls
    by-path       event0        event1        touchscreen0

    the modules loaded:

    root@am437x-evm:/dev/input# lsmod
    Module                  Size  Used by
    xhci_plat_hcd          16384  0
    xhci_hcd              122880  1 xhci_plat_hcd
    usbcore               204800  2 xhci_plat_hcd,xhci_hcd
    pru_rproc              20480  0
    pruss_intc             16384  1 pru_rproc
    pruss                  16384  1 pru_rproc
    dwc3                   73728  0
    udc_core               28672  1 dwc3
    usb_common             16384  3 udc_core,usbcore,dwc3
    ti_am335x_adc          16384  0
    ti_am335x_tsc          16384  0
    snd_soc_simple_card    16384  0
    snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
    bc_example             16384  0
    pm33xx                 16384  0
    pvrsrvkm              413696  1 bc_example
    omap_des               20480  0
    omap_aes_driver        24576  0
    des_generic            28672  1 omap_des
    omap_sham              28672  0
    crypto_engine          16384  2 omap_des,omap_aes_driver
    omap_crypto            16384  2 omap_des,omap_aes_driver
    pruss_soc_bus          16384  0
    ti_emif_sram           16384  1 pm33xx
    ads7846                20480  0
    dwc3_omap              16384  0
    snd_soc_tlv320aic3x    57344  1
    wkup_m3_ipc            16384  1 pm33xx
    wkup_m3_rproc          16384  1
    rtc_omap               20480  2
    ti_am335x_tscadc       16384  2 ti_am335x_adc,ti_am335x_tsc
    remoteproc             40960  3 pru_rproc,wkup_m3_rproc,wkup_m3_ipc
    omap_wdt               16384  0
    sch_fq_codel           20480  3
    cryptodev              45056  0

    but the TS is not responsed to input when ts-calibrate.

    I cat /dev/input/touchscreen0, there is no changing.

    I check the console log, there are something wrong:

    root@am437x-evm:/dev/input# dmesg | grep 7846  

    [    0.174812] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/ads7846-reg[0]'
    [    3.655424] ads7846-reg: disabling
    [   11.568338] ads7846 spi1.0: not using DMA for McSPI (-19)
    [   11.568587] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/ocp@44000000/spi@481a2000/ads7846@0[0]' - status (0)
    [   11.580604] ads7846 spi1.0: touchscreen, irq 97
    [   11.591868] input: ADS7846 Touchscreen as /devices/platform/44000000.ocp/481a2000.spi/spi_master/spi1/spi1.0/input/input0
    root@am437x-evm:/dev/input#

    What is wrong? I attachment my dts file here.

    Best Regards,

    7455.am437x-gp-evm.rar

  • Maybe it would be useful to see the difference in console output between SDK 1.0 and SDK 5.1 so we can see what a "good" boot looks like compared to a "bad" boot? (with the understanding that there are huge differences between those Linux versions). If possible, a full boot log is preferred.

    I do not have that touchscreen hardware on my side, so I will not be able to run tests.

    Regards,
    Nick
  • Hi Nick,

    I attachment the 'bad' and 'good' boot console output here. I also attachment the old SDK' DTS file.

    Best Regards,

    am437x-gp-evm(SDK1.0).rar

    SDK1.0(good).log
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    U-Boot SPL 2018.01-00444-ge782a78ca9-dirty (Feb 16 2019 - 10:11:27)
    Trying to boot from NAND
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    U-Boot 2018.01-00444-ge782a78ca9-dirty (Feb 16 2019 - 10:11:27 +0800)
    CPU : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM: 1 GiB
    PMIC: TPS65218
    NAND: 512 MiB
    MMC: OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    Net: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    4593000 bytes read in 243 ms (18 MiB/s)
    50704 bytes read in 15 ms (3.2 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff0000, end 8ffff60f ... OK
    Starting kernel ...
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 3.14.43-g064c28b (root@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #14 Wed Jul 18 11:01:50 CST 2018
    [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM437x GP EVM
    [ 0.000000] cma: CMA: reserved 24 MiB at ae000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM437x ES1.2 (sgx neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260112
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00af1348-02 rw rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 1003400K/1046528K available (6231K kernel code, 313K rwdata, 2244K rodata, 269K init, 233K bss, 43128K reserved, 268288K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    [ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc084f0c4 (8477 kB)
    [ 0.000000] .init : 0xc0850000 - 0xc0893654 ( 270 kB)
    [ 0.000000] .data : 0xc0894000 - 0xc08e2500 ( 314 kB)
    [ 0.000000] .bss : 0xc08e2500 - 0xc091cbd0 ( 234 kB)
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] GIC CPU mask not found - kernel will fail to boot.
    [ 0.000000] GIC CPU mask not found - kernel will fail to boot.
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
    [ 0.000046] OMAP clocksource: timer1 at 24000000 Hz
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    SDK5.1(bad).log
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    t/input0
    U-Boot SPL 2018.01-00444-ge782a78ca9-dirty (Feb 16 2019 - 10:11:27)
    Trying to boot from NAND
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    U-Boot 2018.01-00444-ge782a78ca9-dirty (Feb 16 2019 - 10:11:27 +0800)
    CPU : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM: 1 GiB
    PMIC: TPS65218
    NAND: 512 MiB
    MMC: OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    Net: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    starting USB...
    USB0: Register 2000440 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus 0 for devices... 1 USB Device(s) found
    scanning usb for storage devices... 0 Storage Device(s) found
    Device 0: device type unknown
    ... is now current device
    MMC: no card present
    ** Bad device mmc 0 **
    ** Bad device usb 0 **
    Booting from nand ...
    NAND read: device 0 offset 0x100000, size 0x80000
    524288 bytes read: OK
    NAND read: device 0 offset 0x300000, size 0x700000
    7340032 bytes read: OK
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff0000, end 8ffff6d5 ... OK
    Starting kernel ...
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.14.67-gd315a9bb00 (root@cr) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 PREEMPT Thu May 9 16:02:57 CST 2019
    [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] OF: fdt: Machine model: TI AM437x GP EVM
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] cma: Reserved 48 MiB at 0xbd000000
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM437x ES1.2 (sgx neon)
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260416
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 976240K/1048576K available (8192K kernel code, 328K rwdata, 2492K rodata, 1024K init, 276K bss, 23184K reserved, 49152K cma-reserved, 212992K highmem)
    [ 0.000000] Virtual kernel memory layout:
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello,

    I am not super familiar with SPI, so we are learning together here.

    1) Other than the device tree file you modified, are you using the default device tree files in SDK 5.1? (e.g., is file am4372.dtsi from SDK 5.1 and not sdk 1.0?) - this relates to a potential SPI issue brought up in this post: e2e.ti.com/.../2345031 and e2e.ti.com/.../701141

    2) Could you post the corrected DTS file?

    3) Are you observing the expected voltage on the SPI pins?

    Regards,
    Nick
  • Hi Nick,

    1)My modified DTS file is from SDK5.1, only with SPI2 node from SDK1.0.

    2)I attachment the default DTS files in SDK5.1 here. As the touchscreen is changed in my custom board. there seem no correct DTS file.

    3)When inputing( touching screen), I can observe the wave ( the expected voltage) on the SPi pins with oscilloscope.

    Best Regards,

    0876.am437x-gp-evm.rar

  • Ok, so the signal is arriving at the board.

    Have you have checked that the pinmuxing during runtime is as you expect?
    CTRL_CONF_SPI2_SCLK 0x44E10A60
    CTRL_CONF_SPI2_D0 0x44E10A64
    CTRL_CONF_SPI2_D1 0x44E10A68
    CTRL_CONF_SPI2_CS0 0x44E10A6C

    You mentioned in an earlier post that there was an issue in one of the device tree files that you posted, and you had corrected the device tree. I was curious to see what had changed.

    Regards,
    Nick
  • Hi Nick,

    1)the 4 signals is appeared as my expected.

    2)I commented following lines in unused_pins node in the DTS file which is pinmuxed with spi2 in the DTS:

        /*        AM4372_IOPAD(0xa60, PIN_INPUT | PULL_DISABLE | MUX_MODE7) */
        /*        AM4372_IOPAD(0xa68, PIN_INPUT_PULLDOWN | MUX_MODE7) */
    then I can find ads7846.ko when lsmod.

  • Hi Nick,

    I check the four signals today again, when touching screen, the 4 signals appear as following:

    1)SPI2_MOSI has wave when touching;

    2)SPI2_MISO stay low;

    3)SPI2_CS0 stay high;

    4)SPI2_SCLK stay low.

    I compare these with old SDK1.0 in the same board, they almost the same, the only difference is the SPI2_MOSI wave which has more variation in SDK1.0.

    I added following bold lines in DTS for dma:

    &spi2 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi2_pins>;
        
        dmas = <&edma 16 0
            &edma 17 0>;
        dma-names = "tx0", "rx0";

        ads7846@0 {
            pinctrl-names = "default";
            pinctrl-0 = <&ads7846_pins>;
            
            compatible = "ti,ads7846";
            vcc-supply = <&ads7846reg>;

            reg = <0>;            /* CS0 */
            spi-max-frequency = <1500000>;

            interrupt-parent = <&gpio5>;
            interrupts = <7 0>;        /* gpio5_7 */
            pendown-gpio = <&gpio5 7 0>;

            ti,x-min = /bits/ 16 <0x0>;
            ti,x-max = /bits/ 16 <0x0fff>;
            ti,y-min = /bits/ 16 <0x0>;
            ti,y-max = /bits/ 16 <0x0fff>;

            ti,x-plate-ohms = /bits/ 16 <180>;
            ti,pressure-max = /bits/ 16 <255>;

            ti,debounce-max = /bits/ 16 <10>;
            ti,debounce-tol = /bits/ 16 <30>;
            ti,debounce-rep = /bits/ 16 <1>;

            ti,settle-delay-usec = /bits/ 16 <150>;
            ti,keep-vref-on = <1>;

            linux,wakeup;
        };
    };
     

    when update,I check the console.log:

    root@am437x-evm:/dev/input# dmesg |grep 7846
    [    0.174441] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/ads7846-reg[0]'
    [    3.642747] ads7846-reg: disabling
    [   11.737958] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/ocp@44000000/spi@481a2000/ads7846@0[0]' - status (0)
    [   11.751848] ads7846 spi1.0: touchscreen, irq 94
    [   11.753470] input: ADS7846 Touchscreen as /devices/platform/44000000.ocp/481a2000.spi/spi_master/spi1/spi1.0/input/input0
    root@am437x-evm:/dev/input#

    There  almost no errors about ads7846,  but the touchscreen is stll not work.

    Best Regards,

  • Hi,

    I check the /proc when touching screen:

    root@am437x-evm:/proc# cat interrupts
               CPU0       
     16:       2948     WUGEN  68 Level     gp_timer
     18:       7271     GIC-0  29 Edge      twd
    ...
     95:         37  48322000.gpio   7 Edge      ads7846

    touching the screen, then

    root@am437x-evm:/proc# cat interrupts
               CPU0       
     16:       3504     WUGEN  68 Level     gp_timer
     18:       9145     GIC-0  29 Edge      twd
    ...

     95:         58  48322000.gpio   7 Edge      ads7846

    the interrupts is increasing when touching

    It seems that the spi2 pinmuxing is correct.

    but the cat /dev/input/touchscreen0 is  not responsed yet.

    By the way, I cann't config kernel "Devie Drivers->Input device support->TI Touchscreen Interface" with built-in, only with modularizes in linux 4.14.67 which can be set to built-in in linux 3.14.43.

    Best Regards,

  • Part Number: PROCESSOR-SDK-AM437X

    Tool/software: Linux

    Hi,

    I update my custom board SDK from 1.1 to 5.1, the touchscreen cann't work.

    I check following:

    root@am437x-evm:/dev/input# dmesg |grep input
    [   11.701615] input: ADS7846 Touchscreen as /devices/platform/44000000.ocp/481a2000.spi/spi_master/spi1/spi1.0/input/input0
    [   18.484728] input: ti-tsc as /devices/platform/44000000.ocp/44e0d000.tscadc/44e0d000.tscadc:tsc/input/input1


    root@am437x-evm:/dev/input# dmesg |grep 7846
    [    0.174472] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/ads7846-reg[0]'
    [    3.650398] ads7846-reg: disabling
    [   11.677132] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/ocp@44000000/spi@481a2000/ads7846@0[0]' - status (0)
    [   11.701093] ads7846 spi1.0: touchscreen, irq 96
    [   11.701615] input: ADS7846 Touchscreen as /devices/platform/44000000.ocp/481a2000.spi/spi_master/spi1/spi1.0/input/input0


    root@am437x-evm:/dev/input# cat /proc/interrupts
               CPU0       
     16:       5864     WUGEN  68 Level     gp_timer
     18:      14568     GIC-0  29 Edge      twd
     20:          0     WUGEN   9 Level     l3-dbg-irq
     21:          0     WUGEN  10 Level     l3-app-irq
     23:          1     WUGEN  78 Level     wkup_m3_txev
     24:      24896     WUGEN  12 Level     49000000.edma_ccint
     26:          0     WUGEN  14 Level     49000000.edma_ccerrint
     30:       1018     WUGEN  72 Level     44e09000.serial
     31:          0     WUGEN  77 Level     wkup_m3
     32:          0     WUGEN  75 Level     rtc0
     33:          0     WUGEN  76 Level     rtc0
     35:          0     WUGEN  98 Level     4804c000.gpio
     36:          0     WUGEN  62 Level     481ae000.gpio
     37:          0     WUGEN 106 Level     48320000.gpio
     38:       3225     WUGEN 148 Level     48322000.gpio
     39:       1332     WUGEN  70 Level     44e0b000.i2c
     40:          0     WUGEN  71 Level     4802a000.i2c
     43:       2080     WUGEN  41 Level     4a100000.ethernet
     44:         64     WUGEN  42 Level     4a100000.ethernet
     46:          0     WUGEN  16 Level     TI-am335x-tsc, 44e0d000.tscadc:adc
     47:          0     WUGEN 109 Level     53100000.sham
     50:          0     WUGEN 111 Level     48310000.rng
     51:          0     WUGEN  82 Level     4803c000.mcasp_tx
     52:          0     WUGEN  83 Level     4803c000.mcasp_rx
     53:          0     WUGEN   4 Level     48080000.elm
     54:          0     WUGEN 100 Level     gpmc
     55:          7     WUGEN 172 Level     dwc3-omap, dwc3-otg
     56:          5     WUGEN 178 Level     dwc3-omap
     58:        618     WUGEN 127 Level     OMAP DISPC
     68:          0      PRCM     Edge      pinctrl
     93:          0     WUGEN   7 Edge      tps65218
     94:          0     WUGEN 168 Level     xhci-hcd:usb1
     95:          0     WUGEN 174 Level     xhci-hcd:usb3
     96:       3225  48322000.gpio   7 Edge      ads7846
    Err:          0
    root@am437x-evm:/dev/input# cat /proc/interrupts
               CPU0       
     16:       5886     WUGEN  68 Level     gp_timer
     18:      18251     GIC-0  29 Edge      twd
     20:          0     WUGEN   9 Level     l3-dbg-irq
     21:          0     WUGEN  10 Level     l3-app-irq
     23:          1     WUGEN  78 Level     wkup_m3_txev
     24:      24896     WUGEN  12 Level     49000000.edma_ccint
     26:          0     WUGEN  14 Level     49000000.edma_ccerrint
     30:       1061     WUGEN  72 Level     44e09000.serial
     31:          0     WUGEN  77 Level     wkup_m3
     32:          0     WUGEN  75 Level     rtc0
     33:          0     WUGEN  76 Level     rtc0
     35:          0     WUGEN  98 Level     4804c000.gpio
     36:          0     WUGEN  62 Level     481ae000.gpio
     37:          0     WUGEN 106 Level     48320000.gpio
     38:       4809     WUGEN 148 Level     48322000.gpio
     39:       1356     WUGEN  70 Level     44e0b000.i2c
     40:          0     WUGEN  71 Level     4802a000.i2c
     43:       2130     WUGEN  41 Level     4a100000.ethernet
     44:         64     WUGEN  42 Level     4a100000.ethernet
     46:          0     WUGEN  16 Level     TI-am335x-tsc, 44e0d000.tscadc:adc
     47:          0     WUGEN 109 Level     53100000.sham
     50:          0     WUGEN 111 Level     48310000.rng
     51:          0     WUGEN  82 Level     4803c000.mcasp_tx
     52:          0     WUGEN  83 Level     4803c000.mcasp_rx
     53:          0     WUGEN   4 Level     48080000.elm
     54:          0     WUGEN 100 Level     gpmc
     55:          7     WUGEN 172 Level     dwc3-omap, dwc3-otg
     56:          5     WUGEN 178 Level     dwc3-omap
     58:        618     WUGEN 127 Level     OMAP DISPC
     68:          0      PRCM     Edge      pinctrl
     93:          0     WUGEN   7 Edge      tps65218
     94:          0     WUGEN 168 Level     xhci-hcd:usb1
     95:          0     WUGEN 174 Level     xhci-hcd:usb3
     96:       4809  48322000.gpio   7 Edge      ads7846
    Err:          0

    The interrupts are increased when I touching the screen. But the touchscreen0 which is as event in tslib in /dev/input  is not responsed:

    root@am437x-evm:/dev/input# ls
    by-path       event0        event1        mice          mouse0        mouse1        touchscreen0
    root@am437x-evm:/dev/input# cat touchscreen0

    the 4 spi signals are correct I measured them with oscilloscope when touching screen.

    I donn't konw what should do now. all the module seem ok:

    root@am437x-evm:/dev/input# lsmod
    Module                  Size  Used by
    xhci_plat_hcd          16384  0
    xhci_hcd              122880  1 xhci_plat_hcd
    usbcore               204800  2 xhci_plat_hcd,xhci_hcd
    pru_rproc              20480  0
    pruss_intc             16384  1 pru_rproc
    pruss                  16384  1 pru_rproc
    dwc3                   73728  0
    udc_core               28672  1 dwc3
    usb_common             16384  3 udc_core,usbcore,dwc3
    ti_am335x_adc          16384  0
    ti_am335x_tsc          16384  0
    snd_soc_simple_card    16384  0
    snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
    pm33xx                 16384  0
    omap_des               20480  0
    omap_aes_driver        24576  0
    des_generic            28672  1 omap_des
    crypto_engine          16384  2 omap_des,omap_aes_driver
    pruss_soc_bus          16384  0
    omap_crypto            16384  2 omap_des,omap_aes_driver
    omap_sham              28672  0
    ti_emif_sram           16384  1 pm33xx
    ads7846                20480  0
    dwc3_omap              16384  0
    snd_soc_tlv320aic3x    57344  1
    wkup_m3_ipc            16384  1 pm33xx
    wkup_m3_rproc          16384  1
    rtc_omap               20480  2
    remoteproc             40960  3 pru_rproc,wkup_m3_rproc,wkup_m3_ipc
    omap_wdt               16384  0
    ti_am335x_tscadc       16384  2 ti_am335x_adc,ti_am335x_tsc
    sch_fq_codel           20480  3
    cryptodev              45056  0
    root@am437x-evm:/dev/input#

    In the kernel(linux 4.14.67) config menu, I cann't set /device drivers->input device support->Touchscreens->Ti Touchscreen Interface to <*>, only to <M> or < >, In old SDK , the kernel(linux 3.14.43)can be set to <*>, Is this related ?

    Best Regards,

  • Hello,

    I am sorry for the delayed response. I would not expect that adding support for a module (M) rather than <*> would make a difference.

    As far as I understand it, you should NOT be using ti_am335x_tsc driver for your touchscreen. I think that driver would only be used if you connected your resistive touchscreen directly to the ADC input pins rather than connected through SPI.

    Regards,
    Nick