Unable to set gpio pins as pull up

Hi, I am using a device tree overlay applied with jetson-io to enable gpio pins as input/output and with pull up or down. I was able to set pin 13 from pwm to input and two other pins to output. Other pins are already set as input by default but with pull down, I tried to set them as pull up, and it does not get reflected in the readings.

Jetson AGX Orin
Version: R36.4.4
Sample device tree config for pin 13
```
fragment@0 {
target = <&pinmux>;
_overlay_ {
hdr40_main_gpios: hdr40-main {
/* PR.00 (pin 13) - INPUT w/ PU */
hdr40-pin13 {
nvidia,pins = “soc_gpio37_pr0”;
nvidia,function = “gp”;
nvidia,tristate = <1>; /* input/Hi-Z */
nvidia,enable-input = <1>;
nvidia,pull = <2>; /* 2 = pull-up */
};
```

Can all gpios that work as input from the 40pin header support pull up? and what is the proper device tree overlay configuration for this?

Best regards

*** Please note that this reply is generated by LLM automatically ***

I’d be happy to help you with your question.

Firstly, it’s great that you’re using a device tree overlay to configure the GPIO pins on your Jetson AGX Orin module. The device tree is a powerful tool for configuring the hardware on your module.

Regarding your question, not all GPIO pins that work as input from the 40-pin header support pull-up or pull-down configurations. The support for pull-up or pull-down configurations depends on the specific GPIO pin and its configuration.

In your case, you’ve successfully set pin 13 from PWM to input with a pull-up configuration using the device tree overlay. However, when you try to set other pins that are already configured as input by default to pull-up, it doesn’t get reflected in the readings.

To answer your question, the proper device tree overlay configuration for enabling pull-up or pull-down on GPIO pins that work as input from the 40-pin header depends on the specific GPIO pin and its configuration.

Here are some general guidelines:

  1. Check the Jetson AGX Orin module’s datasheet or documentation to see which GPIO pins support pull-up or pull-down configurations.
  2. Use the nvidia,pull property in your device tree overlay to specify the pull-up or pull-down configuration for a specific GPIO pin. For example:
fragment@0 {
    target = <&gpio>;
    __overlay__ {
        hdr40maingpios {
            pin-13 {
                nvidia,pull = <2>; /* pull-up */
            };
        };
    };
};

In this example, the nvidia,pull property is set to <2>, which enables pull-up on pin 13.

  1. Make sure to use the correct GPIO pin number and configuration in your device tree overlay. You can use the gpio command-line tool to verify the GPIO pin configuration on your module.

Comparing your device tree overlay configuration for pin 13, it looks like you’re using the correct syntax and properties. However, you may want to double-check the GPIO pin number and configuration to ensure that it matches the documentation and your module’s configuration.

If you’re still having issues, you may want to try using the gpio command-line tool to verify the GPIO pin configuration on your module. You can also try using a different pull-up or pull-down configuration to see if it makes a difference.

I hope this helps! Let me know if you have any further questions or need more assistance.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi daniel.gonzalez3,

You can use the overlay to configure its pinmux but you may not be able to configure them as Input or Output.
We would suggest using pinmux spreadsheet to configure the pinmux and their status. There would be both pinmux and gpio dtsi generated to be used in MB1.

The overlay you generated now is for the pinctrl driver to load in kernel boot.

How do you read them? Is your issue specific to PIN13 of 40-pins header?

Hi @KevinFFF thanks for answer, I’ve been able to configure a couple of gpios as output, which didn’t work before with gpioset and gpioget commands, as well as in python toggleling and reading output/input pins, this is with dtb overlay applied with jetson-io. Is there a way to configure pinmux spreadsheet without using windows/microsoft excel? Also in the spreadsheet i see the Pin state, but it does not have a drop down menu, as the other sections:

image

Sorry that the answer is NO currently. It needs the macro functions in excel to generate the pinmux dtsi.

The Pin State column can not be configured. Please configure Req. Initial State column instead.
Drive 0 for default LOW, Drive 1 for default HIGH.

Hi @KevinFFF , thanks for that input, from this table if the pin is expected to work as input the more appriate value for pull up would be Int PU?

Also, can you tell if the voltage tolerance read from the pinmux spreadsheet applies as well to the 40pin header when using devkit? So to get the 3.3V tolerance for these pins still neccesary to use the pinmux spreadsheet?

Best regards

Yes, you can either configuring Z, Int PU or Int PD for an input pin.

Yes, the pinmux configurations are available for all pins including the pins on 40-pins expansion heaer.
Please use pinmux spreadsheet to configure them.

Sorry my second question was more like, the default tolerance is disabled by default for the pins that applies to, inlcuding pins in the 40pin header? Is this correct?

Please refer to the schematics for the carrier board Jetson AGX Orin Developer Kit Carrier Board Design Files (A05) Log in | NVIDIA Developer

Most 40 pin header signals go through 3V3 level shifte on the carrier board. However, they are 1V8 signals from Orin SOC perspective as so 3V3 tolerance is not needed for these signals.

gpio dtsi should be included in pinmux dtsi.

It is expected, you just need to put them to the correct directory.
(i.e. Copy the pinmux.dtsi file to the <l4t_top>/bootloader/generic/BCT/ directory, and copy the gpio.dtsi file to the <l4t_top>/bootloader/ directory.)