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=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 4F6C7C43219 for ; Sun, 28 Apr 2019 01:51:24 +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 1C3B92087E for ; Sun, 28 Apr 2019 01:51:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ONE6CJ00" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C3B92087E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com 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:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uvfLbITa2+IAA1PLGoQJ5m9HuBhJiUU3+eDDiEbOnpk=; b=ONE6CJ00EFuJXR 4Xwq5pRPOHjsKYAFOPH5jp+ljzRCkALLegso89OtXlp4RdFwc+/lxXcZ91JAuc4iaYsFNN4DSMkud /MPuHq7/EhLqQuemXdBnBhZC4QvgzRCmg9RPTQTs5wbSqkeJP8qE4jkU3qdbOx9/mAfffA1KwOH1w lZwoQu3oyDX4fgG48YZe0j3xzGjcQAXj/BfwNOzgMgt0vMZpF6oGF/SdAXwD786xYQycgZX/UBIuk oXayQsmPWh2lR+xsWaMLCJUZxPXivD10nlSQ5E/JitWRAAP8UL/0uCm0RojFua3JKwKsjSwdOPG3P PVWYQORKhfLEEeAMAxRg==; 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 1hKYyJ-0001PM-8p; Sun, 28 Apr 2019 01:51:15 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hKYyF-0001Os-S7; Sun, 28 Apr 2019 01:51:13 +0000 X-UUID: 7e042395ef9b439f929ab05fc7ae5ff2-20190427 X-UUID: 7e042395ef9b439f929ab05fc7ae5ff2-20190427 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1965872067; Sat, 27 Apr 2019 17:51:02 -0800 Received: from MTKMBS31N2.mediatek.inc (172.27.4.87) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 27 Apr 2019 18:51:01 -0700 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 28 Apr 2019 09:50:58 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sun, 28 Apr 2019 09:50:57 +0800 Message-ID: <1556416257.10179.210.camel@mhfsdcap03> Subject: Re: [PATCH v4 2/6] dt-bindings: usb: add binding for Type-B GPIO connector driver From: Chunfeng Yun To: Rob Herring Date: Sun, 28 Apr 2019 09:50:57 +0800 In-Reply-To: <20190426204537.GA15074@bogus> References: <1556261237-13823-1-git-send-email-chunfeng.yun@mediatek.com> <1556261237-13823-3-git-send-email-chunfeng.yun@mediatek.com> <20190426204537.GA15074@bogus> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190427_185111_909835_BDDCBF2C X-CRM114-Status: GOOD ( 21.19 ) 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, 2019-04-26 at 15:45 -0500, Rob Herring wrote: > 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. Got it. > > > + > > +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. Ok, will fix it. Thanks a lot. > > > + 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