blob: 60701e136e6eb1d525235eacd9ddcacbdb986c96 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// 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";
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;
LTE_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;
}
// 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: 30
message HardwareFeatures {
enum Present {
PRESENT_UNKNOWN = 0;
PRESENT = 1;
NOT_PRESENT = 2;
}
message Count {
uint32 value = 1;
}
// USB-C properties
UsbC usb_c = 1;
message UsbC {
// The number of USB-C ports
Count count = 1;
}
// USB-A properties
UsbA usb_a = 2;
message UsbA {
// The number of USB-A ports
Count count = 1;
}
// LTE properties
Lte lte = 3;
message Lte {
// If LTE 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;
}
// 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;
}
// 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;
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;
}
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;
}
}
// 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;
}
// 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;
}
}
// 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;
}
// 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;
}
}
// 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;
}
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: 4
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;
}
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;
}