From patchwork Thu Feb 15 10:39:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10220839 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 9F8E76056E for ; Thu, 15 Feb 2018 10:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ADE429128 for ; Thu, 15 Feb 2018 10:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F0612912B; Thu, 15 Feb 2018 10:39:37 +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 E9D6D2912E for ; Thu, 15 Feb 2018 10:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390AbeBOKjf (ORCPT ); Thu, 15 Feb 2018 05:39:35 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50922 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755304AbeBOKjc (ORCPT ); Thu, 15 Feb 2018 05:39:32 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180215103930euoutp02712a9523f25d21046946ea2f317a104f~TeZKob9H81269412694euoutp02c; Thu, 15 Feb 2018 10:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180215103930euoutp02712a9523f25d21046946ea2f317a104f~TeZKob9H81269412694euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518691170; bh=RUdmZPtM+RZvJCmQvR3MPSnpjV6PaLFlXpGT9hv7ZoY=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=pGZACbs1LMN2MmLpSW8F4va2+xc8Y95v3J1AlMBozX/WM6f1pSxl4RXjKH2SPP2iH 7lOopdLHQHMvgmgaPGufW1mExV6M0J4jrioDmxR8Xx1XdoDm6ONGN1000qSkHHMAaI dZobMOD+NBTdMd+UV88zPcOEZFxN3r112bXGd4zM= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180215103928eucas1p1e514fc1b63d08b9b28b49fb39aa50dde~TeZI8DHfZ1278012780eucas1p1W; Thu, 15 Feb 2018 10:39:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F4.9B.10409.F53658A5; Thu, 15 Feb 2018 10:39:27 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180215103925eucas1p1d82fd73ac6ea77c8b66de4ed26101a71~TeZGgsNb-1885518855eucas1p10; Thu, 15 Feb 2018 10:39:25 +0000 (GMT) X-AuditID: cbfec7f5-b45ff700000028a9-ea-5a85635fcf7f Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D1.AD.04178.D53658A5; Thu, 15 Feb 2018 10:39:25 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P46006GJTLN2910@eusync3.samsung.com>; Thu, 15 Feb 2018 10:39:25 +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: [RFC PATCH v2 1/6] dt-bindings: add bindings for USB physical connector Date: Thu, 15 Feb 2018 11:39:15 +0100 Message-id: <20180215103920.32017-2-a.hajda@samsung.com> X-Mailer: git-send-email 2.16.1 In-reply-to: <20180215103920.32017-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAIsWRmVeSWpSXmKPExsWy7djP87rxya1RBh9ns1ncWneO1aKp4y2r xcYZ61ktrn95zmox/whQ7MrX92wWk+5PYLE4f34Du0XnxCXsFpseX2O1uLxrDpvFjPP7mCwW LWtltlh75C67xdLrF5ksWvceYXcQ8Fgzbw2jx+W+XiaP2R0zWT02repk87jffZzJY/OSeo++ LasYPT5vkgvgiOKySUnNySxLLdK3S+DK+LT6L0vBDZmKCZ8/szYwvhPrYuTgkBAwkdg4QbeL kYtDSGAFo8Sf5cfZIJzPjBLrliwDcjjBin4/aGOFSCxjlPjw8AY7hPOfUeLklyfsIFVsApoS fzffBOsQEYiVeHdpFzNIEbPABRaJC6dfgRUJCwRJTDrdxQyym0VAVWJLcyhImFfAQmLZ61+s ENvkJQ6/aWIFKeEUsJSYMt8CZIyEwH02ie5115ghalwk/l3ZzQRhC0u8Or6FHcKWkejsOMgE 0dDNKHFqXyczhDOFUeL8q8tQHdYSh49fBNvGLMAnMWnbdGZIYPBKdLQJQZR4SMyaMAGq3FHi YPdRaLj0AA1dtoNxAqPUAkaGVYziqaXFuempxcZ5qeV6xYm5xaV56XrJ+bmbGIHp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/bc6H9ad/bM400Xik/eFHUOU2Ipzkg01GIu Kk4EAOCyx3lUAgAA X-CMS-MailID: 20180215103925eucas1p1d82fd73ac6ea77c8b66de4ed26101a71 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180215103925eucas1p1d82fd73ac6ea77c8b66de4ed26101a71 X-RootMTR: 20180215103925eucas1p1d82fd73ac6ea77c8b66de4ed26101a71 References: <20180215103920.32017-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 --- 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 Signed-off-by: Andrzej Hajda dt-bindings: add bindings for USB physical connector v3 --- .../bindings/connector/usb-connector.txt | 74 ++++++++++++++++++++++ 1 file changed, 74 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..1efda92639da --- /dev/null +++ b/Documentation/devicetree/bindings/connector/usb-connector.txt @@ -0,0 +1,74 @@ +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-standard (large) connector sizes: "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: + +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>; + }; + }; + }; + }; +};