• 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/design_config_id.proto";
10import "chromiumos/config/api/design_id.proto";
11import "chromiumos/config/api/hardware_topology.proto";
12import "chromiumos/config/api/partner_id.proto";
13import "chromiumos/config/api/program_id.proto";
14import "chromiumos/config/api/topology.proto";
15import "chromiumos/config/public_replication/public_replication.proto";
16
17option go_package = "go.chromium.org/chromiumos/config/go/api";
18
19// Next ID: 12
20message Design {
21  // Fields replicated to public configs.
22  chromiumos.config.public_replication.PublicReplication public_replication = 7;
23
24  // Globally unique design identifier.
25  DesignId id = 1;
26
27  // Program that defines the constraints for this design.
28  ProgramId program_id = 2;
29
30  // ODM for the given hardware design.
31  PartnerId odm_id = 3;
32
33  // Design codename (human friendly).
34  string name = 4;
35
36  // Board version assignment for each build phase.
37  // Example:
38  //  1 --> proto
39  //  2 --> proto2 ...
40  map<uint32, string> board_id_phase = 5;
41
42  // Supported hardware configurations for a given design.
43  repeated Config configs = 6;
44
45  // Map of SSFC values for this project. These values must fit within the
46  // program's definitions of SSFC Segments. The string represents the human-
47  // readable description of the SSFC value (e.g. BMI160, PS8751)
48  // E.g 0x0010 -> "CameraA"; 0x0020 -> "CameraB" within SsfcSegment 0x0030
49  map<uint32, string> ssfc_value = 8;
50
51  // Define custom type as whitelabel or rebrand
52  // More details in go/custom_label_introduction
53  CustomType custom_type = 10;
54  enum CustomType {
55    NO_CUSTOM = 0;
56    WHITELABEL = 1;
57    REBRAND = 2;
58  }
59
60  reserved "platform";
61  reserved 9;
62
63  // A sparse list of flash name mappings. Keys are the flash name as determine
64  // by probing via futility flash --get-info, and the values are the flash
65  // names that are needed as input to the ap_wpsr tool that is used to
66  // determine the write protect status register values when software write
67  // protection is enabled.
68  map<string, string> spi_flash_transform = 11;
69
70  // Defines a unique hardware configuration for a given hardware design
71  // and the corresponding hardware features that will be supported.
72  // Next ID: 6
73  message Config {
74    // Fields replicated to public configs.
75    chromiumos.config.public_replication.PublicReplication public_replication = 5;
76
77    // The ID encoded in hardware on a device, typically in CBI.
78    DesignConfigId id = 1;
79
80    // Each unique value of hardware_topology requires a unique DesignConfigId
81    HardwareTopology hardware_topology = 2;
82
83    // This field is generated from hardware_topology by combining all of the
84    // partial HardwareFeatures definitions from each selected hardware topology
85    HardwareFeatures hardware_features = 3;
86
87    // Constraints on HardwareFeatures.
88    //
89    // Each Constraint should specify exactly one HardwareFeature to constrain.
90    // Constraints are OR'd across the same type of HardwareFeatures, and AND'd
91    // across different types of HardwareFeatures. For example, the following
92    // specifies CLAMSHELL or CONVERTIBLE form factors are allowed, and the
93    // screen must have touch support:
94    //
95    //   design_config_constraints: <
96    //     level: REQUIRED
97    //     features: <
98    //       form_factor: <
99    //         form_factor: CLAMSHELL
100    //       >
101    //     >
102    //   >
103    //   design_config_constraints: <
104    //     level: REQUIRED
105    //     features: <
106    //       form_factor: <
107    //         form_factor: CONVERTIBLE
108    //       >
109    //     >
110    //   >
111    //   design_config_constraints: <
112    //     level: REQUIRED
113    //     features: <
114    //       screen: <
115    //         touch_support: PRESENT
116    //       >
117    //     >
118    //   >
119    //
120    // TODO: Formalize constraint definitions further, e.g. what are the
121    // semantics of level?
122    // TODO: should this be moved into Design or Program? This isn't used here
123    message Constraint {
124      enum Level {
125        TYPE_UNKNOWN = 0;
126        REQUIRED = 1;
127        PREFERRED = 2;
128        OPTIONAL = 3;
129      }
130
131      Level level = 1;
132      HardwareFeatures features = 2;
133    }
134
135    reserved 4, 7;
136  }
137}
138