• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.proto";
10import "chromiumos/config/api/proximity_config.proto";
11import "chromiumos/config/api/resource_config.proto";
12import "chromiumos/config/api/wifi_config.proto";
13import "google/protobuf/wrappers.proto";
14
15option go_package = "go.chromium.org/chromiumos/config/go/api";
16
17// Represents a specific hardware topology option for a hardware feature, e.g.
18// camera, microphone, gyroscope, daughter board connection. For example. one
19// camera topology would be represented by a unique instance of this Topology
20// message.
21//
22// All Topology instances are scoped to a particular Design.
23message Topology {
24  // Short, but meaningful string that represents the topology. Blank id is
25  // not valid. Id values are validated by Design repo. Ids are
26  // meaningful within a Design. Ids are scoped and unique within a
27  // particular hardware features for a Design. For example, it is valid to have
28  // a "NONE" id for both the camera and microphone hardware feature within the
29  // same Design.
30  string id = 1;
31
32  // The type of hardware feature this topology describes. This is used to
33  // ensure that the correct Topology values are used correctly within the
34  // HardwareTopology message
35  Type type = 2;
36  enum Type {
37    TYPE_UNKNOWN = 0;
38    SCREEN = 1;
39    FORM_FACTOR = 2;
40    AUDIO = 3;
41    STYLUS = 4;
42    KEYBOARD = 5;
43    THERMAL = 6;
44    CAMERA = 7;
45    ACCELEROMETER_GYROSCOPE_MAGNETOMETER = 8;
46    FINGERPRINT = 9;
47    PROXIMITY_SENSOR = 10;
48    DAUGHTER_BOARD = 11;
49    NON_VOLATILE_STORAGE = 12;
50    RAM = 13;  // deprecated
51    WIFI = 14;
52    CELLULAR_BOARD = 15;
53    SD_READER = 16;
54    MOTHERBOARD_USB = 17;
55    BLUETOOTH = 18;
56    BARRELJACK = 19;
57    POWER_BUTTON = 20;
58    VOLUME_BUTTON = 21;
59    EC = 22;
60    TOUCH = 23;
61    TPM = 24;
62    MICROPHONE_MUTE_SWITCH = 25;
63    BATTERY = 26;
64    HDMI = 27;
65    SOC = 28;
66    HPS = 29;
67    DP_CONVERTER = 30;
68    POE = 31;
69    POWER_SUPPLY = 32;
70    RECOVERY_INPUT = 33;
71    PRIVACY_SCREEN = 34;
72    DGPU = 35;
73    UWB = 36;
74    DETACHABLE_BASE = 37;
75    FAN = 38;
76  }
77
78  // Map of human readable descriptions in various languages. Maps language
79  // code, e.g. "EN" or "ZH", to description of topology. These descriptions can
80  // be displayed to factory operators to select the correct options that
81  // applies to the board they are assembling.
82  map<string, string> description = 3;
83
84  // Specify the subset of hardware features that this hardware topology
85  // provides
86  HardwareFeatures hardware_feature = 4;
87}
88
89// Defines a time duration that's targeted for easier reading/understanding
90// of program requirements (versus normalizing everything to millis).
91message Duration {
92  enum Type {
93    TYPE_UNKNOWN = 0;
94    MILLISECONDS = 1;
95    SECONDS = 2;
96    MINUTES = 3;
97    HOURS = 4;
98    DAYS = 5;
99  }
100  Type type = 1;
101  int32 value = 2;
102}
103
104// Each Topology message specifies what that topology means in a 1st class
105// queryable way. Each Topology will only the subset of hardware features that
106// are applicable to that value.
107// The DesignConfig layer will combine all of the Topology messages
108// HardwareFeature messages into a wholistic view of the hardware design
109// configuration.
110//
111// Note to API designers: each field needs to be able to differentiate
112// an unspecified value and from the 0-value; this can be down with
113// messages or enums. Each field also defines how multiple values should be
114// combined.
115// NEXT TAG: 55
116message HardwareFeatures {
117  enum Present {
118    PRESENT_UNKNOWN = 0;
119    PRESENT = 1;
120    NOT_PRESENT = 2;
121  }
122
123  // Copied from PowerSupplyProperties.PowerSource.Port in
124  // src/platform2/system_api/dbus/power_manager/power_supply_properties.proto.
125  enum PortPosition {
126    UNKNOWN = 0;
127
128    // Various positions on the device. The first word describes the side of
129    // the device where the port is located while the second clarifies the
130    // position. For example, LEFT_BACK means the farthest-back port on the
131    // left side, while BACK_LEFT means the leftmost port on the back of the
132    // device.
133    LEFT        = 1;
134    RIGHT       = 2;
135    BACK        = 3;
136    FRONT       = 4;
137    LEFT_FRONT  = 5;
138    LEFT_BACK   = 6;
139    RIGHT_FRONT = 7;
140    RIGHT_BACK  = 8;
141    BACK_LEFT   = 9;
142    BACK_RIGHT  = 10;
143  }
144
145  message Count {
146    uint32 value = 1;
147  }
148
149  // USB-C properties
150  UsbC usb_c = 1;
151  message UsbC {
152    // The number of USB-C ports
153    Count count = 1;
154
155    // Details about each USB-C port.
156    repeated Port ports = 2;
157
158    message Port {
159      // The position of the port on the chassis.
160      PortPosition position = 1;
161
162      // The 0-indexed index of this USB-C port. If set, this is used as the
163      // port index rather than numbering the motherboard ports in order
164      // followed by daughter board ports, in the order they are specified.
165      // This value must be in the range [0, number_of_usb_c_ports).
166      google.protobuf.UInt32Value index_override = 2;
167    }
168
169    // Whether port(s) are USB4
170    bool usb4 = 3;
171
172    // Optional field to manually override the external display timeout
173    uint32 defer_external_display_timeout = 4;
174  }
175
176  // USB-A properties
177  UsbA usb_a = 2;
178  message UsbA {
179    // The number of USB-A ports
180    Count count = 1;
181  }
182
183  // Cellular properties
184  Cellular cellular = 3;
185  message Cellular {
186    // If Cellular is present on system
187    Present present = 1;
188
189    // Optional string identifying the model of the modem to select the proper
190    // helper and firmwares on platforms with several supported modems.
191    string model = 2;
192
193    // Cellular type
194    CellularType type = 3;
195
196    // bool to enable the cellular feature Attach APN.
197    bool attach_apn_required = 4 [deprecated = true];
198
199    enum CellularType {
200      CELLULAR_UNKNOWN = 0;
201      CELLULAR_LTE = 1;
202      CELLULAR_5G = 2;
203    }
204
205    // Optional config for dynamic power reduction control.
206    DynamicPowerReductionConfig dynamic_power_reduction_config = 5;
207    message DynamicPowerReductionConfig {
208      oneof dynamic_power_reduction_config {
209        // A uint identifying the GPIO to use to toggle dynamic power
210        // reduction.
211        uint32 gpio = 1;
212
213        // A dummy value identifying that modem manager should be used to
214        // toggle dynamic power reduction.
215        bool modem_manager = 2;
216      }
217      // Whether tablet mode should be a trigger for dynamic power reduction.
218      bool tablet_mode = 3;
219      // Whether multi level dynamic power reduction is enabled.
220      bool enable_multi_power_level_sar = 4;
221      // Whether we should set the initial proximity state to far.
222      bool enable_default_proximity_state_far = 5;
223      // Map of custom power level to modem index mapping.
224      // E.g. HIGH -> 1, LOW -> 2
225      map<string, uint32> power_level_mapping = 6;
226      // Map of regulatory domains and power level offset.
227      // E.g. KCC -> 2
228      map<string, uint32> regulatory_domain_mapping = 7;
229    }
230
231    // Wedge detection timeout in ms.
232    uint32 wedge_timeout_in_ms = 6;
233    ModemType modem_type = 7;
234
235    enum ModemType {
236      MODEM_UNKNOWN = 0;
237      MODEM_L850 = 1;
238      MODEM_NL668 = 2;
239      MODEM_FM101 = 3;
240      MODEM_FM350 = 4;
241      MODEM_SC7180 = 5;
242      MODEM_SC7280 = 6;
243      MODEM_EM060 = 7;
244      MODEM_RW101 = 8;
245      MODEM_RW135 = 9;
246      MODEM_LCUK54 = 10;
247    }
248  }
249
250  // HDMI properties
251  Hdmi hdmi = 4;
252  message Hdmi {
253    // If native HDMI support is present on system.
254    Present present = 1;
255
256    // Configuration for HDMI-CEC.
257    Cec cec = 2;
258    message Cec {
259      // Automatically power on all connected displays on boot.
260      bool power_on_displays_on_boot = 1;
261      // Automatically power off all connected displays on shutdown.
262      bool power_off_displays_on_shutdown = 2;
263    }
264  }
265
266  // Firmware configuration field programmed in CBI. The value from each
267  // topology value will be summed to create the final DesignConfig level
268  // firmware configuration value.
269  FirmwareConfiguration fw_config = 5;
270  message FirmwareConfiguration {
271    // The firmware configuration value
272    uint32 value = 1;
273
274    // The mask of valid bits that could be used by above value
275    uint32 mask = 2;
276
277    // Customizations to append as a suffix to the coreboot build target and AP
278    // firmware packaging.
279    repeated string coreboot_customizations = 3;
280
281    reserved 4;
282
283    // The AP firmware has the CONFIG_VBOOT_CBFS_INTEGRATION feature enabled.
284    Present vboot_cbfs_integration = 5;
285
286    reserved 6;
287
288    reserved 7;
289
290    message SemVer {
291      uint32 major_version = 1;
292      uint32 minor_version = 2;
293      uint32 patch_version = 3;
294    }
295    // The RO firmware version currently running on the DUT.
296    SemVer fw_ro_version = 8;
297
298    // The Intel Integrated Sensor Hub is available and supported by firmware.
299    Present intel_ish = 9;
300
301    // The RW firmware version currently running on the DUT.
302    SemVer fw_rw_version = 10;
303
304    // The AP firmware has the CONFIG_BMP_LOGO feature enabled.
305    Present bmp_logo = 11;
306
307    // The AP firmware has the CONFIG_FW_SPLASH_SCREEN feature enabled.
308    Present fw_splash_screen = 12;
309
310    // The CSE sync is late at payload with CONFIG_SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD
311    // feature enabled.
312    Present late_cse_sync = 13;
313
314    // The AP firmware has the CONFIG_HAS_RECOVERY_MRC_CACHE feature enabled.
315    Present has_recovery_mrc_cache = 14;
316
317    // The AP firmware has the CONFIG_CHROMEOS_ENABLE_ESOL feature enabled.
318    Present mainboard_has_early_sign_of_life = 15;
319
320
321  }
322
323  // Audio properties of system
324  Audio audio = 6;
325  message Audio {
326    // Which audio codec is in use (deprecated)
327    AudioCodec audio_codec = 1;
328
329    // Which amplifier is in use for the speakers
330    Amplifier speaker_amp = 2;
331
332    // Which audio codec is in use for the headphones
333    AudioCodec headphone_codec = 3;
334
335    // The number of microphones present in the lid
336    Count lid_microphone = 4;
337
338    // The number of microphones present in the base
339    Count base_microphone = 5;
340
341    // Which amplifier is in use for the speakers if one is present
342    Component.Amplifier speaker_amplifier = 6;
343
344    // The card configs for this topology.
345    repeated CardConfig card_configs = 7;
346
347      // The source config file layout used for card-agnostic cras config.
348    AudioConfigStructure cras_config = 8;
349
350    // If audio DSP firmware is SOF-backed.
351    Present sof_audio_dsp = 9;
352
353    enum AudioCodec {
354      AUDIO_CODEC_UNKNOWN = 0;  // Also used for non-public audio codecs
355      RT5682 = 1;
356      ALC5682I = 2;
357      ALC5682 = 3;
358      reserved 4 to 7;  // Not to conflict with existing amplifiers
359      DA7219 = 8;
360      reserved 9;  // Not to conflict with existing amplifiers
361      // New audio codecs
362      NAU88L25B = 10;
363      CS42L42 = 11;
364      ALC5682IVS = 12;
365      WCD9385 = 13;
366      ES8326 = 14;
367      ALC272 = 15;
368      // 16 is free to be used
369      AUDIO_CODEC_ALC5650 = 17;
370      AUDIO_CODEC_ALC256 = 18;
371      AUDIO_CODEC_ALC3247 = 19;
372      AUDIO_CODEC_ALC3287 = 20;
373      // 21 is free to be used
374      AUDIO_CODEC_ALC722 = 22;
375      AUDIO_CODEC_ALC721 = 23;
376      AUDIO_CODEC_ALC3204 = 24;
377    }
378
379    enum Amplifier {
380      AMPLIFIER_UNKNOWN = 0;  // Also used for non-public amplifier
381      reserved 1 to 3;        // Not to conflict with existing audio codecs
382      MAX98357 = 4;
383      MAX98373 = 5;
384      MAX98360 = 6;
385      RT1015 = 7;
386      reserved 8;  // Not to conflict with existing audio codecs
387      ALC1011 = 9;
388      // New amplifiers
389      RT1015P = 10;
390      ALC1019 = 11;
391      MAX98390 = 12;
392      MAX98396 = 13;
393      CS35L41 = 14;
394      MAX98363 = 15;
395      NAU8318 = 16;
396      AMPLIFIER_ALC5650 = 17;
397      AMPLIFIER_ALC256 = 18;
398      AMPLIFIER_ALC3247 = 19;
399      AMPLIFIER_ALC3287 = 20;
400      TAS2563 = 21;
401      AMPLIFIER_ALC722 = 22;
402      AMPLIFIER_ALC721 = 23;
403      AMPLIFIER_ALC3204 = 24;
404    }
405
406    enum AudioConfigStructure {
407      AUDIO_CONFIG_STRUCTURE_NONE = 0;
408      DESIGN = 1;
409      COMMON = 2;
410    }
411
412    // The configuration file layout structure for a single card.
413    message CardConfig {
414      // The name of the audio card.
415      string card_name = 1;
416
417      // The UCM suffix pattern for this card if different to the program-level
418      // default.
419      google.protobuf.StringValue ucm_suffix = 2;
420
421      // The source config file layout used for UCM config. May not be
422      // AUDIO_CONFIG_STRUCTURE_NONE.
423      AudioConfigStructure ucm_config = 3;
424
425      // The source config file layout used for card-level cras config.
426      AudioConfigStructure cras_config = 4;
427
428      // The source config file layout used for sound card init config.
429      AudioConfigStructure sound_card_init_config = 5;
430
431      // The cras suffix pattern for this card if different to the program-level
432      // default.
433      google.protobuf.StringValue cras_suffix = 6;
434    }
435  }
436
437  // Camera properties of system.
438  Camera camera = 7;
439  message Camera {
440    enum Interface {
441      INTERFACE_UNKNOWN = 0;
442      INTERFACE_USB = 1;
443      INTERFACE_MIPI = 2;
444    }
445
446    enum Facing {
447      FACING_UNKNOWN = 0;
448      FACING_FRONT = 1;
449      FACING_BACK = 2;
450    }
451
452    enum Orientation {
453      ORIENTATION_UNKNOWN = 0;
454      ORIENTATION_0 = 1;
455      ORIENTATION_90 = 2;
456      ORIENTATION_180 = 3;
457      ORIENTATION_270 = 4;
458    }
459
460    enum Flags {
461      FLAGS_NONE = 0x0;
462      FLAGS_SUPPORT_1080P = 0x1;
463      FLAGS_SUPPORT_AUTOFOCUS = 0x2;
464    }
465
466    message Device {
467      // The interface type of the camera device.
468      Interface interface = 2;
469
470      // Direction the camera faces relative to device screen.
471      Facing facing = 3;
472
473      // Clockwise angle through which the output image needs to be rotated to
474      // be upright on the device screen in its native orientation.
475      Orientation orientation = 4;
476
477      // Bit flags representing camera capabilities of this device. A camera
478      // module can be mounted on this slot only if all the flags match.
479      uint32 flags = 5;
480
481      // List of strings each identifies a possible camera module on this slot.
482      repeated string ids = 6;
483
484      // If privacy switch is present on the camera
485      Present privacy_switch = 7;
486
487      // The number of microphones associated with this device.
488      Count microphone_count = 8;
489
490      // Whether the camera module is detachable.
491      bool detachable = 9;
492    }
493
494    // List of camera devices on the model.
495    repeated Device devices = 4;
496
497    // The list of camera features that are enabled on this device.
498    repeated string features = 5;
499
500    // Whether expected camera devices were enumerated.
501    bool enumerated = 6;
502
503    // List of strings each identifies an enumerated USB camera module.
504    repeated string enumerated_usb_ids = 7;
505  }
506
507  // Accelerometer properties of system.
508  Accelerometer accelerometer = 8;
509  message Accelerometer {
510    // If lid accelerometer is present on system
511    Present lid_accelerometer = 1;
512
513    // If base accelerometer is present on system
514    Present base_accelerometer = 2;
515  }
516
517  // Gyroscope properties of system.
518  Gyroscope gyroscope = 9;
519  message Gyroscope {
520    // If lid gyroscope is present on system
521    Present lid_gyroscope = 1;
522
523    // If base gyroscope is present on system
524    Present base_gyroscope = 2;
525  }
526
527  // Magnetometer properties of system.
528  Magnetometer magnetometer = 10;
529  message Magnetometer {
530    // If lid magnometer is present on system
531    Present lid_magnetometer = 1;
532
533    // If base magnometer is present on system
534    Present base_magnetometer = 2;
535  }
536
537  // LightSensor properties of system.
538  LightSensor light_sensor = 11;
539  message LightSensor {
540    // If lid light sensor is present on system
541    Present lid_lightsensor = 1;
542
543    // If base light sensor is present on system
544    Present base_lightsensor = 2;
545
546    // If camera light sensor is present on system
547    Present camera_lightsensor = 3;
548  }
549
550  // Screen properties of system
551  Screen screen = 12;
552  message Screen {
553    // The libdrm connector type that must match for the properties to
554    // apply to this display.  Right now, only eDP is supported, and
555    // is the most common.  Other connector types can be added as
556    // required.  See drm_mode.h in libdrm for valid options.
557    enum ConnectorType {
558      // Assume a reasonable default (right now eDP).
559      CONNECTOR_TYPE_UNSPECIFIED = 0;
560
561      // eDP connector type.
562      CONNECTOR_TYPE_EDP = 1;
563    }
564    ConnectorType connector_type = 4;
565
566    Component.DisplayPanel.Properties panel_properties = 3;
567
568    // If touch support is present on system
569    Present touch_support = 2;
570
571    reserved 1;
572  }
573
574  // Function form factor of system
575  FormFactor form_factor = 13;
576  message FormFactor {
577    // Form factory of system
578    FormFactorType form_factor = 1;
579    enum FormFactorType {
580      FORM_FACTOR_UNKNOWN = 0;
581      CLAMSHELL = 1;
582      CONVERTIBLE = 2;
583      DETACHABLE = 3;
584      CHROMEBASE = 4;
585      CHROMEBOX = 5;
586      CHROMEBIT = 6;
587      CHROMESLATE = 7;
588    }
589
590    // Input to enter recovery
591    RecoveryInputType recovery_input = 2;
592    enum RecoveryInputType {
593      RECOVERY_INPUT_UNKNOWN = 0;
594      KEYBOARD = 1;
595      POWER_BUTTON = 2;
596      RECOVERY_BUTTON = 3;
597    }
598
599    // Whether to enable detachable UI in firmware build.
600    google.protobuf.BoolValue detachable_ui = 3;
601  }
602
603  // Stylus properites of system.
604  Stylus stylus = 14;
605  message Stylus {
606    // Type of stylus
607    StylusType stylus = 1;
608    enum StylusType {
609      STYLUS_UNKNOWN = 0;
610      NONE = 1;
611      INTERNAL = 2;  // Garaged stylus
612      EXTERNAL = 3;  // Non-garaged stylus
613    }
614  }
615
616  // Keyboard properties of system
617  Keyboard keyboard = 15;
618  message Keyboard {
619    // Type of keyboard present on system
620    KeyboardType keyboard_type = 1;
621    enum KeyboardType {
622      KEYBOARD_TYPE_UNKNOWN = 0;
623      INTERNAL = 1;    // E.g. Clamshell/Convertible
624      NONE = 2;        // E.g. Chromebox
625      DETACHABLE = 3;  // E.g. Tablet with detachable keyboard
626    }
627
628    // If keyboard backlight is present on system
629    Present backlight = 2;
630
631    // If power button is present on keyboard
632    Present power_button = 3;
633
634    // If numeric pad is present on keyboard
635    Present numeric_pad = 4;
636
637    // Type of the MCU used in the system
638    KeyboardMcuType mcu_type = 6;
639    enum KeyboardMcuType {
640      KEYBOARD_MCU_NOT_PRESENT = 0;
641      KEYBOARD_MCU_PRISM = 1;
642    }
643
644    // The keyboard backlight level step values. Values must be in
645    // increasing order. If set, the first value must be 0. This corresponds to
646    // the keyboard_backlight_user_steps powerd pref.
647    repeated double backlight_user_steps = 5;
648
649    // The configuration of the keyboard backlight percentage based on the
650    // ambient light sensor value. Steps should be in increasing order.
651    repeated KbAlsStep als_steps = 7;
652
653    // The default keyboard backlight percentage in the
654    // absence of an ambient light sensor controlling the keyboard backlight.
655    double no_als_brightness = 8;
656
657    // The number of keys on the left side of bottom row.
658    KeyboardBottomLeftLayout bottom_left_layout = 9;
659    enum KeyboardBottomLeftLayout {
660      KEYBOARD_BOTTOM_LEFT_LAYOUT_UNKNOWN = 0;
661      KEYBOARD_BOTTOM_LEFT_3_KEYS = 1;
662      KEYBOARD_BOTTOM_LEFT_4_KEYS = 2;
663    }
664
665    // The number of keys on the right side of bottom row.
666    KeyboardBottomRightLayout bottom_right_layout = 10;
667    enum KeyboardBottomRightLayout {
668      KEYBOARD_BOTTOM_RIGHT_LAYOUT_UNKNOWN = 0;
669      KEYBOARD_BOTTOM_RIGHT_2_KEYS = 1;
670      KEYBOARD_BOTTOM_RIGHT_3_KEYS = 2;
671      KEYBOARD_BOTTOM_RIGHT_4_KEYS = 3;
672    }
673
674    // The number of columns of numeric pad.
675    NumericPadLayout numeric_pad_layout = 11;
676    enum NumericPadLayout {
677        NUMERIC_PAD_LAYOUT_UNKNOWN = 0;
678        NUMERIC_PAD_3_COLUMN = 1;
679        NUMERIC_PAD_4_COLUMN = 2;
680    }
681  }
682
683  // Memory properties of system
684  Memory memory = 16;
685  message Memory {
686    Component.Memory.Profile profile = 1;
687  }
688
689  // Fingerprint properties of system
690  Fingerprint fingerprint = 17;
691  message Fingerprint {
692    // Location of fingerprint sensor
693    Location location = 1;
694    // Fingerprint board used.
695    string board = 2;
696    // Read-only (RO) firmware version to use (empty means use default).
697    string ro_version = 3;
698    // Healthd fingerprint diagnostic routine parameters.
699    FingerprintDiag fingerprint_diag = 4;
700    // If fingerprint sensor is present on system
701    bool present = 5;
702
703    enum Location {
704      LOCATION_UNKNOWN = 0;
705      // Top of the screen (e.g. Pixel Slate) at the left
706      POWER_BUTTON_TOP_LEFT = 1;
707      // Bottom of keyboard at the left
708      KEYBOARD_BOTTOM_LEFT = 2;
709      // Bottom of keyboard at the right
710      KEYBOARD_BOTTOM_RIGHT = 3;
711      // Top of keyboard at the right (e.g. Galaxy Chromebook)
712      KEYBOARD_TOP_RIGHT = 4;
713      reserved 5;  // Not to conflict with NOT_PRESENT
714      // At the right side
715      RIGHT_SIDE = 6;
716      // At the left side
717      LEFT_SIDE = 7;
718      reserved 8;  // Not to conflict with PRESENT
719      // Left of power button at top right corner (of the keyboard)
720      LEFT_OF_POWER_BUTTON_TOP_RIGHT = 9;
721    }
722
723    message FingerprintDiag {
724      bool routine_enable = 1;
725      uint32 max_pixel_dev = 2;
726      uint32 max_dead_pixels = 3;
727      PixelMedian pixel_median = 4;
728      uint32 num_detect_zone = 5;
729      repeated DetectZone detect_zones = 6;
730      uint32 max_dead_pixels_in_detect_zone = 7;
731      uint32 max_reset_pixel_dev = 8;
732      uint32 max_error_reset_pixels = 9;
733
734      message PixelMedian {
735        uint32 cb_type1_lower = 1;
736        uint32 cb_type1_upper = 2;
737        uint32 cb_type2_lower = 3;
738        uint32 cb_type2_upper = 4;
739        uint32 icb_type1_lower = 5;
740        uint32 icb_type1_upper = 6;
741        uint32 icb_type2_lower = 7;
742        uint32 icb_type2_upper = 8;
743      }
744
745      message DetectZone {
746        uint32 x1 = 1;
747        uint32 y1 = 2;
748        uint32 x2 = 3;
749        uint32 y2 = 4;
750      }
751    }
752  }
753
754  // Non-volatile storage properties of system
755  Storage storage = 18;
756  message Storage {
757    Component.Storage.StorageType storage_type = 1;
758    uint32 size_gb = 2;
759  }
760
761  // Bluetooth properties
762  Bluetooth bluetooth = 19;
763  message Bluetooth {
764    // Defines the specific bt component used in the design config
765    Component.Bluetooth component = 1;
766
767    Present present = 2;
768  }
769
770  // BarrelJack properties
771  BarrelJack barreljack = 20;
772  message BarrelJack {
773    // If BarrelJack support is present on system.
774    Present present = 1;
775  }
776
777  // Wifi properties
778  // NEXT TAG: 3
779  message Wifi {
780    enum WifiChip {
781      WIFI_CHIP_UNKNOWN = 0;
782      WIRELESS_86ED801D = 1;
783      WIRELESS_REALTEK = 2;
784    }
785
786    // WLAN protocols supported by the Wifi chipset(s).
787    repeated Component.Wifi.WLANProtocol supported_wlan_protocols = 1;
788
789    repeated WifiChip wifi_chips = 2;
790
791    WifiConfig wifi_config = 3;
792
793    bool wifi_vpd_sar = 4;
794  }
795  Wifi wifi = 23;
796
797  message Button {
798    // A general part of the device that contains the button,
799    // e.g. "on the screen", "on the keyboard".
800    enum Region {
801      REGION_UNKNOWN = 0;
802      SCREEN = 1;
803      KEYBOARD = 2;
804    }
805
806    // The edge of the Region that contains the button.
807    enum Edge {
808      EDGE_UNKNOWN = 0;
809      LEFT = 1;
810      RIGHT = 2;
811      TOP = 3;
812      BOTTOM = 4;
813    }
814
815    Region region = 1;
816
817    Edge edge = 2;
818
819    // The percentage for button center position to the display's width/height
820    // in primary landscape screen orientation. If Edge is LEFT or RIGHT,
821    // specifies the button's center position as a fraction of the Region's
822    // height relative to the top of the Region. For TOP and BOTTOM, specifies
823    // the position as a fraction of the Region's width relative to the left
824    // side of the Region.
825    float position = 3;
826  }
827
828  Button power_button = 21;
829  Button volume_button = 22;
830
831  // EmbeddedController properties
832  // Next Tag: 12
833  message EmbeddedController {
834    // Whether any kind of EC is present on the system.
835    Present present = 1;
836
837    // The type of EC on the device.
838    // Next Tag: 3
839    enum EmbeddedControllerType {
840      EC_TYPE_UNKNOWN = 0;
841      EC_CHROME = 1;
842      EC_WILCO = 2;
843    }
844    EmbeddedControllerType ec_type = 2;
845
846    // The physical component of the EC.
847    Component.EmbeddedController part = 3;
848
849    // Whether the EC supports EC_FEATURE_TYPEC_CMD.
850    Present feature_typec_cmd = 4;
851
852    // Whether the EC supports CBI (CrOS Board Info stored on the EEPROM).
853    Present cbi = 5;
854
855    // Whether the EC detects the detachable base at runtime
856    Present detachable_base = 6;
857
858    // Whether the EC supports EC_CMD_CHARGE_CONTROL v2.
859    Present feature_charge_control_v2 = 7;
860
861    // Whether the EC will panic on Asserts
862    Present feature_asserts_panic = 8;
863
864    // Whether the EC supports system safe mode recovery.
865    Present feature_system_safe_mode = 9;
866
867    // Whether the EC supports memory dump host commands.
868    Present feature_memory_dump_commands = 10;
869
870    // The extracted EC build config options
871    // E.g. CONFIG_DEBUG_ASSERT, CONFIG_PLATFORM_EC_BATTERY
872    map<string, Present> build_config = 11;
873
874    // Maximal ODR (Online data rate) of the MEMS sensors
875    // (accelerometer/gyroscope). Usually EC can handle ODR up to ~200Hz. On
876    // some EC, we need to reduce to 100Hz otherwise the sensor task is not
877    // scheduled fast enough. It can lead to failing the CTS tests or worse EC
878    // crashes (watchdog timer) if the idle stack is never scheduled. Normally,
879    // the maximal ODR is set in the firmware, we find the right maximal ODR
880    // during bring up. However, if we have to reduce the ODR between firmware
881    // qual we can do it here: 0 (default) means the EC default is used by
882    // iioservice to set the maximal sensor frequency. If |max_sensor_odr_mhz|
883    // is greater than 0, iioservice will never set a maximal frequency above
884    // it.
885    google.protobuf.UInt32Value max_sensor_odr_mhz = 12;
886  }
887  EmbeddedController embedded_controller = 24;
888
889  message TrustedPlatformModule {
890    enum TrustedPlatformModuleType {
891      TPM_TYPE_UNKNOWN = 0;
892      THIRD_PARTY = 1;
893      // GSCs (Google Security Chips) provide additional functionality beyond
894      // serving as the Trusted Platform Module.
895      GSC_H1B = 2;
896      GSC_H1D = 3;
897    }
898    TrustedPlatformModuleType tpm_type = 1;
899
900    // Whether GSC image is signed with production RW keyid.
901    Present production_rw_key_id = 2;
902
903    // The runtime-determined TPM version. This field is needed because a flex
904    // device couldn't determine its TPM version using USE flags, so it needs
905    // to rely on this hardware feature which is detected during runtime.
906    enum RuntimeTpmVersion {
907      TPM_VERSION_DISABLED = 0;
908      // TPM 1.2
909      TPM_VERSION_V1_2 = 1;
910      // TPM 2.0
911      TPM_VERSION_V2 = 2;
912    }
913    RuntimeTpmVersion runtime_tpm_version = 3;
914
915    enum GscFirmwareName {
916      GSC_NONE = 0;
917      GSC_CR50 = 1;
918      GSC_TI50 = 2;
919    }
920    GscFirmwareName gsc_fw_name = 4;
921
922    // Whether the TPM has NVRAM space used for enterprise rollback.
923    Present enterprise_rollback_space = 5;
924
925    // Whether GSC ADID is valid. This is true if there's a valid
926    // attested_device_id in the RO_VPD that matches the sn bits stored in GSC.
927    Present valid_adid = 6;
928  }
929  TrustedPlatformModule trusted_platform_module = 25;
930
931  // Whether the system supports 'Hotwording' (ie wake-on-voice: "Hey Google")
932  message Hotwording {
933    Present present = 1;
934  }
935  Hotwording hotwording = 26;
936
937  // Whether the system has an internal display, external display only or both
938  message Display {
939    enum Type {
940      TYPE_UNKNOWN = 0;
941      TYPE_INTERNAL = 1;
942      TYPE_EXTERNAL = 2;
943      TYPE_INTERNAL_EXTERNAL = 3;
944    }
945
946    Type type = 1;
947  }
948  Display display = 27;
949
950  // Whether the system has a touchpad
951  message Touchpad {
952    Present present = 1;
953
954    // Type of touchpad present on system
955    TouchpadType touchpad_type = 2;
956    enum TouchpadType {
957      TYPE_UNKNOWN = 0;
958      INTERNAL = 1;    // E.g. Clamshell/Convertible
959      NONE = 2;        // E.g. Chromebox
960      DETACHABLE = 3;  // E.g. Tablet with detachable keyboard/touchpad
961    }
962  }
963  Touchpad touchpad = 28;
964
965  // Whether the system has an audio input mute switch
966  message MicrophoneMuteSwitch {
967    Present present = 1;
968  }
969  MicrophoneMuteSwitch microphone_mute_switch = 29;
970
971  message Battery {
972    // Battery present (e.g. not present on chromebox)
973    Present present = 1;
974    Lifetime lifetime = 2;
975    Charging charging = 3;
976    // Device supports the feature to boot with no battery.
977    bool no_battery_boot_supported = 4;
978    message Lifetime {
979      // Starting with a fully-charged battery, the amount of time a Chrome
980      // device must remain operational in the Shipping state.
981      Duration shipping_min = 1;
982      // Starting with a fully-charged battery, the amount of time a Chrome
983      // device must remain operational in the Deep Sleep state.
984      Duration deep_sleep_min = 2;
985      // Starting with a fully-charged battery, the amount of time a Chrome
986      // device must remain operational in the Suspend state.
987      Duration suspend_min = 3;
988      // Starting with a fully-charged battery, the amount of time a Chrome
989      // device must remain operational in the Lucid Sleep state.
990      Duration lucid_sleep_min = 4;
991      // Starting with a fully-charged battery, the amount of time a Chrome
992      // device must remain operational in the Active state.
993      Duration active_min = 5;
994    }
995
996    message Charging {
997      // Max time to charge from 0 to 100% in the Active state at average load.
998      Duration active_max = 1;
999      // Max time to charge from 0 to 100% in the Suspend state.
1000      Duration suspend_max = 2;
1001      // Max time to charge from 0 to 100% in the Deep sleep state.
1002      Duration deep_sleep_max = 3;
1003    }
1004  }
1005  Battery battery = 30;
1006
1007  message PrivacyScreen {
1008    // If privacy screen is present on system
1009    Present present = 1;
1010  }
1011  PrivacyScreen privacy_screen = 31;
1012
1013  Soc soc = 32;
1014  message Soc {
1015    repeated Component.Soc.Feature features = 1;
1016    repeated Component.Soc.Vulnerability vulnerabilities = 2;
1017    string arc_media_codecs_suffix = 3;
1018    Present hevc_support = 4;
1019    ResourceConfig resource_config = 5;
1020  };
1021
1022  DisplayPortConverter dp_converter = 33;
1023  message DisplayPortConverter {
1024    repeated Component.DisplayPortConverter converters = 1;
1025  };
1026
1027  // HPS properties of system
1028  Hps hps = 34;
1029  message Hps {
1030    // If hps is present on system
1031    Present present = 1;
1032  };
1033
1034  PoE poe = 35;
1035  message PoE {
1036    // If PoE peripheral support is present on system
1037    Present present = 1;
1038  };
1039
1040  // Power supply properties
1041  PowerSupply power_supply = 36;
1042  message PowerSupply {
1043    // If BarrelJack support is present on system.
1044    Present barreljack = 1;
1045
1046    // The input power below which a warning should be shown to use a
1047    // higher-power USB adapter.
1048    int32 usb_min_ac_watts = 2;
1049  }
1050
1051  Proximity proximity = 37;
1052  message Proximity {
1053    repeated ProximityConfig configs = 1;
1054  }
1055
1056  // Touch screen properties
1057  Touch touch = 38;
1058  message Touch {
1059     // Configures touch slop distance in Chrome.
1060     // This is the number of pixels a touch event can wander before being
1061     // recognized as a scroll rather than a tap.
1062     google.protobuf.UInt32Value touch_slop_distance = 1;
1063  }
1064
1065  Thermal thermal = 39;
1066  message Thermal {
1067    // A suffix to be added to the design name to determine the directory to
1068    // search for thermal config files, e.g. dptf.dv.
1069    string config_path_suffix = 1;
1070  }
1071
1072  RuntimeProbeConfig runtime_probe_config = 40;
1073  message RuntimeProbeConfig {
1074    // If the probe config file under /etc/runtime_probe/{model}/ present on
1075    // device.
1076    Present present = 1;
1077
1078    // If the encrypted probe config file under /etc/runtime_probe/{model}/
1079    // present on device.
1080    Present encrypted_config_present = 2;
1081  }
1082
1083  Dgpu dgpu_config = 41;
1084  message Dgpu {
1085    Present present = 1;
1086
1087    // The type of dGPU on the device.
1088    // Next Tag: 3
1089    enum DgpuType {
1090      DGPU_UNKNOWN = 0;
1091      DGPU_NV3050 = 1;
1092      DGPU_NV4050 = 2;
1093    }
1094    DgpuType dgpu_type = 2;
1095  }
1096
1097  // UWB properties of system
1098  Uwb uwb_config = 42;
1099  message Uwb {
1100    // If UWB is present on system
1101    Present present = 1;
1102  };
1103
1104  HardwareProbe hardware_probe_config = 43;
1105  message HardwareProbe {
1106    string gpu_family = 1;
1107    string gpu_vendor = 2;
1108    string cpu_soc_family = 3;
1109    string dmi_product_name = 4;
1110  }
1111
1112  // A single step in an ambient light sensor configuration table. Each step
1113  // configures the brightness percentage while at that step as well as the
1114  // sensor value at which the next or previous step should be considered.
1115  // Steps should be specified in increasing order for each field.
1116  message KbAlsStep {
1117    // The backlight brightness percentage for this step.
1118    double backlight_percent = 1;
1119
1120    Component.LuxThreshold lux_threshold = 2;
1121  }
1122
1123  // Detachable base properties
1124  DetachableBase detachable_base = 44;
1125  message DetachableBase {
1126    // The target EC binary name which is placed under /lib/firmware.
1127    string ec_image_name = 1;
1128
1129    // The Product ID of the detachable base.
1130    // This value can be queried by command 'lsusb'.
1131    uint32 product_id = 2;
1132
1133    // The touchpad binary name which is placed under /lib/firmware
1134    // This is only needed if the detachable base contains touchpad.
1135    string touch_image_name = 3;
1136
1137    // Searches and finds the idVendor and idProduct under sysfs
1138    // /sys/bus/usb/devices/* which matches the vendor-id and product-id.
1139    // This is required for usb interface detachable base.
1140    string usb_path = 4;
1141
1142    // The Vendor ID of the detachable base.
1143    // This value can be queried by command 'lsusb'.
1144    uint32 vendor_id = 5;
1145
1146    // Searches and finds the idVendor and idProduct under sysfs
1147    // /sys/bus/i2c/devices/* which matches the vendor-id and product-id
1148    // due to hid-over-i2c is used.
1149    // This is required for i2c interface detachable base.
1150    // Note - i2c bus numbering can shift across reboots, please have
1151    // corresponding setup based on your platform to ensure consistency.
1152    string i2c_path = 6;
1153  }
1154
1155  // Supported suspend modes
1156  Suspend suspend = 45;
1157  message Suspend {
1158    // If S3 (suspend to mem) is supported
1159    Present suspend_to_mem = 1;
1160    // If S0ix (suspend to idle) is supported
1161    Present suspend_to_idle = 2;
1162  }
1163
1164  // VRR (variable refresh rate) properties
1165  Vrr vrr = 46;
1166  message Vrr {
1167    // If VRR is supported.
1168    Present present = 1;
1169  }
1170
1171  // SD reader properties
1172  SdReader sd_reader = 47;
1173  message SdReader {
1174    // If SD reader is supported.
1175    Present present = 1;
1176  }
1177
1178  // FeatureLevel stores the feature level of a DUT
1179  uint32 feature_level = 48;
1180
1181  // OEM info
1182  OEMInfo oem_info = 49;
1183  message OEMInfo {
1184    // Name stores the name of OEM.
1185    string name = 1;
1186  }
1187
1188  // Fan
1189  Fan fan = 50;
1190  message Fan {
1191    // The number of fan in the device.
1192    google.protobuf.UInt32Value fan_count = 1;
1193  }
1194
1195  // Details about the Interrupt controller
1196  InterruptControllerInfo interrupt_controller_info = 51;
1197  message InterruptControllerInfo {
1198    // If present then the Interrupt controller can support NMIs
1199    Present nmi_support = 1;
1200  }
1201
1202  // Properties of tiled display, which consists of multiple panels each driven
1203  // by separate connectors.
1204  TiledDisplay tiled_display = 52;
1205  message TiledDisplay {
1206    // If the device is connected to a tiled display.
1207    Present present = 1;
1208  }
1209
1210  // Details about cpu info.
1211  CpuInfo cpu_info = 53;
1212  message CpuInfo {
1213    // Details about cpu vendor info.
1214    message VendorInfo {
1215      int64 cpu_family_num = 1;
1216      int64 cpu_model_num = 2;
1217    }
1218    VendorInfo vendor_info = 1;
1219  }
1220
1221  // Details about pendrive.
1222  Pendrive pendrive = 54;
1223  message Pendrive {
1224    Present present = 1;
1225  }
1226}
1227