From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 876D5C7EE21 for ; Thu, 4 May 2023 21:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=thYk9XdoOI+2UlDYshmH/kXIMErSN35SnPfUK/RqXnk=; b=FiO8KO7k1YPECI h6PTJ5qlr9tXWUERUl5KVQuHljL3DIeOK0ILClMr8aEbiCfmXD4M6LBxF9yJNIg6JtatCxhyUWUXa n/TF6z7k+lTJR516QGyEzAgsPpuEllareSOLR6UVnMr+NDeuQjj53Y98ycfXAVSOki/Ew7ktZAF/d 0fbUpBDyzymY+OuQYH3T67+7YeVpOZQUmkOa4CgS4akSFGFbR2bzMBnQ6c7VaTBhHvUKFeyQn6nyj B4WndZ2IQDHbxgRiR+x7j/u/XUhHu51NKPV2rRspFXrNOXi1Y26ZyCmmey2o0yV8ZVKQ2ql2VRfLl XKw3V0wO0LJjJwu4qxFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pugnn-0097Kq-16; Thu, 04 May 2023 21:47:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pugnm-0097KM-04 for linux-arm-kernel@bombadil.infradead.org; Thu, 04 May 2023 21:47:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Pv7fLf4V+sKDgE/kCbqAdgUtPBkXqEj+NL6KuNPXfSs=; b=A7Wijlckay82v8S0zv5J27HjYD BW382KqPoR/XNZ2RXQAfWTj++vxig/NYj0LQM5lht1imfpCk53AhPBpw8oEAtnokj+PEKJigjFNr7 BLxoGJHJJWAG3GOiGgKfW6L7eKoOD997K8D9Mxl67QY1+ZrjH7ahBhIHmhOQquC8UVppwl5Bp8O2X XPvhc+eBj1OEnqEmVL8y5Ru8MDSr1nJiMjH4H87/DD8IPp2MuQLAWaa/eJLYJBEoB5v4EpYMCIP2u X7+3hHxkROfhEOObRFBWvUMtI3t2+M4WhZfKz8FHWc9e+yvdXXo48pKlqb0ifhLSEqGrJxFTooCM1 AnbtJg4A==; Received: from mail-ot1-f50.google.com ([209.85.210.50]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puevt-001p3v-2D for linux-arm-kernel@lists.infradead.org; Thu, 04 May 2023 19:48:12 +0000 Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6a5ebf9f432so681095a34.3 for ; Thu, 04 May 2023 12:48:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683229679; x=1685821679; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Pv7fLf4V+sKDgE/kCbqAdgUtPBkXqEj+NL6KuNPXfSs=; b=BgsanfRm3qu5O54nviDf1iqhcbXhVlLZhMde0FHhYSGN2vu1JCYtiwHSmSQw2shHif EvHjWgPRrve3tNjO53GUYHzGiBb+QaVVMaqcPWc1UFUZMdjmF5Z7BGPBt57NufiDkZhr l9RUnFQUGV5T0m/rGy194nEc60SDuzsuFLVvb1D7QnoqvuRsOdAciukDZuUHRpJMfbhM MS01ocHOSwngUxAFZwQygEackzeOAQJcAr06U88nab4gZWDD3qUh5v2ml4hcaZRs5Erx r+T0usOBQIbqz4/VoSrbj6vvN9Vy75k+rwWN+BhtJSDJjhv/vLIVG/fDkjqoYG4vZVar pm3A== X-Gm-Message-State: AC+VfDwueEpECp0yghaoe44m/042AGjFVmvZvtMPqN/DyYbUR5hQpOIc /vO9UsuY0QZOm3yWpwIprQ== X-Google-Smtp-Source: ACHHUZ72vbcpe22oJI/K+vN20yfCQvQRKWVO9WlHefU9HaxUqx5JpbVbj3WoW+kfAfWbQu0/ymw7+A== X-Received: by 2002:a05:6808:3406:b0:38b:7184:f330 with SMTP id by6-20020a056808340600b0038b7184f330mr2137118oib.38.1683229679474; Thu, 04 May 2023 12:47:59 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id d13-20020a05680808ed00b003895430852dsm1944358oic.54.2023.05.04.12.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 12:47:58 -0700 (PDT) Received: (nullmailer pid 155968 invoked by uid 1000); Thu, 04 May 2023 19:47:57 -0000 Date: Thu, 4 May 2023 14:47:57 -0500 From: Rob Herring To: Marco Felsch Cc: andreas@fatal.se, jun.li@nxp.com, Greg Kroah-Hartman , Krzysztof Kozlowski , Bjorn Andersson , Heikki Krogerus , Guenter Roeck , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/4] dt-bindings: usb: gpio-sbu-mux: add support for ss-data lanes mux Message-ID: <20230504194757.GA145231-robh@kernel.org> References: <20230504-b4-v6-3-topic-boards-imx8mp-evk-dual-role-usb-v2-0-3889b1b2050c@pengutronix.de> <20230504-b4-v6-3-topic-boards-imx8mp-evk-dual-role-usb-v2-1-3889b1b2050c@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230504-b4-v6-3-topic-boards-imx8mp-evk-dual-role-usb-v2-1-3889b1b2050c@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230504_204807_531813_66745040 X-CRM114-Status: GOOD ( 20.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 04, 2023 at 03:46:50PM +0200, Marco Felsch wrote: > This adds the support for GPIO based USB-C SS data lane muxing. > > Signed-off-by: Marco Felsch > --- > .../devicetree/bindings/usb/gpio-sbu-mux.yaml | 82 +++++++++++++++++++--- > 1 file changed, 71 insertions(+), 11 deletions(-) > > diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml > index bf4b1d016e1f..796f3283ac02 100644 > --- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml > +++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml > @@ -4,24 +4,26 @@ > $id: "http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#" > $schema: "http://devicetree.org/meta-schemas/core.yaml#" > > -title: GPIO-based SBU mux > +title: GPIO-based SS/SBU mux > > maintainers: > - Bjorn Andersson > > 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. > + In USB Type-C applications the SS/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. Consider whether the mux-control binding would work for this purpose. Then what controls the muxing can be anything. > > properties: > compatible: > - items: > - - enum: > - - onnn,fsusb43l10x > - - pericom,pi3usb102 > - - const: gpio-sbu-mux > + oneOf: > + - items: > + - enum: > + - onnn,fsusb43l10x > + - pericom,pi3usb102 > + - const: gpio-sbu-mux > + - const: gpio-ss-mux > > enable-gpios: > description: Switch enable GPIO > @@ -50,10 +52,18 @@ required: > - compatible > - enable-gpios > - select-gpios > - - mode-switch > - orientation-switch > - port > > +if: > + properties: > + compatible: > + contains: > + const: gpio-sbu-mux > +then: > + required: > + - mode-switch > + > additionalProperties: false > > examples: > @@ -107,4 +117,54 @@ examples: > }; > }; > }; > + > + - | > + #include > + > + 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_ss_mux_out: endpoint { > + remote-endpoint = <&ss_mux_in>; > + }; > + }; port@2 already has a defined use for SBU signals. You can't use it. port@1 corresponds to the SS signals. > + }; > + }; > + }; > + > + usb-ss-mux { > + compatible = "gpio-ss-mux"; > + > + enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; > + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; > + > + orientation-switch; > + > + port { This is a mux device. It needs an output port and N input ports. Please present a complete picture of your USB-C related h/w. It's hard to review with just 'I have a GPIO controlling the SS muxing'. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel