Even after pinmux dtsi file flashiing, GPIO is not functioning

I have done these steps→

1). Generated these files→

  • pinmux.dtsi

  • gpio.dtsi

  • padvoltage.dtsi

2). Copy the padvoltage.dtsi and pinmux.dtsi files to the <l4t_top>/bootloader/generic/BCT/ directory and copy the gpio.dtsi file to the <l4t_top>/bootloader/ directory.

3).

  1. Update or create a board .conf file to point to the new files (or overwrite the old .conf).

  2. Put Jetson in recovery mode (power off, connect USB-C).

  3. Flash Jetson using:

cd ~/jetson_bsp/Linux_for_Tegra
sudo ./flash.sh jetson-orin-nano-devkit mmcblk0p1

But stil at the end. My GPIO pin didn’t worked.
Tell me where I’m doing mistake?

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

Based on the provided context, it seems like you are trying to configure GPIO pins on a Jetson Orin Nano device. However, after following the steps you mentioned, the GPIO pin is not working as expected.

To help you identify the issue, let’s break down the steps you’ve taken:

  1. You generated the pinmux.dtsi, gpiodtsi, and padvoltagedtsi files. These files are likely related to the device tree configuration, which defines the hardware components and their connections on the Jetson Orin Nano.
  2. You copied the padvoltagedtsi and pinmux.dtsi files to a specific directory. This directory is likely where the device tree configuration files are stored.
  3. You updated the file ( likely a configuration file) to point to the new pinmux.dtsi and padvoltagedtsi files or overwrote the old files.

However, after completing these steps and powering off the device, connecting it via USB-C, and rebooting, the GPIO pin is still not working.

Here are a few potential issues to consider:

  • Device tree compilation: After updating the device tree configuration files, you need to recompile the device tree. This step is crucial to ensure that the changes are applied to the device. You can use the dtc (Device Tree Compiler) tool to compile the device tree.
  • Kernel configuration: The GPIO pin configuration might be dependent on the kernel configuration. Ensure that the kernel is configured to support the GPIO pin you are trying to use. You can check the kernel configuration using the make menuconfig command.
  • Device tree overlay: If you are using a device tree overlay, ensure that it is correctly configured and applied. A device tree overlay is a way to modify the device tree configuration without recompiling the entire device tree.
  • GPIO pin configuration: Double-check that the GPIO pin is correctly configured in the device tree configuration files. Ensure that the pin is set as an output and that the correct voltage level is applied.
  • Power management: Some GPIO pins might be controlled by power management features, such as wake-up or reset signals. Ensure that the GPIO pin is not being controlled by these features.

To further troubleshoot the issue, you can try the following:

  • Check the kernel logs for any errors related to the GPIO pin configuration.
  • Use the gpio command-line tool to verify that the GPIO pin is correctly configured and exported.
  • Try using a different GPIO pin to rule out any issues with the specific pin you are trying to use.

If none of these suggestions help, please provide more information about your setup, including the device tree configuration files and the kernel version you are using. This will help me provide a more detailed and accurate solution to your problem.

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

Just want to clarify that. What is the exact file you copy into <l4t_top>/bootloader/generic/BCT/?

pinmux.dtsi and padvoltage.dtsi file.

and at this loc→ <l4t_top>/bootloader/ I’m copying the gpio.dtsi file.

Then I opened the .conf file using this command→
gedit ~/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nano-devkit.conf

made these changes-
PINMUX_CONFIG=bootloader/generic/BCT/pinmux.dtsi
PADVOL_CONFIG=bootloader/generic/BCT/padvoltage.dtsi
GPIO_CONFIG=bootloader/gpio.dtsi

Then flashed using this command→
cd ~/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra
sudo ./flash.sh jetson-orin-nano-devkit mmcblk0p1

But while flashing I’m getting this→

###############################################################################

L4T BSP Information:

R36 , REVISION: 4.4

User release: 0.0

###############################################################################
ECID is 0x80012344705E01DE2C00000018028180

Target Board Information:

Name: jetson-orin-nano-devkit, Board Family: generic, SoC: Tegra 234,

OpMode: production, Boot Authentication: NS,

Disk encryption: disabled ,

