From patchwork Wed Mar 11 19:14:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 190019 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 8F1D2C2BB1D for ; Wed, 11 Mar 2020 19:16:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7875C2074D for ; Wed, 11 Mar 2020 19:16:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m5JY+QA/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731017AbgCKTQQ (ORCPT ); Wed, 11 Mar 2020 15:16:16 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40866 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731179AbgCKTOx (ORCPT ); Wed, 11 Mar 2020 15:14:53 -0400 Received: by mail-wr1-f68.google.com with SMTP id p2so4118027wrw.7 for ; Wed, 11 Mar 2020 12:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vudtvgrawzh2cqBvZiaEVAxNMRavt8ab+X8qR17ohY0=; b=m5JY+QA/QUJA9VTYBe+0CbDg4XmYWs7WE/pYH56q5M0sVsOx8WSbjtjw6nEzvTDKPq H9GZyyKugZofXpVnusJymMXlS2mo+tVqc8AgeCmZi0edjd8NG/BXU+yrMPls8R0kTw9G gs1joCi63VOl6EfNNZXIugNXG7RkCXoxwa9LsPVWWEuu3f915knt0UEVUIndHkw2YXmr /2bci8jq+Bad5Iysp43W6297elcHRaucbhUPRF/kn/sfF/N0NmX0Dx5ZSNYvsBXvZJ4F 7HSRbdhWoBKahanX72G3WsBeGEWrRtVXufLXBm0BXGjrTgTw+92asGOzu+TuRy77EjGX ye1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vudtvgrawzh2cqBvZiaEVAxNMRavt8ab+X8qR17ohY0=; b=kcmgAGXirJLe58pdwZRVWsL2AVqlzleJC/WCU8WMYFbBeF0pktQ1aPBFidzplxgUaR iSFvITyHt+t5KCpLoODxbtUe59+lINzqq67YdtIg9KpiwNnf4SNrUC0MJZ9gBYPL7DpW G1+pWy0IubNDV1GIr6wNYWw7pQn/MU9Xov620jIwkjQJQfshPoE9jxpKpRHURQwNo8Sg iIDbIWtkmR9RhbBbnnrrDLDp1R4+IhDKe2vmqGwZWtz7mi4KigHorroS6EbQkOulhq9L opyca4+YPaaqRyYeac1RFErdbM2Y7LnauKqgrEQDnkSmuXZjGVw5erxeTovBSAgwG/PB EvOA== X-Gm-Message-State: ANhLgQ2V3PS99LHxFGLvUhbNXxHVAk7CKLXBCjyENJCGm/buN6bjYF+7 zVz2N25W9G4wUHTINMR9BttuNg== X-Google-Smtp-Source: ADFU+vu3rbsfGj5lv53zHTIxxCknP10LPZkBsCQj1xgQ/tIOnVushQXhnqSggkti1tXNRngLDmpjiQ== X-Received: by 2002:adf:d081:: with SMTP id y1mr5604944wrh.50.1583954090994; Wed, 11 Mar 2020 12:14:50 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id n24sm32958496wra.61.2020.03.11.12.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:14:50 -0700 (PDT) From: Bryan O'Donoghue To: balbi@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, jackp@codeaurora.org, robh@kernel.org, Bryan O'Donoghue , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH 2/7] dt-bindings: usb: dwc3: Add a gpio-usb-connector example Date: Wed, 11 Mar 2020 19:14:56 +0000 Message-Id: <20200311191501.8165-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200311191501.8165-1-bryan.odonoghue@linaro.org> References: <20200311191501.8165-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org A USB connector should be a child node of the USB controller connector/usb-connector.txt. This patch adds an example of how to do this to the dwc3 binding descriptions. It is necessary to declare a connector as a child-node of a USB controller for role-switching to work, so this example should be helpful to others implementing that. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Felipe Balbi Reviewed-by: Rob Herring Tested-by: Bjorn Andersson Signed-off-by: Bryan O'Donoghue --- Documentation/devicetree/bindings/usb/dwc3.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 66780a47ad85..4e1e4afccee6 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -121,4 +121,12 @@ dwc3@4a030000 { interrupts = <0 92 4> usb-phy = <&usb2_phy>, <&usb3,phy>; snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; + + usb_con: connector { + compatible = "gpio-usb-b-connector"; + id-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>; + vbus-supply = <&usb3_vbus_reg>; + pinctrl-names = "default"; + pinctrl-0 = <&usb3_id_pin>, <&usb3_vbus_pin>; + }; };