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.

Touch Interrupt issue

Hi,

I am using DM8168 platform with BSP release (5_05_02_00) with the Linux release linux-2.6.37-psp04.04.00.01.

I am trying to test touch interface in my target. I am using the pin GPMC_A[12]/GP0_IO20 as a touch interrupt. While testing the touch interface, the GPIO pin goes low and remains low for ever and it is not going high. I have to know the same PAD is used any where in the source code as GPIO. And also I want to know how to search the same in the source code?.

Thanks in advance,

Regards,

Salih

  • Muhammad Salih said:
    I am using DM8168 platform

    I moved this thread to the DM816x forum.

    See if the below wiki pages will be in help:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_GPIO_Driver_User_Guide

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_TouchScreen_Driver_Guide

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#Modifying_Pin_Mux_settings

    Regards,
    Pavel

  • Salih,

    Muhammad Salih said:
    I am using the pin GPMC_A[12]/GP0_IO20

    From DM816x datasheet, I can see that GPMC_A[12] signal can be multiplexed with GP0[27] on physical pin H2, GP0[31] on physical pin G1, and GP1[16] on physical pin N6. While GP0[20] can be exported to pin AC5.

    So, do you actually mean GPMC_A[27]/GP0[20] (pin AC5) instead of GPMC_A[12]/GP0_IO20?

    Regards,
    Pavel

  • Dear Pavel,

    Thanks for your prompt. Here I am configuring the pin as GP0_IO27. Some where its already using the same GPIO pin in the source code. I want to know how to find the same in the source

    Thanks in advance,

    Regards,
    Salih

  • Salih,

    GP0_IO27 is defined in linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/mux81xx.c

    static struct omap_mux __initdata ti816x_muxmodes[] = {

    _TI816X_MUXENTRY(SC1_VPPEN, 0,
            "sc1_vppen", "gpmc_a12", "gp0_io27", NULL,
            NULL, NULL, NULL, NULL),

    Then you can select gp0_io27 from the board_mux:

    linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/board-ti8168evm.c

    #ifdef CONFIG_OMAP_MUX
    static struct omap_board_mux board_mux[] __initdata = {

        /* PIN mux for non-muxed NOR */
        TI816X_MUX(TIM7_OUT, OMAP_MUX_MODE1),    /* gpmc_a12 */
        TI816X_MUX(UART1_CTSN, OMAP_MUX_MODE1),    /* gpmc_a13 */
        TI816X_MUX(UART1_RTSN, OMAP_MUX_MODE1),    /* gpmc_a14 */
        TI816X_MUX(UART2_RTSN, OMAP_MUX_MODE1),    /* gpmc_a15 */
        /* REVISIT: why 2 lines configured as gpmc_a15 */
        TI816X_MUX(SC1_RST, OMAP_MUX_MODE1),    /* gpmc_a15 */
        TI816X_MUX(UART2_CTSN, OMAP_MUX_MODE1),    /* gpmc_a16 */
        TI816X_MUX(UART0_RIN, OMAP_MUX_MODE1),    /* gpmc_a17 */
        TI816X_MUX(UART0_DCDN, OMAP_MUX_MODE1),    /* gpmc_a18 */
        TI816X_MUX(UART0_DSRN, OMAP_MUX_MODE1),    /* gpmc_a19 */
        TI816X_MUX(UART0_DTRN, OMAP_MUX_MODE1),    /* gpmc_a20 */
        TI816X_MUX(SPI_SCS3, OMAP_MUX_MODE1),    /* gpmc_a21 */
        TI816X_MUX(SPI_SCS2, OMAP_MUX_MODE1),    /* gpmc_a22 */
        TI816X_MUX(GP0_IO6, OMAP_MUX_MODE2),    /* gpmc_a23 */
        TI816X_MUX(TIM6_OUT, OMAP_MUX_MODE1),    /* gpmc-a24 */
        TI816X_MUX(SC0_DATA, OMAP_MUX_MODE1),    /* gpmc_a25 */
        /* for controlling high address */
        TI816X_MUX(GPMC_A27, OMAP_MUX_MODE1),    /* gpio-20 */
        TI816X_MUX(SC1_VPPEN, OMAP_MUX_MODE2),
        { .reg_offset = OMAP_MUX_TERMINATOR },
    };

    Thus when kernel boot up, you have PINCTRL202[2:0] MUXMODE = 0x2 (GP0[27])

    Regards,
    Pavel

  • Dear Pavel,

    Thank you very much for your support. I have solved this issue. It was like a minor mistake in the code. I was trying to configure that GPIO (GP0[27])pin as interrupt after the i2c initialization is done.

    File: "arch/arm/mach-omap2/board-ti8168evm.c"

    In function: ti8168_evm_init ()


    Non-working:

            ti816x_evm_i2c_init();
            ti816x_i2c_boardinfo0[3].irq = TOUCH_MAX_INTERRUPT;

    Working:

            ti816x_i2c_boardinfo0[3].irq = TOUCH_MAX_INTERRUPT;
            ti816x_evm_i2c_init();

    Regards,

    Salih