###############################################################################
copying device_config(/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-device-p3767-0000.dts)… done.
copying misc_config(/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-misc-p3767-0000.dts)… done.
copying emc_fuse_dev_params(/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-br-bct-diag-boot.dts)… done.
copying minratchet_config(/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-ratchet-p3767-0000.dts)… done.
Existing emcfuse(/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/fuse_t234.xml) reused.
./tegraflash.py --chip “0x23” --applet “/home/nikita/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/mb1_t234_prod.bin” --skipuid --cfg readinfo_t234_min_prod.xml --dev_params tegra234-br-bct-diag-boot.dts --device_config tegra234-mb1-bct-device-p3767-0000.dts --misc_config tegra234-mb1-bct-misc-p3767-0000.dts --bins “mb2_applet applet_t234.bin” --minratchet_config tegra234-mb1-bct-ratchet-p3767-0000.dts --cmd “readfuses fuse_t234.bin fuse_t234.xml; dump eeprom cvm cvm.bin; dump try_custinfo custinfo_out.bin; reboot recovery”
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[ 0.0036 ] Reading fuses
[ 0.0050 ] tegrasign_v3.py --key None --getmode mode.txt
[ 0.0052 ] Assuming zero filled SBK key
[ 0.0049 ] Pre-processing config: tegra234-mb1-bct-device-p3767-0000.dts
Error: Return value 1
Command cpp -nostdinc -x assembler-with-cpp -D IN_DTS_CONTEXT -I .. -I ../generic/BCT tegra234-mb1-bct-device-p3767-0000.dts tegra234-mb1-bct-device-p3767-0000_cpp.dts
[ 0.0114 ] tegrasign_v3.py --key None --getmode mode.txt
[ 0.0115 ] Assuming zero filled SBK key
[ 0.0112 ] Pre-processing config: tegra234-mb1-bct-device-p3767-0000.dts
Error: Return value 1
Command cpp -nostdinc -x assembler-with-cpp -D IN_DTS_CONTEXT -I .. -I ../generic/BCT tegra234-mb1-bct-device-p3767-0000.dts tegra234-mb1-bct-device-p3767-0000_cpp.dts
Reading board information failed.

Please help me @WayneWWW I’m stuck with this problem for so long!!

There is nothing called “PADVOL_CONFIG” in use in our tool… but only PMC_CONFIG.

The issue here is you just created some field that is totally not in use at all…

There is nothing called “GPIO_CONFIG” either.

You could read default config file to know what file is in use default and then rename your generated dtsi file to that name and replace them.

yes, I found only → PINMUX_CONFIG, PMC_CONFIG in .config file not the gpio one.

So I did this→

PINMUX_CONFIG=bootloader/generic/BCT/pinmux.dtsi;
PMC_CONFIG=bootloader/generic/BCT/padvoltage.dtsi;
GPIO_CONFIG=bootloader/gpio.dtsi;

as suggested by chatgpt.

you could really just read the default setting by yourself… GPT might not be correct…

Also, again, there is nothing called “GPIO_CONFIG”. This one is dummy.

gpio.dtsi is a file included by pinmux.dtsi… so make sure pinmux.dtsi really can locate where is your “gpio.dtsi”.

So, what should I do?

I just change these two→
PINMUX_CONFIG=bootloader/generic/BCT/pinmux.dtsi;
PMC_CONFIG=bootloader/generic/BCT/padvoltage.dtsi;
@WayneWWW ?
please tell me where I’m doing mistake

@WayneWWW ?

show us what is the first few line in your pinmux.dtsi first.

/dts-v1/;
include “pinctrl-tegra.h”

include “./Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi”
/ {
pinmux@2430000 {
pinctrl-names = “default”, “drive”, “unused”;
pinctrl-0 = <&pinmux_default>;
pinctrl-1 = <&drive_default>;
pinctrl-2 = <&pinmux_unused_lowpower>;

	pinmux_default: common {
		/* SFIO Pin Configuration */
		shutdown_n {
			nvidia,pins = "shutdown_n";
			nvidia,function = "shutdown";
			nvidia,pull = <TEGRA_PIN_PULL_NONE>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
			nvidia,lpdr = <TEGRA_PIN_DISABLE>;

Are you sure you include a file called "Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi”?

This should be renamed to your actual gpio.dtsi file name.

Yes, when I generated the file it was named→
Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi
then I changed it’s name to pinmux.dtsi

so you need to change the content to “gpio.dtsi” too because you renamed that “Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi” to gpio.dtsi…

I actually didn’t get what you try to indicate from the namings→

I did these changes:
Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi → gpio.dtsi
Orin-jetson orin nano&nx pinmux dp-padvoltage-default.dtsi → padvoltage.dtsi
Orin-jetson orin nano&nx pinmux dp-pinmux.dtsi→ pinmux.dtsi

Your “pinmux.dtsi” is trying to include a file called “Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi”.

So when trying to flash, tool will go to search “Orin-jetson orin nano&nx pinmux dp-gpio-default.dtsi” but it could not find anything there.

The reason here is because it is indeed no file has this name… because you changed the file name to “gpio.dtsi”.

So, I will not rename those files, and follow all the steps. and then let you know the result

or you could just modify your pinmux.dtsi content to just include your renamed “gpio.dtsi”.

yes, this makes sense