summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-11 10:44:31 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-24 01:37:41 +0000
commit461f56040ea8fa2d2d3f2f7a5842601c296b5d4f (patch)
tree570b592d1608d5ea9a59e1844607a6158b279396 /third_party
parent97a2b7b25b87eb4ff95100ef80519782635b9065 (diff)
downloadchrome-ec-461f56040ea8fa2d2d3f2f7a5842601c296b5d4f.tar.gz
zephyr: Add initial USB-C support
This includes a variety of things to get volteer to build with some amount of USB-C support. It seems to charge the battery and prevent booting when the battery is too low. Much work remains. In particular: - check the Kconfig help and add missing help - possibly add a TCPM Kconfig option for grouping - BCI1.2 event handler - TCPMv2 event generator BUG=b:175434113, b:176171475 BRANCH=none TEST=build and run on volteer: 20-12-11 17:43:12.344 uart:~$ tcpci_dump 0 20-12-11 17:44:45.493 VENDOR_ID (0x00) = 0x0451 20-12-11 17:44:45.493 PRODUCT_ID (0x02) = 0x0422 20-12-11 17:44:45.493 BCD_DEV (0x04) = 0x0100 20-12-11 17:44:45.504 TC_REV (0x06) = 0x0011 20-12-11 17:44:45.504 PD_REV (0x08) = 0x2011 20-12-11 17:44:45.504 PD_INT_REV (0x0a) = 0x1010 20-12-11 17:44:45.515 ALERT (0x10) = 0x000f 20-12-11 17:44:45.515 ALERT_MASK (0x12) = 0x007f 20-12-11 17:44:45.526 POWER_STATUS_MASK (0x14) = 0x04 20-12-11 17:44:45.526 FAULT_STATUS_MASK (0x15) = 0x7f 20-12-11 17:44:45.526 EXT_STATUS_MASK (0x16) = 0x00 20-12-11 17:44:45.536 ALERT_EXTENDED_MASK (0x17) = 0x00 20-12-11 17:44:45.536 CONFIG_STD_OUTPUT (0x18) = 0x60 20-12-11 17:44:45.536 TCPC_CTRL (0x19) = 0x11 20-12-11 17:44:45.547 ROLE_CTRL (0x1a) = 0x1a 20-12-11 17:44:45.547 FAULT_CTRL (0x1b) = 0x06 20-12-11 17:44:45.558 POWER_CTRL (0x1c) = 0x70 20-12-11 17:44:45.558 CC_STATUS (0x1d) = 0x13 20-12-11 17:44:45.558 POWER_STATUS (0x1e) = 0x8c 20-12-11 17:44:45.569 FAULT_STATUS (0x1f) = 0x00 20-12-11 17:44:45.569 EXT_STATUS (0x20) = 0x00 20-12-11 17:44:45.580 ALERT_EXT (0x21) = 0x00 20-12-11 17:44:45.580 DEV_CAP_1 (0x24) = 0x1e98 20-12-11 17:44:45.580 DEV_CAP_2 (0x26) = 0x00c5 20-12-11 17:44:45.592 STD_INPUT_CAP (0x28) = 0x00 20-12-11 17:44:45.592 STD_OUTPUT_CAP (0x29) = 0x00 20-12-11 17:44:45.592 CONFIG_EXT_1 (0x2a) = 0x00 20-12-11 17:44:45.602 MSG_HDR_INFO (0x2e) = 0x02 20-12-11 17:44:45.602 RX_DETECT (0x2f) = 0x00 20-12-11 17:44:45.613 RX_BYTE_CNT (0x30) = 0x00 20-12-11 17:44:45.613 RX_BUF_FRAME_TYPE (0x31) = 0x00 20-12-11 17:44:45.613 TRANSMIT (0x50) = 0x00 20-12-11 17:44:45.624 VBUS_VOLTAGE (0x70) = 0x0000 20-12-11 17:44:45.624 VBUS_SINK_DISCONNECT_THRESH (0x72) = 0x0000 20-12-11 17:44:45.633 VBUS_STOP_DISCHARGE_THRESH (0x74) = 0x0000 20-12-11 17:44:45.633 VBUS_VOLTAGE_ALARM_HI_CFG (0x76) = 0x0000 20-12-11 17:44:45.633 VBUS_VOLTAGE_ALARM_LO_CFG (0x78) = 0x0000 20-12-11 17:44:49.544 uart:~$ ppc_dump 0 20-12-11 17:45:09.838 FUNC_SET1 [50h] = 0x0b 20-12-11 17:45:09.838 FUNC_SET2 [51h] = 0x18 20-12-11 17:45:09.838 FUNC_SET3 [52h] = 0x6a 20-12-11 17:45:09.838 FUNC_SET4 [53h] = 0xfe 20-12-11 17:45:09.838 FUNC_SET5 [54h] = 0x37 20-12-11 17:45:09.838 FUNC_SET6 [55h] = 0xc1 20-12-11 17:45:09.847 FUNC_SET7 [56h] = 0x70 20-12-11 17:45:09.847 FUNC_SET8 [57h] = 0xbd 20-12-11 17:45:09.847 FUNC_SET9 [58h] = 0x34 20-12-11 17:45:09.847 FUNC_SET10 [59h] = 0x70 20-12-11 17:45:09.847 FUNC_SET11 [5ah] = 0x24 20-12-11 17:45:09.858 FUNC_SET12 [5bh] = 0x70 20-12-11 17:45:09.858 INT_STATUS_REG1 [2fh] = 0x00 20-12-11 17:45:09.858 INT_STATUS_REG2 [30h] = 0x80 20-12-11 17:45:09.858 INT_STATUS_REG3 [31h] = 0x09 20-12-11 17:45:09.858 INT_STATUS_REG4 [32h] = 0x08 20-12-11 17:45:09.862 INT_TRIP_RISE_REG1 [20h] = 0x80 20-12-11 17:45:09.862 INT_TRIP_RISE_REG2 [21h] = 0x00 20-12-11 17:45:09.874 INT_TRIP_RISE_REG3 [22h] = 0x05 20-12-11 17:45:09.874 INT_TRIP_FALL_REG1 [23h] = 0x80 20-12-11 17:45:09.874 INT_TRIP_FALL_REG2 [24h] = 0x00 20-12-11 17:45:09.879 INT_TRIP_FALL_REG3 [25h] = 0x05 20-12-11 17:45:09.879 INT_MASK_RISE_REG1 [26h] = 0xef 20-12-11 17:45:09.879 INT_MASK_RISE_REG2 [27h] = 0xe1 20-12-11 17:45:09.892 INT_MASK_RISE_REG3 [28h] = 0xff 20-12-11 17:45:09.892 INT_MASK_FALL_REG1 [29h] = 0xff 20-12-11 17:45:09.892 INT_MASK_FALL_REG2 [2ah] = 0xef 20-12-11 17:45:09.892 INT_MASK_FALL_REG3 [2bh] = 0x8f ... 20-12-11 18:21:17.576 battery 20-12-11 18:21:17.933 Status: 0x0080 INIT 20-12-11 18:21:17.933 Param flags:00000003 20-12-11 18:21:17.933 Temp: 0x0b64 = %.1d K (%.1d C) 20-12-11 18:21:17.933 V: 0x2aa8 = 10920 mV 20-12-11 18:21:17.933 V-desired: 0x3390 = 13200 mV 20-12-11 18:21:17.944 I: 0x00bd = 189 mA(CHG) 20-12-11 18:21:17.944 I-desired: 0x0a19 = 2585 mA 20-12-11 18:21:17.944 Charging: Allowed 20-12-11 18:21:17.944 Charge: 3 % 20-12-11 18:21:17.948 Manuf: LG 20-12-11 18:21:17.948 Device: AC17A8 20-12-11 18:21:17.953 Chem: LIO 20-12-11 18:21:17.960 Serial: 0xb754 20-12-11 18:21:17.960 V-design: 0x2d1e = 11550 mV 20-12-11 18:21:17.965 Mode: 0x6001 20-12-11 18:21:17.965 Abs charge:3 % 20-12-11 18:21:17.974 Remaining: 139 mAh 20-12-11 18:21:17.974 Cap-full: 5093 mAh (4991 mAh with 98 % compensation) 20-12-11 18:21:17.983 Display: 0.0 % 20-12-11 18:21:17.983 Design: 5360 mAh 20-12-11 18:21:17.993 Time-full: 26h:21 20-12-11 18:21:17.993 Empty: 0h:0 Cq-Depend: chromium:2585918 Change-Id: I0d852169c9cbbc70603944b70f4708111abd5b42 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2587225 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'third_party')
0 files changed, 0 insertions, 0 deletions