[PATCH 05/16] dt-bindings: usb: add FUSB340 switch binding
Fabrice Gasnier <[email protected]>
| Newsgroups | org.infradead.lists.linux-phy,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <20260821-ucpd-host-fusb340-v7-2-rfc-v1-5-c5e27cbc0795@foss.st.com> |
Document the ON Semiconductor FUSB340 SuperSpeed switch as a USB switch binding with enable-gpios and select-gpios controls. The switch can be used in Type-C applications where a reversible cable requires a switch. Assisted-by: GitHub-Copilot:GPT-5.4-mini Signed-off-by: Fabrice Gasnier <[email protected]> --- .../devicetree/bindings/usb/onnn,fusb340.yaml | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/onnn,fusb340.yaml b/Documentation/devicetree/bindings/usb/onnn,fusb340.yaml new file mode 100644 index 000000000000..b1991bd465ad --- /dev/null +++ b/Documentation/devicetree/bindings/usb/onnn,fusb340.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/onnn,fusb340.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ON Semiconductor FUSB340 SuperSpeed switch + +maintainers: + - Fabrice Gasnier <[email protected]> + +description: + The FUSB340 is a 2:1 USB 3.1 SuperSpeed data switch with enable and select + GPIO control signals. The switch can be used in Type-C applications where a + reversible cable requires a switch. + +properties: + compatible: + const: onnn,fusb340 + + enable-gpios: + description: Switch enable GPIO + + select-gpios: + description: Switch path select GPIO + + mode-switch: true + orientation-switch: true + +required: + - compatible + - enable-gpios + - select-gpios + - mode-switch + - orientation-switch + +allOf: + - $ref: usb-switch.yaml# + - $ref: usb-switch-ports.yaml# + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + usb-switch { + compatible = "onnn,fusb340"; + enable-gpios = <&gpioh 2 GPIO_ACTIVE_LOW>; + select-gpios = <&gpioh 3 GPIO_ACTIVE_HIGH>; + mode-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_con_ss: endpoint { + remote-endpoint = <&typec_con_ss>; + }; + }; + + port@1 { + reg = <1>; + usb_phy_ss: endpoint { + remote-endpoint = <&usb_phy_ss>; + }; + }; + }; + }; +... -- 2.43.0 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy