Chrome platform driver development
 help / color / mirror / Atom feed
* [PATCH 00/10] USB Type-C mode selection
@ 2025-06-16 13:31 Andrei Kuchynski
  2025-06-16 13:31 ` [PATCH 01/10] usb: typec: Add alt_mode_override field to port property Andrei Kuchynski
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Andrei Kuchynski @ 2025-06-16 13:31 UTC (permalink / raw)
  To: Heikki Krogerus, Dmitry Baryshkov, Abhishek Pandit-Subedi,
	Jameson Thies, Benson Leung, Tzung-Bi Shih
  Cc: Greg Kroah-Hartman, Guenter Roeck, Pooja Katiyar,
	Badhri Jagan Sridharan, RD Babiera, linux-usb, linux-kernel,
	chrome-platform, Andrei Kuchynski

This patch series introduces a flexible mechanism for USB Type-C mode
selection, enabling into USB4 mode, Thunderbolt alternate mode, or
DisplayPort alternate mode.
Two new sysfs attributes are exposed to provide user control over mode
selection:
`altmode_priorities`: Allows users to define their preferred order for
attempting mode entry.
`mode_selection`: Initiates an automatic mode entry process based on the
configured priorities and reports the outcome.
The mode selection logic attempts to enter prioritized modes sequentially.
A mode is considered successfully negotiated only when its alternate mode
driver explicitly reports a positive status. Alternate mode drivers are
required to report their mode entry status (either successful or failed).
If an alt-mode driver does not report its status within a defined timeout
period, the system automatically proceeds to attempt entry into the next
preferred mode.

This series was tested on a ChromeOS Brya device running kernel 6.6, and on
an Android OS device with kernel 6.12.

Andrei Kuchynski (10):
  usb: typec: Add alt_mode_override field to port property
  platform/chrome: cros_ec_typec: Set alt_mode_override flag
  usb: typec: ucsi: Set alt_mode_override flag
  usb: typec: Expose alternate mode priorities via sysfs
  usb: typec: Implement automated alternate mode selection
  Revert "usb: typec: displayport: Receive DP Status Update NAK request
    exit dp altmode"
  usb: typec: Report altmode entry status via callback
  usb: typec: ucsi: displayport: Propagate DP altmode entry result
  platform/chrome: cros_ec_typec: Propagate altmode entry result
  platform/chrome: cros_ec_typec: Report USB4 mode entry status via
    callback

 Documentation/ABI/testing/sysfs-class-typec  |  34 ++
 drivers/platform/chrome/cros_ec_typec.c      |  11 +
 drivers/platform/chrome/cros_typec_altmode.c |  32 +-
 drivers/platform/chrome/cros_typec_altmode.h |   6 +
 drivers/usb/typec/Makefile                   |   2 +-
 drivers/usb/typec/altmodes/displayport.c     |  17 +-
 drivers/usb/typec/altmodes/thunderbolt.c     |   6 +
 drivers/usb/typec/class.c                    |  95 +++-
 drivers/usb/typec/class.h                    |  16 +
 drivers/usb/typec/mode_selection.c           | 505 +++++++++++++++++++
 drivers/usb/typec/mode_selection.h           |  42 ++
 drivers/usb/typec/ucsi/displayport.c         |   4 +-
 drivers/usb/typec/ucsi/ucsi.c                |   2 +
 include/linux/usb/pd_vdo.h                   |   2 +
 include/linux/usb/typec.h                    |   1 +
 include/linux/usb/typec_altmode.h            |  12 +
 include/linux/usb/typec_dp.h                 |   2 +
 include/linux/usb/typec_tbt.h                |   3 +
 18 files changed, 775 insertions(+), 17 deletions(-)
 create mode 100644 drivers/usb/typec/mode_selection.c
 create mode 100644 drivers/usb/typec/mode_selection.h

-- 
2.50.0.rc1.591.g9c95f17f64-goog


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

end of thread, other threads:[~2025-06-18 19:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 13:31 [PATCH 00/10] USB Type-C mode selection Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 01/10] usb: typec: Add alt_mode_override field to port property Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 02/10] platform/chrome: cros_ec_typec: Set alt_mode_override flag Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 03/10] usb: typec: ucsi: " Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 04/10] usb: typec: Expose alternate mode priorities via sysfs Andrei Kuchynski
2025-06-17  9:50   ` Heikki Krogerus
2025-06-17 12:38     ` Andrei Kuchynski
2025-06-17 13:28       ` Greg Kroah-Hartman
2025-06-18  2:47         ` Abhishek Pandit-Subedi
2025-06-18 13:42           ` Heikki Krogerus
2025-06-18 19:00             ` Abhishek Pandit-Subedi
2025-06-16 13:31 ` [PATCH 05/10] usb: typec: Implement automated alternate mode selection Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 06/10] Revert "usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode" Andrei Kuchynski
2025-06-16 14:15   ` Greg Kroah-Hartman
2025-06-16 19:42     ` Andrei Kuchynski
2025-06-17  8:54   ` Heikki Krogerus
2025-06-17 12:54     ` Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 07/10] usb: typec: Report altmode entry status via callback Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 08/10] usb: typec: ucsi: displayport: Propagate DP altmode entry result Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 09/10] platform/chrome: cros_ec_typec: Propagate " Andrei Kuchynski
2025-06-16 13:31 ` [PATCH 10/10] platform/chrome: cros_ec_typec: Report USB4 mode entry status via callback Andrei Kuchynski
2025-06-16 13:34 ` [PATCH 00/10] USB Type-C mode selection Dmitry Baryshkov

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