how to change the configuration of gpio cfg file

Hi,
I want to change the configuration of gpio cfg file.
But I do not know whitch file will flash to the xavier.

Linux_for_Tegra/bootloader/tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg
or
Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p2888-slvs-0000-a00-p2822-0000-a00.cfg
or other files.

Thank you !

hello Jason_888,

you could check the whole flashing messages, you’ll found the cfg file after --pinmux commands.
hence, it’s using tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg.
you might also check documentation, Pinmux and GPIO Configuration for details.
thanks

JerryChang,
Thank you!
I have tried to modify this file,it worked.

JerryChang,
Can I control gpio at the application layer?

like below

echo 28 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio28/direction
echo 1 > /sys/class/gpio/gpio28/value

If we can do this,how to calculate the number of gpio? If I want to contol the gpio of N1(H52 GPIO27).

Thank you!

hello Jason_888,

  1. you may using below kernel function calls to control GPIO pins,
    for example,
    $l4t-r32.2/public_sources/kernel_src/kernel/kernel-4.9/include/linux/gpio.h

  2. please refer to Jetson AGX Xavier Platform Adaptation and Bring-Up Guide,
    you may check [GPIO Changes] chapter for the examples to calculate the GPIO numbers.
    thanks