How to configure the GPIO

Dear ALL,

Now I want to bring up one touch panel driver. But I cannot find some detail information about I2C and GPIO.

For I2C:

I2C SDA connect to I2C_GP0_DAT_1V8,
I2C SCL connect to I2C_GP0_CLK_1V8
If the I2C BUS No is 2, i2c@7000c400?

GPIO RST connect to TCA9539_RST_L
If the INT GPIO Number is TEGRA_GPIO(L,1) and RST GPIO Number is TEGRA_GPIO(L,3)?

Where can I download some documents about I2C and GPIO configure.

Pan Andy

Despite looking like it is the wrong arm architecture, this file may be the naming
for arm64 as well:


This may be of some use on GPIO:

You may want to “sudo -s” to be in a root shell, then poke around here:

cd /sys/class/gpio/
# Note "unexport" and "export" can have input via echo of a number into them.
cat /sys/kernel/debug/gpio

Some info on TEGRA_GPIO_BANK_ID:

I have not had to work with i2c, someone else will be able to give more info on i2c.


I have gone through your discussion for using GPIO as interrupt source. I want to register one irq in my kernel driver, it should be called when the gpio exhibits particular edge.

I want to use GPIO_EXP0_INT ( A23) as Interrupt pin (input mode). As per the TX2 pin mux GPIO calculation, respective GPIO number is 480.

I am able to export the gpio in user space and able to get the status. But i want to use it in kernel driver.

Do i need to modify any dts file for adding entry for my gpio ? Could you please share your information?

I want to know GPIO_EXP0_INT is also a normal GPIO pin or Interrupt line. if it is possible to use this as normal GPIO, then i can use this interrupt source.

It would be helpful to me.


Am I correct that you are able to set mode and test as a regular input or output via “/sys”? I ask as a means to verify that you have the right numeric index for the particular GPIO before working on interrupt mode.

This thread is probably close to what you want:

Part might depend on whether you are wanting to use only kernel space driver access to GPIO versus user space. One example which has been mentioned elsewhere for GPIO based interrupts is this in kernel source: