Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752225AbdGMLsF (ORCPT ); Thu, 13 Jul 2017 07:48:05 -0400 Received: from mail-dm3nam03on0055.outbound.protection.outlook.com ([104.47.41.55]:36887 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752040AbdGMLr5 (ORCPT ); Thu, 13 Jul 2017 07:47:57 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Dong Aisheng To: CC: , , , , , , , , Subject: [PATCH V2 10/10] clk: imx: add imx7ulp clk driver Date: Thu, 13 Jul 2017 19:47:15 +0800 Message-ID: <1499946435-7177-11-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> References: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131444200752814005;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39450400003)(39840400002)(39860400002)(39400400002)(39380400002)(39410400002)(39850400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(54534003)(9170700003)(2950100002)(6666003)(47776003)(50466002)(48376002)(6306002)(6916009)(966005)(54906002)(53936002)(305945005)(105606002)(498600001)(8656002)(106466001)(7416002)(356003)(5660300001)(50986999)(104016004)(2906002)(76176999)(68736007)(4326008)(85426001)(8676002)(86362001)(8936002)(33646002)(2351001)(81166006)(50226002)(626005)(77096006)(5003940100001)(36756003)(38730400002)(39060400002)(110136004)(189998001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB472;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2FFO11FD012;1:5H+jLWTchKdMrKNEGnk+IVX+frK6ptrcEisXwOkhnU?= =?us-ascii?Q?BVkM52q/q61Zl2UO8O5e4LapmGMgMmZB11YgUX+GbDf0AqFpv3p+/I4/BN+Z?= =?us-ascii?Q?4SZilmdU5YB8bxGZrT8eVACZIjTcRiBGtpPTwsNMKLEQqpkNOkdFej5LCCzt?= =?us-ascii?Q?mCvM4VP+EGEMpo5LJWOqJOfqiv1ORF7VB38RDg6La+nw3Sv4xz7VZoK8gMON?= =?us-ascii?Q?ZPRimXx1PNK8yy+dThsW7r/zpsJ9PC6E4vWrqjtCnjVulkZbatWjQYXqhg0g?= =?us-ascii?Q?07l1xVEKaZ6U3z/z7XaYF4x4SQyZognOIMe/ycfI2841jA0fu5s8Cu9shI/L?= =?us-ascii?Q?hgPR5xEenU/HicD2NZj+A5w8Z87zpJmevBQWGsbkb8Yx2ohNxQCaMh82uKJS?= =?us-ascii?Q?dJsJTs8SwvBg8B65wZrII05idudfZ+3chm9CHTYr0uJC23xoM/m35Rff4rWQ?= =?us-ascii?Q?aa8F8pm8j32J1LfoWQrAs4kvxpZNBabTk1hToySFebUX0AgAi9sw/vsdcJ6d?= =?us-ascii?Q?HJoJMKo95wL3CnjDY0n2URjVkpI/Pn3av2RjIwTFyRlIKpTzW7T3EJIk6UpL?= =?us-ascii?Q?Lz3OcBGDtRdOzKHHDhfZ4wi4iOQ6ONZXdc+8nudpc4r47/U9o3MzRuqh6DhC?= =?us-ascii?Q?bL7TiayfsJ0cz5gqbkjLFUcGaN3RKuQO59UvzgICxlH2WTfR03OUoZK0+Q1d?= =?us-ascii?Q?7MhFsw6jpkgPECTx3+BWmqBGqw5OZdmd1dTKyF6B/3PT8u5GtHejcs4Ti0ad?= =?us-ascii?Q?WPpdA3h8K7lJHeJfx51KQ7ELq0k1vVmzGgfrN9B551udFf90XG+IQLyughKv?= =?us-ascii?Q?X7Sd2jc6+QbY5xwxvviKuc9/4AddzfhB2nyWybce0uaVsPAhu4VWXkCoBtny?= =?us-ascii?Q?RnBkq3e1hIAqooTlJJu9xVs7k1fTWEbCkzsq7hKPYD+lrUoNGPyHmGDLqI9W?= =?us-ascii?Q?TcdVs6d5yZhZTMc62wbgj7MC0u2lTUD4yZxs/jU/W2pCBn4UZ8CfGcFm+mX4?= =?us-ascii?Q?M79dnYHVZFhGL+FiyaaNGh3NnDSRjLfnWi46uC7+U2uw=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 347fea18-2064-49b1-0cad-08d4c9e5000c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BLUPR03MB472; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB472;3:n86hCJv2M4lpneAw63w9O2sHU+CQjbbSS3jCVVh0wJqE4i4WIQcWMBMfLkp5CJbbRYAIPM2q/wul3oigfNxsbp9/DGuJ4yR0ywPBJMVUpdIoU9fbWZuyXpDLjuqRAs4gq/WYJHE5BILQJZZZCXa+CPZY3MiXvi8D4CPxWXNslcFWGmk7woveoe+ZMfm+A0hT1XuSzC2eC0m/1GGReEOBoYe4PtUZ50bpJQhdUBSQ7fUYponCWFnxWVziKFNpwzY1m5ius7LqCD681VQ0QMJHzQbAGOx54hslby3bMByiFF20nhS6PF0bVKCV7hhHjJf4kAc41p3b6DmHDlDgXzfrDmyUp57sWmAeU4V1OAtb8D4OHvq8BWDNnph3UHo6/alILr6BF8Bqe/nwkBMPGrAX6nXac9zfGPyS9MVO8xsK6GHS49jLq78VD14SyPBIkaX/1HvCxCRMgct8EDvZ4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hOxxa+pEuB+Y6ZN8sa8LZVG0M9rX/++Kw8QPZ1Btd8NBTvn0eEjWezu7hGZbSQ== X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(133145235818549)(22074186197030)(236129657087228)(185117386973197)(148574349560750); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(2017060910075)(5005006)(13016025)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR03MB472;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR03MB472; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB472;4:JTwOd9N41Ze2QvQ7z7Kn05xEyqkiuCNnLF4IZPARze1?= =?us-ascii?Q?QgqfH30muLfxwe0ul7WooHOYMjnLXU0RX1608DXnfm8GNxJ5lUz1P9m7O770?= =?us-ascii?Q?ZgzmRAtrFSEnZSxpfWwbdelZPZfKe1wLonGDvqJihSe4vGl1XtBVSAjuMlL1?= =?us-ascii?Q?4sMD48nXsYCKcx22Zm8q/3cwIdt5yoiYeDsKbZ3f+DaMfWw81JbiVxgmpTgH?= =?us-ascii?Q?Q3FrL19mJf4iC7wVbxaLtf8FNyS+mllchvwAVCEGq3XSoaqGbi2fx2b6HvN0?= =?us-ascii?Q?nlKUkjeiW04Zsd3ZPpUSWZsbCFzJ9NjXDGPadWc5vq8pe4cX9lr7AAeS3BJ6?= =?us-ascii?Q?8HbO5IEg+gUEuDUXqk1bRLPd4kC5bdGpHIUGLmprMHJ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9U6PAo+Cj4nu/EbDQCsE0Gof+An?= =?us-ascii?Q?y/E0gTCtE7H2inf5QWusSGOeJx78u+ElcabtNmitFlbV/nEUePNMFvDWstZo?= =?us-ascii?Q?k4cWkrPasjUbaRvq3OJLWziMfTRWU5Bv8GsgM0ylFNOw8icVYKGheYmQmNGT?= =?us-ascii?Q?bRHujExqy+GCreEVKX1qaILgIdmEAt2iHu3VrUuNwgf4l/7wSxCsund5Dd4/?= =?us-ascii?Q?1eHCUQLZW/F0jjQqu+z2DKaCiCXgA6n55KXOUnQuOw0u37JajCnVj7qfRS7r?= =?us-ascii?Q?0RwtHbGhMhQImrSObz2mQXpQRLLCQUf9NxZmxINnkOEN5NRigrK+AqKTGaPf?= =?us-ascii?Q?aIebWEDTkHfm1UJ/5WPkWQN+fGrQMvBJN5n/C5KpS6Aq0x+1z8/Crpjw77hh?= =?us-ascii?Q?xg3h8l94st4U9nl51XyFOcnolBL/gPtvvxoir4625nvKC6KJvyhCGvtQ3qnd?= =?us-ascii?Q?36UhYW47bToakMT9xb9iY1DZujQAeLqox1L9LEQo2ONCiaPd5yyuiZj6y00W?= =?us-ascii?Q?iKryRRO9AerhEZlVtRu+FkhTzP2TcpYAfv+hqW91TjFnAd1Ug1y0uuCpft30?= =?us-ascii?Q?OLpQIUOChje1HDMziv57HGCVQqbLftU+nUiqNYTk1qKQ0njyrgXUV3Ayw4Wc?= =?us-ascii?Q?O3wBxNr+KMvGITF5siqUPYgnygYS63Yo1SPsgpP1T7qhFMyPgU0SMT06eOyL?= =?us-ascii?Q?Q2gzxLEQ2VehAR/cWNAWJW8K1VRUFY5RAT6VCR5IJeHhuIlsDkU3eIl3CONZ?= =?us-ascii?Q?vGcd2n/A7kXP7rsPwSxZV/e8s=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB472;6:lk2dLMozg3007coH8DAMQgPzSA3xgUHuccrdOED9zww?= =?us-ascii?Q?1xD90qmASHyHyS+u7wiOwl4q4Ldx9J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Wqz4tnOyyYm7r4Qelc0JbyNIz6eybQJf7UFYYRwcktHOqx10?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB472;5:ULlL+3EtgclY0/ZpSoIC05p1OOL5jkTFqDbhfeClCzetBsdsTmv3qVx18xvryhvwb4G0l1H8U10yl4XEXeoFo+ouBV4MHMF+lcT9ggzYg4eo+qTjUBCt2B+IoQMdrM5f2Q9e5KKRiiMYbt94UZa+q8y1k42ahDUGVM1ewX5Kca7T158VAraGvHOqRGZobOKOtnSK/yP+VkUePR4t38pmDskutzlh/asfw0rVE/2Li+GRl+5RoAaQteFqmzL9GKbGng/FCfvPPbgpdSmyWZi7v6kkLzNQySioQ3ucVq4O37zl3FslnKATCTNmoxr8DlbZGMUjCkGM9BOqrggaQFmyaiEoqqkry2gJ1QJJCOdF48+YbEEUdHnusrJaum+UK7iX7Qyb5WUZjMN2gxUiesOCE3KSMSQ1hSLWNs9wQG6rjxIGQ4xTp1ycXM3yxZ3faRX0SztveFmKloS5VcVGF/MGQnCrsrkzNmzxlUeLaMg6quGmGQs6W8ylQLh2uONtaY4kmzMrYJfORDPAuvYoh+lVjA==;24:fzux/lhhYFvDabyp/aNTe9khSwO9mp9H7yzCQpdrgeOgd+VKmQIvd+JIQbVl/nPI1JB3NDYJpOtjbCXFervJQNrsu8ZWg84XIxANOzcxqi8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB472;7:eKQI3ePuEuPgAH0y01nmxLagmBHQJ/ppfu8EJFlzOzH2aoAVS2B2XUFkN2XTI4HcCTKz0GThKVGXsZOjoF5zA+rN0Uxi+eY40CjeSA75VF6PRgglZS9vuQTNQJyqK82NU6JdhTiSEuMR+h8UYRJRd8mfPuQqqX+4FJ/pMDnivH2GYIfCynuzrPBciYD27c2PkSAIAAK1GrwMsA7s9P1y2DceRlAtvcucip6dOjFcqOXjqkjDWffrTbBUM3XDEJiW9b0TbiVQqQmiESKHD7A1vgt6cftDr1b7tgZN5bwBuHh5qeZIiYGqDq2PipqSC2qNTL0nOjAIGFofnyj4yMU3hsKbYKtFEFvfzsJ0rBGi7vatDJF/CWQx/jsMk+SvNyIgZmjzM0ZKi/x0joL6DZQ6ODjXtjBsx10+df/CBSOngg7hduFjk9GhWFJZBNaYAL1VKUfvcW2m1YNJQkOAMVWxJ7YD7THvX3iVAgefdjTp6qPrY1WA68YaueCgColUaG1bM9Y8DcZXwxsSUQWjLd2pl7psqhdoZW+tDRlsHHM5AAWbCzueKzKN8BmVx8vmcd8dbhvStRFpxwdWog2Dsip80lobNfkmLP1spVyiUu5ZmiXr+osGCzJQBW4yIEgEiktUUxwNmg39EMuWWj6xM0BaCw1vOhMD8p8bGL7Y0KEeCEjBsulHeE4jMNZWoME42tX1BaTUdi9fCvshSl73RMZRaWYvb4hYPjvjmVgIhUGESg6KZKX6E4PZmf/gEo5rw/UV0DoI3Egej1TH8zZOiEdTsxsGH0DYnQDITthikya5RAI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:47:54.9537 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB472 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 15936 Lines: 304 i.MX7ULP Clock functions are under joint control of the System Clock Generation (SCG) modules, Peripheral Clock Control (PCC) modules, and Core Mode Controller (CMC)1 blocks The clocking scheme provides clear separation between M4 domain and A7 domain. Except for a few clock sources shared between two domains, such as the System Oscillator clock, the Slow IRC (SIRC), and and the Fast IRC clock (FIRCLK), clock sources and clock management are separated and contained within each domain. M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules. A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules. This driver only adds clock support in A7 domain. Note that most clocks required to be operated when gated, e.g. pll, pfd, pcc. And more special cases that scs/ddr/nic mux selecting different clock source requires that clock to be enabled first, then we need set CLK_OPS_PARENT_ENABLE flag for them properly. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng --- ChangeLog: v1->v2: * use of_clk_add_hw_provider instead * split the clocks register process into two parts: early part for possible timers clocks registered by CLK_OF_DECLARE_DRIVER and the later part for the left normal peripheral clocks registered by a platform driver. * correct some clocks with clk_div_table --- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx7ulp.c | 245 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 drivers/clk/imx/clk-imx7ulp.c diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index bf001ce..6f013e0 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -27,4 +27,5 @@ obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o obj-$(CONFIG_SOC_IMX7D) += clk-imx7d.o +obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o obj-$(CONFIG_SOC_VF610) += clk-vf610.o diff --git a/drivers/clk/imx/clk-imx7ulp.c b/drivers/clk/imx/clk-imx7ulp.c new file mode 100644 index 0000000..432b9c0 --- /dev/null +++ b/drivers/clk/imx/clk-imx7ulp.c @@ -0,0 +1,245 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017 NXP + * + * Author: Dong Aisheng + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "clk.h" + +static const char * const pll_pre_sels[] = { "sosc", "firc", }; +static const char * const spll_pfd_sels[] = { "spll_pfd0", "spll_pfd1", "spll_pfd2", "spll_pfd3", }; +static const char * const spll_sels[] = { "spll", "spll_pfd_sel", }; +static const char * const apll_pfd_sels[] = { "apll_pfd0", "apll_pfd1", "apll_pfd2", "apll_pfd3", }; +static const char * const apll_sels[] = { "apll", "apll_pfd_sel", }; +static const char * const scs_sels[] = { "dummy", "sosc", "sirc", "firc", "dummy", "apll_sel", "spll_sel", "upll", }; +static const char * const ddr_sels[] = { "apll_pfd_sel", "upll", }; +static const char * const nic_sels[] = { "firc", "ddr_clk", }; +static const char * const periph_plat_sels[] = { "dummy", "nic1_bus_clk", "nic1_clk", "ddr_clk", "apll_pfd2", "apll_pfd1", "apll_pfd0", "upll", }; +static const char * const periph_bus_sels[] = { "dummy", "sosc_bus_clk", "mpll", "firc_bus_clk", "rosc", "nic1_bus_clk", "nic1_clk", "spll_bus_clk", }; + +static struct clk_hw_onecell_data *clk_data; + +/* used by sosc/sirc/firc/ddr/spll/apll dividers */ +static const struct clk_div_table ulp_div_table[] = { + { .val = 1, .div = 1, }, + { .val = 2, .div = 2, }, + { .val = 3, .div = 4, }, + { .val = 4, .div = 8, }, + { .val = 5, .div = 16, }, + { .val = 6, .div = 32, }, + { .val = 7, .div = 64, }, + { } +}; + +static void __init imx7ulp_clocks_early_init(struct device_node *scg_node) +{ + struct device_node *np = scg_node; + void __iomem *base; + struct clk_hw **clks; + + clk_data = kzalloc(sizeof(*clk_data) + + sizeof(*clk_data->hws) * IMX7ULP_CLK_END, + GFP_KERNEL); + if (!clk_data) + return; + + clk_data->num = IMX7ULP_CLK_END; + clks = clk_data->hws; + + clks[IMX7ULP_CLK_DUMMY] = imx_clk_hw_fixed("dummy", 0); + + clks[IMX7ULP_CLK_ROSC] = imx_obtain_fixed_clk_hw(np, "rosc"); + clks[IMX7ULP_CLK_SOSC] = imx_obtain_fixed_clk_hw(np, "sosc"); + clks[IMX7ULP_CLK_SIRC] = imx_obtain_fixed_clk_hw(np, "sirc"); + clks[IMX7ULP_CLK_FIRC] = imx_obtain_fixed_clk_hw(np, "firc"); + clks[IMX7ULP_CLK_MIPI_PLL] = imx_obtain_fixed_clk_hw(np, "mpll"); + clks[IMX7ULP_CLK_UPLL] = imx_obtain_fixed_clk_hw(np, "upll"); + + /* SCG1 */ + base = of_iomap(np, 0); + WARN_ON(!base); + + /* NOTE: xPLL config can't be changed when xPLL is enabled */ + clks[IMX7ULP_CLK_APLL_PRE_SEL] = imx_clk_hw_mux_flags("apll_pre_sel", base + 0x508, 0, 1, pll_pre_sels, ARRAY_SIZE(pll_pre_sels), CLK_SET_PARENT_GATE); + clks[IMX7ULP_CLK_SPLL_PRE_SEL] = imx_clk_hw_mux_flags("spll_pre_sel", base + 0x608, 0, 1, pll_pre_sels, ARRAY_SIZE(pll_pre_sels), CLK_SET_PARENT_GATE); + + /* name parent_name reg shift width flags */ + clks[IMX7ULP_CLK_APLL_PRE_DIV] = imx_clk_hw_divider_flags("apll_pre_div", "apll_pre_sel", base + 0x508, 8, 3, CLK_SET_RATE_GATE); + clks[IMX7ULP_CLK_SPLL_PRE_DIV] = imx_clk_hw_divider_flags("spll_pre_div", "spll_pre_sel", base + 0x608, 8, 3, CLK_SET_RATE_GATE); + + /* name parent_name base */ + clks[IMX7ULP_CLK_APLL] = imx_clk_pllv4("apll", "apll_pre_div", base + 0x500); + clks[IMX7ULP_CLK_SPLL] = imx_clk_pllv4("spll", "spll_pre_div", base + 0x600); + + /* APLL PFDs */ + clks[IMX7ULP_CLK_APLL_PFD0] = imx_clk_pfdv2("apll_pfd0", "apll", base + 0x50c, 0); + clks[IMX7ULP_CLK_APLL_PFD1] = imx_clk_pfdv2("apll_pfd1", "apll", base + 0x50c, 1); + clks[IMX7ULP_CLK_APLL_PFD2] = imx_clk_pfdv2("apll_pfd2", "apll", base + 0x50c, 2); + clks[IMX7ULP_CLK_APLL_PFD3] = imx_clk_pfdv2("apll_pfd3", "apll", base + 0x50c, 3); + + /* SPLL PFDs */ + clks[IMX7ULP_CLK_SPLL_PFD0] = imx_clk_pfdv2("spll_pfd0", "spll", base + 0x60C, 0); + clks[IMX7ULP_CLK_SPLL_PFD1] = imx_clk_pfdv2("spll_pfd1", "spll", base + 0x60C, 1); + clks[IMX7ULP_CLK_SPLL_PFD2] = imx_clk_pfdv2("spll_pfd2", "spll", base + 0x60C, 2); + clks[IMX7ULP_CLK_SPLL_PFD3] = imx_clk_pfdv2("spll_pfd3", "spll", base + 0x60C, 3); + + /* PLL Mux */ + clks[IMX7ULP_CLK_APLL_PFD_SEL] = imx_clk_hw_mux_flags("apll_pfd_sel", base + 0x508, 14, 2, apll_pfd_sels, ARRAY_SIZE(apll_pfd_sels), CLK_SET_RATE_PARENT | CLK_SET_PARENT_GATE); + clks[IMX7ULP_CLK_SPLL_PFD_SEL] = imx_clk_hw_mux_flags("spll_pfd_sel", base + 0x608, 14, 2, spll_pfd_sels, ARRAY_SIZE(spll_pfd_sels), CLK_SET_RATE_PARENT | CLK_SET_PARENT_GATE); + clks[IMX7ULP_CLK_APLL_SEL] = imx_clk_hw_mux_flags("apll_sel", base + 0x508, 1, 1, apll_sels, ARRAY_SIZE(apll_sels), CLK_SET_RATE_PARENT | CLK_SET_PARENT_GATE); + clks[IMX7ULP_CLK_SPLL_SEL] = imx_clk_hw_mux_flags("spll_sel", base + 0x608, 1, 1, spll_sels, ARRAY_SIZE(spll_sels), CLK_SET_RATE_PARENT | CLK_SET_PARENT_GATE); + + clks[IMX7ULP_CLK_SPLL_BUS_CLK] = clk_hw_register_divider_table(NULL, "spll_bus_clk", "spll_sel", 0, base + 0x604, 8, 3, + CLK_DIVIDER_ZERO_GATE, ulp_div_table, &imx_ccm_lock); + + /* scs/ddr/nic select different clock source requires that clock to be enabled first */ + clks[IMX7ULP_CLK_SYS_SEL] = imx_clk_hw_mux2("scs_sel", base + 0x14, 24, 4, scs_sels, ARRAY_SIZE(scs_sels)); + clks[IMX7ULP_CLK_NIC_SEL] = imx_clk_hw_mux2("nic_sel", base + 0x40, 28, 1, nic_sels, ARRAY_SIZE(nic_sels)); + clks[IMX7ULP_CLK_DDR_SEL] = imx_clk_hw_mux_flags("ddr_sel", base + 0x30, 24, 1, ddr_sels, ARRAY_SIZE(ddr_sels), CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE); + + clks[IMX7ULP_CLK_CORE_DIV] = imx_clk_hw_divider_flags("divcore", "scs_sel", base + 0x14, 16, 4, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL); + + clks[IMX7ULP_CLK_DDR_DIV] = clk_hw_register_divider_table(NULL, "ddr_clk", "ddr_sel", CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, base + 0x30, 0, 3, + CLK_DIVIDER_ZERO_GATE, ulp_div_table, &imx_ccm_lock); + + clks[IMX7ULP_CLK_NIC0_DIV] = imx_clk_hw_divider_flags("nic0_clk", "nic_sel", base + 0x40, 24, 4, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL); + clks[IMX7ULP_CLK_NIC1_DIV] = imx_clk_hw_divider_flags("nic1_clk", "nic0_clk", base + 0x40, 16, 4, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL); + clks[IMX7ULP_CLK_NIC1_BUS_DIV] = imx_clk_hw_divider_flags("nic1_bus_clk", "nic1_clk", base + 0x40, 4, 4, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL); + + clks[IMX7ULP_CLK_SOSC_BUS_CLK] = clk_hw_register_divider_table(NULL, "sosc_bus_clk", "sosc", 0, base + 0x104, 8, 3, + CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_ZERO_GATE, ulp_div_table, &imx_ccm_lock); + clks[IMX7ULP_CLK_FIRC_BUS_CLK] = clk_hw_register_divider_table(NULL, "firc_bus_clk", "firc", 0, base + 0x304, 8, 3, + CLK_DIVIDER_READ_ONLY | CLK_DIVIDER_ZERO_GATE, ulp_div_table, &imx_ccm_lock); + + /* PCC2 */ + base = of_iomap(np, 1); + WARN_ON(!base); + + clks[IMX7ULP_CLK_LPTPM4] = imx_clk_composite("lptpm4", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x94); + clks[IMX7ULP_CLK_LPTPM5] = imx_clk_composite("lptpm5", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x98); + clks[IMX7ULP_CLK_LPIT1] = imx_clk_composite("lpit1", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x9c); + + /* PCC3 */ + base = of_iomap(np, 2); + WARN_ON(!base); + + clks[IMX7ULP_CLK_LPTPM6] = imx_clk_composite("lptpm6", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x84); + clks[IMX7ULP_CLK_LPTPM7] = imx_clk_composite("lptpm7", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x88); + + clks[IMX7ULP_CLK_MMDC] = clk_hw_register_gate(NULL, "mmdc", "nic1_clk", CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, + base + 0xac, 30, 0, &imx_ccm_lock); + + imx_check_clk_hws(clks, clk_data->num); + + of_clk_add_hw_provider(scg_node, of_clk_hw_onecell_get, clk_data); +} +CLK_OF_DECLARE_DRIVER(imx7ulp, "fsl,imx7ulp-clock", imx7ulp_clocks_early_init); + +static const struct of_device_id imx7ulp_clk_dt_ids[] = { + { .compatible = "fsl,imx7ulp-clock" }, + { /* sentinel */ } +}; + +static int imx7ulp_clk_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct clk_hw **clks = clk_data->hws; + struct resource *res; + void __iomem *base; + + /* PCC2 */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "scg1"); + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); + + clks[IMX7ULP_CLK_GPU_DIV] = imx_clk_hw_divider("gpu_clk", "nic0_clk", base + 0x40, 20, 4); + + /* PCC2 */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcc2"); + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); + + clks[IMX7ULP_CLK_DMA1] = imx_clk_hw_gate("dma1", "nic1_clk", base + 0x20, 30); + clks[IMX7ULP_CLK_RGPIO2P1] = imx_clk_hw_gate("rgpio2p1", "nic1_bus_clk", base + 0x3c, 30); + clks[IMX7ULP_CLK_DMA_MUX1] = imx_clk_hw_gate("dma_mux1", "nic1_bus_clk", base + 0x84, 30); + clks[IMX7ULP_CLK_SNVS] = imx_clk_hw_gate("snvs", "nic1_bus_clk", base + 0x8c, 30); + clks[IMX7ULP_CLK_CAAM] = imx_clk_hw_gate("caam", "nic1_clk", base + 0x90, 30); + clks[IMX7ULP_CLK_LPSPI2] = imx_clk_composite("lpspi2", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xa4); + clks[IMX7ULP_CLK_LPSPI3] = imx_clk_composite("lpspi3", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xa8); + clks[IMX7ULP_CLK_LPI2C4] = imx_clk_composite("lpi2c4", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xac); + clks[IMX7ULP_CLK_LPI2C5] = imx_clk_composite("lpi2c5", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xb0); + clks[IMX7ULP_CLK_LPUART4] = imx_clk_composite("lpuart4", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xb4); + clks[IMX7ULP_CLK_LPUART5] = imx_clk_composite("lpuart5", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xb8); + clks[IMX7ULP_CLK_FLEXIO1] = imx_clk_composite("flexio1", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0xc4); + clks[IMX7ULP_CLK_USB0] = imx_clk_composite("usb0", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, true, true, base + 0xcc); + clks[IMX7ULP_CLK_USB1] = imx_clk_composite("usb1", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, true, true, base + 0xd0); + clks[IMX7ULP_CLK_USB_PHY] = imx_clk_hw_gate("usb_phy", "nic1_bus_clk", base + 0xD4, 30); + clks[IMX7ULP_CLK_USDHC0] = imx_clk_composite("usdhc0", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, true, true, base + 0xdc); + clks[IMX7ULP_CLK_USDHC1] = imx_clk_composite("usdhc1", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, true, true, base + 0xe0); + clks[IMX7ULP_CLK_WDG1] = imx_clk_composite("wdg1", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, true, true, base + 0xf4); + clks[IMX7ULP_CLK_WDG2] = imx_clk_composite("sdg2", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, true, true, base + 0x10c); + + /* PCC3 */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcc3"); + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); + + clks[IMX7ULP_CLK_LPI2C6] = imx_clk_composite("lpi2c6", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x90); + clks[IMX7ULP_CLK_LPI2C7] = imx_clk_composite("lpi2c7", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x94); + clks[IMX7ULP_CLK_LPUART6] = imx_clk_composite("lpuart6", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x98); + clks[IMX7ULP_CLK_LPUART7] = imx_clk_composite("lpuart7", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, false, true, base + 0x9c); + clks[IMX7ULP_CLK_DSI] = imx_clk_composite("dsi", periph_bus_sels, ARRAY_SIZE(periph_bus_sels), true, true, true, base + 0xa4); + clks[IMX7ULP_CLK_LCDIF] = imx_clk_composite("lcdif", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, true, true, base + 0xa8); + + clks[IMX7ULP_CLK_VIU] = imx_clk_hw_gate("viu", "nic1_clk", base + 0xa0, 30); + clks[IMX7ULP_CLK_PCTLC] = imx_clk_hw_gate("pctlc", "nic1_bus_clk", base + 0xb8, 30); + clks[IMX7ULP_CLK_PCTLD] = imx_clk_hw_gate("pctld", "nic1_bus_clk", base + 0xbc, 30); + clks[IMX7ULP_CLK_PCTLE] = imx_clk_hw_gate("pctle", "nic1_bus_clk", base + 0xc0, 30); + clks[IMX7ULP_CLK_PCTLF] = imx_clk_hw_gate("pctlf", "nic1_bus_clk", base + 0xc4, 30); + + clks[IMX7ULP_CLK_GPU3D] = imx_clk_composite("gpu3d", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, false, true, base + 0x140); + clks[IMX7ULP_CLK_GPU2D] = imx_clk_composite("gpu2d", periph_plat_sels, ARRAY_SIZE(periph_plat_sels), true, false, true, base + 0x144); + + imx_check_clk_hws(clks, clk_data->num); + + of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data); + + pr_debug("i.MX7ULP clock tree init done.\n"); + + return 0; +} + +static struct platform_driver imx7ulp_clk_driver = { + .driver = { + .name = "imx7ulp-clock", + .of_match_table = imx7ulp_clk_dt_ids, + }, + .probe = imx7ulp_clk_probe, +}; + +static int __init imx7ulp_clk_init(void) +{ + return platform_driver_register(&imx7ulp_clk_driver); +} +core_initcall(imx7ulp_clk_init); -- 2.7.4