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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6C68C43218 for ; Fri, 26 Apr 2019 20:45:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B3B8E2084F for ; Fri, 26 Apr 2019 20:45:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o9gjxElN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3B8E2084F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=D6BkkM4cDmm7TICRNr6jJqNHF3r0YEa6VTo4K728+eQ=; b=o9gjxElNCiNU8k K7RASols1E4St2PIXi49cTov+qNI6Y3bFjuzzTBt1RxIIw3LpB40tvHYUMRkUuvh8gb5o3iGFZZZ3 BnLuFPWHNUZqcbeNCu0ZAYE7JXXCew/wrAglbhfISKjYofZB00ejzH8kOY/jxuOfKGNVg24Xk/ri6 dkBhT58oJFLFtdkHk4SBaH3xW/P7d4pC181q9zJR6ihC7BN6f9EzLcgQhS9Hrnkdz/KtZxlWGO49h WCl9OXAk+kb/5M3D0p2p//0PCUQtIicMN/GL3eo2fHAMVt3Fn7E0hxWLrwronUZbFz2Tmn3p5HqAL YnAiyWZkS8J6jjs+Avhw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK7j6-0005CL-A6; Fri, 26 Apr 2019 20:45:44 +0000 Received: from mail-oi1-f196.google.com ([209.85.167.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK7j3-0005BU-3v; Fri, 26 Apr 2019 20:45:42 +0000 Received: by mail-oi1-f196.google.com with SMTP id t81so3974176oig.10; Fri, 26 Apr 2019 13:45:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LBK1qQiinkVtppuUn/MtZMeDjsphed7rjwWQBzqodsA=; b=bImaZQ7OrlfV/EDlv73JP0B5djEjJzhOjMbS0lsowcxVW0tpBcj2sJB6IERIo0J0Zh a3ceOFYawxwGTxyK7Y1ZiZYw7eNAwh9pqPbaByjGLB47Gcoma1Mw16H/cAiwnlCpSE8k kqYLpL+AcygcKlp/VZ0+fPv8iXq2bj8bEkILpTN71BWHP6E95Hdh/2kT6CeoZegIjnDR CZXFSdOqGUZCRx+gxT3as1U2+LXVEfr9sAfUFf2cFj8ok5kMMp134S2VIGi6cL641jRp Xf7M0isBo4OVw7v6w6v7KIVQpsnoRYjqSTa8xCUlIcA8HUsFjRB5EmL9sn48sSTIviAo QbWw== X-Gm-Message-State: APjAAAXfsmsUZFS1Fuf5gnzfrSAFnmZDNz/B5oilD68FrFs11MgbPYiZ QDZ4FfKJstreQ9tgKWW14Q== X-Google-Smtp-Source: APXvYqwawrECtPMKTCABj3IlM0ZD7s9DWDSE3GhnWkMdq0k8EUUCPGoxJ5SO8c8xOA/qIxjgtMhKvA== X-Received: by 2002:aca:d9c4:: with SMTP id q187mr8377682oig.91.1556311539434; Fri, 26 Apr 2019 13:45:39 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id f5sm1249855otp.16.2019.04.26.13.45.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 13:45:38 -0700 (PDT) Date: Fri, 26 Apr 2019 15:45:37 -0500 From: Rob Herring To: Chunfeng Yun Subject: Re: [PATCH v4 2/6] dt-bindings: usb: add binding for Type-B GPIO connector driver Message-ID: <20190426204537.GA15074@bogus> References: <1556261237-13823-1-git-send-email-chunfeng.yun@mediatek.com> <1556261237-13823-3-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1556261237-13823-3-git-send-email-chunfeng.yun@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_134541_159241_976E6609 X-CRM114-Status: GOOD ( 19.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Heikki Krogerus , Hans de Goede , Greg Kroah-Hartman , Linus Walleij , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Badhri Jagan Sridharan , Andy Shevchenko , linux-mediatek@lists.infradead.org, Min Guo , Matthias Brugger , Adam Thomson , linux-arm-kernel@lists.infradead.org, Li Jun Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 26, 2019 at 02:47:13PM +0800, Chunfeng Yun wrote: > It's used to support dual role switch via GPIO when use Type-B > receptacle, typically the USB ID pin is connected to an input > GPIO pin > > Signed-off-by: Chunfeng Yun > --- > v4 no changes > > v3 changes: > 1. treat type-B connector as a virtual device, but not child device of > USB controller's > > v2 changes: > 1. new patch to make binding clear suggested by Hans > --- > .../bindings/usb/typeb-conn-gpio.txt | 49 +++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/typeb-conn-gpio.txt > > diff --git a/Documentation/devicetree/bindings/usb/typeb-conn-gpio.txt b/Documentation/devicetree/bindings/usb/typeb-conn-gpio.txt > new file mode 100644 > index 000000000000..d2e1c4e01b6d > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/typeb-conn-gpio.txt > @@ -0,0 +1,49 @@ > +USB Type-B GPIO Connector > + > +This is a virtual device used to switch dual role mode from the USB ID pin > +connected to an input GPIO pin. > + > +Required properties: > +- compatible : Should be "linux,typeb-conn-gpio" There's no need for this virtual node. The USB host or device driver can instantiate a connector driver by walking the OF graph to the connector and creating a device. > + > +Sub-nodes: > +- connector : should be present. > + - compatible : should be "usb-b-connector". > + - id-gpios, vbus-gpios : either one of them must be present, > + and both can be present as well. > + - vbus-supply : can be present if needed when supports dual role mode. > + see connector/usb-connector.txt > + > +- port : should be present. > + see graph.txt > + > +Example: > + > +rsw_iddig: role_sw_iddig { > + compatible = "linux,typeb-conn-gpio"; > + status = "okay"; > + > + connector { > + compatible = "usb-b-connector"; > + label = "micro-USB"; > + type = "micro"; > + id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; > + vbus-supply = <&usb_p0_vbus>; > + }; > + > + port { Humm, same mistake as Hikey patches... This goes under the connector node as defined in the connector binding. > + bconn_ep: endpoint@0 { > + remote-endpoint = <&usb_role_sw>; > + }; > + }; > +}; > + > +&mtu3 { > + status = "okay"; > + > + port { > + usb_role_sw: endpoint@0 { > + remote-endpoint = <&bconn_ep>; > + }; > + }; > +}; > -- > 2.21.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel