From patchwork Wed Feb 21 08:55:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10231447 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 B24CA60209 for ; Wed, 21 Feb 2018 08:56:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7C3328A9B for ; Wed, 21 Feb 2018 08:56:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BF8928AA2; Wed, 21 Feb 2018 08:56:13 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 79AC628A9B for ; Wed, 21 Feb 2018 08:56:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621AbeBUI4L (ORCPT ); Wed, 21 Feb 2018 03:56:11 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54292 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbeBUI4I (ORCPT ); Wed, 21 Feb 2018 03:56:08 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180221085605euoutp011789a2c904db1cd1f82ec81e42f73f99~VS2mJjzt82475124751euoutp01E; Wed, 21 Feb 2018 08:56:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180221085605euoutp011789a2c904db1cd1f82ec81e42f73f99~VS2mJjzt82475124751euoutp01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519203366; bh=UQUVY5uFwLwnM0lZt0clhHUuC/Bbp8UnCd0/+PdTVfE=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=GKulmxV9zu4DjNk0IhogqgL2dMJNB0IPqPSV7k0Y6CdUREI5Xwr2FOYgxhFCAfcEe H7SaHgPGvNeW58OaHXQCClGIrj+Om8B/5KwZGS444pUFhLzRz+hLrPqs7Micm6ohj7 q1xOyW3w5oB63sPV4+uM9JIbC+g/yE07HmASEass= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180221085605eucas1p24b0c133c265ca2a805e5e3bfc582ea4a~VS2legPSB2595925959eucas1p2s; Wed, 21 Feb 2018 08:56:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5F.CD.10409.4243D8A5; Wed, 21 Feb 2018 08:56:04 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180221085604eucas1p11aa066a1e106d9f9850731a5171dce8b~VS2k1fLPt0839508395eucas1p1m; Wed, 21 Feb 2018 08:56:04 +0000 (GMT) X-AuditID: cbfec7f5-b45ff700000028a9-dd-5a8d3424c60b Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E0.07.04183.4243D8A5; Wed, 21 Feb 2018 08:56:04 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4H00IT3STE0I20@eusync4.samsung.com>; Wed, 21 Feb 2018 08:56:04 +0000 (GMT) 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: [PATCH v4 1/6] dt-bindings: add bindings for USB physical connector Date: Wed, 21 Feb 2018 09:55:36 +0100 Message-id: <20180221085541.14556-2-a.hajda@samsung.com> X-Mailer: git-send-email 2.16.1 In-reply-to: <20180221085541.14556-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0iTURjHPXsvex2tTlPypN0YShqmpn44ZZZG4PtBwqBPg9SVL2pe27y0 6KKS4pwTMyE1qbSlMbR0XjG1mMOFipc2EwVdJGEMncTUELs5X/32O//n95zn4XAYQrJKejOp mTmcIlOeLqVFZPfw5vhp33CtLKTQHIHn3o5TuKh0hcLtNe8oPLO2ROEXpu3Mur5K4ypbJYkn JtqEWP1YJ8SGxS8UtvTV07hmYlCAG5uKCdxqmhfi1zNTAlw8YBJGQbbleQtgLRVaAfustJZi DXo1zdo0ZgHboXvIVnTqAes0HItjZKLzSVx6ah6nCL6QKErpsqwJsouO3lmtGKMKgNarDLgz CIaj744tysUS+AagVUcCz06Aqgti9xx7WzsoA6LtvAmgr80bJH/4B1CJxk64LBoGoD8ds7SL PeF15PjcR7gkAk6SaHLULnQVPGAsah1b3maGIaEf6mq95IrFEKOPZR8oftpxNLRctMPu8Cza GqjauQdBG40KPzUKeekyWthYJHj2QHZz525+BFmeaEi+QQPQyKB6t7saoAm7RcBbEWjIPLUz goD7UVX3U8K1EYJiVFoi4RUWOSaraZ6jUccrA82/SzlAujpVJfB+Cdz0wIvLVWYkc8qwTC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//VcTn+i2fE6nEUpyRaKjFXFSc CADeIyH3VQIAAA== X-CMS-MailID: 20180221085604eucas1p11aa066a1e106d9f9850731a5171dce8b X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180221085604eucas1p11aa066a1e106d9f9850731a5171dce8b X-RootMTR: 20180221085604eucas1p11aa066a1e106d9f9850731a5171dce8b References: <20180221085541.14556-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 allow 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 --- v4: - improved 'type' description (Rob), - improved description of 2nd example (Rob). v3: - removed MHL port (samsung connector will have separate bindings), - added 2nd example for USB-C, - improved formatting. v2: - moved connector type(A,B,C) to compatible string (Rob), - renamed size property to type (Rob), - changed type description to be less confusing (Laurent), - removed vendor specific compatibles (implied by graph port number), - added requirement of connector being a child of IC (Rob), - removed max-mode (subtly suggested by Rob, it should be detected anyway by USB Controller in runtime, downside is that device is not able to report its real capabilities, maybe better would be to make it optional(?)), - assigned port numbers to data buses (Rob). Regards Andrzej --- .../bindings/connector/usb-connector.txt | 75 ++++++++++++++++++++++ 1 file changed, 75 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..e1463f14af38 --- /dev/null +++ b/Documentation/devicetree/bindings/connector/usb-connector.txt @@ -0,0 +1,75 @@ +USB Connector +============= + +USB connector node represents physical USB connector. It should be +a child of USB interface controller. + +Required properties: +- compatible: describes type of the connector, must be one of: + "usb-a-connector", + "usb-b-connector", + "usb-c-connector". + +Optional properties: +- label: symbolic name for the connector, +- type: size of the connector, should be specified in case of USB-A, USB-B + non-fullsize connectors: "mini", "micro". + +Required nodes: +- any data bus to the connector should be modeled using the OF graph bindings + specified in bindings/graph.txt, unless the bus is between parent node and + the connector. Since single connector can have multpile data buses every bus + has assigned OF graph port number as follows: + 0: High Speed (HS), present in all connectors, + 1: Super Speed (SS), present in SS capable connectors, + 2: Sideband use (SBU), present in USB-C. + +Examples +-------- + +1. Micro-USB connector with HS lines routed via controller (MUIC): + +muic-max77843@66 { + ... + usb_con: connector { + compatible = "usb-b-connector"; + label = "micro-USB"; + type = "micro"; + }; +}; + +2. USB-C connector attached to CC controller (s2mm005), HS lines routed +to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort. +DisplayPort video lines are routed to the connector via SS mux in USB3 PHY. + +ccic: s2mm005@33 { + ... + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_con_hs: endpoint { + remote-endpoint = <&max77865_usbc_hs>; + }; + }; + port@1 { + reg = <1>; + usb_con_ss: endpoint { + remote-endpoint = <&usbdrd_phy_ss>; + }; + }; + port@2 { + reg = <2>; + usb_con_sbu: endpoint { + remote-endpoint = <&dp_aux>; + }; + }; + }; + }; +};