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