From patchwork Fri Jan 24 14:25:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13949372 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 E13BDC02181 for ; Fri, 24 Jan 2025 13:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Content-Transfer-Encoding:Content-Type:Message-Id:Date:Subject: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=HCn9yw89RDvVl8IQcyDeF2oyCpee4nnHDV42F/EJH68=; b=kt5x+E0xkAaXL34OT0L9JzLHT4 iB4KicElGXEpFbTl8Jmp2ZEFEqLVwS1xAz6FKH34SXFEjk8j28Yx3k4htoGzXllMYNQSXa5YUgCUj 7eW0q0oaEAGTX/8SPaJzj24US2hk8vliEB8eUXkgZTUa8hhrI3j8HLUEp83PqyrWbRzWQy6+kJ1ze WKzJNT9v2GXALTCj54Y0O5SvJO56xCc2NbX8EixfN4P9myyvCEpkO1Rntjgcjx9WpbZ5/GFrntI2k YgzGZJ67Trm9rU8L0c5CkToY0/cleRD8YSG5HWg8KsIN6tDDCce9njuFnvxpKrbqV3E7FhULbPi8v YSJHqCnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbJbv-0000000EjMO-0qGz; Fri, 24 Jan 2025 13:20:35 +0000 Received: from mail-am6eur05on20611.outbound.protection.outlook.com ([2a01:111:f403:2612::611] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbJaa-0000000Ej8G-1bBl for linux-arm-kernel@lists.infradead.org; Fri, 24 Jan 2025 13:19:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IxFTXW0nihzgOSHmi1SCUsXdkD3us78U0+B/3Huc0FuErzfeeFTxQNyYChecYt9lrl7z3tZ314msKUNm546OmB5ZG27RiPPfiEdU8wAXE22TTWAvYrKEodLJLvx0eNaWFvLjANcGex8WJNL3Bwrm2wd1t9biA0XrrQ4WcQssy6Nn8pkkDFjXDEFfMOlQmo1MNf3dmpaMVF9NM9vaKCJbNG0vXotLDH8ndoL2/rGLrn/43toBAdvpOSyER21VGXvm2mYyKDr0uwc8zIWC5S6DvIsQV8suBgjUWAprOgRHvtZjQJvcJ/nGMbVxeiH+cnEdxZjiE2JPM8Nj5b47NCsmsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=HCn9yw89RDvVl8IQcyDeF2oyCpee4nnHDV42F/EJH68=; b=W0MUKJCP5Y9wIVqUqCmV03Qj3BEm4rpP44ZeFCrnPBOFl/8rYAdXEuEvpcf4CNTaNxYpanGB6ENa48W68aCBpJd6MrZZBp+CroaVefJaoNX0i3dwJLt1/x4+cMHHWAkdZpeDQjKYA7iruXTEaIvrqtQnl/H0txNboBNr+cc0/ko2u1PcOl9Ttg44iHlUO4fzl9OrIMz5NFPTHugss6daNbKpCu9xYoMasjdfUphy1rzdQD8xPfQy46fWqorAbn1YIaa87YLrxyH6JsYiFuC7NRjjy2jBEdxyoORebQ1cJVJOeBox6sAdUKudymJwwpkZ9ATzx8ycshxx6BtPhChWxg== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HCn9yw89RDvVl8IQcyDeF2oyCpee4nnHDV42F/EJH68=; b=wtYWvVWjBLz93Gp56HVYbJ/QuRba1uFEYfcfNhPcd0TNSzfPLcMTLH6HVqWjmeiwwP0QwgjeufFD9Zfo7zLh+10y9GyAXd9rno7jgOe6e4/6jBbjN3RMY1uZ72ph0Q3+Nv94iv0/xpHAUK6eHeEuTs+DF4e1AWN/p7jFpu2s6LWxVeJUxHmG3PgP3D5MmbysfPIlofZ3poiVdpA8fEV1uCPmtDzEu2UC/NZKrmYz0s2rUFKXUnwFd4+pKP/6nEtoyjSBC0jfm9E1VR9UiHk1L9PtXdr0xV40SLmHT0ide3ZRsPZQX6AgknAKk9i7g/n94BfBKR6dtlWymNavCbMJ5w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PAWPR04MB10007.eurprd04.prod.outlook.com (2603:10a6:102:387::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.18; Fri, 24 Jan 2025 13:19:02 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8377.009; Fri, 24 Jan 2025 13:19:02 +0000 From: "Peng Fan (OSS)" Subject: [PATCH 0/3] clk: Support spread spectrum and use it in clk-scmi Date: Fri, 24 Jan 2025 22:25:16 +0800 Message-Id: <20250124-clk-ssc-v1-0-2d39f6baf2af@nxp.com> X-B4-Tracking: v=1; b=H4sIAMyik2cC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDQyMT3eScbN3i4mTdtOTkFJM0M4MU81RTJaDqgqLUtMwKsEnRsbW1AHp Io5RZAAAA X-Change-ID: 20250124-clk-ssc-fccd4f60d7e5 To: Michael Turquette , Stephen Boyd , Russell King , Sudeep Holla , Cristian Marussi Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Dario Binacchi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-ClientProxiedBy: SG2PR02CA0127.apcprd02.prod.outlook.com (2603:1096:4:188::7) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PAWPR04MB10007:EE_ X-MS-Office365-Filtering-Correlation-Id: 4947ea18-8793-4485-c860-08dd3c79ab59 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ceknuGrmEcOCKkfKAhPvLBV1fVmi7oF?= =?utf-8?q?mzwL4yIxCt2RpRsbgbXebxFXh7d2O97BurxSkIu7Mr/JEJ40oRKe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PMJoNhNmo4Qg?= =?utf-8?q?JHZLXIyFjNsDFOPjig5/WWWwX2BU6s3S/xpHRqPhovz3/1StdAxExu8WiGs5g6ydu?= =?utf-8?q?A0d3WWWH0cFj9JZnVQcqq0Hz05FM+qcyh0+SbVlfP8tfQ6CgBdo/2Hv5YSgehEiUA?= =?utf-8?q?tO7Wk+qtBM8PvhqBmhAvACkMxDZdI60k8THeS3bXKYd8eB5Jr7nGsAag32RqF5y+/?= =?utf-8?q?E1KLa6mi8+Rdsg56L/F5cZ0xUyMsSQVH7EF/dYTuMY4jI1A+3L8+Ttj6vRohh2OA7?= =?utf-8?q?u4FGratZLYP/k5TbCIlHxzVBePkRODXSWceIWDtlGdZd9zooV+vMJ1IZz6dXTykyf?= =?utf-8?q?WCmku9CAODo1imsvfh7uaVUzCyg8oO1SFqRAyLbbxq395OD31TVbL90sOeW+zPHZP?= =?utf-8?q?j/bPuUKEvjJ5PRkX04kOtyX/3E/cNRcVQpv33l7hvK65Cuzv3k43QzwQKJcDc0Uvt?= =?utf-8?q?yHAZZXrspAv?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(52116014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qOZpGRzc1EFwzg3xpiV4z7abHkB0?= =?utf-8?q?LnmC5t8wJEMgv4L7MgcqATgO3h6YXdvqQfY2xCfNVWk3OJ/90Jyx1/7DrvnCHXHgu?= =?utf-8?q?l7hlla7IcKqL2cMEXgGZJdueJf1iWQQLzga+VPQ+41A3jAbNJdSL6JKE6MOmmPnTo?= =?utf-8?q?LYFeJkpj7fFNv43y8NJi5Il7mj4hS6sAEQ6R7vkucvKP58EJei6GOtquQyHG+djOY?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utf-8?q?iYSLhZ+L5Gwf17QTwoZT+sBfh0mMjmJeyvvJyr0WD34Orf01KKhsCqvMHFd2tc2+S?= =?utf-8?q?pz/s0ccbE0QWURIK1rVX3CL2/NlIeoNHYluR+kN2grEYWiEPmM3+R6pOqYS27L2nz?= =?utf-8?q?lhgRpSiS/HOX6Buqs0bDvo8aAJeZuQsZQjQ3dsE6hrW3ytYdiNJ6PtIOlahWDB/+L?= =?utf-8?q?wNikF4yWzWlnqoNT9eIaWk6FL2DIcqT4Qv+YPhS/XPl2EbPO3XJKYNluvCJy0jg9t?= =?utf-8?q?v2Okb+gazNb5tgvVYc5AfCkEu8wo052wRBXyvm99n5YUFrQftNXPN8CxJbBmtSccJ?= =?utf-8?q?LRMuLjnY7KsG138UPY50+EXT120kdNYagVeJY3dAA+8tblfrOFDrNjgC+vO9NG58c?= =?utf-8?q?3YpVAJxBnEfnosTWl5dQKXpMAkePwBEZAxo196gL16052StetEocL01gj2k3kjM66?= =?utf-8?q?H0jbAJRBRrW6?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4947ea18-8793-4485-c860-08dd3c79ab59 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2025 13:19:02.2180 (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: REFortzIY6Z813YnfB2UdHEgWKDQ+uLbLvh977Uz8yNsBuyLFblMuCCtfTXiXWdqiX3WPPoSRFuD/kT3Knprzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB10007 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_051912_437770_C33F1E52 X-CRM114-Status: UNSURE ( 8.19 ) 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 - Introduce clk_set_spread_spectrum to set the parameters for enabling spread spectrum of a clock. - Parse 'assigned-clock-sscs' and configure it by default before using the clock. The pull request for this property is at [1] This property is parsed before parsing clock rate. - Enable this feature for clk-scmi on i.MX95. This may not the best, since checking machine compatibles. I am thinking to provide an API scmi_get_vendor_info, then driver could use it for OEM stuff, such as if (scmi_get_vendor_info returns NXP_IMX) ops->set_spread_spectrum = scmi_clk_set_spread_spectrum_imx; [1] https://github.com/devicetree-org/dt-schema/pull/154 Signed-off-by: Peng Fan --- Peng Fan (3): clk: Introduce clk_set_spread_spectrum clk: conf: Support assigned-clock-sscs clk: scmi: Support spread spectrum drivers/clk/clk-conf.c | 68 +++++++++++++++++++++++++++++++++++++++++++ drivers/clk/clk-scmi.c | 37 +++++++++++++++++++++++ drivers/clk/clk.c | 39 +++++++++++++++++++++++++ include/linux/clk-provider.h | 22 ++++++++++++++ include/linux/clk.h | 22 ++++++++++++++ include/linux/scmi_protocol.h | 5 ++++ 6 files changed, 193 insertions(+) --- base-commit: 5ffa57f6eecefababb8cbe327222ef171943b183 change-id: 20250124-clk-ssc-fccd4f60d7e5 Best regards,