From patchwork Wed Nov 2 15:52:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 13028308 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 8463BC433FE for ; Wed, 2 Nov 2022 15:53:44 +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=Nocx2p2Od9baBwyVJpkyjBegExYhyFyPHOO+HgyFf7I=; b=uo6uzxyaD8fc5l hGNvvVck0g6vzdy5YTnE2UgnuhIgHoCONXmdCH9Wn1PJuErHXE6rhpmeI7GnSCcXrNw+fUcQztgFo DBfDTZhmYH1A2HGo2M0rO5Gu1p8AqjVOeLTOKRnvikCP9zRn1vBQelYZieAM/SbkYFoPnhG8X+4WW zFl2a6set1G7DG03Izkkn17oNXkjj8//SBi5u/DzU0T0RnbwsETPsweVufEyvQ3EY4PeufgQdxBtn o18GYng3+XtKIvXkJVVCNQzURtFCfhXrgepUnKC4tGuJ2x6cdJq17can1Dh3qoewHeLp3J6D+h1th bWpViEF7pFyZ8ka7C1Kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqG2n-00BtBm-60; Wed, 02 Nov 2022 15:52:45 +0000 Received: from smtp-bc09.mail.infomaniak.ch ([45.157.188.9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqG2j-00Bt76-Dh for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2022 15:52:43 +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 4N2WcK0L8xzMqNZt; Wed, 2 Nov 2022 16:52:33 +0100 (CET) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4N2WcJ40DVzMpqBV; Wed, 2 Nov 2022 16:52:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1667404352; bh=hsmqP6LW9Hc8mmhziJ3amvKnlktfxLKv2Sastr0h7Mc=; h=From:To:Cc:Subject:Date:From; b=TQm8+MuVUwOG0FZujEOnW7Guwm64m8a1xGcEzqlHvLxisaRwxJuzqvTua50ZFeZ+X WaTLDPNoYxMGvittPp5RHg9Qxp6YowAa+4AbXgQ0O7bT+VF+dU5UR0okp58kB1PKra k1IgbmLnWIgyikD4GOCunTDajWVD1JyWv9QxjEUk= From: Philippe Schenker To: Shawn Guo , devicetree@vger.kernel.org Cc: 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] ARM: dts: colibri-imx6ull: Enable dual-role switching Date: Wed, 2 Nov 2022 16:52:26 +0100 Message-Id: <20221102155226.51587-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-20221102_085241_669313_059BD314 X-CRM114-Status: GOOD ( 10.91 ) 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. The Colibri iMX6ULL does have the SoC ball USB_OTG1_VBUS connected in series with a capacitor to ground. This means that we need to provide to the extcon framework VBUS and ID events using the single GPIO we have. The Extcon USB GPIO driver does use id-gpio also for VBUS event, as in our case where vbus-gpio is absent. Signed-off-by: Philippe Schenker --- arch/arm/boot/dts/imx6ull-colibri.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi index 577a424b0e1d..feb1fcd9a684 100644 --- a/arch/arm/boot/dts/imx6ull-colibri.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi @@ -24,6 +24,13 @@ backlight: backlight { status = "okay"; }; + extcon_usbc_det: usbc-det { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_snvs_usbc_det>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -275,6 +282,7 @@ &uart5 { /* Colibri USBC */ &usbotg1 { dr_mode = "otg"; + extcon = <&extcon_usbc_det>, <&extcon_usbc_det>; srp-disable; hnp-disable; adp-disable;