diff options
author | Yuval Peress <peress@chromium.org> | 2020-11-11 10:46:27 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 03:55:12 +0000 |
commit | ca0a8e4e2231b17ebba4dda22de4241166f63000 (patch) | |
tree | 5c8337dbfddd5aabb5f3749f001f9c10b97af58e | |
parent | 5000a6edbacba5c841b2c157d10e26a5508edf58 (diff) | |
download | chrome-ec-ca0a8e4e2231b17ebba4dda22de4241166f63000.tar.gz |
Volteer: Add i2c_map.h
Map chip specific enums for i2c to the correct #defines expected
in platform/ec.
BUG=b:171302975
TEST=Build volteer and run i2cxfer r 9 0x50 0
Cq-Depend: chromium:2541622
Change-Id: Id5322bec184608a772d8752a4437b28128f1d97c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2537897
Commit-Queue: Yuval Peress <peress@chromium.org>
Tested-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630145
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/projects/volteer/include/i2c_map.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/zephyr/projects/volteer/include/i2c_map.h b/zephyr/projects/volteer/include/i2c_map.h new file mode 100644 index 0000000000..cecf9dfa19 --- /dev/null +++ b/zephyr/projects/volteer/include/i2c_map.h @@ -0,0 +1,21 @@ +/* Copyright 2020 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. + */ + +#ifndef __ZEPHYR_CHROME_I2C_MAP_H +#define __ZEPHYR_CHROME_I2C_MAP_H + +#include <devicetree.h> + +#include "config.h" + +#define I2C_PORT_ACCEL I2C_PORT_SENSOR +#define I2C_PORT_SENSOR NPCX_I2C_PORT0_0 +#define I2C_PORT_USB_C0 NPCX_I2C_PORT1_0 +#define I2C_PORT_USB_C1 NPCX_I2C_PORT2_0 +#define I2C_PORT_USB_1_MIX NPCX_I2C_PORT3_0 +#define I2C_PORT_POWER NPCX_I2C_PORT5_0 +#define I2C_PORT_EEPROM NPCX_I2C_PORT7_0 + +#endif /* __ZEPHYR_CHROME_I2C_MAP_H */ |