From patchwork Wed Apr 1 07:23:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Baldyga X-Patchwork-Id: 457113 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DE54E140083 for ; Wed, 1 Apr 2015 18:25:44 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbbDAHYy (ORCPT ); Wed, 1 Apr 2015 03:24:54 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:19884 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbbDAHYB (ORCPT ); Wed, 1 Apr 2015 03:24:01 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NM4004TW9W07T30@mailout4.samsung.com>; Wed, 01 Apr 2015 16:24:00 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-ab-551b9d0f6e4f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F7.5A.20081.F0D9B155; Wed, 1 Apr 2015 16:23:59 +0900 (KST) Received: from AMDC2122.DIGITAL.local ([106.120.53.17]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NM400MBK9V9J030@mmp2.samsung.com>; Wed, 01 Apr 2015 16:23:59 +0900 (KST) From: Robert Baldyga To: cw00.choi@samsung.com Cc: myungjoo.ham@samsung.com, rogerq@ti.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, m.szyprowski@samsung.com, Robert Baldyga Subject: [PATCH v2 4/4] Documentation: extcon: usb-gpio: update usb-gpio binding description Date: Wed, 01 Apr 2015 09:23:25 +0200 Message-id: <1427873005-24024-5-git-send-email-r.baldyga@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1427873005-24024-1-git-send-email-r.baldyga@samsung.com> References: <1427873005-24024-1-git-send-email-r.baldyga@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoC7/XOlQg8tHrC2uf3nOajH/yDlW i8u75rBZLFrWymyx9shddovbjSvYLB4c3slu0fNIy4HDo2/LKkaP4ze2M3l83iQXwBzFZZOS mpNZllqkb5fAlbFoeh9rwRTBik0nf7E1MP7j7WLk5JAQMJF4vugsG4QtJnHh3nogm4tDSGA6 o8TNzqdQzk9GiaMdR8Cq2AR0JLZ8n8DYxcjBISIgKdGyzwykhlngGKPEm9/PWUDiwgJxEsv6 RUDKWQRUJW4tPMQMYvMKuEpc7/3ADLFMTuLkscmsIOWcAm4S3xvVQcJCQCXTZ6xgnMDIu4CR YRWjaGpBckFxUnquoV5xYm5xaV66XnJ+7iZGcBg9k9rBuLLB4hCjAAejEg9vQ5R0qBBrYllx Ze4hRgkOZiUR3u1HpEKFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8yrZt4UICaQnlqRmp6YWpBbB ZJk4OKUaGD1eTqhVXL7YK13o/4zkvBcvkhJOz23VjjZ388r4frCzS1/wjrbxTPuPTskrTut2 ma2asdvkuWzshOn/jlRJxv6X0rlv/XC6yR990Tj3out9+asfzrG2t3AOrm3o/tO3/7yymukL M06nMjHTqpxtktv5WbiX6tVcZbML3a5rcWuFs5FI16NgJZbijERDLeai4kQAg0GLIR8CAAA= Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add information about VBUS pin detection support, 'debounce' property and some other details. Signed-off-by: Robert Baldyga Acked-by: Roger Quadros --- .../devicetree/bindings/extcon/extcon-usb-gpio.txt | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt index af0b903..7096f39 100644 --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt @@ -1,16 +1,40 @@ USB GPIO Extcon device -This is a virtual device used to generate USB cable states from the USB ID pin -connected to a GPIO pin. +This is a virtual device used to generate USB cable states from the USB +ID and VBUS signals connected to GPIO pins. + +The extcon cable states USB and USB_HOST are actually VBUS and !ID +pin states and do not indicate what mode the USB needs to operate in. +That decision is done by the USB stack. + +Some devices have only one of these GPIO pins, so we support cases when +only one of them is present. Hence properties 'id-gpio' and 'vbus-gpio' +are described as optional, but at least one of them has to be present +in extcon-usb-gpio node. + +In general we have three cases: +1. If VBUS and ID gpios are present we pass them as is + USB-HOST = !ID, USB = VBUS +2. If only VBUS gpio is present we assume that ID pin is always High. + USB-HOST = false, USB = VBUS. +3. If only ID pin is available we infer the VBUS pin states based on ID. + USB-HOST = !ID, USB = ID Required properties: - compatible: Should be "linux,extcon-usb-gpio" + +Optional properties - id-gpio: gpio for USB ID pin. See gpio binding. +- vbus-gpio: gpio for USB VBUS pin. See gpio binding. +- debounce: gpio debounce time in milliseconds (u32). + Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below: extcon_usb1 { compatible = "linux,extcon-usb-gpio"; id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>; + vbus-gpio = <&gpio6 2 GPIO_ACTIVE_HIGH>; + debounce = <25>; } &omap_dwc3_1 {