summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Kumar <rajesh3.kumar@intel.com>2021-12-03 15:10:54 -0800
committerCommit Bot <commit-bot@chromium.org>2021-12-08 19:17:51 +0000
commit8246d63871a5bd9e6653d3735dc443cd958ee674 (patch)
treeff692ed54a906662b8b137c6ee35500830c0e043
parent94e68168484f58e3c0deb0c1aec52e561ff9b65d (diff)
downloadchrome-ec-8246d63871a5bd9e6653d3735dc443cd958ee674.tar.gz
zephyr: brya: Enable PMIC mp2964 configuration
This enables the configuration for power management IC MP2964. BUG=b:209023139 BRANCH=none TEST=make configure -B ~/tmp/brya/ brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I2bf39eea0db05103ca82e096cba07941b2f23ee4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315227 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--zephyr/boards/arm/brya/brya.dts10
-rw-r--r--zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml1
-rw-r--r--zephyr/dts/bindings/pmic/mps,mp2964.yaml9
-rw-r--r--zephyr/projects/brya/brya/prj.conf4
-rw-r--r--zephyr/shim/include/config_chip.h2
5 files changed, 26 insertions, 0 deletions
diff --git a/zephyr/boards/arm/brya/brya.dts b/zephyr/boards/arm/brya/brya.dts
index 515cfa7b57..4ffb512f4c 100644
--- a/zephyr/boards/arm/brya/brya.dts
+++ b/zephyr/boards/arm/brya/brya.dts
@@ -59,6 +59,10 @@
i2c-port = <&i2c7_0>;
enum-name = "I2C_PORT_CHARGER";
};
+ mp2964 {
+ i2c-port = <&i2c7_0>;
+ enum-name = "I2C_PORT_MP2964";
+ };
};
named-pwms {
@@ -223,6 +227,12 @@
&i2c7_0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
+
+ pmic_mp2964: pmic_mp2964@20 {
+ compatible = "mps,mp2964";
+ reg = <0x20>;
+ label = "I2C_ADDR_MP2964_FLAGS";
+ };
};
&i2c_ctrl7 {
diff --git a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
index c676adbe5f..e4981c2dc5 100644
--- a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
+++ b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
@@ -28,6 +28,7 @@ properties:
- I2C_PORT_EVB_2
- I2C_PORT_EVB_3
- I2C_PORT_EVB_7
+ - I2C_PORT_MP2964
- I2C_PORT_OPT_4
- I2C_PORT_POWER
- I2C_PORT_PPC0
diff --git a/zephyr/dts/bindings/pmic/mps,mp2964.yaml b/zephyr/dts/bindings/pmic/mps,mp2964.yaml
new file mode 100644
index 0000000000..db35aa07b2
--- /dev/null
+++ b/zephyr/dts/bindings/pmic/mps,mp2964.yaml
@@ -0,0 +1,9 @@
+# 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.
+
+description: MPS MP2964 Power Management IC
+
+compatible: "mps,mp2964"
+
+include: i2c-device.yaml
diff --git a/zephyr/projects/brya/brya/prj.conf b/zephyr/projects/brya/brya/prj.conf
index e4aac713a9..aa99096dd0 100644
--- a/zephyr/projects/brya/brya/prj.conf
+++ b/zephyr/projects/brya/brya/prj.conf
@@ -49,6 +49,10 @@ CONFIG_PLATFORM_EC_THERMISTOR=y
# Miscellaneous configs
CONFIG_PLATFORM_EC_HIBERNATE_PSL=y
+# PMIC
+CONFIG_PLATFORM_EC_PMIC=y
+CONFIG_PLATFORM_EC_MP2964=y
+
# Keyboard
CONFIG_PLATFORM_EC_KEYBOARD=y
CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042=y
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 9d9e402f3c..6844128d96 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1937,6 +1937,8 @@
#undef CONFIG_MP2964
#ifdef CONFIG_PLATFORM_EC_MP2964
#define CONFIG_MP2964
+#define I2C_ADDR_MP2964_FLAGS \
+ DT_REG_ADDR(DT_NODELABEL(pmic_mp2964))
#endif
#undef CONFIG_ACCELGYRO_ICM_COMM_SPI