Skip to content

Commit

Permalink
usb: typec: tcpci_maxim: Chip level TCPC driver
Browse files Browse the repository at this point in the history
Chip level TCPC driver for Maxim's TCPCI implementation.
This TCPC implementation does not support the following
commands: COMMAND.SinkVbus, COMMAND.SourceVbusDefaultVoltage,
COMMAND.SourceVbusHighVoltage. Instead the sinking and sourcing
from vbus is supported by writes to custom registers.

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20201008061556.1402293-5-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Badhri Jagan Sridharan authored and Greg Kroah-Hartman committed Oct 8, 2020
1 parent b9358a0 commit 6f413b5
Show file tree
Hide file tree
Showing 4 changed files with 476 additions and 7 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/typec/tcpm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ config TYPEC_MT6360
USB Type-C. It works with Type-C Port Controller Manager
to provide USB PD and USB Type-C functionalities.

config TYPEC_TCPCI_MAXIM
tristate "Maxim TCPCI based Type-C chip driver"
help
MAXIM TCPCI based Type-C/PD chip driver. Works with
with Type-C Port Controller Manager.

endif # TYPEC_TCPCI

config TYPEC_FUSB302
Expand Down
15 changes: 8 additions & 7 deletions drivers/usb/typec/tcpm/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
obj-$(CONFIG_TYPEC_FUSB302) += fusb302.o
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o
typec_wcove-y := wcove.o
obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o
obj-$(CONFIG_TYPEC_RT1711H) += tcpci_rt1711h.o
obj-$(CONFIG_TYPEC_MT6360) += tcpci_mt6360.o
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
obj-$(CONFIG_TYPEC_FUSB302) += fusb302.o
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o
typec_wcove-y := wcove.o
obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o
obj-$(CONFIG_TYPEC_RT1711H) += tcpci_rt1711h.o
obj-$(CONFIG_TYPEC_MT6360) += tcpci_mt6360.o
obj-$(CONFIG_TYPEC_TCPCI_MAXIM) += tcpci_maxim.o
1 change: 1 addition & 0 deletions drivers/usb/typec/tcpm/tcpci.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@

#define TCPC_RX_BYTE_CNT 0x30
#define TCPC_RX_BUF_FRAME_TYPE 0x31
#define TCPC_RX_BUF_FRAME_TYPE_SOP 0
#define TCPC_RX_HDR 0x32
#define TCPC_RX_DATA 0x34 /* through 0x4f */

Expand Down
Loading

0 comments on commit 6f413b5

Please sign in to comment.