public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Thunderbolt and DP altmode support for cros-ec-typec
@ 2024-10-30 21:28 Abhishek Pandit-Subedi
  2024-10-30 21:28 ` [PATCH v2 1/7] usb: typec: Add driver for Thunderbolt 3 Alternate Mode Abhishek Pandit-Subedi
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Abhishek Pandit-Subedi @ 2024-10-30 21:28 UTC (permalink / raw)
  To: heikki.krogerus, tzungbi, linux-usb, chrome-platform
  Cc: dmitry.baryshkov, jthies, akuchynski, pmalani,
	Abhishek Pandit-Subedi, Benson Leung, Greg Kroah-Hartman,
	Guenter Roeck, linux-kernel


Hi Heikki, Tzung-Bi et al,

This patch series adds support for alternate mode entry for the
cros-ec-typec driver for Displayport and Thunderbolt.

Thunderbolt support is added by adapting an RFC Heikki had posted
previously:

https://lore.kernel.org/linux-usb/20191230152857.43917-1-heikki.krogerus@linux.intel.com/

A few comments on the series:

* The cros-ec interface will not accept any VDOs/VDMs so we simply
  ignore any configurations we are passed (i.e. DPConfigure). This means
  the sysfs control of DP lanes won't work.
* ChromeOS has two modes of operation for alt-modes: entirely EC driven
  or AP-driven from userspace (via the typec daemon). Thus, we don't
  expect the kernel alt-mode drivers to auto-enter modes in all cases.
  This series allows auto-enter for displayport but disables it for TBT
  for this reason.

This was tested with a ChromeOS Brya device using kernel 6.6 and built
with allmodconfig for linux-usb.

Thanks,
Abhishek

Changes in v2:
- Use <linux/usb/typec_tbt.h> and add missing TBT_CABLE_ROUNDED
- Pass struct typec_thunderbolt_data to typec_altmode_notify
- Rename TYPEC_TBT_MODE to USB_TYPEC_TBT_MODE
- Use USB_TYPEC_TBT_SID and USB_TYPEC_TBT_MODE for device id
- Change module license to GPL due to checkpatch warning
- Update altmode_match to ignore mode entirely
- Also apply the same behavior to typec_match
- Refactored displayport into cros_typec_altmode.c to extract common
  implementation between altmodes
- Refactored thunderbolt support into cros_typec_altmode.c
- Only disable auto-enter for Thunderbolt
- Update commit message to clearly indicate the need for userspace
  intervention to enter TBT mode

Abhishek Pandit-Subedi (6):
  usb: typec: Only use SVID for matching altmodes
  usb: typec: Auto enter control for alternate modes
  platform/chrome: cros_ec_typec: Update partner altmode active
  platform/chrome: cros_ec_typec: Displayport support
  platform/chrome: cros_ec_typec: Thunderbolt support
  platform/chrome: cros_ec_typec: Disable tbt auto_enter

Heikki Krogerus (1):
  usb: typec: Add driver for Thunderbolt 3 Alternate Mode

 Documentation/ABI/testing/sysfs-bus-typec    |   9 +
 MAINTAINERS                                  |   3 +
 drivers/platform/chrome/Makefile             |   3 +-
 drivers/platform/chrome/cros_ec_typec.c      |  56 ++-
 drivers/platform/chrome/cros_ec_typec.h      |   1 +
 drivers/platform/chrome/cros_typec_altmode.c | 362 +++++++++++++++++++
 drivers/platform/chrome/cros_typec_altmode.h |  48 +++
 drivers/usb/typec/altmodes/Kconfig           |   9 +
 drivers/usb/typec/altmodes/Makefile          |   2 +
 drivers/usb/typec/altmodes/displayport.c     |   6 +-
 drivers/usb/typec/altmodes/thunderbolt.c     | 309 ++++++++++++++++
 drivers/usb/typec/bus.c                      |   3 +-
 drivers/usb/typec/class.c                    |  33 +-
 include/linux/usb/typec.h                    |   2 +
 include/linux/usb/typec_altmode.h            |   2 +
 include/linux/usb/typec_tbt.h                |   3 +-
 16 files changed, 830 insertions(+), 21 deletions(-)
 create mode 100644 drivers/platform/chrome/cros_typec_altmode.c
 create mode 100644 drivers/platform/chrome/cros_typec_altmode.h
 create mode 100644 drivers/usb/typec/altmodes/thunderbolt.c

-- 
2.47.0.163.g1226f6d8fa-goog


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

end of thread, other threads:[~2024-11-07 19:22 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-30 21:28 [PATCH v2 0/7] Thunderbolt and DP altmode support for cros-ec-typec Abhishek Pandit-Subedi
2024-10-30 21:28 ` [PATCH v2 1/7] usb: typec: Add driver for Thunderbolt 3 Alternate Mode Abhishek Pandit-Subedi
2024-10-31  5:09   ` kernel test robot
2024-10-31 14:11   ` Heikki Krogerus
2024-10-31 23:02     ` Abhishek Pandit-Subedi
2024-11-01 13:16       ` Heikki Krogerus
2024-11-01 18:48         ` Abhishek Pandit-Subedi
2024-11-04 14:32           ` Heikki Krogerus
2024-11-07 19:21             ` Abhishek Pandit-Subedi
2024-10-30 21:28 ` [PATCH v2 2/7] usb: typec: Only use SVID for matching altmodes Abhishek Pandit-Subedi
2024-10-31 14:13   ` Heikki Krogerus
2024-10-30 21:28 ` [PATCH v2 3/7] usb: typec: Auto enter control for alternate modes Abhishek Pandit-Subedi
2024-10-31 14:33   ` Heikki Krogerus
2024-10-31 22:48     ` Abhishek Pandit-Subedi
2024-11-01 13:59       ` Heikki Krogerus
2024-11-01 16:53         ` Abhishek Pandit-Subedi
2024-11-04 14:14           ` Heikki Krogerus
2024-10-30 21:28 ` [PATCH v2 4/7] platform/chrome: cros_ec_typec: Update partner altmode active Abhishek Pandit-Subedi
2024-10-30 21:28 ` [PATCH v2 5/7] platform/chrome: cros_ec_typec: Displayport support Abhishek Pandit-Subedi
2024-10-31 17:48   ` kernel test robot
2024-10-31 18:54   ` Dmitry Baryshkov
2024-10-31 22:34     ` Abhishek Pandit-Subedi
2024-10-31 19:43   ` kernel test robot
2024-10-30 21:28 ` [PATCH v2 6/7] platform/chrome: cros_ec_typec: Thunderbolt support Abhishek Pandit-Subedi
2024-10-31 17:07   ` kernel test robot
2024-10-31 18:51   ` Dmitry Baryshkov
2024-10-31 22:23     ` Abhishek Pandit-Subedi
2024-10-30 21:28 ` [PATCH v2 7/7] platform/chrome: cros_ec_typec: Disable tbt auto_enter Abhishek Pandit-Subedi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox