I am using production module on custom hardware with R32.3.1. I want to make this clear as I think something is handled differently in cboot when it is a production module, and also there were some changes to how pinmux and Gpio are setup in r32.3.1. I also do not have a 40 pin header on my hardware.
I am looking for some answers on exactly where the GPIO CNF registers are set. I have a feeling they may be set in Cboot and only Cboot. Can anyone confirm this? I need these answers because no matter what I do I cannot get these GPIO_CNF registers changed from GPIO to Functions. (I can only do this after kernel has booted by manually write to the CNF registers and then everything is happy)
I have looked thru the Linux kernel source, uboot source, tegra drivers source and cannot find anywhere where these registers are set. The only reference I see to them in the source is when saving and restoring them for suspend. So this is why I am thinking only cboot is doing this. But that sounds crazy right? Because how does the spi and other overlays configure this register (well at least on the devkit), as the overlays are only loaded by uboot for booting the kernel.
What is actually the trigger for the CNF registers to be set as SF or GPIO? Is it the pinmux nodes in the DT? or is it something in the gpio nodes? Whatever it is, it simply does not work on my production module. I know that uboot strips the names from pinmux prior to booting kernel.
I am flashing my DTB via flash script and I know that the intended file is flashed ok and used. I am also certain that my pinmux settings are correct. /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-pins reflects correctly my pinmux settings, but the CNF register are still on GPIO and driving me mad.