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.

am335x with Atmel MXT224 Touch

Hallo,


i don't get my beaglebone to work with a atmel based mxt224 touch.

CTP-Interrupt GPIO3-19

CTP-Reset GPIO2-1

My devicetree file

             :
        atmel_mxt_pins: atmel_mxt_pins {
            pinctrl-single,pins = <
            0x1a4 (PIN_INPUT_PULLUP | MUX_MODE7) /* P9-27 gpio3[19] */
            0x8c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* P8-18 gpio2[1] */
                >;
        };

             :
&i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins>;

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

        atmel_mxt_ts: atmel_mxt_ts@4b {
            compatible = "atmel,atmel_mxt_ts", "atmel,mXT224";
            reg = <0x4b>;
            interrupt-parent = <&gpio3>;
            interrupts = <19 0x1>;
            reset-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
            touchscreen-size-x = <480>;
            touchscreen-size-y = <272>;
            pinctrl-names = "default";
            pinctrl-0 = <&atmel_mxt_pins>;
        };
};


driver gets loaded

[    2.829628] atmel_mxt_ts 2-004b: Direct firmware load for maxtouch.cfg failed with error -2
[    2.912158] atmel_mxt_ts 2-004b: Falling back to user helper
[    5.689415] atmel_mxt_ts 2-004b: Family: 128 Variant: 1 Firmware V2.0.AA Objects: 17

But no interrupts are generated on any touch events.

Please help

Thanks in advance.

Erich

  • Hi,

    Where is the pinmux for I2C2? Do you see any activity on the I2C bus?
  • The pinmux for the I2C2 is


    i2c2_pins: pinmux_i2c2_pins {
    pinctrl-single,pins = <
    0x17c (PIN_INPUT_PULLUP | MUX_MODE3) /* i2c2_scl.i2c2_scl */
    0x178 (PIN_INPUT_PULLUP | MUX_MODE3) /* i2c2_sda.i2c2_sda */
    >;
    };

    Best regards
    Erich
  • Do you see any activity on the I2C bus? Do you have external pullups on the I2C lines?
  • I've got it working now by changing the section of the i2c2 to

    &i2c2 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c2_pins>;

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

    atmel_mxt_ts: atmel_mxt_ts@4b {
    compatible = "atmel,atmel_mxt_ts", "atmel,mXT224";
    reg = <0x4b>;
    interrupt-parent = <&gpio3>;
    interrupts = <19 0x2>;
    atmel,reset-gpio = <&gpio2 1 0>;
    atmel,irq-gpio = <&gpio3 19 0>;
    touchscreen-size-x = <480>;
    touchscreen-size-y = <272>;
    pinctrl-names = "default";
    pinctrl-0 = <&atmel_mxt_pins>;
    };
    };

    I'm a little bit confused, what driver is handling the atmel,irq-gpio parameter int the dts file ?
    Additionally can you clarify the dependency of i2c2 and i2c3 (ti,hwmods entry) from the following am335x snippet:

    i2c2: i2c@4819c000 {
    compatible = "ti,omap4-i2c";
    #address-cells = <1>;
    #size-cells = <0>;
    ti,hwmods = "i2c3";
    reg = <0x4819c000 0x1000>;
    interrupts = <30>;
    status = "disabled";
    };

    Best regards
    Erich