diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2019-07-15 07:13:15 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-17 02:23:30 +0000 |
commit | 5b4d4edff0d4cd6cf0293799e60bda21e9d0155a (patch) | |
tree | c80dffade7a238e07a50a4a77ebbc7dc26341eb4 /driver/usb_mux/it5205.h | |
parent | 283338b878bf47fe8f371729b399320225472b1b (diff) | |
download | chrome-ec-5b4d4edff0d4cd6cf0293799e60bda21e9d0155a.tar.gz |
cleanup: Segregate USB MUX related drivers in usb_mux folder
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: If44a363d1288cbfabe5c6545e550f2b8fc623227
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1700793
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/usb_mux/it5205.h')
-rw-r--r-- | driver/usb_mux/it5205.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/driver/usb_mux/it5205.h b/driver/usb_mux/it5205.h new file mode 100644 index 0000000000..b81b33cac3 --- /dev/null +++ b/driver/usb_mux/it5205.h @@ -0,0 +1,34 @@ +/* Copyright 2017 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. + * + * ITE IT5205 Type-C USB alternate mode mux. + */ + +#ifndef __CROS_EC_IT5205_H +#define __CROS_EC_IT5205_H + +/* I2C interface */ +#define IT5205_I2C_ADDR1 (0x48 << 1) +#define IT5205_I2C_ADDR2 (0x58 << 1) + +/* Chip ID registers */ +#define IT5205_REG_CHIP_ID3 0x4 +#define IT5205_REG_CHIP_ID2 0x5 +#define IT5205_REG_CHIP_ID1 0x6 +#define IT5205_REG_CHIP_ID0 0x7 + +/* MUX power down register */ +#define IT5205_REG_MUXPDR 0x10 +#define IT5205_MUX_POWER_DOWN BIT(0) + +/* MUX control register */ +#define IT5205_REG_MUXCR 0x11 +#define IT5205_POLARITY_INVERTED BIT(4) + +#define IT5205_DP_USB_CTRL_MASK 0x0f +#define IT5205_DP 0x0f +#define IT5205_DP_USB 0x03 +#define IT5205_USB 0x07 + +#endif /* __CROS_EC_IT5205_H */ |