From cb4338e289389d699f26204c73aede4e24dd296e Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Buchillon Date: Sat, 5 May 2018 18:32:12 +0800 Subject: sweetberry: expose i2c over usb Expose the i2c interface through usb so that we can read power rails through servod leveraging the work being done there. BRANCH=none BUG=chromium:806148 TEST=manual testing - powerlog still works - i2c over usb using servod code works (other CLs needed) Change-Id: I48876bc4839509a397ce77376b337c37c556ae40 Signed-off-by: Ruben Rodriguez Buchillon Reviewed-on: https://chromium-review.googlesource.com/1051136 Reviewed-by: Nick Sanders --- chip/stm32/build.mk | 1 - chip/stm32/usb_dwc_i2c.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 chip/stm32/usb_dwc_i2c.h (limited to 'chip/stm32') diff --git a/chip/stm32/build.mk b/chip/stm32/build.mk index 9a6a280d81..e7f28309b3 100644 --- a/chip/stm32/build.mk +++ b/chip/stm32/build.mk @@ -75,7 +75,6 @@ chip-$(CONFIG_USB)+=usb_dwc.o usb_endpoints.o chip-$(CONFIG_USB_CONSOLE)+=usb_dwc_console.o chip-$(CONFIG_USB_POWER)+=usb_power.o chip-$(CONFIG_STREAM_USB)+=usb_dwc_stream.o -chip-$(CONFIG_USB_I2C)+=usb_dwc_i2c.o else chip-$(CONFIG_STREAM_USB)+=usb-stream.o chip-$(CONFIG_USB)+=usb.o usb-$(CHIP_FAMILY).o usb_endpoints.o diff --git a/chip/stm32/usb_dwc_i2c.h b/chip/stm32/usb_dwc_i2c.h new file mode 100644 index 0000000000..e44002268a --- /dev/null +++ b/chip/stm32/usb_dwc_i2c.h @@ -0,0 +1,13 @@ +/* Copyright 2018 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 __CROS_EC_USB_DWC_I2C_H +#define __CROS_EC_USB_DWC_I2C_H +#include "usb_i2c.h" + +/* I2C over USB interface. This gets declared in usb_i2c.c */ +extern struct dwc_usb_ep i2c_usb__ep_ctl; + +#endif /* __CROS_EC_USB_DWC_I2C_H */ -- cgit v1.2.1