From patchwork Mon Sep 23 15:14:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 13809757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6CCECF9C6F for ; Mon, 23 Sep 2024 15:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TKCy9Jq22eRkR6RmpHojozqZz4jZeE1HMz6d8/7gisk=; b=iBwFXzPSUNfgEdob+i220GSqov OMgpKCmCc4Jfuc3XnNeQMGujt2h4cJLwv60WCjjqnronGW/3gnugHFpKXl/jfiPLWhTBc8vKzmqyu O+jUp20S3+a/hJTg2xdVeuSQX6F6kC1iBuBUWa4AmW7ExOEb82/6KSOa4VE6ty11XZoZf/Yt8huup 9tY+dDanlukjU+8FDrxPjUXe5oH2vgUaSD6demsLmWMKpnz+HaMTen//QwuLq5tU3aUDsb/PgFlAV suGRI4zXvhTJh3W0s95LoOHp/Y/MK3SS9ShVKc3AM0CJIBv4i6q/nKHBdEW5pWQQtKz8ewzbAWwVv 5nvCotxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssksK-0000000HTqY-31JR; Mon, 23 Sep 2024 15:21:20 +0000 Received: from uho.ysoft.cz ([81.19.3.130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ssklb-0000000HSwl-0u6g for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 15:14:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1727104461; bh=TKCy9Jq22eRkR6RmpHojozqZz4jZeE1HMz6d8/7gisk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lp19ZPwtv03gSL2F7CbIedTZD2s4iY3Djyxk/ygOi55M0kjmeYh+Oa9tCot/8U7bA S5YYulEvK31BnG45kgW/TFqk0lswWmvJZq0V+LfuJ/BqBAXkswJJw+LLBX6oDzvexJ tIrO/o3QZ0K6zBynuHT0kHK9h0edC0aveQkG1E8g= Received: from vokac-nb.ysoft.local (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id 2B88BA05E5; Mon, 23 Sep 2024 17:14:21 +0200 (CEST) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Shawn Guo , Petr Benes Cc: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Herburger , Hiago De Franco , Hugo Villeneuve , Joao Paulo Goncalves , Michael Walle , Alexander Stein , Mathieu Othacehe , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH v3 3/4] dt-bindings: usb: Add Diodes Incorporated PI5USB30213A Type-C Controller Date: Mon, 23 Sep 2024 17:14:16 +0200 Message-ID: <20240923151417.1665431-4-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240923151417.1665431-1-michal.vokac@ysoft.com> References: <20240923151417.1665431-1-michal.vokac@ysoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_081423_478262_ADC42E14 X-CRM114-Status: GOOD ( 11.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Petr Benes Diodes Incorporated PI5USB30213A Type-C Controller supports host, device, and dual-role mode based on voltage levels detected on CC pin. Supports dual differential channel, 2:1 USB 3.0 Mux/Demux, USB Type-C specification 1.1. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Petr Benes Signed-off-by: Michal Vokáč --- v3: - Collected R-b tag from Krzysztof. v2: - Moved maintainers before description: block. - Used full paths for references. - Removed unneeded items form connector property. - Fixed example. .../bindings/usb/diodes,pi5usb30213a.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml diff --git a/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml new file mode 100644 index 000000000000..054a5409bd15 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/diodes,pi5usb30213a.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/diodes,pi5usb30213a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PI5USB30213A Type-C port controller + +maintainers: + - Petr Benes + +description: + Diodes Incorporated PI5USB30213A Type-C Controller supports host, + device, and dual-role mode based on voltage levels detected on CC + pin. Dual differential channel, 2:1 USB 3.0 Mux/Demux, USB Type-C + specification 1.1 compliant. + +properties: + compatible: + enum: + - diodes,pi5usb30213a + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - connector + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + typec@d { + compatible = "diodes,pi5usb30213a"; + reg = <0xd>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_typec>; + interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + vbus-supply = <®_typec>; + power-role = "source"; + data-role = "dual"; + typec-power-opmode = "default"; + pd-disable; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_con_hs: endpoint { + remote-endpoint = <&typec_hs>; + }; + }; + + port@1 { + reg = <1>; + + usb_con_ss: endpoint { + remote-endpoint = <&typec_ss>; + }; + }; + }; + }; + }; + };