From patchwork Tue Nov 19 01:58:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 13879355 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 158FFD60D0A for ; Tue, 19 Nov 2024 02:01:37 +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:Content-Type: Content-Transfer-Encoding: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=W0QHeFb71Cg1Cu/b4Ab2c/shHYZYxbqW6Nz4N3zlbyA=; b=WnbWNMxG2m1K5y2EfLMeJLF4QH cKS4XKwJyfq7SukQE6sUTSQk1xNRMQLF7y8KqeH8jS++tnf2hx21Q3OEf0G3yZ4Jd+7TW590wDMlY WXPHhL2BhvspRbk6sJyIEM+yFtEL8zrz7mGBC0LY4nWxiS9p6omRSkZe7DfvxhmN1M8FDmaLeTS/F opdH+8iRXp2I2JwYQMjKtyCylwuGukJmaMRSGgIyAw0IVtMR1ttxvgO4jqdLILXmtp1MRdUvHn0yo ZIu2pz1BF6gmCNWHsdR3SwJ1Nwu1dQfOME8zXbXPBWMBV/kiWZb0wlwdmM53IAo4bFA6Wu9JT0sV1 vUpS/R1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tDDYV-0000000B8b1-1MbZ; Tue, 19 Nov 2024 02:01:27 +0000 Received: from mail-am6eur05on20626.outbound.protection.outlook.com ([2a01:111:f403:2612::626] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tDDVt-0000000B85R-1G2S for linux-arm-kernel@lists.infradead.org; Tue, 19 Nov 2024 01:58:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C5uPIFbBFsiEa6xrpXbP1iXXtk7vySe8P62kOV1adkaw1NVgGfeLoTwCpl/vDLsSCAKMjkq21iUE25/oqM5Ylx/VEj5/RrxCWcMPUhdWgaE3suen4rxJNh4wVhHax/yEAKT5b/Wgwzs15f58qHD6XG8duTPY7cHsZfL1bo2POiyU2UsIYnWfiLNHdCA8ddkGJawvVoV2xm+JVokuUpbUNrjEuGlBjYQDT+mP30uYUhACp9QDZCBRFbYFZbThJnE7x/Nur/tsG4Xi8zq3wxiz/BGfufGdpRISfoGxrXbKf+kPd6aJjIpAMXMoondWvynKImL8SPXG5DvWwNHMZEgjjA== 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=W0QHeFb71Cg1Cu/b4Ab2c/shHYZYxbqW6Nz4N3zlbyA=; b=d2Metkmwp3iBAETvHKM3BDfXK1XLxZEatFFBgyUMgd9cDFGBcruu5impka1RyvPywa4ldHfZIVQP5uogDRHJIEofZHSEmenCxSy8BVxU1kH2c+5Rzw7iqBPjEtk52UTUx1ElZP2L6brjoznPMDBVEFZxbe8ro3LrzD+ct9NlSIw4pNSJi9OpGD7ms0eHRYJcGWTBN3UqCGqCcs8gAqRS+XFnykiMomSpr05TTYkzdWTbUCX4yDshhxJmBn8UBDP69F7OGv24vIuWNSy6w+LbBNXkMW4JyJVArgmY3J85+J3HprpRUSxsJF6mknzlvbJcuo/CBAyAQ6L/R+zKZuXIKw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W0QHeFb71Cg1Cu/b4Ab2c/shHYZYxbqW6Nz4N3zlbyA=; b=WVk/ebUtb8e4TbbVUcFXp+YxDymaNmlSwocynQnJ9ZG9//egpqVqJojTa1nu+a8ft3SLS13sVWbspH66u9wZ83764IvCq/VhkapLfW+1qLS/ye5KRv2zVwvg0X1EbM3qrGcJLFftRARxsG3D7oAldIiGQjtYzsz0EKhct6A68/PocH9MjzjwyW19W62rB5jDLCdJpMjwTIDiSw578RGwkLuj+4J/ZuOLU8lEIDZNyYxzwbY+auv7LJKZxDpCWmyVg46ey/OFgyiGOfgGd4iWI/+gxObg/RLxmuutZGGndVZDGLoAZLngahsDKqcrq1llb8ZyyE6ol9dE4dc342r8Pw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB7044.eurprd04.prod.outlook.com (2603:10a6:208:191::20) by AM8PR04MB7297.eurprd04.prod.outlook.com (2603:10a6:20b:1c5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.21; Tue, 19 Nov 2024 01:58:41 +0000 Received: from AM0PR04MB7044.eurprd04.prod.outlook.com ([fe80::7be0:296:768c:e891]) by AM0PR04MB7044.eurprd04.prod.outlook.com ([fe80::7be0:296:768c:e891%6]) with mapi id 15.20.8158.013; Tue, 19 Nov 2024 01:58:41 +0000 From: Shengjiu Wang To: abelvesa@kernel.org, peng.fan@nxp.com, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev, shengjiu.wang@gmail.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Date: Tue, 19 Nov 2024 09:58:04 +0800 Message-Id: <20241119015805.3840606-3-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241119015805.3840606-1-shengjiu.wang@nxp.com> References: <20241119015805.3840606-1-shengjiu.wang@nxp.com> X-ClientProxiedBy: SG3P274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::26) To AM0PR04MB7044.eurprd04.prod.outlook.com (2603:10a6:208:191::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB7044:EE_|AM8PR04MB7297:EE_ X-MS-Office365-Filtering-Correlation-Id: b5d14c18-bcba-4c53-f633-08dd083db0c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|1800799024|376014|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: KXFd/08ZbUr4SfvAXYa0fcXiEVfNwatiCySVX2XojiwlR65bGacgBDSGPhr7CyBRYWcWwbYobkjnET04b4myVjVx+1PrVldKzpLr57K/otHk3SHSPFmCV0nEunuj6+wz3ZgqfyPX1yaaRpiOW4q0PcS4v3LUjjUNtEgNSVRozU/pWtI/PoC8sdVpgqSMva/Qt4uMRg4BVHPNUZqKcIACBfsbcSpPaP0Yvo6J4avb2LJElkR8YQzPJqStkriNXCw8LF+I8UUQdGrA+ufyh9ec/FxEI0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EUyy/ohp6UK5lu7QAadlfS3TNETHXz+YxnZ1Av/xGNyS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB7044.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(366016)(1800799024)(376014)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mjUGAeSheFN8Z1+dCc6AshSVNpIXERf+Nk08OSiLOIRZ+kYm4ty+YmYgIdjdbiQ56hxUiIyM1HpXJkhqJHuRaPmMeiFDBMYm1SosHPASv9OKo1JLoLepN5Uaqb1/04hOId+twtXOBk06w9MjGYNbe6wvmx2xfLolULrnhimdYyBTGcV68h5UXip5sj0TO9wek+PIcfrPs5x6uLKcABSFNIg9usiiLUsWVFsHbW7fWF5P3zZktAwXroCYIEDU1PxHcXFP3rg4dsv5Kl4JF37T+tervHNw67EbfgfAInUWpyERmXwAAKnlEMNv3gJpBaLUzCjum4LB++asPX8t+YZF+Vti7bATg5v/G6cCaJrFji8bwX79exVPQfWGfUlS93b8rn1QBLoFv4db8FVn4id8jH14Pke5PCQsk30g+eA6JyO6jxX1zbuDWhaDg1GmVZ/GNvQLZD07b2W7CWJo9y096fcNuHCtw8yxSQBro3hNI0IPEtQZPwTBqeuZBqvVtPs+oW9FRFJ6UXgKrPcGNDK+gt12+d4cCTfu7qqDnK1THBpKb1r1QLSRDWDthwxtRuMCo1KsEUD0fcIsP5Om9FV3krBaNeLv1FJkim8J0trjPLKqdcFWULMPyJ9JpfW70MPmbVKAZSgoMg5QJOsQc//v8BXItyo3NbmNT3KJUDZUnQarqEhi1YGef7hpqpSWkh7XWWFnFkufgfZozjnnLab6mpwLoKfsZj7a6k76B/nv346g53P36qPjlVrI3aGI0wahwpRsuyXBVyXrYymoExGgmsC6PMqdPyPaP/7HFeZoxhcFponUdmV6JJqJaVAywv9+XRnYQLF8nxnWMoYtQRkm0yUJ83KlXGbDQhvjndV+gu/Y33sdVrYxVhuH1pN/uc4E5sy4kCEMOocW2+bXvvbH7BsD9ykiWhxSnKoYTD8jbzFR88f2xqD1AgiVCApu576/2Zn2FIFLrnuvKxqUkHWaBy/hH8z6ILwxitsQz6iZwOuna3twnbOlwHGCSfOF6M+dD73VPFoqB7SZMZn0PlNxj13EcmmBsED4FzLuKp/+t6MGSaUE49l/Q0O81+squ5p18bPXkbV5VzFSF2EUZ+A05ZWhDctd+wxY9fcoLX1Olv30NXQHp5eISrcH7HcIWpV2pZYXpVnA1KG+njbkNv7d7LVItQa+I/e2/dxdBB/DAyBduC9v1jqsyb1hUOBXK5vBQnUR3itDGpQCrc5kXyoazowHaxUYa7NTPoJRPREiIzUt6CI0BTGex/SfTb7m+KGQTopdF1iNmJmsybojLlzzoOEwWxis+cwBDzk+/OXkPWhZCJ8dXPevEpCke0Z4bz89wm1YUQTIwHNayumBYj145Q8S7dYVhyvgfHKtksRnRTv5UAE0ibE1EXEPprUgxh0Eeww59xuGaVu8TPe3MIANZzFM1G12QOdZ+gW8/P4agPGrc1Jzu9fckUW9RCMdku/9FkaY3rIpB6Ce8P5xcgDJNmvxINsuEWu+iAKhq/S3WbdVzKblvnC0ZBYnhszK4X1FQAOvSVZNvRVEhD159Epyg6avSVgol29yyCyigWjKzmL+ULCrkLVBfSrgTRCK5i8O X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5d14c18-bcba-4c53-f633-08dd083db0c6 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB7044.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 01:58:41.2196 (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: hZNUIcbPFWoySh2z3B5XW6SVl4wQjFa5i3f+4yaZ1GiX/WQtlO5zZIzMiI+1w0aCcrZupuNLUpfsm+b+MHw2XA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7297 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_175845_338477_B5A3FFF7 X-CRM114-Status: GOOD ( 12.33 ) 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 Split IMX93_CLK_SPDIF_IPG from IMX93_CLK_SPDIF_GATE because the IMX93_CLK_SPDIF_GATE controls the gate of IPG clock and root clock. Without this change, disabling IMX93_CLK_SPDIF_GATE would also disable the IPG clock, causing register access failures. Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes") Signed-off-by: Shengjiu Wang Reviewed-by: Frank Li --- drivers/clk/imx/clk-imx93.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c index 58a516dd385b..eb818db008fb 100644 --- a/drivers/clk/imx/clk-imx93.c +++ b/drivers/clk/imx/clk-imx93.c @@ -15,7 +15,7 @@ #include "clk.h" -#define IMX93_CLK_END 207 +#define IMX93_CLK_END 208 #define PLAT_IMX93 BIT(0) #define PLAT_IMX91 BIT(1) @@ -38,6 +38,7 @@ static u32 share_count_sai2; static u32 share_count_sai3; static u32 share_count_mub; static u32 share_count_pdm; +static u32 share_count_spdif; static const char * const a55_core_sels[] = {"a55_alt", "arm_pll"}; static const char *parent_names[MAX_SEL][4] = { @@ -252,7 +253,8 @@ static const struct imx93_clk_ccgr { { IMX93_CLK_MQS1_GATE, "mqs1", "sai1_root", 0x9b00, }, { IMX93_CLK_MQS2_GATE, "mqs2", "sai3_root", 0x9b40, }, { IMX93_CLK_AUD_XCVR_GATE, "aud_xcvr", "audio_xcvr_root", 0x9b80, }, - { IMX93_CLK_SPDIF_GATE, "spdif", "spdif_root", 0x9c00, }, + { IMX93_CLK_SPDIF_IPG, "spdif_ipg_clk", "bus_wakeup_root", 0x9c00, 0, &share_count_spdif}, + { IMX93_CLK_SPDIF_GATE, "spdif", "spdif_root", 0x9c00, 0, &share_count_spdif}, { IMX93_CLK_HSIO_32K_GATE, "hsio_32k", "osc_32k", 0x9dc0, }, { IMX93_CLK_ENET1_GATE, "enet1", "wakeup_axi_root", 0x9e00, 0, NULL, PLAT_IMX93, }, { IMX93_CLK_ENET_QOS_GATE, "enet_qos", "wakeup_axi_root", 0x9e40, 0, NULL, PLAT_IMX93, },