18c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/console_log 28c2ecf20Sopenharmony_ciDate: September 2017 38c2ecf20Sopenharmony_ciKernelVersion: 4.13 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci If the EC supports the CONSOLE_READ command type, this file 68c2ecf20Sopenharmony_ci can be used to grab the EC logs. The kernel polls for the log 78c2ecf20Sopenharmony_ci and keeps its own buffer but userspace should grab this and 88c2ecf20Sopenharmony_ci write it out to some logs. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/panicinfo 118c2ecf20Sopenharmony_ciDate: September 2017 128c2ecf20Sopenharmony_ciKernelVersion: 4.13 138c2ecf20Sopenharmony_ciDescription: 148c2ecf20Sopenharmony_ci This file dumps the EC panic information from the previous 158c2ecf20Sopenharmony_ci reboot. This file will only exist if the PANIC_INFO command 168c2ecf20Sopenharmony_ci type is supported by the EC. 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/pdinfo 198c2ecf20Sopenharmony_ciDate: June 2018 208c2ecf20Sopenharmony_ciKernelVersion: 4.17 218c2ecf20Sopenharmony_ciDescription: 228c2ecf20Sopenharmony_ci This file provides the port role, muxes and power debug 238c2ecf20Sopenharmony_ci information for all the USB PD/type-C ports available. If 248c2ecf20Sopenharmony_ci the are no ports available, this file will be just an empty 258c2ecf20Sopenharmony_ci file. 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/uptime 288c2ecf20Sopenharmony_ciDate: June 2019 298c2ecf20Sopenharmony_ciKernelVersion: 5.3 308c2ecf20Sopenharmony_ciDescription: 318c2ecf20Sopenharmony_ci A u32 providing the time since EC booted in ms. This is 328c2ecf20Sopenharmony_ci is used for synchronizing the AP host time with the EC 338c2ecf20Sopenharmony_ci log. An error is returned if the command is not supported 348c2ecf20Sopenharmony_ci by the EC or there is a communication problem. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/last_resume_result 378c2ecf20Sopenharmony_ciDate: June 2019 388c2ecf20Sopenharmony_ciKernelVersion: 5.3 398c2ecf20Sopenharmony_ciDescription: 408c2ecf20Sopenharmony_ci Some ECs have a feature where they will track transitions to 418c2ecf20Sopenharmony_ci the (Intel) processor's SLP_S0 line, in order to detect cases 428c2ecf20Sopenharmony_ci where a system failed to go into S0ix. When the system resumes, 438c2ecf20Sopenharmony_ci an EC with this feature will return a summary of SLP_S0 448c2ecf20Sopenharmony_ci transitions that occurred. The last_resume_result file returns 458c2ecf20Sopenharmony_ci the most recent response from the AP's resume message to the EC. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci The bottom 31 bits contain a count of the number of SLP_S0 488c2ecf20Sopenharmony_ci transitions that occurred since the suspend message was 498c2ecf20Sopenharmony_ci received. Bit 31 is set if the EC attempted to wake the 508c2ecf20Sopenharmony_ci system due to a timeout when watching for SLP_S0 transitions. 518c2ecf20Sopenharmony_ci Callers can use this to detect a wake from the EC due to 528c2ecf20Sopenharmony_ci S0ix timeouts. The result will be zero if no suspend 538c2ecf20Sopenharmony_ci transitions have been attempted, or the EC does not support 548c2ecf20Sopenharmony_ci this feature. 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci Output will be in the format: "0x%08x\n". 57