blob: 6218c1034e6e84af47dbe2905a6c8449bc3f06d9 [file] [log] [blame]
// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package chromiumos.config.api;
import "chromiumos/config/api/component.proto";
import "chromiumos/config/api/wifi_config.proto";
import "google/protobuf/wrappers.proto";
option go_package = "go.chromium.org/chromiumos/config/go/api";
// Represents a specific hardware topology option for a hardware feature, e.g.
// camera, microphone, gyroscope, daughter board connection. For example. one
// camera topology would be represented by a unique instance of this Topology
// message.
//
// All Topology instances are scoped to a particular Design.
message Topology {
// Short, but meaningful string that represents the topology. Blank id is
// not valid. Id values are validated by Design repo. Ids are
// meaningful within a Design. Ids are scoped and unique within a
// particular hardware features for a Design. For example, it is valid to have
// a "NONE" id for both the camera and microphone hardware feature within the
// same Design.
string id = 1;
// The type of hardware feature this topology describes. This is used to
// ensure that the correct Topology values are used correctly within the
// HardwareTopology message
Type type = 2;
enum Type {
TYPE_UNKNOWN = 0;
SCREEN = 1;
FORM_FACTOR = 2;
AUDIO = 3;
STYLUS = 4;
KEYBOARD = 5;
THERMAL = 6;
CAMERA = 7;
ACCELEROMETER_GYROSCOPE_MAGNETOMETER = 8;
FINGERPRINT = 9;
PROXIMITY_SENSOR = 10;
DAUGHTER_BOARD = 11;
NON_VOLATILE_STORAGE = 12;
RAM = 13; // deprecated
WIFI = 14;
CELLULAR_BOARD = 15;
SD_READER = 16;
MOTHERBOARD_USB = 17;
BLUETOOTH = 18;
BARRELJACK = 19;
POWER_BUTTON = 20;
VOLUME_BUTTON = 21;
EC = 22;
TOUCH = 23;
TPM = 24;
MICROPHONE_MUTE_SWITCH = 25;
BATTERY = 26;
HDMI = 27;
SOC = 28;
HPS = 29;
DP_CONVERTER = 30;
POE = 31;
POWER_SUPPLY = 32;
RECOVERY_INPUT = 33;
}
// Map of human readable descriptions in various languages. Maps language
// code, e.g. "EN" or "ZH", to description of topology. These descriptions can
// be displayed to factory operators to select the correct options that
// applies to the board they are assembling.
map<string, string> description = 3;
// Specify the subset of hardware features that this hardware topology
// provides
HardwareFeatures hardware_feature = 4;
}
// Defines a time duration that's targeted for easier reading/understanding
// of program requirements (versus normalizing everything to millis).
message Duration {
enum Type {
TYPE_UNKNOWN = 0;
MILLISECONDS = 1;
SECONDS = 2;
MINUTES = 3;
HOURS = 4;
DAYS = 5;
}
Type type = 1;
int32 value = 2;
}
// Each Topology message specifies what that topology means in a 1st class
// queryable way. Each Topology will only the subset of hardware features that
// are applicable to that value.
// The DesignConfig layer will combine all of the Topology messages
// HardwareFeature messages into a wholistic view of the hardware design
// configuration.
//
// Note to API designers: each field needs to be able to differentiate
// an unspecified value and from the 0-value; this can be down with
// messages or enums. Each field also defines how multiple values should be
// combined.
// NEXT TAG: 38
message HardwareFeatures {
enum Present {
PRESENT_UNKNOWN = 0;
PRESENT = 1;
NOT_PRESENT = 2;
}
// Copied from PowerSupplyProperties.PowerSource.Port in
// src/platform2/system_api/dbus/power_manager/power_supply_properties.proto.
enum PortPosition {
UNKNOWN = 0;
// Various positions on the device. The first word describes the side of
// the device where the port is located while the second clarifies the
// position. For example, LEFT_BACK means the farthest-back port on the
// left side, while BACK_LEFT means the leftmost port on the back of the
// device.
LEFT = 1;
RIGHT = 2;
BACK = 3;
FRONT = 4;
LEFT_FRONT = 5;
LEFT_BACK = 6;
RIGHT_FRONT = 7;
RIGHT_BACK = 8;
BACK_LEFT = 9;
BACK_RIGHT = 10;
}
message Count {
uint32 value = 1;
}
// USB-C properties
UsbC usb_c = 1;
message UsbC {
// The number of USB-C ports
Count count = 1;
// Details about each USB-C port.
repeated Port ports = 2;
message Port {
// The position of the port on the chassis.
PortPosition position = 1;
// The 0-indexed index of this USB-C port. If set, this is used as the
// port index rather than numbering the motherboard ports in order
// followed by daughter board ports, in the order they are specified.
// This value must be in the range [0, number_of_usb_c_ports).
google.protobuf.UInt32Value index_override = 2;
}
// Whether port(s) are USB4
bool usb4 = 3;
// Optional field to manually override the external display timeout
uint32 defer_external_display_timeout = 4;
}
// USB-A properties
UsbA usb_a = 2;
message UsbA {
// The number of USB-A ports
Count count = 1;
}
// Cellular properties
Cellular cellular = 3;
message Cellular {
// If Cellular is present on system
Present present = 1;
// Optional string identifying the model of the modem to select the proper
// helper and firmwares on platforms with several supported modems.
string model = 2;
// Cellular type
CellularType type = 3;
// bool to enable the cellular feature Attach APN.
bool attach_apn_required = 4;
enum CellularType {
NOT_PRESENT = 0;
CELLULAR_LTE = 1;
CELLULAR_5G = 2;
}
// Optional config for dynamic power reduction control.
DynamicPowerReductionConfig dynamic_power_reduction_config = 5;
message DynamicPowerReductionConfig {
oneof dynamic_power_reduction_config {
// A uint identifying the GPIO to use to toggle dynamic power
// reduction.
uint32 gpio = 1;
// A dummy value identifying that modem manager should be used to
// toggle dynamic power reduction.
bool modem_manager = 2;
}
// Whether tablet mode should be a trigger for dynamic power reduction.
// If unset, the value will be true for convertibles.
google.protobuf.BoolValue tablet_mode = 3;
}
}
// HDMI properties
Hdmi hdmi = 4;
message Hdmi {
// If native HDMI support is present on system.
Present present = 1;
}
// Firmware configuration field programmed in CBI. The value from each
// topology value will be summed to create the final DesignConfig level
// firmware configuration value.
FirmwareConfiguration fw_config = 5;
message FirmwareConfiguration {
// The firmware configuration value
uint32 value = 1;
// The mask of valid bits that could be used by above value
uint32 mask = 2;
// Customizations to append as a suffix to the coreboot build target and AP
// firmware packaging.
repeated string coreboot_customizations = 3;
}
// Audio properties of system
Audio audio = 6;
message Audio {
// Which audio codec is in use (deprecated)
AudioCodec audio_codec = 1;
// Which amplifier is in use for the speakers
Amplifier speaker_amp = 2;
// Which audio codec is in use for the headphones
AudioCodec headphone_codec = 3;
// The number of microphones present in the lid
Count lid_microphone = 4;
// The number of microphones present in the base
Count base_microphone = 5;
// Which amplifier is in use for the speakers if one is present
Component.Amplifier speaker_amplifier = 6;
// The card configs for this topology.
repeated CardConfig card_configs = 7;
// The source config file layout used for card-agnostic cras config.
AudioConfigStructure cras_config = 8;
enum AudioCodec {
AUDIO_CODEC_UNKNOWN = 0; // Also used for non-public audio codecs
RT5682 = 1;
ALC5682I = 2;
ALC5682 = 3;
reserved 4 to 7; // Not to conflict with existing amplifiers
DA7219 = 8;
reserved 9; // Not to conflict with existing amplifiers
// New audio codecs
NAU88L25B = 10;
CS42L42 = 11;
ALC5682IVS = 12;
WCD9385 = 13;
}
enum Amplifier {
AMPLIFIER_UNKNOWN = 0; // Also used for non-public amplifier
reserved 1 to 3; // Not to conflict with existing audio codecs
MAX98357 = 4;
MAX98373 = 5;
MAX98360 = 6;
RT1015 = 7;
reserved 8; // Not to conflict with existing audio codecs
ALC1011 = 9;
// New amplifiers
RT1015P = 10;
ALC1019 = 11;
MAX98390 = 12;
MAX98396 = 13;
CS35L41 = 14;
}
enum AudioConfigStructure {
AUDIO_CONFIG_STRUCTURE_NONE = 0;
DESIGN = 1;
COMMON = 2;
}
// The configuration file layout structure for a single card.
message CardConfig {
// The name of the audio card.
string card_name = 1;
// The UCM suffix pattern for this card if different to the program-level
// default.
google.protobuf.StringValue ucm_suffix = 2;
// The source config file layout used for UCM config. May not be
// AUDIO_CONFIG_STRUCTURE_NONE.
AudioConfigStructure ucm_config = 3;
// The source config file layout used for card-level cras config.
AudioConfigStructure cras_config = 4;
// The source config file layout used for sound card init config.
AudioConfigStructure sound_card_init_config = 5;
}
}
// Camera properties of system.
Camera camera = 7;
message Camera {
enum Interface {
INTERFACE_UNKNOWN = 0;
INTERFACE_USB = 1;
INTERFACE_MIPI = 2;
}
enum Facing {
FACING_UNKNOWN = 0;
FACING_FRONT = 1;
FACING_BACK = 2;
}
enum Orientation {
ORIENTATION_UNKNOWN = 0;
ORIENTATION_0 = 1;
ORIENTATION_90 = 2;
ORIENTATION_180 = 3;
ORIENTATION_270 = 4;
}
enum Flags {
FLAGS_NONE = 0x0;
FLAGS_SUPPORT_1080P = 0x1;
FLAGS_SUPPORT_AUTOFOCUS = 0x2;
}
message Device {
// The interface type of the camera device.
Interface interface = 2;
// Direction the camera faces relative to device screen.
Facing facing = 3;
// Clockwise angle through which the output image needs to be rotated to
// be upright on the device screen in its native orientation.
Orientation orientation = 4;
// Bit flags representing camera capabilities of this device. A camera
// module can be mounted on this slot only if all the flags match.
uint32 flags = 5;
// List of strings each identifies a possible camera module on this slot.
repeated string ids = 6;
// If privacy switch is present on the camera
Present privacy_switch = 7;
// The number of microphones associated with this device.
Count microphone_count = 8;
}
// List of camera devices on the model.
repeated Device devices = 4;
}
// Accelerometer properties of system.
Accelerometer accelerometer = 8;
message Accelerometer {
// If lid accelerometer is present on system
Present lid_accelerometer = 1;
// If base accelerometer is present on system
Present base_accelerometer = 2;
}
// Gyroscope properties of system.
Gyroscope gyroscope = 9;
message Gyroscope {
// If lid gyroscope is present on system
Present lid_gyroscope = 1;
// If base gyroscope is present on system
Present base_gyroscope = 2;
}
// Magnetometer properties of system.
Magnetometer magnetometer = 10;
message Magnetometer {
// If lid magnometer is present on system
Present lid_magnetometer = 1;
// If base magnometer is present on system
Present base_magnetometer = 2;
}
// LightSensor properties of system.
LightSensor light_sensor = 11;
message LightSensor {
// If lid light sensor is present on system
Present lid_lightsensor = 1;
// If base light sensor is present on system
Present base_lightsensor = 2;
}
// Screen properties of system
Screen screen = 12;
message Screen {
Component.DisplayPanel.Properties panel_properties = 3;
// If touch support is present on system
Present touch_support = 2;
reserved 1;
}
// Function form factor of system
FormFactor form_factor = 13;
message FormFactor {
// Form factory of system
FormFactorType form_factor = 1;
enum FormFactorType {
FORM_FACTOR_UNKNOWN = 0;
CLAMSHELL = 1;
CONVERTIBLE = 2;
DETACHABLE = 3;
CHROMEBASE = 4;
CHROMEBOX = 5;
CHROMEBIT = 6;
CHROMESLATE = 7;
}
// Input to enter recovery
RecoveryInputType recovery_input = 2;
enum RecoveryInputType {
RECOVERY_INPUT_UNKNOWN = 0;
KEYBOARD = 1;
POWER_BUTTON = 2;
RECOVERY_BUTTON = 3;
}
}
// Stylus properites of system.
Stylus stylus = 14;
message Stylus {
// Type of stylus
StylusType stylus = 1;
enum StylusType {
STYLUS_UNKNOWN = 0;
NONE = 1;
INTERNAL = 2; // Garaged stylus
EXTERNAL = 3; // Non-garaged stylus
}
}
// Keyboard properties of system
Keyboard keyboard = 15;
message Keyboard {
// Type of keyboard present on system
KeyboardType keyboard_type = 1;
enum KeyboardType {
KEYBOARD_TYPE_UNKNOWN = 0;
INTERNAL = 1; // E.g. Clamshell/Convertible
NONE = 2; // E.g. Chromebox
DETACHABLE = 3; // E.g. Tablet with detachable keyboard
}
// If keyboard backlight is present on system
Present backlight = 2;
// If power button is present on keyboard
Present power_button = 3;
// If numeric pad is present on keyboard
Present numeric_pad = 4;
// The keyboard backlight level step values. Values must be in
// increasing order. If set, the first value must be 0. This corresponds to
// the keyboard_backlight_user_steps powerd pref.
repeated double backlight_user_steps = 5;
}
// Memory properties of system
Memory memory = 16;
message Memory {
Component.Memory.Profile profile = 1;
}
// Fingerprint properties of system
Fingerprint fingerprint = 17;
message Fingerprint {
// Location of fingerprint sensor
Location location = 1;
// Fingerprint board used.
string board = 2;
// Read-only (RO) firmware version to use (empty means use default).
string ro_version = 3;
enum Location {
LOCATION_UNKNOWN = 0;
// Top of the screen (e.g. Pixel Slate) at the left
POWER_BUTTON_TOP_LEFT = 1;
// Bottom of keyboard at the left
KEYBOARD_BOTTOM_LEFT = 2;
// Bottom of keyboard at the right
KEYBOARD_BOTTOM_RIGHT = 3;
// Top of keyboard at the right (e.g. Galaxy Chromebook)
KEYBOARD_TOP_RIGHT = 4;
// No fingerprint sensor
NOT_PRESENT = 5;
// At the right side
RIGHT_SIDE = 6;
// At the left side
LEFT_SIDE = 7;
// Fingerprint sensor present, but no location information
PRESENT = 8;
// Left of power button at top right corner (of the keyboard)
LEFT_OF_POWER_BUTTON_TOP_RIGHT = 9;
}
}
// Non-volatile storage properties of system
Storage storage = 18;
message Storage {
Component.Storage.StorageType storage_type = 1;
uint32 size_gb = 2;
}
// Bluetooth properties
Bluetooth bluetooth = 19;
message Bluetooth {
// Defines the specific bt component used in the design config
Component.Bluetooth component = 1;
Present present = 2;
}
// BarrelJack properties
BarrelJack barreljack = 20;
message BarrelJack {
// If BarrelJack support is present on system.
Present present = 1;
}
// Wifi properties
// NEXT TAG: 3
message Wifi {
enum WifiChip {
WIFI_CHIP_UNKNOWN = 0;
WIRELESS_86ED801D = 1;
WIRELESS_REALTEK = 2;
}
// WLAN protocols supported by the Wifi chipset(s).
repeated Component.Wifi.WLANProtocol supported_wlan_protocols = 1;
repeated WifiChip wifi_chips = 2;
WifiConfig wifi_config = 3;
}
Wifi wifi = 23;
message Button {
// A general part of the device that contains the button,
// e.g. "on the screen", "on the keyboard".
enum Region {
REGION_UNKNOWN = 0;
SCREEN = 1;
KEYBOARD = 2;
}
// The edge of the Region that contains the button.
enum Edge {
EDGE_UNKNOWN = 0;
LEFT = 1;
RIGHT = 2;
TOP = 3;
BOTTOM = 4;
}
Region region = 1;
Edge edge = 2;
// The percentage for button center position to the display's width/height
// in primary landscape screen orientation. If Edge is LEFT or RIGHT,
// specifies the button's center position as a fraction of the Region's
// height relative to the top of the Region. For TOP and BOTTOM, specifies
// the position as a fraction of the Region's width relative to the left
// side of the Region.
float position = 3;
}
Button power_button = 21;
Button volume_button = 22;
// EmbeddedController properties
// Next Tag: 8
message EmbeddedController {
// Whether any kind of EC is present on the system.
Present present = 1;
// The type of EC on the device.
// Next Tag: 3
enum EmbeddedControllerType {
EC_TYPE_UNKNOWN = 0;
EC_CHROME = 1;
EC_WILCO = 2;
}
EmbeddedControllerType ec_type = 2;
// The physical component of the EC.
Component.EmbeddedController part = 3;
// Whether the EC supports EC_FEATURE_TYPEC_CMD.
Present feature_typec_cmd = 4;
// Whether the EC supports CBI (CrOS Board Info stored on the EEPROM).
Present cbi = 5;
// Whether the EC detects the detachable base at runtime
Present detachable_base = 6;
// Whether the EC supports EC_CMD_CHARGE_CONTROL v2.
Present feature_charge_control_v2 = 7;
}
EmbeddedController embedded_controller = 24;
message TrustedPlatformModule {
enum TrustedPlatformModuleType {
TPM_TYPE_UNKNOWN = 0;
THIRD_PARTY = 1;
// GSCs (Google Security Chips) provide additional functionality beyond
// serving as the Trusted Platform Module.
GSC_H1B = 2;
GSC_H1D = 3;
}
TrustedPlatformModuleType tpm_type = 1;
}
TrustedPlatformModule trusted_platform_module = 25;
// Whether the system supports 'Hotwording' (ie wake-on-voice: "Hey Google")
message Hotwording {
Present present = 1;
}
Hotwording hotwording = 26;
// Whether the system has an internal display, external display only or both
message Display {
enum Type {
TYPE_UNKNOWN = 0;
TYPE_INTERNAL = 1;
TYPE_EXTERNAL = 2;
TYPE_INTERNAL_EXTERNAL = 3;
}
Type type = 1;
}
Display display = 27;
// Whether the system has a touchpad
message Touchpad {
Present present = 1;
}
Touchpad touchpad = 28;
// Whether the system has an audio input mute switch
message MicrophoneMuteSwitch {
Present present = 1;
}
MicrophoneMuteSwitch microphone_mute_switch = 29;
message Battery {
// Battery present (e.g. not present on chromebox)
Present present = 1;
Lifetime lifetime = 2;
Charging charging = 3;
message Lifetime {
// Starting with a fully-charged battery, the amount of time a Chrome
// device must remain operational in the Shipping state.
Duration shipping_min = 1;
// Starting with a fully-charged battery, the amount of time a Chrome
// device must remain operational in the Deep Sleep state.
Duration deep_sleep_min = 2;
// Starting with a fully-charged battery, the amount of time a Chrome
// device must remain operational in the Suspend state.
Duration suspend_min = 3;
// Starting with a fully-charged battery, the amount of time a Chrome
// device must remain operational in the Lucid Sleep state.
Duration lucid_sleep_min = 4;
// Starting with a fully-charged battery, the amount of time a Chrome
// device must remain operational in the Active state.
Duration active_min = 5;
}
message Charging {
// Max time to charge from 0 to 100% in the Active state at average load.
Duration active_max = 1;
// Max time to charge from 0 to 100% in the Suspend state.
Duration suspend_max = 2;
// Max time to charge from 0 to 100% in the Deep sleep state.
Duration deep_sleep_max = 3;
}
}
Battery battery = 30;
message PrivacyScreen {
// If privacy screen is present on system
Present present = 1;
}
PrivacyScreen privacy_screen = 31;
Soc soc = 32;
message Soc {
repeated Component.Soc.Feature features = 1;
};
DisplayPortConverter dp_converter = 33;
message DisplayPortConverter {
repeated Component.DisplayPortConverter converters = 1;
};
// HPS properties of system
Hps hps = 34;
message Hps {
// If hps is present on system
Present present = 1;
};
PoE poe = 35;
message PoE {
// If PoE peripheral support is present on system
Present present = 1;
};
// Power supply properties
PowerSupply power_supply = 36;
message PowerSupply {
// If BarrelJack support is present on system.
Present barreljack = 1;
// The input power below which a warning should be shown to use a
// higher-power USB adapter.
int32 usb_min_ac_watts = 2;
}
Proximity proximity = 37;
message Proximity {
}
// Touch screen properties
Touch touch = 38;
message Touch {
// Configures touch slop distance in Chrome.
// This is the number of pixels a touch event can wander before being
// recognized as a scroll rather than a tap.
google.protobuf.UInt32Value touch_slop_distance = 1;
}
}