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_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 306F3C3A5A3 for ; Tue, 27 Aug 2019 18:32:07 +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 059432070B for ; Tue, 27 Aug 2019 18:32:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tABjQpMB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 059432070B 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=ehcXnDcHuHfSkD7zZtsIOxEp4e4XalMeYTgXy3s7HB0=; b=tABjQpMBfTLqEI BPXRPNbFZBN9P9NEkkYApqrSBWY8neIT0J6RPPEluOsn5uEcfXUCYFPNT2R5qYeFcR/+LuT6b4gLi FApLqUVxwb/7sDbDe+QpaO/jIRVQlMNX+8peUpd7+yK50mDVz6OU5IFe71tPHpXfzx5/1d2mTIiM7 1ZzfAmULdthLuaQ4ORFo8bS4E0dfrH0oxbDQEMvQKdRzE+/7f/NchYWoFChZinpHbQz1xB9iUtRPe ztRUB0Um4tylOdwJKuWEeEUhVD3mzX5Kc2Wqj3bk7z56foTvw4uKyIGMZa+vg2CKD66Ebxsvh+CFu RgXiATob3Sf4aOs93axw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i2gG8-0002SU-9r; Tue, 27 Aug 2019 18:32:00 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2gG5-0002S3-Ja; Tue, 27 Aug 2019 18:31:59 +0000 Received: by mail-ot1-f66.google.com with SMTP id e12so98180otp.10; Tue, 27 Aug 2019 11:31:57 -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=nh5JlXKDScp/6jdVD0lYiet/VZlxy5TKafXl/GE7L28=; b=GP1sLGqwJChFc8EfDmvAgQKEuPf/iAzEmlE3UEGn21LbM83Epx+j94aHYeDiZj5I34 7Zxt34vMDW6ms0TF/JpaV2GYggrVz7HHxWbioBNrfP4I6pY2SPx2id2pIScnOMBJY/my ZKQPA9YuIwM8kvW3EgdA637lyb4NUqiSyAXXaKNTIudmkKuQw8Lv9ofCFlvb+0m2nzhc rQfHWMrUcRGJdnHWkU5+7tWpLekr5N2R4twKlC+vZyUO3rKHeJ3qeElgkvknEDTb/xKN yxAnap9K7SNFs4bYIFrZvg0RzULjgTxK1ertzKZcRbnzaCb7Zkq0aAOJJZM9Nf2tUJ08 R3Ow== X-Gm-Message-State: APjAAAX0OmcOIP7oodcEvgSnz+afXaN2x9RveyG/uT4j3dIwC/IFMMXV vlkEm88z9diK9kYa0rtJ8A== X-Google-Smtp-Source: APXvYqwyILKBeRNQk+rBVcbEFALTsvo/l+G1oYafWQ6QxRePRSd/ebw3//wOjN0+4335ghUuXLcLYA== X-Received: by 2002:a9d:6b1a:: with SMTP id g26mr17166549otp.195.1566930716465; Tue, 27 Aug 2019 11:31:56 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id v24sm32104otj.78.2019.08.27.11.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2019 11:31:55 -0700 (PDT) Date: Tue, 27 Aug 2019 13:31:54 -0500 From: Rob Herring To: Chunfeng Yun Subject: Re: [PATCH next v10 03/11] dt-bindings: usb: add binding for USB GPIO based connection detection driver Message-ID: <20190827183154.GA10374@bogus> References: <1566547041-20804-1-git-send-email-chunfeng.yun@mediatek.com> <1566547041-20804-4-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1566547041-20804-4-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-20190827_113157_646367_EC4860DF X-CRM114-Status: GOOD ( 21.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 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 , Nagarjuna Kristam , 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, Aug 23, 2019 at 03:57: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, and also used to enable/disable device when the USB Vbus > pin is connected to an input GPIO. > > Signed-off-by: Chunfeng Yun > --- > v9~v10 no changes > > v8 changes: > 1. rename the title > 2. change the compatible as "linux,usb-conn-gpio" instead of > "linux,typeb-conn-gpio" I don't think that is an improvement. How about 'gpio-usb-b-connector' to be consistent. > > v7 changes: > 1. add description for device only mode > > v6 changes: > 1. remove status and port nodes in example > 2. make vbus-supply as optional property > > v5 changes: > 1. treat type-B connector as child device of USB controller's, but not > as a separate virtual device, suggested by Rob > 2. put connector's port node under connector node, suggested by Rob > > 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 > --- > .../devicetree/bindings/usb/usb-conn-gpio.txt | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/usb-conn-gpio.txt > > diff --git a/Documentation/devicetree/bindings/usb/usb-conn-gpio.txt b/Documentation/devicetree/bindings/usb/usb-conn-gpio.txt > new file mode 100644 > index 000000000000..d4d107fedc22 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/usb-conn-gpio.txt > @@ -0,0 +1,31 @@ > +USB GPIO Based Connection Detection > + > +This is typically used to switch dual role mode from the USB ID pin connected > +to an input GPIO, and also used to enable/disable device mode from the USB > +Vbus pin connected to an input GPIO. > + > +Required properties: > +- compatible : should include "linux,usb-conn-gpio" and "usb-b-connector". > +- id-gpios, vbus-gpios : input gpios, either one of them must be present, > + and both can be present as well. > + see connector/usb-connector.txt > + > +Optional properties: > +- vbus-supply : can be present if needed when supports dual role mode. > + see connector/usb-connector.txt > + > +- Sub-nodes: > + - port : can be present. > + see graph.txt > + > +Example: > + > +&mtu3 { > + connector { > + compatible = "linux,usb-conn-gpio", "usb-b-connector"; > + label = "micro-USB"; 'label' is for a human identifying a particular connector when there are multiple (of the same type). So not a great example here. > + type = "micro"; > + id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; > + vbus-supply = <&usb_p0_vbus>; > + }; > +}; > -- > 2.23.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel