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 70EEBC4332F for ; Fri, 11 Nov 2022 05:18:43 +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=FswJ2bFZuN9wYxALQ4i/bdg3As2YehTHaivmrFAbWeM=; b=FvUZBwOWF3Nar1 l/w0JlZiZharW4OF/WOl3nSVda/P6rzMQwLK7JiO+339COhyZ94Cj32o3CoMAh453RUp4HcDWQe5U T6YT/AklVAgDwD9OjNrq0CzimWBBssMEoz3SJ6ZyMlARQICeYn8GG1gB//xqk7sR2P1aAhdeVow0b 7/RHTR+ffyN2ysJPlpHkcPRJp2htRysFjtidr7T7k6UYNS7ifNniVq9mBeuLdBXPvGOjUcZ//NwIt sPGxEnZsGfYSU2TtaCcHaMBG/dS64yANGJfLr0+m/nVGw2vY9vxuMc+F7rWeZJVKzDuHH87tvY43Z 05dX19R6Z/AC+o+G1qLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otMQ9-00DEN8-Or; Fri, 11 Nov 2022 05:17:41 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otMQ5-00DEIg-NI for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 05:17:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA4D661E8D; Fri, 11 Nov 2022 05:17:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BC44C433C1; Fri, 11 Nov 2022 05:17:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668143849; bh=n+aNotBQFKuFcOYsREI/VGTiSdZhVRAVtpMX5N+QlU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xf3V/jkVqHQegrpSr0Xg4J7SVOGlmG0XblfaVvPyDP45FLlyTZlCRO4vCl4QWZzcc KKkXVtDO8r9wBZIAoHXZiN9YxB9mJu5l6bQyAZcirrnsx6zfZ+j3CvlqW06ByoC/kJ meBkKTi41p+cihQnTdk+LqnIXY74RpXEQLORj15YvivVG9y89svujZS8WVbZcK1BmM 2HC1GJTgRINZEq11uLJHAfPUfTSA2/t9Keyy4LXBr22uSnfqwCsC62kzhUyAtMQUat WnkumBt55C1euGOi9hGaXrmzF0h2Uw3Hd8AQSA+Y9X9v9njwJeZYWGUQCOHNu2RKMB EM7JFrWdlq3Qw== Date: Fri, 11 Nov 2022 13:17:21 +0800 From: Shawn Guo To: Francesco Dolcini Cc: Alexander Stein , Philippe Schenker , 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: <20221111051721.GD2649582@dragon> References: <20221102155226.51587-1-dev@pschenker.ch> <4964263.31r3eYUQgx@steina-w> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_211737_861078_83B84FCE X-CRM114-Status: GOOD ( 28.62 ) 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 09:04:53AM +0100, Francesco Dolcini wrote: > 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 ... Thanks for the input, Francesco! Philippe, Do you consider to use usb-role-switch as suggested by Alexander, considering the weirdness of how chipidea driver supports extcon-usb-gpio? Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel