R32.3.1 tx2-4g Orderly shutdown with external power button

Lots of documentation on how to wire up an external power button, does not seem to be any info on what is needed in the software side.

I have a tail -f /var/log/syslog running and I press my power button, no messages.

I hold the power button down and the system power down, no messages

Would really like to see a message saying the button push was seen and such.

ORDERLY SHUTDOWN is the key here.

Thanks,
Terry

hello terrysu50z,

please access Jetson TX2 Series OEM Product Design Guide and check [Figure 10. Power Down Sequence] for reference.

Did not have any software information in the OEM Product Design Guide.

Thanks for another WORTHLESS response after I clearly asked about the software side of the process.

How on the SOFTWARE side do I determine if the hardware guy has done the correct thing?

Should I see anything in syslog or just the power terminating.

How does an orderly software shutdown process get started because of the hardware.

Thanks I think,
terry

Does tegra186-ahc control the power down signals?

in the device tree it is looking at gpio-312 which is part of the this ahc@290b900 {
compatible = “nvidia,tegra186-ahc”;
status = “okay”;
interrupt-parent = <0x4b>;
interrupts = <0x0 0x38 0x4 0x0>;
phandle = <0x137>;
reg = <0x0 0x290b900 0x0 0x200>;
linux,phandle = <0x137>;
};

looks like r32.3.1 removed this driver because of 210 compile errors.

Terry

So it looks like tegra186-ahc is not handling the gpio

I found how does nvidia monitor input3?
[ 2.054892] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 2.055024] gpio tegra-gpio-aon wake67 for gpio=57(FF:1)
[ 2.055207] gpio tegra-gpio-aon wake68 for gpio=58(FF:2)
[ 2.055438] input: gpio-keys as /devices/gpio-keys/input/input3

Terry

found this Jetson TX2 Power Button Event Not working

looks like no interrupt on the power gpio, what do I need to look at, this thread kind of missed a solution.

Terry

so my hardware guy says they connected to gpio3_PI.04, is that correct, and what is suppose to be connected to gpio3_PFF.00?

Still waiting for pointer/information on the software side of orderly shutdown based on power button.

Thanks,
Terry

hello terrysu50z,

power off sequence is done by BPMP.

there’s device tree property settings for FPS (Flexible Power Sequencer) configurations,
the FPS configuration helps in maintaining power downs sequence happen on system.
please check kernel documentation for reference,
i.e. $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/Documentation/devicetree/bindings/mfd/max77620.txt

for example,
there’s setting, shutdown-fps-time-period-us, you can configure from the software side for the shutdown time.

so I have r32.3.1 on a tx2-4g, what device tree files do I change to make this work.

It looks like it is disabled in my device tree?

Terry

so my hardware guy says they connected to gpio3_PI.04, is that correct, and what is suppose to be connected to gpio3_PFF.00?

Still waiting for pointer/information on the software side of orderly shutdown based on power button.

Thanks,
Terry

enabled the fps stuff, DID not work, no messages in syslog, when I pushed power button, held the power button down and the system powered off, no messages in syslog.

Waiting for another thing to chase!

Terry

please check Jetson TX2 Series Pinmux for v1.08 version.
you should check the last column for the customer usage, it’s GPIO3_PFF.00. for POWER_BTN#

Pin H13, GPIO8_ALS_PROX_INT, is attached to my power button, how/what do I need to do to make tx2 do a orderly shutdown, or even ask what to do now that the button is pushed.

Terry

hello terrysu50z,

it’s a GPIO pin, can you toggle high/low to control your board?
you may also refer to standard APIs to access GPIOs from kernel side.
for example,
$L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/include/linux/gpio.h

static inline int gpio_get_value(unsigned int gpio)
{
        return __gpio_get_value(gpio);
}

static inline void gpio_set_value(unsigned int gpio, int value)
{
        __gpio_set_value(gpio, value);
}