Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5990606ybi; Wed, 29 May 2019 00:47:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyP23vKNWZxpB3xou+cxoL/DovZYnfxODfmpLYyPKsbDjMH4p3tfFLlEDpR+FcgjJUd+cpC X-Received: by 2002:a62:5486:: with SMTP id i128mr52880971pfb.156.1559116052292; Wed, 29 May 2019 00:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559116052; cv=none; d=google.com; s=arc-20160816; b=Jb7e2rPmqjkepKMl781bz2fAOuKWN5c35SIFxNnynfs8fP2axWf1xZ39yTUeeB6PXz h99Y2GQa8nyEoHhlKXPoLwHDYL/jrDimEYbEL82XPhdGtA781LHDy6L+A4LYcSBRzNXK Z4jEmXLzKFPklsCqLD2Jow3l0oyhCLus0HA0ojTA0+bdJ2WIqRp4XsebZOPvEmPbDcIN f3LQg5xN4VQhN54rifXSWJDca72tYP7j7ga3T1zXxye2sZrBlFvKBqPVLeQ5abqYMXMj /uPpXJnMQ7txAkTo5PLoMEUYECY23BobXTCNm66fN8j0vcF2dgJ0YcYboeAKHwND2pBt VKLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=CuDEdEeujm8AotqAd061AgTYzF6Vzjsf+OvBU4gMzUU=; b=Eow/X6vM8f2JMBK6bR4HB3JlZwnu3QSzOTOyzS2+haZHbz5NUFZzxLM+SXUi40Iv7j 0YReuY/OGMR65jO9vNVMRE+fpushA9m+Ci2its7tiA2xVZx8smzdqFQUgkl6IeYEvi5A qIxukHvs1G0FJKbZ2iErP6NP/ZaNpG+Qj3mwNxwJF1q1mO0CHfFwDOnv/21Lb4Vttrm/ yrLiGckW78iCLptPbEPK2Az3+/wrYjqcKDMs1dEmvClg0KQwV1wbC+9V+IBmxzX3msmw ooguuxtR3HQsevBmuRF+5PzqQ+w16obJnOSE6j9MJ5n03XUb3dXRCra2lfnUDWHALCWU VmGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si16896094pga.576.2019.05.29.00.47.17; Wed, 29 May 2019 00:47:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbfE2HoX (ORCPT + 99 others); Wed, 29 May 2019 03:44:23 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:21768 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726102AbfE2HoR (ORCPT ); Wed, 29 May 2019 03:44:17 -0400 X-UUID: d237d60669ce4ec1af933cfac3fb09a2-20190529 X-UUID: d237d60669ce4ec1af933cfac3fb09a2-20190529 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1371895552; Wed, 29 May 2019 15:44:11 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 29 May 2019 15:44:10 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 29 May 2019 15:44:07 +0800 From: Chunfeng Yun To: Rob Herring , Greg Kroah-Hartman , Heikki Krogerus CC: Mark Rutland , Chunfeng Yun , Matthias Brugger , Adam Thomson , Li Jun , Badhri Jagan Sridharan , Hans de Goede , Andy Shevchenko , Min Guo , , , , , , Biju Das , Linus Walleij , Yu Chen Subject: [PATCH v6 03/10] dt-bindings: usb: add binding for Type-B GPIO connector driver Date: Wed, 29 May 2019 15:43:41 +0800 Message-ID: <1559115828-19146-4-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> References: <1559115828-19146-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 --- .../bindings/usb/typeb-conn-gpio.txt | 30 +++++++++++++++++++ 1 file changed, 30 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..5be443a16c6b --- /dev/null +++ b/Documentation/devicetree/bindings/usb/typeb-conn-gpio.txt @@ -0,0 +1,30 @@ +USB Type-B GPIO Connector + +This is typically used to switch dual role mode from the USB ID pin connected +to an input GPIO pin. + +Required properties: +- compatible : should include "linux,typeb-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,typeb-conn-gpio", "usb-b-connector"; + label = "micro-USB"; + type = "micro"; + id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; + vbus-supply = <&usb_p0_vbus>; + }; +}; -- 2.21.0