<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/typec, branch v6.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-09-06T13:30:26Z</updated>
<entry>
<title>usb: typec: tcpm: properly deliver cable vdms to altmode drivers</title>
<updated>2025-09-06T13:30:26Z</updated>
<author>
<name>RD Babiera</name>
<email>rdbabiera@google.com</email>
</author>
<published>2025-08-21T20:37:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f34bfcc77b18375a87091c289c2eb53c249787b4'/>
<id>urn:sha1:f34bfcc77b18375a87091c289c2eb53c249787b4</id>
<content type='text'>
tcpm_handle_vdm_request delivers messages to the partner altmode or the
cable altmode depending on the SVDM response type, which is incorrect.
The partner or cable should be chosen based on the received message type
instead.

Also add this filter to ADEV_NOTIFY_USB_AND_QUEUE_VDM, which is used when
the Enter Mode command is responded to by a NAK on SOP or SOP' and when
the Exit Mode command is responded to by an ACK on SOP.

Fixes: 7e7877c55eb1 ("usb: typec: tcpm: add alt mode enter/exit/vdm support for sop'")
Cc: stable@vger.kernel.org
Signed-off-by: RD Babiera &lt;rdbabiera@google.com&gt;
Reviewed-by: Badhri Jagan Sridharan &lt;badhri@google.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250821203759.1720841-2-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: fusb302: Revert incorrect threaded irq fix</title>
<updated>2025-08-19T10:29:33Z</updated>
<author>
<name>Sebastian Reichel</name>
<email>sebastian.reichel@collabora.com</email>
</author>
<published>2025-08-18T16:50:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=309b6341d5570fb2b41b923de2fc9bb147106b80'/>
<id>urn:sha1:309b6341d5570fb2b41b923de2fc9bb147106b80</id>
<content type='text'>
The fusb302 irq handler has been carefully optimized by Hans de Goede in
commit 207338ec5a27 ("usb: typec: fusb302: Improve suspend/resume
handling"). A recent 'fix' undid most of that work to avoid a virtio-gpio
driver bug.

This reverts the incorrect fix, since it is of very low quality. It
reverts the quirks from Hans change (and thus reintroduces the problems
fixed by Hans) while keeping the overhead from the original change.

The proper fix to support using fusb302 with an interrupt line provided
by virtio-gpio must be implemented in the virtio driver instead, which
should support disabling the IRQ from the fusb302 interrupt routine.

Cc: Hans de Goede &lt;hansg@kernel.org&gt;
Cc: Yongbo Zhang &lt;giraffesnn123@gmail.com&gt;
Fixes: 1c2d81bded19 ("usb: typec: fusb302: fix scheduling while atomic when using virtio-gpio")
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Link: https://lore.kernel.org/r/20250818-fusb302-unthreaded-irq-v1-1-3a9a11a9f56f@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: maxim_contaminant: re-enable cc toggle if cc is open and port is clean</title>
<updated>2025-08-17T10:14:55Z</updated>
<author>
<name>Amit Sunil Dhamne</name>
<email>amitsd@google.com</email>
</author>
<published>2025-08-15T18:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a381c6d6f646226924809d0ad01a9465786da463'/>
<id>urn:sha1:a381c6d6f646226924809d0ad01a9465786da463</id>
<content type='text'>
Presently in `max_contaminant_is_contaminant()` if there's no
contaminant detected previously, CC is open &amp; stopped toggling and no
contaminant is currently present, TCPC.RC would be programmed to do DRP
toggling. However, it didn't actively look for a connection. This would
lead to Type-C not detect *any* new connections. Hence, in the above
situation, re-enable toggling &amp; program TCPC to look for a new
connection.

Also, return early if TCPC was looking for connection as this indicates
TCPC has neither detected a potential connection nor a change in
contaminant state.

In addition, once dry detection is complete (port is dry), restart
toggling.

Fixes: 02b332a06397e ("usb: typec: maxim_contaminant: Implement check_contaminant callback")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Amit Sunil Dhamne &lt;amitsd@google.com&gt;
Reviewed-by: Badhri Jagan Sridharan &lt;badhri@google.com&gt;
Link: https://lore.kernel.org/r/20250815-fix-upstream-contaminant-v2-2-6c8d6c3adafb@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: maxim_contaminant: disable low power mode when reading comparator values</title>
<updated>2025-08-17T10:14:50Z</updated>
<author>
<name>Amit Sunil Dhamne</name>
<email>amitsd@google.com</email>
</author>
<published>2025-08-15T18:31:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cabb6c5f4d9e7f49bdf8c0a13c74bd93ee35f45a'/>
<id>urn:sha1:cabb6c5f4d9e7f49bdf8c0a13c74bd93ee35f45a</id>
<content type='text'>
Low power mode is enabled when reading CC resistance as part of
`max_contaminant_read_resistance_kohm()` and left in that state.
However, it's supposed to work with 1uA current source. To read CC
comparator values current source is changed to 80uA. This causes a storm
of CC interrupts as it (falsely) detects a potential contaminant. To
prevent this, disable low power mode current sourcing before reading
comparator values.

Fixes: 02b332a06397 ("usb: typec: maxim_contaminant: Implement check_contaminant callback")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Amit Sunil Dhamne &lt;amitsd@google.com&gt;
Reviewed-by: Badhri Jagan Sridharan &lt;badhri@google.com&gt;
Rule: add
Link: https://lore.kernel.org/stable/20250814-fix-upstream-contaminant-v1-1-801ce8089031%40google.com
Link: https://lore.kernel.org/r/20250815-fix-upstream-contaminant-v2-1-6c8d6c3adafb@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: ucsi: Update power_supply on power role change</title>
<updated>2025-07-21T14:33:23Z</updated>
<author>
<name>Myrrh Periwinkle</name>
<email>myrrhperiwinkle@qtmlabs.xyz</email>
</author>
<published>2025-07-21T06:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7616f006db07017ef5d4ae410fca99279aaca7aa'/>
<id>urn:sha1:7616f006db07017ef5d4ae410fca99279aaca7aa</id>
<content type='text'>
The current power direction of an USB-C port also influences the
power_supply's online status, so a power role change should also update
the power_supply.

Fixes an issue on some systems where plugging in a normal USB device in
for the first time after a reboot will cause upower to erroneously
consider the system to be connected to AC power.

Cc: stable &lt;stable@kernel.org&gt;
Fixes: 0e6371fbfba3 ("usb: typec: ucsi: Report power supply changes")
Signed-off-by: Myrrh Periwinkle &lt;myrrhperiwinkle@qtmlabs.xyz&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250721-fix-ucsi-pwr-dir-notify-v1-1-e53d5340cb38@qtmlabs.xyz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: ucsi: psy: Set current max to 100mA for BC 1.2 and Default</title>
<updated>2025-07-21T14:33:06Z</updated>
<author>
<name>Benson Leung</name>
<email>bleung@chromium.org</email>
</author>
<published>2025-07-17T20:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af833e7f7db3cf4c82f063668e1b52297a30ec18'/>
<id>urn:sha1:af833e7f7db3cf4c82f063668e1b52297a30ec18</id>
<content type='text'>
ucsi_psy_get_current_max would return 0mA as the maximum current if
UCSI detected a BC or a Default USB Power sporce.

The comment in this function is true that we can't tell the difference
between DCP/CDP or SDP chargers, but we can guarantee that at least 1-unit
of USB 1.1/2.0 power is available, which is 100mA, which is a better
fallback value than 0, which causes some userspaces, including the ChromeOS
power manager, to regard this as a power source that is not providing
any power.

In reality, 100mA is guaranteed from all sources in these classes.

Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
Reviewed-by: Jameson Thies &lt;jthies@google.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Link: https://lore.kernel.org/r/20250717200805.3710473-1-bleung@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: fusb302: cache PD RX state</title>
<updated>2025-07-21T14:32:49Z</updated>
<author>
<name>Sebastian Reichel</name>
<email>sebastian.reichel@collabora.com</email>
</author>
<published>2025-07-04T17:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e61f6ab08786d66a11cfc51e13d6f08a6b06c56'/>
<id>urn:sha1:1e61f6ab08786d66a11cfc51e13d6f08a6b06c56</id>
<content type='text'>
This patch fixes a race condition communication error, which ends up in
PD hard resets when losing the race. Some systems, like the Radxa ROCK
5B are powered through USB-C without any backup power source and use a
FUSB302 chip to do the PD negotiation. This means it is quite important
to avoid hard resets, since that effectively kills the system's
power-supply.

I've found the following race condition while debugging unplanned power
loss during booting the board every now and then:

1. lots of TCPM/FUSB302/PD initialization stuff
2. TCPM ends up in SNK_WAIT_CAPABILITIES (tcpm_set_pd_rx is enabled here)
3. the remote PD source does not send anything, so TCPM does a SOFT RESET
4. TCPM ends up in SNK_WAIT_CAPABILITIES for the second time
   (tcpm_set_pd_rx is enabled again, even though it is still on)

At this point I've seen broken CRC good messages being send by the
FUSB302 with a logic analyzer sniffing the CC lines. Also it looks like
messages are being lost and things generally going haywire with one of
the two sides doing a hard reset once a broken CRC good message was send
to the bus.

I think the system is running into a race condition, that the FIFOs are
being cleared and/or the automatic good CRC message generation flag is
being updated while a message is already arriving.

Let's avoid this by caching the PD RX enabled state, as we have already
processed anything in the FIFOs and are in a good state. As a side
effect that this also optimizes I2C bus usage :)

