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

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.