Configuration for wake up event

Continuing the discussion from Configuration for wake up event:

I don’t really see the point where all threads here are closed and you have to create a new thread. 🤔

However, I now have been able to recompile the Linux kernel and I need to get on with the task to modify it but I probably need more guidance here.

Based on the information provided, I’m inclined to add the following line of code for the PP.06 wake pin:

TEGRA_WAKE_GPIO("power", 32, 1, TEGRA234_AON_GPIO(PP, 6)),

From my understanding, TEGRA234_MAIN_GPIO(PP, 6) would imply port-PP and pin-6, which seems to align correctly. Regarding the TEGRA_WAKE_GPIO() function, I’m uncertain about using 32 instead of another value. Additionally, I’m unsure whether to use 1 or 0 to indicate active high/low for the GPIO. Can you provide further clarification on these parameters?"

This is actually forum system setting.

From my understanding, TEGRA234_MAIN_GPIO(PP, 6) would imply port-PP and pin-6, which seems to align correctly. Regarding the TEGRA_WAKE_GPIO() function, I’m uncertain about using 32 instead of another value. Additionally, I’m unsure whether to use 1 or 0 to indicate active high/low for the GPIO. Can you provide further clarification on these parameters?"

The third parameter of TEGRA_WAKE_GPIO is the instance of the GPIO group.

- For a AON GPIO, it must be 1.
- For a MAIN GPIO, it must be 0.

The 32 here is the wake # you saw in the spreadsheet.

For example,
Power Button (POWER_BTN_N) - GPIO3_PEE.04 - wake29. Then it has to fill in “29”.

Thank you for the clarification on the third parameter of TEGRA_WAKE_GPIO . I understand that the value ‘32’ corresponds to the wake number from the spreadsheet. My question is, doesn’t each GPIO require a unique wake number? Additionally, if we intend to use PP.06, I believe the correct syntax might be PPP.06, where the first ‘P’ denotes the port and the subsequent characters indicate the port number. Could you please confirm or correct my understanding?"

Yes, each gpio has it own unique number.

PPP.06, where the first ‘P’ denotes the port and the subsequent characters indicate the port number. Could you please confirm or correct my understanding?"

Yes, this is correct.

1 Like

Thank you for quick response. Now I only have to try this out. 👍

I was about to try out to add this line of code:
TEGRA_WAKE_GPIO(“power”, 29, 1, TEGRA234_AON_GPIO(PPP, 6)),
But, then we realized that 29 is already connected to GPIO3_PEE.04 and we need something else?

I think you didn’t get the point…

“29” is not a magic number that every pin should use… Only my example GPIO3_PEE.04 is using wake29…

You need to check your pinmux spreadsheet to know the wake #… but not just copy the 29 to your case…

Also, there is no pin “PPP,6”… Only P,6…

There is no such port called “PP”.

P,6 is not a AON GPIO either… Thus, I am not quite sure what pin you want to use.

Appreciate your help! It seems I may have missed the mark on this, but we’re putting in our maximum effort. I’ve incorporated the following line:

TEGRA_WAKE_GPIO("pp06_wake", 37, 1, TEGRA234_AON_GPIO(PP, 6)),

Despite modifying the code, recompiling the kernel, updating the modules, we still haven’t managed to successfully wake up Orin with this pin. We basically are fumbling in the dark here.

What is the exact pin you are going to use here? As I already told, there is no pin called “PP,6”
Only P,6…

Just to clarify, basically you didn’t do anything right after these 2 weeks.

P,6 is not a pin in AON gpio either.

thank you for share with us.

Thank you for the prompt response. Although I haven’t dedicated full-time efforts to this issue over the past two weeks, it has now become a priority to address. Below are the key details extracted from row 90 of the pinmux spreadsheet for GPIO03_PP.06:

  • General Information:

    • Physical pin: J55
    • SoC level identifier: SOC_GPIO25
    • Wake-up signal: wake37 (noting the hidden column)
  • Power & Configuration:

    • Power rail: vddio_g3
    • Configuration Flags: PULL_DOWN, ENABLE
  • Usage & Direction:

    • Designation: GPIO3_PP.06
    • Direction: Input
    • Status: Active
  • DevKit Usage:

    • High-level function: M.2 E Bluetooth wake AP

I am seeking confirmation on these parameters to ensure the accurate configuration of GPIO03_PP.06 as a wake-up source.

Please check this header file.

If your pin is not a AON (always-on) GPIO, then you cannot use TEGRA234_AON_GPIO. You have to use TEGRA234_GPIO.

There is no need to write “pp,6” as parameter. If your pin is p,6 then write p,6 to your TEGRA234_GPIO.

I’ve made the update based on the tegra234-gpio.h file and our previous discussion. Here’s the revised line of code:

TEGRA_WAKE_GPIO("p06_wake", 37, 1, TEGRA234_MAIN_GPIO(P, 6)),

I utilized TEGRA234_MAIN_GPIO following your instructions for non-AON GPIOs. Please verify if this adjustment is consistent with the Tegra234 GPIO definitions. It might be worth a new test-run?

Let’s back to my post on this day and you should read it to check each field …

Because you still have wrong parameter…

must acknowledge that navigating the pinmux spreadsheet and correlating it with the Orin’s source code presents a considerable challenge for us, especially the complex details of pin configurations.

Our primary requirement is a GPIO pin that supports the wake-up functionality. We initially considered GPIO3_PP.06, but we are open to alternatives that meet our needs. If you could guide us towards a compatible GPIO pin or provide a straightforward explanation, that would be immensely helpful. We’re seeking basic, step-by-step assistance to ensure we grasp and apply this knowledge correctly.

To clarify, our essential requirement is a ‘Wake Pin: Yes’ feature for the pin in question.

I didn’t mean anything challenging here. I just wanted to say your third parameter is wrong.

It is just either 0 or 1.

Just want to clarify again. If I don’t guide you to find the answer this way, you would come back again next time when you just want to switch to another pin. But honestly this things are all the same and repeating one.

Pinmux is also a basic one for developing your own custom board.

Please try to ask a question based on your understanding, but not keep seeking me to help you out directly. I am not your colleague or coworker.

Here’s the updated code line based on our latest understanding:

TEGRA_WAKE_GPIO("power", 37, 0, TEGRA234_MAIN_GPIO(P, 6)),

Additionally, we believe that this is a common requirement for many developers working with Orin, so any guidance you provide will not only assist us but potentially many others in the community who are looking to wake up Orin with a hardware signal. I didn’t expect to recompile the linux core to achieve this ;)

Also, if I wish to deepen my understanding as I clearly fumbling here, where might I find that information? Any recommendations for additional forum threads or documentation would be greatly appreciated.