From patchwork Fri May 6 15:27:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12841307 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 B0E68C433EF for ; Fri, 6 May 2022 15:30:14 +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: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=6vMmSHXAVA60aosa6ClQ9p0vKXr1On+rbKHX/OmbIu8=; b=GubjqyTYyV/fYR 7IBIE4JudvBM8q0DOP9+6x+EvKvy6d3KjzMWplgkYiGZqIoHr+JxMvms4PotkTYcEBOmbNz0Jvq1K IWS12XmMO2sNe6Zmd1yLxoDAuspFs/8btsWB5JTOF4rc5060Zi45pFpjGArl9LBXYfppwz+xT82KS bGVYAQUi8D3eNv7U8gunEQkNijryU04DWrRYNtzGN9H00ONXmQRnK4Or1M8X3boHnC6wPnw5QRKDl iodR5jNCGfDQvpcvxjmd014+zjx1R1rVnZNtBbQtXYslyub0UQAVvovxKGotTn9fXrJhWLhRjYEon +aphKZ2Uq0rh23rF6kzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmztB-0043Bv-1Y; Fri, 06 May 2022 15:29:05 +0000 Received: from mout.perfora.net ([74.208.4.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmzsr-00433l-Nu for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 15:28:47 +0000 Received: from toolbox.int.toradex.com ([81.221.85.15]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1Mg7F4-1oJY9T0fra-00hala; Fri, 06 May 2022 17:28:37 +0200 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Philippe Schenker , Marcel Ziswiler , Fabio Estevam , Frank Rowand , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Russell King , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 04/24] ARM: dts: imx7-colibri: add usb dual-role switching using extcon Date: Fri, 6 May 2022 17:27:49 +0200 Message-Id: <20220506152809.295409-5-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220506152809.295409-1-marcel@ziswiler.com> References: <20220506152809.295409-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:ouHQzRwJkADa37gIZTedAOIRP/KOUmtL6FIHFiTLITHSiruKzHp gCTBHW6Pr/1DeGWUi34pNgsgTXUcWF1p/zB3wFU3eHAtel3UAOJjxoLizzUqHvmLjVvoexG Qzvc4Y8NWIjDhiMhzy8eQXenTxe8QPTsHHLuViFaZSWmXENEf5K4d4b4YmIu6HErY1dBnQ1 z9i6ZnUts1fsMd4U6WiPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:VaMEYnA2Ji4=:ZFdPvu0XcwNrcqcThr2p70 hRGJyLLRlxErPTzJW9Yl1mUHJR0J/Sx0nqslU0WxOa06y171U0j+XmS/4cg23K69SkArSFvGd vsO7d4uccf5/PdVcd8L3z6bQFzLyoXgNbj68o8dLKVVayS/B/PIklxjhZaZ/7Pxi6ZQkCP62U aBTPRVBrH2UojfRGWPrWxThvXaYCY+R2k1IkYByjXAoB6a2Qc1ZS05Ayt9iApoFf3TKA//dkY 9jIqtmmzgWAxGT+9heZ+ak2iXqbrsNCE9PI0K9QAlfL8W1+x9LM5Bo0y4sqe1xD59Rz3HSSDQ WG1nZZ736WabhYOpfXZjmVb9YzsQp+AQE9eAaM7wwERDQdbCcSR9hTMTIgRFCJ2qkFuDVoM3u oF9orFTS+azEx+VeiC+U7rV3+l+LrFca+PU5SkkZbkpadH9zWljJ7jQsASl8y/bPoQ0KDiipj MAkgA4aeY4+FnDPHAInxJUwufcAJlKqx2WnaokODaJUkq1HpY5i70Wh4FqbTpUueWlUOXUJ4E ZP7w6uSjjE4ecEFBEDnHDDzpGCLTQRamt7SBqK344/dRpj4udk54JsN2QfcuOb6dKSZrlLh42 gvbs++Q54Ux1PVwOFNmq10rRxlPSO2JVtmknQhuaEG0Hp2C9+hRgiSSfhlaqoRulOeDAVx84N WOneyYtog1WqKaU7tR/mhGAB43/tFpVI4zAg6wmZ8QNRzhfMelsubCGD7i8DnSHmQzyI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_082845_915990_701FE09E X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. 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 Add USB dual-role switching using extcon. Signed-off-by: Philippe Schenker Signed-off-by: Marcel Ziswiler --- arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 8 ++++++++ arch/arm/boot/dts/imx7-colibri.dtsi | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi index d6fa74222960..17ad9065646d 100644 --- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi @@ -20,6 +20,13 @@ clk16m: clk16m { clock-frequency = <16000000>; }; + extcon_usbc_det: usbc-det { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -141,6 +148,7 @@ &uart3 { }; &usbotg1 { + extcon = <0>, <&extcon_usbc_det>; status = "okay"; }; diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index 3c1cfd766645..6df82a67953a 100644 --- a/arch/arm/boot/dts/imx7-colibri.dtsi +++ b/arch/arm/boot/dts/imx7-colibri.dtsi @@ -512,7 +512,7 @@ &uart3 { }; &usbotg1 { - dr_mode = "host"; + dr_mode = "otg"; }; &usdhc1 { @@ -540,8 +540,7 @@ &usdhc3 { &iomuxc { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4 - &pinctrl_usbc_det>; + pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4>; /* * Atmel MXT touchsceen + Capacitive Touch Adapter