From patchwork Thu Jan 25 11:09:47 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: 766148 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2044.outbound.protection.outlook.com [40.107.249.44]) (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 0436545BFA; Thu, 25 Jan 2024 11:05:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706180741; cv=fail; b=WnSJaUrwIjAyLQ25K8wOz8a9mY9/G6Lp1OwmA0gjyHeX9w2dhxatmel174X/ClELU+wMJf2bf4oU+tietBAN5OeKOGttI24PDP7IwFe1RuV388bINK/o2slur9G6LQ5L5pix9/bSFVqkKtIRTGnZg8/OamPAYwJ5SBu8r0iOlBw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706180741; c=relaxed/simple; bh=B8CbdzQuigSVHmYJpn9sHju4+pZqzmq/EzEwBZlhxks=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=WfXeTDeI+lu8fT+Jx8gVOOeQLECDx6pSK+V4uImPpHQyiCNfqzBsciUVp3PUnrUoyYW85mB3Gsp6p14VSr1moHKefclEIEUajGlZqvCJYCY+y/EoELLjCuuSrSlN49rJMTIbYLU+BV07tSc3s1G1Kpl6Z+hyg7vyb8BVvov6N20= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=ix+vlhrl; arc=fail smtp.client-ip=40.107.249.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="ix+vlhrl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UsGqZzEsMQ6b4U50KNqwbyRGNxEhTPxv3XsA/khdx8raoLMcN3S70pFd3pDIVplM9J244v4+Kg6sWO6cpB2ph055kUnUdiWFYTGT7U6nJgiddQkvhAM4zhjifmGNdYmq/lJpZhyObZhro7GWcHQQjZ/Vi5iXM+w4e2WkoMlbK/rrwMrbpveRGHGPxIHBfW+QKQclYRW95UzWyO+QYP8rJY239nJbimGFomT7AJBd0Ci02HUyFWFaZEUkB5GaLIVad3/5haHExBiut+79SVIitlw6xC4EJsEKkZJa+WM5oLLQzL3EHrcpxXSxqsukAPiS1x9iwhozHZytr5jmv8t8Qw== 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=d21s6puYPV21ZPiPfHbW09PbXzAEYFeEqQEeMC6XFUA=; b=egywIdqpiDhD1T34swqcJdVYUu91s4vhAMwZ+rDDOme5vN55XmqLFrds94B1WLi6Q5pWJeUvpc0D4LTyRF1jsl6yxYOUHQ6AadvN7TobViLdcO6sec6yZ1tXUQOSO9gVjm5pxbovcXlrBgoY3Akjj5SkHq+zfvsmU8TtxU+i0dl/dNxmlHJYxkL2LwvBp0OXDZ6e1NsqeIA4oDppJ/2tBNDdLQdmk1hF5UOQKKlgM4Ib6JSNbqOPcIzreafwMyZosEyXsNR9+4FcCCOa7F7UQ/zS2dpgn2Xibd1TMdBNqX2MC/DfEZq6omK/NV+wn9PkbhvWvs5wL94VudXaoM/o+Q== 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=d21s6puYPV21ZPiPfHbW09PbXzAEYFeEqQEeMC6XFUA=; b=ix+vlhrlPt+bcNghk10kX34ev1/QEVmsxMPJAYnTcVozXqb+8OW/lq+ISM8I+TxU11RdCoP68ACz9tkx5eTdM/cdECKuzsOQ+FqKhjxvXahN06M4aDMjcJAQfXyh2vQ6SzCpdEaL+HwF0marhNj+JmbhJjpWAO4jnxzn2bCZCZE= 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 PA4PR04MB8013.eurprd04.prod.outlook.com (2603:10a6:102:c4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Thu, 25 Jan 2024 11:05:37 +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.7228.022; Thu, 25 Jan 2024 11:05:37 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 19:09:47 +0800 Subject: [PATCH v2 1/3] dt-bindings: timer: nxp,sysctr-timer: support i.MX95 Message-Id: <20240125-imx-sysctr-v2-1-7332470cd7ae@nxp.com> References: <20240125-imx-sysctr-v2-0-7332470cd7ae@nxp.com> In-Reply-To: <20240125-imx-sysctr-v2-0-7332470cd7ae@nxp.com> To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bai Ping , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marco Felsch Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706180999; l=893; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=eOWUoZq6cbt5HpoeRdEI86Gf0YTn+DquGD02bwDCsp0=; b=BIoJJ51nDDjnxEMZ4fxfSf9qu+guxZ4Wuor6C6sM2+FEGPtXPooZKzpRYcsbNRGb6D04H/QKs NJXeH0FVGqFD16JS1TiH4n8c+3fiyJ7HbkV+WVWJnMm5cHko9UMNot4 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG3P274CA0022.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::34) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PA4PR04MB8013:EE_ X-MS-Office365-Filtering-Correlation-Id: e35b56e5-f0b2-4921-f5d9-08dc1d958f49 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: m/xsJYJBMIMzGOZtLKJllMpYFYYon8zEXEfAShNOmez5pBS6ExjjzC3bJHUB+UqAZ7SoGm7N+oosZDmWFgm9MqsHQd0xcK3vG5B6CYVbbF/5b1yOoBv0SkYfL4ndjcT5XUkJqrrRY7EGDKt0VgjCrWvP6UyRBbITl3GMwn0HzTePKUqFDCNKpvpqCxWGaUfHFIzF6MmJHZ+C6b5uhN2xX1+ddpj8tbI9n8tNX/ZQ4/CNyrn0gvrqMuEu9T79x+ztlcOCQcbmcq1aneVEgdjGZxf+4eRzZNu+s6d0qZZC6FIHTxmEhKTawsvlJo4nkqwDEkRQaukA5gH/9ZJhTC9hHfRLGrNE5J3yRVdMtxySVNFV4jxBvNDX6s41s03CiyyBmQQCex3J5vVtyUfVgGP+ZBsJVO3iI1x70wpfAeEHB9oSuBwRWkjjXzRRemAu9FbkVtzFqXzGdKqS4rMGOAY6kv80CAbcphB2sKP+Yo6VgP/JxjbKR2JkTkLOvmlx3sB/IIoik8z6UWAxHwrGO70YVTYSahAE/QRQaEGuqxDAAriXgYOoMqBWJn/dwyh5Y3DyuZ/5KE3377mwd79hE1wFyV6TWX2zfgwBiGVIJLcSoDxeNB01gZkYRMxhVbPNhHKQ 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)(396003)(136003)(39860400002)(366004)(376002)(346002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(4326008)(2906002)(4744005)(8936002)(110136005)(7416002)(66476007)(8676002)(5660300002)(66946007)(83380400001)(26005)(38350700005)(86362001)(36756003)(66556008)(316002)(921011)(52116002)(6486002)(9686003)(6512007)(6506007)(478600001)(6666004)(41300700001)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1kPs7v9lAEIlFraQ+cJ4B2G+ke86?= =?utf-8?q?rbUefLoCN2KOfP+/kBlqZhY330D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TrcNsvfOesPMVKn+UwMVOQxyd6r?= =?utf-8?q?zeh2eGkdCgt7OULAJjwcBdHahV4joWS9I+p7XWyeWFiYxIdaNU6D/42t65to76K/x?= =?utf-8?q?S/0fRm9FvgsQfGXT2hBiXwi+XTMB00NqkcRQxzKfOKTZTJlGOBIMp9r1i0LeEACcC?= =?utf-8?q?QGFHh5lI5tEMwvbU+rUTMfIrTN4QdYpOwvsres2NUUfJV10WTCT/ZAZwOpRzbtACt?= =?utf-8?q?tIy1/eKpNPaP7wey/c7fmXD5gApOTfQB07h72Y3pSXClgDSQjT42MfvKroe8WMZWc?= =?utf-8?q?hSiywTh4fLiOxUcIRL9HPSQIDoM1P4TZHCK3PNgT2XIqPhgDT3vXrnESIYZzZrZb0?= =?utf-8?q?6Az6HpJPwyGK7BahiuMV4WzqCFHU9V/SP4Uo3wkCxvjFyoVC/0p6Nrt5tELiZp9N0?= =?utf-8?q?PTBDxsv40HOnIfLi5UmZdCiOkQjwb5IGhCUTHDfSIafMJh2td9bxsrd/zZF9qZqnl?= =?utf-8?q?1GNKC2JkV40mcVsNJr5IRNcc4ASlg5nPeRO5BpXUY/pN8GJvJBWUG41pmHT4504hg?= =?utf-8?q?XGa4AvVY2QOK9wqNFu2MaLv+duRwQ4CzbVrnwDytQ8Au3alsWCF2O29OEjudWMGvr?= =?utf-8?q?KBTMHwWszFWn?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e35b56e5-f0b2-4921-f5d9-08dc1d958f49 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 11:05:37.2177 (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: a8tzZYAul/KoAws/aWQIx1A8yk9gy5jiUkWs7Ghgn7I8+mNfrgw/ZKEt/kx7gZW1elU5JLQAKpocso1dsTGzyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB8013 From: Peng Fan Add i.MX95 System counter module compatible string, the SCMI firmware blocks access to control register, so should not add "nxp,sysctr-timer" as fallback. Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml | 5 ++++- 1 file changed, 4 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..161c09d9e2c3 100644 --- a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml +++ b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.yaml @@ -18,7 +18,10 @@ description: | properties: compatible: - const: nxp,sysctr-timer + items: + - enum: + - nxp,imx95-sysctr-timer + - nxp,sysctr-timer reg: maxItems: 1 From patchwork Thu Jan 25 11:09:49 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: 766147 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2044.outbound.protection.outlook.com [40.107.249.44]) (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 33A3D5FF1D; Thu, 25 Jan 2024 11:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706180752; cv=fail; b=NFaqWuGrp45b1ivOZcw1wecIZVNyJVNfeqBRTUWHqSWyqYdLX/jVm8pQYmhwPsrRBYRE1uqSNvYfiSWVbPyXxhCS4ZFwT+YP9HcrPgu/PWYlVNVqxylwi4gfIvS8dfkBcSXvFkhQ+jQJ/u0DMZux+lo1UnZZJpO8KLfB5Omc7Ww= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706180752; c=relaxed/simple; bh=aBLG5QljCVCTEwxxYjv47sVcETnZC/aCIiHAM0aoreM=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=gVW7Vj40ZB8xLRcEYegB5XT2qZKg8Zm0yabqEqRVf0o/VBJkyLwhnljbRfYJHVNt857GkvYWe79rT7iuKKbNPZdlxr828spFOxVif4oh+pdAsIyjbTEAeWoGMaIyMVVYyfGjRUaZtE1IdaWz8ZsbyeYPPS02NamozSx766j9CRY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=HzlLWHdE; arc=fail smtp.client-ip=40.107.249.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="HzlLWHdE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gjaL1MFP0yWY+pIJEBDbzL1GApwU5CcOoaTfQbIF9ufEPf1xN0/jajxJphRTf62ownFwGpIKttwedpR8Rr8iLMLdyEuFe8zJesOBrkl2mYBVYNU95lmew2Asr7z3g+2w+owYJDX/qX1PNSF4l0JDorUzNPIPKKl1XVYZ/RjDFKaDJ56C1/VStV4C/1aMiZBnLIAU+nw+UMwPh76W6ai3udT/VJ7LaT71Lb/UQKUbkSqgDbgd6wC8q6O71MoPyZ5ZS2ei3p/l9nrhucS0l9UBTDwCAMvn1JWZV9PmSkR1sqwz5gv6UcyqUp4nF2/tnvnMumvwj2+vwL2rEKBInt9dQw== 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=F1lUtjwppp5r6I2j8GSA70ZjQecm5QrSH07ZZ+SCFs0=; b=VyGqE+WakaylFiWkBjv6XQXFsWwx6B18S+Huausu2Dqo6gIdFztOlQdIxVXQpjEjDxHOdNCSZntpebQQJ//tDA4tszS9CsqKvV13aAEzUwlT3DesVyM/+67fQshgpzHf8BoQiUSCEoJgr7oCFCqmPHJy2GVPVR0FFBYNyy53Ogjqd/0M23jcksvux0/3OO3vGbTRwWWnHG90D0Er3pWU6DsNIUlUwfcIjQ917zUAyeU29nUU0jOgBZ5f/EIpuHKVDdhgeZ6p+c4HgdsHNhgIvZliC4wqEN+vhBg9l+Q5demiAQOfjEVJDOysM4RGmXxPdF6zCj6ALXlKCZMa2MQVPQ== 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=F1lUtjwppp5r6I2j8GSA70ZjQecm5QrSH07ZZ+SCFs0=; b=HzlLWHdE6FugOl5BFS96TJQvYxr/awsvhqvtn13SjVC5YANOc+R0qv5b3W0Uykn75ukIyOG362pPAGEYPXVKVUqH9rdwa0LmCgwKy8KQdikibQt5dA9mSynjIuren6LRtUR0nnFF8CBlSeYlN4x69fPUZ445XAEMbBVds7cldYI= 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 PA4PR04MB8013.eurprd04.prod.outlook.com (2603:10a6:102:c4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Thu, 25 Jan 2024 11:05:46 +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.7228.022; Thu, 25 Jan 2024 11:05:46 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 19:09:49 +0800 Subject: [PATCH v2 3/3] clocksource/drivers/imx-sysctr: support i.MX95 Message-Id: <20240125-imx-sysctr-v2-3-7332470cd7ae@nxp.com> References: <20240125-imx-sysctr-v2-0-7332470cd7ae@nxp.com> In-Reply-To: <20240125-imx-sysctr-v2-0-7332470cd7ae@nxp.com> To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bai Ping , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marco Felsch Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706180999; l=3432; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=o5T5BQKnKVPTSdGEy9mYdRRrgmMK7+tO3UEptrQOgLk=; b=FEsy12o6ILGS1hX1lH8QsgAY5uedRZp2M1mmWP6+s3XkZhWbMKRC/s3w+AGnYPWrxGGNgImFy nj0ChHfVJ90DlQyaU76EBMK7qvmBvi0wNTZGDYhafQwiUnlb4mQnaMg X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG3P274CA0022.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::34) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PA4PR04MB8013:EE_ X-MS-Office365-Filtering-Correlation-Id: 6dbe8eb3-51b2-4523-cb2e-08dc1d9594ec 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: Ji3JYLCtVMTgvY7umRPh4Dy+TTsIbbfG+MBkIyddiS6KCXtmn3zaMxBH9cV7VdZVa2nSd0QiacVvFzCpFEZ55oPW+XfFq7CEWFUAcEKB0NFk1qgqyloLGN5Z5J/ypAoX/6sZByB+jV+voQLeWNK2+vV2XhU4bSbi0oF6bpdAZoZruILrSbRaZMsMvaCkFXcbP/g+8TAgjXL6zXXMmK42BMbv01RlVcgRarAQZmBulxWXfK22N/OnBy6dUKbB6EfhnDAkZuaOm+bOd617hDZ5n2r8yUrlt/yeA+sjYBSOwm4QhUFmmR37+Qb+LaG00Hndgbwyv1Yx2NIvrzoeaUL/8PXBQHh9OwzmA/4x0xxQz7e8d59NlsfaR6KXjfF4v1DQQ0NfyQlmeCCzgc/UAbGM8LwApF944tL2UaLZ+PCiJ90+OZXQF+dxlj+/ow/xtzlJJWNRuxn+9ZWP31eIAGY/vrHPEH2Fl0QTeqsm4xg1sUW5jQYzvpXqEGwxTbTHS+k23DyB4Ab1ff6xPU+Wg+CCNOPsilf37lAC4P38+eQ2Q7ygB4lG4v/vUlzxUfd5Jw4rlG8nMd9pp2pYHCRINh+8Mws+lrtAk0nuAzT64VW7ux/G8NixWS/8ojf7aKJHTdnWvTvazyvOLU514mqL7+MHmQ== 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)(396003)(136003)(39860400002)(366004)(376002)(346002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(4326008)(2906002)(8936002)(110136005)(7416002)(66476007)(8676002)(5660300002)(66946007)(83380400001)(26005)(38350700005)(86362001)(36756003)(66556008)(316002)(921011)(52116002)(6486002)(9686003)(6512007)(6506007)(478600001)(41300700001)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qtQNDmoPi+OQ9X9bOKsJQi1Xedrc?= =?utf-8?q?JMkm5udcharWoUONlft4pzUmsk8mEu1Jy1oQOjFIOK8Rm2I1dq3VBumSpwDn8U2KW?= =?utf-8?q?o3zitI+65/SqniiGEXUEXkGL/++o66ybevZOiH09qbrZa6ln8pDCw7lUCcZhNZbiG?= =?utf-8?q?FmQop34jwxH/eX9BKX66PLv5qM1AYsmVJlDxyapls4eibHUUp7cTti2He+sgcv8w0?= =?utf-8?q?sanv6D8toDdpDJTJPYjBeQOO/7m6UGDUI4HP1XmjoS0pwQOUFx4nleRmwZTk5W34i?= =?utf-8?q?Ip0vhMXvW4OoLpMS6k6KP9R/cknwndpPGupVlyaRYFImQ1XiIQFwBCsWCO31H1eEy?= =?utf-8?q?U+tJ8iWt0BUXcI8nge7ZLwRHFQKHZong97KF8C0Ekska1gDyD2ydNlAU0iEUcAQcB?= =?utf-8?q?A0ZXtImBJrLJjY9NFvxkNYypPZ0t1EX8dH154MpgcI4fMYCLN0raCUJqOviRsH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70mJM?= =?utf-8?q?0Gl0khRKE57n0q0tMKmeHtz/tT9y0aL3kl1SkbRdTl/+Y9U3JvVGWIfAVWe83WKTU?= =?utf-8?q?0q7tgnDUSQNEP12r53vybrqoPjq6Wj72AbgDUqbiezBsEr3CKlXyqUcv+WNlJIctn?= =?utf-8?q?V+RpqM93F055I933IlLu74n6V6KGEydb50FOA6ckzPx5TCyr2zTlkJY2iNtroJYzN?= =?utf-8?q?KH20stQlJEMV?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dbe8eb3-51b2-4523-cb2e-08dc1d9594ec X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 11:05:46.6599 (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: VsNe3H2XsZWR5yYB/im+o7UN+HXlCXIH2DuIDCkQfuLoTaOujpysbPVbDu6SqmTL12GJY5SYGynAkzekBkaFbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB8013 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, so add a new TIMER_OF_DECLARE entry for i.MX95. Signed-off-by: Peng Fan --- drivers/clocksource/timer-imx-sysctr.c | 53 +++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c index 8d5bfb8470fb..9b7c021c3b46 100644 --- a/drivers/clocksource/timer-imx-sysctr.c +++ b/drivers/clocksource/timer-imx-sysctr.c @@ -8,12 +8,15 @@ #include "timer-of.h" #define CMP_OFFSET 0x10000 +#define RD_OFFSET 0x20000 #define CNTCV_LO 0x8 #define CNTCV_HI 0xc #define CMPCV_LO (CMP_OFFSET + 0x20) #define CMPCV_HI (CMP_OFFSET + 0x24) #define CMPCR (CMP_OFFSET + 0x2c) +#define CNTCV_LO_IMX95 (RD_OFFSET + 0x8) +#define CNTCV_HI_IMX95 (RD_OFFSET + 0xc) #define SYS_CTR_EN 0x1 #define SYS_CTR_IRQ_MASK 0x2 @@ -22,6 +25,8 @@ struct sysctr_private { u32 cmpcr; + u32 lo_off; + u32 hi_off; }; static void sysctr_timer_enable(struct clock_event_device *evt, bool enable) @@ -46,13 +51,14 @@ static void sysctr_irq_acknowledge(struct clock_event_device *evt) static inline u64 sysctr_read_counter(struct clock_event_device *evt) { struct timer_of *to = to_timer_of(evt); + struct sysctr_private *priv = to->private_data; void __iomem *base = timer_of_base(to); u32 cnt_hi, tmp_hi, cnt_lo; do { - cnt_hi = readl_relaxed(base + CNTCV_HI); - cnt_lo = readl_relaxed(base + CNTCV_LO); - tmp_hi = readl_relaxed(base + CNTCV_HI); + cnt_hi = readl_relaxed(base + priv->hi_off); + cnt_lo = readl_relaxed(base + priv->lo_off); + tmp_hi = readl_relaxed(base + priv->hi_off); } while (tmp_hi != cnt_hi); return ((u64) cnt_hi << 32) | cnt_lo; @@ -126,7 +132,7 @@ static struct timer_of to_sysctr = { }, }; -static int __init sysctr_timer_init(struct device_node *np) +static int __init __sysctr_timer_init(struct device_node *np) { struct sysctr_private *priv; void __iomem *base; @@ -153,9 +159,48 @@ static int __init sysctr_timer_init(struct device_node *np) base = timer_of_base(&to_sysctr); priv->cmpcr = readl(base + CMPCR) & ~SYS_CTR_EN; + return 0; +} + +static int __init sysctr_timer_init(struct device_node *np) +{ + struct sysctr_private *priv; + int ret; + + ret = __sysctr_timer_init(np); + if (ret) + return ret; + + priv = to_sysctr.private_data; + priv->lo_off = CNTCV_LO; + priv->hi_off = CNTCV_HI; + clockevents_config_and_register(&to_sysctr.clkevt, timer_of_rate(&to_sysctr), 0xff, 0x7fffffff); + return 0; } + +static int __init sysctr_timer_imx95_init(struct device_node *np) +{ + struct sysctr_private *priv; + int ret; + + ret = __sysctr_timer_init(np); + if (ret) + return ret; + + priv = to_sysctr.private_data; + priv->lo_off = CNTCV_LO_IMX95; + priv->hi_off = CNTCV_HI_IMX95; + + clockevents_config_and_register(&to_sysctr.clkevt, + timer_of_rate(&to_sysctr), + 0xff, 0x7fffffff); + + return 0; +} + TIMER_OF_DECLARE(sysctr_timer, "nxp,sysctr-timer", sysctr_timer_init); +TIMER_OF_DECLARE(sysctr_timer_imx95, "nxp,imx95-sysctr-timer", sysctr_timer_imx95_init);