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: Touchscreen configuration

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: TLV320AIC3106

Tool/software: Linux

Hello everyone, we use

[GPMC_CLK/LCD_MEMORY_CLK/GPMC_WAIT1/MMC2_CLK/PR1_MII1_CRS/PR1_MDIO_MDCLK/MCASP0_FSR/GPIO2_1] GPIO2_1 as goodix gt9271 reset pin

[GMII1_TXD2/DCAN0_RX/RGMII1_TD2/UART4_TXD/MCASP1_AXR0/MMC2_DAT2/MCASP0_AHCLKX/GPIO0_17] GPIO0_17 as goodix gt9271 int pin

The following is our  dts configuration

gt9271_ts_pins: pinmux_gt9271_ts_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_clk.gpio2_1 */
AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE7) /* gmii1_txd2.gpio0_17 */
>;
};

&i2c2 {

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

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

tlv320aic3106: tlv320aic3106@1b {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3106";
reg = <0x1b>;
status = "okay";

/* Regulators */
AVDD-supply = <&vaux2_reg>;
IOVDD-supply = <&vaux2_reg>;
DRVDD-supply = <&vaux2_reg>;
DVDD-supply = <&vbat>;
};

gt9271@5d {
compatible = "goodix,gt9271";
pinctrl-names = "default";
pinctrl-0 = <&gt9271_ts_pins>;
reg = <0x5d>;
interrupt-parent = <&gpio0>;
interrupts = <97 0>;

irq-gpios = <&gpio0 17 0>;

reset-gpios = <&gpio2 1 0>;

touchscreen-size-x = <1280>;
touchscreen-size-y = <800>;

touchscreen-swap = <1>;
touchscreen-revert-x = <1>;
touchscreen-revert-y = <1>;
};

}

The touch screen does not work now.    I don't know how to configure these parameters.   Can you help me explain it?

interrupt-parent = <&gpio0>;     //gpio0 is right?                    
interrupts = <97 0>;                    //I see the trm,96 GPIOINT0A GPIO 0 POINTRPEND1    97 GPIOINT0B GPIO 0 POINTRPEND2,so i set the 97,is right?

irq-gpios = <&gpio0 17 0>;       //is right?

reset-gpios = <&gpio2 1 0>;    //is right?

  • Hi,

    The irq number 97 is an internal gpio interrupt (within the SoC). When you configure gpio as interrupt, you configure the incoming/outgoing signal from the pin to be an interrupt. So if you want to have the GPIO0_17 as an interrupt source for your gt9271 device, then you should configure as follows:
    interrupt-parent = <&gpio0>;
    interrupts = <17 0> // NOTE: this means that the IRQ is active low, so when the GPIO has a state 0 it will be interpreted as IRQ!!
    or
    irq-gpios = <&gpio0 17 0>;

    Same with the reset:
    reset-gpios = <&gpio2 1 0>; ==> this means that when gpio2_1=0x0 this will be interpreted as a reset.

    Are you sure about the signal polarity? Maybe you should have IRQ_TYPE_LEVEL_HIGH meaning:
    interrupt-parent = <&gpio0>;
    interrupts = <17 IRQ_TYPE_LEVEL_HIGH>
    or
    irq-gpios = <&gpio0 17 IRQ_TYPE_LEVEL_HIGH>;

    reset-gpios = <&gpio2 1 1>;

    Best Regards,
    Yordan