<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi Experts,<br><br></div>I am trying to use ACPI_RESUME functionality of coreboot on Bayley Bay CRB and unable to wakeup board with USB Keyboard. Board resumes with power button only. Below is the detailed description.<br><br></div>1. I am using EHCI instead of XHCI as I need to support boot from USB in grub.<br></div><div>2. Enabled S3 support in coreboot File: src/soc/intel/fsp_baytrail/acpi/usb.asl, Chnage: Name (_PRW, Package(){ 13, 3 })<br></div>3. Linux Kernel Version: 3.10<br><br></div>In Linux I see following in /proc/acpi/wakeup<br>root@localhost:~# cat /proc/acpi/wakeup<br>Device  S-state   Status   Sysfs node<br>EHC1      S3    *enabled   pci:0000:00:1d.0<br>XHCI      S3    *disabled<br><br></div>When I plugin USB keyboard following are logs<br>root@localhost:~# usb 1-1.2: new low-speed USB device number 3 using ehci-pci<br>input: SIGMACHIP USB Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input3<br>hid-generic 0003:1C4F:0016.0001: input: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-0000:00:1d.0-1.2/input0<br>input: SIGMACHIP USB Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input4<br>hid-generic 0003:1C4F:0016.0002: input: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-0000:00:1d.0-1.2/input1<br><br></div>Based on above information I tried to enable wakeup from USB keyboard as follows<br>echo enabled > /sys/devices/pci0000\:00/0000\:00\:1d.0/usb1/power/wakeup<br>echo enabled > /sys/bus/usb/devices/1-1/power/wakeup<br><br>Still see the same entried in /proc/acpi/wakeup<br>root@localhost:~# cat /proc/acpi/wakeup<br>Device  S-state   Status   Sysfs node<br>EHC1      S3    *enabled   pci:0000:00:1d.0<br>XHCI      S3    *disabled<br><br></div>Did pm-suspend. Following are the logs<br>root@localhost:~# pm-suspend<br>ata2.00: configured for UDMA/100<br>ata2: EH complete<br>PM: Syncing filesystems ... done.<br>Freezing user space processes ... (elapsed 0.01 seconds) done.<br>Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.<br>Suspending console(s) (use no_console_suspend to debug)<br><br></div>At this stage power to USB keyboard is off. No LED for Capslock. Nothing happens when I press any key on the keyboard.<br><br></div>System resumes with power button with the following logs.<br>POST: 0x76<br>Finalize devices...<br>DOMAIN: 0000 final<br>FspNotify(EnumInitPhaseAfterPciEnumeration)<br>Devices finalized<br>BS: BS_POST_DEVICE times (us): entry 0 run 12389 exit 0<br>POST: 0x77<br>Trying to find the wakeup vector...<br>Looking on 000f0000 for valid checksum<br>Checksum 1 passed<br>Checksum 2 passed all OK<br>RSDP found at 000f0000<br>RSDT found at 7add7030 ends at 7add7068<br>FADT found at 7add9cf0<br>FACS found at 7add7210<br>OS waking vector is 0009c090<br>BS: BS_OS_RESUME_CHECK times (us): entry 0 run 26951 exit 0<br>POST: 0x78<br>Restore GNVS pointer to 0x7adfb000<br>POST: 0xfd<br><br>sd 1:0:0:0: [sda] Synchronizing SCSI cache<br>sd 1:0:0:0: [sda] Stopping disk<br>PM: suspend of devices complete after 601.507 msecs<br>------------[ cut here ]------------<br>WARNING: at /home/linux/3.10-r0/linux/drivers/clk/clk.c:842 __clk_disable+0x50/0x70()<br>Modules linked in:<br>CPU: 1 PID: 453 Comm: pm-suspend Not tainted 3.10.38 #1<br>Hardware name: Intel Bayley Bay CRB/Bayley Bay CRB, BIOS 4.0-7016-g0a66991-dirty 11/15/2014<br> 00000000 00000000 f407de08 c181ea2c f407de30 c1036c7e c1a1541d c1a80588<br> 0000034a c16ca130 c16ca130 f4d89420 f4d89420 c13d8bf0 f407de40 c1036d42<br> 00000009 00000000 f407de4c c16ca130 00000246 f407de5c c16ca22a f4d89420<br>Call Trace:<br> [<c181ea2c>] dump_stack+0x16/0x18<br> [<c1036c7e>] warn_slowpath_common+0x5e/0x80<br> [<c16ca130>] ? __clk_disable+0x50/0x70<br> [<c16ca130>] ? __clk_disable+0x50/0x70<br> [<c13d8bf0>] ? dw_pci_resume_early+0x20/0x20<br> [<c1036d42>] warn_slowpath_null+0x22/0x30<br> [<c16ca130>] __clk_disable+0x50/0x70<br> [<c16ca22a>] clk_disable+0x1a/0x30<br> [<c13d7ca0>] dw_dma_suspend+0x20/0x30<br> [<c13d8c02>] dw_pci_suspend_late+0x12/0x20<br> [<c149f1bb>] dpm_run_callback.isra.3+0x2b/0x70<br> [<c1823d37>] ? _raw_spin_unlock_irq+0x17/0x40<br> [<c149f79d>] dpm_suspend_end+0x4d/0x490<br> [<c1079598>] suspend_devices_and_enter+0xf8/0x440<br> [<c181a528>] ? printk+0x50/0x52<br> [<c1079a90>] pm_suspend+0x1b0/0x220<br> [<c1078aab>] state_store+0x5b/0xb0<br> [<c1078a50>] ? wakeup_count_show+0x50/0x50<br> [<c1355997>] kobj_attr_store+0x17/0x30<br> [<c11905bb>] sysfs_write_file+0x9b/0x110<br> [<c1190520>] ? sysfs_open_file+0x1f0/0x1f0<br> [<c113aea9>] vfs_write+0x99/0x190<br> [<c113b481>] SyS_write+0x51/0x90<br> [<c182a5be>] sysenter_do_call+0x12/0x12<br>---[ end trace d63a3167b6ae1b8f ]---<br>------------[ cut here ]------------<br>WARNING: at /home/linux/3.10-r0/linux/drivers/clk/clk.c:751 __clk_unprepare+0x50/0x70()<br>Modules linked in:<br>CPU: 1 PID: 453 Comm: pm-suspend Tainted: G        W    3.10.38 #1<br>Hardware name: Intel Bayley Bay CRB/Bayley Bay CRB, BIOS 4.0-7016-g0a66991-dirty 11/15/2014<br> 00000000 00000000 f407de0c c181ea2c f407de34 c1036c7e c1a1541d c1a80588<br> 000002ef c16cab60 c16cab60 f4d89420 f4c4c064 c13d8bf0 f407de44 c1036d42<br> 00000009 00000000 f407de50 c16cab60 f4d89420 f407de5c c16cab97 f4d89420<br>Call Trace:<br> [<c181ea2c>] dump_stack+0x16/0x18<br> [<c1036c7e>] warn_slowpath_common+0x5e/0x80<br> [<c16cab60>] ? __clk_unprepare+0x50/0x70<br> [<c16cab60>] ? __clk_unprepare+0x50/0x70<br> [<c13d8bf0>] ? dw_pci_resume_early+0x20/0x20<br> [<c1036d42>] warn_slowpath_null+0x22/0x30<br> [<c16cab60>] __clk_unprepare+0x50/0x70<br> [<c16cab97>] clk_unprepare+0x17/0x20<br> [<c13d7ca7>] dw_dma_suspend+0x27/0x30<br> [<c13d8c02>] dw_pci_suspend_late+0x12/0x20<br> [<c149f1bb>] dpm_run_callback.isra.3+0x2b/0x70<br> [<c1823d37>] ? _raw_spin_unlock_irq+0x17/0x40<br> [<c149f79d>] dpm_suspend_end+0x4d/0x490<br> [<c1079598>] suspend_devices_and_enter+0xf8/0x440<br> [<c181a528>] ? printk+0x50/0x52<br> [<c1079a90>] pm_suspend+0x1b0/0x220<br> [<c1078aab>] state_store+0x5b/0xb0<br> [<c1078a50>] ? wakeup_count_show+0x50/0x50<br> [<c1355997>] kobj_attr_store+0x17/0x30<br> [<c11905bb>] sysfs_write_file+0x9b/0x110<br> [<c1190520>] ? sysfs_open_file+0x1f0/0x1f0<br> [<c113aea9>] vfs_write+0x99/0x190<br> [<c113b481>] SyS_write+0x51/0x90<br> [<c182a5be>] sysenter_do_call+0x12/0x12<br>---[ end trace d63a3167b6ae1b90 ]---<br>PM: late suspend of devices complete after 0.999 msecs<br>ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI<br>PM: noirq suspend of devices complete after 33.501 msecs<br>ACPI: Preparing to enter system sleep state S3<br>PM: Saving platform NVS memory<br>Disabling non-boot CPUs ...<br>Broke affinity for irq 104<br>smpboot: CPU 1 is now offline<br>ACPI: Low-level resume complete<br>PM: Restoring platform NVS memory<br>Enabling non-boot CPUs ...<br>smpboot: Booting Node 0 Processor 1 APIC 0x4<br>Initializing CPU#1<br>Intel pstate controlling: cpu 1<br>CPU1 is up<br>ACPI: Waking up from system sleep state S3<br>ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI<br>PM: noirq resume of devices complete after 187.013 msecs<br>PM: early resume of devices complete after 0.315 msecs<br>ata1: SATA link down (SStatus 0 SControl 300)<br>ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)<br>ata2.00: configured for UDMA/100<br>sd 1:0:0:0: [sda] Starting disk<br>PM: resume of devices complete after 2046.412 msecs<br>Restarting tasks ... done.<br>ata2.00: configured for UDMA/100<br>ata2: EH complete<br>root@localhost:~#<br><br><div><div><div>Any idea what do I need to enable USB keyboard wakeup<br></div><div><br><div><div><br><div><br><br><div><br></div></div></div></div></div></div></div></div>