summaryrefslogtreecommitdiff
path: root/board/puff/board.h
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2019-11-11 14:31:27 +1100
committerCommit Bot <commit-bot@chromium.org>2019-12-10 01:56:14 +0000
commit2cb4d29ad22831110d1b5adec820794b6d76fae9 (patch)
treecf0261290612b0543ab22e8fca976b84090dde23 /board/puff/board.h
parentf74ddb9de4f7e29402156904d3f16a8d01fb6df5 (diff)
downloadchrome-ec-2cb4d29ad22831110d1b5adec820794b6d76fae9.tar.gz
puff: implement PP5000 port power control
The EC watches current limiting on the USB and HDMI ports to keep system load on the 5V rail within the limits of the regulator. The EC's goal is to ensure that any single future state change (connecting or disconnecting a port) doesn't push the 5V rail overcurrent. Verification is done via symbolic execution with Klee; ensuring that there exists no state where plugging something into a port with no further changes would put us over the power budget. Sample verification output: > KLEE: Using Z3 solver backend > > KLEE: done: total instructions = 4439 > KLEE: done: completed paths = 30 > KLEE: done: generated tests = 30 v2: convert ad-hoc state space exploration for verification to symbolic execution, allowing port control code to be reused for both. BUG=b:143190102 TEST=make buildall BRANCH=none Change-Id: If06e319c8d38bd11b29a7e69499d40357176a97e Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911261 Reviewed-by: Andrew McRae <amcrae@chromium.org>
Diffstat (limited to 'board/puff/board.h')
-rw-r--r--board/puff/board.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/board/puff/board.h b/board/puff/board.h
index 81fe94f363..85337b55af 100644
--- a/board/puff/board.h
+++ b/board/puff/board.h
@@ -143,7 +143,9 @@
#define CONFIG_USBC_VCONN_SWAP
/* USB Type A Features */
-/* TODO: (b/143190102) Finish USB A config */
+#define CONFIG_USB_PORT_POWER_DUMB
+/* There are five ports, but power enable is ganged across all of them. */
+#define USB_PORT_COUNT 1
/* I2C Bus Configuration */
#define CONFIG_I2C