From patchwork Wed Mar 6 21:24:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10841803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F29E1390 for ; Wed, 6 Mar 2019 21:25:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D6E92DB8E for ; Wed, 6 Mar 2019 21:25:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 508DE2DF48; Wed, 6 Mar 2019 21:25:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D50FD2DB8E for ; Wed, 6 Mar 2019 21:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbfCFVZB (ORCPT ); Wed, 6 Mar 2019 16:25:01 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36912 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfCFVZB (ORCPT ); Wed, 6 Mar 2019 16:25:01 -0500 Received: by mail-wr1-f66.google.com with SMTP id w6so15060121wrs.4; Wed, 06 Mar 2019 13:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BedjtFQU/fr+TTy7+SIsqMM58N+2NlaN5QGB5Viy9yI=; b=OKvc3cDTykin5hm8pPx/HbHzDzm7RksnYTTWFLnVXIPDs6IKOB5VJw6bwadCffbeEd nhflNkSIXIBArPmm/Aougyu/iI5GhSrS1NC1HAAjaa9R7tY8Da4uFMZMBxAlnabb6m0m Bzqgr63xSkCEn+tMJubQvl8xz1V9MdSD1Cu+WZv6oJeC1r6JoJ9pc/6tNjoRKkEe6kIR xDCIAvT0canD3NwOo6a4j5v7ubG49HCrFUNRFQvUJHuWZLikn7LtfCqidt2gYySqEmOe YQEKWwFGuEfS2olEHGWGHTgot8BCjydtlHpCsxMZzYS7c8ao/g8u5j7qUl4xl9ofPSxI 2Mmg== 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:mime-version :content-transfer-encoding; bh=BedjtFQU/fr+TTy7+SIsqMM58N+2NlaN5QGB5Viy9yI=; b=aSusjB1g+b2s7dJ0xil9rWg7/8WujJPf7RtQxYpOIoWW2HiC9EPzp7HSPzugta6cRO fJAsNLbWmRGA4UrNHv5KlgCSq2kOfZkQxrAuEmr6MHmjj9HEZYj2ijsiX59qtZ/evSiO Te24+iLGgp5UI98aRykw9wzUa/uAFJhYtjT0O++DMRM9z3NgtQSC5co1dN9XrQwBZIco aH9nn+qQVxSY5MWZ3IFBF36pLjLKZ4yVm/HWKD9sykvmZ8FvIOdfDv69cpK5WiqaChmP 12QW5BEXAWcUhy1T4Fw+2aG5+LG1bTCW77cdACCGOmAn66k9kq5Z1Zp3xJleq4llvMkE qKUA== X-Gm-Message-State: APjAAAVNhpkiszIqkobvVxbEX+hyX2uz7YxHNQJsqwxm0y15vxCAsFeI 0k/H2OniZzq8GaTIUNce37Y= X-Google-Smtp-Source: APXvYqxr2W1IeK82jjf8wG/cS1b8SoRq60PuSlFuteJ9r7aQQ3GPwPacjKZ9ooiWbq+OCWKpO0a5LA== X-Received: by 2002:adf:8251:: with SMTP id 75mr4705634wrb.112.1551907498910; Wed, 06 Mar 2019 13:24:58 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7464E00D1A79B18B8800EE5.dip0.t-ipconnect.de. [2003:dc:d746:4e00:d1a7:9b18:b880:ee5]) by smtp.googlemail.com with ESMTPSA id g10sm2940174wrq.61.2019.03.06.13.24.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 13:24:58 -0800 (PST) From: Martin Blumenstingl To: hminas@synopsys.com, gregkh@linuxfoundation.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, amelie.delaunay@st.com, felipe.balbi@linux.intel.com, Martin Blumenstingl Subject: [PATCH] dt-bindings: usb: dwc2: document the vbus-supply property Date: Wed, 6 Mar 2019 22:24:31 +0100 Message-Id: <20190306212431.5779-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Various boards have an external VBUS supply regulator. This regulator depends on the current mode of the controller which is defined as: - dr_mode set to either "host" or "peripheral" (fixed value) - dr_mode set to "otg", based on the OTG status the dwc2 controller internally switches between "host" and "peripheral" mode (selection happens at runtime) Based on the current mode the regulator has to be enabled or disabled: - host: provide power to the connected USB device, thus the regulator has to be enabled - peripheral: the host device to which the controller is connected provides power, thus the regulator has to be disabled Add the dt-bindings documentation for this property so .dts authors know that this property exists and how it behaves. Fixes: 531ef5ebea9639 ("usb: dwc2: add support for host mode external vbus supply") Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/dwc2.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index 6dc3c4a34483..1e8a775a0e72 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -31,6 +31,10 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties Optional properties: - phys: phy provider specifier - phy-names: shall be "usb2-phy" +- vbus-supply: reference to the VBUS regulator. Depending on the current mode + this is enabled (in "host" mode") or disabled (in "peripheral" mode). The + regulator is updated if the controller is configured in "otg" mode and the + status changes between "host" and "peripheral". Refer to phy/phy-bindings.txt for generic phy consumer properties - dr_mode: shall be one of "host", "peripheral" and "otg" Refer to usb/generic.txt