From: Andrei Kuchynski <akuchynski@chromium.org>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Jameson Thies <jthies@google.com>,
Benson Leung <bleung@chromium.org>,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrei Kuchynski <akuchynski@chromium.org>
Subject: [PATCH v4 0/2] USB Type-C mode selection
Date: Thu, 5 Nov 2026 15:59:04 +0000 [thread overview]
Message-ID: <20261105155906.2670094-1-akuchynski@chromium.org> (raw)
This patch series introduces priority-based alternate mode selection
support for cros_ec_typec.
The base patch series and UCSI support was submitted here:
https://lore.kernel.org/all/20260119131824.2529334-1-akuchynski@chromium.org/
When AP-driven alternate mode selection is active, the driver enforces the
mode_selection bit for each registered Alternate Mode. This blocks
individual altmode drivers from self-activating. Once registration
completes, the driver evaluates USB4 capability. If USB4 is unsupported,
it falls back to priority-based negotiation via typec_mode_selection_start.
Additionally, we swap the registration sequence of the port's alternate
modes. Registering DisplayPort after Thunderbolt correctly ensures DP is
prioritized.
Changes in v4:
- Dropped typec_altmode_state_update() call in cros_typec_altmode.c as
it is potentially unsafe.
- Added explicit partner usb mode setting via
'typec_partner_set_usb_mode' upon successful USB4 mux configuration.
- Rebased on top of the latest platform-chrome tree.
Changes in v3:
- Replaced delay/timeout consts with macros.
- Downgraded USB4/mode selection error logs to dev_warn().
- Fixed comment formatting and added comment for DP/TBT order.
Changes in v2:
- Added this cover letter.
- Rebased on top of the latest platform-chrome tree.
- Tested on Redrix with Linux Fedora 7.3.0-rc5+.
v1 Link:
https://lore.kernel.org/all/20260129131928.794768-1-akuchynski@chromium.org/
Andrei Kuchynski (2):
platform/chrome: cros_ec_typec: Enforce priority-based mode selection
platform/chrome: cros_ec_typec: Reorder altmode registration
drivers/platform/chrome/cros_ec_typec.c | 67 +++++++++++++++++++++----
1 file changed, 56 insertions(+), 11 deletions(-)
--
2.56.0.398.g882cbad275-goog
next reply other threads:[~2026-11-05 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 15:59 Andrei Kuchynski [this message]
2026-11-05 15:59 ` [PATCH v4 1/2] platform/chrome: cros_ec_typec: Enforce priority-based " Andrei Kuchynski
2026-11-05 15:59 ` [PATCH v4 2/2] platform/chrome: cros_ec_typec: Reorder altmode registration Andrei Kuchynski
2026-11-06 2:32 ` [PATCH v4 0/2] USB Type-C mode selection Tzung-Bi Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105155906.2670094-1-akuchynski@chromium.org \
--to=akuchynski@chromium.org \
--cc=abhishekpandit@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®