From patchwork Sat May 4 00:48:54 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: 13653703 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2041.outbound.protection.outlook.com [40.107.105.41]) (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 23CDB210D for ; Sat, 4 May 2024 00:41:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783273; cv=fail; b=hlZvstDzCbYlJbcl47FfG8HH6is7OvWu55CUnIoCrZnEG14soHHlrDPArVXw5kCJnGJASQOs8ji9cbC7czMKQEGRUGxm9H13+E6IjvSVLmqfwkIG90zZrznHxUkt2LT+GZ15a+Ge4tPUniH+VfWhe5g/X/AsmWrjuKEMLKGK+2g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783273; c=relaxed/simple; bh=rcCtVWuFJLRqXg+s+ZbKpx/twvYOuewRyu/zZTOc/H8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=IVTHjwXC5TyHG5rf/n8JYNqQyIT8DGPdLjsB8svP5NZhUgOxxNjPtwiL1XZzf23VWzjGNKracnIaNwKqP5PnVr5UG0XZleylD6Bz1zoWAaM83+Z6OhzUGkFjF2GQb5u0iyofICbkDKiDTBb0Xyewflzk1ZZzaUjx7BMrj2xxNO4= 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=LhAPvhcP; arc=fail smtp.client-ip=40.107.105.41 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="LhAPvhcP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PYJXEvNMH7SQGqxvt6QDR0NkkyqZR3IGcC5xskJxIrKRRvrjJYHK/KGC4jsYO9pM2NzHhGtOx08x50m35B0UAeoKClzu8+thzLfaDmXz//waBtZlg+Ba4J9y4yjXTD2nJ+Fk1Sj88lb8QVJViBZdfAoaZIuM6PeTCx2EfhKUodZTC19sNm8YgI5m4cnmJ/aDz3r9h9S3Lt9THwL+NUuheEuC5wD5rt7cza8i7a4upQrR6QF9FGmQsDM5iceNbQLKIpe74GzZ1mYJ0aArmww5DpZoAqWiIocptREpPLAHyFz1Z6giMkK5XQ4bRNmsx8+Ab+JbGiABrEYo2UoCIMPlSQ== 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=wUBHObqX7+uXERJEHkjNWet6mkZy6+My8u8xzR/PX/E=; b=nyrXLazplHUj+yJY03LDVDNDKGJlUv5SrLkX3tZ2AXVGNyfl/w6MSDOo8AkTflY68sIx388fK2G8vWvdg4yM4rf9KgyQTF5F6u9KtdynRgW7ALN6oJuk9m/a7xE6w9w6Qo+BuFv7/42wovl5xU7Fw5tyTuMpZur44mWmwbvO+2Bf3cYCpAzApA8EDlZdfHa0APV7uGwfZ6Ipd9GNXhsn6FQyOZHN+sTTo+uincYuDzD2SKrNwU7IPnNArDqv+7gf3GvISQrt8zVnz2VHJa5fFXGVQPIPgZj4KztiwsrcXPqUs+9IL9ekqc5AoVlAQRHxT5q/7vprNkr8ghSC/RHh1A== 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=wUBHObqX7+uXERJEHkjNWet6mkZy6+My8u8xzR/PX/E=; b=LhAPvhcPvpq1h2TemYfpLaoC69lDJ1R3Q1DxgX8OoaL7nKkBB4d93H67/5NEPjYCLLccBqW1mq4QfPe4jZGebfYIULyxcXNOPsfPk7p0p9CWkO84F0mWNcXNHCRCnj/8+UemLxb8wTJdvj6AX+itn3JxhELpfRxckaXkj+0T0X8= 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:41:07 +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:41:07 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:54 +0800 Subject: [PATCH 01/18] clk: imx: composite-8m: Enable gate clk with mcore_booted Message-Id: <20240504-imx-clk-v1-1-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=3100; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=iITI+dk+sPkjkDWQwUetdnNFKtogLu9x+44sHjDOVUI=; b=fkSTsJHoRmvS36n4JKMR8N2wmEhRjewWymbpgLM/PXzcG7mlf0GshZKeSpwDWPopG+52na0ri 5nrrvS0cHR5Br/6BePM4dNt8xDGjresoSl72zQDPa5z8trdkrkn2e2S 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: bf5dbd63-c734-4328-a905-08dc6bd2e314 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?wZ8w4BkBCwXdLKXhLwoPqrsboAXk7cf?= =?utf-8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ibuQxVZCcUXargwgk8QHmqEefrWKapDmJR7dS3SpbxWjj9Jjr?= =?utf-8?q?D04hPRrDN9wOtE/KId8X6bh1kEK3L2cAmWJKKQohhqPyWNfaa0cZsroMuaWl9b5Q5?= =?utf-8?q?OljRKKjaLkwNP527WWVvkLlotQ8ZPUhPNwEXp90iasV08mgX7tH5l8baMgKA0oXlx?= =?utf-8?q?QH2Y6YQmUpd9oButU279pNnvwikt3WfP5gv15f7crY9KdZRB0iUS9OwO0jAAxFcG4?= =?utf-8?q?iuO9nvUYPp/kyRkDvmp5vQDWUb2lgCrNd7myU1ibhYqk5lDKDv0nDGQLY/3qyCyVv?= =?utf-8?q?3OTAE6dlUTLbUC1b0m3x2nb4LkGvl1/gHhhvakdTxU6QN/UByiR2+Cgt/SmeWR8Ht?= =?utf-8?q?MdL65669zGhG9PUevzHsm6FzlbIXvj+H+sdMLkR6ODceupn0aw4YgGzs=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?lK01ez+HI7+cq3v6rR/IB101rDFi?= =?utf-8?q?hnKYLKRlUpWwTpPZnFMLV4i4CDvg0kWRh/8R+/ABI27AgBkxPdjkuv9+blMQ5egZQ?= =?utf-8?q?oJzaofyG8BVqJrnFAdg/Sh783jc0zzxs5pdMPbT+YzOY+pb1yy76l4dE60TGe3295?= =?utf-8?q?c4ws3Yrt2A070r1Ri5l+MpTr+Q5QnUKb6JdvV5dt8wTdzzR79ZbYDGK++S+qMcoS5?= =?utf-8?q?NYegq3vR9P+OsG3YKjqiW+7yIcET7xi90/U7tJV1OqHxRFUDaQYzie6Ld7c9VSV6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f-8?q?ncBz1I4/O+86p6HeJg8gmYU+p6RhPUIGnE8qtVzHVIVh/KK92i6udtK0+g4/nboto?= =?utf-8?q?9cjPQR2MsVwF40MH3QApmwb8QqNzjFhR9e9Zdkm0MtzY39+klvmrEpGtO+SDVXNgM?= =?utf-8?q?cNF28pT75y+dFRmP+SHbSVjiJqbnDlCJ2IonqHLSW+Su6fHHF18ZDKxw4nUCF8HnT?= =?utf-8?q?atWIMW6XdwqzgGBe1GomznZVEIMiAK5jhOiDQU+FYt+V9CpThqjyQMNFfZGhOg5gm?= =?utf-8?q?U3tMsqWyz1Bd/Ytw9PV7CoBu9iZlm+u27NtCmLnOraYPBsaLbw7NpKNodz5A8+rRA?= =?utf-8?q?Wvq/n3MwHygBrAzxGkupvkvQxIhlTjSVNhL5HrQYewv55bMW1VhkzZb71tzxVcwd6?= =?utf-8?q?WDAhulI9ky6a?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf5dbd63-c734-4328-a905-08dc6bd2e314 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:41:07.7874 (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: 1CSe35Dopixa7e/iwt6n4cKl+rtZwbBirxi2n4WCfFXYuZHjR//RTFlYT7pZyIQX36YKYZd1NsDq7srhIlZAHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan Bootloader might disable some CCM ROOT Slices. So if mcore_booted set with display CCM ROOT disabled by Bootloader, kernel display BLK CTRL driver imx8m_blk_ctrl_driver_init may hang the system because the BUS clk is disabled. Add back gate ops, but with disable doing nothing, then the CCM ROOT will be enabled when used. Fixes: 489bbee0c983 ("clk: imx: composite-8m: Enable gate clk with mcore_booted") Reviewed-by: Ye Li Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-8m.c | 53 ++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c index 8cc07d056a83..f187582ba491 100644 --- a/drivers/clk/imx/clk-composite-8m.c +++ b/drivers/clk/imx/clk-composite-8m.c @@ -204,6 +204,34 @@ static const struct clk_ops imx8m_clk_composite_mux_ops = { .determine_rate = imx8m_clk_composite_mux_determine_rate, }; +static int imx8m_clk_composite_gate_enable(struct clk_hw *hw) +{ + struct clk_gate *gate = to_clk_gate(hw); + unsigned long flags; + u32 val; + + spin_lock_irqsave(gate->lock, flags); + + val = readl(gate->reg); + val |= BIT(gate->bit_idx); + writel(val, gate->reg); + + spin_unlock_irqrestore(gate->lock, flags); + + return 0; +} + +static void imx8m_clk_composite_gate_disable(struct clk_hw *hw) +{ + /* composite clk requires the disable hook */ +} + +static const struct clk_ops imx8m_clk_composite_gate_ops = { + .enable = imx8m_clk_composite_gate_enable, + .disable = imx8m_clk_composite_gate_disable, + .is_enabled = clk_gate_is_enabled, +}; + struct clk_hw *__imx8m_clk_hw_composite(const char *name, const char * const *parent_names, int num_parents, void __iomem *reg, @@ -217,6 +245,7 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name, struct clk_mux *mux; const struct clk_ops *divider_ops; const struct clk_ops *mux_ops; + const struct clk_ops *gate_ops; mux = kzalloc(sizeof(*mux), GFP_KERNEL); if (!mux) @@ -257,20 +286,22 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name, div->flags = CLK_DIVIDER_ROUND_CLOSEST; /* skip registering the gate ops if M4 is enabled */ - if (!mcore_booted) { - gate = kzalloc(sizeof(*gate), GFP_KERNEL); - if (!gate) - goto free_div; - - gate_hw = &gate->hw; - gate->reg = reg; - gate->bit_idx = PCG_CGC_SHIFT; - gate->lock = &imx_ccm_lock; - } + gate = kzalloc(sizeof(*gate), GFP_KERNEL); + if (!gate) + goto free_div; + + gate_hw = &gate->hw; + gate->reg = reg; + gate->bit_idx = PCG_CGC_SHIFT; + gate->lock = &imx_ccm_lock; + if (!mcore_booted) + gate_ops = &clk_gate_ops; + else + gate_ops = &imx8m_clk_composite_gate_ops; hw = clk_hw_register_composite(NULL, name, parent_names, num_parents, mux_hw, mux_ops, div_hw, - divider_ops, gate_hw, &clk_gate_ops, flags); + divider_ops, gate_hw, gate_ops, flags); if (IS_ERR(hw)) goto free_gate; From patchwork Sat May 4 00:48:55 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: 13653704 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2085.outbound.protection.outlook.com [40.107.105.85]) (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 21039BA4D for ; Sat, 4 May 2024 00:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.85 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783278; cv=fail; b=sKiADnaNrulbv3cFU2qPpnaKEUDyLqaKjXhk55mTbl1UEAfIxHFWFeAbqDt6jBTvBTbv8zvDKqIUQ+xJOdvVPNV9U3IhLycmB7SH2u6oWLWKhRE4696v8c11S/rug0y/8NHWd7YyzhDU4WzLC84hyQ121PM4qhrJZYWmk8KuJNo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783278; c=relaxed/simple; bh=6bfV1dS4W03vysGWKUi5DvTJJb/JmkVcqlEWc5z/JWg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=MUJAB5ph6BTbF8ZYWFdwI6/QfW5rcQbLfokn/MyAgk0jOgkLY+SeIMCPQZbaOoYYnQj8tdMmkyeJ2iC857iGF4QnTFWg0xF4bVi9gma1uW6sVErKGiS0mVwPmWqN4FMnzlA4zRzWmLSd7Nj2PSv06aQ9uSXtQnJmV5YynRL0Q/E= 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=beP4RVJX; arc=fail smtp.client-ip=40.107.105.85 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="beP4RVJX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m5qCufNfSAiYu0lHWeji7Zkyc1bhWYsxOUQ5pPMGHQwnFJdaunKLhhBYiVrUXUw3yxqfsUQiS68LXGXQ9qnSphdfXpsj+8h+w/8IooqNL2lqYMJBvbvihTaVM+51NJ/4li3iFNNM67mZswQSH5Las9fNw19u1musmWHM2xUFXz9eaepxcnrzYD2aIdXmSHVDgP3YwIA7hCFHWhOd0dvjmi1YKLnmRkn2t/2eCLIwB97k3cVwfe9MyS1VtVC6g147ylOehZO0iWlAcXuQXPxwtNbmNyB4kAdg16MQ+3O9zMjXcUQoe/ET1v8kizWVe9gtzhJqJaovxxqmrERT0GQhDA== 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=VGMI2AiGxzw3PtYdGfhqBPcJZuR1jYmB5HiZD5n8n9U=; b=E2ZfAVfjtrTq57DbWsgcsxAeDV6xx6RDmu3Od2CPEItisyuxlaJtWrr0MIgB8xWDPtB1rNx7vx7l2vznD7/ZFAr4/eaLMVnRcvhlQEXwct63UdiJeSHxWXCwCtOpLytxkpdaNxRorIuDQkNPbXN1+GLwBX8+Dk7j649fybdnLQQ7kqEsw6LxPkucyRX6QFgOqK+TPIDzs0mxpRSke3Nu56CaEWJm0HeK7JiRZVetIFKjHzw6h4ByxE2rxiPZDn2kvd3S5TVZcuZinIsYzv1CWnoPUumy0XAWCLWQpCJ5e3RU7xCBEqoW+LBVQjonuW1K2MSg0PspprXIAl+gS9CFag== 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=VGMI2AiGxzw3PtYdGfhqBPcJZuR1jYmB5HiZD5n8n9U=; b=beP4RVJXKfA0VyKIo9b5Fxhx+pYU039zLwUQQtw3nDTRCqJsx+VSMbFNNPLhRGUL+6wO2h4cT46jqpsc4bP8xTEpEVoqWPxX/hHkAtQz1RhR3WY2nz5xCu7TGUPEXMjMbYy++aAbAnHAhJuj9a47skkF9watz3UtOWe7GMNzruQ= 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:41:13 +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:41:13 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:55 +0800 Subject: [PATCH 02/18] clk: imx: composite-93: keep root clock on when mcore enabled Message-Id: <20240504-imx-clk-v1-2-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 , Chancel Liu X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=2275; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=nzd37ej6sCrJO2CX0AUOVMMELufbZrxk0WgiSw0tXHw=; b=ZpZQ4CTt9Q0v3CidAfPTOx0iAPeCEzp5sE1+Hz3Vbmoc4EdTbB04/h89bvHDFglwc2HIEwfYY cQiiBpsCKYKBEuMj2WkFEaqyBvuyFqV9EGT8SVQBO6XbVChNLFKuv7A 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: f7580939-a12b-43fc-4ad0-08dc6bd2e663 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?zLnxJ2dz2+KPvsyWSoodz1EEhLjpMM1?= =?utf-8?q?l5E9V5v/qk8oy69UNbCs8L78Xm3LfLpu8PmKTcbmpWlbNYC2urDwxHXB8BYtGCXGz?= =?utf-8?q?bsGgU1RrqNCuA+TqoBBRoUjbXtGnsvlXZBwEXEe2Mq89p5CAAP6T5c18ShjNxavCV?= =?utf-8?q?t1anCzdZyF5UXz6bPEucvG1c/rzN4vdvgS5c/3GGOdj/2QPoHOlaQ/Y7Lwur/dkUL?= =?utf-8?q?DxM4J1XzCrBC0p/NyJgKc+5JzN930RJYpe90HGWkoI+kjiD3wFwJZ+aRBfz+4l+8w?= =?utf-8?q?7rD7ULwYp9/nfDBCYA7V+ktm4xoSRjR2tbE1OVuonGHH7v4bEcYu/RsI5Rj1oobJ4?= =?utf-8?q?hxrFiB+1jAdSHd1D7Aqxby8IatL1wevdn5SXMh+vw6J8iWbfuoR+koogdhC74rO1Z?= =?utf-8?q?9wbGWJdGIFJgjWtvc5ujHB3K30TcYjztDABx9YgZTbrW1Fuy/LuXCln3u0VlddgYd?= =?utf-8?q?HpoRPREag39M8PmdVTshSaMoqsN2lmxtn8DBXcUR7Fg7YzkP9GuEpTVyedxKm/sD3?= =?utf-8?q?WzKuAs644g/rQ3+UtBYsn0vXM7xAzS+LL43xWAISRxszP2lFlkCTcS66Lq5VPpwW9?= =?utf-8?q?bbY/6sMSDAfEZNZkUaMChV0/2vLu1UxufAL2c3kzUo1GSnFlSLI+6nXLeal+wLcOK?= =?utf-8?q?BZ8YyO1qIQ4nuyBnGwjltKhLuVToqIgenXWN8fiAiWbRrZCDNZgdws4kM2hwybQ5I?= =?utf-8?q?xAz2M6vA+ePXHZDqs/sMilcshoddLliemDq6eaiGmtPvMyw3XD8VtmySyvYq4LfdB?= =?utf-8?q?jG5cPge8c0kgVtlsy9e21gq4diQ5NZ02uDW+c523m/7ekVGCTBgRMIZmdkRSCJfkS?= =?utf-8?q?0uGj0rHghlJOYvSB88jAg1xp5QWRftdISgJyN0ZDGz5PW66mV+6MbrV876r7ZoPdH?= =?utf-8?q?Y4HzQ91D80H0KEN8W5MVEhBdkstDgJO8R93AZgG5+BKsTJnkeAnJPmPyDT3UFARuA?= =?utf-8?q?+PpafiDpK61KOm2e7QcI6ERcsPZFa3xwYxM7y+ffJWLYsBMNQnuSd6CwAI/Ub62xq?= =?utf-8?q?AgvbduA69U3cfCkoOMzfqoi1YLCLEibCeDaSswT4p07bqjPnwPXWxuZvzD0bbJcCu?= =?utf-8?q?HlJ6TqcBPySPSa73O9XKutXzj3fuO+oUrxSsYCpy3zoKrnoRoJQ5i6iEFHHO7Pdc9?= =?utf-8?q?pX5aXpFNDAl8R0fpr9iZMZ5g4VJDK51TGJrYIbNck2x77m2Exwon9coo5OVDLNLbZ?= =?utf-8?q?km4qRx+zGuaGut6+fm4DH3PLTrK7BAYo6G76cFGUtDODcu48GH9yGEgj5ROZ/zMZH?= =?utf-8?q?LOW9U1rnBHugG4C89MW0SxE8gZTaLMYrZxy3DZg/3ayoCcbOFeBpubz4=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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3SSjGN2U9mB/syuWt/k5yLZCxYTI?= =?utf-8?q?JXAVMmIYhM5N98Et2PaWnn5fZKprixw5ZsThtcOMGrEwHJkuoM6iuF/aNp4rgtXli?= =?utf-8?q?WwaxQJCTva1TQtqN/1AmcJXO3NEInFPSFmVHNsHYG1BxbyLN+wggno2zkY27KL2Vx?= =?utf-8?q?ZN1wAieRVu9jBXTzoVtS7fli3ZynLdX/DrMtKwJvOW5jb/yZRutIw4qFFPIRAdAQk?= =?utf-8?q?IvZZskTFSYK0pdU23i+b9/rtXB9XJeZ5DBZ4+kmxn1wuhzZJP4mIxk3v4JGtWFpTV?= =?utf-8?q?v/vCXVZGPectyw0uBSr4KvUhQ2hQTMabQDr5AZnVVNPKXcHMdttBX9ESfCyOZFMx5?= =?utf-8?q?APv8WNCV/bepiijbs+o+e/gLnWoZLBZ0qICr4kHkLpKEAeVBuLbwiMp5GKerOU8WE?= =?utf-8?q?vrH1Y10f0lyI+2Kj0+4a/yaqgOw5VIwKLofKvscFRd6Bp7edPEWbJlj4/awpDEgP9?= =?utf-8?q?o9WwiM2vZHBiiFRWd5os46fXCvn6Myjz1tgLAxWNtZcpt2i6Sv5OhKKJqKd3vI5Lv?= =?utf-8?q?YYlrw+/yKV/rhmO+XUc5BTlY1d57LcUDT9KZ3mIYFKZN+95vz7+79ylCrVkvVfeC3?= =?utf-8?q?8N+Kb5QRplsIcX0INJ8gNhg/Fu0CBYP03CPGfyvmduQOMP5103kKdRfnMxbppB5mt?= =?utf-8?q?tCLmQ4bYQkmkWvjp/EaBekNp2wNktV1j6cZ0gvl2U4MSeqte4CoSrBJcFBjf7fsYO?= =?utf-8?q?lE2IfO+z6AUx?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7580939-a12b-43fc-4ad0-08dc6bd2e663 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:41:13.3222 (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: K97XeFzAbgl18NZ6cn6eE1ibx4dlaLn3rfIKMM9//ajxpzvjYsyFoNXdhLvlkfdExgO1kXZAllDVAWuNd4M9WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Jacky Bai Previously we assumed that the root clock slice is enabled by default when kernel boot up. But the bootloader may disable the clocks before jump into kernel. The gate ops should be registered rather than NULL to make sure the disabled clock can be enabled when kernel boot up. Refine the code to skip disable the clock if mcore booted. Fixes: a740d7350ff7 ("clk: imx: imx93: add mcore_booted module paratemter") Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Tested-by: Chancel Liu Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-93.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/clk/imx/clk-composite-93.c b/drivers/clk/imx/clk-composite-93.c index 81164bdcd6cc..6c6c5a30f328 100644 --- a/drivers/clk/imx/clk-composite-93.c +++ b/drivers/clk/imx/clk-composite-93.c @@ -76,6 +76,13 @@ static int imx93_clk_composite_gate_enable(struct clk_hw *hw) static void imx93_clk_composite_gate_disable(struct clk_hw *hw) { + /* + * Skip disable the root clock gate if mcore enabled. + * The root clock may be used by the mcore. + */ + if (mcore_booted) + return; + imx93_clk_composite_gate_endisable(hw, 0); } @@ -222,7 +229,7 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p hw = clk_hw_register_composite(NULL, name, parent_names, num_parents, mux_hw, &clk_mux_ro_ops, div_hw, &clk_divider_ro_ops, NULL, NULL, flags); - } else if (!mcore_booted) { + } else { gate = kzalloc(sizeof(*gate), GFP_KERNEL); if (!gate) goto fail; @@ -238,12 +245,6 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p &imx93_clk_composite_divider_ops, gate_hw, &imx93_clk_composite_gate_ops, flags | CLK_SET_RATE_NO_REPARENT); - } else { - hw = clk_hw_register_composite(NULL, name, parent_names, num_parents, - mux_hw, &imx93_clk_composite_mux_ops, div_hw, - &imx93_clk_composite_divider_ops, NULL, - &imx93_clk_composite_gate_ops, - flags | CLK_SET_RATE_NO_REPARENT); } if (IS_ERR(hw)) From patchwork Sat May 4 00:48:56 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: 13653705 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2056.outbound.protection.outlook.com [40.107.105.56]) (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 2D325F513 for ; Sat, 4 May 2024 00:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783282; cv=fail; b=VvfqhgUIxjtw3sSSVKo+CGuClhqQONUhuCQMip9V0TEhsbEXaAxMuozZngBQN+VxTxkZp4VHvVFYNDZeTIK0u5StfD8HJi7LtyYg+W1YAyEljGi5IhoKPIkpfYKPrQqWl2nwOapQIU1zVuRzIDsH556ftJxCqLpE87ol2lyK/3Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783282; c=relaxed/simple; bh=q1A0+hU7W4e/wLAiXmKNBgA/x/XkBiviRb5Vkelujko=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=RdUaMy1QFY7lgCfPxCqlrCIJ1bDbfdRXXBdV2fnxV3nM6ja+f1+MAZldDhsuB3bA04dV36c56kBxPSPj2h9Z4R5qCI22piMydAczecJdC55qjGYno5RaSLLhsFxEMPcOVYSf9XOXUfL+lykY4qWU+1sqjNmr9vWY2jsprAQMeUg= 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=GLXIn02P; arc=fail smtp.client-ip=40.107.105.56 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="GLXIn02P" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KgSfjn9xeKLa1mYgy0Ww/bUzKlKAcPdJ1xz5RzAEabHWFOEamO1P60yAoPoDjIn9a81ZLrAWD/AfUcViT7gGF9us64QeG1OY6X/trRcLdLq71fHvze+f2RXRRY6iqV3OE1C8qqxaXENr0iPPPqWuDZF12JVAkNJW7BQPJjOdMQxOqDPwkH3njI3jqmwkfTQ+XUrZGXGX9rd3WyxPeocBN8Enbx9lU1vHD/7AVpFfGEWRFQQCzJbr2SSefkNy1sC3hIFYxN1RPVDS1pq+RSH/ll6Nc84YgtnsgBgB8ZKRZ5oZ5/TzNCijNpvN8J2s8R+Q74jhnzOVgUHTbgmZ+ukBbQ== 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=0IV//EdgGByvRtKbvLoHynbxEW/SMWswnYjQkG4VShQ=; b=GFyXAI9M4bDH3XQNHd3NzM7rYdTHB2003PUEcDr7ddLEFmuVfP5xGcLibA/unR9ScZpR+JNPwO88CKBcCZhkTqlFtTQDjTXEtIRCaxCMvoIfLCBHBuJ2SyOK7t2xY7h06NIuCVQiiCePTBVeDfyeYaTylxASB3RGFiP1j5iJ8C5jEj51MhVrDmBxDi3WQue86AogSRVYiZKVI2iVHxTn3K+eGCgZmnFxPsOf6W+Hn3dj5ra+WCkfM5+QnGSpvVYk2lnckV+BG+uRh8oQdPyHfhUCod3t4tlT396Bq0aEBSOKF7aX5c5woYcFuLjVOWwPwR0F/McprPz2Y/5C3ColnA== 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=0IV//EdgGByvRtKbvLoHynbxEW/SMWswnYjQkG4VShQ=; b=GLXIn02PsN+LwIGw71rduu5txrbSXqha3OTKwm3lRmpyuNh+AKJbxTQ1M9PAtrUndilMJK8TbxC4qm2VKCvxhvVnTjogzAR2xYL74w2MN1fux56uHsQTEEirROSP9iFfzOwpN/Q0IdmheeeHkq0/NVXlsNcIukhPKnMSayqvKcc= 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:41:18 +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:41:18 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:56 +0800 Subject: [PATCH 03/18] clk: imx: composite-7ulp: Check the PCC present bit Message-Id: <20240504-imx-clk-v1-3-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=1147; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=/EJNZA8jzAtJukHgOj2MT46tK7VZuwWKGrAynGdc6BY=; b=v21z0ZYsAPEAg8oXVf0AFWhYjB7qV1FmF/vTgvU6W7PnYD6JYU+/Ppjyes/fcKEHKD6cxOnNX vAlOSj5j3FzCth6Z+UOmmVZNbAkPR/VhJ+blpuAaiZPGMLjDjCdoeri 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: 3225de88-7b54-43ad-78d6-08dc6bd2e986 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?EP0W0qKvnukiFOQdDL24+f37u307smf?= =?utf-8?q?UaZJWyyceeo3ajzt92/SUpSmx9uEGSNHWaOwog2Mc1oTSvyb8/SsvFGZyh6lKD0+O?= =?utf-8?q?Bk6lnoa5boLV/LcJKJdaRZ8v4f3wgYA/5gDLNZwh29rFaxEsg+DtrgqD255i2dtUv?= =?utf-8?q?KMe4P+l7ON8NRe+CC5IzYHe9989tQlJqjF5JVXHTuC4xbMOGnP5fWuaSW1BapSn18?= =?utf-8?q?b2AcMFSfWyF+0km0cQrzeTmL8/SJb4F4V9RCJrwEqCQM9K0YAMSODpu3JxLBz1KcC?= =?utf-8?q?6Ne9rqn4IkDRx5Z8tZHzw4Iwr953li1OG73BA9CKMUtPn6oBC92sK/YSq8HU2RIZZ?= =?utf-8?q?/xz6CE0jrkKFokAvcKiyI0Ph77i2HxZ1auUjLIeY/JRTJnTyEDpK76OkQV4hIjbby?= =?utf-8?q?nLS8fhkx33F6Ogf2CMOTFy5fznm4uW7dGxa96Mwt5NlobGGvG6sRfmLv1N9y2KM9v?= =?utf-8?q?wuJuyK8Bjs+CqJiS5mWRx7dI3GjrEcs2kmL4Tew3kDIQ3wffl91/oLJnyinCZ04ru?= =?utf-8?q?oBeQBOJPtjs4K/WPmEgMbaRHrB5VFHNz/do2ildBOpEAZj925vL0eDnixpZVXg75M?= =?utf-8?q?v7WNUY2HxuEJuM46aRASfaiW+Xzy84/jdeSpdSExEGxNblhr30DRZye4kurhoI4gs?= =?utf-8?q?BvjNEpDAHLT0XyPJVHDqAUUK+BN3v6Ss0I2gEhgfcAp4lHx8O6abbE1JzzE2KimMt?= =?utf-8?q?E1NAwex/Ayz3PyQQEftIV8fXLEp0M2+TG//iSareYQABOtJ6YDYlXvJPSKGUh/Mxt?= =?utf-8?q?2BgUWWfcrfAF/fkoIXRpI913GgghyRCBhsGoy5jj89SdMH09GsGxszhPGpGCEBIqj?= =?utf-8?q?wTpNkSL6ZmxBnpZ8L4/SX3zI9tPPprSM0pG88sN4/N1uR7O2/PInn+KIFKmkF4A7p?= =?utf-8?q?BM1GaLl0eGH3rER0OiMnQUhvX33Gc6vd+9s/g7dYqLmxcTujn1DohpcuKmzgtxN6a?= =?utf-8?q?fw8+M83q2w5IXvdwWgvH1E46QKUnTuEjfJpvy0GuP9MMgMSUWEk00UkjYfvva5IRK?= =?utf-8?q?Q4vztSWR8FcFvgeczqCXQT9aeYGnvSVHjg0i5ERPN9Py1Q2j9yQ8BtJ8cJF58pLHP?= =?utf-8?q?Wys9Opkk3Geearf5SNGtuVjS4rEj0xLOQPNio0yJnY7zQ0kNEFuMfa7wPc+pF3US1?= =?utf-8?q?n4CFzJqAewBWXtHYdqpE/IPg/q3UBYEWvM8q4DJJJfKZsYTXZ1zFoZ+LJF4ON8Yt/?= =?utf-8?q?3N5edymOpjBpHSOD7xZ1ek7E8hagE/vvfojdBETgO87koMI2KS2+JM7NaATysz8up?= =?utf-8?q?+/QXqXvwtdasvcyNfDSn8G7wOIcEZDusw00xZZo/3+eG74siph9Q91DU=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?NryydF4UmiCdTZiMkn4I0lkCziwx?= =?utf-8?q?71Im0TF9ndrxlhdaaHc7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mK8GA1cW4gBvnQUcQQbHLegeL1zJknhtRyysNDhGcJJlO9XrlRYZhqa?= =?utf-8?q?owugpaNtYTjqu7HOYu/YDmsB/1GSVfxAXvQHRFpGASbYOodDAQ/Vt6UcE9CQ5RmMJ?= =?utf-8?q?7p355JLnjyssMcn2KeXyhqs0xWrJ6YpGOGl2s4ZjzM6MVoV8DgSv4bzVPQTPiymg/?= =?utf-8?q?8pNw7qGYFudzLlGuYzJv6jB9mmAE6RvXQEE25LRiy8XWdbRVan+ttRXGVwkLshRtC?= =?utf-8?q?fhgbUmi8S6bZpcBpGnK12yFb0jYmzAqEsKp2+xsXUTue9ne3cbes1fWcLC8UpuynP?= =?utf-8?q?p3W+5Go6zlCKTZkYfhpBmNAZ1t0Pw9rN0hnheDN9DYR1Yzs+SAnG8MLCfPzGsiEon?= =?utf-8?q?RHrkrvfLsXGVjJPVQXu1dvh7u5q+i7Rrv+TW+cMaU+rJire2RA99hMzISZ4c94qgJ?= =?utf-8?q?beE+NopSpuHo9rKPcwr2O0x6NtjzuzlLrJGn7u7YvfXTju56ZcCzHitqPFCEJqTfT?= =?utf-8?q?cr8v/hnBkCkXhNb+4/KV5/GdrkmC5ibMmEYU7Oko50CrI3r4JMjpErf5Mi3W4igCW?= =?utf-8?q?aXQpn3FJhZyGqkqPsFPyR2BEM+mfjImQCDrGRA7Tko0x05I9neZJvRjZMPwKNSXYN?= =?utf-8?q?wTp1/6Rb7Qoz?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3225de88-7b54-43ad-78d6-08dc6bd2e986 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:41:18.5745 (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: 8JPviVk4r5sNokSbVKuWCiYn4ZcST5W/Ck+3pbR9PzVk1k9bRhkVys0m7wm8zsCwIMz4ak7TQ9tb+5gwAHITHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Ye Li When some module is disabled by fuse, its PCC PR bit is default 0 and PCC is not operational. Any write to this PCC will cause SError. Fixes: b40ba8065347 ("clk: imx: Update the compsite driver to support imx8ulp") Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-7ulp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/imx/clk-composite-7ulp.c b/drivers/clk/imx/clk-composite-7ulp.c index e208ddc51133..e70a03e7299c 100644 --- a/drivers/clk/imx/clk-composite-7ulp.c +++ b/drivers/clk/imx/clk-composite-7ulp.c @@ -14,6 +14,7 @@ #include "../clk-fractional-divider.h" #include "clk.h" +#define PCG_PR_MASK BIT(31) #define PCG_PCS_SHIFT 24 #define PCG_PCS_MASK 0x7 #define PCG_CGC_SHIFT 30 @@ -78,6 +79,10 @@ static struct clk_hw *imx_ulp_clk_hw_composite(const char *name, struct clk_hw *hw; u32 val; + val = readl(reg); + if (!(val & PCG_PR_MASK)) + return ERR_PTR(-ENODEV); + if (mux_present) { mux = kzalloc(sizeof(*mux), GFP_KERNEL); if (!mux) From patchwork Sat May 4 00:48:57 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: 13653706 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2042.outbound.protection.outlook.com [40.107.105.42]) (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 D8354125A9 for ; Sat, 4 May 2024 00:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783288; cv=fail; b=CNepcQT6GmP4XZsIdJ5xCYVLacgfY2+752iEz2cGt+566zkU2/39il8JxEKX3gzhZnWfe3Tnf+3hOXrOXryoJEmycbosgAX6aVL7fNfxmW25YMDM9F01U7RzwsARJCJ13dGKjZyojlucYZtch1gNYFs41Mycghy+p/rkcRaDhXw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783288; c=relaxed/simple; bh=3/ebBXKy2EoNIVdw7nEZvhT7omyA06RAqLLNddA8Y0E=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=b16/cLQ+Kxyph5SGT1SdcE6PP2uKhIngLjQMgQ13XQkHKsNVkeaIqNQy4VBRQ3pPGzwx9HJephdSBOmpRZJbjSawrEA5oV8xyPu+dsQGFyvC89uo/BdHOfRzr9Gn4S0R0W5Ge/+oBfI+2LiVegzRZ0tRumergPuBRMsEKJjThzc= 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=KzuYL9/K; arc=fail smtp.client-ip=40.107.105.42 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="KzuYL9/K" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+rqCrS8Hyd7TH4m0u4V0b37wl/n0AxHFRY65ko6CoXIG/WplV91G3vrJZg7iriWAb4fmCvKtM4sqkjDphwTi3H2tc3YadE7hTT45JItYWDCcaWuVuyvmNdtUPcQUB7WcUbdRq7NnmxOokeG9+vFOvFtziuzHhZXN/8AKEZ1Hq7aSBsptAhB+NWlpBSyDxJcxjDYyLEGS2msg6kPhe+obGeq8z4Hyg/JM7022qc1q7eN3n6k9NC+mPq/s9lr7D9Lf4PcKLqwMfL+QNRGAWCN+Enia7kZFdMT2yP689VFxJuzBEdVei0mU2VlpOjIazSPOAgIedexIhqjV0NmlIX2cw== 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=KuO7Ij7e1bLmWdg4m5AsnXdVhWvgoEiSvYg9UuypLak=; b=U9E5F5su/Zqvuki44gpEBTsSgQ6vXPRLf/BxsbPzG9ZRUtMGC62uaDy8yed7SruV1d/1JMs06d4uKjQqD9sBTbXiLHzaD129+yNXd7pAK99bKIdn9fhAI2YZ4LyYcKH/zojRisbSnNFeB4rhF3JS6oWx3VvWH7vhln3W9URMEhx3gfiHYAbt+dILY9Jm9quvtHh12vL32MAZ978T5pMVeqBX/WlCVQ7s1rtxqfbRK1WJXRme8bJEG0yl67vVhWNn4rQWdfyXelpu3wBA3+iqPBxQjuykPeTQz00PRAlIYtI29+1mbje6iQ15H5T72lp1GGpM9SJ++BbkP4UCsQf7uA== 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=KuO7Ij7e1bLmWdg4m5AsnXdVhWvgoEiSvYg9UuypLak=; b=KzuYL9/KXQBhL37KJnAL5cHJGCUmphtaKOIZxXT4EuI61mS407Njty6SDMff615yzZFK2KbwzHifQg9o8FSydzVOc3o+KJWsLei/gvWDlr0KUsL0OwjyypS7QDM953HCjCq2Ye1kXpeSwtOwVZ0Xw1h3JfT+LNXF7wwrMuP2nEA= 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:41:24 +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:41:24 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:57 +0800 Subject: [PATCH 04/18] clk: imx: fracn-gppll: fix fractional part of PLL getting lost Message-Id: <20240504-imx-clk-v1-4-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 , Pengfei Li X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1031; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=YbtICGkfjNb9cX1EM8cRO+LQzM8n6WyxoMB7kWtrQtY=; b=jrvhcFI5A0TDVLYiN93pgFRnHBfEzaAtZottJqh9N0mJZSMZZbq6jKsIjspzFpIijQ8VNvsEK 9dyqy2dHRWFBYRw3SuV7F77UIb90YppE2mLaJMt0tu5PmT+pHxFE5OM 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: 2f9278a4-1356-4a5a-8146-08dc6bd2ecd6 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?59GxjnUde2TQcl5Q4kKmE1t4rSwvynr?= =?utf-8?q?BuJsajUiK5c57ymFDHe7HiBzy9iXvrgu734nsFr/4n19ln2qcMR07p/d4rgUjWcSK?= =?utf-8?q?186Mgzg44yUKzctxBlQoCaxEF8+NwDc7EeNsdYv8KBIEqma1SF08NEbU1TTX3ukWM?= =?utf-8?q?OJbY3yBxJiYrMkJ08ByNJ0cVd4R2hVSHCpqIlQmCOHeYe1EM80Jpd/M6sturXWYMO?= =?utf-8?q?s0ywIAK6mfKgGe0odDi4SyAiwTFs6+XEs5G2boJG6obxSoxw6dPptccI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cgLq?= =?utf-8?q?R6EHlnSCclyvRP+A7GmTUc8OPmG8PG24nXrNII/iZqLRlmMxgmX/eIv4W2NWtMm6o?= =?utf-8?q?PnBJAMxD1KNgWoJrhCGu76O7l3i8JD8Z+PsdhaSaCr32NeSnLiZl0yKH63AE2lUR4?= =?utf-8?q?5yQ7A/1QcPAm0cpWWXHUFcbtdcHp2UNhwXj/s5yGek0P6m9eygQEZ9ik=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?B6C4Xg7jqmD0vZ2vKdG8BrEUfnB6?= =?utf-8?q?ePXpzzc0xjJWhJgcuT99cJ4k4iWC/EdUzVQ6GWrnFAY9qNtCEvOnqoj/mcOG6SiGY?= =?utf-8?q?VLR5vv9a23inEyG1VhGUsphgSvYFfCicybhD9yk6RanG+IOpdAffMwnt3IPjKA3x7?= =?utf-8?q?UOnamGd/BcsIc+yAIAa94qFLLTBZv7WfGuYMuA0F8hWGxLkXeZj9ilnS5sg5nlmyt?= =?utf-8?q?M7sxanEQ4DzZ5scB98hSOwKIU7YqeomjvlgpcTaRHPbkuGH30as4RN3za3sll45Bk?= =?utf-8?q?lkcW71HaiBR4GPYjsm5IW8eXeS+FWMyuO5f7XYj0Mk8yWygprtkSod9Xg66qo7iVG?= =?utf-8?q?UuaZkjDZG7TFEa9RHhrpbDjhUtMsxd84fujb/BT5TvY2uOZtg6zUIe0ChV1c9VN7Z?= =?utf-8?q?SxHs9vNAwImXJjEPflN/nKZxbGmND/Oq453WuI9sJjykommoC0kuX7Afh61T/RUQA?= =?utf-8?q?Dy4z+nUuvD6Xi8ClmGnoe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K+mMQYFemMEUS5ikro7YN8vMjw5tkEVZFYHjxJ+zIUoIi7T8lCKpGiRxdWZXmON?= =?utf-8?q?YLZzGSnoGXLanA57/oC/P73wiiitochVNLOuq7qlGTSoL2tPO0GPAOVPNbTx9nomH?= =?utf-8?q?1yPee1CfbcVzDXQypBQJnYjC94OyGRjICPipJSM3th6bRsInOwwd5bGd8d7yxo8AR?= =?utf-8?q?zg2YLDHQq5Et?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f9278a4-1356-4a5a-8146-08dc6bd2ecd6 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:41:24.1246 (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: Iw/6m/C2uAUBhJ9QVYPYLvd96EgI9w3xw71VL9HviQ09AGG19yW5KgTSyeFhdMtzCygQNSjc2WsPydgN7s4uTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Pengfei Li Fractional part of PLL gets lost after re-enabling the PLL. the MFN can NOT be automatically loaded when doing frac PLL enable/disable, So when re-enable PLL, configure mfn explicitly. Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Signed-off-by: Pengfei Li Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-fracn-gppll.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c index 44462ab50e51..1becba2b62d0 100644 --- a/drivers/clk/imx/clk-fracn-gppll.c +++ b/drivers/clk/imx/clk-fracn-gppll.c @@ -291,6 +291,10 @@ static int clk_fracn_gppll_prepare(struct clk_hw *hw) if (val & POWERUP_MASK) return 0; + if (pll->flags & CLK_FRACN_GPPLL_FRACN) + writel_relaxed(readl_relaxed(pll->base + PLL_NUMERATOR), + pll->base + PLL_NUMERATOR); + val |= CLKMUX_BYPASS; writel_relaxed(val, pll->base + PLL_CTRL); From patchwork Sat May 4 00:48:58 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: 13653707 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2074.outbound.protection.outlook.com [40.107.105.74]) (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 96698171C2 for ; Sat, 4 May 2024 00:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783294; cv=fail; b=pdkE9bvxlR10svp+yp3Z48islK+ZbKkHx3RG0LjIEccCS4nrErbds160bYMPLeYLzr67bd6oXbnTeoXnocskEhJeB3lGdrYnpHVJuAWl/SioefV+KoeS0+vuzuPpEsZE9h37pz1OqnkiCqh4+vz80Pykk9vnlRvlWqdGFJOrxds= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783294; c=relaxed/simple; bh=5mmWyK9WwIfkcE/cYuEGrNrZK8Et8RVYnJ0d/vH/OxM=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=cEDHSmYYfzuFaInOHI+eGmrKpdefGcHRP3lzlPe7imr0O/hMsnpCmH2H7Mtt2kJnS7lpL1a8YKTdDBu7Q5K7zVvATAb1OtmadAul2O2+kcpekiOXkVIKhlq3TiWHX/0xCuAzx92jKKENkhVXWM4+dpRvrTIcjdGp9D08Rwtg1vI= 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=C+jtar6q; arc=fail smtp.client-ip=40.107.105.74 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="C+jtar6q" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXc0MPEo1GlatILkQMzFmcxH2wsulOZzbgZIktIK3A80IrvJZQAdkXv5BmtkxR6GMm2LzruthW//JB8egDg3sMcRQztlA8JwIy/m8dkt2azj4pZEj/Jx7hSPTIJ6L/vzEpPchN82ceXkxUTbj00Km2s0giuDbNlMPHHMCRVV4dxCMUwbM32hgW0NSIg9KeS680RtEAnDkywlIlwUIsIGi7rgX4L6ElZhAgEGy95BjcrLt/QcrFIh+yPFVcOx07ZKFL0hdrXyTILxhhPg7EBdB+6lP/VKVOIfxJF9zoiiL7qa4jUNup2fSq1pN9ObIe4Ao48ZlErIH0R0kQyRWkbx9A== 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=3G9L/mbRTXzjXiBgvg8oD625HrvNI8EifS6jYATL6qs=; b=fMiusojq02QHxJr0Qms23ZFUTEuH/rdaIUSDrkskx1rWQTfT1EFiqTA4ssb6gnr5wD/fFvmx1EPhNdpCEMq350wxA0//hG2fpb3lFVAccFIqiX6wf5yAeBVkgVdpz5eLxhxlsLXrMlkGx1WzBaslYyAumsdZwxeu3YS9W9QqHfv1M5FEh56FtlsFl0IvzePyWtO6MnG6Js5jIhJYVjz2BkWAYT+TRPMSCbsZZw0yPPCcBpNfYfuRx1uAeSCOP34VE5Buvk3fepxyZzjQsRxk3scAwth4nifiYWnkRuTgGRhOXVeoMkUok1hCnCcEEfFdQ7BQZrvNZOHaahx5LfRgMA== 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=3G9L/mbRTXzjXiBgvg8oD625HrvNI8EifS6jYATL6qs=; b=C+jtar6q7FDBOKyvaaz/McxXt65Axk4CGgloDQqPbFyUI2MRY9ZGDJnUL0e1+D1QKb/6Byi1DZSE9pX74jJyGT3fpfafYqU3/bKBjNyMqT0JxOtiGiKrULjt6JZ+hO5k8UttBh8Q/y3lTbd5NfU/4wpgBNaqC/tsNEs9e5+cu+o= 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:41:30 +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:41:29 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:58 +0800 Subject: [PATCH 05/18] clk: imx: pll14xx: Add constraint for fvco frequency Message-Id: <20240504-imx-clk-v1-5-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 , Shengjiu Wang , Chancel Liu X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1882; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ITpMc0XDxQEnK8rIvUINBCDmIwwvJJ8hnlCjcXFS7+o=; b=rGfviR7PwPWCE1ffyTS7CSGZZAyaa2MX3+Z/5EYDswUDqc7NyMEAczXa7jMKLts7+f3tMQP4g Vs9u3C18IJbDfIXG3mTPY5TRU46Ad4NbsPqn8Wl1hkyz+bmWlNnV2Xe 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: 87501d15-1bf4-4500-ed93-08dc6bd2f04a 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?1abXW5ypNVRWJFZgSkgIZ92oi2l6v9t?= =?utf-8?q?NcvzknEOfLz7zu2cfBclml5KDmHu9Q/qbthweS/hCQU+u16gt52pZwekAAQvcld7n?= =?utf-8?q?6Q9kAwS8xtt5x5ENPI48ecG/e0jPGnVFV26td0NsRVoU/d6RbtHEr3A8P5D/Z6nd6?= =?utf-8?q?YgWtzY3cbH3Co+y2+4GoRitSpFjJ6gkr5IHFPcP/5M752UUtY3KF+tIfvOhXqhnOo?= =?utf-8?q?vXevyol2sAZMCCgfd/yoz4n91KNFOrX/9X20mBcB7KDl+h5/Rle2TmFJ6J4X3ux++?= =?utf-8?q?sIjraFq+fzc0C7MYqpI0mFAyUU74qpMbe7+jnk7cW0hJ6rszizsLVLQusPnT7PZ4z?= =?utf-8?q?keqYVk7TehhgX5xI8KzAjZrLeBtFJK8qVsIN4vlCc5OHHeJ8cmfOCm85cuMy7jJkX?= =?utf-8?q?VvCWL0P0KroJbJVFDvV864+i9kLPmx2luHTFSbokBRHLcWauvSveefpTDC0QTQMTU?= =?utf-8?q?uDcPAH7fpDqpdch/T7qJn8ISm6VITBgOPQTYsciJ1XpGhuVtRDTPT5rY4pr4k1lXp?= =?utf-8?q?gGvzXeVOu7f3P6/XXGkhcEpaHnIIt4l1/7vlIe38/DpQ0F7r9ixfjdrUV/mY3HpaU?= =?utf-8?q?kXqxGuexonj0i9MsZ6SR1W1zKjsM/HBagROW/g/QibTb8TMvSdaS+mQVTzCgXzRG1?= =?utf-8?q?GHCiLgM+6NpFOtDYRfycsqiTYjj9oIaMC1t2zdCWyr4BEJHmvIntZrqUl3zF4wrWq?= =?utf-8?q?hQuM5tx/EYcJyIIAIaZJbTSBlaXN8eYsFzCSOWakMGPY6UulS3A6uh8Gh0wKwROUf?= =?utf-8?q?QiHIWn9UMcPNZmnCjHr1QVKOZ8Wfk7bqM/F/Pc6le7/kHjc2a3Wg+AcSLfcmwhnDP?= =?utf-8?q?M+9ic+CtZL1qkz4k6+sQgSHCKNtQ+53hzSaSdEmOn2LLlXQkCk7SAaKNMfLDeVUxv?= =?utf-8?q?KcbnRTpaNGaVaJODJsm0wqxkUOyvYNh+FD/hs6/TkgLAsEeTst84V1RfQstQelH72?= =?utf-8?q?q+8MUA8BfrJy8vlHzwHcKUOGz6s4+8vVpkXPgkENyEkuia/brh/hfS9c6OvZIeLV7?= =?utf-8?q?UaZP86R1rox2JbvJATynPtxQI1SJStinFDn+PNsfesvExvLboDgQZPZe9frVnU1J9?= =?utf-8?q?LTIHHuyb0xLEbLXmPVUqIDsrhgjauuqKkiH3VSZFu8wshLP9xzP45KMCvSxUznJmK?= =?utf-8?q?RB7tuPsO28eivfJNXr8+JhXNLxW9NpSbZknJq+1di3zQ/tE3D5OCOGprtj4lMxfOD?= =?utf-8?q?bPGhtBa3ObBMKbDHvyzUR+NBCUK8icbtU7CGTZ5CfpW0ColpQOFzQueTqI4UkVPI3?= =?utf-8?q?hqAMC2mLSwXhrdeU3xvPoqZUxKd5mKetB9hfjZQ3vazvgSxWV+NXZwNk=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?Cb6LoAxVox8bmB4HkXRKyeLzqmLy?= =?utf-8?q?z9c26Y+o2WTEY9sedEKUTWlqDWX3SbWhZyzaN3JiO587nJLIszVC39wztU2+v4Txn?= =?ut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8?q?NTlcZ5+HKBpRl8tMec91dfgDkksMhRVRRmnWe6zidBG41uUXqHUo3RGN4scjj7JHO?= =?utf-8?q?apxKY5597RCcVKyjHZrgQ5eMY7k4FhJxmEiDEV7ymF4ZSjS1/3Y+AVp8t49c9BD91?= =?utf-8?q?kO6tq2nLbLnBjJVv5aRKRGrHIkUxKuT1mh1Ig0F0KAlJ+/mLUo8kwVOoWL6VfxmMB?= =?utf-8?q?z815EKNA1LAkl/isWiIHcuEhNloHVZ7yYMi6VoScmyKtH/c0Z66W7mHgH8Ok2wTbO?= =?utf-8?q?+/Vf16WKPepCtNZvJzRK9o7tTz4UM5NF5HYtzPvpqeTD3vdvoMyHxfIFMlHH4DEuQ?= =?utf-8?q?G+5R1/HK/uPVYUKf+98E3ygidxAI5PgLCeY7UhIszvit+IEzbpTmPtPk/x46WE/XH?= =?utf-8?q?sV1X9ZjuGSgpWokXGHKWroF+nX0kkC1TmyNjoKhgW4zHkCo32ErhKn8ty8OqIZg6M?= =?utf-8?q?UElqTuno3GFZjjK/p41h0Ka/FW4/CslGP11IQpMjr7uxm6vMwG1VbUKLkZjpifPTm?= =?utf-8?q?8RrMzIFde2OfWT/EWnodlhjTzt0PFYpFZ/kXZQMuiuqran/NxLMcJsc7H6gNKRNT2?= =?utf-8?q?hZjMJVcwpdMD?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87501d15-1bf4-4500-ed93-08dc6bd2f04a 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:41:29.9255 (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: hRuuFfV898wL1reGTV7VQ84Kzk3A6ODTPbEA18bVNDxl1poeBeKhNWVcEs26PtBv05KccImSDPik022ZjftuiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Shengjiu Wang The fvco frequency range is between 1600MHz and 3200MHz, without this constraint the fvco may out of range, the real output frequency is no accurate. Aslo correct the name for fvco and fout clock. Fixes: b09c68dc57c9 ("clk: imx: pll14xx: Support dynamic rates") Signed-off-by: Shengjiu Wang Acked-by: Jacky Bai Tested-by: Chancel Liu Signed-off-by: Peng Fan --- drivers/clk/imx/clk-pll14xx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index d63564dbb12c..55812bfb9ec2 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -131,7 +131,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat { u32 pll_div_ctl0, pll_div_ctl1; int mdiv, pdiv, sdiv, kdiv; - long fout, rate_min, rate_max, dist, best = LONG_MAX; + long fvco, fout, rate_min, rate_max, dist, best = LONG_MAX; const struct imx_pll14xx_rate_table *tt; /* @@ -144,6 +144,8 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat * * fvco = (m * 65536 + k) * prate / (p * 65536) * fout = (m * 65536 + k) * prate / (p * 65536) / (1 << sdiv) + * + * e) 1600MHz <= fvco <= 3200MHz */ /* First try if we can get the desired rate from one of the static entries */ @@ -193,6 +195,10 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat kdiv = pll1443x_calc_kdiv(mdiv, pdiv, sdiv, rate, prate); fout = pll14xx_calc_rate(pll, mdiv, pdiv, sdiv, kdiv, prate); + fvco = fout << sdiv; + + if (fvco < 1600000000 || fvco > 3200000000) + continue; /* best match */ dist = abs((long)rate - (long)fout); if (dist < best) { From patchwork Sat May 4 00:48:59 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: 13653708 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2059.outbound.protection.outlook.com [40.107.105.59]) (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 63186171C2 for ; Sat, 4 May 2024 00:41:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783300; cv=fail; b=TeNBHuYL2Pykm+jr2qHCsZCZdrVUXKlKPHJ34QiFMNkQckk4MEHYsleHCBW0h5NlEmMQ0xqL2CYxlUJl8Gr7vTT/tUDT1Bc+ifyCrdSVdR01VI6kBeU1w7rbWphSPcqdMXx3V+5dx1aBrbm6JKsG5hYRroIGqNOcJ3tGXRW8mFY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783300; c=relaxed/simple; bh=NAgjteHG4/XOhS80XUlWTWBcJsUzWYrufgmpN9Vk3nI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=qOCLIHTiucQGuK1kmrTnNP0igp7N28DyGXm9W1Dqug49YW5m9xAA9VtMcEn5mWrEIAxbhB0cTQlle2ATV8DDNyknl9CnQidHEqn8fz2l2tVPEYTma9sTFRzL+fYImy8znDgfGGuE2knZUu36wq4SiJebZLdWvYBH2VElmK7nfd4= 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=Gn1H7oXu; arc=fail smtp.client-ip=40.107.105.59 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="Gn1H7oXu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mxHreot451wt8Bc/DlpfFE2jHhkt1mfxJ6WVnN1jMZh9ESGVYJ2W+Utm4amITNeX/WuLk6u+VnKIk1iQGl2OhbdXldvbOncMAPdVwPygLPhKoDJtC4R6wRpID1mSpHK09gE2tfDhkBc/eThAaYD6TigtmBJg6+TuNlTj1ENDgp95gsF2d/qx4cDz8wzM40teTVJcKg29jr1mQEuWMB5DjyDplLTvU8V/x3EXNJhYGlgHF3mZDbhzLsrC7BeXR48VpvY4nooiRpAxQgkWGLrVt12ycw5befKyewTvZMaDFjZzF38ifIQtm5vgw30qARkeRwAHOOvO2lb5Q28/q1ucMA== 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=k3Dlal46WwJP6HqnyaAJPochMMZl48zjLeMC6YUUWjg=; b=jv/M9IHtx63qRd5A5darDsjGU4/ZM4MBkkldGF2Y9Aqh8bKGi0Jx4JRQE5ppkMDWHVh2G7Rch7B5OnHE9o6TOqaQ8M4t75rIbAx7Gdug7kpxre2PkIEN6FjxlKngABbLg6uSRXtHbhbVrYB85i9w3Q6VoSes90/qOD2SJ6PhQVGDgyP57ufwlbsU2AAQPMcO7SRZnSAPKx3cYldFnWI68tM1BQJPLBF+RNbctNaZFaMbh6yl1oPbwCX7g7NYmnfnBn26TjsuQJ0PtO0LILhdagszC9KIPF1YYC989UVuFKAFSKGVSSCuATjgSixIh+wpf5J84nt+Y9xcUIenmGiw0g== 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=k3Dlal46WwJP6HqnyaAJPochMMZl48zjLeMC6YUUWjg=; b=Gn1H7oXuIlhAhiPE++KDkjI2mK82hGHc+M3MrXaQr/r6EFOwZTuOlKS/8nuAGjr2nWPHgOQ3qMTeEuub6uxwnOpOxkp77ViQkgQYZdK1O2C7Fwmhi4ec9HqlywzpvI18ihaVrxHY+uafdo9eHc7QkPguL34Jdhs2UTOv1l7UMIE= 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:41: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:41:35 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:59 +0800 Subject: [PATCH 06/18] clk: imx: pll14xx: use rate_table for audio plls Message-Id: <20240504-imx-clk-v1-6-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 , Shengjiu Wang X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1433; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=VsebgP4ftghgfa/u4sGy9l2KDwyNnhs9lAuDW9Fh9Wk=; b=aVp+giJUzQcsNSUMXsSbiu6QN5r6I5Tyl3LzMxLTo5ogOocVK3wKi2EwzwUdTzN8oHEvxE8Hr tBRp3mRIEXTDPedZFQusxGLbKCkxddHAvMkBFWUFL35ouDLt+0LUpgp 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: f5f4dc46-bafe-4e01-9ab7-08dc6bd2f395 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?+Z3Xl8iEpwH6Drp0qVJnsDTZ6faI4qs?= =?utf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utf-8?q?3mnZKv3XJFU384/Fc2pR5013TkUPjjc+HLWLscHu7BTf56IZZcU6iSoH9cZBXrHLV?= =?utf-8?q?QUJyT/pepUOxHm5B1xFcj/Qg/eE2xB9M/Vio7n1f1bayUoujipOA5dnk9zcSgKfSz?= =?utf-8?q?6RNZDLi7/VDFxYxyzZ2bnR+FDLagsoT2zGhDztY2/R+df8rSVCYxYuhrxuXKbBC0y?= =?utf-8?q?GWaDP+JaVqxMO/xVjIcyOfMbi7Lu3M0d070l7nsMkyzj5mypOdbe/vOPj+qIUKL7f?= =?utf-8?q?2ySpQMeVkIPYK5Fl+rrkM7NNNyu136JwprmXfU2dxIgINhDJ1qL2bthkAwEy/Tse8?= =?utf-8?q?nuwk7MlUEp48kodhvTN76AdXAt9lXit+Lli5GeqlmC6IzOP6qc8Uj7/a/ra5dv35H?= =?utf-8?q?Gzl+NWFv910PJgiS/RtnRaHv8QHdc5hG58mpL2D9pY/lryrWZEKRvpis=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?sj5ilQwcyd2EdKC4lLWpQ2qXDM15?= =?utf-8?q?zPoWqcKZ3sQW4K7ddlrPN5sOgWAsDGjDcQAt+Rok04YDIehMiLkDRAUExC5NL8T9N?= =?utf-8?q?amLAJ0RGSueFuW5BP3TCiV6okvDwTlq9pIdZ3IAx2BrSXVKQhUtSn0pP02X1FfFG5?= =?utf-8?q?fFoc2TGUp5dxKgidUtfmYvb3IBRW/K21fsElbdK+AJOpq8oLFCtaCY01sHMM+vOmn?= =?utf-8?q?Ov+pPJOLxm3GKG1tjHpwbi2ThNB0Drhz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GaP1s1Av1FwuE42hutR5uN86T8qoHxp25?= =?utf-8?q?ouSBfFaEziU5dsY7NcAMy8FOk7unjf3HpUCpaU7gHMp8X4YZ5PozqSRBKCEzDqmUG?= =?utf-8?q?iR1mpM+E/PP3O7cQfF1XIsPNJLGWznntBY3bcsB7aTwhI8Lme+TWh4pbqzTx1MYJC?= =?utf-8?q?Rdg2jZZh/zwgSamVzT5JpFQQMSHVvhmK5gxeyepC0DQ4cpXg+vZaDNMRT40kv0IZN?= =?utf-8?q?ejroH5/7jrWXm7RTLmIsWAoGLgYI6Yca6wxxmHQ+FR2CGp3bFZfsb1tYPoab/bFK/?= =?utf-8?q?ZkBS9PROv1DGPonf2sH7DrWpAtSHzty5PBzU10b6gUvCPl687lO/nOXqys2OWLNBO?= =?utf-8?q?J21/nnTvFEzEy0863LlDjfEdUGwvjqyC2CXq/n83YymtqnFlELxEObk5ePWLcPL65?= =?utf-8?q?KajtcWIOSw+K?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5f4dc46-bafe-4e01-9ab7-08dc6bd2f395 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:41:35.5668 (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: Kgf2yexnRqZ2cEvJ8C6ALpyW3c1IJ8aFvNmUEMD6t4AbRfF4RePghnX4fjkGwsKCUteR1/f9c9u8AFFNU/2IuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Shengjiu Wang The generated clock frequency may not accurate, for example the expected rate is 361267200U, but result is 361267199U. Add rate_table for audio clocks to avoid such issue. Signed-off-by: Shengjiu Wang Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-pll14xx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index 55812bfb9ec2..6b2c849f8b71 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -64,6 +64,17 @@ static const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = { PLL_1443X_RATE(650000000U, 325, 3, 2, 0), PLL_1443X_RATE(594000000U, 198, 2, 2, 0), PLL_1443X_RATE(519750000U, 173, 2, 2, 16384), + PLL_1443X_RATE(393216000U, 262, 2, 3, 9437), + PLL_1443X_RATE(361267200U, 361, 3, 3, 17511), + PLL_1443X_RATE(245760000U, 328, 4, 3, 0xae15), + PLL_1443X_RATE(225792000U, 226, 3, 3, 0xcac1), + PLL_1443X_RATE(122880000U, 328, 4, 4, 0xae15), + PLL_1443X_RATE(112896000U, 226, 3, 4, 0xcac1), + PLL_1443X_RATE(61440000U, 328, 4, 5, 0xae15), + PLL_1443X_RATE(56448000U, 226, 3, 5, 0xcac1), + PLL_1443X_RATE(49152000U, 393, 3, 6, 0x374c), + PLL_1443X_RATE(45158400U, 241, 2, 6, 0xd845), + PLL_1443X_RATE(40960000U, 109, 1, 6, 0x3a07), }; struct imx_pll14xx_clk imx_1443x_pll = { From patchwork Sat May 4 00:49:00 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: 13653709 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2088.outbound.protection.outlook.com [40.107.105.88]) (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 136401AACB for ; Sat, 4 May 2024 00:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783305; cv=fail; b=fbphU37qJFspJH4QMGTgZxYs8hMrLf8YJmPRMnikbdWUF6FZkGRbr0WKtrTCO4IDW946igv6+CHGBLIcd29Z7l21LiU6mHJC8NedgFZIlQMc+F7oLwEiuYHSnoLf0l52cQUduerG2Qo0c7o8Eo4ikDYnZotmYAIh9VjjYu6cG4k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783305; c=relaxed/simple; bh=ALKKAIPLFtEvvSEnwT7GaTl1G+mKLBFTKWPRdBXUeVk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=qpI8saA/YZ+K+qggpWbFgDu8/uCQ0RG7bTYu3tm5XErQIcWBFcczwn0bQj3G4f3ObKmFfREgkGM+5rfy8IKYK3/EAJ5Fx8MCVcEtt0EegsbNmUehG2S7qa0r87eER9dDivU+IPIQwPVhICahlBxatKZDt0KbxA0++TxQXK/d6Fk= 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=YTPSITgO; arc=fail smtp.client-ip=40.107.105.88 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="YTPSITgO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CdXXZ+fqxUnZuecoBlyRWhPPrFbGqJLCUx7+sc8UIytdJX3TpVrsp8yDeFQ/W1fp2RgIO6wG3c0N0oEA4laKa0SkNSVRKYDKGBHoAXxLQAHpD5jrRFIuR4f5boyPO2ywhxkyW5T2vEIXNNhBBZ47mprICR8NLSxZj2oyT+DzivQ3PBB/6gtAX0+l+t7sAmqAEe/yj729NDePCqlNjXs/doAu8fAY1xJVeLwVQkujHcxgGhcF40KLYsUEoLcVGKI9+fb5/Ts19bVYox8H931b4GiXM/7NQsx/eswUFgOIS9TlAk0FImPqDaKCocwqdm9uXIWizk/JJoRbxvhfEG4Vuw== 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=Gd6H0t/yI/bSoUA0/9la81Hj7KLRUVbJaaIyMyJ4tb4=; b=Kz32p+dufuC2WnmpECJ6bAsPEIXovRKfKDQze2vzYYnzgAoSZxG/0LJ0IKq95GTn3b2yBQ32Do/WbuhqoAPpZ4Zj7ojpb2ZKoLnDya1yE5eL8qtVpL2KR+sMkVTvU4afXfTz1faaul95P7w/wT/BrA1VufHOZVwSvT4J7BXgjQXceNzPGlLuzqKvkmyzKE28Nlxyy/mK0FvHO9Kj0I38bM2Uu1B5/UqFKEUaT3sGMXriQ3VEOwfKPJDZPlLkdwbqIf12/pbKAc4OseK1fgNl+Q7ogm1ktIK2NjwM/eIYZfgnH8uJLtqBfxv5S4RbeJZjc5yGjkIVZLf+j1dtdUqX6Q== 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=Gd6H0t/yI/bSoUA0/9la81Hj7KLRUVbJaaIyMyJ4tb4=; b=YTPSITgOd3akPj0oOnAfA/adnGYWU/jO/betVZMAttbHcYv2R+ZBpuvnfj9AdOn1hrD02XncqWyYpJ2lxxESBPhO/vBtTkx2d04aYDspuku/paUzuNgtfQ0Y69VxHKrLvPbDLlu9JFv3z0bAeeu4Wen1Acj7bmn5yEaeLCt1Weg= 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:41:41 +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:41:41 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:00 +0800 Subject: [PATCH 07/18] clk: imx: pll14xx: potential integer overflow eliminated by casting to u64 Message-Id: <20240504-imx-clk-v1-7-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 , Florin Pavelescu , Viorel Suman X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1012; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=2UdxVIeKUK80+gL9caamcVMcYBZoguh0p2StT5CJdjU=; b=mAWBjvNWQhykSMMFGDAo5tfYl/Ef1TVTWQ/b1pc2IojjxoOMZdo+qn6NZ8QaxHr9aXGVayd7v Q0i60dKL0cKDgxO5nNpxRvuLFOT4Q9f3lOZgdG0ldocHmY71YPh30+G 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: cf4feb8b-cbeb-4ead-615b-08dc6bd2f71a 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?INEfUWP85VGap9P8OppDYL1YrS0D9qI?= =?utf-8?q?HNMgwQPhtV2QHlspkus5ioZfjYX/ibwOjwWANQ+aShqWWE2Hbqrq5Qj/suPMO0SPe?= =?utf-8?q?ypPqajibZGKp8CaZDO+vIXbye1peJyLn+u/ZNFtHW+3M8EZucIHRSW1iLnkSXOOzB?= =?utf-8?q?MYVDjZ2rhJu8Q7yIupwH78zx3k5DVpGaDSzPHYQkZyTb00gUIcwHkIHwi0nZoWiPF?= =?utf-8?q?qSoEayn6lzDZRi4XM0aQB986H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1XTWL7LDTqRML7mqK2dkwsOTuEGsenyMPB?= =?utf-8?q?bwUZtkysArIvsqgnNbhDgUTTOOFlfLCc5LQOUWtzsqaBDNXsrkj+x99ntAlhCd/Bp?= =?utf-8?q?+jKdb55e2H4WoR9EfTFnqtA0FKJVW9zNCSuc2Jbg1Ax3B4lQTbaCaROEV+WiZsjNa?= =?utf-8?q?SKxwss6OqoenmQLpol9wEeLajY6c9roudl71DHvTkUJkZLtDUVz25b60=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?AiD6OOpbeQuqP8+4FXi0nsb9jeGK?= =?utf-8?q?bwgkNO7cctYCUwteDC7HwMTIvDFt2hxeD0+Pk8OwZemjNVF8oePWzWNhnMDnNj2Db?= =?utf-8?q?IvBn+uKfepQokqu+z1VJS4RS8wQQJbF9kW3MNBs+spahqJysTquO8N/rGlgz+6hGI?= =?utf-8?q?ZWBHTFz6gq813v2e1kEU3wcPLLwUxEmi79NTLaH8Cpez8mHpjGiHduNtbYXEzRE60?= =?utf-8?q?VM/tPy9p7V5dnTYyOu31LZXMLb2dR7ehy6LrwMIUzTbNjwhngE8eXFxbHohw7ZV1U?= =?utf-8?q?ohYEQtqtqctjckizoj8icybL17+sAzFVhMjx7UIFFNPDAfXe5xmleiBcng7RwMLtl?= =?utf-8?q?sbfUrjBhcPi9UFV/ctqOMd1dUejcgk825NjPCVwrfWR/h6D0ec7rb702bG2gs1o3L?= =?utf-8?q?6v7Fz2DccQNHiWIj7wVKmFoAMAye1q2at0+6PXCLfNTM08xtAxWRxXTHCAcy3jssm?= =?utf-8?q?h4M+KcHsO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xiXV7IdUuginruDjArU/Ziv4A2zQAKLP+4+joqksM6uJNi+KPI?= =?utf-8?q?Lt+LYwkK9Z+BuMrL//DWSvIbu9W3FcBq4U4WdNh/hcTlhfyWrr4C0Da/yBqTHd9SM?= =?utf-8?q?zTSH+WP7GoVhJVYBkus9/xeyCYkRgzVatkY9ereoVZ22ReA6hg8HvPJ7vaAHkZJfc?= =?utf-8?q?wEhFZor1bNf6?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf4feb8b-cbeb-4ead-615b-08dc6bd2f71a 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:41:41.3516 (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: 9+HsixEc4V9jtZdHKnMuJjLkDUP1W3YovuQgWleVt96+zD7bgI27hR1VCxTGxOLcxayfyr0jG04oji6FWsLAsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Florin Pavelescu Cast to u64, so that multiplications and additions will be done in 64-bit arithmetic (and the results will also be 64-bit) and the possibility of integer overflow is eliminated. Fix Unintentional integer overflow reported by Coverity Reviewed-by: Viorel Suman Signed-off-by: Florin Pavelescu Signed-off-by: Peng Fan --- drivers/clk/imx/clk-pll14xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index 6b2c849f8b71..78eedb1f4a79 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -118,7 +118,7 @@ static long pll14xx_calc_rate(struct clk_pll14xx *pll, int mdiv, int pdiv, u64 fout = prate; /* fout = (m * 65536 + k) * Fin / (p * 65536) / (1 << sdiv) */ - fout *= (mdiv * 65536 + kdiv); + fout *= ((u64)mdiv * 65536 + (u64)kdiv); pdiv *= 65536; do_div(fout, pdiv << sdiv); From patchwork Sat May 4 00:49:01 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: 13653710 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2046.outbound.protection.outlook.com [40.107.105.46]) (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 A170B1862A for ; Sat, 4 May 2024 00:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783311; cv=fail; b=ZJYYbNIX3SYnX3+vAdSHC4i7cj4URPVFivIYOOW8bfSMAqaOhcftkud1q//5Gtjnwx5s6WVp+ViDvw5aCWPPi6Tb2F0ZhKo1sKKnBXTnR3HMgXspeQOZTRJyFW0+h9sC5aQ/HA+ad1iS1uLJWFJuOQxO1wEicxhhiufIz3E3+cw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783311; c=relaxed/simple; bh=tLECtkkW+6QyL3PUhJSggvizcBd75BZSDPmIpKuwP5A=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=NjFbIwk9UFSMr78L36x7zs61OpIo9RH/YXxMOc+9eWgHQrI+06WoXPM+JIyvxxzsv35xhtSZXKi6FLvjvIpMTNK9SU6A6LpobBTfGhUMIDJoS0HDQEt1o86h9icJoGNOVAGXTxDGI+afYjSHxutcISzPoZyIeNxgXN2xwqQ+j4M= 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=DfHmatmb; arc=fail smtp.client-ip=40.107.105.46 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="DfHmatmb" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WW8pUuRpggT5lWnNz6lbJB3o+3falTynVm3rQVZiSdwUSLvvlaYbhYXIbOMrLeRdoJcPvt5i9jxo1pl5l/TOEC5cr3C5vUQCCBs7W6xqoA9I3vvzKUqkoa7RL7Bxd7FOmj2rVlgrPoJVNTuy0O5hqWx3vknXnl9N0JD736LoFHbc3jUU+kjPeLhP9e3njGZNTaaEkRSf7GTDbJ+6vlnRyvMf1n0ae/5CscrXq45t3l4kck7h3/z+ayrCET+sLPxYXNXgzFNZwf0/ajK5x3YhSkCw5vjlFxP+o5atSRinBTu/+HmFW6hqg08+0t51yomxI9wxKa+Ls8IpXYWflq8WLA== 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=9OzPJY6MhrKeRBwMJ4c5Jo8TCBagIjPC/f80OtesPVw=; b=aYUkEPnumF7JxEkZGZFFI82vcSSh5/+7xo2f5cy2Nzx+4o5eoKdRFiA+mafQwk5WidCZh1jOddDjflSfkovCABQa4hpLGfT17Ysov7LqYfLCjhDnsImo/CZQ8rtGaDDPmMUK084FJSGDuFwS40s6KjtG/dBhl9iw5RfuPKsuYtqyKpE+zc2muRXleDg353bt6m6hQGBhLh82JNdFdMaOzfZFlQAea1IacfdNIF8IxgcwaLvs4vQj2kfv/bFhozaSNY0G07MvnHAHzeOa9IFa5wQq8eyzXshIVdlaxrqfci53JOsruXdswJAqz6dl3RFKzinsP7w9rjTPVTGuKccq5Q== 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=9OzPJY6MhrKeRBwMJ4c5Jo8TCBagIjPC/f80OtesPVw=; b=DfHmatmbQepZANyrzQCyvP+CLDpqIXdeQgedaZyHqZRl7JjV7WS3OoVVMCpC5+cD5AloSsTHi6T0AyGKk3IvRzTL5L8wwVuj9wxibX+Rm/xDM3kMQ0MWlIRonZwzOO0Ndv6g+m4jLJqWqEebnJ26NINkHepsxg/qmVnkGKEUkV8= 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:41:46 +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:41:46 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:01 +0800 Subject: [PATCH 08/18] clk: imx: imx8mp-audiomix: remove sdma root clock Message-Id: <20240504-imx-clk-v1-8-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 , Shengjiu Wang X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1096; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=Vumz2WhUTnYw3jXu6uujQOaYqm9Iyxa5sjcrHowRiQU=; b=Bki30aQJD3H5s8X8NOe1wqAOXxF0N4CbJPsoqRYMsECz7I6lTLFqg4wyWHDrn4ahF+Ue12WYH gueKnqzJccVCpJJATjuS+Z3n1ooxAJUeNkMtwtOBrCW9ZBbiz/Uujcj 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: b631d9de-f169-4727-d11d-08dc6bd2fa62 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?/WgaNYuKXf+MYXqZeR4NrzTYBRBqyDx?= =?utf-8?q?N2fa2wT4NhOjGSht60p/MzP6SIxaehkCvFnHxsZ6V2gToaMwwEGNY6JI6a/Gv53h6?= =?utf-8?q?4uIWTVjOTsRmkrmyHHWX3wqdSGChJSNhqamSPHWNdr5YyEkhBcG3XgAvh5DB6FrPr?= =?utf-8?q?z9ogIqyzOBkItCeCnVmgnywwZnL+6lFt9XMWqInoa6vIZkXC1YfvKR9NEzQv5iVdP?= =?utf-8?q?XIrun40jR3KanlDUMfUwomDcIglQpZgopXCsBlr3ZEWyz24Lln94fGfME8ET9BUNd?= =?utf-8?q?Ph6awmBjjylapBSGK7MspOkvPayUZbzgtkG+IC2xVL3ZKVLwy7dfg2nBNwXRL9Imw?= =?utf-8?q?1ke2itenjLtd3IKykisYObBkXzehfA7N369nkpqAo87G6rErCqoNpJn9vwrSk3/kN?= =?utf-8?q?NoDdjn+NRlJFHy1d7uTiseW7NL61Q8d8MFdElK0tBt8jMhEkScHzXSGhZSCL9EBgf?= =?utf-8?q?EB7Sp5HUH/4irM8lhkqxePDWBsJuXs+dd1NYJUdiXzkyoR3ZQrBI3SMNk+3dLABrj?= =?utf-8?q?Ezwiq05te+YrymnvscsR86FFfI2Q5GAL32KaFoincLom3C1KaNI8vsqcdgD9tn2mV?= =?utf-8?q?y27ZBr5IaLt2MigjoKAqSaUOVmokXEW81HyIc4y9PDv5DLf4t3hcbe4SMGPIgdh4E?= =?utf-8?q?QMyTz7dw7ZJGJtgWYuslLYU7VK31/jfGE+krvbmPKsABbLiR2jTxxo99ah+RvCwTI?= =?utf-8?q?3dX2sUrDD93Km3roxslOCIvcF8Lu55PNq0kM/hsGhjb8yifkljwqObaHyOVkDfyQZ?= =?utf-8?q?R8VEge9Y1Swg/H8UTLx8ztS2JQ030NccMbC6rKSTsFxBCvG1vHQ5QFlXtamNC7GSx?= =?utf-8?q?JHrQMCcvIKIRAmOJSoUQ1O4XGDJca/hwemnFU1Qm1vzr37rAYP0dFTpCLp/UcP0aN?= =?utf-8?q?u6UiqU8OPJU/vpkXf4/alp4foTcqJpgLXA8dG/nDJ01Xl1sg/GI7RX55/bbxghHRG?= =?utf-8?q?wjGECMU8SVFL8LvfW7IFFKxDBF35lzrFtQSIOCV1G1u3KWOLkZbhO0qnvmYPmKHQU?= =?utf-8?q?r+KgLBsKC5Q27eldCd1acwHwhnuuO5tpTBGWb31fGBFLWMh+1Sf7KXofIriiaqN8N?= =?utf-8?q?cnT2QPMBdiySRfEty/m+YqnVbsERP4iA+F6bwFym4CE+WwlPEpkrwdjtM4o3CCdiu?= =?utf-8?q?HSSFEOAxYHIcwTesFbAWg0PHzdSz0/zbCZWcUMFM7mXQBhSRbxnkaUnuMVGrgcIza?= =?utf-8?q?YEUcSqjXv3++n4WxyHa69GWGeQyQ4hoLx4bIrrFErcRo6dJceOWZ0pI6p3zbBkEBK?= =?utf-8?q?0oLLxbc3kpWf0P+a1c+A7SdBBIFdDfXwuevALKw13+GJWHPwBLz2Z0c4=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?1yRbJPPVgYfOrJk+sgfx03nH0X1+?= =?utf-8?q?b3Aoej6yA7pl8XNuugEktmfwwzvGDF5CY+E1FQwPfq2ywQLqCOMVVE9a1KbJ7z+gB?= =?utf-8?q?mK1q/n7A9D/Tr6vG7Gyh4JM1P/1/KzyKpcbZ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Fz260DhnV1f5jO7FAsIGc4qgs?= =?utf-8?q?cT3ZesL9bUVvAsK/Ki0Mpp4aRkLom7fcrT7uhVuqy5hHZU051ciyJQy9bj9w2AG+r?= =?utf-8?q?KOVVZdxdHOQrFMxBiutZF8x97tinL/j+2rIgNBQNKIelxn1VUgOmcB0Lz2H5+Y0d6?= =?utf-8?q?c8FpzcV0kE1vR7fUnc14KaWRu3V3yozDTZBD5yYrIZKL24GpFY/PKPbcvKjjqEncg?= =?utf-8?q?uMcEP9EdtNgT5u2iazKkhBmCjAZ4af1qtDgqDZiJyciIP24PWXNr9XzQB/ykIA+Mu?= =?utf-8?q?HM18A2RvNoIilmxJVkcra4ba09yMqoID+8wIvDLAneJdjiMPzfhM+cokNFxfGyssl?= =?utf-8?q?DOo/j/xSLmwoSxzSjKMdDYp9iapH2o+Y8n2gbn+dTrA1+d+YbrbzMhzBTJrUGumnA?= =?utf-8?q?z5Nt9u8qzDpIPBIxYPgZrdcHSTjG9t2g03X7IwDE7RVdqTD0R8ZcrgbFbfV1LeTF6?= =?utf-8?q?OfU/gm0wH22Mn14q4Wba0Al1ugLiE1w+1G10uuFjz97HJWnvYePxhth4y/RQIbemH?= =?utf-8?q?gkp4qrGwscdZ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b631d9de-f169-4727-d11d-08dc6bd2fa62 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:41:46.8606 (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: vsUdn+hZVzAKzjjslqizJq6faPB5yzcz67POYQaQe6GR8CxbrXAXV/UN2B3BJ5Zk6D322JM6u/W05Pyhc8Prmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan There is an issue: SDMA3 can't work without setting AUDIOMIX_CLKEN0[SDMA2] (bit-26) to 1 The workaround is: As the reset state of AUDIOMIX_CLKEN0[SDMA2] is enabled, we just need to keep it on as reset state, don't touch it in kernel, then every thing is same as before, if we register the clock in clk-audiomix, then kernel will try to disable it in idle. Reviewed-by: Shengjiu Wang Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mp-audiomix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c index b381d6f784c8..88d8ba975b5a 100644 --- a/drivers/clk/imx/clk-imx8mp-audiomix.c +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c @@ -172,7 +172,6 @@ static struct clk_imx8mp_audiomix_sel sels[] = { CLK_GATE("ocrama", OCRAMA_IPG), CLK_GATE("aud2htx", AUD2HTX_IPG), CLK_GATE("earc_phy", EARC_PHY), - CLK_GATE("sdma2", SDMA2_ROOT), CLK_GATE("sdma3", SDMA3_ROOT), CLK_GATE("spba2", SPBA2_ROOT), CLK_GATE("dsp", DSP_ROOT), From patchwork Sat May 4 00:49:02 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: 13653711 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2040.outbound.protection.outlook.com [40.107.105.40]) (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 0B1BD1CA89 for ; Sat, 4 May 2024 00:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783317; cv=fail; b=oYi/9uS+0EjsC4GtaL5ysrG2KKfxrMhhFEKC0nslXMIRHfXIfCmepv2hSh3nndyqsU2DfecluzkdDnZKnLLvKIOYz4Z6UylBI3xwj99AN7oWe5Bm+wyXCAjOdqpHcoJaepNkRLkYEh1L5Sf+mRoZ84Kvc60w88Zd3v8gD6+IHqc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783317; c=relaxed/simple; bh=nvSam4mK3om9TVz6wuJK2Z7DSK/o6N1d+PGOO/OShvI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=WgJqPkdaUQSMLQnbEke/H5BOU5EdcSQICIHfj6BW7H0ft2cj//OEOVRKmPqpltD01Ku3xIE5ZRvUtg5Oq9ErJW2XnSihYaoG+TgQ3fQ6/b2wB0ZOPrcK3daF+MdNHPHR4eZgA3CROGLdA33a7VGFRdfVolO4HUNPrTEQxVguGxM= 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=djnwQsXm; arc=fail smtp.client-ip=40.107.105.40 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="djnwQsXm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WdZYAsPoD379OCnoBb+7thc3ocbLRgCSzbptp+46EesaY8BsQgPix+nT1Jeu2Ym+maQdR7DO7JZH03z5uRYbE7t/nvjSewlIeQA2z1fK8LTNqWeeslqEygCCMaHcdUBSmKNKV3sLyv13Boc0T7kS1k6dUNnCLj2gUrrFRpzDeJtoUMRwcBXJQQoCeMjMexlu7G7ACnZMmgcozuzP3+YXrnMZBuW7+M9myC7Hn+IkNPZ6ExZgsZ+olF/DRWMEi9T+uus5GP5AU4lRpADajhGFRmkd9Z5Trd8SA3Knwm5rcJfgxEjafcsuvtKORkkwBQDdGWOSXFC5XzhOI4hpXuwijQ== 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=usPxMF+abDDxGyg9lU1ffDPQeliZbPP71G7yzsYJVQ8=; b=AojNDDFqkUUiFDIuFzXW8sa1pUgQLqXDccn0Y81GH6rgCp4jWSJgG1+RhaoyyPRQAsTiR8Inn0wo8cJymUON56Lqd6OCsMMxa7AL/dItyGBgPX0rs6Dc44lQ+rjc4sbwoYoShJk6Bt1sxao1Bm0iU5fUAjTxcsdbUxBrsjUeLhkvsyGXCVr6O7a6a3VOUNC/IsaXcj2a10iiBZ+1IuXyXZmc2GeK4LuLlIAu4DQIh1v4tysEl7+MvrV38yukPjkyatkLSY2uTVb9eYZfAySeWrjRHQPWj0coE5kYZc9qLlUme/m0iBKa/ygLiSUYxEGrg6e9n4KwJLxnLYHWuH1dRg== 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=usPxMF+abDDxGyg9lU1ffDPQeliZbPP71G7yzsYJVQ8=; b=djnwQsXmK3yMxfGmk5cV1MYb5Z1sQYzE4q04a/Z7OvfdKwmq4KI0X5XtMp2+DmD2fObagRCGKEaAKoIRB9Z+glfLMUKbN2p3bwx7HiqzV9sVVHWOaOqtvMIorMAjxipWT4MfDSQH0I4yse84PstVtliIe+kFgIM7uZ6o0pi0GGY= 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:41:52 +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:41:52 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:02 +0800 Subject: [PATCH 09/18] clk: imx: imx8mp: fix clock tree update of TF-A managed clocks Message-Id: <20240504-imx-clk-v1-9-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 , Zhipeng Wang X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=2375; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=a0EXy0fZ6h4g3hX/vQwYN1ZZTioQoMQK+mQT/+3QweE=; b=cMlJUB156F9beg5nUjxo/uGnlDbQZ1s+/8nImzkSPOwP5jegx89MxV40aaCbVsENH3jPABTIi fvdlMnw6A+pB/1KppU9/zXDXFy88Zm67rriI5Kt/rqja1h4s13akB7y 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: 8ab0e199-599c-4d59-de91-08dc6bd2fdac 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?HBZlwTfNcGBGwUJg6mGzDAWX6myT8aZ?= =?utf-8?q?XsRhIoa/hTfXiB7Hr7ebCJIg7u5NejjXb/xm8yUO4VV8WH8skvkcLhEte6JoGXAjY?= =?utf-8?q?BtFN+0hQcGe7Ej+NGdhKi9gK/FM3lFfMNMJlNqQZw1TtuX8IJ671F98U+/ebtlqyN?= =?utf-8?q?SNS9bMMgNqTjr5J192PBeE5URMYCBfsoxW+VebCIeRG8CRXeSi7zUh+qDBwUfIjkl?= =?utf-8?q?/AjP0XyzJYuGd5Ca/wc+BUFjS1I6GChHUwoDUfwDKtg3n9Yf9v8c62UuhyteNt/yf?= =?utf-8?q?ftNHiTHVeSHaHROpdmdE5cRvatXNMUUVZ2PvNkZQpMN2J4oqeLhT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wtu8CprIN4U?= =?utf-8?q?dW6QOGDRFZBcNvcEhKtu86PXt20X7Tgh9I/Kk3Qj1MfGFUNlieA8sA4rEkmPcdyRO?= =?utf-8?q?vNgtoirJO4AUK0+cjEKlwmAICfTAqkMOx8f5ZIGc2lFC95YOR3a4dZ6A=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?v895Rvuj7K94wmjUVfuNjNpyDjXd?= =?utf-8?q?CiT40XYJ/tpn0HNKpq1UeWwqneEG0Ev2Bukicx5iUdfDN7L79wenPslYGY/Qa+Cve?= =?utf-8?q?W9oveEv/xCUe/RNcI31E9Ei15OO0zseTjuj0N+8Wwp3KnJCx1oJ++OksFRZUEXVdH?= =?utf-8?q?bzgdD9dluZJR1KrOp/M9DKpju5JrJUdpbHlOC7H/MKdO8oZemJGRBf+1UKM/JaDBc?= =?utf-8?q?xkiBhDSrNfrgUM/jWzWeoCuX5ymD2T0SRliiJ0ajj3nLDXNCEJ5QFWHF9TKXHf87l?= =?utf-8?q?xXPcu+WWKSkf6bpQ+Lkktf70/KhwlGiVdnHoM8Q2qT9GEHSVoWOFuTblMkIao2sba?= =?utf-8?q?Vasw0+4xAE8rGdYFc4MlhDWHMJ5Z8dJAD0yzVkbSxciaIDyfwOzLOz3VKAHCATSF+?= =?utf-8?q?BVbcXmtkD0JjK+HfT8iOgcDDG7PanzMjvV+pGm4OZC77zj3Y9NwK7FF27yeWaVfK8?= =?utf-8?q?2DvE1oaDgCzOYCbaHOQSWbUtlbOjpFngxUfwb/Oxw8Ud3FWX9nUf/xxxfqZCdbMi6?= =?utf-8?q?CTQ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6XA0pQn/fUoTSlJ+ECPzUfuL6GvIT4gEfINDapnSypdLOiJeBRj2519c7?= =?utf-8?q?/XQcxO/snyIgirudg60folX3a7eJXEMaoAfUG10ILebu/GUXghVG9jeH8uQVaKdIb?= =?utf-8?q?lxM688D8ZWPq?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ab0e199-599c-4d59-de91-08dc6bd2fdac 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:41:52.3893 (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: UoiMg/z813mnowpWNklTM2HKx7AvMNZrXmJEcBjcY3Gq0IwcLFvA+l2i1JVln1E0VPHGj5vBmxLl02onVfH0HQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Zhipeng Wang On the i.MX8M*, the TF-A exposes a SiP (Silicon Provider) service for DDR frequency scaling. The imx8m-ddrc-devfreq driver calls the SiP and then does clk_set_parent on the DDR muxes to synchronize the clock tree. since commit 936c383673b9 ("clk: imx: fix composite peripheral flags"), these TF-A managed muxes have SET_PARENT_GATE set, which results in imx8m-ddrc-devfreq's clk_set_parent after SiP failing with -EBUSY: clk_set_parent(dram_apb_src, sys1_pll_40m);(busfreq-imx8mq.c) This is safe to do, because updating the Linux clock tree to reflect reality will always be glitch-free. commit 926bf91248dd ("clk: imx8m: fix clock tree update of TF-A managed clocks") adds this method and enables 8mm, 8mn and 8mq. i.MX8MP also needs it. Another reason to this patch is that powersave image BT music requires dram to be 400MTS, so clk_set_parent(dram_alt_src, sys1_pll_800m); is required. Without this patch, it will not succeed. Fixes: 936c383673b9 ("clk: imx: fix composite peripheral flags") Signed-off-by: Zhipeng Wang Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 670aa2bab301..e561ff7b135f 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -551,8 +551,8 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_IPG_ROOT] = imx_clk_hw_divider2("ipg_root", "ahb_root", ccm_base + 0x9080, 0, 1); - hws[IMX8MP_CLK_DRAM_ALT] = imx8m_clk_hw_composite("dram_alt", imx8mp_dram_alt_sels, ccm_base + 0xa000); - hws[IMX8MP_CLK_DRAM_APB] = imx8m_clk_hw_composite_critical("dram_apb", imx8mp_dram_apb_sels, ccm_base + 0xa080); + hws[IMX8MP_CLK_DRAM_ALT] = imx8m_clk_hw_fw_managed_composite("dram_alt", imx8mp_dram_alt_sels, ccm_base + 0xa000); + hws[IMX8MP_CLK_DRAM_APB] = imx8m_clk_hw_fw_managed_composite_critical("dram_apb", imx8mp_dram_apb_sels, ccm_base + 0xa080); hws[IMX8MP_CLK_VPU_G1] = imx8m_clk_hw_composite("vpu_g1", imx8mp_vpu_g1_sels, ccm_base + 0xa100); hws[IMX8MP_CLK_VPU_G2] = imx8m_clk_hw_composite("vpu_g2", imx8mp_vpu_g2_sels, ccm_base + 0xa180); hws[IMX8MP_CLK_CAN1] = imx8m_clk_hw_composite("can1", imx8mp_can1_sels, ccm_base + 0xa200); From patchwork Sat May 4 00:49:03 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: 13653712 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2050.outbound.protection.outlook.com [40.107.105.50]) (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 8F6C1200C3 for ; Sat, 4 May 2024 00:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783323; cv=fail; b=KoorEZgkln40Z267qsDVYQ70aO565YQ0Ka4w15pTAKtsRyQhHulBGf8uH/CRV1UhgB5XYNDqfaU+G9cVjZpbHWm4meWWTbRLvhLuuDGrvyYGcFQJ+9BNi1qQBoat5rVFz/21c/F41E3NbTVzIXz2t2PbheO8aOgqS7R0JLkaAQU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783323; c=relaxed/simple; bh=tTnmH/6Qnb9N9OjP7YpZL6Z0qYEvJ4SWgZIDAnZMSPo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=B6e4qXqVtk1MgQ+V9+W6e4Kneqy1X/NE5bpHgqGvGefwKZNu/4idS96KUF9p50gOnBJkSaPpaXo8cWBkwRFGQGtnXW8rp67EYvnXhO4RqK/cTOeVnaRH/mRQT+VNKZbE8TMdPeCJjfG7pGnyELRjnMObMOa1QAYVRpZekeAaaOI= 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=GjQDZ3wg; arc=fail smtp.client-ip=40.107.105.50 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="GjQDZ3wg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CeHzWAetFo6fIJaIVW2PjhPSLOZnHlTavll1nsME4XwPKMHXKN5nO9jF5UZ4CVmGJeQloz7DoRCCAwkiBkNhMeQ/c5hr0/rLzClafN5G0DtY/5zMMjfoY107tCQhguBYnkmoaMUm3i2zSHxGgQSOzOM5bb/cipgE4mjRIvj7H6lv4rHJ8sZv7SGSdTPgfhbUrfpcp+P0JJ3YtuIaMZeliT9mff881QtaaILBqXDQ2txOD2ySB1jNI6vJq2wU5NMhgKOUDR5q7yb4l05vyI5dlhK7EhIc65aFTj3QMkRZ5OjMag5Gg2j0j59WVIkeJvFTQNFqKnUSMfCzCifl7llGrA== 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=shqQpCU+zit6vu8mozb5Ood+1gNMCo0go1qiqqcoK28=; b=X4sFRWQiRvadVZJeXmfzu4LYgBlmDjwVbp8UG+3fWx743GYIxHnXNhU9ZTXZix0po2fAW7g9VGID7j/lWp1nXGG+ycKwvCvEGMjVhuELM6imONDdWOL0CAQ+wmkXU2VpJzlgchLuzG8SknJsTZYPQuKcSVI6EV7lUYk+n1ob31evCDoXjRfkqYjh1LHAscdvUui2UvHl/3ItnjlSocvO+BBmEguFUgFkrJnuNJYu67zUFU7K1CMYyw07hROkQIHMb37MO0beLnYHpgEVT5J5DBAYvBTyLzhTZavwrywgyr/k0MYEGQLxdoc0y38KqJSZlSsWX+ffEgD4Ql4N8NJHSA== 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=shqQpCU+zit6vu8mozb5Ood+1gNMCo0go1qiqqcoK28=; b=GjQDZ3wgBSw1/mBRJxim0K7dZ3O7iYUwgICLle70K3OOONYVMlmtoT0RNmdELfTOoDOZHseCWZrKV5m1m8CPBGphNkseg/BJZq1bnrc8zlTAwBKL18pb6nT29FVGlUpkB2+g29NDVLZ+x1sCCJy2jFUJkXHP7C1OTkRcvifwMYY= 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:41:57 +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:41:57 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:03 +0800 Subject: [PATCH 10/18] clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D Message-Id: <20240504-imx-clk-v1-10-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=2512; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=tawkmb4o3zsB4Mw7AonWFpkCgwbnD1LyifvXX0BKqZk=; b=KoSIBH1CAzTBT8etU+iZ4h2zs6IYqvUz8RLZLmTWh6jjhWfqE9AJZn0x4lnw82iMIEOG23tvO ohqaAuyFEcyBl5rNeYHSz899K4esYINWgYhPd9uUSSuN0sjYJT9uO4N 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: 624db2e0-ca56-4e35-19da-08dc6bd300d4 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?H7pUAVCxF5zxmnnANcTPtsmKZbjIkZ9?= =?utf-8?q?JDM9Oibj/Sx5QykX0U18Hu1VXf8g8X0W0Q8sPB6K1dH4jzrIAWjVm1kIrxf97BTkS?= =?utf-8?q?k5BmeMnLlKoaia5VgAEsGfH69hMh5SUt1NhiIeYTPCAR/mqL0sNxRYsaRnKFHhguj?= =?utf-8?q?qtARD5k8JB9P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zbTSn3moGdVVzss6B5L+fICCAawyXompNsduW66VFrsnqdMKeYcQGj?= =?utf-8?q?gwGvQPH+4GmqvC6ddfnXg9RyS6pjO0h1H8e3JxjYi3tIjgATnCmMQlZp98sUDItOd?= =?utf-8?q?WbuyFKy/wJ4ifUfshXUmV0/vo5Yf4t6VAEgjj+VbRJUjmQdlBYtK8lvxj7zctVp6b?= =?utf-8?q?mbxfQwoJ4rvGsUEHluf1934fM5L9yvK6WBC5VwLNMqLaoEzSMh0lx6UkM1dkLY14x?= =?utf-8?q?e0p+ihU0H0MWk3Z2JXpgewqTVOtkh798sDey5lWfHPmnBWGMFi7RseF0=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?wzyTDFbnq32QBljNqE95oETOSVJe?= =?utf-8?q?4eXldt588Ys5YOzCitgQqLRI3SpDM/twpQCswpyoga9T7RLwjqMx3539ogwvTqmer?= =?utf-8?q?nPvGSJevrzt5209JHJBr8UYEgOENLIrUUSz+h+G4l92GMIubXMREmFzZgqGbI1lbn?= =?utf-8?q?IbxgzdZ993Mxd3axRAPC9Nl7mdtOVliHk66DZYU+nh3jhlZ7A5NcyeWAYiJoYLqI0?= =?utf-8?q?lI4/QFhsDI/865TGtxpWyzYf7qbJ80gCmj7kSYdGGPAJJvBvGRjPHhwFyQhcysAzw?= =?utf-8?q?YsHIAhlOZToC5hg5KbWN6SB87hN+mT2njl2YocfH2+q849lV+Qvbq97Zg2ECUs74t?= =?utf-8?q?ZDk3B7lgNAorBG8w+6P4dvHez9/8Fj6V7ACZeqU1Bph1/xAvTIvNExEAJkukwL109?= =?utf-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Jt2zjFDcZDjYblPht7t9dKYwKcF6wyFuZh76kywsK+jA?= =?utf-8?q?rSnytuul6/iMFqXuHUaajCcFyM236/PiWA/iwI6vQdNFRDVv6tVm1BPIwrML3MG/o?= =?utf-8?q?B/DDg9NDQ17lCNkPdm3s3IZPOjCQNWrWgSs2EZ5+FSJysx5vvy+1RwDFCRDWCwIrj?= =?utf-8?q?FqTkEUDwjeDsRmOgRn5HPY0iYrqzxDEWjEoqqYB1nFjQFXR1vgSXh/XvxrZ93BOmQ?= =?utf-8?q?pS5XYtyiljFB?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 624db2e0-ca56-4e35-19da-08dc6bd300d4 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:41:57.6652 (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: nLRcxt4COoJauroaUm1hFq6td6EVmB2yRiy3SqVXQs9tqBc2cnf7GUkybszjG3FxKMlLzA0Y1iBEYhZa0s2YEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan For i.MX7D DRAM related mux clock, the clock source change should ONLY be done done in low level asm code without accessing DRAM, and then calling clk API to sync the HW clock status with clk tree, it should never touch real clock source switch via clk API, so CLK_SET_PARENT_GATE flag should NOT be added, otherwise, DRAM's clock parent will be disabled when DRAM is active, and system will hang. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx7d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 2b77d1fc7bb9..1e1296e74835 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -498,9 +498,9 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) hws[IMX7D_ENET_AXI_ROOT_SRC] = imx_clk_hw_mux2_flags("enet_axi_src", base + 0x8900, 24, 3, enet_axi_sel, ARRAY_SIZE(enet_axi_sel), CLK_SET_PARENT_GATE); hws[IMX7D_NAND_USDHC_BUS_ROOT_SRC] = imx_clk_hw_mux2_flags("nand_usdhc_src", base + 0x8980, 24, 3, nand_usdhc_bus_sel, ARRAY_SIZE(nand_usdhc_bus_sel), CLK_SET_PARENT_GATE); hws[IMX7D_DRAM_PHYM_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_phym_src", base + 0x9800, 24, 1, dram_phym_sel, ARRAY_SIZE(dram_phym_sel), CLK_SET_PARENT_GATE); - hws[IMX7D_DRAM_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_src", base + 0x9880, 24, 1, dram_sel, ARRAY_SIZE(dram_sel), CLK_SET_PARENT_GATE); + hws[IMX7D_DRAM_ROOT_SRC] = imx_clk_hw_mux2("dram_src", base + 0x9880, 24, 1, dram_sel, ARRAY_SIZE(dram_sel)); hws[IMX7D_DRAM_PHYM_ALT_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_phym_alt_src", base + 0xa000, 24, 3, dram_phym_alt_sel, ARRAY_SIZE(dram_phym_alt_sel), CLK_SET_PARENT_GATE); - hws[IMX7D_DRAM_ALT_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_alt_src", base + 0xa080, 24, 3, dram_alt_sel, ARRAY_SIZE(dram_alt_sel), CLK_SET_PARENT_GATE); + hws[IMX7D_DRAM_ALT_ROOT_SRC] = imx_clk_hw_mux2("dram_alt_src", base + 0xa080, 24, 3, dram_alt_sel, ARRAY_SIZE(dram_alt_sel)); hws[IMX7D_USB_HSIC_ROOT_SRC] = imx_clk_hw_mux2_flags("usb_hsic_src", base + 0xa100, 24, 3, usb_hsic_sel, ARRAY_SIZE(usb_hsic_sel), CLK_SET_PARENT_GATE); hws[IMX7D_PCIE_CTRL_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_ctrl_src", base + 0xa180, 24, 3, pcie_ctrl_sel, ARRAY_SIZE(pcie_ctrl_sel), CLK_SET_PARENT_GATE); hws[IMX7D_PCIE_PHY_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_phy_src", base + 0xa200, 24, 3, pcie_phy_sel, ARRAY_SIZE(pcie_phy_sel), CLK_SET_PARENT_GATE); From patchwork Sat May 4 00:49:04 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: 13653713 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2074.outbound.protection.outlook.com [40.107.241.74]) (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 C38881DDF4 for ; Sat, 4 May 2024 00:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783327; cv=fail; b=To2saOOdmpfT7UDCOYNCKPI4BVfoOGnWgz25e8mzlJzXhyxDnhrOoErSGjwS03E62U32499p19c+Amm0vGbh5AtdCYe9iiUWFJ53Y2JDRe2q9qkU8Q4PTNAvvmXBEhgjZGzlbEUfEBi0qitmWtK8Z/zKgDOqfEIIKTTQlhAoPRk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783327; c=relaxed/simple; bh=i6s2BDOKW6zn7tKgno8avPO6dvuo9b/4Fzr1Ewfft/o=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=RG5TC+4ZndYWIj3iyqmHeYm7tsWsJEoQxTCK1gK8+nw6PMTOztbJfzW7bbw6zdB+Hy2Ke0iIClfhC/mniNBg16+oT/S+H9gZWl/QLUH3wZ5NmP0esqtu8XBQU5wqbzcR2IvzS0VIw3tQxGYrOELRkpb1MYsVrzV71Lylp0adB1w= 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=Fx0JN2d6; arc=fail smtp.client-ip=40.107.241.74 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="Fx0JN2d6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gf/cKsv+RT+XepDl1Fs62jjnPc8KI8/5HvfrSgvSfOfOLoxbD4EMarHPyALh+1NipNRL85O34ZjGB0e0V9rvsPlUqOjVbI3Y/44c+WCNOYu4SSWR4r+NTTKuJ8cJgnUcMcPGygRSBMkhYaJ2iEcJp1mzAI9WDLjlkZey8LPSsmw4WklPtlTA3UQVgYU8peFna1g2ortR5vf7l+9bmLCzdz9ofe4iA26fOQ6ZRzLjg7XMxuGYyW7yhsOjsvMTDgTDsM3xTQfQxjGEzHvb5gwl/DDB4RFmFZcxrAI82gp9XBbtBVlAagX2wZg9BYXMShHs+opLSQDHhVJRinCSwlK64g== 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=1QiLEK8YsyGhwnQqocYVdqygEuHwuHli5O/GR4Kb5nc=; b=gqrM7dsx72s4Iham3b2v4C9ozW4/8XWzaVCYO8Eb6qldhg452robUz8w5x5uMLfhZfPNxwdyuu+5NGgzUkhSfQYNcnxmUblYBgRNQ6nwDi1hevQSR9ZK5TcCuBcsSdSNKo2IYkhO+/Bvz2X3Q7LAgaKR9bQY52gWmuZLuLSuBGRM2GTbWDiEGBA3Aq8s/nVF6m4OffZSs2e663ZComXWzMGzTBpU3b4xwii/Kv6CAa35FWpjjNGiLIVOlgxDKk8xoGRbnkSs4RDbWDpZD0kNMif+YAiwY29gJ9Tzs41XY6NfdPkxuC3FJPeE+vpXBJUUJWNywhNptQ6T+pyA1J3xZg== 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=1QiLEK8YsyGhwnQqocYVdqygEuHwuHli5O/GR4Kb5nc=; b=Fx0JN2d6br5vKiPMkroZNFD3pXopsms0bLmNJh1o3YNNeWTIzIts4TddcF2pxkeFhDWhTdgPGKPv1Weau80Hvg8aFOKv+bi/0wwHu//jWFf9qzVxcpbF0JhoynuX3bjlzpDje5FTrkk8yWFcIFFMD3bYLACpbLddYk3JRB+/VD0= 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:02 +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:02 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:04 +0800 Subject: [PATCH 11/18] clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src for i.MX7D Message-Id: <20240504-imx-clk-v1-11-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=1922; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=enKh4CGkqPk5jRnK8VpEttysezgL5JHxfHa9hFqdaL0=; b=XTp+h4w3AqyTKCXKfjxukUQ4LbbM6eoS8gKm8xL5R7dbD9vQsps3qqQjoZ6pMmU6THkkbdpkj 8q7q8DKNAeeDgtId5ZVDc/w18ORYRYtzKm4t7POxhglKvYB6tCKrvcH 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: a432a48b-4f1a-424b-ccbc-08dc6bd303f3 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?rEOGS0Wbuzx+09gHZIuhGZj2Hz+/DOu?= =?utf-8?q?ye/PoLcohu9ckUF/xQXIMmn1Cy508zxkKVVeXiIH++VFHuhhJAlIkIRx0YrECMJQQ?= =?utf-8?q?CvdKCehMl8KKPnXMkMzjS+p/J5eSSA8vaTGE7d3RL4csIUjZwmUdqnsnaSa5k3dpW?= =?utf-8?q?kLy4b+itXrDcPkYHVDXznFJaW6Ru1pQrs/FSzVRhAXxnl8x87lpXIGYHLVWEqtHO6?= =?utf-8?q?9W6Oe64z3ACkhrGIkpR8U8RlCwu66leBb52r6jzHlQrzV1YDRtzFu87ZrA+pT82da?= =?utf-8?q?BzfDNStLQs3kknXCpZhgFRQCyDDGCVrS2Q2vNSMJI8WKY67zMtAkvefnqST1F3mK0?= =?utf-8?q?FGFL1QMt9PcFquQtUsSs4FfaG4kpI/YIAzNB3qrPjQPLlQReNAD8l6pq2Lu+9Qjm+?= =?utf-8?q?/eDSlkN6zq+iduCzIr3Jaqu6KmH3Evzwbh3e6eVsbfBsuEcXVVj8SqOzqWTwtmAg5?= =?utf-8?q?jhSpB1VihPbN/u0kP3xP5a8yGgX76jrw9s0iPItWP2VOgB9Xd8KsQDJGzXDx8DVr3?= =?utf-8?q?xK6vEP960L+/rCHKf38PCeHXn+VtMEaQOodsmyk18QwIWol9NwRlTRRjU/31RXZE8?= =?utf-8?q?9eseDtgI/7LVZEro7gUXfHkCEp68TWbrL0Za/3qmhK1hggnrzkJx6OfKml5qv9sHW?= =?utf-8?q?rFdZYshDAJVEAf+wDGeyird/ShD6FIOuiks80Den8u+U2i9d9Yj+StahVAdMl5E0D?= =?utf-8?q?PjecPofhfzP/3Bs5MAYfzCW63MSwBias+WUzZmLvq+42rFQimGf80x60eDVIVg34Q?= =?utf-8?q?vix5Repbvm7jn2RLfoucLtanhan3T4LEf3nDJKOqwtNGk4+6NFMd6XBUYo/NTFIE8?= =?utf-8?q?aVctTrxx7qAlYcPVD/Gw/SZvRLEvpVmEoNzhAlAHne9Qilkt3oTsY9g+WvGp0UuNG?= =?utf-8?q?2IFvKvUXK4DHjZrLQ52ERHTJaztuXIHgJlf4mdkB9Gz1XJ+dTCalNmjieKf+wljXf?= =?utf-8?q?OwtxyBH1YEwq1eCfL/QRqPPbr8gINyiBhrrZrtAuoQWY2M2QVhaDAuAHkm0h6mrCy?= =?utf-8?q?xA3+VPjIbE/wAUA7BixRZas0inmP3H+S9L4l1ON6n5lf8aN2bdXsTg2ZrFwLRLxUF?= =?utf-8?q?DIGwM5qXe/mH4ypS2XGPv0vM6PtfV2EKb1CB8g5eFUpteFCmVtapZs1uuXIJir8Hb?= =?utf-8?q?5QOZ4M/5Exp1G692GIZjLIDktL03tYd/gN6RGFtCFc1KykOWBmUryjr7uzSWdifYp?= =?utf-8?q?qg8yzuVuDaqYvERqaYry5//39NUhFRtg9Rnw3D8FQ/0RIVsmF4EYuqHwSyECZuHqW?= =?utf-8?q?3V+GRqvUrh9+2PjjGv+MP2/qvgjtFbQMheB/x3bBY+7YZ8tXAbjohszk=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-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0njuhAv2SMKSEX4YEx6801oXbLT2a9Rv5/4SnuRxEQjx6?= =?utf-8?q?RJbYrG5yYpKioMwmOz8pBkdli+2gduFEswQI7Ohh4W5TiLdx1yySWcVjH2+s1qxdw?= =?utf-8?q?xQYOrbENhGHugfJyFqbAkwHzyLyCgrm8GRZA3XBik+Q9ElCnRhsvcBWom362xNOAK?= =?utf-8?q?m24iErzx1b+6QQv0/ZZrlKrizSB6AjUSfTCdqm78EL7VCAU+tT6h2xpglsKxixFaj?= =?utf-8?q?nBs1WV+fqZ5VMecatKsdlvp2j+ji0Lz2sVqVCnSbQA+GmDvWuwSBh2oxeCeM+QBO3?= =?utf-8?q?Z7cVvKQbERU6oaWgLBbYxoV0g/IARgSodtUizCycwfceMsKnOIfwNc88m8mFpI9/T?= =?utf-8?q?4obCYOv/EurEdYkf70GiWopBXtoTzh5YAH+0c9rhJxQwj8OjUlpe3ZqRfcecnxTiV?= =?utf-8?q?3r7y+Eig9/8XkB0qAJteXWJVhd7qYDg+ynP1YSdfIOJM5quVAcRUA0FN0M18S09en?= =?utf-8?q?XLYbPXYdjZOy7s7/ELmSuWFwgViAmN4kJrLJjg/uJvU+Ed65ZNIqqiJS0CQDatbiC?= =?utf-8?q?kOVoxSuFOJS0LfmcJYsFeW7od2Z0MdqCLj2KIo16NpCGu3qQQT2R6Js3+Fijn+rXw?= =?utf-8?q?dy+rccEXYotFJT1XcV/y+WmjMAT1/oQG5Bb2vCK0GiCok0lVMLJhRJ0WiJQX8tWpI?= =?utf-8?q?gCO5gTYY7hEs?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a432a48b-4f1a-424b-ccbc-08dc6bd303f3 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:02.9135 (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: jU9veNwkwDRDtIPXzqhmYcvvFvZAskkGXdrs0TGINDJ024NyqSCTFS4Dw+xeKPdH6HIocEjN5CPsWmCibeuUbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan Add flag 'CLK_SET_RATE_PARENT' to 'IMX7D_LCDIF_PIXEL_ROOT_SRC' to propagate rate changes from LCDIF pixel clock to video PLL to provide more accurate clock rate for LCDIF pixel clock. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx7d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 1e1296e74835..99adc55e3f5d 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -505,7 +505,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) hws[IMX7D_PCIE_CTRL_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_ctrl_src", base + 0xa180, 24, 3, pcie_ctrl_sel, ARRAY_SIZE(pcie_ctrl_sel), CLK_SET_PARENT_GATE); hws[IMX7D_PCIE_PHY_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_phy_src", base + 0xa200, 24, 3, pcie_phy_sel, ARRAY_SIZE(pcie_phy_sel), CLK_SET_PARENT_GATE); hws[IMX7D_EPDC_PIXEL_ROOT_SRC] = imx_clk_hw_mux2_flags("epdc_pixel_src", base + 0xa280, 24, 3, epdc_pixel_sel, ARRAY_SIZE(epdc_pixel_sel), CLK_SET_PARENT_GATE); - hws[IMX7D_LCDIF_PIXEL_ROOT_SRC] = imx_clk_hw_mux2_flags("lcdif_pixel_src", base + 0xa300, 24, 3, lcdif_pixel_sel, ARRAY_SIZE(lcdif_pixel_sel), CLK_SET_PARENT_GATE); + hws[IMX7D_LCDIF_PIXEL_ROOT_SRC] = imx_clk_hw_mux2_flags("lcdif_pixel_src", base + 0xa300, 24, 3, lcdif_pixel_sel, ARRAY_SIZE(lcdif_pixel_sel), CLK_SET_PARENT_GATE | CLK_SET_RATE_PARENT); hws[IMX7D_MIPI_DSI_ROOT_SRC] = imx_clk_hw_mux2_flags("mipi_dsi_src", base + 0xa380, 24, 3, mipi_dsi_sel, ARRAY_SIZE(mipi_dsi_sel), CLK_SET_PARENT_GATE); hws[IMX7D_MIPI_CSI_ROOT_SRC] = imx_clk_hw_mux2_flags("mipi_csi_src", base + 0xa400, 24, 3, mipi_csi_sel, ARRAY_SIZE(mipi_csi_sel), CLK_SET_PARENT_GATE); hws[IMX7D_MIPI_DPHY_ROOT_SRC] = imx_clk_hw_mux2_flags("mipi_dphy_src", base + 0xa480, 24, 3, mipi_dphy_sel, ARRAY_SIZE(mipi_dphy_sel), CLK_SET_PARENT_GATE); From patchwork Sat May 4 00:49:05 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: 13653714 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2079.outbound.protection.outlook.com [40.107.105.79]) (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 ED484125A9 for ; Sat, 4 May 2024 00:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783332; cv=fail; b=CU779yR2JuAMB0h0WdMXHhSHySYtyGj+jEwbBDBG9f0uHrZbhzgWrlOAdMfUi7GHNi3nGVQNFsHy601i3kdjtdqgJb+GDPMGHh9iZAqqiLpQce2/wyGojOqCxBbxHdIDg8ZaJBDfFrwaMKaBykdV8dyexSn3X4p3DT+KpwpI+tk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783332; c=relaxed/simple; bh=dNAJjUOvWj4gorUyU/vJ5YGaC6ol01WXuVkktew2KDo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=V30SzU7Rr2LROJ/U73UBpHmZCLmAHPUW8nHAfd7yPYQ6N8dp28V7HCK6jWi2EOLezwF/WVH26TKmT+d0HRqrUHpoVMh4oQXMOhIzg5mr+xtTYNW6GvgiOL8YAe6J7oYKPC4jSwDHP6i8ZNxeRIUKunhDKCylqsPcMGBU5FCYq48= 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=kqSZFlQ6; arc=fail smtp.client-ip=40.107.105.79 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="kqSZFlQ6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iu+GG6jjhro0U/xLW4uZBKa5i1d38LKg5CdMa8htDU/tE8OyBGQM6GUU+wjvGkaRaQav2AKIlwPfMOOf9YhpTrcxSfD77Hg61WSAMui3+s/0FVIZkiBaIb9OJBS+aKtNr3mWA19O9fbIm6VsPSgjk3zhqJ/AN7ajZWrYcCC4Jfm86bKHT7VypjV90bz0kXh03UXIoeJpyDgw2bNl1ovXWOTYe8Ue0iKXUHFlNB1truXNmoztmJGvkR6aZZ9FuZduj7SMhOrQPq/2KFG4oPmMR7m+oYQPjKNOfTjINS1p4xzZfZtQ9yUBQETbyhKxs9JeGpLse8G+36gJjW/xhuUWhA== 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=YxYqLlXJwDglTN2OhR5UoatELjnUAf5TIH6f/O5wCko=; b=Ia1tau/g/VQ55FlzOCM+bE0bKvl3fvG/PyNiv7O1Qg5hPr78A9JcVuZmaD/7NHpRtIj9T5lsnIjyFcocMGVDH+0mX80PDOWowKW3p4eH/t7OiIinjT6+0k5Jqnrb7er9ORCCdTZ1JeVI9s+WW3YJV4VS44Z6R0IqyZE/wUhe7M7QOPLCkROPKkNDEuEDbZyYGvdV0PJIdPCK0Ib8yETltTk57oNZxRXqUaFa3IZ9DpXVsotpjiG+JruvtjPWmnzuYbooEumP7IIiBD5MPxW1JcbICpkA4mHpdXZf5K38HhsMFZo06LXIvDLRy+KEaVD8qG25u88XhenQRn1NaPh7Iw== 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=YxYqLlXJwDglTN2OhR5UoatELjnUAf5TIH6f/O5wCko=; b=kqSZFlQ6nUMGdiJPQEpITknden7rMSMSU1Dj0Hb6xwuXSYEgI/QdlqsOjHYYVMoT/CEg7JJWNmKLVnS/hR0+amo4R4JH7+clKvTzT72Icr5XB7CDLvz4rUl/4cBzVOf9O+pkbZ1y3fFFhX/LrSgc+sT6NC2ouOyVtwUeYQsCdvo= 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:08 +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:08 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:05 +0800 Subject: [PATCH 12/18] clk: imx: imx8mn: add sai7_ipg_clk clock settings Message-Id: <20240504-imx-clk-v1-12-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 , Adrian Alonso X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=1071; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=WifVIscFAtMHZ5cUN2mG03VXL3S/wRmq7jI1v73ZwVg=; b=5FvM5/JTalpS4unY5OrfETZS34BRxaMB8xQ6pyddDQnNiMLCb2DpTiTuaoqk7Abjf6Hql9AfW KKeYrqoZ0CcBrcGIDGoGR5Vi9E0Fbtc+eCE7BeaQ6HtFuS7dmVnCJoN 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: e8147b7b-fa52-4384-37f9-08dc6bd30742 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?GCyW8xbvu5YKpVM2BrHfMotnMZn71Wh?= =?utf-8?q?yx2xjFI79yreCIOSaWpBidEb0PEc3pT9FZPja5I75MNyMzQU8HzOlhveZ7Nojnz3u?= =?utf-8?q?C9LHN5+zYQrWG7wRjq0H8GKfFEpPdi11M8XRAN4+5FWEBdiDXFBYuOYKURkaJqa3Z?= =?utf-8?q?e1ExGQ1oa5SMVmznHo0TUjGsCCkUI6EkvNzXmZ+DDAs1glFNZkV6o+k/u2+x5vMRN?= =?utf-8?q?hy1YQFryouXVrpDwyhTx1I35KhLT6/Xlez1Ij0jF/xhC4IyNqjL8/rEC1ZKYoGpI0?= =?utf-8?q?C9gN8+Fp1FyNNtqGDu2pOMGuHl0oEuGVg/K1EQt8P9GITWzRRpwQ22P/MR6t9MsbL?= =?utf-8?q?APEObSPoTpKkmppmXEkpdh5EuQpcvA6qb9Q23KlFjmDpjK72Oh+eCnYExPYFhnv4r?= =?utf-8?q?ToGEE0AoVYGt52etqQYfLxB8iqWfA+Sk6fNAfbXEb+M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utceEr6nDt0wH50qeEWqbThE=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?A+RkzkBLJhryzfVmFPoQfC+A4RVn?= =?utf-8?q?Nf5jXZQLa5aC644CTivycbvGYo/wgMW0KsM4lq6t8yS2Ynj/NhM69Ckqip3Qbgs8j?= =?utf-8?q?dLe5jmVhafk1l1zuUV+G08xAVwGGc0ZjerIWGpti7zSn8mc+BrY0XSP1dS0mn9CvX?= =?utf-8?q?S9/9tJrZEbKoxjxBzsF4AzqqvX8wjhn3CtxKmyLBATAOW66VBvluI4wwG2QFes7zF?= =?utf-8?q?0KB/7fmdWiS5swgNm7tVji9iuU5RtIwmytFGwWQYjBpy5HrmXhWwbYND21U2VhduU?= =?utf-8?q?7CyhVk3ByBiICu+QPAlk/WYKPJ6yHKMW1JJPpCLA1I0EKmx6TH8smjH3uxaZhsPAj?= =?utf-8?q?CIIjEEMYYHLnEodCYnUKd1ZqPaSNcAuk2qFT4t4VQQ4y0rcJPDyLTgxXxAUFFT9z4?= =?utf-8?q?fcJ0YRreu1YExmLP4Y3KuotF0iC8dnWLkTrqGWhjSHLtkRCVtzJpy4sxOft3QF/tH?= =?utf-8?q?2B7bFm544tMLUeXdpt83aKtHgs71UE3dYcUDVCSo+U1ToxCSOv7/AAnth+4OPQ58M?= =?utf-8?q?uTUU7P+2eW6ZiVXktJocxqdN2E532zUW9vlYX4AsX+V3h1QLQaVdHwXXwRjFwgGIp?= =?utf-8?q?QrFJsbv+g07YeRlJFxgTJDJV3J0FGkOk6hQHJWCAKvRVTqTGtJ4OhhKiqlNAHr2zR?= =?utf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1E?= =?utf-8?q?Lv0VXe0pqwD3?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8147b7b-fa52-4384-37f9-08dc6bd30742 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:08.4482 (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: IgU4kX8Si7zYME7fZLznUZUdNApnTOepqYDa5F1s4i+1QGG1utqJ1qPvBSNpCkk3HJPFlJr18/rRGN57Jccb4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Adrian Alonso Add IMX8MN_CLK_SAI7_IPG clock entry. Reviewed-by: Peng Fan Signed-off-by: Adrian Alonso Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 4bd1ed11353b..ab77e148e70c 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -583,6 +583,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_CLK_SDMA2_ROOT] = imx_clk_hw_gate4("sdma2_clk", "ipg_audio_root", base + 0x43b0, 0); hws[IMX8MN_CLK_SDMA3_ROOT] = imx_clk_hw_gate4("sdma3_clk", "ipg_audio_root", base + 0x45f0, 0); hws[IMX8MN_CLK_SAI7_ROOT] = imx_clk_hw_gate2_shared2("sai7_root_clk", "sai7", base + 0x4650, 0, &share_count_sai7); + hws[IMX8MN_CLK_SAI7_IPG] = imx_clk_hw_gate2_shared2("sai7_ipg_clk", "ipg_audio_root", base + 0x4650, 0, &share_count_sai7); hws[IMX8MN_CLK_GPT_3M] = imx_clk_hw_fixed_factor("gpt_3m", "osc_24m", 1, 8); From patchwork Sat May 4 00:49:06 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: 13653715 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2040.outbound.protection.outlook.com [40.107.105.40]) (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 74FE9224CC for ; Sat, 4 May 2024 00:42:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783338; cv=fail; b=JnWSB1JU3PPldZcWh3FVLSgGG3DvlovTVnKfTDSF9UNvTP4KqYCQVapDHCGgfKQLzR0hs+2YNNhh8hKttlAWGUM20863ZTKwJVLnhOvpfAcS+4FBmCY1alf/lB24+YCIpFRZqv2RZ1BchFPRnq6ldWNaAXe/K0ZXg4qJduW9dGA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783338; c=relaxed/simple; bh=PgxRlbUcS/uvOvhLhmHPrOfoWAYvLqu1YwJpsaINx8E=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=iCF4TMgAigYvPoclC+oZ2JNOJgMokeBT5Ja4QF6NACCgFo813KTSnaN1BnBaEvWNck4XMxadVJB7Vqpw5M4boHO6plIJiROCiwJJ4vMLExAT4vci4NNRyjhcMIK83uaTaTRgEFZbMTXNeWKjOvCM35CMt/SWuieuy7BZ7TVuYh8= 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=VcxhoruC; arc=fail smtp.client-ip=40.107.105.40 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="VcxhoruC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1Ks3ECTjYMTnzweWWRlaikmoYghMLWIEf+N8MD46xcAR/APlxGhm2FUQelgCHLaKQ3Z0ipA90IpWYz4KVBGEu1zQEkJW1bZ0iiL47ztqQPPm0ceDK38CyNO/lR4Q7Ut4MLd4Qf1/LKrVoG/FO2Py7S4+Ur0VAbJNdk+omFupeDOoehAxi5ZqvFbvfSNxJtEbn0ljO23CZdH96lf7XJL6qtqWyTp4NTc3kuD4ucreiXhyEhku5UrfdnRf0C1qzb/UC2NUsA3frv5rs6a+b5p2z8a7QPDLM1W831ACiX46bWkJLwsBjq0IBuN9rHCFvQ+gc/KC5iSS7moHIcKK32Pkg== 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=YZfg5qL7SHsnC+/O7PQKVa9Y6S4TDdYFXWK5DCJ1IFc=; b=eOKWbH9UGt+R19m4L2Oyujfo4GS1tHMXMEZB55jxHtqatvsKAGLTrEHfgLvBdsjN//g7k//WZCvJf7qLGFZt57KoHKGm/QsfbpP+3Deg3E1k5g9vo0HP6gVnLpZ5D7Fe10rLAciMtSEAdUeevognrEHeM6GdNAUxYNCVZJLdpj49Mo66ht2J8N4XIH7rSRZ/f5Oh9yVZAkKkt4onq8R3iTSmus0amkSa+3yX22s/rGlwTo2F7UXdb+KGaHKUWA+bXsLyIXjJZvH8V+Sf3uuediEAvFJ/VyKgMtQc9oVnTYdSVQBrZO3ziVUo/MjdXZtDtTlAoBVLwCl6Lvu79u16DA== 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=YZfg5qL7SHsnC+/O7PQKVa9Y6S4TDdYFXWK5DCJ1IFc=; b=VcxhoruCLxg/jYQmTHr61OIeVwt6cobcozo/eIYbWraG31E/bMqmhEuWGwpuVuLdM/3OFUlW4RI4y+x+dvSvNF6hLx3Pb/tXIsMXqlr1ssVxdHOb+enfaiUXi0FvoNuQIUoZJYtWNr+OAZETy+GQgxrQwLQxtEyhC4hrq1aTzdM= 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:13 +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:13 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:06 +0800 Subject: [PATCH 13/18] clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one Message-Id: <20240504-imx-clk-v1-13-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=1404; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=5nMT2IffGwQHQ4in9ZnMD+FiKPbKEz5YS4WgB7bC2HQ=; b=CYyctJuM/mW4+h45gNib7mfqtjltQsTMyUWJ11qBIJkXIytrSsraqPu72haAiZ0HqfcvS65tG HKAcO6y0C0dDQNRfDNCvaEROUOAvp4t6ZsiR1R9TU1GEG1U5wainfLy 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: 73011272-92ff-4272-6c7d-08dc6bd30a5d 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?Te2XCxbi3zi5aRMKIdOawHdF9n4hBZK?= =?utf-8?q?MWoIsaUYb0EH1kDLxb4rmfmO45wLl43pE52QOrG0hS5YiNGHR9hPEzUmxOh2BqZ2t?= =?utf-8?q?XQ+7aItcEbeWml2Gc/v0pf1sJIjjpDbiJCQNPU79EipDBN/po2GBP1ZDg+OShsNMC?= =?utf-8?q?NNFqcqk9abQ9DEg7IOkOv/RLdH3eaGiaNa+YP++a68xV6Bj3NLZKpBqKmeq749Vh8?= =?utf-8?q?pZH3jifMuQSPTAzwIzO6oFr3PlVBRLb/QVk/EjQKXII/XJmZ6oRH/2cqOdsMVYioe?= =?utf-8?q?IkfTFxaPu/OcwWRRHWP3YmAUcTRJy622RHPwRC8egCG7FAmGHixfmArw/IOdkWV73?= =?utf-8?q?7BCBiLQM6RiKO+yUVfPlZIwAd9yJhffTBGsZbGeSkOP0yCJqb5MXN/u2Rcw9LcRNz?= =?utf-8?q?xZs4MEKYo0g325SRPCY19nXGhXdsHHQPi5FcuX0ZsKSdebnIsQchd5Vfg9v7bs9ij?= =?utf-8?q?IGhme3r+fQhgBhzYHXtoSzVBGZyvTQlBzLVMlgpbx+jOpBhZlXQo7pwZNzntLSihV?= =?utf-8?q?CPzJS0cXPX+KfjQUIZ8EadaMlbKU4aShLeb127Xyoz4I2XaRq7/ONueHKK2BpzHhY?= =?utf-8?q?VPcsgO4RD5gp8ERGreg0SCktrDrZ8dayLlMxB0mr8NHBKG017r6c9q5ujzuGfp8qf?= =?utf-8?q?oqPDnwcs8ThBVuhrCqVERDi2u7Ofuxpgud6QKF9uOrJSgstOBVZA0pFtfMqYG02Ru?= =?utf-8?q?GjdNLq+mIpFxc1nrgherzzpQN4nrmRV3QQd+K0tOtfUbARKz9knXOZj2ISMU5eUn+?= =?utf-8?q?Xa6OZmPlnV230UjmG/ZLeaC60HCSFfP3OufuakSigywWevsutuUCiADrpxWWH3Zd0?= =?utf-8?q?KC6VnMHUbodUnPdJTWgmivejwRw1XZ6cWg9yDE0GHpjl2b/9poK5SsgYQIc8Yze8I?= =?utf-8?q?G48gO5TonyfhNYTWlSAznFuQH41vgblzM0ES/aRlYX1SU2TOhKPsnw1LPVuJhRafY?= =?utf-8?q?dYdr4yLoy+FZAB90wmXc4/IH8FNNFrTcuIu4wIhF2D7v0PNkNyK32hZNBjRCkweA/?= =?utf-8?q?SNRMtKSirGr7k1JWGfXne1Lej0j+cxEJVqjnn9SEOE00QCaqHanxmFWkDFQaWOuex?= =?utf-8?q?AzgiUclfuhJLe8Ot9Mpcv/f2trIOEirTxsj4gmHXyLbgvkIORlt8iudxMuthSZ7gv?= =?utf-8?q?idfFR7qvL/yhk2wZbwV5deCBXgY7ShEzWLVnnKRSI4cGfljFlp0vSrc70LZavWxWT?= =?utf-8?q?CsDWHSW8DcbNrl/TK6raUnsX8yZCzrcJ0K8q7eEZq5Jb7SRAHikBmpZrjLW+jTAVi?= =?utf-8?q?fTOYkSKJY4GDz6+ruPdwYYXn6v+IMM3BNCdq/7QjTlVd9dynYbUo6gmk=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?TJVkbWP3OO7YaOCj6ycWHtWDYa4i?= =?utf-8?q?MXMnp2Ug1tvVa267c88eKPy2xMW5jm++yaiBMcDoGNOOwOko1fRGLMGz8tQBMD+Ne?= =?utf-8?q?VENDpscBjaxcLQf0uWvS9wc0IVGqFdAxKA8jXg/2Hu67gzU8zkLwFC+5lOgxg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n6V?= =?utf-8?q?y/sBfWEyq76zXpNAZKWtvnr0WTiCRP3uZ2If5evrjSs57MAA58wjvbKi06+y8hgQ+?= =?utf-8?q?5eZPRu/gXlaWTnQNTPhvv2v4wGjew0DJNZ5pcb3BW0BAN8Zg08AfaD0/gInCaqRSA?= =?utf-8?q?Qf3I0PzCGA3D4kbr70Cm+0PBfIv7PYDsHtdR/b1nTdYYOOPBLvgaV7H/GUZPaCZ+O?= =?utf-8?q?OPAyJVJVDTq6ME3cSoWcX9TwHA2deO646h1HSXgNAwd4zeYnFWZOI+Kkipoww4Z1y?= =?utf-8?q?Z9Ce8FVtVzUx6BnDOuXlO8BzTG7neFpERctdqDnBjgnelGufL9yJlh00LA/EqCR5R?= =?utf-8?q?cLVr6MZ+9iYXv9rphj/kYnGyLtNGd1/c/wGz1hvYgpR1fJpfj+mKMusfD0YXOiIrW?= =?utf-8?q?KVvyrP09XMFu6GYcizMLY4BEozw7c91FP9dtxL/RO3Y0mYe5KWpCjk6XIZb6H407K?= =?utf-8?q?AqWaHjZJRcy7qhjzYNok6qkTuBVKwWr7qRBJ+LIyVs6kj5udLLpOyX3gw3rb1FuhQ?= =?utf-8?q?87g+v5odOgBb?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73011272-92ff-4272-6c7d-08dc6bd30a5d 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:13.6624 (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: HZqyPXUdNH0jIDPjzv86YEEHwWo3o2xyZtvNcK3mQ3ECjV1YbJfLMGEUiuIWtWlDMK2cKfHsGqVbx6v3ZBN98g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Jacky Bai The 'nand_usdhc_bus' clock is only need to be enabled when usdhc or nand module is active, so change it to non-critical clock type. Signed-off-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 075f643e3f35..342049b847b9 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -432,7 +432,7 @@ static int imx8mm_clocks_probe(struct platform_device *pdev) /* BUS */ hws[IMX8MM_CLK_MAIN_AXI] = imx8m_clk_hw_composite_bus_critical("main_axi", imx8mm_main_axi_sels, base + 0x8800); hws[IMX8MM_CLK_ENET_AXI] = imx8m_clk_hw_composite_bus("enet_axi", imx8mm_enet_axi_sels, base + 0x8880); - hws[IMX8MM_CLK_NAND_USDHC_BUS] = imx8m_clk_hw_composite_bus_critical("nand_usdhc_bus", imx8mm_nand_usdhc_sels, base + 0x8900); + hws[IMX8MM_CLK_NAND_USDHC_BUS] = imx8m_clk_hw_composite("nand_usdhc_bus", imx8mm_nand_usdhc_sels, base + 0x8900); hws[IMX8MM_CLK_VPU_BUS] = imx8m_clk_hw_composite_bus("vpu_bus", imx8mm_vpu_bus_sels, base + 0x8980); hws[IMX8MM_CLK_DISP_AXI] = imx8m_clk_hw_composite_bus("disp_axi", imx8mm_disp_axi_sels, base + 0x8a00); hws[IMX8MM_CLK_DISP_APB] = imx8m_clk_hw_composite_bus("disp_apb", imx8mm_disp_apb_sels, base + 0x8a80); From patchwork Sat May 4 00:49:07 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: 13653716 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2071.outbound.protection.outlook.com [40.107.105.71]) (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 5BFB0E545 for ; Sat, 4 May 2024 00:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783346; cv=fail; b=c7+9m1RssURyIFR6/Hx4MJ0eDUq0T2QgdfBl4vvETvtbBv0is0A27Te6WAGSI0kGfZVj+W6B/lZJFTTbFVO7QbFO12agHhMk24YnHcypZPC2FXGO3l2mfGPl1Oynr1Len2OjoXHK2jowLytPhKvLfxkKQc92VxB/FltJUmVLzSg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783346; c=relaxed/simple; bh=BXE8p0r/N9cwzw9hvSQemC+9EJkYUN9CqF+Rr+r1zUs=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=tR9nAn49CHFY1cvmvesxYZxHCNs9q6txYNwkIkjR1XdIF1RX2v9teMWHGaDaATgrqEaVwAmNHfPZt7dohXqnZZsUbARvpL6EvZv7gPBgUmiOYhS/UbYijuDaPxH+dYkb7h5x0bARXolWNa0N97Br1I8oVXsSXIjI31sNObOZ/8o= 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=TCR+q0xQ; arc=fail smtp.client-ip=40.107.105.71 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="TCR+q0xQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RMJh70j8v+JxbUDT4DWADIXQiHst/5kU+pFvUZWIwdXiElSWOD2CDRR9b5ElC/GZg1u8KlwXPW+JL/8W8Z74MFdAjUeBg+EeQ8JL2XEZbXfCKemoyUdNx0pg2MeYu8O9dqXpEJAzToMD/0yuy7vx5oUGVDqiTNdHRqx/0xgRByJ0Yc/ZhIDE9rNgtVePW2H8V4ehsfAK6d6J1xR3wiUHsjzfLRc289dM87xotoASuhbg+vkk7vtYGP8tQ1E1cIP/qy3JlNCEN2GsA6K3Q67qG8H6rlx08/hYZQe+3GKFi536c8qilqKaJ+H8rBC6/Jp8Tdd2QrYY/ktpXHKmvwB9yw== 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=jembaBdxFeQLoGQq8jEpWbT4U96f9uWnSv2yKKMqdjE=; b=Ub1xo60CDxyLwLRTvorteroJeqLDDqF55DAK/GtN2pSCTYkSiIPPLp3/0ocihZVVQllS1SstmLqJAPcxIZyd30tVynCn7IYgsD3gad7v2deSEuXqgn3tMo+z+ZETg3h7sOyveAYyDctiS8EdvmaCCzpc5qQZhSBYWNPJyeWfcdjF5x/lHkFE1kN9hk/WFCzZdu+AKvzrB5yxW+pjunc9dbEzqABUbMjs9d7KvqkEJ28BJFSXsMPi5JP6HbaXI80vF5NJXcAsHGloxgTG/m01VKmRuxc4R8tnzaWTkqN6MUXpVjMlkba486BEryG20wAN5KBMVA7JdX+8Zqkyy5Lzzg== 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=jembaBdxFeQLoGQq8jEpWbT4U96f9uWnSv2yKKMqdjE=; b=TCR+q0xQG3GmSs5mSmtj6oN6GAXeNJRafGMd5wj4tlnV4uucE0eRfCAzNv9ovZ9Q4v5vkqFbxITur0QrLvC3spl058Fky4+7Y93Awyi3x/RzzHVbITiExgFi37k4BuES4Fntornf99p3Ib/qb93Hj0UcMiaqtPUBQG2Ay45I7jU= 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:21 +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:19 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:07 +0800 Subject: [PATCH 14/18] clk: imx: imx8qxp: Add LVDS bypass clocks Message-Id: <20240504-imx-clk-v1-14-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 , Ranjani Vaidyanathan , "Oliver F. Brown" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=3946; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=UduvV+cQrI7InFFBa0tNN9NOOunIk8WRP1Hq2ak4H5Q=; b=oJkFQnbH5D8mssVtVdKyx2I0Is0kx0tcLJ17MN/7ouK08gpqyC7u6Hxf5xOODYxdvixwlY8Zm zs3yUvQYONVCDyTiGUDhEfyrTnHq3/17F6shgOMkw4vZ5bvsXpZQKpa 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: 25acf670-d556-4736-2b13-08dc6bd30dce 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?tcy0mfG/wCztMosAHZzCUoC+qC6u5qd?= =?utf-8?q?3/kWfk22YqI4ybR3+vdJd3uwqNCVgLNDSA/BVBH9QpFQIr5GBqN2LxRZIlwno4nLM?= =?utf-8?q?EUT9r9AEqZre6LmMC976pZ6wqMYIoE9PYxUmCNPgZy5jyTr3UtF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/IOS?= =?utf-8?q?AjC7C+XlsT3pD57QwxxPugKzh4RD55Wsub5eFM97xhbNG7vkopIwOiGWOxO3hreO4?= =?utf-8?q?dPQRwbU0b4XKGPR/jNsSK2tBoPzocwdLJmHHUL86A60+3HwefERYcu81Ba+bvdIcY?= =?utf-8?q?11YTxS0LYl1hm9xXNc8gAXC5lGmWtdzAgTs58aXOc8AtNEKf1nsAgQYR2ntCtB4xM?= =?utf-8?q?p5thP/JAJnq0+EWTL9ri3TtxjDjRQgHyDuvkFimxETSOqNRGa9yBe8IsS3ghAPKW8?= =?utf-8?q?a5L4etEWKK2Sc30Z59HpFXX0frrWuEv1crbhgq87a8IovJF5MI/2Ta14=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?DtxLAs/p2Tc0v4IHDDCsEjyoPxbx?= =?utf-8?q?HB4zE+/i+bMu+FPuZLhvu7uT/REtQezhPAusNbnuhDW8AHOmVg35QDxUiBpCwRYfU?= =?utf-8?q?W5f1Ds6wCgbNdvjd41bYcIzUPzJTmx0hKxbw7RpM7fWX/iD2hkT+hLpjr/6or+IxW?= =?utf-8?q?SphezIgss9mLa/ZXN/wwoCj1HEZnR1NPI0flvUAZYzVsqWgILTL48vUlQx0dHtuvb?= =?utf-8?q?JpdZSgkeujnBx0VI90gundmVfxIToKNka17kMAXlEMgmkUiApyLDpXMgJIHOUXqWC?= =?utf-8?q?0k9PTWgeFW8+MIgxuekLjhvgYwcH+4Y2OoYfwxnZPY1Gh+RiQTs3PNcKiTCtu28vW?= =?utf-8?q?bKbwA2AiC0ewNG0ndkJDUyxJaVw8CsQP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nyJKlU8K6u97fS59cIAcdr6D8wSMS?= =?utf-8?q?4VuYPuGhzeBwP2xDXjNjQm7SK8AEHgNStToxKwAvQVuA4/LkD7GCMizn8ygEdx4YY?= =?utf-8?q?QlTCUhDqV1sQeRYFxqeWsGmut4aBWvHwwhHbH0UEopHnsYTuovC4AsvQlPhEZccWF?= =?utf-8?q?BSbANWz0Wt5CcfITUHUvnivv0+f5keNenlgMgLRrIGsaJ0d7HeEe54oX97KKFt5IN?= =?utf-8?q?9O/TKHgEwIic993xE2ZstM6O6eeC7ByiUJp0fbB7ybVuoq7j/0S8X7TRCaFnMCadB?= =?utf-8?q?nk2pW2x3hwak?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25acf670-d556-4736-2b13-08dc6bd30dce 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:19.4468 (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: Nar6kjVz76042Qeht6jW9yLogXZJTDH0TrHNWUOxhkQ5iv3/auRDJFf1Q5sT/Wqt0sOVnFBSVw1V+RbYPCBxtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan For iMX8QXP and iMX8QM, add bypass clocks and register some of the LVDS clocks with imx_clk_scu2 as the parent needs to explicitly set. In order to make sure MIPI DSI works well after suspend/resume, the LVDS pixel and phy clocks must be initialized before the MIPI tx_esacpe and rx_escape clocks. LVDS phy, LVDS pixel, tx_escape, and rx_esacpe are all on the same MSLICE. They all share the same clock parent. So, setting the parent source or rate affects all of these clocks. In the LVDS use case the MIPI tx_escape and rx_escape are not saved and restored. So, LVDS works for either clock initialization order. For MIPI case, LVDS must be initialized first. Signed-off-by: Ranjani Vaidyanathan Signed-off-by: Oliver F. Brown Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8qxp.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index 7d8883916cac..a0654edaae83 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -71,7 +71,7 @@ static const char *const lvds0_sels[] = { "clk_dummy", "clk_dummy", "clk_dummy", - "mipi0_lvds_bypass_clk", + "lvds0_bypass_clk", }; static const char *const lvds1_sels[] = { @@ -79,7 +79,7 @@ static const char *const lvds1_sels[] = { "clk_dummy", "clk_dummy", "clk_dummy", - "mipi1_lvds_bypass_clk", + "lvds1_bypass_clk", }; static const char * const mipi_sels[] = { @@ -223,9 +223,9 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) /* MIPI-LVDS SS */ imx_clk_scu("mipi0_bypass_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_BYPASS); imx_clk_scu("mipi0_pixel_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PER); - imx_clk_scu("mipi0_lvds_bypass_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu2("mipi0_lvds_pixel_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC2); - imx_clk_scu2("mipi0_lvds_phy_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC3); + imx_clk_scu("lvds0_bypass_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_BYPASS); + imx_clk_scu2("lvds0_pixel_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC2); + imx_clk_scu2("lvds0_phy_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi0_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi0_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_SLV_BUS); imx_clk_scu2("mipi0_dsi_phy_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PHY); @@ -235,10 +235,9 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) imx_clk_scu("mipi1_bypass_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_BYPASS); imx_clk_scu("mipi1_pixel_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PER); - imx_clk_scu("mipi1_lvds_bypass_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu2("mipi1_lvds_pixel_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC2); - imx_clk_scu2("mipi1_lvds_phy_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC3); - + imx_clk_scu("lvds1_bypass_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_BYPASS); + imx_clk_scu2("lvds1_pixel_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC2); + imx_clk_scu2("lvds1_phy_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi1_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi1_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_SLV_BUS); imx_clk_scu2("mipi1_dsi_phy_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PHY); From patchwork Sat May 4 00:49:08 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: 13653717 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2083.outbound.protection.outlook.com [40.107.241.83]) (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 A948123768 for ; Sat, 4 May 2024 00:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783350; cv=fail; b=Uz4zQx6e9ax5oC0j581FbPaTwuK5W+a9q5JdEi1TIGhCvMZ14jqxUkzIwtglOsk+SKOJaevQDX/9INiQ8KKNBpnR9yqqJViGvk373hlGYs2ijPxWV+iiOL1qtdn0yAMyqPjoLfmZTOpC8dZSGHub+Z5UjWs+Y76unhHMKW13lbs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783350; c=relaxed/simple; bh=ol6T1q1Aq60j4vSh/rwMrCMDOxf8jPJ9kodS4MqsQqw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=GXz17N4VdmSHie5J1lg8WnD+xSdcwixzYQYLETpJHTWR32x6k/ekh97/a999zeZcImNBMp27DD0ict6xoHibcTF1nPZ2CjAOdv28yJ9wvu9tnqvlKjAgKlr/AE0eTfA2fnNX8W8NT2/uJSHLtQcn+ARuMsoYGkDbNWu14CS+OzA= 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=frZD/TGi; arc=fail smtp.client-ip=40.107.241.83 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="frZD/TGi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CEM4Cr6Bc7i/vGY7ZKza3LgfoFBp0QOLd1JC74EjjLLRokTAuYCTrw+srckPmdIJd5uS83ne63aCwKvbwUeS1H8lEmtnm0SU/Qhvylws1w8R+79/aPxW27RwGFvTWXJJWUxlVTqTLdl2v70iavVgyWBv6xrzxJXTTrJk/enwhd45wLkDbdVx+GKbDoQ5ZByrjt8L5Ag5gErGYv5CT++ZcRcqT6n/eEaanNXWJVDj42Aq3tmgHIUko/AoXc0mUN8Ff+VqOSn7ZRMCwK1C1CsG0nitOFihwl7yKcxhs8OrmvcACFFVhtGAFtAShsWgxU9nLNv6okor/4hJEY2m/fmSSg== 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=haZ6P9kChEQ6LyhfR+Vw1ypeLFvLrcIo+nuKLMbxpNM=; b=T5GXRI6eNaKKLGeS9WZkc8Tk4t7r5n1dli8RLbZoFm52pyrhs96VCz/we68qbD2qRU6D6g5zWXK2LoYZU8gjBBkJ7VRgr5ElhIjec/t/3YC5sdwYj1aerZyo19OGyIanc7Q6CKT67Z1t5Ny5jbsg7Pzlz7eMtXpKp3tVJk233ayEVQcDIx0OGLl9w4gU7zJ9CdjJeOLcKxdzPHMlk7vdTthUVtsqrl1THebwbTZjlJ2pL9rpMVOgNhXuBM8o+c9FfZYmLh/onHDsPmCfu+K+sgNdF4Pz1mWXy4BOsqJJI1XjP1In8kNFdTT0Ik4UU0Gt7ZvDnWcHhr7k1dyRI9ESHQ== 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=haZ6P9kChEQ6LyhfR+Vw1ypeLFvLrcIo+nuKLMbxpNM=; b=frZD/TGiuzwiq3aN0xaU0zjbB3ugSZ31ODIeHGWqZT7GQ95vXI3uUD61D9fmH/NtpOJpyZBnIFrdMGpS3vM7EBHiQt38hxomx5ZVSIhd8NIax1XUge+LhHpHYLgUxuTop2Ans0QcYgCBmTP02MwwHPSf/o3JLPgryIy3AUnyz18= 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:25 +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:25 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:08 +0800 Subject: [PATCH 15/18] clk: imx: imx8qxp: Add clock muxes for MIPI and PHY ref clocks Message-Id: <20240504-imx-clk-v1-15-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 , "Oliver F. Brown" , Robert Chiras X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=4040; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=xxTNiTDPAbopWXYDXxGIv8y1Vyhx+iZ9rQ5/X96xIkk=; b=JJSHcmBw8XDB5MX/ios8PYv/EvtlP3n4PTHts5VwJMwJ97hDXOl7s/xqcSsk1r8EKnW7jYjcs hePASN+FnMLDd5+ki7FywzF6SSf3/U6mn6WU0l0moyrRS7yfZznil0j 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: de741c9a-ba1c-4e14-b4be-08dc6bd31140 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?7WZAJ3k3C+Rpl9DCUGc/hFlTmOejQjZ?= =?utf-8?q?FVGDAdLytTPzmLwn8smgKV6iDDAClqCcLqC0DmFT1pH8gRzgrhIJ+T8fec0pif2/q?= =?utf-8?q?njtjfwkDkVF6S9mDQdjvwXGsQPTsEcBhyGva0cnz3yyWqQrHwxsiFuTk8wruNWh6n?= =?utf-8?q?Uh6QbN0Mw2+L9fdnNJKh8jGiIZJdEFe2cfGQbjc7SbjhEl1JUowGbz9eARW9vkdAY?= =?utf-8?q?enDDPxwNOkOFrDRwyXqQWxQupIBAhfyEj3GY4T7eJEU/JEeRWNFDkd8HZFjEim/9J?= =?utf-8?q?ic5fCmZ1DsY/MVWHKcuh1AV1Vk1J09ke/MPyHc/X61OEnblKeBgllXf6c8T3p3fEG?= =?utf-8?q?TKVtS+GASxBKzpiS5TuAwVjSUQRi5fZCoNofryS71CYpoAma3izWFUR3v+xbBh2MD?= =?utf-8?q?1kOLnwnzl77RYcN3twiFg9eBLK/6C85b9uVJogOmWMkZD8KDGhn5fmJHT9tNxeo6j?= =?utf-8?q?wf+uM4zbt0JNz5DTEv/XQmQV7gVs3qYFdqjZ3J/zhN8osHg1/1ZO1j+8Vwuifa/oh?= =?utf-8?q?vTGP6cbkZv57bfzlnUg52DBZyxhDHUef2VRTJNAaDUx3muQML/V759oRQeunpBEW/?= =?utf-8?q?0Atg9tkkPjXs9piqM4aj4ZmX6y4Oxy6yroE+ZceokIw4ei3Orp2WFuewRJ4Ikf9T5?= =?utf-8?q?p3vKoPUEsE+h8usRLOAzMNfYfh0QI7KuPE0AYDRqN9aFHanufye/R6xLpD31keWCD?= =?utf-8?q?znD28pUNTtYHUhU7VJl0FIru8Kn6KQFXIshlwpfLDO7Wy9HLQmQh3TXhD0TQi36Lr?= =?utf-8?q?QDZnIniwipEEbHZ5mxMuliU4XlTe3JZshOBR46hEfw3WUzTGg/d19C5fyuwgwrVNe?= =?utf-8?q?19R3XJB918rEdwDES22Lah+d2mL1w2CFBe2gPSEkiMg3aXSx+JDdCaf9VPtNifw09?= =?utf-8?q?ci3Z6ELSC0BYaqxDtDRK4XaqY/fFuV69UG8JukNoSW1bLKoHhrfN2dJsVQKZtbjwA?= =?utf-8?q?Ey2bAtzNJZfRgzfpZ13aD9wphFLRqDmS5WiKRKDL8P6MsDe1L24DYRMSMZl3/Ym8y?= =?utf-8?q?gWZ+L/UkehNJ/1N9V3y2baEc9skmKONIJ1oIVUqrLr+xGCK7XnACIvPox3hl0ZPZm?= =?utf-8?q?9KSDc1Q16f+GD4Jd70eU2pOZLIf6PmU5K2bqxoufHN3XwRoUkIm7nYpj2HnEqvt+z?= =?utf-8?q?uH2Oy9hTJiQ6zKqTDDlkSIlXUWoCrQ6U5oImC3FLIUyFsrV9NthiHNqjknmZDWxgn?= =?utf-8?q?KLu7JmDmScZCLhWYDMAuIPRQVus2oZ6cUNuk3P6Aih3fE/GwNjlWvePmITXp2Sqav?= =?utf-8?q?/GkuDpfpp/j6NWZSPvxijlcwVMt7M6PpG7jK62QVhP5wSLIYxjB1b2gU=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?UYySMzeIfFkZwLphG2gyDJ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x?= =?utf-8?q?F8bOygMQibdLh9Emp8piVzjhDtHW/D70vuUaIMJMuUDrAPZ9CMxsE9EmLiKQBNEv2?= =?utf-8?q?4+SOm+Os89QdFXwIizG89NP7pP/GzW2EJs3zHBf0H8W+Utng4MznUTCQa7rUkkn5T?= =?utf-8?q?nWqPJbHr7HOlJTY8j/dGs5Z5N6bF7AjM34T79FZZsGqVwPnZ4y/x1m9MUqFZRLWhr?= =?utf-8?q?LQfnA3znZOPmi1OYTKOoZ0SWOCqIbn0vR6ROm5HxA7zRPqDC8ixUEE13+qEJp0Xip?= =?utf-8?q?oy4zgkHqT+D2s3XBsobhp/qQI3XJDs/+rfP4NOtPDHCP/B/mh5ldnFdxt+q+gUjS2?= =?utf-8?q?38Bmnkif4Pe9K1t/Tq+zBfVBnwXDDHWRCwDTFk1noQHEDv2WWNGHzP2V59/QMXAOq?= =?utf-8?q?f87R4BuWB2h4t2CBBfFfCfMyBHvne66gPTFcAyjH4gtt3CMcs52flhzi4k1XF+Log?= =?utf-8?q?6ES5LI/fc3et1BUaqDWJhcM0TgQXqg+LQM02qw94L5Hy1E/W5syA/agP2cEHPaiRM?= =?utf-8?q?bbbkhe1fEY5S+mdgept+pQ0C9KpnKzkwFmAbDD3P7SqUEc7m87TdFamEArBKN/oy5?= =?utf-8?q?UzNZt9vtvFYa09GGNS0AcCofmjFYvjpdtQ1PZ3wa9IRKb2Hwyv9rWovnKxOZv8iUU?= =?utf-8?q?2zdmDDM4vqP1?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: de741c9a-ba1c-4e14-b4be-08dc6bd31140 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:25.2170 (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: jGFJ8EkBmYcvRM4GC08jopv3Ene8fvFiEhzeFdyVX1vie9WnWBa56OXB6J0BABJfUoEIVV4pkTSXb0V9nJJBAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: "Oliver F. Brown" The MIPI Pixel and PHY Reference can use the bypass clock as a source. The MIPI bypass clock is the Pixel clock from the Display controller via the pixel link. Using the pixel clock for the PHY reference allows the MIPI bit clock match the pixel rate exactly. The MIPI pixel clock is currently set to be source from the bypass clock in the SCFW. This patch allows the pixel clock parent to be set by the kernel in the event that the SCFW default clock parent may change in the future. Signed-off-by: Oliver F. Brown Signed-off-by: Robert Chiras Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8qxp.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index a0654edaae83..fe6509be6ce9 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -90,6 +90,22 @@ static const char * const mipi_sels[] = { "clk_dummy", }; +static const char * const mipi0_phy_sels[] = { + "clk_dummy", + "clk_dummy", + "mipi_pll_div2_clk", + "clk_dummy", + "mipi0_bypass_clk", +}; + +static const char * const mipi1_phy_sels[] = { + "clk_dummy", + "clk_dummy", + "mipi_pll_div2_clk", + "clk_dummy", + "mipi1_bypass_clk", +}; + static const char * const lcd_sels[] = { "clk_dummy", "clk_dummy", @@ -222,25 +238,25 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) /* MIPI-LVDS SS */ imx_clk_scu("mipi0_bypass_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu("mipi0_pixel_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PER); + imx_clk_scu2("mipi0_pixel_clk", mipi0_phy_sels, ARRAY_SIZE(mipi0_phy_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PER); imx_clk_scu("lvds0_bypass_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_BYPASS); imx_clk_scu2("lvds0_pixel_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC2); imx_clk_scu2("lvds0_phy_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi0_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi0_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_SLV_BUS); - imx_clk_scu2("mipi0_dsi_phy_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PHY); + imx_clk_scu2("mipi0_dsi_phy_clk", mipi0_phy_sels, ARRAY_SIZE(mipi0_phy_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PHY); imx_clk_scu("mipi0_i2c0_clk", IMX_SC_R_MIPI_0_I2C_0, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi0_i2c1_clk", IMX_SC_R_MIPI_0_I2C_1, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi0_pwm0_clk", IMX_SC_R_MIPI_0_PWM_0, IMX_SC_PM_CLK_PER); imx_clk_scu("mipi1_bypass_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu("mipi1_pixel_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PER); + imx_clk_scu2("mipi1_pixel_clk", mipi1_phy_sels, ARRAY_SIZE(mipi1_phy_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PER); imx_clk_scu("lvds1_bypass_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_BYPASS); imx_clk_scu2("lvds1_pixel_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC2); imx_clk_scu2("lvds1_phy_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi1_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi1_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_SLV_BUS); - imx_clk_scu2("mipi1_dsi_phy_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PHY); + imx_clk_scu2("mipi1_dsi_phy_clk", mipi1_phy_sels, ARRAY_SIZE(mipi1_phy_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PHY); imx_clk_scu("mipi1_i2c0_clk", IMX_SC_R_MIPI_1_I2C_0, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi1_i2c1_clk", IMX_SC_R_MIPI_1_I2C_1, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi1_pwm0_clk", IMX_SC_R_MIPI_1_PWM_0, IMX_SC_PM_CLK_PER); From patchwork Sat May 4 00:49:09 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: 13653718 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2072.outbound.protection.outlook.com [40.107.105.72]) (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 06E9E29D05 for ; Sat, 4 May 2024 00:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783354; cv=fail; b=FhlwAfuFGfl5xNQCmrXzyfTQI+xl14RMPntXfXBNQkCSWt7eCuZI/JtQFS1E3CkM79t+WlFyu/2T3W1Ux3vyCt4uS72VVHvD7Z/jfVRiRM74e9dUHu59py4rVmDnIiTwhkXfz2QYmlIXMX1mlatGFQK5vUm94NZWlspdTP/qlQ8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783354; c=relaxed/simple; bh=8W0rPna3emTHoikPkLr5ePnGBoEpKuE0aOZ8ALmooP8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mRwyVXD7s/hbCDLnhukqA8drlM/cxIsOCtORZ/r7q8O4aDzzeNAGhSU0FP0UjPCaqz7nY27o4gMX/Ijm+jEvdigByDpXIo2LpcUE34wjU1gkYHKnYSlS1cMaIGW7jFZdPNr894EsU33nThRvQDpwebL0XvjLVuwA+TN4emVSOTk= 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=AOV72KuG; arc=fail smtp.client-ip=40.107.105.72 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="AOV72KuG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e501sz2eIl5leBC79ejLIRJAA6iMBdzd8z5D9uVSS2yzDggxjD7mC9nDvrwQG7u4LBT3IgIL/yECMzx0OKZEuWb9DEH9Prf3h99Q8sNqJ6l5q49WxA/12tyIe+FWWiT1HFnPyBgsZoPKk5BfbeqlB8VqwE97UyLKQMoZ8bgJVik0VlVQDrYWtnHp4LKkmE4xv9JkC7TTPWnkfdHcSWBgvd3Pppy43BsIfrPrWqpTaq31Lqjw7QiZG5ZeY1UpxH/5N3ZdbjgI0j3fVnAKjlKS81uG9nBrjSiyEGhD2wpZE/F0HrFQZBRH8ocCD0IrcKaQvJG/wqKRzrmoVxg1XcVnsQ== 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=MY/GT1ELAKVfVDNbLWCrDVrGzIpKnzihRrdLfAvUxdE=; b=ZIYfYvKtMRiGE5NSKpHgDlyqOCGAd26S7RQttfGHXIEkUoG+2znbo2HjrLzavUE2VGrFkUGcxtFKmBxV/zw8YCnwrqIbwQ4FoNd43yTxWjlcX6mUCCwd/PgNO1kwFGRPwl6cUAc/4t40828RaRwUPOhkFDHho//LPGd4NyoJdU1Dfls1rx6TUxjj3ZHNBYeDmGpdumfWvE2dF8c6mN9EMdfmtmZgX/M1aZlcpJiOsOpg8c9E2Oq9lSWGW/B0xQjIMVghFxvgjRf4ipFc5OTAYS3dfVngJ+LpKEf3wvCRuBoEN2LCPQowqWm1Y6eSHwIcZMfG6ONfeepWNIuxwoKSRw== 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=MY/GT1ELAKVfVDNbLWCrDVrGzIpKnzihRrdLfAvUxdE=; b=AOV72KuGu5sQcepe45W3s6KbkkwsycMHKdow8W75Ug6KISIk0xeLYBIM2b8bSCWzyODN2RicAYm5RYXaZtVbMhJwimdcRt6XVhjH5IDynhJygvBMqJY0sm1+fkypcZEo7VJ2/ttTd35JNamMY1yT7wS6bXQa017vDQPrjywZj2g= 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:30 +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:30 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:09 +0800 Subject: [PATCH 16/18] clk: imx: imx8qxp: Register dc0_bypass0_clk before disp clk Message-Id: <20240504-imx-clk-v1-16-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=1742; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=/aYZoW8KghW9QdRWN1taneDgZ0S6szdiimpOLxZFTlY=; b=I2PAvJycJ/bjyRVAVDrUO1WLesPoitmd6g5cS04kcV86ET5ADyrAvnSvkDrAMpOLbJRt29A+u Nye4A+VO3hwB3S/cZVPyeDLdJAFHAZQlNHdMpTGiQznYdeLxo9Bald6 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: 723a506e-33b1-4657-7088-08dc6bd31462 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?9dDiCGbrCgN8EsiF79k9EfULFUwmXv/?= =?utf-8?q?G4nxjwSXGL1ISGzo1uRwjjau10iwKapayjnhjWPTYTnYOIYL50FEmMsYXlAiieyhe?= =?utf-8?q?GtwoqEA314/3T0Z7BDvoLSG/DJOATj8haL43rbD82WkaVUOSJceT7RCTxNlCB3iHa?= =?utf-8?q?OPLMcX0h3bPT9pLk0CNfBsEMSHti5TS8Ky7UvkvF1jZX9SEve6TbY7Gu+JcRZK+iy?= =?utf-8?q?k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?q?TdDl9FGkKqe/tv1xG1TvvrrAUpwxF7majWtSn758sqJQGaFe7nAB5l6GGoepHLVAl?= =?utf-8?q?jNvfsif/oMXjLu3DHtdU8axW/PJawKXoCqcr0F4wnfYPSELZ51KpiTWrt8ESt3eHg?= =?utf-8?q?87QvbMkpBi/E8BzMtnQIF9RxSlDH6VDC8eoMp3wXfwjsyuNdIIWq8i1i7EueDQu7u?= =?utf-8?q?tUISPzE/PelJ9d79+AtGICsFwOuxX6GrjeWu0E780tYs8pk7KfJ2x7No=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?ahXUlTKkUxHFQ/3WgysQp4HtK+Y/?= =?utf-8?q?lR26LbveqjVzxeLn2EPJbewDQv8vxdglXtU5a2s7QYadmzdH7/Qzsi/LsFsWhB0va?= =?utf-8?q?CPwMSzdNERuan9eaebKrJ7ciFEEMNjUTAEZ2/To5c+IsTgHKU5gTUEXIbPQiTxLFM?= =?utf-8?q?e1aGLBSJ8czzN04dIbpjwlLPnYPVm1rTWH9rxUmzA6glZ1kfr3PwLcUdIk52zlmxm?= =?utf-8?q?/SV+WNjr5qG2XYF6W+ZNreSVEyTb96m1kiQ2Ba+leJXGuMJ6dDAoWVEbgVMPj1WeG?= =?utf-8?q?2kvnozruKVEc8Jbbzt9vqtGJsxP2aumnDde71z/ax9uEx/PwW0H2Hw+WuzPs9Alck?= =?utf-8?q?afIFlFlehFf8rxcTmWw0lQWL/IC/+QxhhxthG/yw0a4lTf+2oUEPCUACzhxo4U+1q?= =?utf-8?q?q9hARlbVA0aaxovV5jr+agtT3Du19fBXaeFJP6zgw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T8Y4j/bUGW3I/g7kz7H6fOR+Io?= =?utf-8?q?d/rVIAISPFDtovsC+ERxdeqFHxpZz+M64Lkr9RiReCTFFVIG8tjlTTpj9O3pw3eum?= =?utf-8?q?HHNDn8BFPgIJ31PqnXukJG0j5rxYznFFuZtOxUkxKhOudBH+MKEWuVHoQpcAqZRmc?= =?utf-8?q?Cu96GWSKJZLyONlv2fRvxuPMCf0bsCkhDZtGGdhDXb5V1Dr9UxjHPIuruoVLc1roR?= =?utf-8?q?4QtoIsxQYvQP?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 723a506e-33b1-4657-7088-08dc6bd31462 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:30.4795 (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: bH+ysRg43OdovznWPi6heHw8VDBg4jddvD7zAfNGYr6BsPzVJ9DBPwNRClDzytYrIjXWOPeZJvMiEftXFEZcpg== 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: 91e916771de0 ("clk: imx: scu: remove legacy scu clock binding support") Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8qxp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index fe6509be6ce9..47f4ceab1179 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -222,11 +222,11 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) imx_clk_scu("usb3_lpm_div", IMX_SC_R_USB_2, IMX_SC_PM_CLK_MISC); /* Display controller SS */ - imx_clk_scu2("dc0_disp0_clk", dc0_sels, ARRAY_SIZE(dc0_sels), IMX_SC_R_DC_0, IMX_SC_PM_CLK_MISC0); - 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_pll0_clk", IMX_SC_R_DC_0_PLL_0, IMX_SC_PM_CLK_PLL); imx_clk_scu("dc0_pll1_clk", IMX_SC_R_DC_0_PLL_1, IMX_SC_PM_CLK_PLL); imx_clk_scu("dc0_bypass0_clk", IMX_SC_R_DC_0_VIDEO0, IMX_SC_PM_CLK_BYPASS); + imx_clk_scu2("dc0_disp0_clk", dc0_sels, ARRAY_SIZE(dc0_sels), IMX_SC_R_DC_0, IMX_SC_PM_CLK_MISC0); + 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); 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?jMyodlD6zG578bkVUNp82upwi/79ZelYjT3818pv2wJC4Dhlvg19L0hLwjZ8yjJQM?= =?utf-8?q?rB+4VFeNG2pr8ZO/C3dBbquAR8vEZGxXJ0HBOYW8vMCMCe2HmAZzpaQGQGL91Hw4e?= =?utf-8?q?PoyLTKcvord7+Nz1j3i6xM3bO79hz4pAwq9psmPj2KVGJJC0if5M6uxLhp9mH9eTl?= =?utf-8?q?zk6r1E1gEhzFvrt6vccL1sbKWLWyD4GU1ydE1ApWJHXr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JcKdO8XuhvVT?= =?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+TNe0YpNUeKZl?= =?utf-8?q?DdySQ3mxiXQLvRnZMCc0+2cxgg+KGpo8NqbOWHTvBLwwmg0CtIV5S9KKWuB8oR5od?= =?utf-8?q?xiVkXAV78iixcNqc2o0dcMztsdO6G/wEGpQNP4UoFHcGiEk1YupkNFuMdHFB2VGB3?= =?utf-8?q?tHUthbQAcch7EpVus/+7SmlF1V4T59FATJ33188aF7GE29/S5fBUdcZul4i6sqADe?= =?utf-8?q?naIymioXbZBdqP34W0NfALZ/a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V/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 */ From patchwork Sat May 4 00:49:11 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: 13653720 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2048.outbound.protection.outlook.com [40.107.241.48]) (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 5FCA236120 for ; Sat, 4 May 2024 00:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783365; cv=fail; b=Ih/54pmdAO0kqSfLtR7IgvXBzV8t528N0+WnVAtbjR2DB/mrfWQG+5wZHOk0K5M//bB3Gl6Lh/7GMbsHvnkjG/BLQ5mJcH/aL/IRslAMO3QV4jRIo/b9UrOlzIp1P0z3P4/XqJ3Ivgazf6kWEnbS3H+8PfNBOmumF+gTdtIrNfc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783365; c=relaxed/simple; bh=LIgsjKhvPsQ/Wke1XoRmOQwn3YqqnKKetqjIr+h1Gx8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=q4aZp21yR25pV/FxcRCEMw9Qq+UGmfOxab4QvdxeateUGiOmbF8tRMr7uEeuPP7lxg6w0KMLqI0toNu6hFnCHDLZgAbQXrUUrUcz9LKQLnyoH2vH2qkjkavuBvD3FClEJw1ca4ZTSOORsGAw6zPuORyf03kpYodcjbBLxoh/XLk= 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=Wi+r8wpg; arc=fail smtp.client-ip=40.107.241.48 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="Wi+r8wpg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EeDPgVInByo1Kt1omSGcmVDy3feVfm8uwnA3uVmUaDiBpymlePwQD31evVj19FIN/gLEGi9kRW9CHsRuK70f4AFl79auVqUTABL47++QFFrK+Y96KMG8DTp86Mlih1lnpCaTAeg4kIiBQW6AlODm5xu8Gaz59p/V2p36lA/wdLuiMnuBf3+DOcPH7KIBYYe7OniNrSIOjfElBRPufF7d8LWeBiOqHlfap0o11X9fjPgc8o6F1K4SnnMh4bo1HI3rZ0a7SAvyqzBntRG/nnQSI32sgsxJj1W/iOOOJKPTP5oRvyP8zcKMUuEV4A3df+LSMSS9XiVz1j52VjYaJaDIKw== 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=4Xbc0TOfAlS9LPLGccHITUNQDuUBFJQrLHuLiwGMTuY=; b=NN8bnQYlj8CI1LK8+W5ewv0tvKHGpKvWzzjEZxeuDjFP2jn8iNFDgWoQolyrrB7GTGNpp32wHOwuYNqQyn0NNC4Ow2eA8s6OEZin/oK+APT2CyTYUaUmOnSMtrfJdpXiMMbRH+SmQYOhWXwmDlhX0gjj0khT5xzbCyKyo6xmL3YKx/6Oxkk/IcxErqzIU/Jmd+MSRorH/MFHdI+ZkUnJGK7rGJMtiKu8nTyggbtqcpeGfMnOM1rcOC5YhalxTNXy1Z1Vmo7QSEwEvbgf0GoWHwj8zT7qo5Sekll5KzLKjbKJVauiXx3MfBC9w37QghdqL2r48mEjKJIEh8HGtx98+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=4Xbc0TOfAlS9LPLGccHITUNQDuUBFJQrLHuLiwGMTuY=; b=Wi+r8wpgP74N/JgpyYbmyNtIDt0/fZ6yGhUgfayxVoYA5dcSkLY1YT4tN/ICQrG8P/+x/oAFCDaGNUgW5zyCxkSYHc5m16BurpgyhssBnhOJ92vhF14qWutKoq9AmuuzAsDwOnVjzQjRZcptsJ1c3L8SYmBagSu687mbowUlklU= 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:41 +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:41 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:11 +0800 Subject: [PATCH 18/18] clk: imx: fracn-gppll: update rate table Message-Id: <20240504-imx-clk-v1-18-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=1217; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=fgOtqAw+FraHuW4UTB8xhgz6F79BoqMSj9Ycinx3ytQ=; b=f3yGykR8lw1s2EBBnPv8EP31A12zCQmkBmhkVnqJuXsunIHjVrGOIcT5vibeKJdYfDptNSjKy viFxsPCZd+dAmQlcb34HIczuA05kIbDFNlj9YSPM94Z4er2mq6mSmWN 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: a2ddcd43-5408-4e08-9417-08dc6bd31aa1 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?VSCtQ3PT4dwAigytBxzfz6RRRW/hj8P?= =?utf-8?q?pcYP/3eZd5OEnzQR54o4BcBOjSxOnksVPN2kvQBlGYHx54dpWL25skgVfnHMkCR29?= =?utf-8?q?WgQ1EZjGQYWK2l+dpxEq9on1EgLic5uMWhJDoex8QmG7CH+4Xnp7CmM3ROLTvskBe?= =?utf-8?q?s+hq89fI82cG+f3TphvCEc7iAFHsxzhrBwzw8BQMt5R1HlFQW65jV6tHxbgvQSpDN?= =?utf-8?q?AalXbilVWwoiHqFKmjZEAzRItvMnhPVNWeJEpo1fL7n8EzBZ6YW/K9KpMA/tir2Re?= =?utf-8?q?vYnyDVsAH4PQ1NRBAatabNQVfKNb0lvPuAXWirtGHI5OpINsyaM/30nkVxgs489OK?= =?utf-8?q?6H5EYssvtobhw/iVeIlNQ941aD6PAOYvHxuWvKXnzNkVxJ7zeDBg0c0KpZPcI7x9z?= =?utf-8?q?ArZJi+vU7gmXLkRQXWhEgcYAGxO5vIoDEaX3AxIqRhLgkFzx+rvJeuHvbIFjGpPFd?= =?utf-8?q?4MmlCx0/IEw3lWHt6NDqPhb3jnqKccSvo9oD2qF++I1+Uz0wr4LzQRkYk/vBFodcD?= =?utf-8?q?QU8hY9fWc6zV6cgJTnY/3MWuGE1axaWV+mLpJz50dgkFLOT8QNLl8zxH6uGKU73P3?= =?utf-8?q?H9EiLIwRxQPNgH3lU7ihN85ZNa7HVtV1j0Xqaeis1VaWNACVyB4ikLKPIRIOn6l9e?= =?utf-8?q?SC5HXQfmkJNPF0mcH7QM5CO/+eRU1krparnjdg6DSu91BTLepiteP47Uzfy3vAajE?= =?utf-8?q?/z4wznJ06HhMh6IO1GExrU1Oo5K/tLs7ddSTu0XLpT2Z73i6jvfVkZTTbj4288ecj?= =?utf-8?q?h9clFh2E2ngAzj6QqaPRdbWfgHLIPSayyAn+8Jh9tnBJQCUNERnZyVdH0XkIoL3L2?= =?utf-8?q?l7pRtccfrjIy/8h6DFFHi6ES1uHOSbGWuwLFJobSymxiC+OHJjfiA+cHJDMgB2tb7?= =?utf-8?q?lJFHrh3sfnt9QzMafSDiCakCOl/gCVbbaMz1dRWH7odUstEP2jf4BJNxgqO9Zgrnz?= =?utf-8?q?eEdQE0+E3o2Q+sXu+CoqM5ETzQtd8LfI+YAaHrxWStZISs+FljisltbdxFUAHE1XB?= =?utf-8?q?PJ/aLGlG9Yt9ryxawCD/gR/r89JFz1mCn0xV9TwQmm6de42izWV8gXb4FBaL2bEt6?= =?utf-8?q?0k8qMjWiLFTcNspkkibT/EcP0ZiXhcMu420gfJKVNJ0/F4XlLlArxZMpDvCLvTQMH?= =?utf-8?q?nUycg24L9OYxZw6dH9fwPJEY2kbuXK1ooTdt3EltL5m6yQFNpGPyJ0PMoxXJih8tV?= =?utf-8?q?cfDPkrkp0CK7kfi2lV1u4GXTns4pGWeTiJr1t0RNr4+1uruJQKTvL/HzUkoM+wUC5?= =?utf-8?q?NuOCmlvXZ+B9J6rXf49Q1zP2Mytdb29l3l7HbedNI9me1JdEuUnqY3wA=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?Q0BmJTPz3x4ymEe3nO0PhwOtRkgB?= =?utf-8?q?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= =?utf-8?q?PMm61PMzCf/tJDejimlpaXFY0PyTp0Js4ZFgm8ieewOpP2OQRGHumaRifsvW+FxY5?= =?utf-8?q?0sfRCYwDmVuTi6rISOImciSwfhmHcpkCiSJatlgsDowjY10EufI7IWB+Ozf7XJHYw?= =?utf-8?q?Yuu8HNP4QdlD+L8DyLZw47nFXahZIAj2VD6b568P3rFSgRuVQXG935437QiZql4z8?= =?utf-8?q?NrQAOK1LPP07HHkXyDCDeWllvzzrqxLo0DptAPbsZRLY+Z8ccDnPkrvPGVIdFnaGZ?= =?utf-8?q?NO55t8TXZvUXPM1qcRVLYtJLUviLkl/UO49AJX/wyv21ZRRgYJaVNfFZ7BNfqasZt?= =?utf-8?q?NI8kN78p/sja2ScW0EkHe1fdc8U9ztd8KdteAdCaHbNkiqMMJFBmp7Iquvdxc20QC?= =?utf-8?q?bnROwF3vPYGBiYKK3YMB9weHoGTMntBYnf4I72oACB146EDzoITGgbjbNHItSrT5r?= =?utf-8?q?3sKpz5VFyiqy0Bl6qdt5JfqBCcBP8xX7WVr+KdlZsba9+iTtnPrn0zUliEpERIIQd?= =?utf-8?q?yT2ffegm5u4CQMpZNieosPg/ctP+Guf/myrn6CO77USCYSEp0+qDdN386H5QF42jP?= =?utf-8?q?fcYWMdgkfm2rFLT6sG0lgKfRIWzy679+3g28JLMk6T4Dm2my69b4IlXIhqbiOMkHb?= =?utf-8?q?3LFCISl2/O+u?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2ddcd43-5408-4e08-9417-08dc6bd31aa1 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:40.9554 (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: DM6XiuhqumYWH6ZPt8e2kmI2SUEqkDHPwURiQ9drq1XiAm8pe52VNXlX/HeVECfQJJ7/uG5ZLD4PakJIOLVxeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan - Add 1039.5MHz clock for video PLL to fulfill the LVDS display 148.5MHz * 7 requirement - Add 800MHz clock for ARM PLL Signed-off-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-fracn-gppll.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c index 1becba2b62d0..591e0364ee5c 100644 --- a/drivers/clk/imx/clk-fracn-gppll.c +++ b/drivers/clk/imx/clk-fracn-gppll.c @@ -78,6 +78,7 @@ struct clk_fracn_gppll { * The Fvco should be in range 2.5Ghz to 5Ghz */ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = { + PLL_FRACN_GP(1039500000U, 173, 25, 100, 1, 4), PLL_FRACN_GP(650000000U, 162, 50, 100, 0, 6), PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8), PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6), @@ -106,6 +107,7 @@ static const struct imx_fracn_gppll_rate_table int_tbl[] = { PLL_FRACN_GP_INTEGER(1700000000U, 141, 1, 2), PLL_FRACN_GP_INTEGER(1400000000U, 175, 1, 3), PLL_FRACN_GP_INTEGER(900000000U, 150, 1, 4), + PLL_FRACN_GP_INTEGER(800000000U, 200, 1, 6), }; struct imx_fracn_gppll_clk imx_fracn_gppll_integer = {