i.MX6 wakeup difficulties

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6 wakeup difficulties

5,895件の閲覧回数
sebastienraille
Contributor II

Dear all,

I have a custom board based on a i.MX6Quad.

I'm able to put into suspend mode the processor and to wakeup it by sending a character on the serial connection.

Now, I want wake up the processor through a specific GPIO. For that, I added this code on my device tree (This code allows the GPIO1 21 to wake up the processor) :

/* Allows the gpio21 to wakeup

   * the system in suspend to RAM

   * mode

   */

  gpio-keys {

    compatible = "gpio-keys";

    wakeup {

      label = "wakeup gpio";

      gpios = <&gpio1 21 0>;

      linux,code = <29>;

      gpio-key,wakeup;

    };

  };

Now, the processor go correctly in suspend mode but immediatly after, the processor is wake up without a signal change on the gpio.

Questions :

1) How I can know the real reason of the wake up ?

2) I understand that the irq line is shared for the GPIO1 15 to 32. So, if a interrupt appears on the GPIO1 16 for example, my processor will be wake up ? If it's the case, what is the solution to permit only ONE GPIO to wake up the processor ?

Thanks.

Regards,

Sébastien

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

2,580件の閲覧回数
akbar123
Contributor III

Hi,

I had the same problem with CAN. I could wakeup with UART, but CAN didn't work as expected.

I used a new kernel and the problem fixed:

$ git clone https://source.codeaurora.org/external/imx/linux-imx/

$ git checkout -b 4.19 remotes/origin/imx_4.19.35_1.1.0

$ make imx_v7_defconfig
$ make -j$(nproc) zImage
$ make imx6q-apalis-ixora-v1.1.dtb
$ make -j$(nproc) modules

Now I can put Linux into sleep and wake it up by sending a CAN frame to it:

Enable CAN wakeup feature:

$ cd /sys/devices/soc0/soc/2000000.aips-bus/2094000.flexcan/power

$ echo enabled > wakeup

Put Linux into sleep:

$ echo mem > /sys/power/state

Now, by using another board to send a CAN frame, I can wake up Linux

 

May be you can try a new kernel to see if the problem goes away

0 件の賞賛
返信

3,021件の閲覧回数
carlsherratt
Contributor II

You might want to make your label all one word, say "wakeup-gpio" rather than "wakeup gpio", the find the specific IRQ :-

find /proc/irq -name wakeup-gpio

which should result in for example

/proc/irq/176/wakeup-gpio 

The above says wakeup-gpio is on interrupt 176, perhaps that interrupt isn't capable of wakeup? Find one that is and then force the interrupt assignment in the device tree definition.

I have the very same problem by the way and I am currently trying to figure it out, at the moment I'm thinking the problem is either the interrupt being assigned isn't capable of wakeup from suspend OR the pin/gpio isn't capable OR the IOMUXC initialisation of the pin (e.g ( iMX6QDL_PAD_DISP0_DAT15__GPIO5_IO09    0x0b0b1 ) )  has the wrong settings to trigger the interrupt but I have nothing to prove this. If you have made progress then please update your thread.

0 件の賞賛
返信

3,021件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Sebastien

one can try to add active level parameter, like GPIO_ACTIVE_xx on

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

3,021件の閲覧回数
sebastienraille
Contributor II

Hi,

I tried with your suggestion but I have again the same problem.

Thanks for your help.

Sebastien

0 件の賞賛
返信