summaryrefslogtreecommitdiff
path: root/board/servo_v4p1/ioexpanders.h
diff options
context:
space:
mode:
authorJan Dabros <jsd@semihalf.com>2020-12-10 01:12:05 +0100
committerCommit Bot <commit-bot@chromium.org>2020-12-17 16:49:07 +0000
commit18c253631602adb4ed84d827048487d613398ae3 (patch)
treebc9889bba0fa0bb780d0c015c0d40ef3d4f81e9f /board/servo_v4p1/ioexpanders.h
parent2cf881abe17a5f927479b9b197e4fbca7b80ae8e (diff)
downloadchrome-ec-18c253631602adb4ed84d827048487d613398ae3.tar.gz
servo_v4p1: Fix GPIO assignments in ioexpanders
Fix improper GPIO connections and add new ones in ioexpanders to match EVT hardware layout. Old assignments were implemented for PVT design. BUG:b:144776402,b:168385201 BRANCH:master TEST:make -b servo_v4p1. Verify that usb redriver TUSB1064 is working (DP connection). Verify that DUT charger is working correctly. Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I8229690440a70fd78c5b5671368212d4eb325d51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582666 Reviewed-by: Brian Nemec <bnemec@chromium.org>
Diffstat (limited to 'board/servo_v4p1/ioexpanders.h')
-rw-r--r--board/servo_v4p1/ioexpanders.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/board/servo_v4p1/ioexpanders.h b/board/servo_v4p1/ioexpanders.h
index d444a6fca3..b6aded8654 100644
--- a/board/servo_v4p1/ioexpanders.h
+++ b/board/servo_v4p1/ioexpanders.h
@@ -129,15 +129,6 @@ int usb3_a1_mux_sel(int en);
int board_id_det(void);
/**
- * USBC 4:6 redriver enable
- *
- * @param en 0 - TUSB1064 disabled
- * 1 - TUSB1064 enabled
- * @return EC_SUCCESS or EC_xxx on error
- */
-int cmux_en(int en);
-
-/**
* Reads the TypeA/TypeC DUT cable assembly pigtail
*
* @return 0 - for TypeA
@@ -146,6 +137,14 @@ int cmux_en(int en);
int dongle_det(void);
/**
+ * Reads state of BC1.2 on host connection
+ *
+ * @return 0 - BC1.2 not present
+ * 1 - BC1.2 present
+ */
+int get_host_chrg_det(void);
+
+/**
* Enable signal for supplemental power supply. This supply will support higher
* wattage servo needs. 10ms after enabling this bit, the server supply should
* switch over from the host supply and the higher wattage will be available
@@ -268,6 +267,23 @@ int host_or_chg_ctl(int en);
*/
int read_faults(void);
+#define HOST_CHRG_DET BIT(0)
+#define SYS_PWR_IRQ_ODL BIT(6)
+
+/**
+ * Read irqs which indicate some system event.
+ *
+ * BIT
+ * 0 (HOST_CHRG_DET) - Change of state of BC1.2 on host connection
+ * 0 - BC1.2 not present
+ * 1 - BC1.2 present
+ * 6 (SYS_PWR_IRQ_ODL) - IRQ from system full power INA231 monitor. IRQ can be
+ * programmed to trip on wattage threshold.
+ * 0 - IRQ asserted
+ * 1 - no IRQ
+ */
+int read_irqs(void);
+
/**
* Enables active discharge for USB DUT Charger
*