From patchwork Thu Aug 29 01:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13782377 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012064.outbound.protection.outlook.com [52.101.66.64]) (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 7F2413D3B3 for ; Thu, 29 Aug 2024 01:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724895223; cv=fail; b=r00hZ96Bbe2UG9WzxmPWI6jvxuYTE4tZENQIyzap2wdc8+i1Ka6TFH+lEFa1uOZpY7on4n5P+nwfD/6bEtF9L4+jPXfRgZkg0hvvAlJYUHK+e/gmi9qymmp/Ic2+YMlcfrlm9RVjmbut5Rn5T3rQjh1J1LIb4SZqfztnGqI+IxI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724895223; c=relaxed/simple; bh=pZfuSoS7W1ZYhGCcPpAEjeYd7NmvmO0HquYFmpAzy5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Hm8dDI6Dh0FDONWIzJj/aL88HKDfydDJpmLba9+Itk/1NJmY12GadRTmU4q2HBpx+oMON7QlTWVJ3zkE8uVM43EUu23zJJ76HwlVQRkOOjuTuF+jv1Xy6DpXF5U9lz/gPCKRXKObH/MG0mpQmYu5cY4fHVQ4qv/4ZciXFIziovo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=bHvLFwDS; arc=fail smtp.client-ip=52.101.66.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="bHvLFwDS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YNai01Nqz+NZ14Tj2WAh+LDnUixgNHWqx2vK9Hs2XXzBBV6wltPWZPNWCnsldj2dPWpxglrllO9T+/AhtK+BBAcazgw2od6M79kR94llq+9M5wXEOnQMR7slFdlPiy1JoBBRuepTUikt7+dPZN62hNYky9A/DYClTOI1S157EdZBY+6FeONWK6QxuYoXkohhqCk/FRffQVpFi2SkKTKRwG+pmQe1TCZ0mYpcqnOvBVxWO12OWEg+MsDJwa79H9fc6ff0eowsYBH1Cxq6fDHV2Oe9Yr34gRhm+Dk21t99UUYhOsQ4dg+viErMJ3DfQrBF59rfhbSTSe/JofvOcLaVHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3L3lnuxnZ0opOV9a9SJbN4kZZVhFcRgpET+X/DEgXxs=; b=sGnQ2/nsI1Jk6tZ3XPhGfDy2mVOo0yH1YuLJ00yFSguuUQV79U/GsMOGuRF0O5WeOuWsfwwhY7om2W8zThVmW7IXIK+mbni5y5fU8zx9PRERnAFQR5FrBel5pBpChjXZLecP3z0xfEp+gJJUi3aFCoeFf0XF5g+cIexO1uvAYX4hZCLBQTsKATsFucMO9+L0/+x3t8mc4XdrCb0Q+1lYi7CbryKzNJdm5ucT0hUb0LVo3gTWZUc44JBPeixplK5cMucDQ+7xGkEzi2qzIrU8zD57GwzIi7wJy4H/XO9evK9FqLTdIERj+x58WDAfchDUWJyjyOi4UOljJLC7lTYh5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3L3lnuxnZ0opOV9a9SJbN4kZZVhFcRgpET+X/DEgXxs=; b=bHvLFwDSsmbKqciQuZiNquLscnXzDAGVPe0RN4jrVfIp1WXyH60humairAGfsWHtCVJLklhhk/s3d5YFH36z4e3pGsEI2PLJdrUpPwmrycfHrDf8mtf29ydgd3SIjYOzxIsIUgn+fGUfELD1esfI5jQVZKdbcw7jTdHNmUSk8XCj1CvAyANDuZ+Gj0MqYiFtSBa+N/3Ydf9DtV5Hn4mMty5csSQEpUuRfkWeaOgWvPt8TLRU+zYJ+Q5xO7spQNSyiOjJx3QyFHEiq//2/d/IBCpbq1nOlABHl4iu0W0FEiFlzYER6PPotzWHUXpi8khCQe3WPD7ISLOGZoxK2AMHfg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by GVXPR04MB10924.eurprd04.prod.outlook.com (2603:10a6:150:224::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Thu, 29 Aug 2024 01:33:38 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%6]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:33:38 +0000 From: Wei Fang To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, abelvesa@kernel.org, peng.fan@nxp.com Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [Patch v3 3/4] clk: imx95: enable the clock of NETCMIX block control Date: Thu, 29 Aug 2024 09:18:48 +0800 Message-Id: <20240829011849.364987-4-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240829011849.364987-1-wei.fang@nxp.com> References: <20240829011849.364987-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2PR01CA0017.apcprd01.prod.exchangelabs.com (2603:1096:4:191::19) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|GVXPR04MB10924:EE_ X-MS-Office365-Filtering-Correlation-Id: b3698ca1-bd28-4770-4c7a-08dcc7ca9b53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: v8aZQtscFyq5HTt210ysb4SmD//Wlzd5AL/oT2SsJuWKeetODpY4r1pEArVOVe1zVHwZRA++GxyaUaSNCELd2UYxoq9jx77+NZX0G4CCxGQLbkNqFCccc53QoZpQH2pNA3NgND7GAyhYw3lS2vD7QAXcS0PFdbo5MooI7J7xZ/2v1XYyNEPx2JwzLoEfvNiIxwirlHlB4FFGfhUAygPDEMTh/qeVZd84s6nQp/vKuyrSTcbbfzOVv9+yR/k/H3M605O57ZfrccWdip/28+hXAUz9EF3oO2WMh0mm6PAP5kBhXyV0li9DrHmLRwpIh9i+Nm0H+DZkSIA0UehxQBLuSl/S6Lcn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X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(52116014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UA7s7Fv2LKO239ESqm2fdqkz3qAjaHX5wWzhcS+5s0dcNbfMawYuY607+v2wxftCoR2rg9htsqMw/loXJUlTeG3D1nji0z5glwAdg+X2aslqydEXMygQ4G8M3r9UVfE2f4dzu6RXeBCXXKDDC7DnDP4M5LYTe140RGT3S4Ph72u6/4dDkpYBv4+TWcT+sXCwpeFDEdhbUpqeEyv29wCXn1uFOdPXy+mKL+jt90+Is29i9ukQC9IumkoS5YperBC4w4ilAwr4hxPjL9forY+3wRwAJO6SlEW4pfGPmb6+SOTukNgHG0hh1XjYJKcB0WzTHng5JQBK3kWik8UHp2WVO3ocz8Nb9KdA5EPt3DOVAW7bzdEhRAy6YZQ3j0mcl6xdjGaGIOteJuC7PDR1ANflfpyU/nVugr7bl8APudPhgfCBQiM7iW1Fi4Y+JRwvbqrRL2Dmlc6xy9yHEuY5x9gmRbER1iZeI1O0h6A71+X37wUHkghPnf+SBzFKnMWZmMl+PabeemhMTuS85/kaPjUh8X3OYDiSld3T23z4J8n+tfF71KnoHayDN0pNafcRubn00qPKAR2qrDqBgir6VobgEmyTfHLVV3BdVCD0lC2M1BzJ7IIGkMqY9/4fDUzj1TbaCo4WkexYmYzKxBt3zDm8SJwRWnRWXFUhYo2DB7OPwLNgY2HVldrPYtssqZ4uUlopB+EOxCVes8kISBUTSG6TESUlfxZVM6yifcnADl1nIBCa0nMYR8828B6ZDr6Evoh447qxxRJv88MJnkk2CN9SSF547wpePPIuW7hzNO2omwSmLqdnxqzhlIfIPlf2fr+mlzSLLLoPqcPJs9B0JVys0XGHTkCOUIvrVmQNWxptthikWNWLA9rDZD9pb8GeWZd5hKgwm/lVEK8Ab7uhQeRCPHjmdvd5ZUxZcLjoWhxvvC+Qn+qG5RDYi4HiSdhlApYEBLvMN4RnftlOZh2BJc4WyOLR7OtO1VKHaU+KwpD5YN006iBLDM3HN2ecds7XTg4dTGcx5MTzwUWLVAABmodp5GyBAZMqFh86IWRCmiip0wA/qTMtrs5+QVd/JfqVlDMIsVKW+7rvgnCvW5g8Nx16EKGi0S/fdgG4LuGoTDjpNL9dyLlMcecC0hrhYXFf2cHoAair2V/XPIrHLeb138Escx8vFmMjBhVFjjLWqbFli6/HsyIFRvpLJBJ74syKHrfA0D419H0rjmRjGLvZK4FqZfHRDqTvZiPnE36Z5HQRqCiey0FtGhA9J9r3FwOiBkQOPCgK+UeoN9kJJQ3s2sTPL8xQehcQ2BVbjD17JYmkjiBKK1SvQfb3R6HJzyyTWyJJIwrD1yitrbBAbO008VqWSyNSREhBdRe7Sa0qJi45/HwivUJ6vD7oAGgsy5Bjn3fjfkYe2ZkeXdYxKnQWeU13S44qNRyXUXc0thKZmu/OsZSN76ZbskIF3Y0w1DSyzdgvABq0j/R9NtFbbfPEE+yURw6h3e94U4Ys8sqv40pIEsssik5oFpO/i2DAwj3NHTyHp4iLxW2CNBkpI+j6v1kvBotf/oxmD5Mc4ANe3GiBIazjBjWWGibiPUfEBVBcK5q7 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3698ca1-bd28-4770-4c7a-08dcc7ca9b53 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:33:38.7363 (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: iwCFna8cMn4xpC/YlOyIiA5hHYHElVSUlFHZFR8jnDgUMCEC/cz5sILSMe/BTC0VnzfKrxfvPr6eBfTr/Qq1Zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10924 The NETCMIX block control consists of registers for configuration of peripherals in the NETC domain, so enable the clock of NETCMIX to support the configuration. Signed-off-by: Wei Fang Reviewed-by: Peng Fan --- V3 no changes --- drivers/clk/imx/clk-imx95-blk-ctl.c | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c index 74f595f9e5e3..19a62da74be4 100644 --- a/drivers/clk/imx/clk-imx95-blk-ctl.c +++ b/drivers/clk/imx/clk-imx95-blk-ctl.c @@ -248,6 +248,35 @@ static const struct imx95_blk_ctl_dev_data dispmix_csr_dev_data = { .clk_reg_offset = 0, }; +static const struct imx95_blk_ctl_clk_dev_data netxmix_clk_dev_data[] = { + [IMX95_CLK_NETCMIX_ENETC0_RMII] = { + .name = "enetc0_rmii_sel", + .parent_names = (const char *[]){"ext_enetref", "enetref"}, + .num_parents = 2, + .reg = 4, + .bit_idx = 5, + .bit_width = 1, + .type = CLK_MUX, + .flags = CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, + }, + [IMX95_CLK_NETCMIX_ENETC1_RMII] = { + .name = "enetc1_rmii_sel", + .parent_names = (const char *[]){"ext_enetref", "enetref"}, + .num_parents = 2, + .reg = 4, + .bit_idx = 10, + .bit_width = 1, + .type = CLK_MUX, + .flags = CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, + }, +}; + +static const struct imx95_blk_ctl_dev_data netcmix_dev_data = { + .num_clks = ARRAY_SIZE(netxmix_clk_dev_data), + .clk_dev_data = netxmix_clk_dev_data, + .clk_reg_offset = 0, +}; + static int imx95_bc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -419,6 +448,7 @@ static const struct of_device_id imx95_bc_of_match[] = { { .compatible = "nxp,imx95-lvds-csr", .data = &lvds_csr_dev_data }, { .compatible = "nxp,imx95-display-csr", .data = &dispmix_csr_dev_data }, { .compatible = "nxp,imx95-vpu-csr", .data = &vpublk_dev_data }, + { .compatible = "nxp,imx95-netcmix-blk-ctrl", .data = &netcmix_dev_data}, { /* Sentinel */ }, }; MODULE_DEVICE_TABLE(of, imx95_bc_of_match);