From patchwork Wed Sep 28 07:33:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12991705 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 EE0ABC04A95 for ; Wed, 28 Sep 2022 07:35:16 +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=J2q/BKqqtcsQVPgUBOGI7yA234JsjI4NMYAZdj8SIeY=; b=LyJP1gOCt1aHW8 vzruf1xVukhV0x4i8TYAcuBCztEugWL57gO/kdlgsDqWKcaNmiwsWOxh/5S5l9u2ZznRSuBSea/12 ktWVxNjmbQYkJjqCwtH0WblDNcK9QtlvbLuGKLIUURM/cgGkmcKDcoLObYxxHGR4cQjWa2AAuGi8h OVKx9PZOxlAQdpo7YCMB85VvAhkeQs3T0MDQEKaPJ3o9BBWaxYkRYgy33duspwSi8nTdrholyOhyU TuQgEUrt1rV6UjYbJxWLPIrQ6o5ze8+Yo2kAKioITKw79J0sV8JYCb8p9t3Y7hjFfv7CvHSYVlA9Z sq6s0dnSLZ3UYanyOICg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odRa5-00EYDS-Pq; Wed, 28 Sep 2022 07:34:09 +0000 Received: from mout.perfora.net ([74.208.4.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odRa2-00EY8w-AV for linux-arm-kernel@lists.infradead.org; Wed, 28 Sep 2022 07:34:07 +0000 Received: from toolbox.int.toradex.com ([81.221.243.92]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MAxNa-1oViLh1lMS-009vZI; Wed, 28 Sep 2022 09:33:49 +0200 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Philippe Schenker , Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] arm: dts: colibri-imx6: usb dual-role switching Date: Wed, 28 Sep 2022 09:33:32 +0200 Message-Id: <20220928073336.63881-2-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220928073336.63881-1-marcel@ziswiler.com> References: <20220928073336.63881-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:0eBsTL8vCLAjiORrC4CrRjsmc2I5ZFyYc3tHkLu6E+3c+T/KU9b Lz4X6yeKX75xdZ6kWVlPMaoJQYzB90f9A9IO6LtnwJVYjEYQDlOw4eHFahhYDmOtkq+WQt7 lWpuNiekrwK6SIrcB1Q6uAACamd4yAdzqOgAVIBq3z7q13HXX69KYYrUewItkLHmjU1Wyd1 No4BesXnNbKqzlnDO/j9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:pYH1lRUSjWU=:fBFYNpd+9Ym0bOgxX99hjB Lsk5CH0S9Sl/WGT2e/OkQYSMMUPJtXw4jT3p9wLCzhs3e2DMuTWaoNR9+wpVwVBSVAGfS+5Ej RCLWnaR3NV1i7dLFaKPgu4YlwCgdFIzCoXwf/SOtBE/PhQuYTwCzVIXXidlvtFaxh7o+w9vfZ gL7S8IPJdPcR49V4w+oRtNNmYeoLw9FfhYJH3AE0H5M/8aQw8u0tBJ63vlCFkYqtIfW+U7s+Q Hk8TFJwQTccJ3Hur1h0XbU9qSdwlxcbIYbg94rHtHIw4vjTfJuTc6RqjiZQ75Zi9V0i3KbGXg sGHb4vFu4OuJra5syymy+WOC1heZdpMYrc6H6qBmVh/Bq/HMNNChGkZ2p9QEZKg1uHriKGZ3W 9HL8a2CLuzSu3ySDzHA0jU62Qp/y1/uPwIEmB8NC0bT+1K3NxuWYW97WsriOTJt8JPOeo26ld mc0myOm6z5nuM3462rHZmeRD3LKucfsA8xD2AR4dBDJhpQ/FDFvwCWCOayRTQ2IqLMSm041cl X15A8l8UJKWT9cBl9+x4wRy5N40Buv2Kodvpz/SlG8xjj9HsfgT5IDg+PmYDIIJdlGSYzMSvb GWvxtdJoOFEsJT/Rtz0RHbwE2lNI/8SluJ0Cp6keHNwuBB2KyzYMs7L8WytRcY4njLQbpjTBf tLWDIcwxbQ+9bKr8rStWy5Y/rPRF6Loujl3vZMwFOSv7heN2mDjjQ1gq77RnEDzjqGMRdSind RJ6lG+LLIfeqGthnOuPwwtUaWfXUHphHtdJQTQWFUXM+SnnZrenkRW/zDFGIw0LngMyrxF8ml 2XHG9eQ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220928_003406_469400_F6A11671 X-CRM114-Status: GOOD ( 10.98 ) 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 Introduce USBC_DET GPIO based USB dual-role aka device/host switching. While at it re-work pinmux comment adding SODIMM number to the USBC_DET entry. Signed-off-by: Philippe Schenker Signed-off-by: Marcel Ziswiler --- (no changes since v1) arch/arm/boot/dts/imx6qdl-colibri.dtsi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index 023e76215064..3e98b5da0cc6 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -24,6 +24,13 @@ backlight: backlight { status = "disabled"; }; + extcon_usbc_det: usbc-det { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; /* SODIMM 137 / USBC_DET */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbc_det>; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -670,9 +677,11 @@ &uart3 { status = "disabled"; }; +/* Colibri USBC */ &usbotg { disable-over-current; - dr_mode = "peripheral"; + dr_mode = "otg"; + extcon = <0>, <&extcon_usbc_det>; status = "disabled"; }; @@ -1055,7 +1064,7 @@ MX6QDL_PAD_SD4_CMD__UART3_RX_DATA 0x1b0b1 pinctrl_usbc_det: usbcdetgrp { fsl,pins = < - /* USBC_DET */ + /* SODIMM 137 / USBC_DET */ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0 /* USBC_DET_OVERWRITE */ MX6QDL_PAD_RGMII_RXC__GPIO6_IO30 0x0f058