From patchwork Thu Sep 28 13:07:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9976043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4C726037E for ; Thu, 28 Sep 2017 13:08:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B695F295B9 for ; Thu, 28 Sep 2017 13:08:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAC14295C5; Thu, 28 Sep 2017 13:08:28 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 2A50F295B9 for ; Thu, 28 Sep 2017 13:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753221AbdI1NHn (ORCPT ); Thu, 28 Sep 2017 09:07:43 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:56919 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbdI1NHi (ORCPT ); Thu, 28 Sep 2017 09:07:38 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20170928130736euoutp02c58800fe6b7124b2bda5363cfb586828~oiGg9VU5l0569405694euoutp02r; Thu, 28 Sep 2017 13:07:36 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170928130735eucas1p2b245bed82f56d5199a83c41a762af862~oiGgRJ8vS0947809478eucas1p2l; Thu, 28 Sep 2017 13:07:35 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id CA.F8.12743.714FCC95; Thu, 28 Sep 2017 14:07:35 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170928130735eucas1p1da4f062b6948350289bba9c8bc911dd7~oiGfimAgi0629906299eucas1p1Q; Thu, 28 Sep 2017 13:07:35 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-b9-59ccf417333d Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CF.AD.18832.714FCC95; Thu, 28 Sep 2017 14:07:35 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OWZ004HER4LMZ40@eusync2.samsung.com>; Thu, 28 Sep 2017 14:07:35 +0100 (BST) From: Andrzej Hajda To: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, Inki Dae , Rob Herring , Mark Rutland , Krzysztof Kozlowski , Chanwoo Choi , Archit Taneja , Laurent Pinchart , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org Subject: [RFC PATCH 1/4] dt-bindings: add bindings for USB physical connector Date: Thu, 28 Sep 2017 15:07:27 +0200 Message-id: <20170928130730.8747-2-a.hajda@samsung.com> X-Mailer: git-send-email 2.14.1 In-reply-to: <20170928130730.8747-1-a.hajda@samsung.com> X-Brightmail-Trac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/hGg2JWv79ksJt2fwGJx/vwGdovOiUvYLTY9vsZqcXnXHDaLGef3MVks WtbKbLH2yF12i6XXLzJZtO49wu4g4LFm3hpGj8t9vUwesztmsnpsWtXJ5nG/+ziTx+Yl9R59 W1YxenzeJBfAEcVlk5Kak1mWWqRvl8CVsWPdHPaCJomKqWeVGhhPC3cxcnJICJhInL52kg3C FpO4cG89kM3FISSwhFFi9+bpLCAJIYFGJonjvfkgNpuApsTfzTfBGkQEYiXenvrMDNLALHCB ReL3xJnsIAlhAV+Jues+MoPYLAKqEuuuN4EN4hUwl/ixeDYLxDZ5iXMPboPVcApYSGxZeIqp i5EDaJm5RMs11QmMvAsYGVYxiqSWFuem5xYb6hUn5haX5qXrJefnbmIEhvG2Yz8372C8tDH4 EKMAB6MSD6/G4tORQqyJZcWVuYcYJTiYlUR4f306EynEm5JYWZValB9fVJqTWnyIUZqDRUmc t3fP6kghgfTEktTs1NSC1CKYLBMHp1QDI1fpEtf12W2v7Z9VrZ/moNXU92lbaPifRbd8XT/9 rXUpzRHYsS9323LNHRGM38/0ZQtqZ2ZOPbJc8pjrVMXm0Mk+7M1PVm26Fc9VVPtHyb855HHd U/tk2UbvxW5nl9vkd7hvMnPsm/qviGG5wPELN+b96RBoUF9QFH+V15l3Hn9LKfvmstq7SizF GYmGWsxFxYkAzTh/AF8CAAA= X-CMS-MailID: 20170928130735eucas1p1da4f062b6948350289bba9c8bc911dd7 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-CMS-RootMailID: 20170928130735eucas1p1da4f062b6948350289bba9c8bc911dd7 X-RootMTR: 20170928130735eucas1p1da4f062b6948350289bba9c8bc911dd7 References: <20170928130730.8747-1-a.hajda@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These bindings allows to describe most known standard USB connectors and it should be possible to extend it if necessary. USB connectors, beside USB can be used to route other protocols, for example UART, Audio, MHL. In such case every device passing data through the connector should have appropriate graph bindings. Signed-off-by: Andrzej Hajda --- There are few things for discussion (IMO): 1. vendor specific connectors, I have added them here, but maybe better is to place them in separate files. 2. physical connector description - I have split it to three properties: type(a,b,ab,c), max-mode(ls,fs,hs,ss,ss+), size(mini,micro,powered). This tripled is able to describe all USB-standard connectors, but there are also impossible combinations, for example(c, *, micro). Maybe better would be to just enumerate all possible connectors in include file. 3. Numbering of port/remote nodes, currently only 0 is assigned for Interface Controller. Maybe other functions should be also assigned: HS, SS, CC, SBU, ... whatever. Maybe functions should be described as an additional property of remote node? ... Regards Andrzej --- .../bindings/connector/usb-connector.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/connector/usb-connector.txt diff --git a/Documentation/devicetree/bindings/connector/usb-connector.txt b/Documentation/devicetree/bindings/connector/usb-connector.txt new file mode 100644 index 000000000000..f3a4e85122d5 --- /dev/null +++ b/Documentation/devicetree/bindings/connector/usb-connector.txt @@ -0,0 +1,49 @@ +USB Connector +============= + +Required properties: +- compatible: "usb-connector" + connectors with vendor specific extensions can add one of additional + compatibles: + "samsung,usb-connector-11pin": 11-pin Samsung micro-USB connector +- type: the USB connector type: "a", "b", "ab", "c" +- max-mode: max USB speed mode supported by the connector: + "ls", "fs", "hs", "ss", "ss+" + +Optional properties: +- label: a symbolic name for the connector +- size: size of the connector, should be specified in case of + non-standard USB connectors: "mini", "micro", "powered" + +Required nodes: +- any data bus to the connector should be modeled using the + OF graph bindings specified in bindings/graph.txt. + There should be exactly one port with at least one endpoint to + different device nodes. The first endpoint (reg = <0>) should + point to USB Interface Controller. + +Example +------- + +musb_con: connector { + compatible = "samsung,usb-connector-11pin", "usb-connector"; + label = "usb"; + type = "b"; + size = "micro"; + max-mode = "hs"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + musb_con_usb_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&muic_usb_out>; + }; + + musb_con_mhl_in: endpoint@1 { + reg = <1>; + remote-endpoint = <&mhl_out>; + }; + }; +};