From patchwork Thu Nov 3 15:26:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 80682 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp692129qge; Thu, 3 Nov 2016 08:26:31 -0700 (PDT) X-Received: by 10.98.15.5 with SMTP id x5mr17630919pfi.140.1478186791009; Thu, 03 Nov 2016 08:26:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si10210405pgk.101.2016.11.03.08.26.30; Thu, 03 Nov 2016 08:26:31 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.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 S1758194AbcKCP0Z (ORCPT + 27 others); Thu, 3 Nov 2016 11:26:25 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37536 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757869AbcKCP0U (ORCPT ); Thu, 3 Nov 2016 11:26:20 -0400 Received: by mail-wm0-f52.google.com with SMTP id t79so107953146wmt.0 for ; Thu, 03 Nov 2016 08:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1uDByYZ6OcS8/gNoLms75IBvVFXtS7BYirAZVWRNVrU=; b=hi+o4uG31357ju4NLcoS5bmKh0wox5Uul4WXnAt8NAyLyrFv/HluvMq+g51sVe1tWj qlcSk0H9ieN1THbCPLzRD85bL31xKKicNBpIkq6a5iZX8zEn1irWgZH/vuVr+oxs27rD ow3N5pgE+jlaZWdJQH8fJ1ycaKKazmk8R0b03T48Fq+/86K5GOSeHUbkK1In0MUrMLTC BebnY7foqxiQCI00py2LgsmNIKrZv9ZNS7iBgj8e8RE0UJPogsQSlDFXrPGZ+D99z/Mn 9WrXpYoKWMer6KGay2oLHLbnigJn8rj1vw74m9HpHj03jSVI+3A1VbzraOyKVpwzViL/ 7MKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1uDByYZ6OcS8/gNoLms75IBvVFXtS7BYirAZVWRNVrU=; b=Fc8c0Z3YBmYSkOjdhu/WX81kTz5bV2g50P2L4suJlHFVnrOS1nNiBVb+DoQaMb1Di5 BHWCp7Py8zCQqLMvuR/uHZ9pNTLexCjezse0aNcplSdjYDNTHAx+6OHC4pYGTqRz6IGT NoOYQzlavSJi+R6bF9b+IhQnBTyM6+7nHqp3FlftZjHPR8+5AZq2cJ1tmT/vAyUdttHJ 3fFfUahiubAZBzL2Ti0XRjYqxSdBhsgzgq7TjdnqSRQr1muSCZeYas3fXWGvljKjw6Ov N9JhQRAsoeynIbg839lanuQbhXn/Q2lo8PKWCcfD5tK4upkiI1ZJg43iDzjyZurA0jA0 WULw== X-Gm-Message-State: ABUngvfiXAPULzr9fQqoiLzV+LZNRZj2wyCSzYgPeMvOlLuY7VsWNLh7UgncWrIS31tdjlxU X-Received: by 10.194.9.230 with SMTP id d6mr7745941wjb.98.1478186773045; Thu, 03 Nov 2016 08:26:13 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id wh3sm9108948wjb.49.2016.11.03.08.26.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Nov 2016 08:26:12 -0700 (PDT) From: Alexandre Bailon To: david@lechnology.com, b-liu@ti.com, balbi@kernel.org Cc: kishon@ti.com, khilman@baylibre.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, nsekhar@ti.com, Alexandre Bailon Subject: [PATCH v3 3/5] dt/bindings: Add a new property to DA8xx USB PHY Date: Thu, 3 Nov 2016 16:26:03 +0100 Message-Id: <1478186765-19840-4-git-send-email-abailon@baylibre.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1478186765-19840-1-git-send-email-abailon@baylibre.com> References: <1478186765-19840-1-git-send-email-abailon@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The USB PHY is able to operate in OTG, host or peripheral. Some board may be wired to work act only as host or peripheral. In such case, the dr_mode property of controller must be set to host or peripheral. But doing that will also configure the PHY in host or peripheral mode whereas OTG is able to detect which role the USB controller should take. The PHY's host or peripheral mode are actually only useful when hardware doesn't allow OTG to detect it's role. Add the usb20_force_mode property to force the PHY to operate in host or peripheral mode. When usb20_force_mode is used, dr_mode should also be configured to host or peripheral. The controller uses dr_mode to configure itself, but the phy use it to get the mode to use to configure the PHY mode. Signed-off-by: Alexandre Bailon --- Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.3 diff --git a/Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt b/Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt index c26478b..9fc87fb 100644 --- a/Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt +++ b/Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt @@ -4,6 +4,11 @@ Required properties: - compatible: must be "ti,da830-usb-phy". - #phy-cells: must be 1. +Optional properties: +- usb20-force-mode: Force the phy to operate in same mode than the USB OTG controller. + It should only be defined if the hardware is not capable correctly + detect the role of USB by using VBUS and ID pin. + This device controls the PHY for both the USB 1.1 OHCI and USB 2.0 OTG controllers on DA8xx SoCs. Consumers of this device should use index 0 for the USB 2.0 phy device and index 1 for the USB 1.1 phy device.