As far as I can tell the problem theoretically also exists when TCPM
enters SNK_WAIT_CAPABILITIES the first time, but I believe this is less
critical for the following reason:

On devices like the ROCK 5B, which are powered through a TCPM backed
USB-C port, the bootloader must have done some prior PD communication
(initial communication must happen within 5 seconds after plugging the
USB-C plug). This means the first time the kernel TCPM state machine
reaches SNK_WAIT_CAPABILITIES, the remote side is not sending messages
actively. On other devices a hard reset simply adds some extra delay and
things should be good afterwards.

Fixes: c034a43e72dda ("staging: typec: Fairchild FUSB302 Type-c chip driver")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250704-fusb302-race-condition-fix-v1-1-239012c0e27a@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: ucsi: yoga-c630: add DRM dependency</title>
<updated>2025-07-21T14:32:34Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2025-07-17T13:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a33665facf792de619e451bdbf66e86b9c6763bc'/>
<id>urn:sha1:a33665facf792de619e451bdbf66e86b9c6763bc</id>
<content type='text'>
Selecting DRM_AUX_HPD_BRIDGE is not possible from a built-in driver when
CONFIG_DRM=m:

WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE
  Depends on [m]: HAS_IOMEM [=y] &amp;&amp; DRM [=m] &amp;&amp; DRM_BRIDGE [=y] &amp;&amp; OF [=y]
  Selected by [y]:
  - UCSI_LENOVO_YOGA_C630 [=y] &amp;&amp; USB_SUPPORT [=y] &amp;&amp; TYPEC [=y] &amp;&amp; TYPEC_UCSI [=y] &amp;&amp; EC_LENOVO_YOGA_C630 [=y] &amp;&amp; DRM_BRIDGE [=y] &amp;&amp; OF [=y]
arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/aux-hpd-bridge.o: in function `drm_aux_hpd_bridge_notify':
aux-hpd-bridge.c:(.text.drm_aux_hpd_bridge_notify+0x28): undefined reference to `drm_bridge_hpd_notify'
arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/aux-hpd-bridge.o: in function `drm_aux_hpd_bridge_probe':
aux-hpd-bridge.c:(.text.drm_aux_hpd_bridge_probe+0x20): undefined reference to `__devm_drm_bridge_alloc'

Add a dependency to force UCSI_LENOVO_YOGA_C630 to be a loadable module as
well in this configuration.

Fixes: eb90d36bfa06 ("usb: typec: ucsi: yoga-c630: register DRM HPD bridge")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250717133045.991254-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: ucsi: Add poll_cci operation to cros_ec_ucsi</title>
<updated>2025-07-15T17:50:01Z</updated>
<author>
<name>Jameson Thies</name>
<email>jthies@google.com</email>
</author>
<published>2025-07-11T20:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=300386d117a98961fc1d612d1f1a61997d731b8a'/>
<id>urn:sha1:300386d117a98961fc1d612d1f1a61997d731b8a</id>
<content type='text'>
cros_ec_ucsi fails to allocate a UCSI instance in it's probe function
because it does not define all operations checked by ucsi_create.
Update cros_ec_ucsi operations to use the same function for read_cci
and poll_cci.

Signed-off-by: Jameson Thies &lt;jthies@google.com&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Link: https://lore.kernel.org/r/20250711202033.2201305-1-jthies@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: tcpm/tcpci_maxim: enable PROBE_PREFER_ASYNCHRONOUS</title>
<updated>2025-07-15T17:49:57Z</updated>
<author>
<name>André Draszik</name>
<email>andre.draszik@linaro.org</email>
</author>
<published>2025-07-07T10:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a0ca581402b40f3f13a1b8fc96ae5ab1384a041'/>
<id>urn:sha1:8a0ca581402b40f3f13a1b8fc96ae5ab1384a041</id>
<content type='text'>
This driver works fine with asynchronous probe.

Signed-off-by: André Draszik &lt;andre.draszik@linaro.org&gt;
Reviewed-by: Badhri Jagan Sridharan &lt;badhri@google.com&gt;
Link: https://lore.kernel.org/r/20250707-max77759-irq-wake-v1-3-d367f633e4bc@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
