Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp843842ybh; Mon, 13 Jul 2020 02:47:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyacgJPgCBSN3IZW65dLOJesdDKp7+MJbbSd0Oy1IPV3tFxgNRIph7yIY6V/JUZnABo15k3 X-Received: by 2002:a50:d513:: with SMTP id u19mr87559842edi.241.1594633631576; Mon, 13 Jul 2020 02:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594633631; cv=none; d=google.com; s=arc-20160816; b=I1VA46UyW1DmLaQ0ZCim3c5+25DCjCo6x+9qAyxAetP/aWX6Xny+uUv73rtFTQSH+B 4ohZcWW1dlvvD9L8b2YogYVXGhPpt4Oa3JBIOqStntoiniX8vxyTX31GUxh3pzHb4qWz VtaSk8iXyOUTqx2AON1KB+fnHvHmaKkXAgVbEOt6zsuOcNgJWtwZPda+Ukubq4YyGgk6 Q3nQixfcyDDHHMyZKXWFsg4yBqeWFxtcsxOY0NWQIxDBygvlqYjucAOAU5sfpSSR36Iu 57Je7yvF4PnoJJjHnEkE3s0r7Wflls+jaqoPdDD+q0zeMJFMoo2hD8BjralCTQ50qi/v oINA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=4h2jr/McjQoDlRSpgmiKjnHguRrDtEvCZBCXYemyAEk=; b=yL3N/XAkyft2sg60LQHhLl/kifeVZZEXcLVOWmbZZ4l5lW5bNq95/ZV5PpnSLhxKsn BTAgqAkypbZekrJYvda5y3yvpwtEgxqPS4Ixw4qipNKPDwkM8SNsF7m4oHloPSHVW93E adSZ/Vb6IyZFUHnCdXYs97ZYUmYdMuBme87RwXS1HOL+WAEinNGQ5qGk0UpoQ+xvHM3C lNYBEw+4zBlmbEmR94Snw5YML9lWU9MPSGMpx/kPtF8fkES4R0j9NPLuVdmH7xc8UFyP 2rLcdooe5SGcHwwIuRTM/49o5rZMwT7c9o48XThHybFyQ8ySktI+z5Y7J5TDenNLcT+e 5vGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd20si4500476edb.136.2020.07.13.02.46.49; Mon, 13 Jul 2020 02:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729331AbgGMJqL (ORCPT + 99 others); Mon, 13 Jul 2020 05:46:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgGMJqL (ORCPT ); Mon, 13 Jul 2020 05:46:11 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF07DC061755 for ; Mon, 13 Jul 2020 02:46:10 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1juv2E-0002EX-BQ; Mon, 13 Jul 2020 11:46:06 +0200 Subject: Re: [PATCH 3/3] ARM: dts: colibri-imx7: add usb dual-role switch capability To: Philippe Schenker , devicetree@vger.kernel.org, Shawn Guo Cc: Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org References: <20200710132423.497230-1-philippe.schenker@toradex.com> <20200710132423.497230-3-philippe.schenker@toradex.com> From: Ahmad Fatoum Message-ID: <73240ab0-5069-40c5-4ade-7fcc2207dfaf@pengutronix.de> Date: Mon, 13 Jul 2020 11:46:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200710132423.497230-3-philippe.schenker@toradex.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Philippe, On 7/10/20 3:24 PM, Philippe Schenker wrote: > Since the runtime-pm wakeup bug was fixed in > drivers/usb/chipidea/core.c usb dual-role host/device switching is > working. So make use of it. > > Signed-off-by: Philippe Schenker > > --- > > arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 9 +++++++++ > arch/arm/boot/dts/imx7-colibri.dtsi | 4 ++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi > index 97601375f264..db56a532a34a 100644 > --- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi > +++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi > @@ -20,6 +20,14 @@ clk16m: clk16m { > clock-frequency = <16000000>; > }; > > + extcon_usbc_det: usbc_det { > + compatible = "linux,extcon-usb-gpio"; According to 4602f3bff266 ("usb: common: add USB GPIO based connection detection driver"): "the old way using extcon to support USB Dual-Role switch is now deprecated when use Type-B connector." Have you considered using a compatible = "gpio-usb-b-connector" child node instead? Cheers, Ahmad > + id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usbc_det>; > + }; > + > + > gpio-keys { > compatible = "gpio-keys"; > pinctrl-names = "default"; > @@ -174,6 +182,7 @@ &uart3 { > }; > > &usbotg1 { > + extcon = <0>, <&extcon_usbc_det>; > status = "okay"; > }; > > diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi > index e18e89dec879..caea90d2421f 100644 > --- a/arch/arm/boot/dts/imx7-colibri.dtsi > +++ b/arch/arm/boot/dts/imx7-colibri.dtsi > @@ -457,7 +457,7 @@ &uart3 { > }; > > &usbotg1 { > - dr_mode = "host"; > + dr_mode = "otg"; > }; > > &usdhc1 { > @@ -486,7 +486,7 @@ &usdhc3 { > &iomuxc { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio4 > - &pinctrl_gpio7 &pinctrl_usbc_det>; > + &pinctrl_gpio7>; > > pinctrl_gpio1: gpio1-grp { > fsl,pins = < > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |