I am using PN7150 with custom board based on imx6ul evk. I am using following configuration in dts for PN7150 driver
pn547: pn547@28 {
compatible = "nxp,pn547";
reg = <0x28>;
clock-frequency = <400000>;
interrupt-parent = <&gpio1>;
interrupt-gpios = <&gpio1 30 0>;
enable-gpios = <&gpio1 25 0>;
};
Can I use PN7150 interrupt gpio(gpio 1 30) to wake up my board from sleep at the same time using as PN7150 irq? if yes then how? I tried adding wake up configuration from interrupt on gpio1 30 in following manner
wakeup1 {
label = "wakeup1 gpio";
gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
linux,code = <29>;
gpio-key,wakeup;
};
But after adding this configuration in my dts the PN7150 library doesn't work. The demo program just exits after starting.
Hello Pratyush,
Try following configuration in your device tree:
wakeup1 {
label = "wakeup1 gpio";
interrupt-parent = <&gpio1>;
interrupts = <30 IRQ_TYPE_LEVEL_HIGH>;
wakeup-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
};
Have a great day,
TIC Weidong Sun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello I tried settings mentioned by you in following manner
gpio-keys { /* WAKE UP BOARD */
compatible = "gpio-keys";
wakeup {
label = "wakeup gpio";
gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
linux,code = <29>;
gpio-key,wakeup;
};
wakeup1 {
label = "wakeup1 gpio";
interrupt-parent = <&gpio1>;
interrupts = <30 IRQ_TYPE_LEVEL_HIGH>;
wakeup-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
};
};
But it's not working. I start my nfcdemoapp and sleep after "waiting for tag" step. Now when I bring tag near nfc the interrupt is generated on gpio1 30. But this doesn't wake up my board. Any suggestion?