1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00
Neil Armstrong bd8c3ce6d7 dt-bindings: usb: switch: split out ports definition
The ports definition currently defined in the usb-switch.yaml
fits standards devices which are either recipient of altmode
muxing and orientation switching events or an element of the
USB Super Speed data lanes.

This doesn't necessarely fit combo PHYs like the Qualcomm
USB3/DP Combo which has a different ports representation.

Move the ports definition to a separate usb-switch-ports.yaml
and reference it next to the usb-switch.yaml, except for
the Qualcomm USB3/DP Combo PHY bindings.

Reported-by: Rob Herring <robh@kernel.org>
Closes: https://lore.kernel.org/all/175462129176.394940.16810637795278334342.robh@kernel.org/
Fixes: 3bad7fe22796 ("dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-13 09:37:28 +02:00

117 lines
2.6 KiB
YAML

# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO-based SBU mux
maintainers:
- Bjorn Andersson <andersson@kernel.org>
description:
In USB Type-C applications the SBU lines needs to be connected, disconnected
and swapped depending on the altmode and orientation. This binding describes
a family of hardware solutions which switches between these modes using GPIO
signals.
properties:
compatible:
items:
- enum:
- nxp,cbdtu02043
- onnn,fsusb42
- onnn,fsusb43l10x
- pericom,pi3usb102
- ti,tmuxhs4212
- const: gpio-sbu-mux
enable-gpios:
description: Switch enable GPIO
select-gpios:
description: Orientation select
vcc-supply:
description: power supply
mode-switch: true
orientation-switch: true
port:
$ref: /schemas/graph.yaml#/properties/port
description:
A port node to link the SBU mux to a TypeC controller for the purpose of
handling altmode muxing and orientation switching.
required:
- compatible
- select-gpios
- orientation-switch
- port
allOf:
- $ref: usb-switch.yaml#
- $ref: usb-switch-ports.yaml#
- if:
required:
- mode-switch
then:
required:
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
tcpm {
connector {
compatible = "usb-c-connector";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
tcpm_hs_out: endpoint {
remote-endpoint = <&usb_hs_phy_in>;
};
};
port@1 {
reg = <1>;
tcpm_ss_out: endpoint {
remote-endpoint = <&usb_ss_phy_in>;
};
};
port@2 {
reg = <2>;
tcpm_sbu_out: endpoint {
remote-endpoint = <&sbu_mux_in>;
};
};
};
};
};
sbu-mux {
compatible = "pericom,pi3usb102", "gpio-sbu-mux";
enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
mode-switch;
orientation-switch;
port {
sbu_mux_in: endpoint {
remote-endpoint = <&tcpm_sbu_out>;
};
};
};
...