hi,
I want to wakeup my system from sleep mode (echo mem>/sys/power/state) when press the powerkey which connect to the imx6sl ONOFF pin.
but it failed. the chip of imx7d can achieve this function.
Is imx6sl's ONOFF key didn't has the function wakeup system.
my software environment: yocto L4.1.15_2.1.0-ga.
hardware envionment mcimx6slevk
modify the imx6sl.dtsi as follow:
snvs: snvs@020cc000 {
compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
reg = <0x020cc000 0x4000>;
snvs_rtc: snvs-rtc-lp {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
regmap = <&snvs>;
offset = <0x34>;
interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>,
<0 20 IRQ_TYPE_LEVEL_HIGH>;
};
snvs_pwrkey: snvs-powerkey {
compatible = "fsl,sec-v4.0-pwrkey";
regmap = <&snvs>;
interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
linux,keycode = <116>;
gpio-key,wakeup;
};
snvs_poweroff: snvs-poweroff {
compatible = "syscon-poweroff";
regmap = <&snvs>;
offset = <0x38>;
mask = <0x61>;
status = "disabled";
};
};
thandks & best regards.
Hi yan2
what bsp used in the case, please try with nxp bsps described on
i.MX 6 / i.MX 7 Series Software and Development Tool|NXP
try snvs_pwrkey example as in imx6sx.dtsi
linux-imx.git - i.MX Linux Kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------