Controlling power sleep/wake-up over GPIO expansion header (or J508 Automation Header)

The one under /boot/dtb is what you are using.

Do you beliveve I can just reflash this one with a new built dtb and reboot to use a new hardware configuration ? Regards, Xavier.

That’s depends on what release you are using.
Do you know/are you able to tell what release your board is?

nvidia@jetson-XXX:~$ uname -a
Linux jetson-0420119097873 4.9.108-tegra #2 SMP PREEMPT Wed Oct 31 15:11:49 PDT 2018 aarch64 aarch64 aarch64 GNU/Linux
nvidia@jetson-XXXX:~$ cat /etc/os-release
NAME=“Ubuntu”
VERSION=“18.04.1 LTS (Bionic Beaver)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 18.04.1 LTS”
VERSION_ID=“18.04”
HOME_URL=“https://www.ubuntu.com/
SUPPORT_URL=“https://help.ubuntu.com/
BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/
PRIVACY_POLICY_URL=“Data privacy | Ubuntu
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Hi,

I meant something like Jetpack 4.4 or 4.3 or 4.2.1.
Sorry that I really cannot tell what release you are using by just reading the date.

You should at least know what jetpack you flashed on your board, right?

or you could cat /etc/nv_tegra_release

R31 (release), REVISION: 1.0, GCID: 13195123, BOARD: t186ref, EABI: aarch64, DATE: Wed Oct 31 22:14:28 UTC 2018

Hi,

No, then I guess copy it to device will not work. Also, please do not use r31.1 anymore. rel-31.1 is a developer preview and it was released 2 years ago.

Hi,
I will reflash with Jetpack 4.4 and get back to you for the DTB rebuild. In the meantime, I cannot find the l4t kernel souces or source_sync.sh to download the kernel source and prepare a new DTB ? Regards, Xavier.

You will find it after you run Jetpack4.4 on your host. If you don’t find it, you could download source from our download center too.

Please do read the document to get familiar with how to use the flash system.

Dear @WayneWWW
I have installed Jetpack 4.3 (rel-32.3.1) and /etc/nv_tegra_release :
R32 (release), REVISION: 3.1, GCID: 18186506, BOARD: t186ref
At this point can you point me how to rebuild the DTB to make some test with GPIOs ?
Best regards, Xavier.

Hi,

Please check the kernel customization part in the document link I posted.

Hi,
i am currently correcting rebuilding the kernel from sources for tegra140 but I don’t see the DTSI for “tegra194-p2888-0001-p2822-0000” platform ?
I do see the “tegra194-p2888-0001-p2822-0000.dtb” in the output directory of the kernel built but I don’t see where is the source to be modified according to the target pinmux.
Best, Xavier.

Hi,

You could just search the file name.

Hi,
i have found it under :
“Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-0000-a00.dtsi”. From this file
Next steps should be :
1.Recompile the DTSI
“~/Linux_for_Tegra/source/public/kernel/kernel-4.9$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4 dtbs” ?
2.Copy “tegra194-p2822-0000-a00.dtb” to “/boot/dtb” ?
3.Reboot
4.Then for GPIO pinmux modifications, where should be the best location in the DTSI ?
Much regards, Xavier.

Hi,

I think you are new to jetson platform so give your some tips to know.

  1. I think the file you are copy to /boot/dtb is not correct. You need to find the 100% matched file name as the old file name.
    Also, dts is from linux kernel but not NVIDIA specific usage. You could read some rules of device tree over the internet.

  2. I am not sure why you mentioned “GPIO pinmux” here. This topic is just related to gpio-keys in kernel but has nothing to do with pinmux. If you reply the wrong topic, please use the correct one.

Dear @WayneWWW,
thanks for your continuous support.
1.I am new to Jetson Xavier platform but not to the kernel and DTS/DTB architecture nor pinmuxing, I just want to confirm the right process to get the needed GPIOs for the platform to be correctly configured with R32.3.1.
To clarify the files :

  • “/boot/dtb/tegra194-p2888-0001-p2822-0000.dtb” should be replaced by the compiled “tegra194-p2888-0001-p2822-0000.dtsi” to get the kernel using a new DTSI ? right ?

2.Hardware I/O configuration
To clarify the procedures for GPIO configuration (for instance I do need 7 analog inputs GPIOs and 2 PWM outputs GPIOs) :

  • I need to generate a new ‘*.cfg’ based on my configuration?
  • I then need to build the new DTB based on that configuration ?
  • Replace the /boot/dtb/ one ?

I read this thread : Xavier GPIO Output Enable - #4 by jchaves
but I am confused on the right procedure.
All the best, Xavier.

Hi,

To clarify the files :

  • “/boot/dtb/tegra194-p2888-0001-p2822-0000.dtb” should be replaced by the compiled “tegra194-p2888-0001-p2822-0000.dtsi” to get the kernel using a new DTSI ? right ?

Correct.

2.Hardware I/O configuration
To clarify the procedures for GPIO configuration (for instance I do need 7 analog inputs GPIOs and 2 PWM outputs GPIOs) :

  • I need to generate a new ‘*.cfg’ based on my configuration?
  • I then need to build the new DTB based on that configuration ?
  • Replace the /boot/dtb/ one ?

I would like to reply your question but you better using the correct topic and file a new topic. This topic is just for asking how to use GPIO to trigger key event. No pinmux is mentioned.

This is the forum rule. We need to align the content to match their topic.

Dear @WayneWWW,
thanks for your reply, I have created this new thread :

Much regards,
Xavier.