From patchwork Wed Jul 26 09:09:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 13327708 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86C639455 for ; Wed, 26 Jul 2023 09:06:22 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2053.outbound.protection.outlook.com [40.107.13.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57BCD2D59; Wed, 26 Jul 2023 02:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Axv3oCk/XbRXU/sfIpmZY2x9CJ5fY1uNzV7Ez9f0zb/A5UMpI0zFhi0BprjK4seuhTWAgPtgrYRyhbbL5mJhamKQ1KnFeLUq74HYhRyvecm7aWUHikuwOmlsr4ZxqiYymQZWI9+DEBn4AC/0ces3TUOVvEBXY5EQFkS7cIUeAP9liuwP2APZX5ic8dCnBUD1sQ9SNJ0AeDhKU7kUsKe2NjLjXWOWEkE9w81L7LRWpW0+BZxOIKRB3fUVDlCqyWQKyIM1cZPnYuU/K0LeRlWoWL8RLKhDxR++Opz+GYfQC5GFFy+TRg256CryF5PNBDWd0u12taltxMokfkMRGG8/6Q== 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=qkgp1aONYEiXonWIrKmtj4+JiDEyuW/bDkG9WZciH1o=; b=KShjqYrzEUQ1Wb9r0F4CutD9MWMn+EYCdRgL15IBHfRxOPrrtj+havLGr5EUpmHT+O5r+LX1Bc0ATPn3BQ+Qc8uwnqVwE40YmVtE5hdM6PhqGMyzXaHas8TiP8SICvQ4Ba1oacGtRyLZjPJ5usGjuJ72a0J7qb8KIH92tE2/m0Q/tqUJ11yFasGQ6WJLtoggoe3Ka7sxzj1QEG4oKYgZ/hEDwVhGzf5/e7PB5AMTwmfgU+uAnvQWWTduriT5JedzQnk5VMTdfZggBwnyjrFt7l6WGjYlj6RC1AnbzxS9CLyoZlULrKW7Vxn3W046e2kwqLa36NOmvDE2YYAEOOhlbg== 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=qkgp1aONYEiXonWIrKmtj4+JiDEyuW/bDkG9WZciH1o=; b=qcgRGkkp6CqcmJl0X8A69wg0QROsGcJQVX76gEff2rLi0fDQ0nwxq4Xifpj9vf/9iFJF6M3R9wJaJS0JCbNQb2wYHoH4l1O7e+AXEAHVrH2U1kFNieKgswHTNyYRQiEsXfN64BDBAzwW/kUZPYp9GpCw8KPH5oXvqFr38XMDJmo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) by VI1PR04MB7056.eurprd04.prod.outlook.com (2603:10a6:800:12c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Wed, 26 Jul 2023 09:05:30 +0000 Received: from DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc]) by DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc%5]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 09:05:30 +0000 From: haibo.chen@nxp.com To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, wg@grandegger.com, mkl@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, haibo.chen@nxp.com, devicetree@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 1/3] arm64: dts: imx93: add the Flex-CAN stop mode by GPR Date: Wed, 26 Jul 2023 17:09:07 +0800 Message-Id: <20230726090909.3417030-1-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2P153CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::8) To DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4010:EE_|VI1PR04MB7056:EE_ X-MS-Office365-Filtering-Correlation-Id: c9c29d9d-5041-467f-11fa-08db8db775fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RNO7v2GHCoKJOs/hI4W0jMuMs/syjA3j51sEVHBlMCKocbdj5SkE5cwsG5gT5uZYgp55KBS59yhHhXFrwp2EuQQ9tj84K2i2OIvRhcPpcr6rYL862+9h88omybK91H2u35S+Y47F/TuStbMvYgbEhJbb2NQpNi92Exm9bayprrTnawHaHMmmhAslLQu2FMmjFJoFIHEvemjITFxDUwm0HFxI0aQU/ZETZwEcMw6VsuTJJglxd3M4YfeFSL3LNgO5WpOgyLYve3j8JTinJDAJ9Et42uH0Ix3atxZEyYLfGm6JtUvMRhrVbyljIFEzwhQYyL47D8lGpWFqshdnoZO2XIwUT2aLKwQDL/xkcLfOm0XHONlZa+V8OKd8u81k/xHPWJ0OjWLeJV3qjVWpdGz811xGmkf0WXgbLYlUKM+vZ8ciQc+OTHeoeU1e2GH7U+gNhKIs8OgVppxoUkz2SifwTFygNqLRkIYbHZIyZUkHRaQga4anWkU1jpEx8XtUJYqM83Jx28ftuXU3yMpXCVU37u9qiQoGxB2aINf+z8JkE0AklOGkYXDC05U0F87VmZZYIss3GpV+1qaTaqP+f0CkaITkIbIX0m6QqFCAq6bU65TIXnUu82pLozeE92bGqsK6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4010.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(136003)(376002)(396003)(346002)(451199021)(6486002)(52116002)(6512007)(9686003)(6666004)(478600001)(83380400001)(86362001)(36756003)(2906002)(186003)(38350700002)(6506007)(2616005)(26005)(1076003)(66476007)(38100700002)(316002)(8676002)(41300700001)(4326008)(66946007)(5660300002)(8936002)(66556008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yXGUr/iPyPIeu0lyE2pGa0FSS22s?= =?utf-8?q?anwq4GvjimW8+lO6EBLvAlmJlHSTq9vj9LVtnGvjdrwMU4KNiP2Hlob0N4/SGXbxS?= =?utf-8?q?GDO3uD1u2y21bbEyqakCLJMFibEft/gLc7LPQ4Tl9B+rNAvZt5S5bdZYMiKC7+Oup?= =?utf-8?q?F3TXmB3+I88/7m8jNNcesUSFbBh12vHBc7c89+gBoLiZZHxVcY7D3qUvPZjPNwxma?= =?utf-8?q?25nNJw/i6TYKT4FFr9ykc55ldO1HOqosx9Pilg4QRo5NHzCjCL9hfhrHCI8Nk088P?= =?utf-8?q?RxPl0UjYa3NtzUOnofts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rGJwUITZpfXtiBUjV0brsl12vu0PS7wwmUW7phyjWpZhoFrtakA8kyF0NzPkq?= =?utf-8?q?IEXdlqdhFiDxNeeQN1xxnKDYkhEvbyOQledt3ZR/gjgnsBjrgENg+324UCdVa3qrX?= =?utf-8?q?EFf3m5lpqsXOKqbWlNKI55GqakZw480s68lGfE6IIluhBYhUkeKqsHNg040bhkTgp?= =?utf-8?q?KctayY+E5Htk3pYl1kAM76NR+v3ByPDBnFuanzt6ZBdokrEkiY3jdusiTAD5ARPwq?= =?utf-8?q?5wd/s61+B9go1zpIwcEUvoZrXYsH+zgacjKu1QHmGoPzzhiKyUjU5HC6QDKqYI56u?= =?utf-8?q?BRG9h1VDAwJ8Ij5GCj1KdBFFnGrRjrOlKmk3oeBQmyms4eyvGgLEYymsgkMXUBu/O?= =?utf-8?q?iIq8Td1WJHlT?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9c29d9d-5041-467f-11fa-08db8db775fe X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4010.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 09:05:30.3257 (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: 6S8euYm+pM61Vn4Aq1+PA+LMGw9pVs4hj0XDplnLkNb8VsILN8dM2vdEeaM/emiqXO5olAXb+FAgRc2F2p7dKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7056 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Haibo Chen imx93 A0 chip use the internal q-channel handshake signal in LPCG and CCM to automatically handle the Flex-CAN stop mode. But this method meet issue when do the system PM stress test. IC can't fix it easily. So in the new imx93 A1 chip, IC drop this method, and involve back the old way,use the GPR method to trigger the Flex-CAN stop mode signal. Now NXP claim to drop imx93 A0, and only support imx93 A1. So here add the stop mode through GPR. Signed-off-by: Haibo Chen --- arch/arm64/boot/dts/freescale/imx93.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi index 4ec9df78f205..d2040019e9c7 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -319,6 +319,7 @@ flexcan1: can@443a0000 { assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>; assigned-clock-rates = <40000000>; fsl,clk-source = /bits/ 8 <0>; + fsl,stop-mode = <&anomix_ns_gpr 0x14 0>; status = "disabled"; }; @@ -591,6 +592,7 @@ flexcan2: can@425b0000 { assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>; assigned-clock-rates = <40000000>; fsl,clk-source = /bits/ 8 <0>; + fsl,stop-mode = <&wakeupmix_gpr 0x0C 2>; status = "disabled"; }; From patchwork Wed Jul 26 09:09:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 13327709 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AB5E9455 for ; Wed, 26 Jul 2023 09:06:52 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2081.outbound.protection.outlook.com [40.107.13.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3391AB5; Wed, 26 Jul 2023 02:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H3+V7dXhzohwucb/bEpfGZzLYpomjnZ6ASZUYW87nMee85mPqarWGitj1nLEBR6cKFcGquLx7a14nFdpcQv1I7y0HjuVQ8cgt0OyRR2rhR55HkHQINneUE0HW8g7scQEmx6LC4QUisRbF7iPqqpv6MPhp9bompWJGCdA/MPYC34vByPgMOEBDkDsU7c9mTl7golLIPDUbCoilNP4Vmj0T4IG4rVyKSnuCDVXz9VI+IbalzuU0DqnzYdfO7R+kL3LuIJPg2Sv6T3KjBGSQ2Kol0V/1fTOcdPFId4PhAMLe+5qkiCBep6WOqmOH6SSQHAF6xdMZVy/Ds6TRU6gahr6bw== 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=uSwo/TnEqDXh8/tpa2MZKXk+pxxpbNGr9bPHDr4nAuo=; b=P+7vpBIER6FOzaUiThELZq2J36nOVZNukJQF3uaDN0Wj2OCCWoD9xR+wYlNNkKarsDm61u2rNmmijcsON0XWFrHKWlq+4hgINdBGxMkArc+CWfTyo+5k0WKsBaPdouGjknNHA8BlchOozIWQD9InC39NkEE5wD/cg8vjAxQwHPetsq741iXiWQs0GPdEznMQMD0oVZ8t9zo2NzVmkst7/OHuzLIj4fw1wnPKDUAUpQTS2ZtUBgG2kPLhHu9f9nMTpKVm68L1TJyLLvDt4aqnCz/dPPrlB12EzMaeDHGEZ+OtM2p7njArS0FKe8pprsGQD2w/N8kwV/DUmFeSrlrojg== 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=uSwo/TnEqDXh8/tpa2MZKXk+pxxpbNGr9bPHDr4nAuo=; b=XXI6n25mti/aBnUA2AxL8y5JDXjyXet6uzPboRGkEz4Ryfl5hF/OQ4to1V/rqFyF1tmGnTdv+st9lMBM3ERFGAUUs+mpLMbsV20Jm59ZN/ZpuqoOYcSCw7UXm8lMX2+G0RCRnYWOobPRwUwe4Oc5Vbf+TA6MULoTMH4l0ng/0jI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) by VI1PR04MB7056.eurprd04.prod.outlook.com (2603:10a6:800:12c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Wed, 26 Jul 2023 09:05:35 +0000 Received: from DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc]) by DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc%5]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 09:05:35 +0000 From: haibo.chen@nxp.com To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, wg@grandegger.com, mkl@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, haibo.chen@nxp.com, devicetree@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 2/3] can: flexcan: remove the auto stop mode for IMX93 Date: Wed, 26 Jul 2023 17:09:08 +0800 Message-Id: <20230726090909.3417030-2-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230726090909.3417030-1-haibo.chen@nxp.com> References: <20230726090909.3417030-1-haibo.chen@nxp.com> X-ClientProxiedBy: SI2P153CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::8) To DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4010:EE_|VI1PR04MB7056:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cf77a1b-2e57-41c6-b8df-08db8db778fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ip9rW1QHy3HfSn+MFF/jCF1JcpRZcVWTdWmBPe0HAANjwA8+cQ7F/D3XRa7cZfnwIJRdWKjGwTQWCkr+rCnYGFmPI66EBPJ+XqCdugilUb7uIb/PVmFTcJ6bEEXYzKPL0HeDBRCpplnV1Ru4+CEaoEe4zt6/Qx7AtDQ+BXcX/OzkHQAeM0y8Vn++KNYRe3q0yRYUR/wg6IwcYM4254HFoGfqnOsFf9s87kvHpbvKHWc8c0exIg1bTLSO+p/Qmu5VaGYvixhS9llTDRUZ/fEDGSa9LwxHF87kR6UMtSfzCUqq6S71GIWgIyCxHeqLCVw5gCDRxvS+U+TsUjV7oNHYZx4sICtSRLZz1ZFwqESr/0iOg5M9YsOC2a2TU2ALZvUuKw5lUSW/RdUUvxtUmOdkUHXMQrNrreT8jIEUjPN7VkhUaXCZGE4psRuQyEg3FlsfF66jvCRA2ymv0PqlWp+0Z9lMax61TsY10HXWzZmTYo46kk/ZvK9gTZrbseZU/DVSVP1CkhGnmqChb4taVvONaGrqRb1RsBbresG7ES+tDNpW7VPEvhx2suMbO4oQUZduSrqcmoNYl946FnHE3OS3EFqBEneWFgLaW4bA/3TJ8RBHPX6PyVlg0dNPt9GVL40p X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4010.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(136003)(376002)(396003)(346002)(451199021)(6486002)(52116002)(6512007)(9686003)(6666004)(478600001)(83380400001)(86362001)(36756003)(2906002)(186003)(38350700002)(6506007)(2616005)(26005)(1076003)(66476007)(38100700002)(316002)(8676002)(41300700001)(4326008)(66946007)(5660300002)(8936002)(66556008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ycTuBlRR7+IN/G19ZUKTH8CZDSR4JiAteDag9wBj/xVOZ6YclwIGIUChnm4Rg1BFNBF7r2CvEbDXKTdabzw4JcOZMxSlYUSsgWBSscJKzOZOCp6qM7r7cK+5pKIyk+dhQ31ZEvvSXdAFf8K2oTznZuCvnNAKdLLKjzsKMvM7iceZLKneQ3N+z7aaeSlNYFyFArEhfndFa5NMP8EzLMmWjozAMd1B7do9LhCwO+8DP6uYo6Kh9i1WeK2AReTl0m9He+pKoulJ3yRqdHM8SpmrgOmoDdp5nlaArgGlBaFqVtoHhBDSvX9sR80eTTjGIa1/JOpICuXTRBsfqlDDYF6rswKzVlWPwZJWzHBOfsZA5APe4COqDLMUJVfZr2ZRyf9wiGBO2CSBa7DoW7PO3rZ/4odGczXB27ub0BIQetnXH1sDYXPkFfssiCKVhsL9Kk3SrlDBD/Zjqtv3ffapccMXYKprjFbgSTuOE0U5Eo83KRPEdZppAC5KzRkjs8sNdQdaRXHAyxT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DK9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cf77a1b-2e57-41c6-b8df-08db8db778fd X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4010.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 09:05:35.4083 (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: 5SQKXb9Ak3VHhCcNkJvBnDR6sdo5LrMaxPqvJYhrGrdMUgsPVoXPlVPO0FZADWsZ54Sq9kkV5bjUlF6klKaL4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7056 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org From: Haibo Chen IMX93 A0 chip involve the internal q-channel handshake in LPCG and CCM to automatically handle the Flex-CAN IPG STOP signal. Only after FLEX-CAN enter stop mode then can support the self-wakeup feature. But meet issue when do the continue system PM stress test. When config the CAN as wakeup source, the first time after system suspend, any data on CAN bus can wakeup the system, this is as expect. But the second time when system suspend, data on CAN bus can't wakeup the system. If continue this test, we find in odd time system enter suspend, CAN can wakeup the system, but in even number system enter suspend, CAN can't wakeup the system. IC find a bug in the auto stop mode logic, and can't fix it easily. So for the new imx93 A1, IC drop the auto stop mode and involve the GPR to support stop mode (used before). IC define a bit in GPR which can trigger the IPG STOP signal to Flex-CAN, let it go into stop mode. And NXP claim to drop IMX93 A0, and only support IMX93 A1. So this patch remove the auto stop mode, and add flag FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR to imx93. Signed-off-by: Haibo Chen --- drivers/net/can/flexcan/flexcan-core.c | 37 ++++---------------------- drivers/net/can/flexcan/flexcan.h | 2 -- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index ff0fc18baf13..a3f3a9c909be 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -348,7 +348,7 @@ static struct flexcan_devtype_data fsl_imx8mp_devtype_data = { static struct flexcan_devtype_data fsl_imx93_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_RX_MAILBOX | - FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_AUTO_STOP_MODE | + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR | FLEXCAN_QUIRK_SUPPORT_FD | FLEXCAN_QUIRK_SUPPORT_ECC | FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX | FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR, @@ -544,11 +544,6 @@ static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv) } else if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR) { regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr, 1 << priv->stm.req_bit, 1 << priv->stm.req_bit); - } else if (priv->devtype_data.quirks & FLEXCAN_QUIRK_AUTO_STOP_MODE) { - /* For the auto stop mode, software do nothing, hardware will cover - * all the operation automatically after system go into low power mode. - */ - return 0; } return flexcan_low_power_enter_ack(priv); @@ -574,12 +569,6 @@ static inline int flexcan_exit_stop_mode(struct flexcan_priv *priv) reg_mcr &= ~FLEXCAN_MCR_SLF_WAK; priv->write(reg_mcr, ®s->mcr); - /* For the auto stop mode, hardware will exist stop mode - * automatically after system go out of low power mode. - */ - if (priv->devtype_data.quirks & FLEXCAN_QUIRK_AUTO_STOP_MODE) - return 0; - return flexcan_low_power_exit_ack(priv); } @@ -1994,8 +1983,6 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) ret = flexcan_setup_stop_mode_scfw(pdev); else if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR) ret = flexcan_setup_stop_mode_gpr(pdev); - else if (priv->devtype_data.quirks & FLEXCAN_QUIRK_AUTO_STOP_MODE) - ret = 0; else /* return 0 directly if doesn't support stop mode feature */ return 0; @@ -2320,16 +2307,8 @@ static int __maybe_unused flexcan_noirq_suspend(struct device *device) if (netif_running(dev)) { int err; - if (device_may_wakeup(device)) { + if (device_may_wakeup(device)) flexcan_enable_wakeup_irq(priv, true); - /* For auto stop mode, need to keep the clock on before - * system go into low power mode. After system go into - * low power mode, hardware will config the flexcan into - * stop mode, and gate off the clock automatically. - */ - if (priv->devtype_data.quirks & FLEXCAN_QUIRK_AUTO_STOP_MODE) - return 0; - } err = pm_runtime_force_suspend(device); if (err) @@ -2347,15 +2326,9 @@ static int __maybe_unused flexcan_noirq_resume(struct device *device) if (netif_running(dev)) { int err; - /* For the wakeup in auto stop mode, no need to gate on the - * clock here, hardware will do this automatically. - */ - if (!(device_may_wakeup(device) && - priv->devtype_data.quirks & FLEXCAN_QUIRK_AUTO_STOP_MODE)) { - err = pm_runtime_force_resume(device); - if (err) - return err; - } + err = pm_runtime_force_resume(device); + if (err) + return err; if (device_may_wakeup(device)) flexcan_enable_wakeup_irq(priv, false); diff --git a/drivers/net/can/flexcan/flexcan.h b/drivers/net/can/flexcan/flexcan.h index 91402977780b..025c3417031f 100644 --- a/drivers/net/can/flexcan/flexcan.h +++ b/drivers/net/can/flexcan/flexcan.h @@ -68,8 +68,6 @@ #define FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR BIT(15) /* Device supports RX via FIFO */ #define FLEXCAN_QUIRK_SUPPORT_RX_FIFO BIT(16) -/* auto enter stop mode to support wakeup */ -#define FLEXCAN_QUIRK_AUTO_STOP_MODE BIT(17) struct flexcan_devtype_data { u32 quirks; /* quirks needed for different IP cores */ From patchwork Wed Jul 26 09:09:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 13327710 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94C4FBA2B for ; Wed, 26 Jul 2023 09:06:59 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2053.outbound.protection.outlook.com [40.107.13.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 639103A89; Wed, 26 Jul 2023 02:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hamM460N4oKqWbbOBRnWblzSOYnjUzAIGc4KCu48mxfeEpNNdw4HKqagn6V6Enf747XpjlZWXHbF25WbHO4juNIQ3qF9JVJm5ClFNGhPAfgW9V1EZlNq5G2+xub0VWMNQhfl6xLmh/DJuR+6msqJZvoWTHGQK3htWwLsNuNralof76d3IKGlJF/cpcIBaeBAjLZB45NWtXX5XbCcIjmVVokRd828gfas8ielmzE10ayfzG3LOt6nZFx0ahU78aAhS9KnQvUA8YOkgAFmiXnWkRsfaZPqF+3ni8kiZinyXzvHDbgBaiki21Qj2m+pp3O0UXFGhauAoqywYT/v88PEvw== 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=AM8ezf1mfsTBAcluUcy9r5HSykVDS01DHMSVGLkGRPc=; b=UqVnZHQK7nZReYApzQGRjaZpNuQZY4O2ghcqBtT1Rbpvg+U5qULPTVnl03nIkja6oHh9CxPdM4CP40llnfVcomIPtP4UDx68lDiEQ2FT52S/rUazJOdZB9ukYGOW2YS8NbSM+UJHQ7wB3Hx6rYQUajhI7iuGDlt7Y4n5oR6/LT1JphPP3yz+GKHgQdxs9kucczggnKx0gjf/JWteWZYf3h6O5Lxk4Vy+ymGRvrWKMzyHdrsxjpcrTiKGbiIgaj+b3Qs53ytCvwrKIS8HrAeCxowGG0BY34kuV6QkDZFnmfq0quQVxVzYSYkVY+hQryXKBvG0Z3PqaoB0/QKKCtttpQ== 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=AM8ezf1mfsTBAcluUcy9r5HSykVDS01DHMSVGLkGRPc=; b=AsV+BOuVC4q8sh7eTUKlI6gKf8jVjyChTmxm8hmTNh0E6KY8unsshrQyZzHSUaHSpl8JeFFDzmL1oFN7MZFlhJYMXHDBcdMyGvjWNwSwn6ZlyvqhAH/uPx5R0sJU0RidfpR1eGocTUBcQljBu+BtrOM5lMdQjNzT8nisZWDAhW4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) by VI1PR04MB7056.eurprd04.prod.outlook.com (2603:10a6:800:12c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Wed, 26 Jul 2023 09:05:40 +0000 Received: from DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc]) by DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::d73c:e747:3911:dcc%5]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 09:05:40 +0000 From: haibo.chen@nxp.com To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, wg@grandegger.com, mkl@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, haibo.chen@nxp.com, devicetree@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 3/3] can: flexcan: lack of stop mode dts properity should not block driver probe Date: Wed, 26 Jul 2023 17:09:09 +0800 Message-Id: <20230726090909.3417030-3-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230726090909.3417030-1-haibo.chen@nxp.com> References: <20230726090909.3417030-1-haibo.chen@nxp.com> X-ClientProxiedBy: SI2P153CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::8) To DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4010:EE_|VI1PR04MB7056:EE_ X-MS-Office365-Filtering-Correlation-Id: 935170e0-bd15-47f8-e939-08db8db77c06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +pJRkkk6ttoK2Owi3dB4vowZsi08h/db+BNk2QUvwhJBl2qfnBeHeTPmPpcsJBDaoEIc9YphjTlFuRRfEkZAUswXnrHkFB8GNNyqPCQBDyeG9DbWK26lj4nRofvJ/fUBkRKebGvQqxRuRsMj5l1AKggTaBxxVbfPS0WVPESrDwiabUaTcNb2rkBjcCgR+qv7XxH59TrPgiTl7+eWJp1ETpnj5eq9TbOlrOuH/luEKjMhyZfuUqR/1NV13Wi1aLiWMyiFv3WawKpaaTYlge+P3LEePqyjWW9edDe/MU7hmju9uUhC/Qvn7KNGMzITJ27SMSQ1veANNUnIF/Ns1BiobGNhVGXQpcTN7UonPfePMWMPp1WE2W7QgaTH8uOTT4bUIlJE+q5p1R2YOyn9E9AMiG0evVRJZ2lgpHbVzgK70HYOPhC7sLV/dy9IIJvurWWLA96W86dwBS8riu680lEQy9FeRteqLeDs7CJkxJqf4AnJ0j+rscIuDh9z49TY0kF+lLjj+DEL9SAwQgMC7f+v3NImWphbIjBg1MRJCs/dSMW/1Twydn5SPdZg/CJ30aIRnZd6Z2kY5Gl8nFzSeqPclfg8Dw21SvuLu6BOf2AiKty4aFBlgKz+JSaXnD6iCCMb X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4010.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(136003)(376002)(396003)(346002)(451199021)(6486002)(52116002)(6512007)(9686003)(6666004)(478600001)(83380400001)(86362001)(36756003)(2906002)(186003)(38350700002)(6506007)(2616005)(26005)(1076003)(66476007)(38100700002)(316002)(8676002)(41300700001)(4326008)(66946007)(5660300002)(8936002)(66556008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sJaarLdx9m2On/o9X48wDpgjaNeGhGTgKq/WRktOJ5b5eN4VYiQIbHalZwct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HQIJHElLOxLRjbcDhpGoajr1UUD9RdQvdadWQPalM0LUStF2vVHRGA9b7O5ON1R3/Cenmd8bmvCNB6PgNUYljKtQb1Hku6GAkrFC6VtNACmg4H2ZY7S2Ih4xDfL7ehrI2zGwCFTzZK6KQ7qbHj/5q866HkpFX+ugbPAjtp3azjFYINzYCme8lCxJc/mtiiHjuASCohpSPG9Pei6QhsxoAo0sBkaHQacjDDme83OuJru5e/LsAPV0I9Tsp8mCTNWUGw0G0T0d9FO3d9JKut+He+Xuy1Sty8pmN/E4PMEcD3ObGkMLyg1l3ImHDVlWAkxR8tPKjcwdCcZgSTh3BU5ZchCsoIfWX+LUIKyxaeJOm7nzDhb3UcR9lMaMvcFckO9oikW2/0zhFcmiZXSHkP6zOogkk3/ceYwM46ycf0hoVwIQaF+HQGV74NqaMNE7LUP900O9Inc X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 935170e0-bd15-47f8-e939-08db8db77c06 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4010.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 09:05:40.5606 (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: nZVlQLvBnWEAF8wLC4W8PNzDMqDQZxvC5uZggFfSThupurZfuhonn+PR5Ora6ZPXbE6RfLsmEM6J+YzJqaLbQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7056 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org From: Haibo Chen If SoC claim to support stop mode, but dts file do not contain the stop mode properity, this should not block the driver probe. For this case, the driver only need to skip the wakeup capable setting which means this device do not support the feature to wakeup system. Signed-off-by: Haibo Chen --- drivers/net/can/flexcan/flexcan-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index a3f3a9c909be..d8be69f4a0c3 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -1987,7 +1987,14 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) /* return 0 directly if doesn't support stop mode feature */ return 0; - if (ret) + /* If ret is -EINVAL, this means SoC claim to support stop mode, but + * dts file lack the stop mode property definition. For this case, + * directly return 0, this will skip the wakeup capable setting and + * will not block the driver probe. + */ + if (ret == -EINVAL) + return 0; + else if (ret) return ret; device_set_wakeup_capable(&pdev->dev, true);