You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
772 lines
28 KiB
772 lines
28 KiB
/*
|
|
* Copyright (C) 2018 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
syntax = "proto2";
|
|
|
|
// C++ namespace: android::hardware::google::pixel::PixelAtoms
|
|
package android.hardware.google.pixel.PixelAtoms;
|
|
|
|
option java_package = "android.hardware.google.pixel";
|
|
option java_outer_classname = "PixelAtoms";
|
|
|
|
/*
|
|
* Please note that the following features are not currently supported by
|
|
* the IStats->reportVendorAtom implementation:
|
|
* - types outside of int, long, float, and string (ex. uint)
|
|
* - submessages within an atom
|
|
* - repeated fields - arrays must be unrolled
|
|
* - field # 1 - this will be occupied by the vendor namespace
|
|
*/
|
|
|
|
/* Allocated atom IDs. */
|
|
message Atom {
|
|
oneof pushed {
|
|
// AOSP atom ID range starts at 105000
|
|
ChargeStats charge_stats = 105000;
|
|
VoltageTierStats voltage_tier_stats = 105001;
|
|
BatteryCapacity battery_capacity = 105002;
|
|
StorageUfsHealth storage_ufs_health = 105003;
|
|
F2fsStatsInfo f2fs_stats = 105004;
|
|
ZramMmStat zram_mm_stat = 105005;
|
|
ZramBdStat zram_bd_stat = 105006;
|
|
BootStatsInfo boot_stats = 105007;
|
|
WirelessChargingStats wireless_charging_stats = 105008;
|
|
DeviceOrientation device_orientation = 105009;
|
|
BatteryCapacityFG fg_capacity = 105010;
|
|
PdVidPid pd_vid_pid = 105011;
|
|
BatteryEEPROM battery_eeprom = 105012;
|
|
VendorSpeakerImpedance vendor_speaker_impedance = 105013; // moved from atoms.proto
|
|
StorageUfsResetCount ufs_reset_count = 105014;
|
|
PixelMmMetricsPerHour pixel_mm_metrics_per_hour = 105015;
|
|
PixelMmMetricsPerDay pixel_mm_metrics_per_day = 105016;
|
|
F2fsCompressionInfo f2fs_compression_info = 105017;
|
|
VendorChargeCycles vendor_charge_cycles = 105018; // moved from atoms.proto
|
|
VendorHardwareFailed vendor_hardware_failed = 105019; // moved from atoms.proto
|
|
VendorSlowIo vendor_slow_io = 105020; // moved from atoms.proto
|
|
VendorSpeechDspStat vendor_speech_dsp_stat = 105021; // moved from atoms.proto
|
|
VendorPhysicalDropDetected vendor_physical_drop_detected = 105022; // moved from atoms.proto
|
|
VendorUsbPortOverheat vendor_usb_port_overheat = 105023; // moved from atoms.proto
|
|
CmaStatus cma_status = 105024;
|
|
CmaStatusExt cma_status_ext = 105025;
|
|
VendorBatteryHealthSnapshot vendor_battery_health_snapshot = 105026; // moved from atoms.proto
|
|
VendorBatteryCausedShutdown vendor_battery_caused_shutdown = 105027; // moved from atoms.proto
|
|
F2fsGcSegmentInfo f2fs_gc_segment_info = 105028;
|
|
PowerMitigationStats mitigation_stats = 105029; // moved from atoms.proto
|
|
|
|
CitadelVersion citadel_version = 100018; // moved from vendor proprietary
|
|
CitadelEvent citadel_event = 100019; // moved from vendor proprietary
|
|
}
|
|
// AOSP atom ID range ends at 109999
|
|
}
|
|
|
|
/* Supported reverse domain names. */
|
|
message ReverseDomainNames {
|
|
optional string pixel = 1 [default = "com.google.pixel"];
|
|
}
|
|
|
|
/* A message containing detailed statistics and debug information about a charge session. */
|
|
message ChargeStats {
|
|
/* Charge Adapter stats. */
|
|
enum AdapterType {
|
|
ADAPTER_TYPE_UNKNOWN = 0;
|
|
ADAPTER_TYPE_USB = 1;
|
|
ADAPTER_TYPE_USB_SDP = 2;
|
|
ADAPTER_TYPE_USB_DCP = 3;
|
|
ADAPTER_TYPE_USB_CDP = 4;
|
|
ADAPTER_TYPE_USB_ACA = 5;
|
|
ADAPTER_TYPE_USB_C = 6;
|
|
ADAPTER_TYPE_USB_PD = 7;
|
|
ADAPTER_TYPE_USB_PD_DRP = 8;
|
|
ADAPTER_TYPE_USB_PD_PPS = 9;
|
|
ADAPTER_TYPE_USB_PD_BRICKID = 10;
|
|
ADAPTER_TYPE_HVDCP = 11;
|
|
ADAPTER_TYPE_HVDCP3 = 12;
|
|
ADAPTER_TYPE_FLOAT = 13;
|
|
ADAPTER_TYPE_WLC = 14;
|
|
ADAPTER_TYPE_WLC_EPP = 15;
|
|
ADAPTER_TYPE_WLC_SPP = 16;
|
|
ADAPTER_TYPE_GPP = 17;
|
|
ADAPTER_TYPE_10W = 18;
|
|
ADAPTER_TYPE_L7 = 19;
|
|
ADAPTER_TYPE_DL = 20;
|
|
ADAPTER_TYPE_WPC_EPP = 21;
|
|
ADAPTER_TYPE_WPC_GPP = 22;
|
|
ADAPTER_TYPE_WPC_10W = 23;
|
|
ADAPTER_TYPE_WPC_BPP = 24;
|
|
ADAPTER_TYPE_WPC_L7 = 25;
|
|
}
|
|
optional string reverse_domain_name = 1;
|
|
/* Type of charge adapter, enumerated above. */
|
|
optional AdapterType adapter_type = 2;
|
|
/* Max negotiated voltage by charge adapter, in mV. */
|
|
optional int32 adapter_voltage = 3;
|
|
/* Max negotiated current by charge adapter current, in mA. */
|
|
optional int32 adapter_amperage = 4;
|
|
|
|
/* Stats at beginning of charge session. */
|
|
/* System State of Charge, in percent. */
|
|
optional int32 ssoc_in = 5;
|
|
/* Voltage in mV. */
|
|
optional int32 voltage_in = 6;
|
|
|
|
/* Stats at end of charge session. */
|
|
/* System State of Charge, in percent. */
|
|
optional int32 ssoc_out = 7;
|
|
/* Voltage in mV. */
|
|
optional int32 voltage_out = 8;
|
|
|
|
/**
|
|
* These values are meant to represent status of the charging device, used
|
|
* to validate the charging algorithm and explain charging performances.
|
|
* Examples of the content of the register:
|
|
* - APDO, PDO (power capabilities of the device, eg. 5V3A, 9V2A, 20V2A) for wired charging
|
|
* - Wireless charging MFG code. This is the value of a register of the WLC integrated
|
|
* circuit to identify the vendor and type of WLC pad
|
|
* - Receiver operating frequency
|
|
* - Register status
|
|
*/
|
|
optional int32 adapter_capabilities0 = 9;
|
|
optional int32 adapter_capabilities1 = 10;
|
|
optional int32 adapter_capabilities2 = 11;
|
|
optional int32 adapter_capabilities3 = 12;
|
|
optional int32 adapter_capabilities4 = 13;
|
|
|
|
/**
|
|
* These are values which reports the state of the wireless receiver, which will help in
|
|
* debugging charging issues and alternate configurations.
|
|
*/
|
|
optional int32 receiver_state0 = 14;
|
|
optional int32 receiver_state1 = 15;
|
|
}
|
|
|
|
/* A message containing stats from each charge voltage tier. */
|
|
message VoltageTierStats {
|
|
optional string reverse_domain_name = 1;
|
|
/* Voltage tier number, custom to implementation, should be <= 3. */
|
|
optional int32 voltage_tier = 2;
|
|
|
|
/* Stats when entering voltage tier. */
|
|
/* State of charge, in percent. */
|
|
optional float soc_in = 3;
|
|
/* Coulomb count, in mAh. */
|
|
optional int32 cc_in = 4;
|
|
/* Battery temperature, in deciC. */
|
|
optional int32 temp_in = 5;
|
|
|
|
/* Time spent at various charge speeds, in seconds. */
|
|
optional int32 time_fast_secs = 6;
|
|
optional int32 time_taper_secs = 7;
|
|
optional int32 time_other_secs = 8;
|
|
|
|
/* Battery temperature stats, in deciC. */
|
|
optional int32 temp_min = 9;
|
|
optional int32 temp_avg = 10;
|
|
optional int32 temp_max = 11;
|
|
|
|
/* Battery current stats, in mA. */
|
|
optional int32 ibatt_min = 12;
|
|
optional int32 ibatt_avg = 13;
|
|
optional int32 ibatt_max = 14;
|
|
|
|
/* Input current limit stats, in mA. */
|
|
optional int32 icl_min = 15;
|
|
optional int32 icl_avg = 16;
|
|
optional int32 icl_max = 17;
|
|
|
|
/**
|
|
* Efficiency number, receiver operating frequency in kHz for wireless charging
|
|
* (alignment)
|
|
*/
|
|
optional int32 charging_operating_point = 18;
|
|
/* The minimum power out of the adapter at the given charging tier */
|
|
optional int32 min_adapter_power_out = 19;
|
|
/* The time-averaged power out of the adapter at the given charging tier */
|
|
optional int32 time_avg_adapter_power_out = 20;
|
|
/* The maximum power out of the adapter at the given charging tier */
|
|
optional int32 max_adapter_power_out = 21;
|
|
}
|
|
|
|
/* A message containing an alternate proprietary full battery capacity estimate. */
|
|
message BatteryCapacity {
|
|
optional string reverse_domain_name = 1;
|
|
/* Sum of the change in coulomb count. */
|
|
optional int32 delta_cc_sum = 2;
|
|
/* Sum of the change in state of charge (battery level). */
|
|
optional int32 delta_vfsoc_sum = 3;
|
|
}
|
|
|
|
/* A message containing health values of UFS */
|
|
message StorageUfsHealth {
|
|
optional string reverse_domain_name = 1;
|
|
/* The value of lifetimeA for UFS health */
|
|
optional int32 lifetime_a = 2;
|
|
/* The value of lifetimeB for UFS health */
|
|
optional int32 lifetime_b = 3;
|
|
/* The value of lifetimeC for UFS health */
|
|
optional int32 lifetime_c = 4;
|
|
}
|
|
|
|
/* A message containing filesystem stats of F2FS */
|
|
message F2fsStatsInfo {
|
|
optional string reverse_domain_name = 1;
|
|
/* The value of dirty segments of f2fs */
|
|
optional int32 dirty_segments = 2;
|
|
/* The value of free segments of f2fs */
|
|
optional int32 free_segments = 3;
|
|
/* The times of checkpoint function called in foreground*/
|
|
optional int32 cp_calls_fg = 4;
|
|
/* The times of checkpoint function called in background */
|
|
optional int32 cp_calls_bg = 5;
|
|
/* The times of garbage collection function called in foreground */
|
|
optional int32 gc_calls_fg = 6;
|
|
/* The times of garbage collection function called in background */
|
|
optional int32 gc_calls_bg = 7;
|
|
/* The amount of blocks been moved by garbage collection in foreground */
|
|
optional int32 moved_blocks_fg = 8;
|
|
/* The amount of blocks been moved by garbage collection in background */
|
|
optional int32 moved_blocks_bg = 9;
|
|
/* The average of how many valid blocks is in a segment */
|
|
optional int32 valid_blocks = 10;
|
|
}
|
|
|
|
message ZramMmStat {
|
|
optional string reverse_domain_name = 1;
|
|
/* The value of original memory size */
|
|
optional int64 orig_data_size = 2;
|
|
/* The value of compressed memory size */
|
|
optional int64 compr_data_size = 3;
|
|
/* The value of consumed memory size to store compressed memory */
|
|
optional int64 mem_used_total = 4;
|
|
/* The value of number of page filled with same elements data */
|
|
optional int64 same_pages = 5;
|
|
/* The value of number of incompressible page */
|
|
optional int64 huge_pages = 6;
|
|
/* The value of number of incompressible pages since boot */
|
|
optional int64 huge_pages_since_boot = 7;
|
|
}
|
|
|
|
message ZramBdStat {
|
|
optional string reverse_domain_name = 1;
|
|
/* the number of pages in backing device */
|
|
optional int64 bd_count = 2;
|
|
/* The number of pages readed from backing device */
|
|
optional int64 bd_reads = 3;
|
|
/* The number of pages written to backing device */
|
|
optional int64 bd_writes = 4;
|
|
}
|
|
|
|
/* A message containing boot times */
|
|
message BootStatsInfo {
|
|
optional string reverse_domain_name = 1;
|
|
/* The F2FS fsck time in secs */
|
|
optional int32 fsck_time_sec = 2;
|
|
/* The F2FS mounted time in secs */
|
|
optional int32 mounted_time_sec = 3;
|
|
/* The F2FS checkpoint=disable time in secs */
|
|
optional int32 checkpoint_time_sec = 4;
|
|
}
|
|
|
|
/* A message containing wireless charging health info. */
|
|
message WirelessChargingStats {
|
|
/* Captures if a google charger used when start wireless charging */
|
|
enum ChargerVendor {
|
|
VENDOR_UNKNOWN = 0;
|
|
VENDOR_GOOGLE = 1;
|
|
}
|
|
|
|
optional string reverse_domain_name = 1;
|
|
optional ChargerVendor charger_vendor = 2;
|
|
}
|
|
|
|
/* Current device Orientation */
|
|
message DeviceOrientation {
|
|
enum Orientation {
|
|
ORIENTATION_UNKNOWN = 0;
|
|
ORIENTATION_0 = 1;
|
|
ORIENTATION_90 = 2;
|
|
ORIENTATION_180 = 3;
|
|
ORIENTATION_270 = 4;
|
|
}
|
|
|
|
optional string reverse_domain_name = 1;
|
|
/* Device orientation. */
|
|
optional Orientation orientation = 2;
|
|
}
|
|
|
|
/* Raw battery capacity stats */
|
|
message BatteryCapacityFG {
|
|
enum LogReason {
|
|
LOG_REASON_UNKNOWN = 0;
|
|
LOG_REASON_CONNECTED = 1;
|
|
LOG_REASON_DISCONNECTED = 2;
|
|
LOG_REASON_FULL_CHARGE = 3;
|
|
LOG_REASON_PERCENT_SKIP = 4;
|
|
LOG_REASON_DIVERGING_FG = 5;
|
|
}
|
|
|
|
optional string reverse_domain_name = 1;
|
|
/* Uevent logging reason, enumerated above. */
|
|
optional LogReason capacity_log_reason = 2;
|
|
|
|
/* The battery capacity reported from the FG (fuel gauge) hardware */
|
|
optional float capacity_gdf = 3;
|
|
/* The filtered system battery capacity reported to the UI */
|
|
optional float capacity_ssoc = 4;
|
|
/* The fuel gauge capacity curve midpoint FG (fuel gauge) value */
|
|
optional float capacity_gdf_curve = 5;
|
|
/* The fuel gauge capacity curve midpoint UI value */
|
|
optional float capacity_ssoc_curve = 6;
|
|
}
|
|
|
|
message PdVidPid {
|
|
optional string reverse_domain_name = 1;
|
|
/* Vendor ID of wired charger */
|
|
optional int32 vid = 2;
|
|
/* Product ID of wired charger */
|
|
optional int32 pid = 3;
|
|
}
|
|
|
|
message BatteryEEPROM {
|
|
optional string reverse_domain_name = 1;
|
|
/* The cycle count number; record of charge/discharge times */
|
|
optional int32 cycle_cnt = 2;
|
|
/* The current full capacity of the battery under nominal conditions */
|
|
optional int32 full_cap = 3;
|
|
/* The battery equivalent series resistance */
|
|
optional int32 esr = 4;
|
|
/* Battery resistance related to temperature change */
|
|
optional int32 rslow = 5;
|
|
/* Battery health indicator reflecting the battery age state */
|
|
optional int32 soh = 6;
|
|
/* The battery temperature */
|
|
optional int32 batt_temp = 7;
|
|
|
|
/* Battery state of charge (SOC) shutdown point */
|
|
optional int32 cutoff_soc = 8;
|
|
/* Raw battery state of charge (SOC), based on battery current (CC = Coulomb Counter) */
|
|
optional int32 cc_soc = 9;
|
|
/* Estimated battery state of charge (SOC) from batt_soc with endpoint limiting (0% and 100%) */
|
|
optional int32 sys_soc = 10;
|
|
/* Filtered monotonic SOC, handles situations where the cutoff_soc is increased and
|
|
* then decreased from the battery physical properties
|
|
*/
|
|
optional int32 msoc = 11;
|
|
/* Estimated SOC derived from cc_soc that provides voltage loop feedback correction using
|
|
* battery voltage, current, and status values
|
|
*/
|
|
optional int32 batt_soc = 12;
|
|
|
|
/* Field used for data padding in the EEPROM data */
|
|
optional int32 reserve = 13;
|
|
|
|
/* The maximum battery temperature ever seen */
|
|
optional int32 max_temp = 14;
|
|
/* The minimum battery temperature ever seen */
|
|
optional int32 min_temp = 15;
|
|
/* The maximum battery voltage ever seen */
|
|
optional int32 max_vbatt = 16;
|
|
/* The minimum battery voltage ever seen */
|
|
optional int32 min_vbatt = 17;
|
|
/* The maximum battery current ever seen */
|
|
optional int32 max_ibatt = 18;
|
|
/* The minimum battery current ever seen */
|
|
optional int32 min_ibatt = 19;
|
|
/* Field used to verify the integrity of the EEPROM data */
|
|
optional int32 checksum = 20;
|
|
}
|
|
|
|
/* A message containing an exceptional event from citadel. */
|
|
message CitadelEvent {
|
|
enum Event {
|
|
ALERT = 1;
|
|
REBOOTED = 2;
|
|
UPGRADED = 3;
|
|
ALERT_V2 = 4;
|
|
};
|
|
optional string reverse_domain_name = 1;
|
|
optional Event event = 2;
|
|
optional int32 reset_count = 3;
|
|
optional int64 uptime_micros = 4;
|
|
enum Priority {
|
|
LOW = 0;
|
|
MEDIUM = 1;
|
|
HIGH = 2;
|
|
};
|
|
optional Priority priority = 5;
|
|
|
|
// ALERT-specific fields. These fields correspond to the interrupt status
|
|
// bits for alerts within citadel. When alerts fire one or more of these
|
|
// bits are set to indicate the alert source.
|
|
optional int32 intr_sts_0 = 6;
|
|
optional int32 intr_sts_1 = 7;
|
|
optional int32 intr_sts_2 = 8;
|
|
|
|
// REBOOTED-specific fields. These fields correspond to the details of how
|
|
// the hardware reboot occurred. A reboot is a noteworthy event for citadel,
|
|
// as it can be triggered by events like stack overflow or other software
|
|
// bugs.
|
|
optional int32 rstsrc = 9;
|
|
optional int32 exitpd = 10;
|
|
optional int32 which0 = 11;
|
|
optional int32 which1 = 12;
|
|
|
|
// UPGRADED-specific field. This field corresponds to the result of FW
|
|
// upgrade for citadel.
|
|
optional int32 upgrade_state = 13;
|
|
|
|
// ALERT_V2-specific field. This field corresponds to the GLOBALSEC Log
|
|
// which contains normal globalsec, camo, temp and buserr.
|
|
optional int32 alert_grp_0 = 14;
|
|
optional int32 alert_grp_1 = 15;
|
|
optional int32 alert_grp_2 = 16;
|
|
optional int32 alert_grp_3 = 17;
|
|
optional int32 camo_breaches_0 = 18;
|
|
optional int32 camo_breaches_1 = 19;
|
|
optional int32 temp_min = 20;
|
|
optional int32 temp_max = 21;
|
|
optional int32 bus_err = 22;
|
|
}
|
|
|
|
/* A message containing the citadel firmware version. */
|
|
message CitadelVersion {
|
|
optional string reverse_domain_name = 1;
|
|
optional string version = 2;
|
|
}
|
|
|
|
/* A message containing the speaker impedance. */
|
|
message VendorSpeakerImpedance {
|
|
optional string reverse_domain_name = 1;
|
|
optional int32 speaker_location = 2;
|
|
optional int32 impedance = 3;
|
|
}
|
|
|
|
/* A message containing how many times of ufs host reset */
|
|
message StorageUfsResetCount {
|
|
optional string reverse_domain_name = 1;
|
|
/* How many UFS error reset are triggered */
|
|
optional int32 host_reset_count = 2;
|
|
}
|
|
|
|
/* A message containing Pixel memory metrics collected hourly. */
|
|
message PixelMmMetricsPerHour {
|
|
optional string reverse_domain_name = 1;
|
|
optional int64 free_pages = 2;
|
|
optional int64 anon_pages = 3;
|
|
optional int64 file_pages = 4;
|
|
optional int64 slab_reclaimable = 5;
|
|
optional int64 zspages = 6;
|
|
optional int64 unevictable = 7;
|
|
optional int64 ion_total_pools = 8;
|
|
optional int64 gpu_memory = 9;
|
|
}
|
|
|
|
/* A message containing Pixel memory metrics collected daily. */
|
|
message PixelMmMetricsPerDay {
|
|
optional string reverse_domain_name = 1;
|
|
optional int64 workingset_refault = 2;
|
|
optional int64 pswpin = 3;
|
|
optional int64 pswpout = 4;
|
|
optional int64 allocstall_dma = 5;
|
|
optional int64 allocstall_dma32 = 6;
|
|
optional int64 allocstall_normal = 7;
|
|
optional int64 allocstall_movable = 8;
|
|
optional int64 pgalloc_dma = 9;
|
|
optional int64 pgalloc_dma32 = 10;
|
|
optional int64 pgalloc_normal = 11;
|
|
optional int64 pgalloc_movable = 12;
|
|
optional int64 pgsteal_kswapd = 13;
|
|
optional int64 pgsteal_direct = 14;
|
|
optional int64 pgscan_kswapd = 15;
|
|
optional int64 pgscan_direct = 16;
|
|
optional int64 oom_kill = 17;
|
|
optional int64 pgalloc_high = 18;
|
|
optional int64 pgcache_hit = 19;
|
|
optional int64 pgcache_miss = 20;
|
|
optional int64 kswapd_stime_clks = 21;
|
|
optional int64 kcompactd_stime_clks = 22;
|
|
}
|
|
|
|
/* A message containing CMA metrics collected from dogfooding only. */
|
|
message CmaStatus {
|
|
optional string reverse_domain_name = 1;
|
|
optional int32 type = 2;
|
|
optional int64 cma_alloc_pages_attempts = 3;
|
|
optional int64 cma_alloc_pages_soft_attempts = 4;
|
|
optional int64 cma_fail_pages = 5;
|
|
optional int64 cma_fail_soft_pages = 6;
|
|
optional int64 migrated_pages = 7;
|
|
}
|
|
|
|
/* A message containing CMA metrics (External). */
|
|
message CmaStatusExt {
|
|
optional string reverse_domain_name = 1;
|
|
optional int32 type = 2;
|
|
optional int64 cma_alloc_latency_low = 3;
|
|
optional int64 cma_alloc_latency_mid = 4;
|
|
optional int64 cma_alloc_latency_high = 5;
|
|
}
|
|
|
|
message F2fsCompressionInfo {
|
|
optional string reverse_domain_name = 1;
|
|
/* Show the block count written after compression since mount */
|
|
optional int32 compr_written_blocks = 2;
|
|
/* Show the saved block count with compression since mount */
|
|
optional int32 compr_saved_blocks = 3;
|
|
/* Show the count of inode newly enabled for compression since mount */
|
|
optional int32 compr_new_inodes = 4;
|
|
}
|
|
|
|
/**
|
|
* Log bucketed battery charge cycles.
|
|
*
|
|
* Each bucket represents cycles of the battery past
|
|
* a given charge point. For example, bucket 1 is the
|
|
* lowest 1/8th of the battery, and bucket 8 is 100%.
|
|
*
|
|
* Logged from:
|
|
* /sys/class/power_supply/bms/cycle_count, via Vendor.
|
|
*/
|
|
message VendorChargeCycles {
|
|
optional string reverse_domain_name = 1;
|
|
optional int32 cycle_bucket_1 = 2;
|
|
optional int32 cycle_bucket_2 = 3;
|
|
optional int32 cycle_bucket_3 = 4;
|
|
optional int32 cycle_bucket_4 = 5;
|
|
optional int32 cycle_bucket_5 = 6;
|
|
optional int32 cycle_bucket_6 = 7;
|
|
optional int32 cycle_bucket_7 = 8;
|
|
optional int32 cycle_bucket_8 = 9;
|
|
optional int32 cycle_bucket_9 = 10;
|
|
optional int32 cycle_bucket_10 = 11;
|
|
}
|
|
|
|
/**
|
|
* Logs the report of a failed hardware.
|
|
*
|
|
* Logged from:
|
|
* Vendor HALs.
|
|
*
|
|
*/
|
|
message VendorHardwareFailed {
|
|
enum HardwareType {
|
|
HARDWARE_FAILED_UNKNOWN = 0;
|
|
HARDWARE_FAILED_MICROPHONE = 1;
|
|
HARDWARE_FAILED_CODEC = 2;
|
|
HARDWARE_FAILED_SPEAKER = 3;
|
|
HARDWARE_FAILED_FINGERPRINT = 4;
|
|
}
|
|
optional string reverse_domain_name = 1;
|
|
optional HardwareType hardware_type = 2;
|
|
|
|
/**
|
|
* hardware_location allows vendors to differentiate between multiple
|
|
* instances of the same hardware_type. The specific locations are vendor
|
|
* defined integers, referring to board-specific numbering schemes.
|
|
*/
|
|
optional int32 hardware_location = 3;
|
|
/**
|
|
* failure_code is specific to the HardwareType of the failed hardware.
|
|
* It should use one of the enum values defined below.
|
|
*/
|
|
enum HardwareErrorCode {
|
|
UNKNOWN = 0;
|
|
COMPLETE = 1;
|
|
SPEAKER_HIGH_Z = 2;
|
|
SPEAKER_SHORT = 3;
|
|
FINGERPRINT_SENSOR_BROKEN = 4;
|
|
FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
|
|
DEGRADE = 6;
|
|
}
|
|
optional int32 failure_code = 4;
|
|
}
|
|
|
|
/**
|
|
* Log slow I/O operations on the primary storage.
|
|
*/
|
|
message VendorSlowIo {
|
|
// Classifications of IO Operations.
|
|
enum IoOperation {
|
|
UNKNOWN = 0;
|
|
READ = 1;
|
|
WRITE = 2;
|
|
UNMAP = 3;
|
|
SYNC = 4;
|
|
}
|
|
optional string reverse_domain_name = 1;
|
|
optional IoOperation operation = 2;
|
|
|
|
// The number of slow IO operations of this type over 24 hours.
|
|
optional int32 count = 3;
|
|
}
|
|
|
|
/*
|
|
* Logs the reported speech DSP status.
|
|
* Logged from: Vendor audio implementation.
|
|
*/
|
|
message VendorSpeechDspStat {
|
|
optional string reverse_domain_name = 1;
|
|
// The total Speech DSP uptime in milliseconds.
|
|
optional int32 total_uptime_millis = 2;
|
|
// The total Speech DSP downtime in milliseconds.
|
|
optional int32 total_downtime_millis = 3;
|
|
optional int32 total_crash_count = 4;
|
|
optional int32 total_recover_count = 5;
|
|
}
|
|
|
|
/**
|
|
* Log an event when the device has been physically dropped.
|
|
* Reported from the /vendor partition.
|
|
*/
|
|
message VendorPhysicalDropDetected {
|
|
optional string reverse_domain_name = 1;
|
|
// Confidence that the event was actually a drop, 0 -> 100
|
|
optional int32 confidence_pctg = 2;
|
|
// Peak acceleration of the drop, in 1/1000s of a g.
|
|
optional int32 accel_peak_thousandths_g = 3;
|
|
// Duration of freefall in ms
|
|
optional int32 freefall_time_millis = 4;
|
|
}
|
|
|
|
/** Represents USB port overheat event. */
|
|
message VendorUsbPortOverheat {
|
|
optional string reverse_domain_name = 1;
|
|
/* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
|
|
optional int32 plug_temperature_deci_c = 2;
|
|
/* Maximum temperature of USB port during overheat event, in 1/10ths of degree
|
|
* C. */
|
|
optional int32 max_temperature_deci_c = 3;
|
|
/* Time between USB plug event and overheat threshold trip, in seconds. */
|
|
optional int32 time_to_overheat_secs = 4;
|
|
/* Time between overheat threshold trip and hysteresis, in seconds. */
|
|
optional int32 time_to_hysteresis_secs = 5;
|
|
/* Time between hysteresis and active mitigation ending, in seconds. */
|
|
optional int32 time_to_inactive_secs = 6;
|
|
}
|
|
|
|
/**
|
|
* Log battery health snapshot.
|
|
*
|
|
* Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
|
|
* are snapshotted periodically over 24hrs.
|
|
*/
|
|
message VendorBatteryHealthSnapshot {
|
|
enum BatterySnapshotType {
|
|
BATTERY_SNAPSHOT_TYPE_UNKNOWN = 0;
|
|
BATTERY_SNAPSHOT_TYPE_MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
|
|
BATTERY_SNAPSHOT_TYPE_AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
|
|
}
|
|
optional string reverse_domain_name = 1;
|
|
optional BatterySnapshotType type = 2;
|
|
// Temperature, in 1/10ths of degree C.
|
|
optional int32 temperature_deci_celsius = 3;
|
|
// Voltage Battery Voltage, in microVolts.
|
|
optional int32 voltage_micro_volt = 4;
|
|
// Current Battery current, in microAmps.
|
|
optional int32 current_micro_amps = 5;
|
|
// OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
|
|
optional int32 open_circuit_micro_volt = 6;
|
|
// Resistance Battery Resistance, in microOhms.
|
|
optional int32 resistance_micro_ohm = 7;
|
|
// Level Battery Level, as % of full.
|
|
optional int32 level_percent = 8;
|
|
}
|
|
|
|
/**
|
|
* Log battery caused shutdown with the last recorded voltage.
|
|
*/
|
|
message VendorBatteryCausedShutdown {
|
|
optional string reverse_domain_name = 1;
|
|
// The last recorded battery voltage prior to shutdown.
|
|
optional int32 last_recorded_micro_volt = 2;
|
|
}
|
|
|
|
/**
|
|
* Log mitigation statistics.
|
|
*/
|
|
message PowerMitigationStats {
|
|
optional string reverse_domain_name = 1;
|
|
// The last triggered count: batoilo.
|
|
optional int32 batoilo_count = 2;
|
|
// The last triggered count: vdroop1.
|
|
optional int32 vdroop1_count = 3;
|
|
// The last triggered count: vdroop2.
|
|
optional int32 vdroop2_count = 4;
|
|
// The last triggered count: smpl_warn.
|
|
optional int32 smpl_warn_count = 5;
|
|
// The last triggered count: ocp_cpu1.
|
|
optional int32 ocp_cpu1_count = 6;
|
|
// The last triggered count: ocp_cpu2.
|
|
optional int32 ocp_cpu2_count = 7;
|
|
// The last triggered count: ocp_gpu.
|
|
optional int32 ocp_gpu_count = 8;
|
|
// The last triggered count: ocp_tpu.
|
|
optional int32 ocp_tpu_count = 9;
|
|
// The last triggered count: soft_ocp_cpu1.
|
|
optional int32 soft_ocp_cpu1_count = 10;
|
|
// The last triggered count: soft_ocp_cpu2.
|
|
optional int32 soft_ocp_cpu2_count = 11;
|
|
// The last triggered count: soft_ocp_gpu.
|
|
optional int32 soft_ocp_gpu_count = 12;
|
|
// The last triggered count: soft_ocp_tpu.
|
|
optional int32 soft_ocp_tpu_count = 13;
|
|
// The last triggered capacity: batoilo.
|
|
optional int32 batoilo_cap = 14;
|
|
// The last triggered capacity: vdroop1.
|
|
optional int32 vdroop1_cap = 15;
|
|
// The last triggered capacity: vdroop2.
|
|
optional int32 vdroop2_cap = 16;
|
|
// The last triggered capacity: smpl_warn.
|
|
optional int32 smpl_warn_cap = 17;
|
|
// The last triggered capacity: ocp_cpu1.
|
|
optional int32 ocp_cpu1_cap = 18;
|
|
// The last triggered capacity: ocp_cpu2.
|
|
optional int32 ocp_cpu2_cap = 19;
|
|
// The last triggered capacity: ocp_gpu.
|
|
optional int32 ocp_gpu_cap = 20;
|
|
// The last triggered capacity: ocp_tpu.
|
|
optional int32 ocp_tpu_cap = 21;
|
|
// The last triggered capacity: soft_ocp_cpu1.
|
|
optional int32 soft_ocp_cpu1_cap = 22;
|
|
// The last triggered capacity: soft_ocp_cpu2.
|
|
optional int32 soft_ocp_cpu2_cap = 23;
|
|
// The last triggered capacity: soft_ocp_gpu.
|
|
optional int32 soft_ocp_gpu_cap = 24;
|
|
// The last triggered capacity: soft_ocp_tpu.
|
|
optional int32 soft_ocp_tpu_cap = 25;
|
|
}
|
|
|
|
/**
|
|
* Log how many segments have been reclaimed in a specific GC mode.
|
|
*/
|
|
message F2fsGcSegmentInfo {
|
|
optional string reverse_domain_name = 1;
|
|
/* Reclaimed segments in GC normal mode */
|
|
optional int32 reclaimed_segments_normal = 2;
|
|
/* Reclaimed segments in GC urgent high mode */
|
|
optional int32 reclaimed_segments_urgent_high = 3;
|
|
/* Reclaimed segments in GC urgent low mode */
|
|
optional int32 reclaimed_segments_urgent_low = 4;
|
|
}
|