Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1169827rwi; Thu, 3 Nov 2022 01:51:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5kVu9QQ1J4vYGd+swRDVKEyXyNizsazDG5mlVgY8R2rDvs9BXepJstNMxVF6jU/sqbapPe X-Received: by 2002:a17:906:9bed:b0:7a6:a68b:9697 with SMTP id de45-20020a1709069bed00b007a6a68b9697mr26984994ejc.218.1667465487068; Thu, 03 Nov 2022 01:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667465487; cv=none; d=google.com; s=arc-20160816; b=cUaU13ONtfSnDoHKyasfPgvhKXDPGrlVwNnvpSLjC6Xs7CKNXnxmhtMSOEKPSbVtUZ WJqAioRsF+V4DbAPK/fqsuRYvpfgmK6GUWJVPGVSovO7ihNU1817+K5qc2Lq/YBQppxd srZy++DpHddjUsfFRLJH86kxL8yoY7ppgC2GujvPQxnb5R6y0A9GPtPeo//1Q3VeskCa Dl2VtWjB5ei4IERImrPB9mQL8TR1Vj+bSZ27GgQJ5QG8jCAeZ9gkWgdim24hg2mo9+hJ HRVfL17yBhWTijctr4wSRXRqpHlUXqgDUZp7kmGIpo/aJW5dTZT2lAp/GkDZTxZyFlHW OlOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:cc:to:from :subject:dkim-signature:dkim-signature; bh=cRwPWrkGE7degRDri4hXYNTnqTFNSsZa5q0SiPQaUTA=; b=p0r6zRJTFuO6QvowkbIAKnKRsNeYeCcxGnNx7CLBUYf5tYxH2qROpKfQJG0prvWqUC hTPbIOpQAbnrxd+OAQLMBkZ2vbFxbOXa8DrHCkI7Gh/ZiYiVhe+PqXKIoeedvVDK5uU7 jV61eWYIWERBS2JurM2mkEuiOQOh4I6fq5XazcE5qQFySxcSO8y5KdkRbyfqbuJnfxS8 k2OKbfs4DYBQ2sxGeRpH4o63JkANY3gpRrW0D0u/7RS3TW1ZDShcOegx9BCm4BANaSNd QRskl/CISKHn8YJVGIw5uZoKB4xkm91mvs1MeMCtZsBOAfH/jYnkj9kYhRoKp4E9//lI 2g8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="A2ZK/pcJ"; dkim=pass header.i=@tq-group.com header.s=key1 header.b=jG4qNGDi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd18-20020a1709076e1200b0078debc9d30fsi626795ejc.45.2022.11.03.01.51.03; Thu, 03 Nov 2022 01:51:27 -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=pass header.i=@tq-group.com header.s=key1 header.b="A2ZK/pcJ"; dkim=pass header.i=@tq-group.com header.s=key1 header.b=jG4qNGDi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbiKCHrL (ORCPT + 97 others); Thu, 3 Nov 2022 03:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbiKCHrG (ORCPT ); Thu, 3 Nov 2022 03:47:06 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 340FD2ACB; Thu, 3 Nov 2022 00:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1667461625; x=1698997625; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cRwPWrkGE7degRDri4hXYNTnqTFNSsZa5q0SiPQaUTA=; b=A2ZK/pcJIxXevsN3BIjF1fs3wtjKEaFLQ7peERrcnOK5gKWB3nw8AndO iG+uT/KTdNUXLLnEJ4jen/VNialYs0W+tviZXdJKBW307nDCDqf4nO41P reLXuQdkLSC6wYnLFW/SnGFJCdnPNRqCmYCi//LQzx7j2n1mzwiA2IKyH 37v42yXVJwzmRdbVXVhL4X4VRPyGlrmNhk+dio0mtSzAAedvMkXMwR5Pv bDDTopuNKn1SG1KfW2/xvqL3lB7nKRbnhU1dS3XPtqYqC+eD4WkrD1s4Y JTXkoVApYcGTPXvvwG95hTiec1VxFXzsh5fwuZnZgkEQjn+CbCDGI2iLQ Q==; X-IronPort-AV: E=Sophos;i="5.95,235,1661810400"; d="scan'208";a="27125458" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 03 Nov 2022 08:47:02 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 03 Nov 2022 08:47:02 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 03 Nov 2022 08:47:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1667461622; x=1698997622; h=from:to:cc:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding:subject; bh=cRwPWrkGE7degRDri4hXYNTnqTFNSsZa5q0SiPQaUTA=; b=jG4qNGDicOAsZKHjaqo1RtWVOnk7Sg6OEfKudFXSye7e1JMTSmxI3ZVl QC+DCn6RnRS2+wBnI2VHYZNAKZmsr7zJr7E+o8r9TC1yBP9qQF87v2pqG hbrkt7uL5cyM3XtyNuNSgpb/AaW8TdKkwL2RQ1QK+odYeS53dEfK7UpfN 7Hsccwla4QvbUEC1z3f2GR3IMe7lkuYUkxhPGyHgGLToeqfnXEFExH1z1 MDKmAwIyYiJHzaXt3dFATeUqKh1xQrgp2tG0kysBX5NZav2jk1BdbROlW nDe4i9D7WGECE0t5bXBesJmHOe9SIUn1wMMCQzWs6265abfS9uFMr9mO1 A==; X-IronPort-AV: E=Sophos;i="5.95,235,1661810400"; d="scan'208";a="27125456" Subject: Re: [PATCH] ARM: dts: colibri-imx6ull: Enable dual-role switching Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 03 Nov 2022 08:47:01 +0100 Received: from steina-w.localnet (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id A1271280056; Thu, 3 Nov 2022 08:47:01 +0100 (CET) From: Alexander Stein To: Philippe Schenker Cc: 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-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Philippe Schenker Date: Thu, 03 Nov 2022 08:46:58 +0100 Message-ID: <4964263.31r3eYUQgx@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20221102155226.51587-1-dev@pschenker.ch> References: <20221102155226.51587-1-dev@pschenker.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 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? I have a problem on imx8mm (same USB host controller) where on USB device mode no device is attached on host side. I fixed it by using usb-role-switch instead [1]. But it also works on imx8mm using extcon with two phandles instead of just one. Regards, Alexander [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/ 20221101093031.278241-1-alexander.stein@ew.tq-group.com/ > srp-disable; > hnp-disable; > adp-disable;