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. 358c3166e1SEvan Green 368c3166e1SEvan GreenWhat: /sys/kernel/debug/<cros-ec-device>/last_resume_result 378c3166e1SEvan GreenDate: June 2019 388c3166e1SEvan GreenKernelVersion: 5.3 398c3166e1SEvan GreenDescription: 408c3166e1SEvan Green Some ECs have a feature where they will track transitions to 418c3166e1SEvan Green the (Intel) processor's SLP_S0 line, in order to detect cases 428c3166e1SEvan Green where a system failed to go into S0ix. When the system resumes, 438c3166e1SEvan Green an EC with this feature will return a summary of SLP_S0 448c3166e1SEvan Green transitions that occurred. The last_resume_result file returns 458c3166e1SEvan Green the most recent response from the AP's resume message to the EC. 468c3166e1SEvan Green 478c3166e1SEvan Green The bottom 31 bits contain a count of the number of SLP_S0 488c3166e1SEvan Green transitions that occurred since the suspend message was 498c3166e1SEvan Green received. Bit 31 is set if the EC attempted to wake the 508c3166e1SEvan Green system due to a timeout when watching for SLP_S0 transitions. 518c3166e1SEvan Green Callers can use this to detect a wake from the EC due to 528c3166e1SEvan Green S0ix timeouts. The result will be zero if no suspend 538c3166e1SEvan Green transitions have been attempted, or the EC does not support 548c3166e1SEvan Green this feature. 558c3166e1SEvan Green 568c3166e1SEvan Green Output will be in the format: "0x%08x\n". 57*e8bf17d5SEvan Green 58*e8bf17d5SEvan GreenWhat: /sys/kernel/debug/<cros-ec-device>/suspend_timeout_ms 59*e8bf17d5SEvan GreenDate: August 2022 60*e8bf17d5SEvan GreenKernelVersion: 6.1 61*e8bf17d5SEvan GreenDescription: 62*e8bf17d5SEvan Green Some ECs have a feature where they will track transitions of 63*e8bf17d5SEvan Green a hardware-controlled sleep line, such as Intel's SLP_S0 line, 64*e8bf17d5SEvan Green in order to detect cases where a system failed to go into deep 65*e8bf17d5SEvan Green sleep states. The suspend_timeout_ms file controls the amount of 66*e8bf17d5SEvan Green time in milliseconds the EC will wait before declaring a sleep 67*e8bf17d5SEvan Green timeout event and attempting to wake the system. 68*e8bf17d5SEvan Green 69*e8bf17d5SEvan Green Supply 0 to use the default value coded into EC firmware. Supply 70*e8bf17d5SEvan Green 65535 (EC_HOST_SLEEP_TIMEOUT_INFINITE) to disable the EC sleep 71*e8bf17d5SEvan Green failure detection mechanism. Values in between 0 and 65535 72*e8bf17d5SEvan Green indicate the number of milliseconds the EC should wait after a 73*e8bf17d5SEvan Green sleep transition before declaring a timeout. This includes both 74*e8bf17d5SEvan Green the duration after a sleep command was received but before the 75*e8bf17d5SEvan Green hardware line changed, as well as the duration between when the 76*e8bf17d5SEvan Green hardware line changed and the kernel sent an EC resume command. 77*e8bf17d5SEvan Green 78*e8bf17d5SEvan Green Output will be in the format: "%u\n". 79