Hi,
A customer of ours is having a problem with the GPIO pins on one of our custom carriers. They have some hardware attached that requires full control of the GPIO output voltage, and have noticed the pins toggling when they power on the board. I have replicated this on one of our own boards as well and while it’s hard to get a precise timing, the toggle appears to happen just before the start of the Cboot sequence. I determined this by viewing the serial console while connecting the GPIO pin to an oscilloscope and adding a pause at the start of cboot. The serial console gets to this point before the pause:
and the toggle happens at about the same time. Then after pausing for 5 seconds:
[0001.232] I> Welcome to Cboot
[0001.235] I> Cboot Version: t186-02737b3e
[0001.239] I> CPU-BL Params @ 0x235800000
[0001.242] I> Dram Scrub in progress
[0001.886] I> DRAM Scrub Successful
Here’s the full console output: normalboot.txt (71.0 KB)
I have tried changing both the device tree and tegra186-mb1-bct-pinmux-quill-p3489-1000-a00.cfg to configure the pins as pull-down and “drive 0” according to the device tree generated by the pinmux template excel file and cfg generated by pinmux-dts2cfg.py. The toggle still occurred (although changing the pinmux to “drive 0” did invert the voltage so the pin went from 0 to 1 for about half a second then back to 0, instead of the other way around).
Can anyone tell me why this toggle is happening? It’s rather difficult to debug considering it seems to happen before the serial console is configured for Cboot.
Yes I could toggle afterwards, but our customer has some circuitry attached to the gpios that is controlled by them toggling. So the toggle during boot causes undesirable behavior. I have also noticed that this toggle does not happen from a software reboot. Is there a way to avoid that during a cold boot? Just to be clear, I am not talking about the pins going high when power is applied, I mean that when I power cycle the board there is a point during the boot sequence where the gpio pins invert for about 200-500 ms, then go back to their original value.
It’s a custom carrier board using pins H13, G14, A22, and A23. The signal names are GPIO8_ALS_PROX_INT, GPIO9_MOTION_INT, GPIO_EXP1_INT, and GPIO_EXP0_INT. Pinmux is gpio_pq4_pi4 (bank I, offset 4), can_gpio2_paa2 (bank AA, offset 2), gpio_mdm7_py6 (bank Y offset 6), and gpio_mdm1_py0 (bank Y offset 0).
After further investigation, I have found that this issue only seems to affect the TX2i gpios. TX2 and TX2-4G do not toggle on the same board with the same gpios.
Also,
all the pins you have mention are interrupt pins to tegra from gpio expanders and sensors. bootloader does not toggles those pins .
Can you share the pinmux and gpio file you are using with which you are seeing the issue.
the file you have attached has no change from the setting nvidia is doing for these pins.
But you have your custom board. What devices are connected to these pins and what is it used for? Interrupt purpose?
one possibility could be
in devkit, cboot tries to communicate with the gpio expanders whose interrupt lines are GPIO_EXP1_INT and GPIO_EXP0_INT. Since your board has a different device connected, it can be possible that due to some activity, interrupts are getting generated?
You can try commenting the below code in cboot code and rebuild cboot.
err = tegrabl_tca9539_init();