summaryrefslogtreecommitdiff
path: root/driver/usb_mux/amd_fp6.h
blob: ba2b791ba5b3670cc2c66c14926b7dcb1a65a1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Copyright 2021 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * AMD FP6 USB/DP Mux.
 */

#ifndef __CROS_EC_USB_MUX_AMD_FP6_H
#define __CROS_EC_USB_MUX_AMD_FP6_H

#define AMD_FP6_C0_MUX_I2C_ADDR 0x5C
#define AMD_FP6_C4_MUX_I2C_ADDR 0x52

#define AMD_FP6_MUX_MODE_SAFE 0x0
#define AMD_FP6_MUX_MODE_USB 0x1
#define AMD_FP6_MUX_MODE_DP 0x2
#define AMD_FP6_MUX_MODE_DOCK 0x3
#define AMD_FP6_MUX_MODE_MASK GENMASK(1, 0)

#define AMD_FP6_MUX_ORIENTATION BIT(4)
#define AMD_FP6_MUX_LOW_POWER BIT(5)

#define AMD_FP6_MUX_PORT_STATUS_OFFSET 6
#define AMD_FP6_MUX_PORT_CMD_BUSY 0x0
#define AMD_FP6_MUX_PORT_CMD_COMPLETE 0x1
#define AMD_FP6_MUX_PORT_CMD_TIMEOUT 0x2

#define AMD_FP6_MUX_PD_STATUS_READY BIT(5)
#define AMD_FP6_MUX_PD_STATUS_OFFSET 1

#endif /* __CROS_EC_USB_MUX_AMD_FP6_H */