AM625: Interrupt and pin setting for external Touch IC

Part Number: AM625
Other Parts Discussed in Thread: PCA9554, PCA9555

Tool/software:

Hell TI Expert

We are porting gt911 touch on AM6254 ALW SDK 9.0.

May you guide device tree setting?

Do we have to define Pin muxing for MCU_GPIO0_10 and MCU_GPIO0_9?

Please kindly guide. Thanks.

We try below, but it does not work.

goodix_ts@5d {
compatible = "goodix,gt9xx";
reg = <0x5d>;
interrupt-parent = <&mcugpio0>;
//interrupts = <17 0x2008>;
//vdd_ana-supply = <&pm8226_l19>;
//vcc_i2c-supply = <&pm8226_lvs1>;
goodix,rst-gpio = <&mcugpio0 10 GPIO_ACTIVE_HIGH>;
goodix,irq-gpio = <&mcugpio0 9 GPIO_ACTIVE_LOW>;

}

Our connection interface:

  • 1, how to set/use it MCU_GPIO0_10 as reset pin

    2, how to set/use MCU_GPIO0_9 as interrupt pion and where could i find out its interrupt parent?

  • Hi Paul,

    Can you explain why the compatible field has xx (compatible = "goodix,gt9xx";)? Are you using a custom driver? TI is unable to provide support for custom Linux drivers and applications.

    Looking through the device tree documentation, the compatible field is compatible = "goodix,gt911";

    Can you share the MCU GPIO pinmux and reference node used by this?

    Best Regards,

    Anshu

  • Hello Anshu, 

    "goodix,gt9xx" is a customized version of  "goodix,gt911". 

    I just found a reference dts in SDK 9.0 "k3-am654-evm-oldi-lcd1evm.dtso" but it is just another diff version of external touch IC and it connects to diff pins of AM62x.

    &main_i2c1 {
    #address-cells = <1>;
    #size-cells = <0>;

    gt928: touchscreen@14 {
    status = "okay";
    compatible = "goodix,gt928";
    reg = <0x14>;

    interrupt-parent = <&pca9554>;
    interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
    touchscreen-size-x = <1280>;
    touchscreen-size-y = <800>;

    reset-gpios = <&pca9555 9 GPIO_ACTIVE_HIGH>;
    irq-gpios = <&pca9554 3 GPIO_ACTIVE_HIGH>;
    };
    };

    Here for AM62x SoC as in our HW schematic, we want to use 

    1, MCU_GPIO0_10 as reset pin

    2, MCU_GPIO0_9 as interrupt pin

    "Can you share the MCU GPIO pinmux and reference node used by this?"

    We try to config the pimux as below, but we don't know how to use and fill in the driver node:

    May you help for this dts?

    goodix_ts@5d {
    compatible = "goodix,gt9xx";
    reg = <0x5d>;
    interrupt-parent = <?>;   
    goodix,rst-gpio = <?>;    //MCU_GPIO0_10, Pin C5
    goodix,irq-gpio = <?>;    //MCU_GPIO0_9, Pin B4

    }

  • Hi Paul,

    You are calling "&mcugpio0" in the IRQ and reset parameters. Where is &mcugpio0 defined? Can you try &mcu_gpio0?

  • hello Anshu, 

    yes, it should be mcu_gpio0, we are trying.

    1) We use MCU_GPIO0_9 as interrupt pin, what its interrupt-parent?

    2) Could we use them directly (e.g < &mcu_gpio0 9 GPIO_ACTIVE_LOW>) ?

    or we need to do use their pinmuxing?

    < &mcugpio0_mcu_gpio_9_irq_pins_default 9 GPIO_ACTIVE_LOW>

    < &mcugpio0_mcu_gpio_10_reset_pins_default 9 GPIO_ACTIVE_LOW>

    &mcu_pmx0 {

    mcugpio0_mcu_gpio_9_irq_pins_default: mcugpio0-default-pins {
    pinctrl-single,pins = <
    AM62X_MCU_IOPAD(0x0024, PIN_INPUT_PULLDOWN, 7) /* (B4) WKUP_UART0_RXD.MCU_GPIO0_9 */
    >;
    };

    mcugpio0_mcu_gpio_10_reset_pins_default: mcugpio0-default-pins {
    pinctrl-single,pins = <
    AM62X_MCU_IOPAD(0x0028, PIN_OUTPUT_PULLDOWN, 7) /* (C5) WKUP_UART0_TXD.MCU_GPIO0_10 */
    >;
    };

    };

  • Hi Paul,

    Here are the device tree bindings: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml?h=ti-linux-6.1.y

    The interrupt parent should be &mcu_gpio0. You shouldn't need the pinmuxing in the 'interrupts' definition.

    Best Regards,

    Anshu

  • Hello Anshu, 

    May you check our irq and reset pin setting? It still does not work.

    Could you guide how to verify this irq  ("mcu_gpio0 9") and reset pin ("mcu_gpio0 10")?

    touchscreen@5d {
    compatible = "goodix,gt911";
    reg = <0x5d>;
    //pinctrl-names = "default";
    //pinctrl-0 = <&touchscreen_pins_default>;
    interrupt-parent = <&mcu_gpio0>;
    interrupts = <9 IRQ_TYPE_EDGE_RISING>;
    irq-gpios = <&mcu_gpio0 9 GPIO_ACTIVE_LOW>;
    reset-gpios = <&mcu_gpio0 10 GPIO_ACTIVE_LOW>;

    }

  • FYI, We also try   interrupts = <9 IRQ_TYPE_EDGE_FALLING>;

    "mcu_gpio0 9" we use it as irq, do we need to set direction (INPUT) of this gpio?

  • Hi Paul,

    May you check our irq and reset pin setting?

    Nothing seems wrong.

    do we need to set direction (INPUT) of this gpio?

    Yes it needs to be input.



    To debug further, you can check the output of 'cat /proc/interrupts' & also decompile the dtb to see if there any issues how the node was compiled.

    Thanks,

    Anshu