summaryrefslogtreecommitdiff
path: root/baseboard/zork/variant_dalboz.c
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-04-14 15:55:21 -0600
committerCommit Bot <commit-bot@chromium.org>2020-04-15 20:31:29 +0000
commit3ef3d621aa82cf1092c4f4f995bf4b604932ae0a (patch)
tree803cf57991806d880bbc53e552417329f20eabed /baseboard/zork/variant_dalboz.c
parent2097501f72619ca189cc0a9ac39af3149c3f9315 (diff)
downloadchrome-ec-3ef3d621aa82cf1092c4f4f995bf4b604932ae0a.tar.gz
Dalboz: Move battery I2C on V1 HW
Split i2c_ports[] into Trembyle and Dalboz variants. Change I2C_PORT_BATTERY to I2C7 for Dalboz V1 HW. Check for V0 HW on boot to re-map back to I2C2. BUG=b:153459542 BRANCH=none TEST=battery still works on V0 HW Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ic3b115ef3bae66da63c1aebe8d2ae47e9705baa6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2149751 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
Diffstat (limited to 'baseboard/zork/variant_dalboz.c')
-rw-r--r--baseboard/zork/variant_dalboz.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/baseboard/zork/variant_dalboz.c b/baseboard/zork/variant_dalboz.c
index 01a30ab19c..41307d6da4 100644
--- a/baseboard/zork/variant_dalboz.c
+++ b/baseboard/zork/variant_dalboz.c
@@ -14,6 +14,66 @@
#include "ioexpander.h"
#include "usb_mux.h"
+const struct i2c_port_t i2c_ports[] = {
+ {
+ .name = "tcpc0",
+ .port = I2C_PORT_TCPC0,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_A0_C0_SCL,
+ .sda = GPIO_EC_I2C_USB_A0_C0_SDA,
+ },
+ {
+ .name = "tcpc1",
+ .port = I2C_PORT_TCPC1,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_A1_C1_SCL,
+ .sda = GPIO_EC_I2C_USB_A1_C1_SDA,
+ },
+ {
+ .name = "charger",
+ .port = I2C_PORT_CHARGER,
+ .kbps = 100,
+ .scl = GPIO_EC_I2C_POWER_SCL,
+ .sda = GPIO_EC_I2C_POWER_SDA,
+ },
+ {
+ .name = "ap_mux",
+ .port = I2C_PORT_USB_AP_MUX,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USBC_AP_MUX_SCL,
+ .sda = GPIO_EC_I2C_USBC_AP_MUX_SDA,
+ },
+ {
+ .name = "thermal",
+ .port = I2C_PORT_THERMAL,
+ .kbps = 400,
+ .scl = GPIO_FCH_SIC,
+ .sda = GPIO_FCH_SID,
+ },
+ {
+ .name = "sensor",
+ .port = I2C_PORT_SENSOR,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_SENSOR_CBI_SCL,
+ .sda = GPIO_EC_I2C_SENSOR_CBI_SDA,
+ },
+ {
+ .name = "ap_audio",
+ .port = I2C_PORT_AP_AUDIO,
+ .kbps = 400,
+ .scl = GPIO_I2C_AUDIO_USB_HUB_SCL,
+ .sda = GPIO_I2C_AUDIO_USB_HUB_SDA,
+ },
+ {
+ .name = "battery",
+ .port = I2C_PORT_BATTERY_V1,
+ .kbps = 100,
+ .scl = GPIO_EC_I2C_BATT_SCL,
+ .sda = GPIO_EC_I2C_BATT_SDA,
+ },
+};
+const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+
/*****************************************************************************
* IO expander
*/