From patchwork Fri Jul 10 13:24:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 11656663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B3E714E3 for ; Fri, 10 Jul 2020 13:26:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32D4E207D0 for ; Fri, 10 Jul 2020 13:26:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BuOC5Glg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=toradex.com header.i=@toradex.com header.b="oKPfuyiA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32D4E207D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=toradex.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=I+wEWt5AcQk5mtZ5SEO7GELjnzPXvAcPNGHrZ7bt2/8=; b=BuOC5GlgRLyCl9A/LOTnw9uFX oKqHuCg2j9WNq84uUTfe6bAdAAufgoNVeyRJHJ4K635BO7mNWzQmIUWbjbzRcdwp0IMTWQYApbj29 jlE5cNUo4AFMbyWnuueEbMKkc0OX03eFH1F2CP5kAJRTLEAGml2bL6ayuebqsBOTXTcTXQ5IK+qF/ vdhgjTC5JSEe0t7dyHenXGwTDUbcwZCiUnelnJcA13PN6zxtZHFUzljXjZNar2I3ZSpsSwb4mdjRa pm9g+bdJF4jKYzOGZz4vXG6+o/meFbLxdPGWQgvaTkT5N6jEg+GEzCziU1gPYNY2domCpwnrbACCL 23i1pjrqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtt1S-0004dD-DZ; Fri, 10 Jul 2020 13:25:02 +0000 Received: from mail-vi1eur05on2125.outbound.protection.outlook.com ([40.107.21.125] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtt1K-0004a4-Ff for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 13:24:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eOGl0ydnyXGQScg2pqemv3sU+Vg/eaLmIW4zLws70fIJ92qcMod0dXHlWn6ymHZMCCFy89XnqMdXTmRZAauGmsWWJtohZilxCIZqC90uAjIsCyZfcABcEO/S4pXapd81GZ43IEaAsJMyvHQagy6mafBGYi4UMnynmlZHUCc7SgYAiFTwYZxBxxHrbfMoLXOptjcTDQI+pJbzoaRwKjrYgu/cS8zmxdpndYXojxra4zlaH7juiYgVuoh9iv4QPm+nNUfGXtqtBnjJleSvaG6ZUWhA3FpEPdw7FzB402T/a4ddLFcg5i16ktcsihEFCCPu7jksHk/rqW7prE3TdiensQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lUtaa33meW6NoQa3GEY8lq/xaXbnHOYW82NKhOq5xLs=; b=WUmNW9efErzSqZ4X2ImrZnnxxRkiNCv9OnqGOUNUYVL9JLPInIVeHvkZ7HUZzxlac/y3BBTvYL+pSTEmIRERh+5Zn5QkAg963rqTW84gnbdLnnQ81tq/u8xZ0wQEdV6gV4ekeFlfddHawgHh8+dXBYFFEl+hhztTTjy66ADiP3/Mqhb/viXgQW5FbiBkExEhCVvGKOWizZCzTrpgkSlER0T6NDed3Sn5832/i67KGsEvqL577Rpt5VvbAwDW9b4iqGsYpgVlDco5sUEXRz2PK9K2Ftbrmuug+izJii9tCyAhFWGsbJwZjfPAfSVXwa8DUkphY3NIF8EaEc/C36EEFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=toradex.com; dmarc=pass action=none header.from=toradex.com; dkim=pass header.d=toradex.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lUtaa33meW6NoQa3GEY8lq/xaXbnHOYW82NKhOq5xLs=; b=oKPfuyiA/kKh83wHV17/vkOAICKAKduV2MEhUhAozrskRV0fandpXQciBVJkLMPSF/i+17P+1gxGfibp4hvVHwz4eH5DcBXuUqHsMV5rghgNkXlAw2LlzDOMTCN7pKacYB0BorHkA52HkSDYUzkh0WPqfLJwQ6zlyBGbra1F/PI= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=toradex.com; Received: from AM6PR05MB6120.eurprd05.prod.outlook.com (2603:10a6:20b:a8::25) by AM6PR05MB4821.eurprd05.prod.outlook.com (2603:10a6:20b:2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Fri, 10 Jul 2020 13:24:44 +0000 Received: from AM6PR05MB6120.eurprd05.prod.outlook.com ([fe80::1d81:6a9b:8c26:3b7d]) by AM6PR05MB6120.eurprd05.prod.outlook.com ([fe80::1d81:6a9b:8c26:3b7d%4]) with mapi id 15.20.3174.023; Fri, 10 Jul 2020 13:24:44 +0000 From: Philippe Schenker To: devicetree@vger.kernel.org, Shawn Guo Subject: [PATCH 3/3] ARM: dts: colibri-imx7: add usb dual-role switch capability Date: Fri, 10 Jul 2020 15:24:23 +0200 Message-Id: <20200710132423.497230-3-philippe.schenker@toradex.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200710132423.497230-1-philippe.schenker@toradex.com> References: <20200710132423.497230-1-philippe.schenker@toradex.com> X-ClientProxiedBy: ZR0P278CA0015.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::25) To AM6PR05MB6120.eurprd05.prod.outlook.com (2603:10a6:20b:a8::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from philippe-pc.toradex.int (31.10.206.124) by ZR0P278CA0015.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Fri, 10 Jul 2020 13:24:44 +0000 X-Mailer: git-send-email 2.27.0 X-Originating-IP: [31.10.206.124] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 07e31297-02b3-454a-0d70-08d824d49c45 X-MS-TrafficTypeDiagnostic: AM6PR05MB4821: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-Forefront-PRVS: 046060344D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: smGNKQvJt45kB2SmQr1L6LjvoqxjYpasQHFFHias5RYsWyz/SgSLqHOv97PmwGw82f4fXaFwMgqjYLNlawTwK2xoIFZR7I201GzqyD29NlgUpY8oC+RFBnTYspHLFv3jMmvZKJoGzBEO+VPanDjE1QVQgvhwhKN6UOa/RpLawEhgSlUx7Yr9Rz7E1dsXTAc++JEsojlLB/DPbBNWLwmD3EU70QOFS3XGbnChMFQIMQJT71IxLQ36/rjq87DbL7c8Yj4MfrOped8R4WEkfyxZSTpVeIlvWb0TWacLHSquQ1wMjfriRWGOOdAkScWHnR6BA7yJvgBYW/FTczMu/56RwMwYIBNLxGrFbOU8DKhV2eUL6eVYp89ncqbwsuzfe/c/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB6120.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(136003)(396003)(39850400004)(346002)(376002)(1076003)(66476007)(66556008)(83380400001)(6506007)(26005)(6512007)(8936002)(54906003)(44832011)(4326008)(2906002)(316002)(6486002)(66946007)(2616005)(956004)(86362001)(5660300002)(6916009)(478600001)(8676002)(186003)(36756003)(52116002)(6666004)(16526019)(16060500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: NQVldgGFMkhtaHesRA47ZiRMK1v+JAve8GRGHsJPV88ujjeC8PxPFS5NUajrn2K2c5LLCgn45wX9/yCdtxgX0w069iF1AzkhVA+3owEDdYaXgkmdauAl06/F02XF71chckjg40VChuUulhEC7OMtNsUjAPJcFB7TG0CGeYZRGmTHeqLjSFw6rS1bbEuu9HBTMot9hlzf93VtWPLC+BtZL/Z03MHX2kx9g2XExiLS9+X5okqV/JDpng4F7BbQVdYnW+N4xXYvp7qqUrjYOaLHtk31L6V20urngsevGEEE4d3tjvvkxnLLO078DsRz+cHIKUDNOqgjKc2U5fnwEs2WZAyHiTc2vUvxk78Q51qIikSUcRXpr5B7hz3fQtLjIqYOKuzLe1DgrNJboIAnUvpzUZabSmyW2QmRWxNoRKPvWhEc95CXu/Dek8cr8+Y7HIg/cvmsJvbUmJ14fqzA8WEtjc4bys4NkcwpWQotzt05cpk= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07e31297-02b3-454a-0d70-08d824d49c45 X-MS-Exchange-CrossTenant-AuthSource: AM6PR05MB6120.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2020 13:24:44.7732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CYhO3VL+uzksSz3XNQ0RTX4cungh/QLa1VAqgJiWdt5j/hb9rAp1QB6ovfT/AJvTYmbys+r6/ln1Z+GmuwvlF7t31LfkenKH+icH8nLrh3I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4821 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_092454_550641_547D85FA X-CRM114-Status: GOOD ( 10.86 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.125 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.125 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sascha Hauer , linux-kernel@vger.kernel.org, Philippe Schenker , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Reviewed-by: Oleksandr Suvorov --- 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"; + 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 = <