11fbc6ec2SEnric Balletbo i SerraWhat: /sys/kernel/debug/<cros-ec-device>/console_log 21fbc6ec2SEnric Balletbo i SerraDate: September 2017 31fbc6ec2SEnric Balletbo i SerraKernelVersion: 4.13 41fbc6ec2SEnric Balletbo i SerraDescription: 51fbc6ec2SEnric Balletbo i Serra If the EC supports the CONSOLE_READ command type, this file 61fbc6ec2SEnric Balletbo i Serra can be used to grab the EC logs. The kernel polls for the log 71fbc6ec2SEnric Balletbo i Serra and keeps its own buffer but userspace should grab this and 81fbc6ec2SEnric Balletbo i Serra write it out to some logs. 91fbc6ec2SEnric Balletbo i Serra 101fbc6ec2SEnric Balletbo i SerraWhat: /sys/kernel/debug/<cros-ec-device>/panicinfo 111fbc6ec2SEnric Balletbo i SerraDate: September 2017 121fbc6ec2SEnric Balletbo i SerraKernelVersion: 4.13 131fbc6ec2SEnric Balletbo i SerraDescription: 141fbc6ec2SEnric Balletbo i Serra This file dumps the EC panic information from the previous 151fbc6ec2SEnric Balletbo i Serra reboot. This file will only exist if the PANIC_INFO command 161fbc6ec2SEnric Balletbo i Serra type is supported by the EC. 171fbc6ec2SEnric Balletbo i Serra 181fbc6ec2SEnric Balletbo i SerraWhat: /sys/kernel/debug/<cros-ec-device>/pdinfo 191fbc6ec2SEnric Balletbo i SerraDate: June 2018 201fbc6ec2SEnric Balletbo i SerraKernelVersion: 4.17 211fbc6ec2SEnric Balletbo i SerraDescription: 221fbc6ec2SEnric Balletbo i Serra This file provides the port role, muxes and power debug 231fbc6ec2SEnric Balletbo i Serra information for all the USB PD/type-C ports available. If 241fbc6ec2SEnric Balletbo i Serra the are no ports available, this file will be just an empty 251fbc6ec2SEnric Balletbo i Serra file. 261fbc6ec2SEnric Balletbo i Serra 27e90716a6STim WawrzynczakWhat: /sys/kernel/debug/<cros-ec-device>/uptime 28e90716a6STim WawrzynczakDate: June 2019 29e90716a6STim WawrzynczakKernelVersion: 5.3 30e90716a6STim WawrzynczakDescription: 31e90716a6STim Wawrzynczak A u32 providing the time since EC booted in ms. This is 32e90716a6STim Wawrzynczak is used for synchronizing the AP host time with the EC 33e90716a6STim Wawrzynczak log. An error is returned if the command is not supported 34e90716a6STim Wawrzynczak by the EC or there is a communication problem. 35*8c3166e1SEvan Green 36*8c3166e1SEvan GreenWhat: /sys/kernel/debug/<cros-ec-device>/last_resume_result 37*8c3166e1SEvan GreenDate: June 2019 38*8c3166e1SEvan GreenKernelVersion: 5.3 39*8c3166e1SEvan GreenDescription: 40*8c3166e1SEvan Green Some ECs have a feature where they will track transitions to 41*8c3166e1SEvan Green the (Intel) processor's SLP_S0 line, in order to detect cases 42*8c3166e1SEvan Green where a system failed to go into S0ix. When the system resumes, 43*8c3166e1SEvan Green an EC with this feature will return a summary of SLP_S0 44*8c3166e1SEvan Green transitions that occurred. The last_resume_result file returns 45*8c3166e1SEvan Green the most recent response from the AP's resume message to the EC. 46*8c3166e1SEvan Green 47*8c3166e1SEvan Green The bottom 31 bits contain a count of the number of SLP_S0 48*8c3166e1SEvan Green transitions that occurred since the suspend message was 49*8c3166e1SEvan Green received. Bit 31 is set if the EC attempted to wake the 50*8c3166e1SEvan Green system due to a timeout when watching for SLP_S0 transitions. 51*8c3166e1SEvan Green Callers can use this to detect a wake from the EC due to 52*8c3166e1SEvan Green S0ix timeouts. The result will be zero if no suspend 53*8c3166e1SEvan Green transitions have been attempted, or the EC does not support 54*8c3166e1SEvan Green this feature. 55*8c3166e1SEvan Green 56*8c3166e1SEvan Green Output will be in the format: "0x%08x\n". 57