From patchwork Wed May 17 08:19:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13244422 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54E10C7EE23 for ; Wed, 17 May 2023 08:16:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229802AbjEQIQS (ORCPT ); Wed, 17 May 2023 04:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjEQIQQ (ORCPT ); Wed, 17 May 2023 04:16:16 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2068.outbound.protection.outlook.com [40.107.241.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363661BE7 for ; Wed, 17 May 2023 01:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WU+KNMERrUH9dblr8BnscV4gf3anqqXwWk0DgQfS3x95JmoJMl8ybHacwYILfhWpLt8g9Qqix/JDXBan1ta80OB6wF78v2I3n9T/Vio1MPE8oylkXoTkgWIInb/ku9XJqW3BQeA2gbsSsCHFW/4yZl6MPbRBtvXTQbMnCcNbVHqfn9tUdvGrw1uhDOFp6YF06gQzGfbqqNyANyH3RJFKpbb89bKOKZoiyAH/4RHGrFo0ni7J9v9SBei+aadFYmZNcvxwMUkMqWsaRUoUvKXIPJitnzxpYezLvoCwd0L9s66gQL1HaWLvhYOiT9dfN81X66LnIDc7U6eeBvL1HEDK0Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3Qwv1shscJMPJyAoK5jMYOpTvICx3zKvhPBm4MLF3D4=; b=Xy9gpxjYbfg84lw6UPj1kilDDGYdXepKm6lVa2tvUSlb2AOxjlgu5WafqiaIiOBoTAGcDBTlsvqQtHftZjQS9QexMG49kjzkw5Al2/pHQigGgRQDgPOvDbTC0JA7ag2EAEZFRSDPifGTF78CYbm7zN8FrBA0rFYZ76T6Qz8QHyZ8nxlBQwkL4O29ClLec8k3lUeeKmMQ5HN5OofFFIsyfE4wXThJZui+FQXRfKuZ6nDWdSibpnkRcf3fzVG96SRxOE/4AbhHfCXW90Ure5AkekaFjXJeJoXjanMu8gSkeKZ74NmIlYjGLa6sWPpJcaqKICYw6NZf7Hg/EZsGBl+ogQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3Qwv1shscJMPJyAoK5jMYOpTvICx3zKvhPBm4MLF3D4=; b=nsw6R4vuaet0TQkw20SH/qBlptnQQ+aUuXVikukUR6XKk/H8Qk7H712sCIx2KpCT6EMse5pIeY1VR8ifIHfqiWJe0UqD9Z0mSMImfYL+8wnvbZ0GeZXAKhGhJ5h20TD3Ssq+6QnoXp/XYCalYufdxUuAneuvsAPELidjkHaMmpU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) by DB9PR04MB8446.eurprd04.prod.outlook.com (2603:10a6:10:2ce::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.25; Wed, 17 May 2023 08:16:11 +0000 Received: from DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4]) by DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4%6]) with mapi id 15.20.6387.033; Wed, 17 May 2023 08:16:11 +0000 From: Xu Yang To: peter.chen@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, xu.yang_2@nxp.com Subject: [PATCH 1/3] usb: chipidea: imx: remove one duplicated reg define Date: Wed, 17 May 2023 16:19:05 +0800 Message-Id: <20230517081907.3410465-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2P153CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::22) To DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4505:EE_|DB9PR04MB8446:EE_ X-MS-Office365-Filtering-Correlation-Id: b082da44-3b85-4469-9e93-08db56aef973 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QMZyUEiXNzk88Mu6oMK8jApc+ktJMV4x8NmRXwNyAt+hiVdMKyFUflz5U1cQbZNLOUVMnqsiIIDYdATZj6dys5K3X9tJDas1R8+e8mlEj5weTPNUsWL/3aUstnMVY0D+V0LDpoYLOcXL6uafO2TQGhGkl7HqOW1iUF6rlI8PLqkDZNw/Pn6jSGVPutjfWd0Zw2LFtMosb9/mig1NlK469pQ/wJeJklan1XEkdK62xXQaGNBuuGqbHUGydC9ptmrsynFTB5q9qwxLcb8JaXCYPGlj6SBofgFEeCZQlxcipjIdQy3GXi5wD7seUOuad8W2PyxRtf5fAkvohJG5UqqLe7DUs3nqA2jSnq/beF16T4AaorooC2Ef+H2gFEVrY1JqFhoL9T4mk4vwlPmPiPmjZgD5Xs/7UsgmoT3NWCexLfZTZpD1WkIUG976p4h3Mq3a9OXVuJBtzCh4vXgTxaZ02pV0uvzsSkkUgw4swVmLe4/mfknzUJMFjwIMBdHpZDC0imsB3hl0uiBfmfNUmJ5qAwDV9GvznFr54YWn/nc/KCyCqA+XLyo+qXLd4nbntA/QW7wBGBum5RhyNZKAEFOW+uxP1b6GcSoPWHCnQwR9TJMNoIpA8a1v7Sp0eryEvHCw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4505.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(346002)(366004)(136003)(451199021)(6506007)(186003)(6512007)(1076003)(41300700001)(26005)(6486002)(52116002)(6666004)(2616005)(83380400001)(478600001)(66946007)(66556008)(4326008)(66476007)(6916009)(38350700002)(4744005)(8676002)(86362001)(316002)(8936002)(36756003)(5660300002)(2906002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3K3OGswLel6uxkq/uDHTzRt3/N1NNTTKwQsVCcWpO+c7w4a2FMPvxajzKLuWzVzaen7Ej1ECoa5wbo3H4pguFgeuEB8Jm5+8NNijK6aqUnZCv19zqnRyrIS5mEw5+AORXH8W6p3YUCInl5OPffN3+/cgs3l0uc5GaqF1cZxSqX4wXwNPnyC2D045YPv4vM01iD38TA3BwZ3qpJ3IcOtNUdHChywHtaQvYW10oF3T2OmlAR4NlCTVRgKS+6jn8ep1XpSmVUtHzJICvu+4mZTv3Rzxu+chS+IZfw6/Nn4+rF2R5QctpGTeG5Jo+Z4GIIYeeGrh5Kkdd8wFQGTEGX/sf1+tJQ4e7CW7YTkryRF5OD9nH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r5wHfBj1ToKGZQWsusUx34fNZXjOnl7DmZXQILnPV0m0ybiZ/PqLLHUzMuakM/hz40h1uSq7UeyJpCtgBFEfarECvz3QY0SYTbEZmyIeH8WkbP5iTif7LgZaN+hYZ9drI/3LXqtvqm0y1mf1SvKXPzjbD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b082da44-3b85-4469-9e93-08db56aef973 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4505.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2023 08:16:11.5973 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RY1KMCN24LGqBGsAbBTmxkLKyka9QsbvPGbAXFoo4fn+0gH9MonynmIRaL62/PRDy9A0mcp7DUGtkeVPKFbfxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8446 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Remove one duplicated definition of MX7D_USB_OTG_PHY_CFG1. Signed-off-by: Li Jun Signed-off-by: Xu Yang Acked-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index c57c1a71a513..be939e77719d 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -113,7 +113,6 @@ #define MX7D_USBNC_USB_CTRL2_DP_DM_MASK (BIT(12) | BIT(13) | \ BIT(14) | BIT(15)) -#define MX7D_USB_OTG_PHY_CFG1 0x30 #define MX7D_USB_OTG_PHY_CFG2_CHRG_CHRGSEL BIT(0) #define MX7D_USB_OTG_PHY_CFG2_CHRG_VDATDETENB0 BIT(1) #define MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0 BIT(2) From patchwork Wed May 17 08:19:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13244423 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F5ECC77B7A for ; Wed, 17 May 2023 08:16:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjEQIQU (ORCPT ); Wed, 17 May 2023 04:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbjEQIQS (ORCPT ); Wed, 17 May 2023 04:16:18 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2068.outbound.protection.outlook.com [40.107.241.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B177310C3 for ; Wed, 17 May 2023 01:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MY5lxdMvVAoJWF3pfKTiBtWUWYb2pVH37XstTCxKE3bf171SMag80B5hHbnpTEkxvbQMLIodfnaod6z/Pm04lKtNnSxgZOz/YgmnvMLRmih764LXdYw+nqYD0CR8Che8/uLLmrekhdt9YNIgrahbigN7ELqvZU7/DUTDHi//32MQz7/B8Hq76fvEv6yyz0HJqwStJ/soMM0qQDHyksbW+PsA37lHx1OyOCen+wgzcHJ+Zc4hz1WWSEriJ/GzRQa+WkErtywKp2Wl08ieT6oanIKakj2vLVd3039p6X9PTJ8sPtZ+LXUrUkS/qLIoRjfxNfPcfbn93Wmc8GPWcEaYqg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dEoKPlNF9NjziCk89E4G4ETSwybLFFLEQjuXRYLNHcE=; b=So9X7gVszkMK11jxf/dwOER6374nRhGtKgyt/RJsPddng7/C1aoTfNdteXeVxwB0r5zsqphiIPCKD6rAbI2zsXhXJEJKhFtSW6BJPuUOMCe62wwq9LZYO2ov08V3GnQPoX1eQxPrI6qTg++Y1lnlWX0ZoJBs99UhXCF16mUfVzKmSBGhYoBN3rLR/QDimaAC+yWD006dDoYQCJ/KrFq5l+bz+nmrFmpE69jqmyMNWE7NYYmLDljSJF4pYMY342yqjwSyoiGIkIC7sxvO/1+CEojx+cecbdfvjLrNIYLNd/EsO4isb2hApet8gsnZ8sZTAyAa3GsYSVt+VzJqhNwUWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dEoKPlNF9NjziCk89E4G4ETSwybLFFLEQjuXRYLNHcE=; b=qDlMTTDg1GEJ080838H3vabkOoyg2yrshzrlCFi1SbZkssH4ScI7M5tnyf2iACTPa8zVoT2xBhbms7h/Umy/WDGJwGk78IikdW3j8BXPHj0mJ6w0GnW7S40BDdkJhIcST+RMlndHhw6/C7q8HxtnMYCGnsSJC/1WorBz7aaVmKQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) by DB9PR04MB8446.eurprd04.prod.outlook.com (2603:10a6:10:2ce::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.25; Wed, 17 May 2023 08:16:14 +0000 Received: from DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4]) by DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4%6]) with mapi id 15.20.6387.033; Wed, 17 May 2023 08:16:14 +0000 From: Xu Yang To: peter.chen@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, xu.yang_2@nxp.com Subject: [PATCH 2/3] usb: chipidea: imx: turn off vbus comparator when suspend Date: Wed, 17 May 2023 16:19:06 +0800 Message-Id: <20230517081907.3410465-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230517081907.3410465-1-xu.yang_2@nxp.com> References: <20230517081907.3410465-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2P153CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::22) To DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4505:EE_|DB9PR04MB8446:EE_ X-MS-Office365-Filtering-Correlation-Id: 984b9c70-06aa-4965-3675-08db56aefaf8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: boUpMxlTfFShGr2UNdyTfgy9wuFUBZbWdNkiRMy4aOjxlBWaB0DeaQ6pEkiQF9EGlzvXVCvexjxv6ecWhOU4Ku7kaKg9mB3Dolb76itTbuVBJtsIq7eKZJ2mRF8TshpURH40dduRL0sXqmIcoAihf0e5PKigneFRuhNS7nyRgdxPOxJpV4rRFmrWpPd68xeWlWdzP0ZMqxJm8MqOspezVoS6XYHE1h8vkKoK4SckKObUZFHIRf5jCnOPJFNGRQlTnTLT/bG/mMgQszAeO+ly691VvQrA0mheTI9quaILyjHTMx1LsSS9/QaPDTt4Fcv7esQUiLTI4qPfNgJlVnMly7HoBMzLqCk/lxIUnt2/Eputml7kXEYFyAvHBzIZp8JNVZr+C4ggtKeTC9NFB7aO1B7vDk5l+B8+ldpiLSrJbmT8v2k2jh1nFIPgWWWrrb23ru8FsiEKZYWVNJ4/27mDWgj2YenxvrC252ZpEjqLFsgaaZlUnjCL1aNyFFIldhOS256A8ZSAXPNpndmKkLoyJfZ0ieugxde73qIViR5TUzEi58BoCt1I+K8pAH/EdpsAPnAyuRU2t5aktJNvgc7dpEIXintXHoqg9LQt6se6kv+QKPyE1OhTaKLxr7J8yPss X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4505.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(346002)(366004)(136003)(451199021)(6506007)(186003)(6512007)(1076003)(41300700001)(26005)(6486002)(52116002)(6666004)(2616005)(83380400001)(478600001)(66946007)(66556008)(4326008)(66476007)(6916009)(15650500001)(38350700002)(8676002)(86362001)(316002)(8936002)(36756003)(5660300002)(2906002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: h94oash3nbWOtPlBWc0KDZ3HruE89y1e+zIJ5X373r5x3r7ga+Fa9LcCGe6FFuD/smc65hazE86zDBqV0jhtBwrgyO42Q/M4/cUoUMnslhnEPu1r9HCDsmUG+GAqUnbFtcoLVJvFVY3h7QJwMQfIX0nxJyMjzfj0gcFK7KraCVFgx/1sHkc1m8SL1lNZrEHpVo7PjzdHPOQZ+QDVeUqb9DJ62wzLdtyFCoTu9j+hMTGBw215Mgger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pFM/wvqxCUZdG8iJri4YcOTr37vNoAj7ECxT0wdGvsMsJuXE3reHfS3Xdx6StS+Yx0I/BClHtHNFilBnOILx5f0zGxrNjSZ28nPIu2LOsScPhplOwGoJlLrGinL9M32VTNp/xfCwF1b52/L9/utTRVcf1iXGOgKaUecpGat0BZ8HtEHnRxdu2k5aJKUx9HlMYVJBlnv8rrAEnGNdY2V00v94l1Zjv5vrkdbaNTeZyBk1keDdiPT5ZEzzcY7OazLs3EFUisv6cEb80OSViMNRICHHKexLjDL7AJP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 984b9c70-06aa-4965-3675-08db56aefaf8 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4505.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2023 08:16:13.9803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w3DnGM7/9b1AdSRx1A0NGrQZjN5EvbimDnaz/GJT228DIpzK1nWYA4KOvv4VE899iRv3XiBMTZ2XGSQpq6ktoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8446 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org As we use bvalid for vbus wakeup source, to save power when suspend, turn off the vbus comparator for imx7d and imx8mm. Below is this bit description from RM of iMX8MM "VBUS Valid Comparator Enable: This signal controls the USB OTG PHY VBUS Valid comparator which indicates whether the voltage on the USB_OTG*_VBUS pin is below the VBUS Valid threshold. The VBUS Valid threshold is nominally 4.75V on this USB PHY. The VBUS Valid threshold can be adjusted using the USBNC_OTGn_PHY_CFG1[OTGTUNE0] bit field. Status of the VBUS Valid comparator, when it is enabled, is reported on the USBNC_OTGn_PHY_STATUS[VBUS_VLD] bit. When OTGDISABLE0 (USBNC_USB_OTGx_PHY_CFG2[10])is set to 1'b0 and DRVVBUS0 is set to 1'b1, the Bandgap circuitry and VBUS Valid comparator are powered, even in Suspend or Sleep mode. DRVVBUS0 should be reset to 1'b0 when the internal VBUS Valid comparator is not required, to reduce quiescent current in Suspend or Sleep mode. - 0 The VBUS Valid comparator is disabled - 1 The VBUS Valid comparator is enabled" Signed-off-by: Li Jun Signed-off-by: Xu Yang Acked-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index be939e77719d..9566022a2183 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -151,6 +151,7 @@ struct usbmisc_ops { int (*charger_detection)(struct imx_usbmisc_data *data); /* It's called when system resume from usb power lost */ int (*power_lost_check)(struct imx_usbmisc_data *data); + void (*vbus_comparator_on)(struct imx_usbmisc_data *data, bool on); }; struct imx_usbmisc { @@ -874,6 +875,33 @@ static int imx7d_charger_detection(struct imx_usbmisc_data *data) return ret; } +static void usbmisc_imx7d_vbus_comparator_on(struct imx_usbmisc_data *data, + bool on) +{ + unsigned long flags; + struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); + u32 val; + + if (data->hsic) + return; + + spin_lock_irqsave(&usbmisc->lock, flags); + /* + * Disable VBUS valid comparator when in suspend mode, + * when OTG is disabled and DRVVBUS0 is asserted case + * the Bandgap circuitry and VBUS Valid comparator are + * still powered, even in Suspend or Sleep mode. + */ + val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2); + if (on) + val |= MX7D_USB_OTG_PHY_CFG2_DRVVBUS0; + else + val &= ~MX7D_USB_OTG_PHY_CFG2_DRVVBUS0; + + writel(val, usbmisc->base + MX7D_USB_OTG_PHY_CFG2); + spin_unlock_irqrestore(&usbmisc->lock, flags); +} + static int usbmisc_imx7ulp_init(struct imx_usbmisc_data *data) { struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); @@ -1017,6 +1045,7 @@ static const struct usbmisc_ops imx7d_usbmisc_ops = { .set_wakeup = usbmisc_imx7d_set_wakeup, .charger_detection = imx7d_charger_detection, .power_lost_check = usbmisc_imx7d_power_lost_check, + .vbus_comparator_on = usbmisc_imx7d_vbus_comparator_on, }; static const struct usbmisc_ops imx7ulp_usbmisc_ops = { @@ -1131,6 +1160,9 @@ int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup) usbmisc = dev_get_drvdata(data->dev); + if (usbmisc->ops->vbus_comparator_on) + usbmisc->ops->vbus_comparator_on(data, false); + if (wakeup && usbmisc->ops->set_wakeup) ret = usbmisc->ops->set_wakeup(data, true); if (ret) { @@ -1184,6 +1216,9 @@ int imx_usbmisc_resume(struct imx_usbmisc_data *data, bool wakeup) goto hsic_set_clk_fail; } + if (usbmisc->ops->vbus_comparator_on) + usbmisc->ops->vbus_comparator_on(data, true); + return 0; hsic_set_clk_fail: From patchwork Wed May 17 08:19:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13244424 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70E2BC77B75 for ; Wed, 17 May 2023 08:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjEQIQV (ORCPT ); Wed, 17 May 2023 04:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjEQIQT (ORCPT ); Wed, 17 May 2023 04:16:19 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2068.outbound.protection.outlook.com [40.107.241.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25D4510D4 for ; Wed, 17 May 2023 01:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoXLCTR3tLzpiYKKELPsdB3a3G7C9OageiCJ4Hj0PLwDeAXZJTIaYd6xZXi2dmW9D16Hcdbv7urGxlw48ps9Or9MF2TPUYPIP8k/AIMOTPAIQcbeChXvVZT5pETVJcct5JQzW+c6PMy9IKzYuA0C6otLXedJR4uP1JAWG1UOw9o138qNLLvulhLw+eGtXH6C/MfZICUE2eNk5VhMKoKAByJUAMF5CGBd4AQ0wWpW9re7bMqNUnSYfJxphwSP/uxI8JfyYzLes80qibsddB2H5btY4zZKL57Xx5pWbppHb52jICxLz2Us0nGBRi+mNW79evUV3yEf5SflrPdNZMseRg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rc9YhNOfRMJ7yKzt3bml+0dO23RrSJAyJLbkuOoabuY=; b=k20QvlnACVcRssI72aQSOlt9DYGK2K5DLkOgP7I0YSXbjORySTR0PNYSRgYCovur6mlR13LTZdtpL2roWre27G0is/mn3re/Goo6dovcntXDCqKy6LV5VWfxHunSdQquD2p0+SMBX1gEVgQSQW5TZrVRgXDOVOKQjJRKbSG3CTxP7hJ/m2+VNKNdloM32VcKaUf6SCvigppLFGXWhHMA04gB7WuFmMfAcLKLqvubEWvecMGxdOHqLLeemtblNMdM1fQ0Np05zX/g9VkH0pqrNVU0DwxfdNuHFAplWMeFTOwb0dG7O60EVvu1J0t3pJ0DJ2XruH/JdZG9zhJmlyKhag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rc9YhNOfRMJ7yKzt3bml+0dO23RrSJAyJLbkuOoabuY=; b=L8SZAVUHkfFM6SSV4MVCNwGkeOHbxaRfeWQlKl6ek66+IyAdECxZf2az0Vz6FAW8rEF9NkmgXSpZs8LU9KaNs2PggOg32t9Dwl0TvE/chPuNuCXXWJbF5oY6/UuWx1ZNEB5QOYY8jytcnCcbWLrHjfrk9+iykuoAvS3ckBHkuhc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) by DB9PR04MB8446.eurprd04.prod.outlook.com (2603:10a6:10:2ce::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.25; Wed, 17 May 2023 08:16:16 +0000 Received: from DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4]) by DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::f9b0:8c34:e57:92a4%6]) with mapi id 15.20.6387.033; Wed, 17 May 2023 08:16:16 +0000 From: Xu Yang To: peter.chen@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, xu.yang_2@nxp.com Subject: [PATCH 3/3] usb: chipidea: imx: add missing USB PHY DPDM wakeup setting Date: Wed, 17 May 2023 16:19:07 +0800 Message-Id: <20230517081907.3410465-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230517081907.3410465-1-xu.yang_2@nxp.com> References: <20230517081907.3410465-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2P153CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::22) To DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4505:EE_|DB9PR04MB8446:EE_ X-MS-Office365-Filtering-Correlation-Id: a960a9d4-8119-47d6-59bc-08db56aefc67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y+G2x2PiJGEkHh3aXj3Zi5Z3JZ39n2z0cxeQt316CrdE4045Uk2j8R+i00G/7HVmbt5yxWmUAwLKC0701QjNi8/PLyWiaGU5QKdrS6OGTfY3Ka0pJXQJrURWGvAV+aowVpIqdQz5Ju8ufTbi+dee+bl1GyBVCIFO/YJ6G8p/ffCSKoTtBjK/f4LNslQCmeL8DDifd/kgF992MLZjR9nO5DtfWTy7daPk4sn5rQel0KyijJheEoL6LEIHLLAIB33EFb9Qz7t6JLicFOopkNrO05VznGLaOnWPJOD565Z/dzDKGFsS3FFbSexdSbwKa+wK+rcUccC0aEHcqr0p2enMaE25nzJVP4GAu0KmTUjtZHancmABfQQEBeaMPU0KC7XH+5MOca26JZjCiXOq8EkqancMoShFaN5uL0hJlphRj5tiwKZzviRnmwTipjGF2weO8D5SgCgm1y56bhYNXAh26nWB37lZUfyWnwea4gXX5rh2cDgYH2oxeKkzhkMs6Dzq/NndH+FkVpUwwncBqHrLXZcKDcasIWo2iA9JMDb5BhH/vdFVQMpt1+nhYPWPcpgoZJG/xVNOWaOFXZMGw1uIzJ/zZoJcez/hyRKYYMCnePwqiP+cEA294eHnAa+IJ4tH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4505.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(346002)(366004)(136003)(451199021)(6506007)(186003)(6512007)(1076003)(41300700001)(26005)(6486002)(52116002)(6666004)(2616005)(83380400001)(478600001)(66946007)(66556008)(4326008)(66476007)(6916009)(38350700002)(4744005)(8676002)(86362001)(316002)(8936002)(36756003)(5660300002)(2906002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QsROtVuXmSAZA7GYxDwVWJz3qAFY841CmDVAgNQ3O6ZWYJ+J90+2yZCfEJaZQSNc63ySHjLprdVuVf3bZIUR3ZCcasbdOmBC9m8CXyd8cACp/nKAUocw6SQoxnDbWdMwhfDYTRNpmvRimuSGYmq9IngEu/6fNafYQ0LEK/LpFffEls4LDEKSF9CUcXpUv7PCwLGi8x5EsX8V2iVy0EpWNvk4jFB/8/uDsU4axJNPzidss2l+wD5dFW8KRKldernVONeNw99/HZX7Nn7YEQllNcuVepjfV2cNHWd8fu/rE8QmEJ+UHccPWBq7+LXnx7R2EPJDPRp95v3Zib30xy5uy53VzOq55rQkzzo7gFZd9paCiVvFqbhUxdb3D99wUfIsOSXv0qVQhNvUkp3HYJ4npzGhzTQ7FBxCmMKNxcq9lJ2QhdGdwz79St2wsld3DvbJTWlxTPR9dqNHp9UG1zhh6KvfR9mgkpStg/fJ1D1Xt74DaSPP9GU53p8vymx8lA0t3mKokKXmfjw1rtCANFxhNkATOnR+8YgrDiblktS8i7dnoi4ZODABz58gDLF5ex7TQPsoGaLP2zaUHTBU23UcZTQgSOhcfIT9UjGOQTdGWg7GXZi5R9m5vJc2r1z2JwP8i/H32hg8lJOauq2LBo6JBC+5aeu/9Fg/q1pQJ55M7sp1GzOKzduIsG3OTXNR0JK3PRzn6wAc91REojuGftYJKzms64cu+HZpDgbiPCxH37WWDPYWwaWNRvF0dvHKHpkqFoeEhrlFilKpsatFw0hL0hmsFJqi+aDrr4YQ2Jm3UsfBkusnehtxTdQpTrEciqtVPysHtCffRtAssHUWMclUpUtXX/eIAa/puMR7Cx6dyn280V+FdERfdgI7s241XhCfSh30fuyRcZipo43lmeoJs4pV1BhAoVypMpY8SkOTb9VKobZHEQgH2uNcO4LWg8vM1U+8G3oHQatiyvSM6G6YLtcIzait0Qfj4sCbASSk3+c+gB5GlIPaHb4aNV207VFBm2MrIOrSZ0BcFJT2VLJLUE/D3/s+3CQVCiahQfETVgI4nnhY3aY9EWIK3Y4H8+/5kbTa1/mvyLp5D0hoJeAn4O4OfoRmasQ8G4vUZgeAIAiEETezbxdz3GLOD63GQA/b/SgnmseKTRaDBiRCfEUDJQuki83hllbXjnPa+OlkfKcY08JqOY5tfbm4K3xU6Z7ZBf2+X6US0PFhZStP5TAE5Lj+eO8Dy2ROp4n2n6RMf5g/KAHNTb6K92ubMfFOJAOx3QOKCx/uUcmucLrX3mb/IHS5nGqgK6/Ep0PhRSAN7SqNy8n/B9CPV9QngwX9+AU35LMLhV3DtaSYG4VR+Y8a8LkR33GEpWIPUEHAnkuffA+2LA5TpDUtL7pUwLT3DKtnQa7/LBVR48FggX6qhzKyLKjVdPoTsBp9AF8SrGsWMJn8xgsTHSQnS38mKiQt7dmrtZjzdLpC709hQrmZyD1Wp2Y9zWsPsWw5bhCJVg6IAsKfPqAJM8rc2HjgtfxSaDGNEWZu3rVEcLB+7fgk4tNHHl2tX5K/hkf2pcT6R6f/W+9rKdLM+uXKY62X/0hJXBR6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a960a9d4-8119-47d6-59bc-08db56aefc67 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4505.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2023 08:16:16.5272 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IojQIq+dFzfjf17iyXn8N6taKJw1TP+ezpiN5pyeK+VZQbrsCxWBLLzQScdYDhtjEDB7LknTzazumXLj5w/qgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8446 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org USB PHY DPDM wakeup bit is enabled by default, when USB wakeup is not required(/sys/.../wakeup is disabled), this bit should be disabled, otherwise we will have unexpected wakeup if do USB device connect/disconnect while system sleep. This bit can be enabled for both host and device mode. Signed-off-by: Li Jun Signed-off-by: Xu Yang Acked-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 9566022a2183..9ee9621e2ccc 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -134,7 +134,7 @@ #define TXVREFTUNE0_MASK (0xf << 20) #define MX6_USB_OTG_WAKEUP_BITS (MX6_BM_WAKEUP_ENABLE | MX6_BM_VBUS_WAKEUP | \ - MX6_BM_ID_WAKEUP) + MX6_BM_ID_WAKEUP | MX6SX_BM_DPDM_WAKEUP_EN) struct usbmisc_ops { /* It's called once when probe a usb device */