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-AM335X: I2C Capacitive TSC device tree setting

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi everyone,

Our customer is facing a issue about Capacitive Touch IC, They use AM335x with TI SDK 7.0.
This touch IC use I2C interface and require a gpio interrupt pin.

We set the device tree base on Capacitive Touch setting in AM437x-gp-evm.dts, just change the gpio pin for customer used.
However, the interrupt pin does not trigger while touch the panel.
The scope can catch the trigger signal of the interrupt pin, but system can not get this interrupt.
Below is the device tree setting, is anything wrong for this?

PinMux:
        pixcir_ts_pins: pixcir_ts_pins {
                pinctrl-single,pins = <
                        0x78 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_be1n.gpio1_28 */
                >;
        };

Function:
        pixcir_ts@38 {
                compatible = "pixcir,pixcir_tangoc";
                pinctrl-names = "default";
                pinctrl-0 = <&pixcir_ts_pins>;
                reg = <0x38>; /* refer to datasheet */
                interrupt-parent = <&gpio1>;
                interrupts = <28 0>;

                attb-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;

                x-size = <1280>;
                y-size = <768>;
        };


Best Regards,
Wayne Kuo

  • Hi,

    Wayne Kuo said:
    We set the device tree base on Capacitive Touch setting in AM437x-gp-evm.dts,

    Why are you modifying AM437x-gp-evm.dts, when you state that you are using AM335x?

  • Hi Biser,

    Thanks for reply.
    Sorry, that was my mistake, I didn't express clearly.

    Customer use AM335x Starter Kit for their reference design.
    We refer am437x-gp-evm.dts i2c touch part to modify am335x-evmsk.dts.
    Cause AM335x does not have i2c touch and AM437x do.

    Best Regards,
    Wayne Kuo
  • Hi Biser,

    I use BBB + SDK 7.0, and device tree set as below.
    I got this log form dmesg, anything wrong? Any idea?

    log:
    [ 1.511904] pixcir_ts 1-0038: failed to request irq 0
    [ 1.517242] pixcir_ts: probe of 1-0038 failed with error -22
    [ 3.079730] Error: Driver 'pixcir_ts' is already registered, aborting...
    [ 3.167584] Error: Driver 'pixcir_ts' is already registered, aborting...

    device tree:
    pixcir_ts_pins: pixcir_ts_pins {
    pinctrl-single,pins = <
    0x78 ( PIN_INPUT | MUX_MODE7 ) /* (U18) gpmc_be1n.gpio1[28] */
    >;
    };

    i2c1_pins: pinmux_i2c1_pins {
    pinctrl-single,pins = <
    0x15c ( PIN_INPUT | MUX_MODE2 ) /* (A16) spi0_cs0.I2C1_SCL */
    0x158 ( PIN_INPUT | MUX_MODE2 ) /* (B16) spi0_d1.I2C1_SDA */
    >;
    };
    &i2c1 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c1_pins>;

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

    pixcir_tangoc: pixcir_tangoc@38 {
    //#interrupt-cells = <1>;
    //#size-cells = <0>;
    compatible = "pixcir,pixcir_tangoc";
    pinctrl-names = "default";
    pinctrl-0 = <&pixcir_ts_pins>;

    reg = <0x38>;

    interrupt-parent = <&gpio1>;
    interrupts = <28 0>;


    attb-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
    //attb-gpio = <&gpio1 28 GPIO_ACTIVE_LOW>;
    //attb-gpio = <&gpio0 26 GPIO_ACTIVE_LOW>;

    x-size = <1280>;
    y-size = <768>;

    status = "okay";

    };
    };

    Best Regards,
    Wayne Kuo
  • I have asked the software team to look at this. They will respond here.
  • Hi,

    We're looking into this.

    Best Regards,
    Yordan
  • Hi,

    The code looks ok. Make sure the gpio is NOT used anywhere else in your code, or check if the pin gpmc_be1n is NOT muxed as anything else in the dts/dtsi files.

    Also debug further the kernel error:
    [ 3.079730] Error: Driver 'pixcir_ts' is already registered, aborting...
    This indicates that for some reason this driver is already registered, see drivers/base/driver.c, specifically the driver_register() function:
    other = driver_find(drv->name, drv->bus);
    if (other) {
    printk(KERN_ERR "Error: Driver '%s' is already registered, "
    "aborting...\n", drv->name);
    return -EBUSY;
    }
    Make sure the the only ts driver called in your defconfig is the pixcir_ts...

    Best Regards,
    Yordan

  • I agree with the Yordan's comment. In addition the x-size and y-size properties seemed not correct to me. I think the customer should try the touchscreen-size-x and touchscreen-size-y properties.

  • Hi Yordan and Kemal,

    Thanks for your great help.
    Customer is working fine on their I2C Capacitive Touch.
    They modify pixcir driver and take of the following lines in .dts:
            interrupt-parent = <&gpio1>;
            interrupts = <28 0>;
    Now the interrupt is working OK and Touch is works, too.
    I'll try to ask them how they modify the pixcir driver.
    If I get any information, I'll feedback here.

    Thank you and Regards,
    Wayne Kuo