From mboxrd@z Thu Jan 1 00:00:00 1970 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 E632DC433FE for ; Thu, 3 Nov 2022 08:18:12 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=midggpFLIzdgL6LApu4JAdajc1fxoVR0EXfe/mkBcz0=; b=u2/vmkZrM/G0Hg mblQ6tUj3G73ZKwiN7Nuf7rEeDOsBgRpRRdSANDIP9GnQIwLCg7vfchah3jHI2Eg8VOnpVjpaep4c cL6JT1sZHdCWPvb6ATd9LvPZFf5wfNlCJ1WBvpGZ5pCQ1dSDNw2i3/ePotv0+3emLif6j4IQtoBPi BbyBcr32QZWN73JzaNCPxMAY6OzTPsMus0/GITb70RAk9pkTG9y9b0addeSRXgAluBTV4q4xvcLKV KprcCR+kuM4if5njQ8oWA88Q9sZlecwjJxilqXe3UopdwLwDdAyIHW10B/b1xCpYJsI+BhXmHP4fs B7X3J/foUV3qZszwXbNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqVP8-00Gd55-DQ; Thu, 03 Nov 2022 08:16:50 +0000 Received: from smtp-out-01.comm2000.it ([212.97.32.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqVOL-00GcgL-1N for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 08:16:03 +0000 Received: from francesco-nb.int.toradex.com (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: francesco@dolcini.it) by smtp-out-01.comm2000.it (Postfix) with ESMTPSA id 70F61842C87; Thu, 3 Nov 2022 09:04:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailserver.it; s=mailsrv; t=1667462730; bh=yOfY9eB7qu7TqUunKx7AkuCRtrNlolkJbCg5vWbHkSs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=1OFovVjhXynjTKz/QW5UZoWQeetj8oiaI3Qc1kqnpKvDr25wLL5QwyrCi35/fbQKD 4+aJPG2bT56xfXOD/9Dof7Xb6ydNoQ4nkAY/HnnHbu/HRd5vdubBSX58iLor9IONTC aLc+/qmXD9PqlEqT6J7q56QpiG/uO4e3EWV3a0U4KTCKPyGnKCRUdCPjImeZmH6pJZ HSOGCq+5m6O7khYqTk5kXPWaO6tCJj1LMiuewHdzeFF6WleviNas6qdpte9GOBpH6+ WOEk/0AKfpqVAmDDkLAv6FiqITLmeo8pbALt6YZYotqt/URIL/Xkcph4e/ZPupaga+ zCsJaUxK7xn0A== Date: Thu, 3 Nov 2022 09:04:53 +0100 From: Francesco Dolcini To: Alexander Stein Cc: Philippe Schenker , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , linux-kernel@vger.kernel.org, Philippe Schenker Subject: Re: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching Message-ID: References: <20221102155226.51587-1-dev@pschenker.ch> <4964263.31r3eYUQgx@steina-w> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4964263.31r3eYUQgx@steina-w> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_011601_285168_12BAF843 X-CRM114-Status: GOOD ( 25.79 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 03, 2022 at 08:46:58AM +0100, Alexander Stein wrote: > Hi Philippe, > > Am Mittwoch, 2. November 2022, 16:52:26 CET schrieb Philippe Schenker: > > 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>; > > How came you up with this double entries? Is there some documentation you need > two phandles? extcon-usb-gpio provides both vbus/otg_id with a single handle, however the integration in chipidea is somehow weird, the first entry is supposed to be used to read the vbus, the second one to read the otg_id. So if you need to read both you really need to have the handle twice ... Francesco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel