GPIO CNF registers driving me crazy since r32.3.1

Hi

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.

Thanks.

hello peterxr95h,

you’ll need to customize the pinmux for your customize board.
please access Jetson Nano Pinmux from Jetson download center.
please also check Jetson Nano Developer Kit 40-Pin Expansion Header Configuration for an example of how to alter the function of pins on the 40-pin header by using the Jetson Nano Developer Kit Pinmux spreadsheet.
here’s Jetson Nano Product Design Guide you should also refer to.
thanks

Thanks Jerry but I am very comfortable with how to setup PinMux and DT but it just doesn’t work on my production module. The CNF registers do not get changed. The pinumx registers are changed ok but just not the Gpio CNF. I have referred to the examples and docs you mention but they do not work with my production modules.

Can you confirm that those procedures do in fact work with P3448-0020 B01production modules and R32.3.1? I know they work with devkit.

Where are the CNF registers set? I am sure there is a problem somewhere but not with my pinmux registers or DT.

hello peterxr95h,

it’s c-boot to have gpio configuration.
may I know which Jetson-Nano signal you would like to configure but failed?
you may also access Technical Reference Manual and check Chapter-9.13 [GPIO Registers] for the more details.
thanks

I have attached the pinmux & GPIO from my dts files. Here are some that have problems: aud_mclk_pbb0, spi1, i2s4. It just seems that none of my changes set the GPIO_CNF register, it always has GPIO bit set to 1. But all the functions are selected ok in the PINMUX_AUX registers. It is just this CNF that is not setup.

I can also confirm that the gpio-output-low = , gpio-output-high = do not set any pins states also.

My DTB file is flashed using the flash script so I know the correct DT is in place and so cboot should be ok but it is not setting CNF.

I know the X1 Technical Reference Manual quite well and am very familiar with the GPIO registers.

Thanks.
customs_dts.txt (36.9 KB)

Ok, so I have found my problem.

Running a full flash of the module resolved the issue. “sudo ./flash.sh [config] mmcblk0p1”.

I did the wrong thing and assumed the “sudo ./flash.sh -k DTB [config] mmcblk0p1” signed and flashed the DTB for cboot also, but I guess it does not.

What I should have done is “sudo ./flash.sh -k RP1 [config] mmcblk0p1”. RP1 is the partition for the bootloader DTB.

In summary, if you want to change your pinmux and Gpio defaults for r32.3 then you need to flash your DTB into the bootloader DTB partition with the above command, or do a full flash.

Hope this helps someone else.