1*4882a593SmuzhiyunWhat: /sys/kernel/debug/<cros-ec-device>/console_log 2*4882a593SmuzhiyunDate: September 2017 3*4882a593SmuzhiyunKernelVersion: 4.13 4*4882a593SmuzhiyunDescription: 5*4882a593Smuzhiyun If the EC supports the CONSOLE_READ command type, this file 6*4882a593Smuzhiyun can be used to grab the EC logs. The kernel polls for the log 7*4882a593Smuzhiyun and keeps its own buffer but userspace should grab this and 8*4882a593Smuzhiyun write it out to some logs. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunWhat: /sys/kernel/debug/<cros-ec-device>/panicinfo 11*4882a593SmuzhiyunDate: September 2017 12*4882a593SmuzhiyunKernelVersion: 4.13 13*4882a593SmuzhiyunDescription: 14*4882a593Smuzhiyun This file dumps the EC panic information from the previous 15*4882a593Smuzhiyun reboot. This file will only exist if the PANIC_INFO command 16*4882a593Smuzhiyun type is supported by the EC. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunWhat: /sys/kernel/debug/<cros-ec-device>/pdinfo 19*4882a593SmuzhiyunDate: June 2018 20*4882a593SmuzhiyunKernelVersion: 4.17 21*4882a593SmuzhiyunDescription: 22*4882a593Smuzhiyun This file provides the port role, muxes and power debug 23*4882a593Smuzhiyun information for all the USB PD/type-C ports available. If 24*4882a593Smuzhiyun the are no ports available, this file will be just an empty 25*4882a593Smuzhiyun file. 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunWhat: /sys/kernel/debug/<cros-ec-device>/uptime 28*4882a593SmuzhiyunDate: June 2019 29*4882a593SmuzhiyunKernelVersion: 5.3 30*4882a593SmuzhiyunDescription: 31*4882a593Smuzhiyun A u32 providing the time since EC booted in ms. This is 32*4882a593Smuzhiyun is used for synchronizing the AP host time with the EC 33*4882a593Smuzhiyun log. An error is returned if the command is not supported 34*4882a593Smuzhiyun by the EC or there is a communication problem. 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunWhat: /sys/kernel/debug/<cros-ec-device>/last_resume_result 37*4882a593SmuzhiyunDate: June 2019 38*4882a593SmuzhiyunKernelVersion: 5.3 39*4882a593SmuzhiyunDescription: 40*4882a593Smuzhiyun Some ECs have a feature where they will track transitions to 41*4882a593Smuzhiyun the (Intel) processor's SLP_S0 line, in order to detect cases 42*4882a593Smuzhiyun where a system failed to go into S0ix. When the system resumes, 43*4882a593Smuzhiyun an EC with this feature will return a summary of SLP_S0 44*4882a593Smuzhiyun transitions that occurred. The last_resume_result file returns 45*4882a593Smuzhiyun the most recent response from the AP's resume message to the EC. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun The bottom 31 bits contain a count of the number of SLP_S0 48*4882a593Smuzhiyun transitions that occurred since the suspend message was 49*4882a593Smuzhiyun received. Bit 31 is set if the EC attempted to wake the 50*4882a593Smuzhiyun system due to a timeout when watching for SLP_S0 transitions. 51*4882a593Smuzhiyun Callers can use this to detect a wake from the EC due to 52*4882a593Smuzhiyun S0ix timeouts. The result will be zero if no suspend 53*4882a593Smuzhiyun transitions have been attempted, or the EC does not support 54*4882a593Smuzhiyun this feature. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun Output will be in the format: "0x%08x\n". 57