Issue with gpio pinmuxing on Orion NX 16GB module

HI,

We have modified the file “tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi” under the
<l4t_top>/bootloader/generic/BCT/ folder for pin number PQ05 as “Bidirectional” ( so that we can use it as both input and output ) which inturn reflects as “nvidia,tristate = <TEGRA_PIN_DISABLE>;” in the below device tree node as per pinmux sheet dtsi files generation observation:

soc_gpio32_pq5 {
			nvidia,pins = "soc_gpio32_pq5";
			nvidia,function = "rsvd0";
			nvidia,pull = <TEGRA_PIN_PULL_UP>;
			**nvidia,tristate = <TEGRA_PIN_DISABLE>;**
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			nvidia,lpdr = <TEGRA_PIN_DISABLE>;
		};

But even after reflashing , after building DTB files, we are not able to see the modified value set to this gpio pin which is configured as “bidirectional”

we have used the below link to refer to the commands that should be used:

https://kernel.googlesource.com/pub/scm/libs/libgpiod/libgpiod/+/v0.2.x/README.md

we used following get and set commands:

Kindly let us know, if we are missing some things here?/

why our value set “0” and “1” are not getting reflected

Additional details:

The two pins we are trying to use for GPIO purpose ( both input and output) are PZ.01 and PQ.05

They have the total offset of 131 and 105 as per the formula provided in the website.

with devmem busybox method of modifying the register values directly, let us know how to find the exact address location and value to be modified.

This is not an issue. It is just you used it in wrong way.

When you run “gpioget”, it will by default running a command to “set gpio as input”.

Thus, you cannot use gpioget to check your gpio output status. Use /sys/kernel/debug/gpio to check.

then, when you run “gpioset”, will it be running a command to “set gpio as output”

pls clarify.

Please provide us working commands to check the gpio output state toggling between 0 and 1 using gpioset command and how to verify it using multimeter

we see no values updated for PZ.01 and PQ.05 as shown below:

You get this information with gpioset -h:

Note: the state of a GPIO line controlled over the character device reverts to default
when the last process referencing the file descriptor representing the device file exits.
This means that it's wrong to run gpioset, have it exit and expect the line to continue
being driven high or low. It may happen if given pin is floating but it must be interpreted
as undefined behavior.

Hence, it’s meaningless to check the pin with gpioget after gpioset returns, regardless of whether it’s turned into an input pin or not.
Use a multimeter of GPIO sysfs when gpioset is still running to check the pin status.

Please provde sample commands for this with mode parameter set to time

Because with mdoe parameter set to Wait, we see there is no change on the multimeter reading after executing gpioset command, with values changed between 0/1.

Also we are using busybox devmem method to modify register values, as pin muxing method did not work out for us.

Should the tristate should be set to “disable”, for output or birectional type?

Run something like this and then check your GPIO sysfs…

 gpioset -m time -s 180 $(gpiofind PAA.03)=1

gpioset will only run for a moment and then it will go back to default setting… thus, you need to give a time to it.

1 Like

with this we can see the updated 0/1 values are getting reflected when we check with the cat command
cat /sys/kernel/debug/gpio

but still we are not able to see the modified values on the multimeter.

Any idea what might be the issue?

One more observation:

we are observing that, even though we are configuring the register values as gpio type using busybox command, it is getting reset to SFIO after some time( which we think might be causing the problem, where values are not getting reflected in the multimeter)

the value which we wrote was “0x00000008” ( for PQ.05) and “0x00000049”( for PZ.01) but it has changed( i.e, GPIO has changed to SFIO) to “0x00000408” and “0x00000449”

any idea what may be the reason for this??
Is the device tree stuff overriding the changes performed using busybox??

In the documentation is clearly given to change the bit number 10 → to gpio as shown below:
so the value we are writing is "0x00000008’ , but it changes to “0x00000408” during our gpio set operation…

More details:

The register address for PZ.01 is 0x0243d0b0
The register address for PQ.05 is 0x02430068

after calculating as per TRM document.

Also, Please let us know, if these address are correct.

@WayneWWW @DaveYYY

Please provide response to the above queries

  1. Why busybox updates are getting modified later?
  2. Is some thing( like kernel driver related to gpio sysfs driver/etc is changing/overriding the register values for the gpio?
  3. Is there any modification I should do so that GPIO does not change to SFIO in Bit number 10?

We are aware of the GPIO/SFIO issue and we have been tracking it, so please wait for our updates.
Maybe it’s some bug in the pinctrl driver.

1 Like

Ok fine. Thanks for the updates.

I would be informing our team that we are not able to see the updates of gpio output on multimeter due to this. We are waiting for further updates from Nvidia support team to fix this issue.

Please confirm if this GPIO/SFIO issue is related to gpio ouput 0 and 1 updates not seen on multimeter??

Because, what i observe is, during the gpioset operation, we see the register value shows bit 10 as “gpio”, but once we exit the gpioset command, it changes to “1” - SFIO enabled. Very weird.

@WayneWWW @DaveYYY

Please can you respond to this point and confirm so that we can move to previous Release 35.4.1 and flash that version so that gpio works properly.

Actually we don’t think this GPIO → SFIO things in register would affect the GPIO functionality…

It is okay to test if your hardware is fine on rel35.5 first

I tried downloading this version of linux release 35.5, but getting build error at first stage itself

I have raised a thread for this, can you please look in to it.

Thanks.

I also have the same problem with the Jetson Orin Nano Developer kit (8GB)… even after changing the pinmux. No voltage showed in the multimeter… but the PINs works well when they are setted as INPUT.

Can you explain this in detail. How are you testing the input gpio pins…

Because for us even input is also not working.
We are providing input through power supply and ground and checking it using gpioget command

After flashing l4t version release 35.5 on the same hardware unit Orion NX, we were able to successfully test both gpio input and output.

so definitely it looks like some pincontrol/gpio driver issue on Jetpack release 6.0( l4t 36.3).

1 Like