summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-12-16 14:47:26 +0800
committerCommit Bot <commit-bot@chromium.org>2022-01-10 05:53:10 +0000
commit283a1c16e53451d306f2d2728e06d5648551645a (patch)
tree211bd4f38fbed1ed2ab31691b346bd142429abee
parent56c941e6c77977d0ecf0ceb5129f8c83f164723f (diff)
downloadchrome-ec-283a1c16e53451d306f2d2728e06d5648551645a.tar.gz
zephyr: kingler: enable CBI EEPROM
Enable CBI module. BUG=b:209921101 TEST=cbi BRANCH=none Change-Id: Ifd2b79fb7fd9afdeb26c322e59d9554198e0f8cf Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3344096 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--zephyr/projects/corsola/BUILD.py3
-rw-r--r--zephyr/projects/corsola/cbi_eeprom_kingler.dts17
-rw-r--r--zephyr/projects/corsola/i2c_kingler.dts2
-rw-r--r--zephyr/projects/corsola/prj_kingler.conf5
4 files changed, 24 insertions, 3 deletions
diff --git a/zephyr/projects/corsola/BUILD.py b/zephyr/projects/corsola/BUILD.py
index 4969bc3fbb..1254b01003 100644
--- a/zephyr/projects/corsola/BUILD.py
+++ b/zephyr/projects/corsola/BUILD.py
@@ -42,8 +42,9 @@ register_corsola_project(
extra_dts_overlays=[
here / "adc_kingler.dts",
here / "battery_kingler.dts",
- here / "gpio_kingler.dts",
here / "i2c_kingler.dts",
+ here / "cbi_eeprom_kingler.dts",
+ here / "gpio_kingler.dts",
],
extra_kconfig_files=[here / "prj_kingler.conf"],
)
diff --git a/zephyr/projects/corsola/cbi_eeprom_kingler.dts b/zephyr/projects/corsola/cbi_eeprom_kingler.dts
new file mode 100644
index 0000000000..0886a05280
--- /dev/null
+++ b/zephyr/projects/corsola/cbi_eeprom_kingler.dts
@@ -0,0 +1,17 @@
+/* Copyright 2021 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.
+ */
+
+ &i2c_pwr_cbi {
+ cbi_eeprom: eeprom@50 {
+ compatible = "atmel,at24";
+ reg = <0x50>;
+ label = "EEPROM_CBI";
+ size = <2048>;
+ pagesize = <16>;
+ address-width = <8>;
+ timeout = <5>;
+ wp-gpios = <&gpio_ec_wp_l>;
+ };
+};
diff --git a/zephyr/projects/corsola/i2c_kingler.dts b/zephyr/projects/corsola/i2c_kingler.dts
index cffa072801..21701bddb2 100644
--- a/zephyr/projects/corsola/i2c_kingler.dts
+++ b/zephyr/projects/corsola/i2c_kingler.dts
@@ -72,7 +72,7 @@
status = "okay";
};
-&i2c3_0 {
+i2c_pwr_cbi: &i2c3_0 {
label = "I2C_PWR_CBI";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
diff --git a/zephyr/projects/corsola/prj_kingler.conf b/zephyr/projects/corsola/prj_kingler.conf
index 33dc32e305..d86036816c 100644
--- a/zephyr/projects/corsola/prj_kingler.conf
+++ b/zephyr/projects/corsola/prj_kingler.conf
@@ -30,6 +30,10 @@ CONFIG_PLATFORM_EC_VBOOT_EFS2=n
CONFIG_ADC=y
CONFIG_PLATFORM_EC_ADC=y
+# CBI
+CONFIG_PLATFORM_EC_CBI_EEPROM=y
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=y
+
# Host command
CONFIG_PLATFORM_EC_HOSTCMD=y
@@ -68,5 +72,4 @@ CONFIG_SYSCON=y
CONFIG_PLATFORM_EC_CHARGER=n
CONFIG_PLATFORM_EC_USBC=n
-CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n