Hi
Here are my test steps with USB keyboard wakeup based on i.MX8MP EVK. The steps on i.MX8MM should be very similiar
1. DTS
&usb_dwc3_0 {
dr_mode = "otg";
hnp-disable;
srp-disable;
adp-disable;
usb-role-switch;
role-switch-default-mode = "none";
snps,dis-u1-entry-quirk;
snps,dis-u2-entry-quirk;
status = "okay";
wakeup-source; ///////////////////////////
port {
usb3_drd_sw: endpoint {
remote-endpoint = <&typec_dr_sw>;
};
};
};
2. setting commands
Here the 3-1 and usbX is decided by kernel log.
[ 5.467641] input: Dell Dell USB Keyboard as /devices/platform/soc@0/32f10100.usb/38100000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.1/3-1.1:1.0/0003:413C:2010.0001/input/input1
echo enabled > /sys/bus/platform/devices/32f10100.usb/power/wakeup
echo enabled > /sys/bus/platform/devices/381f0040.usb-phy/power/wakeup
echo enabled > /sys/bus/platform/devices/xhci-hcd.2.auto/power/wakeup
echo enabled > /sys/bus/platform/devices/xhci-hcd.1.auto/power/wakeup
echo enabled > /sys/bus/usb/devices/3-1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
3, wakeup by keyboard.

Best Regards
Zhiming