Unable to convert 40-pin header pin to output, Jetson Orin Nano

Hi,

I have been trying hard to get the pins 16, 18 and 32 to output but failing. The issue I am facing is that after applying the overlay using jetson-io.py the pins do not respond properly when changed gpioset from command line. It sometimes toggle and sometimes it wont. I am using multi-meter to measure the voltage. But one interesting thing that I have seen is that If I make a gpio on 40 pin header as input and read any of the above gpios using it, it shows high and low states and even logic analyzer shows that but not the DMM and if I put some load on it, it also doesn’t toggle properly.

This is my dts for the overlay.

/dts-v1/;
/plugin/;

/ {
    jetson-header-name = "Jetson 40pin Header";
    overlay-name = "My Custom Header 1.0";
    compatible = "nvidia,p3768-0000+p3767-0000\0nvidia,p3768-0000+p3767-0001\0nvidia,p3768-0000+p3767-0003\0nvidia,p3768-0000+p3767-0004\0nvidia,p3768-0000+p3767-0005\0nvidia,p3768-0000+p3767-0000-super\0nvidia,p3768-0000+p3767-0001-super\0nvidia,p3768-0000+p3767-0003-super\0nvidia,p3768-0000+p3767-0004-super\0nvidia,p3768-0000+p3767-0005-super\0nvidia,p3509-0000+p3767-0000\0nvidia,p3509-0000+p3767-0001\0nvidia,p3509-0000+p3767-0003\0nvidia,p3509-0000+p3767-0004\0nvidia,p3509-0000+p3767-0005";

    fragment@0 {
        target-path = "/bus@0/spi@3230000";
        __overlay__ {
            status = "disabled";
        };
    };

    fragment@1 {
        target = <&pinmux>;
        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = <&jetson_io_pinmux>;
            
            jetson_io_pinmux: exp-header-pinmux {
                
                hdr40-pin12 {
                    nvidia,pins = "soc_gpio41_ph7";
                    nvidia,tristate = <0x0>;
                    nvidia,enable-input = <0x0>;
                    nvidia,pull = <0x0>;
                    nvidia,lpdr = <0x0>;
                };
                
                hdr40-pin16 {
                    nvidia,pins = "spi3_cs1_py4";
                    nvidia,tristate = <0x0>;        
                    nvidia,enable-input = <0x0>;   
                    nvidia,pull = <0x0>;
                    nvidia,io-high-voltage = <0x1>;
                    nvidia,lpdr = <0x0>;
                };

                hdr40-pin18 {
                    nvidia,pins = "spi3_cs0_py3";
                    nvidia,tristate = <0x0>;        
                    nvidia,enable-input = <0x0>;  
                    nvidia,pull = <0x0>;
                    nvidia,io-high-voltage = <0x1>;
                    nvidia,lpdr = <0x0>;
                };

                hdr40-pin32 {
                    nvidia,pins = "soc_gpio19_pg6";
                    nvidia,tristate = <0x0>;
                    nvidia,enable-input = <0x0>;
                    nvidia,pull = <0x0>;
                    nvidia,io-high-voltage = <0x1>;
                    nvidia,lpdr = <0x0>;
                };
                
                
            };
        };
    };
};

Hi sarim.jalil,

Are you using the devkit or custom board for Orin Nano?
What’s the Jetpack version in use?

It seems you want to control pin from 40-pins expansion header.
Have you configured the pinmux before use?
e.g. if you want to control PIN16 of 40pins header.


You have to configure it as GPIO/Output/Drive 0 or 1 in pinmux spreadsheet as following:
image

I am using devkit.

and the jetpack version I am using is 6.2.1.

Yes I want to control pins from 40-pin header. I have on jetson nano by changing the device tree and rebuilding the kernel and flashing the board with it but not through an overlay and not on jetson orin nano.

Yes I know this method but it will require me to build the device tree with source and flashing it thorugh flash.sh utility, am I right?

My questions are

1- Cant it be done through a device tree overlay?

2- If I place the files generated through pinmux excel sheet and place in the folder

nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/sources/kernel/kernel-jammy-src/arch/arm64/boot/dts/nvidia

and add the files as #include <generated files name>.dtsi in tegra234.dtsi then I get errors for header files like #include “tegra234-gpio.h” and #include “pinctrl-tegra.h” not found while running make.

Please note that Jetson Nano(T210) and Orin Nano(T234) are from different SoC series with different Jetpack releases.

Correct, the pinmux/gpio dtsi are loaded in early boot stage(MB1) rather than kernel so it is required to perform flashing to apply the change.

I know this and I am doing changes for T234.

CAn you please guide m e how to add the generated pinmux files into the source DTS to build the DTS and flash.

You don’t need to add them to any “source DTS”.

Please simply refer to Jetson AGX Orin Platform Adaptation and Bring-Up — NVIDIA Jetson Linux Developer Guide to apply the change.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.