162306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/console_log 262306a36Sopenharmony_ciDate: September 2017 362306a36Sopenharmony_ciKernelVersion: 4.13 462306a36Sopenharmony_ciDescription: 562306a36Sopenharmony_ci If the EC supports the CONSOLE_READ command type, this file 662306a36Sopenharmony_ci can be used to grab the EC logs. The kernel polls for the log 762306a36Sopenharmony_ci and keeps its own buffer but userspace should grab this and 862306a36Sopenharmony_ci write it out to some logs. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/panicinfo 1162306a36Sopenharmony_ciDate: September 2017 1262306a36Sopenharmony_ciKernelVersion: 4.13 1362306a36Sopenharmony_ciDescription: 1462306a36Sopenharmony_ci This file dumps the EC panic information from the previous 1562306a36Sopenharmony_ci reboot. This file will only exist if the PANIC_INFO command 1662306a36Sopenharmony_ci type is supported by the EC. 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/pdinfo 1962306a36Sopenharmony_ciDate: June 2018 2062306a36Sopenharmony_ciKernelVersion: 4.17 2162306a36Sopenharmony_ciDescription: 2262306a36Sopenharmony_ci This file provides the port role, muxes and power debug 2362306a36Sopenharmony_ci information for all the USB PD/type-C ports available. If 2462306a36Sopenharmony_ci the are no ports available, this file will be just an empty 2562306a36Sopenharmony_ci file. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/uptime 2862306a36Sopenharmony_ciDate: June 2019 2962306a36Sopenharmony_ciKernelVersion: 5.3 3062306a36Sopenharmony_ciDescription: 3162306a36Sopenharmony_ci A u32 providing the time since EC booted in ms. This is 3262306a36Sopenharmony_ci is used for synchronizing the AP host time with the EC 3362306a36Sopenharmony_ci log. An error is returned if the command is not supported 3462306a36Sopenharmony_ci by the EC or there is a communication problem. 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/last_resume_result 3762306a36Sopenharmony_ciDate: June 2019 3862306a36Sopenharmony_ciKernelVersion: 5.3 3962306a36Sopenharmony_ciDescription: 4062306a36Sopenharmony_ci Some ECs have a feature where they will track transitions to 4162306a36Sopenharmony_ci the (Intel) processor's SLP_S0 line, in order to detect cases 4262306a36Sopenharmony_ci where a system failed to go into S0ix. When the system resumes, 4362306a36Sopenharmony_ci an EC with this feature will return a summary of SLP_S0 4462306a36Sopenharmony_ci transitions that occurred. The last_resume_result file returns 4562306a36Sopenharmony_ci the most recent response from the AP's resume message to the EC. 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci The bottom 31 bits contain a count of the number of SLP_S0 4862306a36Sopenharmony_ci transitions that occurred since the suspend message was 4962306a36Sopenharmony_ci received. Bit 31 is set if the EC attempted to wake the 5062306a36Sopenharmony_ci system due to a timeout when watching for SLP_S0 transitions. 5162306a36Sopenharmony_ci Callers can use this to detect a wake from the EC due to 5262306a36Sopenharmony_ci S0ix timeouts. The result will be zero if no suspend 5362306a36Sopenharmony_ci transitions have been attempted, or the EC does not support 5462306a36Sopenharmony_ci this feature. 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci Output will be in the format: "0x%08x\n". 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ciWhat: /sys/kernel/debug/<cros-ec-device>/suspend_timeout_ms 5962306a36Sopenharmony_ciDate: August 2022 6062306a36Sopenharmony_ciKernelVersion: 6.1 6162306a36Sopenharmony_ciDescription: 6262306a36Sopenharmony_ci Some ECs have a feature where they will track transitions of 6362306a36Sopenharmony_ci a hardware-controlled sleep line, such as Intel's SLP_S0 line, 6462306a36Sopenharmony_ci in order to detect cases where a system failed to go into deep 6562306a36Sopenharmony_ci sleep states. The suspend_timeout_ms file controls the amount of 6662306a36Sopenharmony_ci time in milliseconds the EC will wait before declaring a sleep 6762306a36Sopenharmony_ci timeout event and attempting to wake the system. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci Supply 0 to use the default value coded into EC firmware. Supply 7062306a36Sopenharmony_ci 65535 (EC_HOST_SLEEP_TIMEOUT_INFINITE) to disable the EC sleep 7162306a36Sopenharmony_ci failure detection mechanism. Values in between 0 and 65535 7262306a36Sopenharmony_ci indicate the number of milliseconds the EC should wait after a 7362306a36Sopenharmony_ci sleep transition before declaring a timeout. This includes both 7462306a36Sopenharmony_ci the duration after a sleep command was received but before the 7562306a36Sopenharmony_ci hardware line changed, as well as the duration between when the 7662306a36Sopenharmony_ci hardware line changed and the kernel sent an EC resume command. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci Output will be in the format: "%u\n". 79