lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230119161132.GA1880784-robh@kernel.org>
Date:   Thu, 19 Jan 2023 10:11:32 -0600
From:   Rob Herring <robh@...nel.org>
To:     Bjorn Andersson <quic_bjorande@...cinc.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Bjorn Andersson <andersson@...nel.org>,
        linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: usb: Introduce GPIO-based SBU mux

On Wed, Jan 18, 2023 at 10:08:11AM -0800, Bjorn Andersson wrote:
> On Tue, Jan 17, 2023 at 11:56:57AM -0600, Rob Herring wrote:
> > On Thu, Jan 12, 2023 at 08:11:14PM -0800, Bjorn Andersson wrote:
> > > From: Bjorn Andersson <bjorn.andersson@...aro.org>
> > > 
> > > Introduce a binding for GPIO-based mux hardware used for connecting,
> > > disconnecting and switching orientation of the SBU lines in USB Type-C
> > > applications.
> > > 
> > > Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> > > Signed-off-by: Bjorn Andersson <quic_bjorande@...cinc.com>
> > > ---


> > > +    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>;
> > > +            };
> > 
> > Don't you need a connection to whatever drives SBU? Maybe your case is 
> > fixed because the phy does the DP/USB muxing? But the binding needs to 
> > support the worst case which I guess would be all the muxing/switching 
> > is done by separate board level components.
> > 
> 
> Perhaps I'm misunderstanding your request, but I think this is the worst
> case you're talking about.
> 
> &usb_ss_phy_in is a reference to the PHY, which does switching/muxing of
> the SuperSpeed lanes in the connector, but the PHY provides no control
> over the SBU signals.
> 
> So this sbu-mux is a separate component between the SBU-pads on the SoC
> and the usb-c-connector, referenced through he &sbu_mux_in reference.
> 
> 
> So upon e.g. a orientation switch, the typec_switch_set() call the tcpm
> implementation will request orientation switching from port@1 and port@2
> (no orientation-switch on port@...S pins).

'port@2' is supposed to define the connection to what controls SBU. The 
mux here switches the signals, but it doesn't control them. The mux 
should sit in the middle, but the graph terminates at the mux. You don't 
have a connection presumably because you know what the connection. 
Perhaps because there is only 1 connector and controller.

Suppose you have 2 connectors and 2 controllers which drive SBU 
signals. Also assume that the SBU signals are completely independent 
from what's driving the altmode SS signals. How would you describe that?

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