Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1187418rwi; Thu, 3 Nov 2022 02:08:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50Fk+0u8uvWl4a2wZrDK642kOK2SFw6UWMe7tNnMBBRuQDPxPi2Pr9LnffHiDeQ/XZ86h3 X-Received: by 2002:a17:907:703:b0:78e:25be:5455 with SMTP id xb3-20020a170907070300b0078e25be5455mr26868067ejb.630.1667466483764; Thu, 03 Nov 2022 02:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667466483; cv=none; d=google.com; s=arc-20160816; b=A+dzk3HwZ9imrzpIQnQ7U36J6VfcF2jbgK2EmUuCmwW8q+77L7WOYWWrNWBm7Xhvda AH0HqtH3swTKFQvLchKtFGKkRx+q7nDdcvfO4KIuHJys2+1Axz1fTzyKZccrR1Oeh+sU maaBf8exsn9yQspuDBbwL+dX1eW7d688uyu13NKrg6Yq9avkXDjOjzaHXVv38nYI0S8w qVK/fH0oVs69pz1kKT4fglBpJHj1lvRosvECPwY7FZz+RPuNocg1PNaWo1bqQ+mE4LDh gsK+vBqzGZPaLd1XbzGAxso8m+V8OKhdLvbtOcjpFXEDhHteI9af3Kx/ZOydESAtVUh3 O6QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hEW9ybZkw8nxiuwRC30Qk7qrRdPsD0lDOxFLQxAysyc=; b=xSOaFNTrT6Fa9edvEvQJZpp0wx8ktnE3kY1Y9TTp2Exg9XNm4PDw8y9qIjDW8j755i nV98vR6g9ojWj4uv7D42Y03A9CrjGg2zNI0trQ2B3QI3G+xgBo5E87lelEH9hrINCeJn 2+Gl3V/uDIc4Fg/fnW9v2de+iFDcQF30whhtmMFdzVkKv75MZK4f1yq3FLYu7Y3UrHIL ektaOxZiOSqWrqBhxmAnx6TWfKvdYI/DI03qnZxkHpBbH/meT4iVoAH9seeFMEGtv8lE 1fFwu87OUfvjJoe9PyIwmGUfS9zkhbxW/HS9mHj6oVRN52Q54Vvv8ZiLHgqFgIMUX6U6 5KdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailserver.it header.s=mailsrv header.b=1OFovVjh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170906728300b00767e24156dbsi591513ejl.256.2022.11.03.02.07.40; Thu, 03 Nov 2022 02:08:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailserver.it header.s=mailsrv header.b=1OFovVjh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230273AbiKCIQA (ORCPT + 97 others); Thu, 3 Nov 2022 04:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbiKCIP7 (ORCPT ); Thu, 3 Nov 2022 04:15:59 -0400 X-Greylist: delayed 617 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Nov 2022 01:15:55 PDT Received: from smtp-out-01.comm2000.it (smtp-out-01.comm2000.it [212.97.32.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA45E14; Thu, 3 Nov 2022 01:15:55 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4964263.31r3eYUQgx@steina-w> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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