1// Copyright 2020 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto3"; 6 7package chromiumos.config.api; 8 9import "chromiumos/config/api/component_id.proto"; 10import "chromiumos/config/api/partner_id.proto"; 11import "google/protobuf/wrappers.proto"; 12 13option go_package = "go.chromium.org/chromiumos/config/go/api"; 14 15// next field: 29 16message Component { 17 // Globally unique component identifier. 18 ComponentId id = 1; 19 // Original component manufacturer. 20 PartnerId manufacturer_id = 8; 21 // Human readable name of the component. 22 string name = 9; 23 24 // Additional optional label to provide alternative value for eg: 25 // HWID string rather than relying on id.value directly. 26 string hwid_type = 25; 27 string hwid_label = 20; 28 29 // IDs used to join against AVL database 30 AVLId avl_id = 21; 31 32 // AVL-compatible part number information 33 string part_number = 22; 34 35 // Current support status of the component 36 SupportStatus support_status = 28; 37 38 oneof type { 39 Soc soc = 2; 40 Memory memory = 3; 41 Bluetooth bluetooth = 4; 42 Camera camera = 5; 43 Touch touchscreen = 6; 44 Wifi wifi = 7; 45 Touch touchpad = 10; 46 DisplayPanel display_panel = 11; 47 AudioCodec audio_codec = 12; 48 Battery battery = 13; 49 FlashChip ec_flash_chip = 14; 50 FlashChip system_flash_chip = 15; 51 EmbeddedController ec = 16; 52 Storage storage = 17; 53 Tpm tpm = 18; 54 Interface.Usb usb_host = 19; 55 Stylus stylus = 23; 56 Amplifier amplifier = 24; 57 DisplayPortConverter dp_converter = 26; 58 Cellular cellular = 27; 59 } 60 61 ///////////////////////////////////// 62 // Message Definitions Only 63 ///////////////////////////////////// 64 65 // IDs to map into AVL database 66 message AVLId { 67 int32 cid = 1; // component id 68 int32 qid = 2; // qualification id 69 } 70 71 // Defines common component version identifiers based on interface standards. 72 message Interface { 73 message I2C { 74 string product = 1; 75 string vendor = 2; 76 } 77 78 message Usb { 79 // 4-digit hex 80 string vendor_id = 1; 81 // 4-digit hex 82 string product_id = 2; 83 // 4-digit hex 84 string bcd_device = 3; 85 } 86 87 message Pci { 88 // 4-digit hex 89 string vendor_id = 1; 90 // 4-digit hex 91 string device_id = 2; 92 // 2-digit hex 93 string revision_id = 3; 94 // 6-digit hex (2 digit for class 4 for subclass) 95 string class_id = 4; 96 } 97 } 98 99 message Soc { 100 enum Architecture { 101 ARCHITECTURE_UNDEFINED = 0; 102 X86 = 1; 103 X86_64 = 2; 104 ARM = 3; 105 ARM64 = 4; 106 } 107 108 enum Feature { 109 FEATURE_UNKNOWN = 0; 110 // Supports Symmetric Multi-Threading (SMT; a.k.a. Hyper-Threading, or 111 // other vendor-specific terms). 112 SMT = 1; 113 // Supports x86 SHA-NI (instruction extension set for SHA1 and SHA256) 114 SHA_NI = 2; 115 }; 116 117 message Family { 118 Architecture arch = 1; 119 // Common name (human friendly) for the family 120 string name = 2; 121 } 122 123 enum Vulnerability { 124 VULNERABILITY_UNDEFINED = 0; 125 // CPU is vulnerable to the L1 Terminal Fault (a.k.a., L1TF) side 126 // channel. 127 L1TF = 1; 128 // CPU is vulnerable to Microarchitectural Data Sampling (MDS). 129 MDS = 2; 130 } 131 132 Family family = 1; 133 // Unique model name reported by the SoC and detected 134 // through probing. 135 // For ARM/x86 specific probing logic, see: 136 // platform/factory/py/probe/functions/generic_cpu.py 137 string model = 2; 138 // Number of cores present on the SoC model 139 int32 cores = 3; 140 repeated Feature features = 4; 141 repeated Vulnerability vulnerabilities = 5; 142 } 143 144 message Memory { 145 Profile profile = 1; 146 string part_number = 2; 147 148 message Profile { 149 Type type = 1; 150 int32 speed_mhz = 2; 151 int32 size_megabytes = 3; 152 // Any new fields here should be messages or enums that can differentiate 153 // the unspecified value from the 0-value (or the 0-value is not valid) 154 } 155 156 enum Type { 157 TYPE_UNDEFINED = 0; 158 DDR = 1; 159 DDR2 = 2; 160 DDR3 = 3; 161 DDR4 = 4; 162 LP_DDR3 = 5; 163 LP_DDR4 = 6; 164 } 165 166 reserved 3; 167 } 168 169 message Bluetooth { 170 Interface.Usb usb = 4; 171 172 reserved 1, 2, 3; 173 } 174 175 message Camera { 176 enum Feature { 177 FEATURE_UNKNOWN = 0; 178 ACTIVITY_LED = 1; 179 } 180 enum ClockType { 181 CLOCK_TYPE_UNDEFINED = 0; 182 MONOTONIC = 1; 183 BOOTTIME = 2; 184 } 185 186 repeated Feature features = 1; 187 ClockType clock_type = 2; 188 189 oneof interface { 190 Interface.Usb usb = 3; 191 Interface.Pci pci = 4; 192 } 193 } 194 195 message DisplayPanel { 196 string product_id = 1; 197 Properties properties = 2; 198 199 enum Feature { 200 FEATURE_UNKNOWN = 0; 201 // Supports high dynamic range. 202 HDR = 1; 203 // Supports seamless refresh rate switching. 204 SEAMLESS_REFRESH_RATE_SWITCHING = 2; 205 // variable refresh rate available. 206 VARIABLE_REFRESH_RATE_AVAILABLE = 3; 207 }; 208 209 enum PanelType { 210 PANEL_TYPE_UNKNOWN = 0; 211 OLED = 1; 212 }; 213 214 message Properties { 215 int32 width_px = 1; 216 int32 height_px = 2; 217 // Generally expressed as double (e.g. 11.7 inches) in specs, but storing 218 // as milliinch to remove double ambiguities. 219 int32 diagonal_milliinch = 3; 220 // PPI or also referred to as DPI (density per inch) 221 int32 pixels_per_in = 4; 222 repeated Feature features = 5; 223 224 // The minimum backlight level to use before turning the backlight off 225 // entirely. 226 uint32 min_visible_backlight_level = 6; 227 228 // The delay between setting the backlight level to 0 and turning off the 229 // display. 230 google.protobuf.UInt32Value turn_off_screen_timeout_ms = 7; 231 232 oneof battery_brightness { 233 // The default display backlight percentage on battery power in the 234 // absence of an ambient light sensor controlling the display backlight. 235 double no_als_battery_brightness = 8; 236 237 // The default display backlight nits on battery power in the 238 // absence of an ambient light sensor controlling the display backlight. 239 double no_als_battery_brightness_nits = 11; 240 } 241 242 oneof ac_brightness { 243 // The default display backlight percentage on AC power in the absence 244 // of an ambient light sensor controlling the display backlight. 245 double no_als_ac_brightness = 9; 246 247 // The default display backlight nits on AC power in the absence of 248 // an ambient light sensor controlling the display backlight. 249 double no_als_ac_brightness_nits = 12; 250 } 251 252 // The configuration of the display backlight percentage based on the 253 // ambient light sensor value. Steps should be in increasing order. 254 repeated AlsStep als_steps = 10; 255 256 // The max luminance of the panel in nits. 257 double max_screen_brightness = 13; 258 259 // The radius of each corner of this display (in physical pixels). 260 message RoundedCorners { 261 message RoundedCorner { int32 radius_px = 1; } 262 RoundedCorner top_left = 1; 263 RoundedCorner top_right = 2; 264 RoundedCorner bottom_left = 3; 265 RoundedCorner bottom_right = 4; 266 } 267 RoundedCorners rounded_corners = 14; 268 269 // Display panel type 270 PanelType panel_type = 15; 271 } 272 } 273 274 message Touch { 275 enum TouchType { 276 TOUCH_TYPE_UNDEFINED = 0; 277 USB = 1; 278 I2C = 2; 279 } 280 281 string product_id = 2; 282 string fw_version = 3; 283 // Optional product brand/series name 284 // For some vendors, this is used in the firmware naming schema 285 string product_series = 5; 286 287 string fw_checksum = 6; 288 TouchType type = 7; 289 Interface.Usb usb = 8; 290 291 reserved 1, 4; 292 } 293 294 message Wifi { 295 oneof interface { 296 Interface.Pci pci = 1; 297 } 298 299 enum WLANProtocol { 300 WLAN_PROTOCOL_UNKNOWN = 0; 301 IEEE_802_11_A = 1; 302 IEEE_802_11_B = 2; 303 IEEE_802_11_G = 3; 304 IEEE_802_11_N = 4; 305 IEEE_802_11_AC = 5; 306 IEEE_802_11_AX = 6; 307 } 308 // WLAN protocols supported by this Wifi chipset. 309 repeated WLANProtocol supported_wlan_protocols = 2; 310 } 311 312 // Record of a component level qualification and the corresponding status. 313 message Qualification { 314 enum Status { 315 STATUS_UNKNOWN = 0; 316 REQUESTED = 1; 317 TECHNICALLY_QUALIFIED = 2; 318 QUALIFIED = 3; 319 } 320 ComponentId component_id = 1; 321 Status status = 2; 322 } 323 324 message Amplifier { 325 enum Feature { 326 FEATURE_UNKNOWN = 0; 327 BOOT_TIME_CALIBRATION = 1; 328 } 329 string name = 1; 330 repeated Feature features = 2; 331 } 332 333 message AudioCodec { string name = 1; } 334 335 message Battery { 336 enum Technology { 337 TECH_UNKNOWN = 0; 338 LI_ION = 1; 339 LI_POLY = 2; 340 } 341 string model = 1; 342 Technology technology = 2; 343 } 344 345 message FlashChip { string part_number = 1; } 346 347 message EmbeddedController { string part_number = 1; } 348 349 message Storage { 350 enum StorageType { 351 STORAGE_TYPE_UNKNOWN = 0; 352 EMMC = 1; 353 NVME = 2; 354 SATA = 3; 355 UFS = 4; 356 BRIDGED_EMMC = 5; 357 } 358 359 string emmc5_fw_ver = 1; 360 string manfid = 2; 361 string name = 3; 362 string oemid = 4; 363 string prv = 5; 364 string sectors = 6; 365 StorageType type = 7; 366 uint32 size_gb = 8; 367 368 oneof interface { 369 Interface.Pci pci = 9; 370 } 371 } 372 373 // Defines a Trusted Platform Module, for more information see here: 374 // https://www.chromium.org/developers/design-documents/tpm-usage 375 message Tpm { 376 string manufacturer_info = 1; 377 string version = 2; 378 } 379 380 message Stylus { 381 oneof interface { 382 Interface.Usb usb = 1; 383 Interface.I2C i2c = 2; 384 } 385 } 386 387 // Defines a peripheral IC that converts DP signal to another format like 388 // HDMI. 389 message DisplayPortConverter { string name = 1; } 390 391 message Cellular { 392 oneof interface { 393 Interface.Usb usb = 1; 394 } 395 } 396 397 // Various levels of component support. 398 enum SupportStatus { 399 STATUS_UNKNOWN = 0; 400 STATUS_SUPPORTED = 1; 401 STATUS_DEPRECATED = 2; 402 STATUS_UNQUALIFIED = 3; 403 STATUS_UNSUPPORTED = 4; 404 } 405 406 // A single step in an ambient light sensor configuration table. Each step 407 // configures the brightness percentage while at that step as well as the 408 // sensor value at which the next or previous step should be considered. 409 // Steps should be specified in increasing order for each field. 410 message LuxThreshold { 411 // The ALS sensor value below which the previous step should be considered. 412 // A value of -1 denotes negative infinity and should be used for the first 413 // step. 414 int32 decrease_threshold = 1; 415 416 // The ALS sensor value above which the following step should be 417 // considered. A value of -1 denotes infinity and should be used for the 418 // last step. 419 int32 increase_threshold = 2; 420 } 421 422 message AlsStep { 423 oneof ac_backlight { 424 // The backlight brightness percentage on AC power for this step. 425 double ac_backlight_percent = 1; 426 427 // The backlight brightness nits on AC power for this step. 428 double ac_backlight_nits = 5; 429 } 430 431 oneof battery_backlight { 432 // The backlight brightness percentage on battery power for this step. 433 double battery_backlight_percent = 2; 434 435 // The backlight brightness nits on battery power for this step 436 double battery_backlight_nits = 6; 437 } 438 439 LuxThreshold lux_threshold = 3; 440 441 // The max luminance of the panel in nits. 442 double max_screen_brightness = 7; 443 } 444} 445