From patchwork Fri Nov 8 10:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 13867864 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 4F279D5E14B for ; Fri, 8 Nov 2024 10:05:20 +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=gOqJU5Uz4iRFGiPImJR24wPUbgyPC8dYCJuoEOJfNn8=; b=U1RhJ28en0Ora+Yu/8ev70Gl2t h37/MJCMQQFJAFZfdt1OwWbsCM+AkWfeh7ryc0sdF9rB9ApUNYsFRxxwcMKjcfCfhC62+iJ9a39y1 a0amojOgy6R54iS6VkJnucG8KIfX51YBraL7z1xTj9dS2LNufVpMdC6ugd+0ztqkRSX/NNU1SmMNo 5xcJDeFvPg1j5sCUSoT+ssUPSarCainaUJ+phsA/0EP12xPqqF4WiX+pRw1T3gxgjp2RYZ0fUqioL 3hXLQL0IrH9tzir8bpB8yWSouWTmcSEt9YNM9YNlaceXoV1TiaPiBuomaa8TR1i4RPW4X+1E3mAZ/ MDRaiGwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t9LrU-0000000A3Fl-2gZJ; Fri, 08 Nov 2024 10:05:04 +0000 Received: from mail-vi1eur03on20615.outbound.protection.outlook.com ([2a01:111:f403:260c::615] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t9Ll3-0000000A25m-360S for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2024 09:58:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cCH+sNFgKQT5AIiNx8cSK065lsqR+KxO1AHhkWnjSxno9UgPSM0HsP/7unRXyR+SwDeE9HgH2gaqfG59arLhA06GlzPjA9g+lJ+fKtlUq+VUT9ATIQWrKTWxYWsE5zITnyhp8zss+hLog+GU1WTQnw7KCIOQj0/BhYhAamYb4X0BCKQXoPaVMS6sezU5cCy1pDcyWZxVVB10jG+jbBK0RDYOTvNmWS7TQEvZwiqQFoD6CVZy4Y3gqEan4HwGTzqwCfNSH1rT2vBIAoBvKPR+6NvnSv2PraCQF0DgY+XzRMoPXP/Xa1aXVdsf/52Af2xAUb0reg3zwBCo/oCfhIdGNA== 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=gOqJU5Uz4iRFGiPImJR24wPUbgyPC8dYCJuoEOJfNn8=; b=usz9HVYa4sc76gzZoVpddHYV3iEq6eMEYVVARKflDbM+T146vwo3amm6UxugHPLHFdoCLrN65TqSoLCGE18O0gzhmVRSk0n4WBV2GlZF7jKxDoEwq2INND8yACVA98pnix6a4mJNabcDtO/zZKqM6uGVE0UB03Vl8eYGy6i4vgxkI2s5s7mY1b/pGOD/gbMqWmfPVQTXNeHKdf9ZczeaeRFrHyv5N5DpdBg5xa6pmcGmtrcnbQnhxbOWpBNGbixUYRbbCVBXCJvl5sqT77opaY7w9fDjkx2e6QfZHL6c+c3emDE/9awdQosg17lu3iemLlanvM0zER8b4s5+FJaDwg== 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=gOqJU5Uz4iRFGiPImJR24wPUbgyPC8dYCJuoEOJfNn8=; b=WqOuVTWvZ7+/6Xk9mLFfx18QjhnfLlmYU+jQVwSzQalXg7LesiO52vbRuxI0hwcg4cyqQDKT1IbklV6nifKDx7kPJUyNzbCSHHMVBVkIcnr4q7sz4imuKUCcmlL6AF8CPGOflQGAGmK9j4DTzBjOTaWnzpfb74jUirrzRDHlKDaWSKUWF7n4T5Yk0BT0/AyT13mTaHVUt7/dcK6nW4ixcpHmLfK8v7e9XWbV1zR0DOrC0u7Z1FrkGYalhGtBR6Z0LIU9jEhuWe8C7biv3hddVkRIls3MrMeSmapIsNnqOGNjARg2fwQjw+Ywc1vsH0Z1EXBuSVz8en/0lZ4rf3Bw7g== 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 GV1PR04MB9216.eurprd04.prod.outlook.com (2603:10a6:150:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Fri, 8 Nov 2024 09:58:19 +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.8137.019; Fri, 8 Nov 2024 09:58:19 +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 v2 2/3] clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Date: Fri, 8 Nov 2024 18:07:58 +0800 Message-Id: <20241108100759.682260-3-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241108100759.682260-1-shengjiu.wang@nxp.com> References: <20241108100759.682260-1-shengjiu.wang@nxp.com> X-ClientProxiedBy: SG2PR06CA0213.apcprd06.prod.outlook.com (2603:1096:4:68::21) To AM0PR04MB7044.eurprd04.prod.outlook.com (2603:10a6:208:191::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB7044:EE_|GV1PR04MB9216:EE_ X-MS-Office365-Filtering-Correlation-Id: b5e58988-5706-4ce2-efb0-08dcffdbdf84 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: 29Ogf/1/Xevd76F45QyZAq/HBJ6C/9Dr9W4YygIsBd2mAS/9Cujbkd1eidUk9zd/FJDgblp29fb5zGUal3F3ieTb8ROHUx9oOtCw7oe+5nm3sJPmYS/Xck+FCHR1pSKnQCbBX16AIm13CRojmh3z616qZTtolMKaMot8XXN7hDk6D0Saw+0u2SAXEcO8uKz+w49wFLlcCKbhYO7m561xkfzTCHFb4+/jg1enlACj/aUf6xrK59TvqEKYOpVTMDVjlLk7ViHaH9S7RyGuE4Ct31FgmC9PEiS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+LpAwJ+U5NeChjUX+oq+9kI25xQd8j21A78UXav 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)(7416014)(376014)(1800799024)(366016)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oVjAbGl6WrXGA2gu0Jv8AYltVwlpySfCUmIORd+rAylShAj9BmJ41MKlH8xkYZIbPf/aYfbPFBjTm4RCh87vSZUlugM8fijhpvtDPRJ0Nj+e+UZ8NSA4KWHBtbwowGOH/nfSeZa7Veohh6w3690sVSLhRRttswtR++dCeiwo4yq+eu7IKl8v6Lrnh/7agK+/W46o5TSZXRWz6p0ax7jCtYQdwWwrOgmtMtXCeQ7w/B4FRTCB+Z1Z1/itnuPF1ZJpDcm+J5Oq/yvOeyRSKSAMIXAMektOlH5OUzLM52UHP9XVyWKdmAzNHnij0KgPaAZn/5VduggDSNsourGbgjLJIWx4CzrpFRAANF4itPE6pW8hvjXo8q5Cf2m3OaJI8tAzcfev1B/1NXfx/wGBgLQM/8GejMXsZrcmJBLVhsViO5hgcbUNdTKhLWDgN1BBiuBPlP2ipJR4T5NxKEgOPR3amnrOx8A+jZ3NFB665khD8Em4id+GUOlxeWC4ej57qWkAFmtmDKI6eyLzGqGD0mUPkKYbxKssT0rn0+RGuW6jqdVpCGA9/dSleJhh2dFEdJU9rtKiopCKPuK1W+hCMDiP6KISDqz0/jqou1+Sax78sILmEQ4Axxqa83CFhHszHSbhRUZyAZXRjcPei0aCqY72IfPN9Fxao/lES+fMDbM9s3b+fBcAWj/qrojNa/eltqv4k+wFaAmYX0L1UhsFK9Suu+ZuCSeYP7VF8d/oq0ddS8Ob7fgNmzYRT0MLf9Gfh6Yhib/5p5P1x8vt27WyxAzmA8ANfrR8WtZSdoeS7FNAUEQDQNM+yCdbOaMyE34HDJR5+xQuFVQqLsz1sCqsYCworYAtIE6FKTE1+9rBW9iAJY9ZujUXgQq59sXts3VlcGPe1iUyvgt2Y8YCfLvOu+jF68honk9zklYuAcTeIsPL5xkFPUEh6olx3pOLH6/jszgoCFsKuLcrz8+vLrF9WFAto0qnr5/uF1WzpABhbk7jcVjWUIayJ8DTdEOY7GkQPFcrF1B1eumDQ4hlRYmiaRR9pIvI0OvYmdqxu44XrInE1JnpwhPK6rcdgPqu+VLTcqiuGYTykGrhUAOdwrDqDJB/wZg0PF/5V8P3f+3Ugg17PMI2XQS0/Gi6kyvWsP1fujPeY1Wq6h6SIboPdmKPjia/ZYNW5oIu/ZbG2hNXFDg9Rt8cbBsEMq46a6D72TWpuEvqJMtLcqoCjH7QgSoRlofkd79SMVUJeLfYxJm4AiRAhanx1yhYOb+BddCrMKAs7DpHg7RWpD+DppaxENPIiu/PCBdgGfB8okx9h6XwYIfHZgkjq1JxYoyhnTlhCclmu/I1L2/S0kqCuYJwjfX8DdI/Ys6JFdtf0TYEeSOCBkiRTrEFLn9S1ftwYe1B5n/FCb6MZrfAx5PYv6PtEwRFBCvHT+kAqsrPlfytM9dRWSNKNZtYMz4fzXUSFeYljt9vfWoY7yaKZUqeRg4rBgJghx/2SATfbnVtaTyrm04qTRAiYR4pBeqFVwAFXgJqt0C+S4uSRZdQcDEKCRXAEg8KhE/xv5vuaW6yCZa8uligJG7U9elG5LbDydtPOS6LVsPscbzS X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5e58988-5706-4ce2-efb0-08dcffdbdf84 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB7044.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 09:58:19.5382 (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: 2YaOtWzh/eOxRSyAv18TYR8jXs6TL6NxAIRDcQ34rm7BzVkHDGA835LmoWT3vDqlIugZ6xDHt0YpA1gru18dlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9216 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241108_015825_807920_26262FD0 X-CRM114-Status: GOOD ( 12.08 ) 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. 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, },