[PATCH v3 0/2] usb: gpio-sbu-mux: add FUSB340 and enable option for orientation

Fabrice Gasnier posted 2 patches 1 month ago
Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml |  1 +
drivers/usb/typec/mux/gpio-sbu-mux.c                    | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
[PATCH v3 0/2] usb: gpio-sbu-mux: add FUSB340 and enable option for orientation
Posted by Fabrice Gasnier 1 month ago
Add a new compatible for FUSB340. Also manage the enable GPIO, when used as
orientation-switch only.
It is used on STM32MP25 DK boards, as orientation-switch only for
USB SuperSpeed lines on the Type-C connector, the enable GPIO being
connected to the SoC.

- - - - SoC - - - - - - - - - - board - - - - -
                        |                 USB-C
+------+  +----------+  |                   +-+
|      |--|  USB2PHY |<-----------------HS->|*|
|      |--|    HS    |<-----------------HS->|*|
|      |  +----------+  |                   | |
|      |                |    ________       | |
+ dwc3 |  +----------+  |   /        |<-SS->|*|
|      |  |          |<--->/         |<-SS->|*|
|      |--| ComboPHY |<--->  FUSB340 |      | |
|      |  |    SS    |  |  \  __     |<-SS->|*|
+------+  +----------+  |   \_en__sw_|<-SS->|*|
                        |     ^   ^         | |
          +----------+  |     |   |         ...
          [   GPIO   ]--------+   |
          [   GPIO   ]------------+
          +----------+  |
- - - - - - - - - - - - - - - - - - - - - - --

This is a subset of STM32MP25 Type-C support [1].

[1] https://lore.kernel.org/all/20260821-ucpd-host-fusb340-v7-2-rfc-v1-0-c5e27cbc0795@foss.st.com/

---
Changes in v3:
- Fix missed v2 update on probing mode-switch property.
- Link to v2: https://patch.msgid.link/20260826-usb-fusb340-v1-v2-0-994a03c9ae45@foss.st.com

Changes in v2:
- Added Conor's Acked-by
- Fix new driver issues introduced in v1 as reported by Sashiko, on
  a possible race during probe and a possible glitch upon enable.
- Link to v1: https://patch.msgid.link/20260825-usb-fusb340-v1-v1-0-2191179b0661@foss.st.com

To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Fabrice Gasnier (2):
      dt-bindings: usb: gpio-sbu-mux: Add compatible for FUSB340
      usb: typec: mux: gpio-sbu: enable when only used for orientation

 Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml |  1 +
 drivers/usb/typec/mux/gpio-sbu-mux.c                    | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f
change-id: 20260825-usb-fusb340-v1-f060a5f84d3c

Best regards,
--  
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Re: [PATCH v3 0/2] usb: gpio-sbu-mux: add FUSB340 and enable option for orientation
Posted by Greg Kroah-Hartman 3 weeks, 5 days ago
On Wed, Aug 26, 2026 at 02:16:34PM +0200, Fabrice Gasnier wrote:
> Add a new compatible for FUSB340. Also manage the enable GPIO, when used as
> orientation-switch only.
> It is used on STM32MP25 DK boards, as orientation-switch only for
> USB SuperSpeed lines on the Type-C connector, the enable GPIO being
> connected to the SoC.
> 
> - - - - SoC - - - - - - - - - - board - - - - -
>                         |                 USB-C
> +------+  +----------+  |                   +-+
> |      |--|  USB2PHY |<-----------------HS->|*|
> |      |--|    HS    |<-----------------HS->|*|
> |      |  +----------+  |                   | |
> |      |                |    ________       | |
> + dwc3 |  +----------+  |   /        |<-SS->|*|
> |      |  |          |<--->/         |<-SS->|*|
> |      |--| ComboPHY |<--->  FUSB340 |      | |
> |      |  |    SS    |  |  \  __     |<-SS->|*|
> +------+  +----------+  |   \_en__sw_|<-SS->|*|
>                         |     ^   ^         | |
>           +----------+  |     |   |         ...
>           [   GPIO   ]--------+   |
>           [   GPIO   ]------------+
>           +----------+  |
> - - - - - - - - - - - - - - - - - - - - - - --

Gotta love the ascii art.  Loved it so much, I forced it into the
changelog, can't let that go to waste!

thanks,

greg k-h