blob: a596babb5f5515297fd492809256dd98b89ad6a3 [file] [log] [blame]
# Copyright 2016 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.
"$schema": http://json-schema.org/draft-04/schema#
typeDefs:
bcs-file-name: &bcs_file_name
type: string
description: Name of the file located in BCS under the respective bcs-overlay.
deprecated_string: &deprecated_string
type: string
description: A deprecated string property to be removed after migration.
firmware-build-target: &firmware_build_target
type: string
description: Build target that will be considered dirty when building/testing
locally.
# TODO(shapiroc): Migrate to use system-file-v2 instead
system-file: &system_file
type: object
properties:
source:
description: Source of the file relative to the build system.
type: string
destination:
description: Installation path for the file on the system image.
type: string
additionalProperties: false
# V2 exists because system-file targets were poorly named, so they couldn't
# be logically shared for build-time and run-time usage.
# E.g. bluetooth config we want to both install and get the path at runtime
system-file-v2: &system_file_v2
type: object
properties:
build-path:
description: Source of the file relative to the build system.
build-only-element: true
type: string
system-path:
description: Installation path for the file on the system image.
type: string
additionalProperties: false
required:
- build-path
- system-path
firmware-file: &firmware_file
type: object
properties:
source:
description: Source of the file relative to the build system ${FILESDIR}
type: string
destination:
description: Installation path for the file on the system image.
type: string
symlink:
description: Symlink file that will be installed pointing to the destination.
type: string
additionalProperties: false
sku-id: &sku_id
description: "SKU/Board strapping pins configured during board manufacturing."
type: integer
whitelabel-tag: &whitelabel_tag
description: "'whitelabel_tag' value set in the VPD, to add Whitelabel branding over an unbranded base model."
type: string
customization-id: &customization_id
description: "'customization_id' value set in the VPD for non-unibuild Zergs and Whitelabels. Deprecated for use in new products since 2017/07/26."
type: string
platform-name: &platform_name
description: "Defines the name that is reported by 'mosys platform name'
This is typically the reference design name with the first letter capitalized"
type: string
type: object
properties:
chromeos:
type: object
properties:
configs:
type: array
items:
type: object
properties:
arc:
type: object
properties:
build-properties:
type: object
properties:
product:
description: Product name to report in 'ro.product.name'.
This may be the device name, or it can be something else, to allow
several devices to be grouped into one product.
type: string
device:
description: Device name to report in 'ro.product.device'. This
is often '{product}_cheets' but it can be something else if
desired.
type: string
oem:
description: Original Equipment Manufacturer for this model. This
generally means the OEM name printed on the device.
type: string
marketing-name:
description: Name of this model as it is called in the
market, reported in 'ro.product.model'. This often starts
with '{oem}'.
type: string
metrics-tag:
description: Tag to use to track metrics for this model.
The tag can be shared across many devices if desired, but
this will result in larger granularity for metrics
reporting. Ideally the metrics system should support
collation of metrics with different tags into groups, but if
this is not supported, this tag can be used to achieve the
same end. This is reported in 'ro.product.metrics.tag'.
type: string
first-api-level:
description: |
The first Android API level that this model shipped with.
type: string
additionalProperties: false
files:
type: array
build-only-element: true
items: *system_file
additionalProperties: false
audio:
type: object
properties:
main:
type: object
properties:
cras-config-dir:
description: Subdirectory for model-specific configuration.
type: string
disable-profile:
description: Optional --disable_profile parameter for CRAS deamon.
type: string
ucm-suffix:
description: Optional UCM suffix used to determine model specific
config.
type: string
files:
type: array
build-only-element: true
items: *system_file
additionalProperties: false
required:
- cras-config-dir
additionalProperties: false
required:
- main
bluetooth:
type: object
properties:
config: *system_file_v2
additionalProperties: false
required:
- config
brand-code:
description: Brand code of the model (also called RLZ code).
type: string
camera:
type: object
properties:
count:
type: integer
description: Specified the number of cameras on the model.
additionalProperties: false
firmware:
type: object
build-only-element: true
properties:
bcs-overlay:
description: BCS overlay path used to determine BCS file path for binary
firmware downloads.
type: string
build-targets:
type: object
properties:
base:
description: Build target of the base EC firmware for a detachable device,
that will be considered dirty when building/testing
type: string
ec_extras:
type: array
items:
type: string
description: Extra EC build targets to build within chromeos-ec.
coreboot: *firmware_build_target
cr50: *firmware_build_target
depthcharge: *firmware_build_target
ec: *firmware_build_target
ish: *firmware_build_target
libpayload: *firmware_build_target
u-boot: *firmware_build_target
additionalProperties: false
ec-ro-image: *bcs_file_name
pd-ro-image: *bcs_file_name
key-id:
description: Key ID from the signer key set that is used to sign the
given firmware image.
type: string
main-ro-image: *bcs_file_name
main-rw-image: *bcs_file_name
name:
description: This is a human-recognizable name used to refer to the firmware.
It will be used when generating the shellball via firmware packer.
Mainly, this is only for compatibility testing with device tree (since DT
allowed firmwares to be named).
type: string
no-firmware:
description: If present this indicates that this model has no firmware at present.
This means that it will be omitted from the firmware updater
(chromeos-firmware- ebuild) and it will not be included in the signer
instructions file sent to the signer.
This option is often useful when a model is first added,
since it may not have firmware at that point.
type: boolean
additionalProperties: false
firmware-signing:
type: object
build-only-element: true
properties:
key-id:
description: Key ID from the signer key set that is used to sign the
given firmware image.
type: string
signature-id:
description: ID used to generate keys/keyblocks in the firmware
signing output. This is also the value provided to mosys platform
signature for the updater4.sh script.
type: string
sig-id-in-customization-id:
description: Indicates that this model cannot be decoded by the mapping table.
Instead the model is stored in the VPD (Vital Product Data) region in the
customization_id property. This allows us to determine the
model to use in the factory during the finalization stage. Note
that if the VPD is wiped then the model will be lost. This may
mean that the device will revert back to a generic model, or
may not work. It is not possible in general to test whether the
model in the VPD is correct at run-time. We simply assume that
it is. The advantage of using this property is that no hardware
changes are needed to change one model into another. For example
we can create 20 different whitelabel boards, all with the same
hardware, just by changing the customization_id that is written
into SPI flash.
type: boolean
required:
- key-id
- signature-id
additionalProperties: false
identity:
type: object
description: Defines attributes that are used by cros_config to detect the identity
of the platform and which corresponding config should be used.
This tuple must either contain x86 properties only or ARM properties only.
oneOf:
- properties:
smbios-name-match:
description: "[x86] Firmware name built into the firmware and reflected back
out in the SMBIOS tables."
type: string
sku-id: *sku_id
platform-name: *platform_name
customization-id: *customization_id
whitelabel-tag: *whitelabel_tag
additionalProperties: false
- properties:
device-tree-compatible-match:
description: "[ARM] String pattern (partial) that is matched against the
contents of /proc/device-tree/compatible on ARM devices."
type: string
sku-id: *sku_id
platform-name: *platform_name
customization-id: *customization_id
whitelabel-tag: *whitelabel_tag
additionalProperties: false
name:
type: string
pattern: "^[_a-zA-Z0-9]{3,}"
description: Unique name for the given model.
power:
description: WARNING -- This config contains unvalidated settings, which is not a
correct usage pattern, but this will be used in the interim until a longer term
solution can be put in place where the overall schema can be single sourced
(for the YAML and C++ that uses it); likely though some type of code generation.
SUMMARY -- Contains power_manager device settings. This is the new mechanism used
in lieu of the previous file based implementation (via powerd-prefs).
Power manager will first check for a property in this config, else it will revert
to the file based mechanism (via the powerd-prefs setting).
This provides more flexibility in sharing power settings across different devices
that share the same build overlay.
Any property can be overridden from - src/platform2/power_manager/default_prefs or
src/platform2/power_manager/optional_prefs
For details about each setting property, see -
src/platform2/power_manager/common/power_constants.h
For examples on setting these properties (including multiline examples), see
the power config example in libcros_config/test.yaml
type: object
properties:
touchpad-wakeup:
description: Enable (1) or disable (0) wake from touchpad.
type: string
pattern: "^[01]$"
additionalProperties: true
powerd-prefs:
description: Powerd config that should be used.
type: string
test-label:
description: Test alias (model) label that will be applied in Autotest and
reported for test results.
type: string
thermal:
type: object
properties:
dptf-dv:
description: System image path to the .dv file containing DPTF (Dynamic Platform
and Thermal Framework) settings.
type: string
files:
type: array
build-only-element: true
items: *system_file
additionalProperties: false
required:
- files
touch:
type: object
properties:
present:
description: Whether touch is present or needs to be probed for.
type: string
enum:
# Put these in quotes to avoid them meaning True / False
- "yes"
- "no"
- probe
probe-regex:
description: If probe is set, the regex used to look for touch.
type: string
files:
type: array
build-only-element: true
items: *firmware_file
additionalProperties: false
wallpaper:
description: Base filename of the default wallpaper to show on this device.
type: string
regulatory-label:
description: Base name of the directory containing the regulatory label
files to show on this device.
type: string
ui:
type: object
properties:
power-button:
type: object
properties:
edge:
type: string
enum:
- left
- right
- top
- bottom
position:
type: string
additionalProperties: false
additionalProperties: false
oem-id:
description: |
Some projects store SKU ID, OEM ID and Board Revision in an
EEPROM and only SKU ID can be updated in the factory and RMA
flow but others should be pre-flashed in the chip level. In
this case, we would like to validate whether oem-id here from
the updated SKU ID matches the one in the EEPROM so we can
prevent this device from being updated to another OEM's devices.
type: string
pattern: "[0-9]+"
modem:
type: object
properties:
firmware-variant:
description: Variant of the modem firmware to be used. This
value is read by modemfwd to match against the variant field
of a firmware entry in a firmware manifest. In most cases,
we simply use the model name as the value.
type: string
additionalProperties: false
hardware-properties:
type: object
description: Contains boolean flags for hardware properties of
this board, for example if it's convertible, has a touchscreen,
has a camera, etc. This information is used to auto-generate C
code that is consumed by the EC build process in order to do
run-time configuration. If a value is defined within a config
file, but not for a specific model, that value will be assumed
to be false for that model.
All properties must be booleans. If non-boolean
properties are desired, the generation code in
cros_config_schema.py must be updated to support them.
properties:
is-lid-convertible:
description: Can the lid be rotated 360 degrees.
type: boolean
has-lid-accelerometer:
description: Is there an accelerometer in the lid of the
device.
type: boolean
has-base-accelerometer:
description: Is there an accelerometer in the base of the
device.
type: boolean
has-base-gyroscope:
description: Is there a gyroscope in the base of the device.
type: boolean
has-base-magnetometer:
description: Is there a magnetometer in the base of the device.
type: boolean
has-fingerprint-sensor:
description: Is there a fingerprint sensor on the device.
type: boolean
has-touchscreen:
description: Does the device have a touchscreen.
type: boolean
additionalProperties: false
additionalProperties: false
required:
- firmware
- name
additionalProperties: false
required:
- configs