Recently I was trying to set a GPIO value using u-boot. I followed the NVIDIA Tegra Linux Driver Package Development Guide and I was able to build the u-boot system.
1. Modifying the source code:
I added the gpio_request(480, “GPIO_EXP0”) and gpio_direction_output(480, 1) as well as the debug prints in
tegra_board_init(void) and tegra_pcie_board_init(void)
which is the only file that is board related in when I build the u-boot with config in the guide.
2. Flash to device using ‘sudo ./flash.sh -k kernel elroy-usb3 mmcblk0p1’ command.
However, I neither found any debug output during TX2 booting, nor I had found any gpio480 information under ‘/sys/class/gpio’ folder, so I want to ask:
- Am I modifying the correct file or using the correct function?
- Are rebuilt u-boot binaries been flashed to the device and used by the device?
Many thanks for the reply and help.