From patchwork Sat May 4 00:49:10 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: 13653719 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2082.outbound.protection.outlook.com [40.107.241.82]) (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 CC63C2B9D7 for ; Sat, 4 May 2024 00:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783360; cv=fail; b=dGm+bTCKi0BsIdkBNoch6Yv/xhx2HbOA+YmljfwtVUOfiZTxHdft/i8RIrP7oMfLTB7CO8OYRRljKKmp1pcpVSQuV1x9QawviBkQLceTCQlYCWuazKo4HjzkvMWLH4/CZ0khgC6srEY3Gj+f4dIxGiWnSqNiAQb4IUOrsWsGH7I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783360; c=relaxed/simple; bh=zB0ZVdk0Qm7I8UWyqi5Qs3uBnGOodb2WAs9gToNGiDU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=cgA8im1StO54gcQVdR8mt+OiIxKDQzUyF2biomqRXyxy433aY8tXVs5gPj57OQdvWqQMzsghYJPifkEmqHUc0bAF1iIRyVp4B/St7vIde6p+ISnbfcctkaF7TUvUzpM1exrHglBl3Xd//lSFQDVMxmELsGMQB/6a3LjSWeUA8ME= 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=UHDFD4IY; arc=fail smtp.client-ip=40.107.241.82 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="UHDFD4IY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gSsE43sf3Ip9guXN/I1G55EQhEDluFM22uri3q4bY/6F3rDvPtvuZZoK/bROkbfaTbgvhMVWmaIFZZ1ttVcW1KaubrxMIKuZvu9F89mwuaIrrZQeZZovkTvp1rZZ66+i3/LflB5cHA6N7/Zi4qZWGa8gPbdLqtx5m2fOiGkCI+sab5RbdMsWubwbAVIKokm66rcGxx6OxT/05OOyAZklTkAtsN5jcdD4BtXd+ShIj77vIJWvM21NJbYLTdmisueAlDsxO791J1CigWVmJji6Sj0BEFq4owKkVBCMx2dISZ0AeKUCDFfR9QOYlDGoKT+tOluzmNM0uGceBGpTmpLLQQ== 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=morjSPZoht/sZgZZlrJFTpm7VksD0m/Vy6jf//XeATM=; b=lVvooT4F0LoiW9cTIfYUSmp2EkoA3fGDLJxj2gJ/xTVlG7T44/+Ggwp27LvPkioVseoTTOqBa9B+ucgurjPJzhVO1j5BLqx9rH5nXcvGWQ2fYlO2mk+guM6ahOvGSJCj/FPR9EMnR5vASVePGrhRGUNWRw5UdaPFJJZOszL+epqxUIiiJOTeRddlRMBZAtI3uscGD5JCFyqg0DkaBWxV6GaXD5xeyhd3Gq7ifr3/Bucl2mHZl55AkPfRqgRwuQ91gCrF5kGqc4BGfvKK93Na+7JMoer/A2jkuotSm9cyEDD7DLAomgH5hHaUPiDQpygOeP253j2QH6SUOktjgbkVng== 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=morjSPZoht/sZgZZlrJFTpm7VksD0m/Vy6jf//XeATM=; b=UHDFD4IYz31jMk1YtV1KaikCFXSpv8QtpjotNhe0a7OMRRSNMIma71W5l2yFWkKO0e/LKszRX/9LWxDODd3X0FawzdbpH1Tm6J936pL3kR8vJK8cBkjwjujsE74klPkaVoqTSnx2+M4wv+cruzon+kite5q6rasu9WK8T4WemFQ= 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 PA4PR04MB7726.eurprd04.prod.outlook.com (2603:10a6:102:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.29; Sat, 4 May 2024 00:42:35 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.029; Sat, 4 May 2024 00:42:35 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:10 +0800 Subject: [PATCH 17/18] clk: imx: imx8qxp: Parent should be initialized earlier than the clock Message-Id: <20240504-imx-clk-v1-17-f7915489d58d@nxp.com> References: <20240504-imx-clk-v1-0-f7915489d58d@nxp.com> In-Reply-To: <20240504-imx-clk-v1-0-f7915489d58d@nxp.com> To: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jacky Bai , Ye Li , Dong Aisheng Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Abel Vesa , Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=2435; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=hrw2P3sZckBHVBC6N5CEm5mGrpqUDVpTtcM6jOZ4s+Q=; b=kMNh8mRqhB2ZDTaJfXa8sIEqusAxeIdV1ctqQPQJT619wLq1V1wOyRkq7JmU8v0JMclWoOtqu 5CJIiqYI6P6DMjk1UvpSbkZbv433QFF+vi0FycR61sqi+S9C5XzB2F2 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0055.apcprd02.prod.outlook.com (2603:1096:4:1f5::16) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PA4PR04MB7726:EE_ X-MS-Office365-Filtering-Correlation-Id: c7bece1c-ef20-4b36-406a-08dc6bd31782 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|52116005|366007|1800799015|376005|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?17yl/1FuUYGzaqYfevleyfbYTkelQBH?= =?utf-8?q?jMyodlD6zG578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xHrOjxUFKjuoBStaGQKlzq6LJWyQdledpBjt2QJWOvLIr1wO?= =?utf-8?q?yIveA1qHC9fmoCIVPHEkgptNdustprR8GdMKV/tEX94WLsb1GtNCrU05zMFjd1laZ?= =?utf-8?q?YxffbyZps7gD7/wkzGgdpIJoq5dGhOfs4wKDoUcdv7MpFrpvB7TJ5uBQv+kwVWJa5?= =?utf-8?q?4ULTKqqo/jz8niyAYHfUoemGXRpxsfyn5K3ECM6jp5NnjeLuEpCGpJcKdO8XuhvVT?= =?utf-8?q?vKBQ9r1eGy9xxLGeDDxIDgWuYSalWodOz434LcMRZ0a3n5f87zeUkvYUU24PuM54T?= =?utf-8?q?1+aY3uAmfgfGfKc9oPfCt1N4Evh7GSU8nzSuBMo2MpbmNtW4vp0QZD+3QryFmi9/b?= =?utf-8?q?XrN3onAkwHD7uJvAAIlIZ3fwldUih7p0X8tmJZaRGGhJfAkvlf7Ovpi4=3D?= 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)(7416005)(52116005)(366007)(1800799015)(376005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UNiVcjMtY15NFyp6yu5zE3mmJyG5?= =?utf-8?q?UPsGqlw98mGWEhk8TtuhKBPOuUlKfRijD7AqMDPHh9BzY5PfBZ674f1LMjXv4w6TT?= =?utf-8?q?FaR2uSktAq/8gMe32KsLEd+aIhnuxtXKiaPdNKX3w7KFb9T7G0TqJWWREk3wQa1o1?= =?utf-8?q?7tnsgj4K09/ztJ0kJZJMRTBemc0VLZMxm3BxllQLi4GtPzeFTadVzenKHsXOXWbVA?= =?utf-8?q?gILfVkn+/heCg6WHq1m+8R9WPfaCUDHfaRRLzb2hW7J4aLAKH4uz+TNe0Yp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WNRd?= =?utf-8?q?ZP1FgBXQwR2BAEqvp1lzoDVil6KfjXVlEBvOzDPUElaopBEfOCyfVh9/X9UWIZl2q?= =?utf-8?q?nBlXu2GwOHdt6SU0G02M7GuGWV9itc09Y69Hq5KOfpUZ7G5fuX2oBx646XO4Gn4Os?= =?utf-8?q?PKSshamxv+drN/9nKRRWGC0EeUGX+yKnW4BQjDS9yFAb/SI7JA7ElThjGAWPFpYFA?= =?utf-8?q?tGJ8x97OECFPHwx4VV/Mby+Qe+zvisPtBp8sgw6e0Jlw5dBd+ES7VdGjD/O+2QtwA?= =?utf-8?q?4i4ZQblO1ZY0vXh3jT9BKEZh/8qLpE5jh+olJrx27W3Abwf04hBI6rjt+sJ/SVgSr?= =?utf-8?q?gT4uvRwldIiZKLYHLl4D8LIVKRvGXOlQELPb9pB/snlLq1qpY4YQun4oVIoqp5fO6?= =?utf-8?q?MRpJCx5Q6C2V?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7bece1c-ef20-4b36-406a-08dc6bd31782 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 00:42:35.7214 (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: hvDZXT+pEobDOUD8GHKuZhTP30Ad7uHwX17EWzs4ePJZMaLKn3kFHhaqSXMCA0203P1M8DQK/mbu9SBubRmSJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan The initialization order of SCU clocks affects the sequence of SCU clock resume. If there are no other effects, the earlier the initialization, the earlier the resume. During SCU clock resume, the clock rate is restored. As SCFW guidelines, configure the parent clock rate before configuring the child rate. Fixes: babfaa9556d7 ("clk: imx: scu: add more scu clocks") Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8qxp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index 47f4ceab1179..3ae162625bb1 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -186,8 +186,8 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) imx_clk_scu("pwm_clk", IMX_SC_R_LCD_0_PWM_0, IMX_SC_PM_CLK_PER); imx_clk_scu("elcdif_pll", IMX_SC_R_ELCDIF_PLL, IMX_SC_PM_CLK_PLL); imx_clk_scu2("lcd_clk", lcd_sels, ARRAY_SIZE(lcd_sels), IMX_SC_R_LCD_0, IMX_SC_PM_CLK_PER); - imx_clk_scu2("lcd_pxl_clk", lcd_pxl_sels, ARRAY_SIZE(lcd_pxl_sels), IMX_SC_R_LCD_0, IMX_SC_PM_CLK_MISC0); imx_clk_scu("lcd_pxl_bypass_div_clk", IMX_SC_R_LCD_0, IMX_SC_PM_CLK_BYPASS); + imx_clk_scu2("lcd_pxl_clk", lcd_pxl_sels, ARRAY_SIZE(lcd_pxl_sels), IMX_SC_R_LCD_0, IMX_SC_PM_CLK_MISC0); /* Audio SS */ imx_clk_scu("audio_pll0_clk", IMX_SC_R_AUDIO_PLL_0, IMX_SC_PM_CLK_PLL); @@ -229,11 +229,11 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) imx_clk_scu2("dc0_disp1_clk", dc0_sels, ARRAY_SIZE(dc0_sels), IMX_SC_R_DC_0, IMX_SC_PM_CLK_MISC1); imx_clk_scu("dc0_bypass1_clk", IMX_SC_R_DC_0_VIDEO1, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu2("dc1_disp0_clk", dc1_sels, ARRAY_SIZE(dc1_sels), IMX_SC_R_DC_1, IMX_SC_PM_CLK_MISC0); - imx_clk_scu2("dc1_disp1_clk", dc1_sels, ARRAY_SIZE(dc1_sels), IMX_SC_R_DC_1, IMX_SC_PM_CLK_MISC1); imx_clk_scu("dc1_pll0_clk", IMX_SC_R_DC_1_PLL_0, IMX_SC_PM_CLK_PLL); imx_clk_scu("dc1_pll1_clk", IMX_SC_R_DC_1_PLL_1, IMX_SC_PM_CLK_PLL); imx_clk_scu("dc1_bypass0_clk", IMX_SC_R_DC_1_VIDEO0, IMX_SC_PM_CLK_BYPASS); + imx_clk_scu2("dc1_disp0_clk", dc1_sels, ARRAY_SIZE(dc1_sels), IMX_SC_R_DC_1, IMX_SC_PM_CLK_MISC0); + imx_clk_scu2("dc1_disp1_clk", dc1_sels, ARRAY_SIZE(dc1_sels), IMX_SC_R_DC_1, IMX_SC_PM_CLK_MISC1); imx_clk_scu("dc1_bypass1_clk", IMX_SC_R_DC_1_VIDEO1, IMX_SC_PM_CLK_BYPASS); /* MIPI-LVDS SS */