From patchwork Mon Jan 22 09:22:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13525000 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1172BC47DAF for ; Mon, 22 Jan 2024 09:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5kxsCnLtxWXQLaKTQsqPd4v3zRwHU79ll/WW48su+6s=; b=OKlEeGchkngid1 mEPkKp3KexBU4QWYG0NPYI6qtUTNCzMsfTukczL1wV+zuZ0Kqbxyb43vzvDVjRBrFU4YDBrY4Mt6t sc/6aXPkxl6Twrt/LO9a+LEQYboHooi/Q5CsDhrpL2CkNMShvGm3DD2bdLcrmj1EalCoe/geBSIR4 xjy2kxzxQ3xdYhFWzBfTN7Cb9jd608jKu6yVhCc4TWFtrmYl3Dd+hTQ+iQQznBSU7A1rbE8idBwsy DsIA+9+2U7gkF3R9Z5gmUAqw7I1m2k6R8i0OD08+3Rs4exlMiVCnSYY/YVHZ1waEmy9gMN9XvzV48 sTHbLEvpXsKZPRhKtvIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRqRf-00BFlp-1d; Mon, 22 Jan 2024 09:18:19 +0000 Received: from mail-he1eur04on0626.outbound.protection.outlook.com ([2a01:111:f400:fe0d::626] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRqRd-00BFkm-1C for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 09:18:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ljMVIQA+H9fqijSDssmgSXnEmM/dZqQGjrpO1erLyGcGTuaDXblVHZ2SvsrqO4ZqA5m0gSxEmlIo7XUWjnGv89PkrH9xcDTc3TJjHCLBH3YuEe3X160c35be4DTjlnQno2jMIxNor/cUiL4jg2fiHTrx435YA+I6GhcDHcoGCBrn3qEBo1jMLaYKqxhRjT9wiuxt5xYJgt3nt03Kjh7+DfsjySDx6z6D9eIo81bXKfJdbWALBuinw2d3XF3C3JkBc56kg9Zkhz7aqwGZfZCk3vqdZeq41HRkB8tBvXRnRYuLQEAv5+zgMQBNDbmpFewLa3YUWk8+Gnaakufwkm6BRQ== 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=OclLp80potVNA1kidXUupD+Jd4ujxcsFMhtQ5bjrwk4=; b=J5jAfBJfUzCmH6yrm9euGDCNdzo0rBS7UyKXeI3ok0oNicjJrBsIlQWQ3ZkuCONOPgzZTP+2AflTE/4tqgKKrFJn3QPzxSCk2NCS+FDfkRB1TbXs5/UuBBkRTfKOEa165DQ328Kg4gV9q3Xh705f/w7qxDVAwvqXupuEHwxRo1EtoLaMgto2Rb7yTzLP/oOweagqdp4cImgmbAm7o0zg9a4nZV3ljHvhh2LmJR8YSZvVCzNVwDgSQjrm/kXy5NCeGbXY96StwZ1Oh6aCRNU5vspcEPXbby0KYiuv58YVk6DoaMnpyJmu+0vvgXQUBwOYgXU0mEWPFyzMWJhGHdmyeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OclLp80potVNA1kidXUupD+Jd4ujxcsFMhtQ5bjrwk4=; b=BZDUjrov2Pl9oE4Ohh2OdMS2D1fAL7T0bHSprb7zBqb43HkrvSusDRjCWRG5TNoKG2j88RXMfy/LpSyWiRyIWIFqEaQmRZfV/0gW0KSr39Ol3Cp4ghVeq9GAp5d21/UBezONqXa9cUPJ+YbAebtI3kInxKihb17V+nhsdrqAy/I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM8PR04MB7394.eurprd04.prod.outlook.com (2603:10a6:20b:1d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 09:18:09 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 09:18:08 +0000 From: "Peng Fan (OSS)" To: daniel.lezcano@linaro.org, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: [PATCH 1/2] dt-bindings: timer: nxp,sysctr-timer: support i.MX95 Date: Mon, 22 Jan 2024 17:22:24 +0800 Message-Id: <20240122092225.2083191-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SGXP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::23) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AM8PR04MB7394:EE_ X-MS-Office365-Filtering-Correlation-Id: a56ce8b4-b267-446b-5147-08dc1b2b0c61 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mUiI3iILfyw0wq1qpMd74r5AcMWHjNKs8o3iHY8I0KBmns7QZvpQwEWYdwpAdTgVL38vIU7BZ5A34RQhkHCLPyyPmPetGOLjx9uoH4NFNz3wFB4Hs9BWpvB3ai0ES4uhYRb/7akVw5zClYp7UV78E+XZ4rsaM0k5wyX9+tgVsfD2N0JpJEBUF0ZeqAwOSJF0/5U3NEVPdo691RTry8Ib86QM5EJa7v8682UVlDsQl3kq96ldC2vISssTDegc2ydWWJQFYgO7bvRFflZStaMn6p/8zaNcOMcr7XSkAfQSNUoT1dZIXD5OiJf2JN+r+9kP+diZ/eakG4BGkOiG9gNXH42Rgof1BlkBFU3gwULUfY/k9moLc0oQ0pciF4kiVPu1aXKuCGDEygEKTMLz53+6FRzt2l9my40H2zi/9F5qUH4zWuJngokiznyKRajx/drsl/iGKvSzIyjaScWkeblDqYqJy8zp8s2L0H3vUTz48cTP/enm7eYfdUH77/YqUENNK4W7reLnjO7NBgblXy1jrfPa8IYo5Rc7rINy0q1/ktuGwfLNxr0j9wIxfsi939KDq33mU1oJ0iawDKSZvR+SiWAoNr8xn+0kK9+Su8gVmL2P/+zK49rTyC6zG8c3XNgA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(396003)(376002)(346002)(366004)(136003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(6506007)(26005)(1076003)(2616005)(6666004)(6512007)(52116002)(83380400001)(7416002)(5660300002)(4744005)(2906002)(41300700001)(66556008)(6486002)(66476007)(8936002)(8676002)(478600001)(316002)(66946007)(4326008)(86362001)(38100700002)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aG0ygP/IllgVyst6RxFLh2hxLrk/29nwimYC+1Bn+vd7xsbzRWrKoYk+zHkVUMIHC8UVluK0nx/sd+Dhhet8DD+R9HMA4hxK/e1zezuTiBIZmR8htyuLOnnwFnP8H55PuEU7M/VtL7Yso4HFv0N6zovqjpt1FK/c3EP3287q1HY7Cda8ElhVGQraLa2FsJEzGiVSvYa2ALAQh/3CG8TJHsdCI8cwsz+v8cyV0umlS7nP3xOahGSjWf53ABTgMQY8iZnl1O/2FH0yZrTQYM1D9GES/dvcUzA2lgIaF9asNOTuFrnAH6WTBLC8wnVjOwT+weozpz/8FrgYTLQW/MovNOEAC1aPebC5u+8pDw2wNi+gk1lGvYEeZq5N48Wt5tcnn37WlEWd1KZL5WhS/n4sEtLwyNRgpos8GulVKP3ZpblAXl86kHljQGvjBGUPuQ8RgGtsW+4pH63Zz5R/CFgzPoFFIt135nZkMi5ivi9em1cKaieWA3TqoCIOUcPbcRBHCzZ/OSE6lg/TEypK7OFSKkEm/F27mOeA2V+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.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a56ce8b4-b267-446b-5147-08dc1b2b0c61 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 09:18:08.8320 (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: u9e75lvjYn1N3KVzWqtiA7xCTRG4MgdnAkuBSoqbTnoupysVHMu9JX+bNLeh1tPlM4Ofu7pt6/UbFLICNF+EuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7394 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240122_011817_411281_664528ED X-CRM114-Status: UNSURE ( 8.36 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan i.MX95 System counter module has similar design as i.MX93, so add fallback compatible with nxp,sysctr-timer Signed-off-by: Peng Fan Acked-by: Conor Dooley --- .../devicetree/bindings/timer/nxp,sysctr-timer.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml index 2b9653dafab8..4f0b660d5ce3 100644 --- a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml +++ b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml @@ -18,7 +18,11 @@ description: | properties: compatible: - const: nxp,sysctr-timer + oneOf: + - const: nxp,sysctr-timer + - items: + - const: nxp,imx95-sysctr-timer + - const: nxp,sysctr-timer reg: maxItems: 1 From patchwork Mon Jan 22 09:22:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13525006 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D0C6C47DAF for ; Mon, 22 Jan 2024 09:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AAc0EKC1mpWuk3xMbvJT2S1oFAqjMIs4zvPq0RHXdYI=; b=AZBF/HaVogdv/m jTtERwrJjzLrRHXUoLEzmbEF1kGAjIuSnosiL2LaRVDY6DEach+vbrQpWWpygYK/qre+qEiiS6otH UBWNTb1OsCfhJsOFALH1OHsBYzngSoG48yjdF/6YhIajIKWPovFVcg8prRcq0knB3Du3oIw8MFsYa ZJ18qnwGmSD9rK1v/BoeNMfDu8Vy4AApRPfKwwMPz7NYP7fZI8E0ybzhJ7Jj4qRjIjL6T96B9hTnd wnxcKOJrPGkhy783Tm71NnkZGPgQhRVWmAyncobjGasI0p8z8/IrrtY6tXcP8/NKb/UrTQT4ql1ul RSOnq/SQZHdTmw8ZiwMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRqRl-00BFnZ-0m; Mon, 22 Jan 2024 09:18:25 +0000 Received: from mail-he1eur04on0626.outbound.protection.outlook.com ([2a01:111:f400:fe0d::626] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRqRf-00BFkm-00 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 09:18:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XljCaCookGXnQjAzJa9uFZzHtcI2mYwtcAR0y5FKSl4E+M8xSElVgB4B7kPFqSVE8NOY7SSm/LxTVvwSn01dkxox0ySnjcZP+GQzNy5XaIaRAonSPfB26Ca6hBjUfV7KDDXLmG0lG9VyxRGcIz4pKJi2SKiAhFNJ9HcFhIBl98relCyaikmikOoWNZlItlj65MC/rIzvdggoT4h++tKZcuZK968OQGnOBXEgfzjS+K2+oBLO5MSOBMS+uG1ljxfEYfHya2aTbi81jSifKCcQmMsFdVfrAtfuB7b0mq+AJ8qm3Gu4Rn7rYS8bdCxoDHU/4qXeUSSTdZF+eJmGq4ZtBQ== 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=cDqPPZ9mgLpyENL59umDrwFTw9fASsT9OOHZ+T6Pj/M=; b=mtGoqrwqXCRU6JiO30vpAtouHRjwckaW5U8FTkICC8ViRoEuEunV2lL+bZ3QdlNV4gxa5Hl3bxx5DTm4znwDFl4qMkzu1fx/IolpymY9V5U2sgfMTYkfYa54zN9QTi8BSLUEHMCvnRyw8Ap3nzdDJlGfq3DVHtjgt22PZI7IHDknVxZQtdmXFj4Q5soQVnSmg6cFewzNwOjjho+xZlpB6D3obdjq2oPb4iXb3uVlY/5EdXA0UDbvfRKRmTXvmuU/Q86mKl66Zrn/Ro8oB9TAJPuuLOanhrDkiRbchi0HwU/w1rOPNkgcbfhaUqlqsweMUC7B265uebEnjBQQRwXuyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cDqPPZ9mgLpyENL59umDrwFTw9fASsT9OOHZ+T6Pj/M=; b=ea2XFqNPFXLbFXT1QYfe2qItQuakqfsG5o/uvKCMFreIEys0XPL54mAvpqlc8PkRjjScVkLR3jAFBY+uboiw0Rm6jHxT6BtHnvMTsGhURd31SZqK4D8NDuuHGz+T/RFmrxe8nhnggIB+L96NDEjcoEPlxKX7+O5bIu2DmBYn+cs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM8PR04MB7394.eurprd04.prod.outlook.com (2603:10a6:20b:1d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 09:18:13 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 09:18:13 +0000 From: "Peng Fan (OSS)" To: daniel.lezcano@linaro.org, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: [PATCH 2/2] clocksource: timer-imx-sysctr: support i.MX95 Date: Mon, 22 Jan 2024 17:22:25 +0800 Message-Id: <20240122092225.2083191-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240122092225.2083191-1-peng.fan@oss.nxp.com> References: <20240122092225.2083191-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SGXP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::23) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AM8PR04MB7394:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b958ab8-ac36-4551-ca74-08dc1b2b0f09 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HV+bJCqomzv6KaUd7VRU5nhBozCrewlLbVk8bsk+1mm8+iyI5N+aYKoML6nrRk3Z1w/sjIFiqOw+IOCfe3ebow2V+44fuo4xMUSzw7lX5hlye4zDSQQ/gfhI7Qfd3AHMxFJlmYEGDyeXJjfaVzMW/eDb0t7vp1xBf2CaWJuFirgBkisg6gnQrRNIsJwq0/bgh/AoKMHlY1oDxhKsobkr+5FotML48qeUHBOta82S7MPdp9r9IQK5l2Ljcf78HfgL33Fj2tPtdHMthGVmfWRbL3S160hvK4zL7yby1oZhF//C9AK3LmGMtGcOFwP4RDZNWkX+MgCGxyJRoVb139UF/Qt5EHgsSi6WUfEP/dL5341mNxM5AVXuPgxak5oDexuTlgw6FTkFCo28luNw5gMPl71Xgt+y+XEIirJfjxQbg0+upNsvrqdJpsEQikloeoyONyBMKLnMTyVWuEzlT4WpZjIN830ewNeeff8yiqeOmeCBr+AVWDQRfaJp0GZi/XhYGm8sLcYKHpjXNlJ4kN49aVysyiu75E/nKgUX4n7bRIO55aseQdpHb6YSbOBypCOQMNP0GCifeuGKeSId8TECB0DFz07TNeIcmIqBf6y362YlBhsEgPeOnSWDltctq0Ok X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(396003)(376002)(346002)(366004)(136003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(6506007)(26005)(1076003)(2616005)(6666004)(6512007)(52116002)(83380400001)(7416002)(5660300002)(2906002)(41300700001)(66556008)(6486002)(66476007)(8936002)(8676002)(478600001)(316002)(66946007)(4326008)(86362001)(38100700002)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GvP4pdXv3pI2f8Yv9Cj3sfe8Bel4mLQqCwhwxSwy/v40VmQ4BfXvDrLuXPAJwMIrmnjc4bjAq+Hb5jKzZoBXo8Q1z6eBeNQMLpnHXhzV75Z/E+HsVgobE513pj7WOU1goo4Q1Zdbx9hckNtvIHCAN0e1MSix5JFcyl56ol9sWLj2gEkFfUt/nSqJxQzRI78S5XVqbJLGE9fvYIRKSfTv+36zhH36R0Iq0x8ebVKBmTSZv7hJNjPNEYtkYFsexJ1cFscgcHcQt9VCuqZ3UJDtLHa2dlCix2Gl59Hzi5GQwJSGxcce3LHxnfD0tLTQdJ2+5t1XU4eoazbNauYy1sPYZvv8vq4yc0259a3GAByt/8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J/8VdMO4kzhDMuetm45hiqkipv+4m4kfM/e+c8eGlENxgyAulVs/POL7Rl+GRlF7qcNMf8MRJIuVNjV+AnmmuPjcYVSady+IMP1y3LZuZ7aoQvrQrQpf52xqedGGRqNCNpNTCb1Jony/XZeUau0BtlnN0rP X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b958ab8-ac36-4551-ca74-08dc1b2b0f09 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 09:18:13.2991 (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: fFUeAJBhLjKq8A9/Aeuqer04bV64ZlXu1Melr/7uqVKFDwAsOWeTa35ur9gjAvov70SxTDusPN6mUW3EBLE6fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7394 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240122_011819_040676_58A3E9B1 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan To i.MX95 System counter module, we use Read register space to get the counter, not the Control register space to get the counter, because System Manager firmware not allow Linux to read Control register space. Signed-off-by: Peng Fan --- drivers/clocksource/timer-imx-sysctr.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c index 5a7a951c4efc..3d3bc16388ed 100644 --- a/drivers/clocksource/timer-imx-sysctr.c +++ b/drivers/clocksource/timer-imx-sysctr.c @@ -8,9 +8,12 @@ #include "timer-of.h" #define CMP_OFFSET 0x10000 +#define RD_OFFSET 0x20000 #define CNTCV_LO 0x8 #define CNTCV_HI 0xc +#define CNTCV_LO_IMX95 (RD_OFFSET + 0x8) +#define CNTCV_HI_IMX95 (RD_OFFSET + 0xc) #define CMPCV_LO (CMP_OFFSET + 0x20) #define CMPCV_HI (CMP_OFFSET + 0x24) #define CMPCR (CMP_OFFSET + 0x2c) @@ -22,6 +25,8 @@ static void __iomem *sys_ctr_base __ro_after_init; static u32 cmpcr __ro_after_init; +static u32 cntcv_hi = CNTCV_HI; +static u32 cntcv_lo = CNTCV_LO; static void sysctr_timer_enable(bool enable) { @@ -43,9 +48,9 @@ static inline u64 sysctr_read_counter(void) u32 cnt_hi, tmp_hi, cnt_lo; do { - cnt_hi = readl_relaxed(sys_ctr_base + CNTCV_HI); - cnt_lo = readl_relaxed(sys_ctr_base + CNTCV_LO); - tmp_hi = readl_relaxed(sys_ctr_base + CNTCV_HI); + cnt_hi = readl_relaxed(sys_ctr_base + cntcv_hi); + cnt_lo = readl_relaxed(sys_ctr_base + cntcv_lo); + tmp_hi = readl_relaxed(sys_ctr_base + cntcv_hi); } while (tmp_hi != cnt_hi); return ((u64) cnt_hi << 32) | cnt_lo; @@ -139,6 +144,11 @@ static int __init sysctr_timer_init(struct device_node *np) to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV; } + if (of_device_is_compatible(np, "nxp,imx95-sysctr-timer")) { + cntcv_hi = CNTCV_HI_IMX95; + cntcv_lo = CNTCV_LO_IMX95; + } + sys_ctr_base = timer_of_base(&to_sysctr); cmpcr = readl(sys_ctr_base + CMPCR); cmpcr &= ~SYS_CTR_EN;