NX Internal pull-up on GPIO's

Hi,

I did some more testing.
When our unit boots up, the register value is as shown (pull up is not set):
Bank: 1 Reg: 0x0c302038 Val: 0x00000052 → spi2_cs0_pcc3

The correct register value should be 0x0000005A.

If I use the command:
sudo devmem2 0x0c302038 b 0x5a
The correct value is assigned to the register:
Bank: 1 Reg: 0x0c302038 Val: 0x0000005a → spi2_cs0_pcc3

Then I can export the pin:
echo 267 > /sys/class/gpio/export
and read the value correctly as shown:

sudo cat /sys/class/gpio/gpio267/value
1

The correct input values for that pin are read.

My question is. Is the device tree node names and setup which I provided in reply #19 and #20 correct. If the structure is correct, what would prevent the pull up from not getting initialized or possibly cleared during boot?

Malcolm

Hi,

Just want to confirm if I understand your situation.

Currently you need to manually update the bit 3:2 to set pull up so that the GPIO can work fine.

And the pinmux cfg does not take effect in PU/PD case. Is that current problem?

Are you still using gpio-hog in your device tree? I don’t think it is needed though.

Also, I would suggest you directly write the register value to the cfg file instead of putting it in the device tree. Please check if that would make your register correct from the beginning.

hi,

Yes. I manually update bit 3:2 and the pin works fine.

Yes. The current problem is that cfg file does not appear to set the PU.

I will take the gpio hog out.

With your last point, how do you write the register value to the cfg file? Here is the current value in the cfg file:
pinmux.0x0c302038 = 0x0000005a; # spi2_cs0_pcc3: rsvd2, pull-up, tristate-enable, input-enable, io_high_voltage-disable, lpdr-disable

The correct value for the register is already defined in the .cfg file.

What would you suggest to track this down?

Malcolm

Could you provide the cfg file name and how you flash it to the board here?

Hi,

The file name is: tegra19x-mb1-pinmux-3668-a01.cfg

That files is copied into /bootloader/t186ref/BCT/.
The file name is added into jetson-agx-xavier-devkit.conf and p2822-0000+p2888-0004.conf.

Is there another location where this file needs to be included?

Malcolm

Why are you saying some pinmux of NX is included in jetson AGX board confg? Added by you? or it was there by default?

I was following the default setup and added our cfg file into those files. Is this the wrong file? Which file do you suggest?

Malcolm

Did you ever know how to flash the board? Did you ever flash the board by yourself before?

Yes. We have been flashing out boards for a few months. What are you wondering?

If you are using “NX”, then you don’t need to put something into jetson-agx-xavier-devkit.conf or p2822-0000+p2888-0004.conf.

The first one is already obvious enough that is for AGX Xavier. Not Xavier NX. These two are totally different platform. Your flash to NX does not use these files at all.

OK. Is there another config file that needs to be updated? Is copying to the folder /bootloader/t186ref/BCT/ all that needs to be done?

Could you just check how you flashed the board and your board config will tell you the answer of which cfg file will be used there.

There is no need to really memorize what file should be used for NX or other platforms. Just read the board config you used in flash.

I will review the output.

If you are sure that pinmux file will be used in flash, please check if only this pin does not take effect or even other pin cannot take effect.

I will try the flash procedure now. Is there documentation that describes which configuration files needs to be changed when a new .cfg file is added

Hi,

Why are you still asking me the flash procedure? If you didn’t flash it this week, then how did you update your pinmux change exactly?

Also, you are asking something that I just answered 10 min ago.