summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml')
-rw-r--r--zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml54
1 files changed, 54 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml b/zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml
new file mode 100644
index 0000000000..b47c511d5e
--- /dev/null
+++ b/zephyr/dts/bindings/cbi/cros-ec,cbi-fw-config.yaml
@@ -0,0 +1,54 @@
+# Copyright 2021 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+description: CBI Firmware Config fields (FW_CONFIG)
+
+compatible: "cros-ec,cbi-fw-config"
+
+child-binding:
+ description:
+ ChromeOS CBI Firmware Config fields definition.
+ Each field is defined via a start bit (from LSB) and a size.
+ The total size of all FW_CONFIG bit fields must not exceed 32 bits.
+ One default value for each field may be indicated.
+ properties:
+ enum-name:
+ type: string
+ required: true
+ description:
+ Name of field used for description purposes
+ start:
+ type: int
+ required: true
+ description: The starting bit of the field (LSB = 0)
+ size:
+ type: int
+ required: true
+ description: The size of the field in bits.
+
+# Example:
+#
+# cbi-fw-config {
+# compatible = "cros-ec,cbi-fw-config";
+#
+# fan {
+# enum-name = "FAN";
+# start = <0>
+# size = <1>;
+# fan_absent {
+# enum-name = "ABSENT"
+# compatible = "cros-ec,cbi-fw-config-value";
+# value = <0>;
+# fan_present {
+# enum-name = "PRESENT"
+# compatible = "cros-ec,cbi-fw-config-value";
+# value = <1>;
+# default;
+# };
+# };
+# };
+#
+# This will generate an enum field id for CBI_FW_CONFIG_FIELD_FAN,
+# and separate values for CBI_FW_CONFIG_FIELD_FAN_ABSENT = 0 and
+# CBI_FW_CONFIG_FIELD_FAN_PRESENT = 1