Select GPIO in DTS throws errors when building kernel

On our board we have a GPIO I2C multiplexer. We have used this chip with the TX1 module attached to our board but when we attempt to use it with the TX2 we have observed an issue.

In order to use this multiplexer I configure two pins to be an output. I looked up the port and offset for this particular pin (G7) within the Pinmux Spreadsheet, this yields Port ‘V’ offset 5

Within my dts file I use the macro TEGRA_MAIN_GPIO(PORT, OFFSET) to get the correct address.

I’ve verified this works with other GPIOs but when I try and compile the kernel with


I get this error:

Error: /home/cospan/Projects/nvidia_3.0/Linux_for_Tegra/sources/kernel/kernel-4.4/../../hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-mit-uav-revb.dtsi:40.2-9 syntax error
FATAL ERROR: Unable to parse input tree

If I temporarily change the GPIO to a free GPIO things build just fine but I need this pin.

Is there something I’m doing wrong?

Thanks for any help,


Please use TEGRA_AON_GPIO() to define the pin number.

#define TEGRA_AON_GPIO(bank, offset) \
	((TEGRA_GPIO_BANK_ID_##bank * 8) + offset)


You can also find the port # define in the tegra186-gpio.h
For TX2 there have two group GPIO PIN, port V is in the AON group. You can find which port define in which group.



TEGRA_AON_GPIO worked! I still got some other debugging to do but this seems to have solved the build issue.

just for my edification, in order to use the GPIO on the AON processor does the main processor send a command to the AON processor to set that GPIO?

It seems like the main processor is using the AON processor as a GPIO expander for this case.