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: 10244421 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 44EE8602DC for ; Tue, 27 Feb 2018 07:13:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FA9B2A26B for ; Tue, 27 Feb 2018 07:13:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 221772A2E7; Tue, 27 Feb 2018 07:13:35 +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=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 838AA2A26B for ; Tue, 27 Feb 2018 07:13:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbeB0HLp (ORCPT ); Tue, 27 Feb 2018 02:11:45 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50094 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbeB0HLm (ORCPT ); Tue, 27 Feb 2018 02:11:42 -0500 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) 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 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+Ri1VuocIzQVbDhQc7NpoiYaEolZUdNQ0cx513+/7/l+fuf3/R0OhUl/4b5U fFIqp0piE+WkGLcMro+eeIk/UZxaa5Sh6dejBNLkfydQZ007gSZXvhKo0bpzNr76k0Tlczoc 2e0dQlRQ1ipEpoWPBHJ215Goxt4nQM16LYZeWWeFqG1yTIC0vVZhJM0YG4yAcZaWCJja/KcE YzIUkMxckU3AdLU+ZkrNBsC4TIeuUgpxRAyXGJ/OqU6evSuO67cbsBSN/4Om5nqQA0p8CgFF QToU5pUfKARiSko/B9D5px7nhQvAnt48QSEQ7UKbrg2PoQfwk3aM4MU2gMudy7sUSQfCra4p 0l170bfhjw/dmBvCaAcOHcNLQrchoy/D2m/TmLvG6SOwtGwWc+eQ0AjmTHvz0wLgs/cTu4iI Dof9VSOk+x5Iz5BQk6fBeCgKfq5Y8cSTwSWbWcjXftBZUYTzDUUADvUVYLyoBNC+5PR0nIHv bO4dRDvx9sNySzXGv4YE5udJeY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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> 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 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>; + }; + }; + }; + }; +};