GPIO-based SBU mux

Schema identifier ($id): "http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Bjorn Andersson <andersson@kernel.org>"

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 and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "nxp,cbdtu02043", "onnn,fsusb42", "onnn,fsusb43l10x", "pericom,pi3usb102", "ti,tmuxhs4212"

Item 2

Exact value (const): "gpio-sbu-mux"

enable-gpios — not listed as required here #

Switch enable GPIO

select-gpios — required here #

Orientation select

vcc-supply — not listed as required here #

power supply

mode-switch — not listed as required here #

true — No constraints added by this property rule.

orientation-switch — required here #

true — No constraints added by this property rule.

port — required here #

Shared schema rule ($ref): /schemas/graph.yaml#/properties/port

A port node to link the SBU mux to a TypeC controller for the purpose of handling altmode muxing and orientation switching.

Required in this object (required): "compatible", "select-gpios", "orientation-switch", "port"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): usb-switch.yaml#

Rule 2 #

Shared schema rule ($ref): usb-switch-ports.yaml#

Rule 3 #

Condition (if) #

Required in this object (required): "mode-switch"

When the condition matches (then) #

Required in this object (required): "enable-gpios"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (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>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page