From 93e53ebb2f1d99f31903ce152aa0645ad9c93558 Mon Sep 17 00:00:00 2001 From: Zick Wei Date: Fri, 14 Oct 2022 09:19:10 +0800 Subject: yaviks: update cbi fw_config field BUG=b:251593313 BRANCH=none TEST=On yaviks, manually set fw_config make sure each function work intended. Signed-off-by: Zick Wei Change-Id: If3448655ee6efb397dae1af6c969212670af3369 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3954783 Reviewed-by: Shou-Chieh Hsu Commit-Queue: Shou-Chieh Hsu --- zephyr/projects/nissa/BUILD.py | 1 + zephyr/projects/nissa/yaviks/cbi.dts | 99 ++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 zephyr/projects/nissa/yaviks/cbi.dts diff --git a/zephyr/projects/nissa/BUILD.py b/zephyr/projects/nissa/BUILD.py index e162bc2b96..dbb427bcc5 100644 --- a/zephyr/projects/nissa/BUILD.py +++ b/zephyr/projects/nissa/BUILD.py @@ -119,6 +119,7 @@ yaviks = register_nissa_project( project_name="yaviks", chip="it81302bx", extra_dts_overlays=[ + "cbi.dts", "gpio.dts", "overlay.dts", "keyboard.dts", diff --git a/zephyr/projects/nissa/yaviks/cbi.dts b/zephyr/projects/nissa/yaviks/cbi.dts new file mode 100644 index 0000000000..c5716cbd37 --- /dev/null +++ b/zephyr/projects/nissa/yaviks/cbi.dts @@ -0,0 +1,99 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/ { + /* Yaviks-specific fw_config fields. */ + nissa-fw-config { + /* + * FW_CONFIG field for multiple wi-fi SAR. + * + * start = <2>; + * size = <2>; + */ + + /* + * FW_CONFIG field to enable fan or not. + */ + fan { + enum-name = "FW_FAN"; + start = <4>; + size = <1>; + + no-fan { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FAN_NOT_PRESENT"; + value = <0>; + }; + fan-present { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_FAN_PRESENT"; + value = <1>; + /* + * Set as default so that unprovisioned + * configs will run the fan regardless. + */ + default; + }; + }; + + /* + * FW_CONFIG field to indicate which keyboard layout + * should be used. + */ + keyboard { + enum-name = "FW_KB_LAYOUT"; + start = <5>; + size = <1>; + + layout-1 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_KB_LAYOUT_DEFAULT"; + value = <0>; + default; + }; + layout-2 { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_KB_LAYOUT_US2"; + value = <1>; + }; + }; + + /* + * FW_CONFIG field to indicate which keyboard layout + * should be used. + */ + keyboard-backlight { + enum-name = "FW_KB_BACKLIGHT"; + start = <6>; + size = <1>; + + without-keyboard-backlight { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_KB_BACKLIGHT_OFF"; + value = <1>; + }; + with-keyboard-backlight { + compatible = "cros-ec,cbi-fw-config-value"; + enum-name = "FW_KB_BACKLIGHT_ON"; + value = <0>; + default; + }; + }; + + /* + * FW_CONFIG field for multiple touch panel. + * + * start = <7>; + * size = <2>; + */ + + /* + * FW_CONFIG field for multiple storage. + * + * start = <31>; + * size = <1>; + */ + }; +}; -- cgit v1.2.1