From patchwork Tue Feb 27 07:11:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10244401 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 C2A56602DC for ; Tue, 27 Feb 2018 07:12:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA6C02A568 for ; Tue, 27 Feb 2018 07:12:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F0D52A57F; Tue, 27 Feb 2018 07:12:07 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ECFC32A568 for ; Tue, 27 Feb 2018 07:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+h1cVM5locP2K2B1lidMg+u6r5B+Mzn9GlzzS5rE2uU=; b=LlwdrE8WCgRiDdnlV+/KIXXcNn zelM+T/Xl+DcixDuu57ISAvlocsk6pJmqS9ZhmxYFhtPEKUcGMS42t4DJoCS4MhV/HorOUOjHVvty 8NZ0PK/geSoKQeOqrH+h5VAIgnEm6r3xO5ZYcVSqeLs4G2oGar00xjUs9eSc3MgP/QDEZn6uoA23H 6pF+rs/8/6/jNkoZH+R/ezOuD6eQzDs4XKNOVzO+xaX3HsEi24rKYh63bfDPChY1V7gR5uE61vC2r 0a5f021CtK7QdKk2t+DqhtwInAUbqwGRBeeFugGzUDh6p61LXtIyJWeir5kXGXSaXw3vL5Xh/tBwr VD53StHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqZQd-0001El-Vs; Tue, 27 Feb 2018 07:11:59 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqZQZ-00019v-0Z for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2018 07:11:57 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180227071140euoutp02a1cc559a1720ce2aa2a758dba0ee81db~XHTIqJeUi2532325323euoutp02H; Tue, 27 Feb 2018 07:11:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180227071140euoutp02a1cc559a1720ce2aa2a758dba0ee81db~XHTIqJeUi2532325323euoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519715500; bh=zICiA7wAYV8stKiBYGP1tcSEQjjRbXyYRD7nIbX3X/Y=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=jrnSo/xYHlNKcYqu4yEyMEK4ipN+DXW27DplzCeClE+uPR+dG45213CxLJIlAEr5B ktWKk3lJMfMkl/1CccHNfKcYCc2Q1jdQmZsjED1xogY4fDlkMIsYbX/66+Ey0JmTMd WNsnt+6KJmLnioAkXgfggtKmn1BEdk9Zvt88w/Nk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180227071139eucas1p26c7a9db8e88ac8d75db58826e5fe1f76~XHTHzRS5M2131121311eucas1p2t; Tue, 27 Feb 2018 07:11:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 45.7F.10409.BA4059A5; Tue, 27 Feb 2018 07:11:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180227071138eucas1p17e1e16f13f6d3e3b15a57dc93eb8cf3f~XHTG5PEmr2088120881eucas1p1l; Tue, 27 Feb 2018 07:11:38 +0000 (GMT) X-AuditID: cbfec7f5-b45ff700000028a9-ae-5a9504ab6a8f Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BC.EE.04183.AA4059A5; Tue, 27 Feb 2018 07:11:38 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4S00AJMRZD4P00@eusync1.samsung.com>; Tue, 27 Feb 2018 07:11:38 +0000 (GMT) From: Andrzej Hajda To: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector Date: Tue, 27 Feb 2018 08:11:29 +0100 Message-id: <20180227071134.28063-2-a.hajda@samsung.com> X-Mailer: git-send-email 2.16.2 In-reply-to: <20180227071134.28063-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe0hTURzHO7uP3a0Wl830YJowCjLKSgWPJGUhcYmgiIJYlN3yoqJT2Xyk ZMlw4pv5SA2f+Ri1VuocIzQVbDhQc7N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YtKqTzeN+93Emj81L6j36 tqxi9Pi8SS6AI4rLJiU1J7MstUjfLoErY//5VcwFTbIVCxbNZWxg7BXvYuTkkBAwkfjz+RcL iC0ksIRR4sss9y5GLiC7kUnixruD7CAJNgFNib+bb7KB2CICsRJvT31mBiliFrjAIvF74kyw ImEBH4nZr28xg9gsAqoSfRPvAtkcHLwCFhINt8QglslLLDx7FayEU8BSYv+0M2wQiy0k7nce Y53AyLOAkWEVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYMBuO/Zzyw7GrnfBhxgFOBiVeHhn yE2JEmJNLCuuzD3EKMHBrCTCu3Lx5Cgh3pTEyqrUovz4otKc1OJDjNIcLErivOcNKqOEBNIT S1KzU1MLUotgskwcnFINjH0c8yX3HLoWqHmw3/SHQ5PtDZGpDJlPpY2FXKL3OG89nXLsn6S7 4qegNDX22HN/j+fPbWTz/7vo+Xu9vYzd+7PNzkocC7mXI8GVOF/Qu/PTnNCotJytPH/ypReG O918pBB2le3W1XmVZRecFzxtTg1e+F98Dtv/eqln1QUb3m/6psdaFOO9WImlOCPRUIu5qDgR AO9WhdhUAgAA X-CMS-MailID: 20180227071138eucas1p17e1e16f13f6d3e3b15a57dc93eb8cf3f X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180227071138eucas1p17e1e16f13f6d3e3b15a57dc93eb8cf3f X-RootMTR: 20180227071138eucas1p17e1e16f13f6d3e3b15a57dc93eb8cf3f References: <20180227071134.28063-1-a.hajda@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180226_231155_300329_81875A4F X-CRM114-Status: GOOD ( 17.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Archit Taneja , linux-samsung-soc@vger.kernel.org, Laurent Pinchart , Chanwoo Choi , Bartlomiej Zolnierkiewicz , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Inki Dae , Andrzej Hajda , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Rob Herring --- 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>; + }; + }; + }; + }; +};