Hi,
We actually are testing an Apalis-imx6 module on an Ixora carrier board and want to implement the power off function based on explanation from High performance, low power Embedded Computing Systems | Toradex Developer Center
So far, kernel is built with the required config (CONFIG_POWER_RESET_GPIO) and the device tree is modified with:
gpio-poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
The power off GPIO we are using is the GPIO1 defined on the Ixora board as MX6QDL_PAD_NANDF_D4__GPIO2_IO04 connected on the MXM3 pin 1 (X27 connector pin 13 on Ixora board).
Actually the GPIO is not triggered at all and we are not sure about the <&gpio2 4
that we put in the device tree. How can we find the relationship between the MX6QDL_PAD_NANDF_D4__GPIO2_IO04
pad and the gpio bank/numbers that should be used in the device tree?
We can successfully power off the board by triggering manually the gpio by doing
echo 36 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio36/direction
echo 1 > /sys/class/gpio/gpio36/value
Thanks