ChromeOS Embedded Controller
Schema identifier ($id): "http://devicetree.org/schemas/embedded-controller/google,cros-ec.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Benson Leung <bleung@chromium.org>", "Guenter Roeck <groeck@chromium.org>"
Google's ChromeOS EC is a microcontroller which talks to the AP and implements various functions such as keyboard and battery charging. The EC can be connected through various interfaces (I2C, SPI, and others) and the compatible string specifies which interface is being used.
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
For implementations of the EC connected through I2C.
Exact value (
const):"google,cros-ec-i2c"
Rule 2
For implementations of the EC connected through SPI.
Exact value (
const):"google,cros-ec-spi"
Rule 3
For implementations of the FPMCU connected through SPI.
Array item rules (
items)Item 1
Exact value (
const):"google,cros-ec-fp"Item 2
Exact value (
const):"google,cros-ec-spi"
Rule 4
For implementations of the EC connected through RPMSG.
Exact value (
const):"google,cros-ec-rpmsg"
Rule 5
For implementations of the EC connected through UART.
Exact value (
const):"google,cros-ec-uart"
controller-data — not listed as required here #
true — No constraints added by this property rule.
google,cros-ec-spi-pre-delay — not listed as required here #
This property specifies the delay in usecs between the assertion of the CS and the first clock pulse.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 0
google,cros-ec-spi-msg-delay — not listed as required here #
This property specifies the delay in usecs between messages.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 0
google,has-vbc-nvram — not listed as required here #
Some implementations of the EC include a small nvram space used to store verified boot context data. This boolean flag is used to specify whether this nvram is present or not.
Value type (type): "boolean"
mediatek,rpmsg-name — not listed as required here #
Must be defined if the cros-ec is a rpmsg device for a Mediatek ARM Cortex M4 Co-processor. Contains the name of the rpmsg device. Used to match the subnode to the rpmsg device announced by the SCP.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/string
spi-max-frequency — not listed as required here #
true — No constraints added by this property rule.
reg — not listed as required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
reset-gpios — not listed as required here #
Maximum number of items (maxItems): 1
boot0-gpios — not listed as required here #
Maximum number of items (maxItems): 1
Assert for bootloader mode.
vdd-supply — not listed as required here #
true — No constraints added by this property rule.
wakeup-source — not listed as required here #
Button can wake-up the system.
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 0
#gpio-cells — not listed as required here #
Exact value (const): 2
gpio-controller — not listed as required here #
true — No constraints added by this property rule.
typec — not listed as required here #
Shared schema rule ($ref): /schemas/chrome/google,cros-ec-typec.yaml#
ec-pwm — not listed as required here #
Shared schema rule ($ref): /schemas/pwm/google,cros-ec-pwm.yaml#
Deprecated (deprecated): true
pwm — not listed as required here #
Shared schema rule ($ref): /schemas/pwm/google,cros-ec-pwm.yaml#
keyboard-controller — not listed as required here #
Shared schema rule ($ref): /schemas/input/google,cros-ec-keyb.yaml#
proximity — not listed as required here #
Shared schema rule ($ref): /schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml#
codecs — not listed as required here #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
#address-cells — required here
Exact value (const): 2
#size-cells — required here
Exact value (const): 1
Properties matching a name pattern (patternProperties) #
^ec-codec@[a-f0-9]+$ — name matches this regular expression
Value type (type): "object"
Shared schema rule ($ref): /schemas/sound/google,cros-ec-codec.yaml#
Required in this object (required): "#address-cells", "#size-cells"
cbas — not listed as required here #
Value type (type): "object"
This device is used to signal when a detachable base is attached to a Chrome OS tablet. This device cannot be detected at runtime.
Properties and child nodes (properties) #
compatible — required here
Exact value (const): "google,cros-cbas"
Required in this object (required): "compatible"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties matching a name pattern (patternProperties) #
^i2c-tunnel[0-9]*$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
^regulator@[0-9]+$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/regulator/google,cros-ec-regulator.yaml#
^extcon[0-9]*$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/extcon/extcon-usbc-cros-ec.yaml#
Required in this object (required): "compatible"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereThis rule must not match (
not)Rule for matching array elements (
contains)Exact value (
const):"google,cros-ec-spi"When the condition matches (
then) #Properties and child nodes (
properties)
controller-data— not listed as required here
false— Not permitted by this property rule.
google,cros-ec-spi-pre-delay— not listed as required here
false— Not permitted by this property rule.
google,cros-ec-spi-msg-delay— not listed as required here
false— Not permitted by this property rule.
spi-max-frequency— not listed as required here
false— Not permitted by this property rule.When the condition does not match (
else) #Shared schema rule (
$ref):/schemas/spi/spi-peripheral-props.yaml
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereThis rule must not match (
not)Rule for matching array elements (
contains)Exact value (
const):"google,cros-ec-rpmsg"When the condition matches (
then) #Properties and child nodes (
properties)
mediatek,rpmsg-name— not listed as required here
false— Not permitted by this property rule.
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereThis rule must not match (
not)Rule for matching array elements (
contains)Allowed values (
enum):"google,cros-ec-rpmsg","google,cros-ec-uart"When the condition matches (
then) #
Rule 4 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"google,cros-ec-fp"When the condition matches (
then) #Properties and child nodes (
properties)
#address-cells— not listed as required here
false— Not permitted by this property rule.
#size-cells— not listed as required here
false— Not permitted by this property rule.
typec— not listed as required here
false— Not permitted by this property rule.
ec-pwm— not listed as required here
false— Not permitted by this property rule.
kbd-led-backlight— not listed as required here
false— Not permitted by this property rule.
keyboard-controller— not listed as required here
false— Not permitted by this property rule.
proximity— not listed as required here
false— Not permitted by this property rule.
codecs— not listed as required here
false— Not permitted by this property rule.
cbas— not listed as required here
false— Not permitted by this property rule.Properties matching a name pattern (
patternProperties)
^i2c-tunnel[0-9]*$— name matches this regular expression
false— Not permitted by this property rule.
^regulator@[0-9]+$— name matches this regular expression
false— Not permitted by this property rule.
^extcon[0-9]*$— name matches this regular expression
false— Not permitted by this property rule.Required in this object (
required):"reset-gpios","boot0-gpios","vdd-supply"When the condition does not match (
else) #Properties and child nodes (
properties)
reset-gpios— not listed as required here
false— Not permitted by this property rule.
boot0-gpios— not listed as required here
false— Not permitted by this property rule.
vdd-supply— not listed as required here
false— Not permitted by this property rule.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
cros-ec@1e {
compatible = "google,cros-ec-i2c";
reg = <0x1e>;
interrupts = <6 0>;
interrupt-parent = <&gpio0>;
};
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
cros-ec@0 {
compatible = "google,cros-ec-spi";
reg = <0x0>;
google,cros-ec-spi-msg-delay = <30>;
google,cros-ec-spi-pre-delay = <10>;
interrupts = <99 0>;
interrupt-parent = <&gpio7>;
spi-max-frequency = <5000000>;
#gpio-cells = <2>;
gpio-controller;
proximity {
compatible = "google,cros-ec-mkbp-proximity";
};
cbas {
compatible = "google,cros-cbas";
};
};
};
scp0 {
cros-ec {
compatible = "google,cros-ec-rpmsg";
};
};
spi {
#address-cells = <0x1>;
#size-cells = <0x0>;
ec@0 {
compatible = "google,cros-ec-fp", "google,cros-ec-spi";
reg = <0x0>;
interrupt-parent = <&gpio_controller>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
spi-max-frequency = <3000000>;
reset-gpios = <&gpio_controller 5 GPIO_ACTIVE_LOW>;
boot0-gpios = <&gpio_controller 10 GPIO_ACTIVE_HIGH>;
vdd-supply = <&pp3300_fp_mcu>;
};
};
serial {
cros-ec {
compatible = "google,cros-ec-uart";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 230: Using additionalProperties: false here and
Line 231: listing true properties doesn't work
Line 246: Example for I2C
Line 263: Example for SPI
Line 293: Example for RPMSG
Line 301: Example for FPMCU
Line 319: Example for UART