linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/12] usb: typec: add SOP' support to the tcpm and alt mode drivers
@ 2024-01-08 19:16 RD Babiera
  2024-01-08 19:16 ` [PATCH v3 01/12] usb: typec: altmodes: add typec_cable_ops to typec_altmode RD Babiera
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: RD Babiera @ 2024-01-08 19:16 UTC (permalink / raw)
  To: rdbabiera, heikki.krogerus, linux, gregkh, linux-kernel,
	linux-usb
  Cc: badhri, bryan.odonoghue, agross, andersson, konrad.dybcio

Extend the TCPM's functionality to include support for SOP' messages.
This feature is opt-in: TCPCI chip drivers opt into sending and receiving
SOP' messages. TCPCI drivers will also be expected to take the SOP frame
type in order to process SOP' messages within the TCPM. Specifically,
the exisiting API tcpm_pd_receive now takes tcpm_transmit_type as input.
The Maxim TCPCI implements this in Patch 4.

Discover Identity, Discover SVIDs, Discover Modes, and Alt Mode SVDM
support are included within the patchset. Because the port is expected to
be the Vconn source in order to communicate with the cable, TCPCI chip
drivers opt into performing a Vconn swap after Discover Identity on SOP
before performing Discover Identity on SOP'.

typec_cable_ops are defined to facilitate communication between the alt
mode drivers and the cable plugs. 2 new apis allow the alt mode drivers
to enter and exit mode on active cable plugs. A third is used by alt mode
drivers to send VDMs to the cable plugs or by the TCPM to return the
resulting VDM from the cable plug to the alt mode drivers.
---
Changes since v1:
* Add typec_cable_ops as replacement for changing typec_altmode_ops
  interface. Displayport driver patch now reflects this
* Separate patch for cable SVDM versioning.
* Separate patch for tcpm_pd_receive() api changes and cable_comm_capable
  addition to tcpci.
* Separate patches for Discover SVIDs/Discover Modes and Alt Mode
  operations on SOP'.

Changes since v2:
* Style changes, bugfix for lock in displayport.c, bugfix in tcpm.c that
  restores code deleted by patch.

RD Babiera (12):
  usb: typec: altmodes: add typec_cable_ops to typec_altmode
  usb: typec: altmodes: add svdm version info for typec cables
  usb: typec: tcpci: add cable_comm_capable attribute
  usb: typec: tcpci: add tcpm_transmit_type to tcpm_pd_receive
  usb: typec: tcpm: process receive and transmission of sop' messages
  usb: typec: tcpm: add control message support to sop'
  usb: typec: tcpci: add attempt_vconn_swap_discovery callback
  usb: typec: tcpm: add discover identity support for SOP'
  usb: typec: tcpm: add state machine support for
    SRC_VDM_IDENTITY_REQUEST
  usb: typec: tcpm: add discover svids and discover modes support for
    sop'
  usb: typec: tcpm: add alt mode enter/exit/vdm support for sop'
  usb: typec: altmodes/displayport: add SOP' support

 drivers/usb/typec/altmodes/displayport.c      |  162 ++-
 drivers/usb/typec/bus.c                       |  102 ++
 drivers/usb/typec/class.c                     |   59 +
 drivers/usb/typec/class.h                     |    1 +
 drivers/usb/typec/tcpm/fusb302.c              |    2 +-
 .../typec/tcpm/qcom/qcom_pmic_typec_pdphy.c   |    2 +-
 drivers/usb/typec/tcpm/tcpci.c                |   26 +-
 drivers/usb/typec/tcpm/tcpci_maxim.h          |    1 +
 drivers/usb/typec/tcpm/tcpci_maxim_core.c     |   38 +-
 drivers/usb/typec/tcpm/tcpm.c                 | 1030 ++++++++++++++---
 drivers/usb/typec/tcpm/wcove.c                |    2 +-
 include/linux/usb/pd.h                        |    1 +
 include/linux/usb/pd_vdo.h                    |    8 +-
 include/linux/usb/tcpci.h                     |   13 +
 include/linux/usb/tcpm.h                      |   16 +-
 include/linux/usb/typec.h                     |    7 +
 include/linux/usb/typec_altmode.h             |   30 +
 17 files changed, 1337 insertions(+), 163 deletions(-)


base-commit: 933bb7b878ddd0f8c094db45551a7daddf806e00
-- 
2.43.0.472.g3155946c3a-goog


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-01-15  9:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 19:16 [PATCH v3 00/12] usb: typec: add SOP' support to the tcpm and alt mode drivers RD Babiera
2024-01-08 19:16 ` [PATCH v3 01/12] usb: typec: altmodes: add typec_cable_ops to typec_altmode RD Babiera
2024-01-15  9:07   ` Heikki Krogerus
2024-01-08 19:16 ` [PATCH v3 02/12] usb: typec: altmodes: add svdm version info for typec cables RD Babiera
2024-01-08 19:16 ` [PATCH v3 03/12] usb: typec: tcpci: add cable_comm_capable attribute RD Babiera
2024-01-08 19:16 ` [PATCH v3 04/12] usb: typec: tcpci: add tcpm_transmit_type to tcpm_pd_receive RD Babiera
2024-01-08 19:16 ` [PATCH v3 05/12] usb: typec: tcpm: process receive and transmission of sop' messages RD Babiera
2024-01-15  9:13   ` Heikki Krogerus
2024-01-08 19:16 ` [PATCH v3 06/12] usb: typec: tcpm: add control message support to sop' RD Babiera
2024-01-08 19:16 ` [PATCH v3 07/12] usb: typec: tcpci: add attempt_vconn_swap_discovery callback RD Babiera
2024-01-08 19:16 ` [PATCH v3 08/12] usb: typec: tcpm: add discover identity support for SOP' RD Babiera
2024-01-08 19:16 ` [PATCH v3 09/12] usb: typec: tcpm: add state machine support for SRC_VDM_IDENTITY_REQUEST RD Babiera
2024-01-08 19:16 ` [PATCH v3 10/12] usb: typec: tcpm: add discover svids and discover modes support for sop' RD Babiera
2024-01-15  9:14   ` Heikki Krogerus
2024-01-08 19:16 ` [PATCH v3 11/12] usb: typec: tcpm: add alt mode enter/exit/vdm " RD Babiera
2024-01-15  9:15   ` Heikki Krogerus
2024-01-08 19:16 ` [PATCH v3 12/12] usb: typec: altmodes/displayport: add SOP' support RD Babiera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).