From patchwork Tue Nov 15 18:05:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 13044058 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 20B26C4332F for ; Tue, 15 Nov 2022 18:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=LvwDcIrdEr9XNK9oqZS/HHbrOm8ExlSY/I/1TCgREVE=; b=sfOTzoi+hUpHyK 9lk38E0RuTyqmQ3AC2mduGnR7Ut15hBSrDlrzLp3GlnCpeDHMEXEUa7wiIFhs6Du8ZsqzVD6OmqTp EoEHZUze/eeDS+c/5lQLXIjAD63PpcljQNiZuPCU8iw6TTh2zYwKr9dBlMZnB2xHhIZw/3LXkR8Bz 59sAksls1u5HAtaYUjDnnxg567VRPDq6TPBUBbaz12FBhpu21gPQKNCONLDS1ioFpmcUmSMf+XIih BW9fPI38uaTAsl9Wv+xtWxqfmEKRqfGCWB0lvqo4r6LO7Pgks8qmesiCkLlFjgg3QGRT7PlZBysoP i79pPAHjF7dv4UTK2trA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov0KX-00DdaX-Ej; Tue, 15 Nov 2022 18:06:41 +0000 Received: from smtp-1909.mail.infomaniak.ch ([185.125.25.9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov0KU-00DdYU-7M for linux-arm-kernel@lists.infradead.org; Tue, 15 Nov 2022 18:06:40 +0000 Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4NBYyn3rHZzMqFk9; Tue, 15 Nov 2022 19:06:25 +0100 (CET) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4NBYyl11H9zMppYF; Tue, 15 Nov 2022 19:06:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1668535585; bh=Ppwbtaour3/Jw/cgaDOFjnjF7G+KdfGQVdagBHehM/g=; h=From:To:Cc:Subject:Date:From; b=lt1lC9fQVWKV5ufGh4LiBh1eGcYTsK9YSrmV7QZRKqi8erKNY1aWKxRmeQpd8P9AX PaOpnGoBFZ8w8PEAtP8UJMRpVZasp+s2sIaPmZFY21+v8tyhXFqUnmXqmA3yV/gJUe 8GmT1kNxgu/F494LF658bQB/L+IBwhXtuyLdcQS4= From: Philippe Schenker To: devicetree@vger.kernel.org, Shawn Guo Cc: Alexander Stein , Philippe Schenker , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: dts: colibri-imx6ull: Enable dual-role switching Date: Tue, 15 Nov 2022 19:05:54 +0100 Message-Id: <20221115180554.73696-1-dev@pschenker.ch> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_100638_431585_E718C738 X-CRM114-Status: GOOD ( 10.30 ) 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: Philippe Schenker The Colibri standard provides a GPIO called USBC_DET to switch from USB Host to USB Device and back. Make use of this GPIO by adding it with usb-connector framework. Signed-off-by: Philippe Schenker --- Changes in v2: - Switched from extcon-usb-gpio to usb-connector-gpio arch/arm/boot/dts/imx6ull-colibri.dtsi | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi index a4429ba1f2ae..336ab2e0534c 100644 --- a/arch/arm/boot/dts/imx6ull-colibri.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi @@ -24,6 +24,28 @@ backlight: backlight { status = "disabled"; }; + connector { + compatible = "gpio-usb-b-connector", "usb-b-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_snvs_usbc_det>; + id-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */ + label = "USBC"; + self-powered; + type = "micro"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_dr_connector: endpoint { + remote-endpoint = <&usb1_drd_sw>; + }; + }; + }; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -280,6 +302,13 @@ &usbotg1 { srp-disable; hnp-disable; adp-disable; + usb-role-switch; + + port { + usb1_drd_sw: endpoint { + remote-endpoint = <&usb_dr_connector>; + }; + }; }; /* Colibri USBH */