18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2017 MediaTek Inc. 48c2ecf20Sopenharmony_ci * Author: Weiyi Lu <weiyi.lu@mediatek.com> 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/clk.h> 88c2ecf20Sopenharmony_ci#include <linux/delay.h> 98c2ecf20Sopenharmony_ci#include <linux/mfd/syscon.h> 108c2ecf20Sopenharmony_ci#include <linux/of.h> 118c2ecf20Sopenharmony_ci#include <linux/of_address.h> 128c2ecf20Sopenharmony_ci#include <linux/of_device.h> 138c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 148c2ecf20Sopenharmony_ci#include <linux/slab.h> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#include "clk-mtk.h" 178c2ecf20Sopenharmony_ci#include "clk-gate.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include <dt-bindings/clock/mt2712-clk.h> 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistatic DEFINE_SPINLOCK(mt2712_clk_lock); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_cistatic const struct mtk_fixed_clk top_fixed_clks[] = { 248c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_VPLL3_DPIX, "vpll3_dpix", NULL, 200000000), 258c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_VPLL_DPIX, "vpll_dpix", NULL, 200000000), 268c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_LTEPLL_FS26M, "ltepll_fs26m", NULL, 26000000), 278c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_DMPLL, "dmpll_ck", NULL, 350000000), 288c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_DSI0_LNTC, "dsi0_lntc", NULL, 143000000), 298c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_DSI1_LNTC, "dsi1_lntc", NULL, 143000000), 308c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_LVDSTX3_CLKDIG_CTS, "lvdstx3", NULL, 140000000), 318c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_LVDSTX_CLKDIG_CTS, "lvdstx", NULL, 140000000), 328c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_CLKRTC_EXT, "clkrtc_ext", NULL, 32768), 338c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_CLKRTC_INT, "clkrtc_int", NULL, 32747), 348c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_CSI0, "csi0", NULL, 26000000), 358c2ecf20Sopenharmony_ci FIXED_CLK(CLK_TOP_CVBSPLL, "cvbspll", NULL, 108000000), 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cistatic const struct mtk_fixed_factor top_early_divs[] = { 398c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYS_26M, "sys_26m", "clk26m", 1, 408c2ecf20Sopenharmony_ci 1), 418c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_CLK26M_D2, "clk26m_d2", "sys_26m", 1, 428c2ecf20Sopenharmony_ci 2), 438c2ecf20Sopenharmony_ci}; 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cistatic const struct mtk_fixed_factor top_divs[] = { 468c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ARMCA35PLL, "armca35pll_ck", "armca35pll", 1, 478c2ecf20Sopenharmony_ci 1), 488c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ARMCA35PLL_600M, "armca35pll_600m", "armca35pll_ck", 1, 498c2ecf20Sopenharmony_ci 2), 508c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ARMCA35PLL_400M, "armca35pll_400m", "armca35pll_ck", 1, 518c2ecf20Sopenharmony_ci 3), 528c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ARMCA72PLL, "armca72pll_ck", "armca72pll", 1, 538c2ecf20Sopenharmony_ci 1), 548c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL, "syspll_ck", "mainpll", 1, 558c2ecf20Sopenharmony_ci 1), 568c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL_D2, "syspll_d2", "syspll_ck", 1, 578c2ecf20Sopenharmony_ci 2), 588c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL1_D2, "syspll1_d2", "syspll_d2", 1, 598c2ecf20Sopenharmony_ci 2), 608c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL1_D4, "syspll1_d4", "syspll_d2", 1, 618c2ecf20Sopenharmony_ci 4), 628c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL1_D8, "syspll1_d8", "syspll_d2", 1, 638c2ecf20Sopenharmony_ci 8), 648c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL1_D16, "syspll1_d16", "syspll_d2", 1, 658c2ecf20Sopenharmony_ci 16), 668c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL_D3, "syspll_d3", "syspll_ck", 1, 678c2ecf20Sopenharmony_ci 3), 688c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL2_D2, "syspll2_d2", "syspll_d3", 1, 698c2ecf20Sopenharmony_ci 2), 708c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL2_D4, "syspll2_d4", "syspll_d3", 1, 718c2ecf20Sopenharmony_ci 4), 728c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL_D5, "syspll_d5", "syspll_ck", 1, 738c2ecf20Sopenharmony_ci 5), 748c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL3_D2, "syspll3_d2", "syspll_d5", 1, 758c2ecf20Sopenharmony_ci 2), 768c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL3_D4, "syspll3_d4", "syspll_d5", 1, 778c2ecf20Sopenharmony_ci 4), 788c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL_D7, "syspll_d7", "syspll_ck", 1, 798c2ecf20Sopenharmony_ci 7), 808c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL4_D2, "syspll4_d2", "syspll_d7", 1, 818c2ecf20Sopenharmony_ci 2), 828c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_SYSPLL4_D4, "syspll4_d4", "syspll_d7", 1, 838c2ecf20Sopenharmony_ci 4), 848c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL, "univpll_ck", "univpll", 1, 858c2ecf20Sopenharmony_ci 1), 868c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D7, "univpll_d7", "univpll_ck", 1, 878c2ecf20Sopenharmony_ci 7), 888c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D26, "univpll_d26", "univpll_ck", 1, 898c2ecf20Sopenharmony_ci 26), 908c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D52, "univpll_d52", "univpll_ck", 1, 918c2ecf20Sopenharmony_ci 52), 928c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D104, "univpll_d104", "univpll_ck", 1, 938c2ecf20Sopenharmony_ci 104), 948c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D208, "univpll_d208", "univpll_ck", 1, 958c2ecf20Sopenharmony_ci 208), 968c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D2, "univpll_d2", "univpll_ck", 1, 978c2ecf20Sopenharmony_ci 2), 988c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL1_D2, "univpll1_d2", "univpll_d2", 1, 998c2ecf20Sopenharmony_ci 2), 1008c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL1_D4, "univpll1_d4", "univpll_d2", 1, 1018c2ecf20Sopenharmony_ci 4), 1028c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL1_D8, "univpll1_d8", "univpll_d2", 1, 1038c2ecf20Sopenharmony_ci 8), 1048c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D3, "univpll_d3", "univpll_ck", 1, 1058c2ecf20Sopenharmony_ci 3), 1068c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL2_D2, "univpll2_d2", "univpll_d3", 1, 1078c2ecf20Sopenharmony_ci 2), 1088c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL2_D4, "univpll2_d4", "univpll_d3", 1, 1098c2ecf20Sopenharmony_ci 4), 1108c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL2_D8, "univpll2_d8", "univpll_d3", 1, 1118c2ecf20Sopenharmony_ci 8), 1128c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL_D5, "univpll_d5", "univpll_ck", 1, 1138c2ecf20Sopenharmony_ci 5), 1148c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL3_D2, "univpll3_d2", "univpll_d5", 1, 1158c2ecf20Sopenharmony_ci 2), 1168c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL3_D4, "univpll3_d4", "univpll_d5", 1, 1178c2ecf20Sopenharmony_ci 4), 1188c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_UNIVPLL3_D8, "univpll3_d8", "univpll_d5", 1, 1198c2ecf20Sopenharmony_ci 8), 1208c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_MP0_PLL1, "f_mp0_pll1_ck", "univpll_d2", 1, 1218c2ecf20Sopenharmony_ci 1), 1228c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_MP0_PLL2, "f_mp0_pll2_ck", "univpll1_d2", 1, 1238c2ecf20Sopenharmony_ci 1), 1248c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_BIG_PLL1, "f_big_pll1_ck", "univpll_d2", 1, 1258c2ecf20Sopenharmony_ci 1), 1268c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_BIG_PLL2, "f_big_pll2_ck", "univpll1_d2", 1, 1278c2ecf20Sopenharmony_ci 1), 1288c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_BUS_PLL1, "f_bus_pll1_ck", "univpll_d2", 1, 1298c2ecf20Sopenharmony_ci 1), 1308c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_F_BUS_PLL2, "f_bus_pll2_ck", "univpll1_d2", 1, 1318c2ecf20Sopenharmony_ci 1), 1328c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1, "apll1_ck", "apll1", 1, 1338c2ecf20Sopenharmony_ci 1), 1348c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1_D2, "apll1_d2", "apll1_ck", 1, 1358c2ecf20Sopenharmony_ci 2), 1368c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1_D4, "apll1_d4", "apll1_ck", 1, 1378c2ecf20Sopenharmony_ci 4), 1388c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1_D8, "apll1_d8", "apll1_ck", 1, 1398c2ecf20Sopenharmony_ci 8), 1408c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1_D16, "apll1_d16", "apll1_ck", 1, 1418c2ecf20Sopenharmony_ci 16), 1428c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2, "apll2_ck", "apll2", 1, 1438c2ecf20Sopenharmony_ci 1), 1448c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2_D2, "apll2_d2", "apll2_ck", 1, 1458c2ecf20Sopenharmony_ci 2), 1468c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2_D4, "apll2_d4", "apll2_ck", 1, 1478c2ecf20Sopenharmony_ci 4), 1488c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2_D8, "apll2_d8", "apll2_ck", 1, 1498c2ecf20Sopenharmony_ci 8), 1508c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2_D16, "apll2_d16", "apll2_ck", 1, 1518c2ecf20Sopenharmony_ci 16), 1528c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL, "lvdspll_ck", "lvdspll", 1, 1538c2ecf20Sopenharmony_ci 1), 1548c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL_D2, "lvdspll_d2", "lvdspll_ck", 1, 1558c2ecf20Sopenharmony_ci 2), 1568c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL_D4, "lvdspll_d4", "lvdspll_ck", 1, 1578c2ecf20Sopenharmony_ci 4), 1588c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL_D8, "lvdspll_d8", "lvdspll_ck", 1, 1598c2ecf20Sopenharmony_ci 8), 1608c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL2, "lvdspll2_ck", "lvdspll2", 1, 1618c2ecf20Sopenharmony_ci 1), 1628c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL2_D2, "lvdspll2_d2", "lvdspll2_ck", 1, 1638c2ecf20Sopenharmony_ci 2), 1648c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL2_D4, "lvdspll2_d4", "lvdspll2_ck", 1, 1658c2ecf20Sopenharmony_ci 4), 1668c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_LVDSPLL2_D8, "lvdspll2_d8", "lvdspll2_ck", 1, 1678c2ecf20Sopenharmony_ci 8), 1688c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ETHERPLL_125M, "etherpll_125m", "etherpll", 1, 1698c2ecf20Sopenharmony_ci 1), 1708c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_ETHERPLL_50M, "etherpll_50m", "etherpll", 1, 1718c2ecf20Sopenharmony_ci 1), 1728c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_CVBS, "cvbs", "cvbspll", 1, 1738c2ecf20Sopenharmony_ci 1), 1748c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_CVBS_D2, "cvbs_d2", "cvbs", 1, 1758c2ecf20Sopenharmony_ci 2), 1768c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MMPLL, "mmpll_ck", "mmpll", 1, 1778c2ecf20Sopenharmony_ci 1), 1788c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MMPLL_D2, "mmpll_d2", "mmpll_ck", 1, 1798c2ecf20Sopenharmony_ci 2), 1808c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_VENCPLL, "vencpll_ck", "vencpll", 1, 1818c2ecf20Sopenharmony_ci 1), 1828c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_VENCPLL_D2, "vencpll_d2", "vencpll_ck", 1, 1838c2ecf20Sopenharmony_ci 2), 1848c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_VCODECPLL, "vcodecpll_ck", "vcodecpll", 1, 1858c2ecf20Sopenharmony_ci 1), 1868c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_VCODECPLL_D2, "vcodecpll_d2", "vcodecpll_ck", 1, 1878c2ecf20Sopenharmony_ci 2), 1888c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL, "tvdpll_ck", "tvdpll", 1, 1898c2ecf20Sopenharmony_ci 1), 1908c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_D2, "tvdpll_d2", "tvdpll_ck", 1, 1918c2ecf20Sopenharmony_ci 2), 1928c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_D4, "tvdpll_d4", "tvdpll_ck", 1, 1938c2ecf20Sopenharmony_ci 4), 1948c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_D8, "tvdpll_d8", "tvdpll_ck", 1, 1958c2ecf20Sopenharmony_ci 8), 1968c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_429M, "tvdpll_429m", "tvdpll", 1, 1978c2ecf20Sopenharmony_ci 1), 1988c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_429M_D2, "tvdpll_429m_d2", "tvdpll_429m", 1, 1998c2ecf20Sopenharmony_ci 2), 2008c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_TVDPLL_429M_D4, "tvdpll_429m_d4", "tvdpll_429m", 1, 2018c2ecf20Sopenharmony_ci 4), 2028c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL, "msdcpll_ck", "msdcpll", 1, 2038c2ecf20Sopenharmony_ci 1), 2048c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL_D2, "msdcpll_d2", "msdcpll_ck", 1, 2058c2ecf20Sopenharmony_ci 2), 2068c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL_D4, "msdcpll_d4", "msdcpll_ck", 1, 2078c2ecf20Sopenharmony_ci 4), 2088c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL2, "msdcpll2_ck", "msdcpll2", 1, 2098c2ecf20Sopenharmony_ci 1), 2108c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL2_D2, "msdcpll2_d2", "msdcpll2_ck", 1, 2118c2ecf20Sopenharmony_ci 2), 2128c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_MSDCPLL2_D4, "msdcpll2_d4", "msdcpll2_ck", 1, 2138c2ecf20Sopenharmony_ci 4), 2148c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_D2A_ULCLK_6P5M, "d2a_ulclk_6p5m", "clk26m", 1, 2158c2ecf20Sopenharmony_ci 4), 2168c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL1_D3, "apll1_d3", "apll1_ck", 1, 2178c2ecf20Sopenharmony_ci 3), 2188c2ecf20Sopenharmony_ci FACTOR(CLK_TOP_APLL2_D3, "apll2_d3", "apll2_ck", 1, 2198c2ecf20Sopenharmony_ci 3), 2208c2ecf20Sopenharmony_ci}; 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_cistatic const char * const axi_parents[] = { 2238c2ecf20Sopenharmony_ci "clk26m", 2248c2ecf20Sopenharmony_ci "syspll1_d2", 2258c2ecf20Sopenharmony_ci "syspll_d5", 2268c2ecf20Sopenharmony_ci "syspll1_d4", 2278c2ecf20Sopenharmony_ci "univpll_d5", 2288c2ecf20Sopenharmony_ci "univpll2_d2", 2298c2ecf20Sopenharmony_ci "msdcpll2_ck" 2308c2ecf20Sopenharmony_ci}; 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_cistatic const char * const mem_parents[] = { 2338c2ecf20Sopenharmony_ci "clk26m", 2348c2ecf20Sopenharmony_ci "dmpll_ck" 2358c2ecf20Sopenharmony_ci}; 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_cistatic const char * const mm_parents[] = { 2388c2ecf20Sopenharmony_ci "clk26m", 2398c2ecf20Sopenharmony_ci "vencpll_ck", 2408c2ecf20Sopenharmony_ci "syspll_d3", 2418c2ecf20Sopenharmony_ci "syspll1_d2", 2428c2ecf20Sopenharmony_ci "syspll_d5", 2438c2ecf20Sopenharmony_ci "syspll1_d4", 2448c2ecf20Sopenharmony_ci "univpll1_d2", 2458c2ecf20Sopenharmony_ci "univpll2_d2" 2468c2ecf20Sopenharmony_ci}; 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_cistatic const char * const pwm_parents[] = { 2498c2ecf20Sopenharmony_ci "clk26m", 2508c2ecf20Sopenharmony_ci "univpll2_d4", 2518c2ecf20Sopenharmony_ci "univpll3_d2", 2528c2ecf20Sopenharmony_ci "univpll1_d4" 2538c2ecf20Sopenharmony_ci}; 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_cistatic const char * const vdec_parents[] = { 2568c2ecf20Sopenharmony_ci "clk26m", 2578c2ecf20Sopenharmony_ci "vcodecpll_ck", 2588c2ecf20Sopenharmony_ci "tvdpll_429m", 2598c2ecf20Sopenharmony_ci "univpll_d3", 2608c2ecf20Sopenharmony_ci "vencpll_ck", 2618c2ecf20Sopenharmony_ci "syspll_d3", 2628c2ecf20Sopenharmony_ci "univpll1_d2", 2638c2ecf20Sopenharmony_ci "mmpll_d2", 2648c2ecf20Sopenharmony_ci "syspll3_d2", 2658c2ecf20Sopenharmony_ci "tvdpll_ck" 2668c2ecf20Sopenharmony_ci}; 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_cistatic const char * const venc_parents[] = { 2698c2ecf20Sopenharmony_ci "clk26m", 2708c2ecf20Sopenharmony_ci "univpll1_d2", 2718c2ecf20Sopenharmony_ci "mmpll_d2", 2728c2ecf20Sopenharmony_ci "tvdpll_d2", 2738c2ecf20Sopenharmony_ci "syspll1_d2", 2748c2ecf20Sopenharmony_ci "univpll_d5", 2758c2ecf20Sopenharmony_ci "vcodecpll_d2", 2768c2ecf20Sopenharmony_ci "univpll2_d2", 2778c2ecf20Sopenharmony_ci "syspll3_d2" 2788c2ecf20Sopenharmony_ci}; 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_cistatic const char * const mfg_parents[] = { 2818c2ecf20Sopenharmony_ci "clk26m", 2828c2ecf20Sopenharmony_ci "mmpll_ck", 2838c2ecf20Sopenharmony_ci "univpll_d3", 2848c2ecf20Sopenharmony_ci "clk26m", 2858c2ecf20Sopenharmony_ci "clk26m", 2868c2ecf20Sopenharmony_ci "clk26m", 2878c2ecf20Sopenharmony_ci "clk26m", 2888c2ecf20Sopenharmony_ci "clk26m", 2898c2ecf20Sopenharmony_ci "clk26m", 2908c2ecf20Sopenharmony_ci "syspll_d3", 2918c2ecf20Sopenharmony_ci "syspll1_d2", 2928c2ecf20Sopenharmony_ci "syspll_d5", 2938c2ecf20Sopenharmony_ci "univpll_d3", 2948c2ecf20Sopenharmony_ci "univpll1_d2", 2958c2ecf20Sopenharmony_ci "univpll_d5", 2968c2ecf20Sopenharmony_ci "univpll2_d2" 2978c2ecf20Sopenharmony_ci}; 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_cistatic const char * const camtg_parents[] = { 3008c2ecf20Sopenharmony_ci "clk26m", 3018c2ecf20Sopenharmony_ci "univpll_d52", 3028c2ecf20Sopenharmony_ci "univpll_d208", 3038c2ecf20Sopenharmony_ci "univpll_d104", 3048c2ecf20Sopenharmony_ci "clk26m_d2", 3058c2ecf20Sopenharmony_ci "univpll_d26", 3068c2ecf20Sopenharmony_ci "univpll2_d8", 3078c2ecf20Sopenharmony_ci "syspll3_d4", 3088c2ecf20Sopenharmony_ci "syspll3_d2", 3098c2ecf20Sopenharmony_ci "univpll1_d4", 3108c2ecf20Sopenharmony_ci "univpll2_d2" 3118c2ecf20Sopenharmony_ci}; 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_cistatic const char * const uart_parents[] = { 3148c2ecf20Sopenharmony_ci "clk26m", 3158c2ecf20Sopenharmony_ci "univpll2_d8" 3168c2ecf20Sopenharmony_ci}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_cistatic const char * const spi_parents[] = { 3198c2ecf20Sopenharmony_ci "clk26m", 3208c2ecf20Sopenharmony_ci "univpll2_d4", 3218c2ecf20Sopenharmony_ci "univpll1_d4", 3228c2ecf20Sopenharmony_ci "univpll2_d2", 3238c2ecf20Sopenharmony_ci "univpll3_d2", 3248c2ecf20Sopenharmony_ci "univpll1_d8" 3258c2ecf20Sopenharmony_ci}; 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_cistatic const char * const usb20_parents[] = { 3288c2ecf20Sopenharmony_ci "clk26m", 3298c2ecf20Sopenharmony_ci "univpll1_d8", 3308c2ecf20Sopenharmony_ci "univpll3_d4" 3318c2ecf20Sopenharmony_ci}; 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_cistatic const char * const usb30_parents[] = { 3348c2ecf20Sopenharmony_ci "clk26m", 3358c2ecf20Sopenharmony_ci "univpll3_d2", 3368c2ecf20Sopenharmony_ci "univpll3_d4", 3378c2ecf20Sopenharmony_ci "univpll2_d4" 3388c2ecf20Sopenharmony_ci}; 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_cistatic const char * const msdc50_0_h_parents[] = { 3418c2ecf20Sopenharmony_ci "clk26m", 3428c2ecf20Sopenharmony_ci "syspll1_d2", 3438c2ecf20Sopenharmony_ci "syspll2_d2", 3448c2ecf20Sopenharmony_ci "syspll4_d2", 3458c2ecf20Sopenharmony_ci "univpll_d5", 3468c2ecf20Sopenharmony_ci "univpll1_d4" 3478c2ecf20Sopenharmony_ci}; 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_cistatic const char * const msdc50_0_parents[] = { 3508c2ecf20Sopenharmony_ci "clk26m", 3518c2ecf20Sopenharmony_ci "msdcpll_ck", 3528c2ecf20Sopenharmony_ci "msdcpll_d2", 3538c2ecf20Sopenharmony_ci "univpll1_d4", 3548c2ecf20Sopenharmony_ci "syspll2_d2", 3558c2ecf20Sopenharmony_ci "msdcpll_d4", 3568c2ecf20Sopenharmony_ci "vencpll_d2", 3578c2ecf20Sopenharmony_ci "univpll1_d2", 3588c2ecf20Sopenharmony_ci "msdcpll2_ck", 3598c2ecf20Sopenharmony_ci "msdcpll2_d2", 3608c2ecf20Sopenharmony_ci "msdcpll2_d4" 3618c2ecf20Sopenharmony_ci}; 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_cistatic const char * const msdc30_1_parents[] = { 3648c2ecf20Sopenharmony_ci "clk26m", 3658c2ecf20Sopenharmony_ci "univpll2_d2", 3668c2ecf20Sopenharmony_ci "msdcpll_d2", 3678c2ecf20Sopenharmony_ci "univpll1_d4", 3688c2ecf20Sopenharmony_ci "syspll2_d2", 3698c2ecf20Sopenharmony_ci "univpll_d7", 3708c2ecf20Sopenharmony_ci "vencpll_d2" 3718c2ecf20Sopenharmony_ci}; 3728c2ecf20Sopenharmony_ci 3738c2ecf20Sopenharmony_cistatic const char * const msdc30_3_parents[] = { 3748c2ecf20Sopenharmony_ci "clk26m", 3758c2ecf20Sopenharmony_ci "msdcpll2_ck", 3768c2ecf20Sopenharmony_ci "msdcpll2_d2", 3778c2ecf20Sopenharmony_ci "univpll2_d2", 3788c2ecf20Sopenharmony_ci "msdcpll2_d4", 3798c2ecf20Sopenharmony_ci "univpll1_d4", 3808c2ecf20Sopenharmony_ci "syspll2_d2", 3818c2ecf20Sopenharmony_ci "syspll_d7", 3828c2ecf20Sopenharmony_ci "univpll_d7", 3838c2ecf20Sopenharmony_ci "vencpll_d2", 3848c2ecf20Sopenharmony_ci "msdcpll_ck", 3858c2ecf20Sopenharmony_ci "msdcpll_d2", 3868c2ecf20Sopenharmony_ci "msdcpll_d4" 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_cistatic const char * const audio_parents[] = { 3908c2ecf20Sopenharmony_ci "clk26m", 3918c2ecf20Sopenharmony_ci "syspll3_d4", 3928c2ecf20Sopenharmony_ci "syspll4_d4", 3938c2ecf20Sopenharmony_ci "syspll1_d16" 3948c2ecf20Sopenharmony_ci}; 3958c2ecf20Sopenharmony_ci 3968c2ecf20Sopenharmony_cistatic const char * const aud_intbus_parents[] = { 3978c2ecf20Sopenharmony_ci "clk26m", 3988c2ecf20Sopenharmony_ci "syspll1_d4", 3998c2ecf20Sopenharmony_ci "syspll4_d2", 4008c2ecf20Sopenharmony_ci "univpll3_d2", 4018c2ecf20Sopenharmony_ci "univpll2_d8", 4028c2ecf20Sopenharmony_ci "syspll3_d2", 4038c2ecf20Sopenharmony_ci "syspll3_d4" 4048c2ecf20Sopenharmony_ci}; 4058c2ecf20Sopenharmony_ci 4068c2ecf20Sopenharmony_cistatic const char * const pmicspi_parents[] = { 4078c2ecf20Sopenharmony_ci "clk26m", 4088c2ecf20Sopenharmony_ci "syspll1_d8", 4098c2ecf20Sopenharmony_ci "syspll3_d4", 4108c2ecf20Sopenharmony_ci "syspll1_d16", 4118c2ecf20Sopenharmony_ci "univpll3_d4", 4128c2ecf20Sopenharmony_ci "univpll_d26", 4138c2ecf20Sopenharmony_ci "syspll3_d4" 4148c2ecf20Sopenharmony_ci}; 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_cistatic const char * const dpilvds1_parents[] = { 4178c2ecf20Sopenharmony_ci "clk26m", 4188c2ecf20Sopenharmony_ci "lvdspll2_ck", 4198c2ecf20Sopenharmony_ci "lvdspll2_d2", 4208c2ecf20Sopenharmony_ci "lvdspll2_d4", 4218c2ecf20Sopenharmony_ci "lvdspll2_d8", 4228c2ecf20Sopenharmony_ci "clkfpc" 4238c2ecf20Sopenharmony_ci}; 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_cistatic const char * const atb_parents[] = { 4268c2ecf20Sopenharmony_ci "clk26m", 4278c2ecf20Sopenharmony_ci "syspll1_d2", 4288c2ecf20Sopenharmony_ci "univpll_d5", 4298c2ecf20Sopenharmony_ci "syspll_d5" 4308c2ecf20Sopenharmony_ci}; 4318c2ecf20Sopenharmony_ci 4328c2ecf20Sopenharmony_cistatic const char * const nr_parents[] = { 4338c2ecf20Sopenharmony_ci "clk26m", 4348c2ecf20Sopenharmony_ci "univpll1_d4", 4358c2ecf20Sopenharmony_ci "syspll2_d2", 4368c2ecf20Sopenharmony_ci "syspll1_d4", 4378c2ecf20Sopenharmony_ci "univpll1_d8", 4388c2ecf20Sopenharmony_ci "univpll3_d2", 4398c2ecf20Sopenharmony_ci "univpll2_d2", 4408c2ecf20Sopenharmony_ci "syspll_d5" 4418c2ecf20Sopenharmony_ci}; 4428c2ecf20Sopenharmony_ci 4438c2ecf20Sopenharmony_cistatic const char * const nfi2x_parents[] = { 4448c2ecf20Sopenharmony_ci "clk26m", 4458c2ecf20Sopenharmony_ci "syspll4_d4", 4468c2ecf20Sopenharmony_ci "univpll3_d4", 4478c2ecf20Sopenharmony_ci "univpll1_d8", 4488c2ecf20Sopenharmony_ci "syspll2_d4", 4498c2ecf20Sopenharmony_ci "univpll3_d2", 4508c2ecf20Sopenharmony_ci "syspll_d7", 4518c2ecf20Sopenharmony_ci "syspll2_d2", 4528c2ecf20Sopenharmony_ci "univpll2_d2", 4538c2ecf20Sopenharmony_ci "syspll_d5", 4548c2ecf20Sopenharmony_ci "syspll1_d2" 4558c2ecf20Sopenharmony_ci}; 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_cistatic const char * const irda_parents[] = { 4588c2ecf20Sopenharmony_ci "clk26m", 4598c2ecf20Sopenharmony_ci "univpll2_d4", 4608c2ecf20Sopenharmony_ci "syspll2_d4", 4618c2ecf20Sopenharmony_ci "univpll2_d8" 4628c2ecf20Sopenharmony_ci}; 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_cistatic const char * const cci400_parents[] = { 4658c2ecf20Sopenharmony_ci "clk26m", 4668c2ecf20Sopenharmony_ci "vencpll_ck", 4678c2ecf20Sopenharmony_ci "armca35pll_600m", 4688c2ecf20Sopenharmony_ci "armca35pll_400m", 4698c2ecf20Sopenharmony_ci "univpll_d2", 4708c2ecf20Sopenharmony_ci "syspll_d2", 4718c2ecf20Sopenharmony_ci "msdcpll_ck", 4728c2ecf20Sopenharmony_ci "univpll_d3" 4738c2ecf20Sopenharmony_ci}; 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_cistatic const char * const aud_1_parents[] = { 4768c2ecf20Sopenharmony_ci "clk26m", 4778c2ecf20Sopenharmony_ci "apll1_ck", 4788c2ecf20Sopenharmony_ci "univpll2_d4", 4798c2ecf20Sopenharmony_ci "univpll2_d8" 4808c2ecf20Sopenharmony_ci}; 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_cistatic const char * const aud_2_parents[] = { 4838c2ecf20Sopenharmony_ci "clk26m", 4848c2ecf20Sopenharmony_ci "apll2_ck", 4858c2ecf20Sopenharmony_ci "univpll2_d4", 4868c2ecf20Sopenharmony_ci "univpll2_d8" 4878c2ecf20Sopenharmony_ci}; 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_cistatic const char * const mem_mfg_parents[] = { 4908c2ecf20Sopenharmony_ci "clk26m", 4918c2ecf20Sopenharmony_ci "mmpll_ck", 4928c2ecf20Sopenharmony_ci "univpll_d3" 4938c2ecf20Sopenharmony_ci}; 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_cistatic const char * const axi_mfg_parents[] = { 4968c2ecf20Sopenharmony_ci "clk26m", 4978c2ecf20Sopenharmony_ci "axi_sel", 4988c2ecf20Sopenharmony_ci "univpll_d5" 4998c2ecf20Sopenharmony_ci}; 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_cistatic const char * const scam_parents[] = { 5028c2ecf20Sopenharmony_ci "clk26m", 5038c2ecf20Sopenharmony_ci "syspll3_d2", 5048c2ecf20Sopenharmony_ci "univpll2_d4", 5058c2ecf20Sopenharmony_ci "syspll2_d4" 5068c2ecf20Sopenharmony_ci}; 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_cistatic const char * const nfiecc_parents[] = { 5098c2ecf20Sopenharmony_ci "clk26m", 5108c2ecf20Sopenharmony_ci "nfi2x_sel", 5118c2ecf20Sopenharmony_ci "syspll_d7", 5128c2ecf20Sopenharmony_ci "syspll2_d2", 5138c2ecf20Sopenharmony_ci "univpll2_d2", 5148c2ecf20Sopenharmony_ci "univpll_d5", 5158c2ecf20Sopenharmony_ci "syspll1_d2" 5168c2ecf20Sopenharmony_ci}; 5178c2ecf20Sopenharmony_ci 5188c2ecf20Sopenharmony_cistatic const char * const pe2_mac_p0_parents[] = { 5198c2ecf20Sopenharmony_ci "clk26m", 5208c2ecf20Sopenharmony_ci "syspll1_d8", 5218c2ecf20Sopenharmony_ci "syspll4_d2", 5228c2ecf20Sopenharmony_ci "syspll2_d4", 5238c2ecf20Sopenharmony_ci "univpll2_d4", 5248c2ecf20Sopenharmony_ci "syspll3_d2" 5258c2ecf20Sopenharmony_ci}; 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_cistatic const char * const dpilvds_parents[] = { 5288c2ecf20Sopenharmony_ci "clk26m", 5298c2ecf20Sopenharmony_ci "lvdspll_ck", 5308c2ecf20Sopenharmony_ci "lvdspll_d2", 5318c2ecf20Sopenharmony_ci "lvdspll_d4", 5328c2ecf20Sopenharmony_ci "lvdspll_d8", 5338c2ecf20Sopenharmony_ci "clkfpc" 5348c2ecf20Sopenharmony_ci}; 5358c2ecf20Sopenharmony_ci 5368c2ecf20Sopenharmony_cistatic const char * const hdcp_parents[] = { 5378c2ecf20Sopenharmony_ci "clk26m", 5388c2ecf20Sopenharmony_ci "syspll4_d2", 5398c2ecf20Sopenharmony_ci "syspll3_d4", 5408c2ecf20Sopenharmony_ci "univpll2_d4" 5418c2ecf20Sopenharmony_ci}; 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_cistatic const char * const hdcp_24m_parents[] = { 5448c2ecf20Sopenharmony_ci "clk26m", 5458c2ecf20Sopenharmony_ci "univpll_d26", 5468c2ecf20Sopenharmony_ci "univpll_d52", 5478c2ecf20Sopenharmony_ci "univpll2_d8" 5488c2ecf20Sopenharmony_ci}; 5498c2ecf20Sopenharmony_ci 5508c2ecf20Sopenharmony_cistatic const char * const rtc_parents[] = { 5518c2ecf20Sopenharmony_ci "clkrtc_int", 5528c2ecf20Sopenharmony_ci "clkrtc_ext", 5538c2ecf20Sopenharmony_ci "clk26m", 5548c2ecf20Sopenharmony_ci "univpll3_d8" 5558c2ecf20Sopenharmony_ci}; 5568c2ecf20Sopenharmony_ci 5578c2ecf20Sopenharmony_cistatic const char * const spinor_parents[] = { 5588c2ecf20Sopenharmony_ci "clk26m", 5598c2ecf20Sopenharmony_ci "clk26m_d2", 5608c2ecf20Sopenharmony_ci "syspll4_d4", 5618c2ecf20Sopenharmony_ci "univpll2_d8", 5628c2ecf20Sopenharmony_ci "univpll3_d4", 5638c2ecf20Sopenharmony_ci "syspll4_d2", 5648c2ecf20Sopenharmony_ci "syspll2_d4", 5658c2ecf20Sopenharmony_ci "univpll2_d4", 5668c2ecf20Sopenharmony_ci "etherpll_125m", 5678c2ecf20Sopenharmony_ci "syspll1_d4" 5688c2ecf20Sopenharmony_ci}; 5698c2ecf20Sopenharmony_ci 5708c2ecf20Sopenharmony_cistatic const char * const apll_parents[] = { 5718c2ecf20Sopenharmony_ci "clk26m", 5728c2ecf20Sopenharmony_ci "apll1_ck", 5738c2ecf20Sopenharmony_ci "apll1_d2", 5748c2ecf20Sopenharmony_ci "apll1_d4", 5758c2ecf20Sopenharmony_ci "apll1_d8", 5768c2ecf20Sopenharmony_ci "apll1_d16", 5778c2ecf20Sopenharmony_ci "apll2_ck", 5788c2ecf20Sopenharmony_ci "apll2_d2", 5798c2ecf20Sopenharmony_ci "apll2_d4", 5808c2ecf20Sopenharmony_ci "apll2_d8", 5818c2ecf20Sopenharmony_ci "apll2_d16", 5828c2ecf20Sopenharmony_ci "clk26m", 5838c2ecf20Sopenharmony_ci "clk26m" 5848c2ecf20Sopenharmony_ci}; 5858c2ecf20Sopenharmony_ci 5868c2ecf20Sopenharmony_cistatic const char * const a1sys_hp_parents[] = { 5878c2ecf20Sopenharmony_ci "clk26m", 5888c2ecf20Sopenharmony_ci "apll1_ck", 5898c2ecf20Sopenharmony_ci "apll1_d2", 5908c2ecf20Sopenharmony_ci "apll1_d4", 5918c2ecf20Sopenharmony_ci "apll1_d8", 5928c2ecf20Sopenharmony_ci "apll1_d3" 5938c2ecf20Sopenharmony_ci}; 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_cistatic const char * const a2sys_hp_parents[] = { 5968c2ecf20Sopenharmony_ci "clk26m", 5978c2ecf20Sopenharmony_ci "apll2_ck", 5988c2ecf20Sopenharmony_ci "apll2_d2", 5998c2ecf20Sopenharmony_ci "apll2_d4", 6008c2ecf20Sopenharmony_ci "apll2_d8", 6018c2ecf20Sopenharmony_ci "apll2_d3" 6028c2ecf20Sopenharmony_ci}; 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_cistatic const char * const asm_l_parents[] = { 6058c2ecf20Sopenharmony_ci "clk26m", 6068c2ecf20Sopenharmony_ci "univpll2_d4", 6078c2ecf20Sopenharmony_ci "univpll2_d2", 6088c2ecf20Sopenharmony_ci "syspll_d5" 6098c2ecf20Sopenharmony_ci}; 6108c2ecf20Sopenharmony_ci 6118c2ecf20Sopenharmony_cistatic const char * const i2so1_parents[] = { 6128c2ecf20Sopenharmony_ci "clk26m", 6138c2ecf20Sopenharmony_ci "apll1_ck", 6148c2ecf20Sopenharmony_ci "apll2_ck" 6158c2ecf20Sopenharmony_ci}; 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_cistatic const char * const ether_125m_parents[] = { 6188c2ecf20Sopenharmony_ci "clk26m", 6198c2ecf20Sopenharmony_ci "etherpll_125m", 6208c2ecf20Sopenharmony_ci "univpll3_d2" 6218c2ecf20Sopenharmony_ci}; 6228c2ecf20Sopenharmony_ci 6238c2ecf20Sopenharmony_cistatic const char * const ether_50m_parents[] = { 6248c2ecf20Sopenharmony_ci "clk26m", 6258c2ecf20Sopenharmony_ci "etherpll_50m", 6268c2ecf20Sopenharmony_ci "apll1_d3", 6278c2ecf20Sopenharmony_ci "univpll3_d4" 6288c2ecf20Sopenharmony_ci}; 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_cistatic const char * const jpgdec_parents[] = { 6318c2ecf20Sopenharmony_ci "clk26m", 6328c2ecf20Sopenharmony_ci "univpll_d3", 6338c2ecf20Sopenharmony_ci "tvdpll_429m", 6348c2ecf20Sopenharmony_ci "vencpll_ck", 6358c2ecf20Sopenharmony_ci "syspll_d3", 6368c2ecf20Sopenharmony_ci "vcodecpll_ck", 6378c2ecf20Sopenharmony_ci "univpll1_d2", 6388c2ecf20Sopenharmony_ci "armca35pll_400m", 6398c2ecf20Sopenharmony_ci "tvdpll_429m_d2", 6408c2ecf20Sopenharmony_ci "tvdpll_429m_d4" 6418c2ecf20Sopenharmony_ci}; 6428c2ecf20Sopenharmony_ci 6438c2ecf20Sopenharmony_cistatic const char * const spislv_parents[] = { 6448c2ecf20Sopenharmony_ci "clk26m", 6458c2ecf20Sopenharmony_ci "univpll2_d4", 6468c2ecf20Sopenharmony_ci "univpll1_d4", 6478c2ecf20Sopenharmony_ci "univpll2_d2", 6488c2ecf20Sopenharmony_ci "univpll3_d2", 6498c2ecf20Sopenharmony_ci "univpll1_d8", 6508c2ecf20Sopenharmony_ci "univpll1_d2", 6518c2ecf20Sopenharmony_ci "univpll_d5" 6528c2ecf20Sopenharmony_ci}; 6538c2ecf20Sopenharmony_ci 6548c2ecf20Sopenharmony_cistatic const char * const ether_parents[] = { 6558c2ecf20Sopenharmony_ci "clk26m", 6568c2ecf20Sopenharmony_ci "etherpll_50m", 6578c2ecf20Sopenharmony_ci "univpll_d26" 6588c2ecf20Sopenharmony_ci}; 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_cistatic const char * const di_parents[] = { 6618c2ecf20Sopenharmony_ci "clk26m", 6628c2ecf20Sopenharmony_ci "tvdpll_d2", 6638c2ecf20Sopenharmony_ci "tvdpll_d4", 6648c2ecf20Sopenharmony_ci "tvdpll_d8", 6658c2ecf20Sopenharmony_ci "vencpll_ck", 6668c2ecf20Sopenharmony_ci "vencpll_d2", 6678c2ecf20Sopenharmony_ci "cvbs", 6688c2ecf20Sopenharmony_ci "cvbs_d2" 6698c2ecf20Sopenharmony_ci}; 6708c2ecf20Sopenharmony_ci 6718c2ecf20Sopenharmony_cistatic const char * const tvd_parents[] = { 6728c2ecf20Sopenharmony_ci "clk26m", 6738c2ecf20Sopenharmony_ci "cvbs_d2", 6748c2ecf20Sopenharmony_ci "univpll2_d8" 6758c2ecf20Sopenharmony_ci}; 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_cistatic const char * const i2c_parents[] = { 6788c2ecf20Sopenharmony_ci "clk26m", 6798c2ecf20Sopenharmony_ci "univpll_d26", 6808c2ecf20Sopenharmony_ci "univpll2_d4", 6818c2ecf20Sopenharmony_ci "univpll3_d2", 6828c2ecf20Sopenharmony_ci "univpll1_d4" 6838c2ecf20Sopenharmony_ci}; 6848c2ecf20Sopenharmony_ci 6858c2ecf20Sopenharmony_cistatic const char * const msdc0p_aes_parents[] = { 6868c2ecf20Sopenharmony_ci "clk26m", 6878c2ecf20Sopenharmony_ci "syspll_d2", 6888c2ecf20Sopenharmony_ci "univpll_d3", 6898c2ecf20Sopenharmony_ci "vcodecpll_ck" 6908c2ecf20Sopenharmony_ci}; 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_cistatic const char * const cmsys_parents[] = { 6938c2ecf20Sopenharmony_ci "clk26m", 6948c2ecf20Sopenharmony_ci "univpll_d3", 6958c2ecf20Sopenharmony_ci "syspll_d3", 6968c2ecf20Sopenharmony_ci "syspll1_d2", 6978c2ecf20Sopenharmony_ci "syspll2_d2" 6988c2ecf20Sopenharmony_ci}; 6998c2ecf20Sopenharmony_ci 7008c2ecf20Sopenharmony_cistatic const char * const gcpu_parents[] = { 7018c2ecf20Sopenharmony_ci "clk26m", 7028c2ecf20Sopenharmony_ci "syspll_d3", 7038c2ecf20Sopenharmony_ci "syspll1_d2", 7048c2ecf20Sopenharmony_ci "univpll1_d2", 7058c2ecf20Sopenharmony_ci "univpll_d5", 7068c2ecf20Sopenharmony_ci "univpll3_d2", 7078c2ecf20Sopenharmony_ci "univpll_d3" 7088c2ecf20Sopenharmony_ci}; 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_cistatic const char * const aud_apll1_parents[] = { 7118c2ecf20Sopenharmony_ci "apll1", 7128c2ecf20Sopenharmony_ci "clkaud_ext_i_1" 7138c2ecf20Sopenharmony_ci}; 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_cistatic const char * const aud_apll2_parents[] = { 7168c2ecf20Sopenharmony_ci "apll2", 7178c2ecf20Sopenharmony_ci "clkaud_ext_i_2" 7188c2ecf20Sopenharmony_ci}; 7198c2ecf20Sopenharmony_ci 7208c2ecf20Sopenharmony_cistatic const char * const apll1_ref_parents[] = { 7218c2ecf20Sopenharmony_ci "clkaud_ext_i_2", 7228c2ecf20Sopenharmony_ci "clkaud_ext_i_1", 7238c2ecf20Sopenharmony_ci "clki2si0_mck_i", 7248c2ecf20Sopenharmony_ci "clki2si1_mck_i", 7258c2ecf20Sopenharmony_ci "clki2si2_mck_i", 7268c2ecf20Sopenharmony_ci "clktdmin_mclk_i", 7278c2ecf20Sopenharmony_ci "clki2si2_mck_i", 7288c2ecf20Sopenharmony_ci "clktdmin_mclk_i" 7298c2ecf20Sopenharmony_ci}; 7308c2ecf20Sopenharmony_ci 7318c2ecf20Sopenharmony_cistatic const char * const audull_vtx_parents[] = { 7328c2ecf20Sopenharmony_ci "d2a_ulclk_6p5m", 7338c2ecf20Sopenharmony_ci "clkaud_ext_i_0" 7348c2ecf20Sopenharmony_ci}; 7358c2ecf20Sopenharmony_ci 7368c2ecf20Sopenharmony_cistatic struct mtk_composite top_muxes[] = { 7378c2ecf20Sopenharmony_ci /* CLK_CFG_0 */ 7388c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_TOP_AXI_SEL, "axi_sel", axi_parents, 0x040, 0, 3, 7398c2ecf20Sopenharmony_ci 7, CLK_IS_CRITICAL), 7408c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_TOP_MEM_SEL, "mem_sel", mem_parents, 0x040, 8, 1, 7418c2ecf20Sopenharmony_ci 15, CLK_IS_CRITICAL), 7428c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MM_SEL, "mm_sel", 7438c2ecf20Sopenharmony_ci mm_parents, 0x040, 24, 3, 31), 7448c2ecf20Sopenharmony_ci /* CLK_CFG_1 */ 7458c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_PWM_SEL, "pwm_sel", 7468c2ecf20Sopenharmony_ci pwm_parents, 0x050, 0, 2, 7), 7478c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_VDEC_SEL, "vdec_sel", 7488c2ecf20Sopenharmony_ci vdec_parents, 0x050, 8, 4, 15), 7498c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_VENC_SEL, "venc_sel", 7508c2ecf20Sopenharmony_ci venc_parents, 0x050, 16, 4, 23), 7518c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MFG_SEL, "mfg_sel", 7528c2ecf20Sopenharmony_ci mfg_parents, 0x050, 24, 4, 31), 7538c2ecf20Sopenharmony_ci /* CLK_CFG_2 */ 7548c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_CAMTG_SEL, "camtg_sel", 7558c2ecf20Sopenharmony_ci camtg_parents, 0x060, 0, 4, 7), 7568c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_UART_SEL, "uart_sel", 7578c2ecf20Sopenharmony_ci uart_parents, 0x060, 8, 1, 15), 7588c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_SPI_SEL, "spi_sel", 7598c2ecf20Sopenharmony_ci spi_parents, 0x060, 16, 3, 23), 7608c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_USB20_SEL, "usb20_sel", 7618c2ecf20Sopenharmony_ci usb20_parents, 0x060, 24, 2, 31), 7628c2ecf20Sopenharmony_ci /* CLK_CFG_3 */ 7638c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_USB30_SEL, "usb30_sel", 7648c2ecf20Sopenharmony_ci usb30_parents, 0x070, 0, 2, 7), 7658c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC50_0_HCLK_SEL, "msdc50_0_h_sel", 7668c2ecf20Sopenharmony_ci msdc50_0_h_parents, 0x070, 8, 3, 15), 7678c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC50_0_SEL, "msdc50_0_sel", 7688c2ecf20Sopenharmony_ci msdc50_0_parents, 0x070, 16, 4, 23), 7698c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC30_1_SEL, "msdc30_1_sel", 7708c2ecf20Sopenharmony_ci msdc30_1_parents, 0x070, 24, 3, 31), 7718c2ecf20Sopenharmony_ci /* CLK_CFG_4 */ 7728c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC30_2_SEL, "msdc30_2_sel", 7738c2ecf20Sopenharmony_ci msdc30_1_parents, 0x080, 0, 3, 7), 7748c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC30_3_SEL, "msdc30_3_sel", 7758c2ecf20Sopenharmony_ci msdc30_3_parents, 0x080, 8, 4, 15), 7768c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_AUDIO_SEL, "audio_sel", 7778c2ecf20Sopenharmony_ci audio_parents, 0x080, 16, 2, 23), 7788c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_AUD_INTBUS_SEL, "aud_intbus_sel", 7798c2ecf20Sopenharmony_ci aud_intbus_parents, 0x080, 24, 3, 31), 7808c2ecf20Sopenharmony_ci /* CLK_CFG_5 */ 7818c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_PMICSPI_SEL, "pmicspi_sel", 7828c2ecf20Sopenharmony_ci pmicspi_parents, 0x090, 0, 3, 7), 7838c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_DPILVDS1_SEL, "dpilvds1_sel", 7848c2ecf20Sopenharmony_ci dpilvds1_parents, 0x090, 8, 3, 15), 7858c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ATB_SEL, "atb_sel", 7868c2ecf20Sopenharmony_ci atb_parents, 0x090, 16, 2, 23), 7878c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_NR_SEL, "nr_sel", 7888c2ecf20Sopenharmony_ci nr_parents, 0x090, 24, 3, 31), 7898c2ecf20Sopenharmony_ci /* CLK_CFG_6 */ 7908c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_NFI2X_SEL, "nfi2x_sel", 7918c2ecf20Sopenharmony_ci nfi2x_parents, 0x0a0, 0, 4, 7), 7928c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_IRDA_SEL, "irda_sel", 7938c2ecf20Sopenharmony_ci irda_parents, 0x0a0, 8, 2, 15), 7948c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_CCI400_SEL, "cci400_sel", 7958c2ecf20Sopenharmony_ci cci400_parents, 0x0a0, 16, 3, 23), 7968c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_AUD_1_SEL, "aud_1_sel", 7978c2ecf20Sopenharmony_ci aud_1_parents, 0x0a0, 24, 2, 31), 7988c2ecf20Sopenharmony_ci /* CLK_CFG_7 */ 7998c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_AUD_2_SEL, "aud_2_sel", 8008c2ecf20Sopenharmony_ci aud_2_parents, 0x0b0, 0, 2, 7), 8018c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MEM_MFG_IN_AS_SEL, "mem_mfg_sel", 8028c2ecf20Sopenharmony_ci mem_mfg_parents, 0x0b0, 8, 2, 15), 8038c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_AXI_MFG_IN_AS_SEL, "axi_mfg_sel", 8048c2ecf20Sopenharmony_ci axi_mfg_parents, 0x0b0, 16, 2, 23), 8058c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_SCAM_SEL, "scam_sel", 8068c2ecf20Sopenharmony_ci scam_parents, 0x0b0, 24, 2, 31), 8078c2ecf20Sopenharmony_ci /* CLK_CFG_8 */ 8088c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_NFIECC_SEL, "nfiecc_sel", 8098c2ecf20Sopenharmony_ci nfiecc_parents, 0x0c0, 0, 3, 7), 8108c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_PE2_MAC_P0_SEL, "pe2_mac_p0_sel", 8118c2ecf20Sopenharmony_ci pe2_mac_p0_parents, 0x0c0, 8, 3, 15), 8128c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_PE2_MAC_P1_SEL, "pe2_mac_p1_sel", 8138c2ecf20Sopenharmony_ci pe2_mac_p0_parents, 0x0c0, 16, 3, 23), 8148c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_DPILVDS_SEL, "dpilvds_sel", 8158c2ecf20Sopenharmony_ci dpilvds_parents, 0x0c0, 24, 3, 31), 8168c2ecf20Sopenharmony_ci /* CLK_CFG_9 */ 8178c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC50_3_HCLK_SEL, "msdc50_3_h_sel", 8188c2ecf20Sopenharmony_ci msdc50_0_h_parents, 0x0d0, 0, 3, 7), 8198c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_HDCP_SEL, "hdcp_sel", 8208c2ecf20Sopenharmony_ci hdcp_parents, 0x0d0, 8, 2, 15), 8218c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_HDCP_24M_SEL, "hdcp_24m_sel", 8228c2ecf20Sopenharmony_ci hdcp_24m_parents, 0x0d0, 16, 2, 23), 8238c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_TOP_RTC_SEL, "rtc_sel", rtc_parents, 0x0d0, 24, 2, 8248c2ecf20Sopenharmony_ci 31, CLK_IS_CRITICAL), 8258c2ecf20Sopenharmony_ci /* CLK_CFG_10 */ 8268c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_SPINOR_SEL, "spinor_sel", 8278c2ecf20Sopenharmony_ci spinor_parents, 0x500, 0, 4, 7), 8288c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_APLL_SEL, "apll_sel", 8298c2ecf20Sopenharmony_ci apll_parents, 0x500, 8, 4, 15), 8308c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_APLL2_SEL, "apll2_sel", 8318c2ecf20Sopenharmony_ci apll_parents, 0x500, 16, 4, 23), 8328c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_A1SYS_HP_SEL, "a1sys_hp_sel", 8338c2ecf20Sopenharmony_ci a1sys_hp_parents, 0x500, 24, 3, 31), 8348c2ecf20Sopenharmony_ci /* CLK_CFG_11 */ 8358c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_A2SYS_HP_SEL, "a2sys_hp_sel", 8368c2ecf20Sopenharmony_ci a2sys_hp_parents, 0x510, 0, 3, 7), 8378c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ASM_L_SEL, "asm_l_sel", 8388c2ecf20Sopenharmony_ci asm_l_parents, 0x510, 8, 2, 15), 8398c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ASM_M_SEL, "asm_m_sel", 8408c2ecf20Sopenharmony_ci asm_l_parents, 0x510, 16, 2, 23), 8418c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ASM_H_SEL, "asm_h_sel", 8428c2ecf20Sopenharmony_ci asm_l_parents, 0x510, 24, 2, 31), 8438c2ecf20Sopenharmony_ci /* CLK_CFG_12 */ 8448c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SO1_SEL, "i2so1_sel", 8458c2ecf20Sopenharmony_ci i2so1_parents, 0x520, 0, 2, 7), 8468c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SO2_SEL, "i2so2_sel", 8478c2ecf20Sopenharmony_ci i2so1_parents, 0x520, 8, 2, 15), 8488c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SO3_SEL, "i2so3_sel", 8498c2ecf20Sopenharmony_ci i2so1_parents, 0x520, 16, 2, 23), 8508c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_TDMO0_SEL, "tdmo0_sel", 8518c2ecf20Sopenharmony_ci i2so1_parents, 0x520, 24, 2, 31), 8528c2ecf20Sopenharmony_ci /* CLK_CFG_13 */ 8538c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_TDMO1_SEL, "tdmo1_sel", 8548c2ecf20Sopenharmony_ci i2so1_parents, 0x530, 0, 2, 7), 8558c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SI1_SEL, "i2si1_sel", 8568c2ecf20Sopenharmony_ci i2so1_parents, 0x530, 8, 2, 15), 8578c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SI2_SEL, "i2si2_sel", 8588c2ecf20Sopenharmony_ci i2so1_parents, 0x530, 16, 2, 23), 8598c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2SI3_SEL, "i2si3_sel", 8608c2ecf20Sopenharmony_ci i2so1_parents, 0x530, 24, 2, 31), 8618c2ecf20Sopenharmony_ci /* CLK_CFG_14 */ 8628c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ETHER_125M_SEL, "ether_125m_sel", 8638c2ecf20Sopenharmony_ci ether_125m_parents, 0x540, 0, 2, 7), 8648c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ETHER_50M_SEL, "ether_50m_sel", 8658c2ecf20Sopenharmony_ci ether_50m_parents, 0x540, 8, 2, 15), 8668c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_JPGDEC_SEL, "jpgdec_sel", 8678c2ecf20Sopenharmony_ci jpgdec_parents, 0x540, 16, 4, 23), 8688c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_SPISLV_SEL, "spislv_sel", 8698c2ecf20Sopenharmony_ci spislv_parents, 0x540, 24, 3, 31), 8708c2ecf20Sopenharmony_ci /* CLK_CFG_15 */ 8718c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_ETHER_50M_RMII_SEL, "ether_sel", 8728c2ecf20Sopenharmony_ci ether_parents, 0x550, 0, 2, 7), 8738c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_CAM2TG_SEL, "cam2tg_sel", 8748c2ecf20Sopenharmony_ci camtg_parents, 0x550, 8, 4, 15), 8758c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_DI_SEL, "di_sel", 8768c2ecf20Sopenharmony_ci di_parents, 0x550, 16, 3, 23), 8778c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_TVD_SEL, "tvd_sel", 8788c2ecf20Sopenharmony_ci tvd_parents, 0x550, 24, 2, 31), 8798c2ecf20Sopenharmony_ci /* CLK_CFG_16 */ 8808c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_I2C_SEL, "i2c_sel", 8818c2ecf20Sopenharmony_ci i2c_parents, 0x560, 0, 3, 7), 8828c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_PWM_INFRA_SEL, "pwm_infra_sel", 8838c2ecf20Sopenharmony_ci pwm_parents, 0x560, 8, 2, 15), 8848c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_MSDC0P_AES_SEL, "msdc0p_aes_sel", 8858c2ecf20Sopenharmony_ci msdc0p_aes_parents, 0x560, 16, 2, 23), 8868c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_CMSYS_SEL, "cmsys_sel", 8878c2ecf20Sopenharmony_ci cmsys_parents, 0x560, 24, 3, 31), 8888c2ecf20Sopenharmony_ci /* CLK_CFG_17 */ 8898c2ecf20Sopenharmony_ci MUX_GATE(CLK_TOP_GCPU_SEL, "gcpu_sel", 8908c2ecf20Sopenharmony_ci gcpu_parents, 0x570, 0, 3, 7), 8918c2ecf20Sopenharmony_ci /* CLK_AUDDIV_4 */ 8928c2ecf20Sopenharmony_ci MUX(CLK_TOP_AUD_APLL1_SEL, "aud_apll1_sel", 8938c2ecf20Sopenharmony_ci aud_apll1_parents, 0x134, 0, 1), 8948c2ecf20Sopenharmony_ci MUX(CLK_TOP_AUD_APLL2_SEL, "aud_apll2_sel", 8958c2ecf20Sopenharmony_ci aud_apll2_parents, 0x134, 1, 1), 8968c2ecf20Sopenharmony_ci MUX(CLK_TOP_DA_AUDULL_VTX_6P5M_SEL, "audull_vtx_sel", 8978c2ecf20Sopenharmony_ci audull_vtx_parents, 0x134, 31, 1), 8988c2ecf20Sopenharmony_ci MUX(CLK_TOP_APLL1_REF_SEL, "apll1_ref_sel", 8998c2ecf20Sopenharmony_ci apll1_ref_parents, 0x134, 4, 3), 9008c2ecf20Sopenharmony_ci MUX(CLK_TOP_APLL2_REF_SEL, "apll2_ref_sel", 9018c2ecf20Sopenharmony_ci apll1_ref_parents, 0x134, 7, 3), 9028c2ecf20Sopenharmony_ci}; 9038c2ecf20Sopenharmony_ci 9048c2ecf20Sopenharmony_cistatic const char * const mcu_mp0_parents[] = { 9058c2ecf20Sopenharmony_ci "clk26m", 9068c2ecf20Sopenharmony_ci "armca35pll_ck", 9078c2ecf20Sopenharmony_ci "f_mp0_pll1_ck", 9088c2ecf20Sopenharmony_ci "f_mp0_pll2_ck" 9098c2ecf20Sopenharmony_ci}; 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_cistatic const char * const mcu_mp2_parents[] = { 9128c2ecf20Sopenharmony_ci "clk26m", 9138c2ecf20Sopenharmony_ci "armca72pll_ck", 9148c2ecf20Sopenharmony_ci "f_big_pll1_ck", 9158c2ecf20Sopenharmony_ci "f_big_pll2_ck" 9168c2ecf20Sopenharmony_ci}; 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_cistatic const char * const mcu_bus_parents[] = { 9198c2ecf20Sopenharmony_ci "clk26m", 9208c2ecf20Sopenharmony_ci "cci400_sel", 9218c2ecf20Sopenharmony_ci "f_bus_pll1_ck", 9228c2ecf20Sopenharmony_ci "f_bus_pll2_ck" 9238c2ecf20Sopenharmony_ci}; 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_cistatic struct mtk_composite mcu_muxes[] = { 9268c2ecf20Sopenharmony_ci /* mp0_pll_divider_cfg */ 9278c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_MCU_MP0_SEL, "mcu_mp0_sel", mcu_mp0_parents, 0x7A0, 9288c2ecf20Sopenharmony_ci 9, 2, -1, CLK_IS_CRITICAL), 9298c2ecf20Sopenharmony_ci /* mp2_pll_divider_cfg */ 9308c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_MCU_MP2_SEL, "mcu_mp2_sel", mcu_mp2_parents, 0x7A8, 9318c2ecf20Sopenharmony_ci 9, 2, -1, CLK_IS_CRITICAL), 9328c2ecf20Sopenharmony_ci /* bus_pll_divider_cfg */ 9338c2ecf20Sopenharmony_ci MUX_GATE_FLAGS(CLK_MCU_BUS_SEL, "mcu_bus_sel", mcu_bus_parents, 0x7C0, 9348c2ecf20Sopenharmony_ci 9, 2, -1, CLK_IS_CRITICAL), 9358c2ecf20Sopenharmony_ci}; 9368c2ecf20Sopenharmony_ci 9378c2ecf20Sopenharmony_cistatic const struct mtk_clk_divider top_adj_divs[] = { 9388c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV0, "apll_div0", "i2so1_sel", 0x124, 0, 8), 9398c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV1, "apll_div1", "i2so2_sel", 0x124, 8, 8), 9408c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV2, "apll_div2", "i2so3_sel", 0x124, 16, 8), 9418c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV3, "apll_div3", "tdmo0_sel", 0x124, 24, 8), 9428c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV4, "apll_div4", "tdmo1_sel", 0x128, 0, 8), 9438c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV5, "apll_div5", "i2si1_sel", 0x128, 8, 8), 9448c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV6, "apll_div6", "i2si2_sel", 0x128, 16, 8), 9458c2ecf20Sopenharmony_ci DIV_ADJ(CLK_TOP_APLL_DIV7, "apll_div7", "i2si3_sel", 0x128, 24, 8), 9468c2ecf20Sopenharmony_ci}; 9478c2ecf20Sopenharmony_ci 9488c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs top0_cg_regs = { 9498c2ecf20Sopenharmony_ci .set_ofs = 0x120, 9508c2ecf20Sopenharmony_ci .clr_ofs = 0x120, 9518c2ecf20Sopenharmony_ci .sta_ofs = 0x120, 9528c2ecf20Sopenharmony_ci}; 9538c2ecf20Sopenharmony_ci 9548c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs top1_cg_regs = { 9558c2ecf20Sopenharmony_ci .set_ofs = 0x424, 9568c2ecf20Sopenharmony_ci .clr_ofs = 0x424, 9578c2ecf20Sopenharmony_ci .sta_ofs = 0x424, 9588c2ecf20Sopenharmony_ci}; 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci#define GATE_TOP0(_id, _name, _parent, _shift) { \ 9618c2ecf20Sopenharmony_ci .id = _id, \ 9628c2ecf20Sopenharmony_ci .name = _name, \ 9638c2ecf20Sopenharmony_ci .parent_name = _parent, \ 9648c2ecf20Sopenharmony_ci .regs = &top0_cg_regs, \ 9658c2ecf20Sopenharmony_ci .shift = _shift, \ 9668c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_no_setclr, \ 9678c2ecf20Sopenharmony_ci } 9688c2ecf20Sopenharmony_ci 9698c2ecf20Sopenharmony_ci#define GATE_TOP1(_id, _name, _parent, _shift) { \ 9708c2ecf20Sopenharmony_ci .id = _id, \ 9718c2ecf20Sopenharmony_ci .name = _name, \ 9728c2ecf20Sopenharmony_ci .parent_name = _parent, \ 9738c2ecf20Sopenharmony_ci .regs = &top1_cg_regs, \ 9748c2ecf20Sopenharmony_ci .shift = _shift, \ 9758c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_no_setclr_inv, \ 9768c2ecf20Sopenharmony_ci } 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_cistatic const struct mtk_gate top_clks[] = { 9798c2ecf20Sopenharmony_ci /* TOP0 */ 9808c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN0, "apll_div_pdn0", "i2so1_sel", 0), 9818c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN1, "apll_div_pdn1", "i2so2_sel", 1), 9828c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN2, "apll_div_pdn2", "i2so3_sel", 2), 9838c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN3, "apll_div_pdn3", "tdmo0_sel", 3), 9848c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN4, "apll_div_pdn4", "tdmo1_sel", 4), 9858c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN5, "apll_div_pdn5", "i2si1_sel", 5), 9868c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN6, "apll_div_pdn6", "i2si2_sel", 6), 9878c2ecf20Sopenharmony_ci GATE_TOP0(CLK_TOP_APLL_DIV_PDN7, "apll_div_pdn7", "i2si3_sel", 7), 9888c2ecf20Sopenharmony_ci /* TOP1 */ 9898c2ecf20Sopenharmony_ci GATE_TOP1(CLK_TOP_NFI2X_EN, "nfi2x_en", "nfi2x_sel", 0), 9908c2ecf20Sopenharmony_ci GATE_TOP1(CLK_TOP_NFIECC_EN, "nfiecc_en", "nfiecc_sel", 1), 9918c2ecf20Sopenharmony_ci GATE_TOP1(CLK_TOP_NFI1X_CK_EN, "nfi1x_ck_en", "nfi2x_sel", 2), 9928c2ecf20Sopenharmony_ci}; 9938c2ecf20Sopenharmony_ci 9948c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs infra_cg_regs = { 9958c2ecf20Sopenharmony_ci .set_ofs = 0x40, 9968c2ecf20Sopenharmony_ci .clr_ofs = 0x44, 9978c2ecf20Sopenharmony_ci .sta_ofs = 0x48, 9988c2ecf20Sopenharmony_ci}; 9998c2ecf20Sopenharmony_ci 10008c2ecf20Sopenharmony_ci#define GATE_INFRA(_id, _name, _parent, _shift) { \ 10018c2ecf20Sopenharmony_ci .id = _id, \ 10028c2ecf20Sopenharmony_ci .name = _name, \ 10038c2ecf20Sopenharmony_ci .parent_name = _parent, \ 10048c2ecf20Sopenharmony_ci .regs = &infra_cg_regs, \ 10058c2ecf20Sopenharmony_ci .shift = _shift, \ 10068c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_setclr, \ 10078c2ecf20Sopenharmony_ci } 10088c2ecf20Sopenharmony_ci 10098c2ecf20Sopenharmony_cistatic const struct mtk_gate infra_clks[] = { 10108c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_DBGCLK, "infra_dbgclk", "axi_sel", 0), 10118c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_GCE, "infra_gce", "axi_sel", 6), 10128c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_M4U, "infra_m4u", "mem_sel", 8), 10138c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_KP, "infra_kp", "axi_sel", 16), 10148c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_AO_SPI0, "infra_ao_spi0", "spi_sel", 24), 10158c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_AO_SPI1, "infra_ao_spi1", "spislv_sel", 25), 10168c2ecf20Sopenharmony_ci GATE_INFRA(CLK_INFRA_AO_UART5, "infra_ao_uart5", "axi_sel", 26), 10178c2ecf20Sopenharmony_ci}; 10188c2ecf20Sopenharmony_ci 10198c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs peri0_cg_regs = { 10208c2ecf20Sopenharmony_ci .set_ofs = 0x8, 10218c2ecf20Sopenharmony_ci .clr_ofs = 0x10, 10228c2ecf20Sopenharmony_ci .sta_ofs = 0x18, 10238c2ecf20Sopenharmony_ci}; 10248c2ecf20Sopenharmony_ci 10258c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs peri1_cg_regs = { 10268c2ecf20Sopenharmony_ci .set_ofs = 0xc, 10278c2ecf20Sopenharmony_ci .clr_ofs = 0x14, 10288c2ecf20Sopenharmony_ci .sta_ofs = 0x1c, 10298c2ecf20Sopenharmony_ci}; 10308c2ecf20Sopenharmony_ci 10318c2ecf20Sopenharmony_cistatic const struct mtk_gate_regs peri2_cg_regs = { 10328c2ecf20Sopenharmony_ci .set_ofs = 0x42c, 10338c2ecf20Sopenharmony_ci .clr_ofs = 0x42c, 10348c2ecf20Sopenharmony_ci .sta_ofs = 0x42c, 10358c2ecf20Sopenharmony_ci}; 10368c2ecf20Sopenharmony_ci 10378c2ecf20Sopenharmony_ci#define GATE_PERI0(_id, _name, _parent, _shift) { \ 10388c2ecf20Sopenharmony_ci .id = _id, \ 10398c2ecf20Sopenharmony_ci .name = _name, \ 10408c2ecf20Sopenharmony_ci .parent_name = _parent, \ 10418c2ecf20Sopenharmony_ci .regs = &peri0_cg_regs, \ 10428c2ecf20Sopenharmony_ci .shift = _shift, \ 10438c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_setclr, \ 10448c2ecf20Sopenharmony_ci } 10458c2ecf20Sopenharmony_ci 10468c2ecf20Sopenharmony_ci#define GATE_PERI1(_id, _name, _parent, _shift) { \ 10478c2ecf20Sopenharmony_ci .id = _id, \ 10488c2ecf20Sopenharmony_ci .name = _name, \ 10498c2ecf20Sopenharmony_ci .parent_name = _parent, \ 10508c2ecf20Sopenharmony_ci .regs = &peri1_cg_regs, \ 10518c2ecf20Sopenharmony_ci .shift = _shift, \ 10528c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_setclr, \ 10538c2ecf20Sopenharmony_ci } 10548c2ecf20Sopenharmony_ci 10558c2ecf20Sopenharmony_ci#define GATE_PERI2(_id, _name, _parent, _shift) { \ 10568c2ecf20Sopenharmony_ci .id = _id, \ 10578c2ecf20Sopenharmony_ci .name = _name, \ 10588c2ecf20Sopenharmony_ci .parent_name = _parent, \ 10598c2ecf20Sopenharmony_ci .regs = &peri2_cg_regs, \ 10608c2ecf20Sopenharmony_ci .shift = _shift, \ 10618c2ecf20Sopenharmony_ci .ops = &mtk_clk_gate_ops_no_setclr_inv, \ 10628c2ecf20Sopenharmony_ci } 10638c2ecf20Sopenharmony_ci 10648c2ecf20Sopenharmony_cistatic const struct mtk_gate peri_clks[] = { 10658c2ecf20Sopenharmony_ci /* PERI0 */ 10668c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_NFI, "per_nfi", 10678c2ecf20Sopenharmony_ci "axi_sel", 0), 10688c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_THERM, "per_therm", 10698c2ecf20Sopenharmony_ci "axi_sel", 1), 10708c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM0, "per_pwm0", 10718c2ecf20Sopenharmony_ci "pwm_sel", 2), 10728c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM1, "per_pwm1", 10738c2ecf20Sopenharmony_ci "pwm_sel", 3), 10748c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM2, "per_pwm2", 10758c2ecf20Sopenharmony_ci "pwm_sel", 4), 10768c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM3, "per_pwm3", 10778c2ecf20Sopenharmony_ci "pwm_sel", 5), 10788c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM4, "per_pwm4", 10798c2ecf20Sopenharmony_ci "pwm_sel", 6), 10808c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM5, "per_pwm5", 10818c2ecf20Sopenharmony_ci "pwm_sel", 7), 10828c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM6, "per_pwm6", 10838c2ecf20Sopenharmony_ci "pwm_sel", 8), 10848c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM7, "per_pwm7", 10858c2ecf20Sopenharmony_ci "pwm_sel", 9), 10868c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_PWM, "per_pwm", 10878c2ecf20Sopenharmony_ci "pwm_sel", 10), 10888c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_AP_DMA, "per_ap_dma", 10898c2ecf20Sopenharmony_ci "axi_sel", 13), 10908c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_MSDC30_0, "per_msdc30_0", 10918c2ecf20Sopenharmony_ci "msdc50_0_sel", 14), 10928c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_MSDC30_1, "per_msdc30_1", 10938c2ecf20Sopenharmony_ci "msdc30_1_sel", 15), 10948c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_MSDC30_2, "per_msdc30_2", 10958c2ecf20Sopenharmony_ci "msdc30_2_sel", 16), 10968c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_MSDC30_3, "per_msdc30_3", 10978c2ecf20Sopenharmony_ci "msdc30_3_sel", 17), 10988c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_UART0, "per_uart0", 10998c2ecf20Sopenharmony_ci "uart_sel", 20), 11008c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_UART1, "per_uart1", 11018c2ecf20Sopenharmony_ci "uart_sel", 21), 11028c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_UART2, "per_uart2", 11038c2ecf20Sopenharmony_ci "uart_sel", 22), 11048c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_UART3, "per_uart3", 11058c2ecf20Sopenharmony_ci "uart_sel", 23), 11068c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_I2C0, "per_i2c0", 11078c2ecf20Sopenharmony_ci "axi_sel", 24), 11088c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_I2C1, "per_i2c1", 11098c2ecf20Sopenharmony_ci "axi_sel", 25), 11108c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_I2C2, "per_i2c2", 11118c2ecf20Sopenharmony_ci "axi_sel", 26), 11128c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_I2C3, "per_i2c3", 11138c2ecf20Sopenharmony_ci "axi_sel", 27), 11148c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_I2C4, "per_i2c4", 11158c2ecf20Sopenharmony_ci "axi_sel", 28), 11168c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_AUXADC, "per_auxadc", 11178c2ecf20Sopenharmony_ci "ltepll_fs26m", 29), 11188c2ecf20Sopenharmony_ci GATE_PERI0(CLK_PERI_SPI0, "per_spi0", 11198c2ecf20Sopenharmony_ci "spi_sel", 30), 11208c2ecf20Sopenharmony_ci /* PERI1 */ 11218c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_SPI, "per_spi", 11228c2ecf20Sopenharmony_ci "spinor_sel", 1), 11238c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_I2C5, "per_i2c5", 11248c2ecf20Sopenharmony_ci "axi_sel", 3), 11258c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_SPI2, "per_spi2", 11268c2ecf20Sopenharmony_ci "spi_sel", 5), 11278c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_SPI3, "per_spi3", 11288c2ecf20Sopenharmony_ci "spi_sel", 6), 11298c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_SPI5, "per_spi5", 11308c2ecf20Sopenharmony_ci "spi_sel", 8), 11318c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_UART4, "per_uart4", 11328c2ecf20Sopenharmony_ci "uart_sel", 9), 11338c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_SFLASH, "per_sflash", 11348c2ecf20Sopenharmony_ci "uart_sel", 11), 11358c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_GMAC, "per_gmac", 11368c2ecf20Sopenharmony_ci "uart_sel", 12), 11378c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_PCIE0, "per_pcie0", 11388c2ecf20Sopenharmony_ci "uart_sel", 14), 11398c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_PCIE1, "per_pcie1", 11408c2ecf20Sopenharmony_ci "uart_sel", 15), 11418c2ecf20Sopenharmony_ci GATE_PERI1(CLK_PERI_GMAC_PCLK, "per_gmac_pclk", 11428c2ecf20Sopenharmony_ci "uart_sel", 16), 11438c2ecf20Sopenharmony_ci /* PERI2 */ 11448c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC50_0_EN, "per_msdc50_0_en", 11458c2ecf20Sopenharmony_ci "msdc50_0_sel", 0), 11468c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC30_1_EN, "per_msdc30_1_en", 11478c2ecf20Sopenharmony_ci "msdc30_1_sel", 1), 11488c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC30_2_EN, "per_msdc30_2_en", 11498c2ecf20Sopenharmony_ci "msdc30_2_sel", 2), 11508c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC30_3_EN, "per_msdc30_3_en", 11518c2ecf20Sopenharmony_ci "msdc30_3_sel", 3), 11528c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC50_0_HCLK_EN, "per_msdc50_0_h", 11538c2ecf20Sopenharmony_ci "msdc50_0_h_sel", 4), 11548c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC50_3_HCLK_EN, "per_msdc50_3_h", 11558c2ecf20Sopenharmony_ci "msdc50_3_h_sel", 5), 11568c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC30_0_QTR_EN, "per_msdc30_0_q", 11578c2ecf20Sopenharmony_ci "axi_sel", 6), 11588c2ecf20Sopenharmony_ci GATE_PERI2(CLK_PERI_MSDC30_3_QTR_EN, "per_msdc30_3_q", 11598c2ecf20Sopenharmony_ci "mem_sel", 7), 11608c2ecf20Sopenharmony_ci}; 11618c2ecf20Sopenharmony_ci 11628c2ecf20Sopenharmony_ci#define MT2712_PLL_FMAX (3000UL * MHZ) 11638c2ecf20Sopenharmony_ci 11648c2ecf20Sopenharmony_ci#define CON0_MT2712_RST_BAR BIT(24) 11658c2ecf20Sopenharmony_ci 11668c2ecf20Sopenharmony_ci#define PLL_B(_id, _name, _reg, _pwr_reg, _en_mask, _flags, _pcwbits, \ 11678c2ecf20Sopenharmony_ci _pd_reg, _pd_shift, _tuner_reg, _tuner_en_reg, \ 11688c2ecf20Sopenharmony_ci _tuner_en_bit, _pcw_reg, _pcw_shift, \ 11698c2ecf20Sopenharmony_ci _div_table) { \ 11708c2ecf20Sopenharmony_ci .id = _id, \ 11718c2ecf20Sopenharmony_ci .name = _name, \ 11728c2ecf20Sopenharmony_ci .reg = _reg, \ 11738c2ecf20Sopenharmony_ci .pwr_reg = _pwr_reg, \ 11748c2ecf20Sopenharmony_ci .en_mask = _en_mask, \ 11758c2ecf20Sopenharmony_ci .flags = _flags, \ 11768c2ecf20Sopenharmony_ci .rst_bar_mask = CON0_MT2712_RST_BAR, \ 11778c2ecf20Sopenharmony_ci .fmax = MT2712_PLL_FMAX, \ 11788c2ecf20Sopenharmony_ci .pcwbits = _pcwbits, \ 11798c2ecf20Sopenharmony_ci .pd_reg = _pd_reg, \ 11808c2ecf20Sopenharmony_ci .pd_shift = _pd_shift, \ 11818c2ecf20Sopenharmony_ci .tuner_reg = _tuner_reg, \ 11828c2ecf20Sopenharmony_ci .tuner_en_reg = _tuner_en_reg, \ 11838c2ecf20Sopenharmony_ci .tuner_en_bit = _tuner_en_bit, \ 11848c2ecf20Sopenharmony_ci .pcw_reg = _pcw_reg, \ 11858c2ecf20Sopenharmony_ci .pcw_shift = _pcw_shift, \ 11868c2ecf20Sopenharmony_ci .div_table = _div_table, \ 11878c2ecf20Sopenharmony_ci } 11888c2ecf20Sopenharmony_ci 11898c2ecf20Sopenharmony_ci#define PLL(_id, _name, _reg, _pwr_reg, _en_mask, _flags, _pcwbits, \ 11908c2ecf20Sopenharmony_ci _pd_reg, _pd_shift, _tuner_reg, _tuner_en_reg, \ 11918c2ecf20Sopenharmony_ci _tuner_en_bit, _pcw_reg, _pcw_shift) \ 11928c2ecf20Sopenharmony_ci PLL_B(_id, _name, _reg, _pwr_reg, _en_mask, _flags, \ 11938c2ecf20Sopenharmony_ci _pcwbits, _pd_reg, _pd_shift, _tuner_reg, \ 11948c2ecf20Sopenharmony_ci _tuner_en_reg, _tuner_en_bit, _pcw_reg, \ 11958c2ecf20Sopenharmony_ci _pcw_shift, NULL) 11968c2ecf20Sopenharmony_ci 11978c2ecf20Sopenharmony_cistatic const struct mtk_pll_div_table armca35pll_div_table[] = { 11988c2ecf20Sopenharmony_ci { .div = 0, .freq = MT2712_PLL_FMAX }, 11998c2ecf20Sopenharmony_ci { .div = 1, .freq = 1202500000 }, 12008c2ecf20Sopenharmony_ci { .div = 2, .freq = 500500000 }, 12018c2ecf20Sopenharmony_ci { .div = 3, .freq = 315250000 }, 12028c2ecf20Sopenharmony_ci { .div = 4, .freq = 157625000 }, 12038c2ecf20Sopenharmony_ci { } /* sentinel */ 12048c2ecf20Sopenharmony_ci}; 12058c2ecf20Sopenharmony_ci 12068c2ecf20Sopenharmony_cistatic const struct mtk_pll_div_table armca72pll_div_table[] = { 12078c2ecf20Sopenharmony_ci { .div = 0, .freq = MT2712_PLL_FMAX }, 12088c2ecf20Sopenharmony_ci { .div = 1, .freq = 994500000 }, 12098c2ecf20Sopenharmony_ci { .div = 2, .freq = 520000000 }, 12108c2ecf20Sopenharmony_ci { .div = 3, .freq = 315250000 }, 12118c2ecf20Sopenharmony_ci { .div = 4, .freq = 157625000 }, 12128c2ecf20Sopenharmony_ci { } /* sentinel */ 12138c2ecf20Sopenharmony_ci}; 12148c2ecf20Sopenharmony_ci 12158c2ecf20Sopenharmony_cistatic const struct mtk_pll_div_table mmpll_div_table[] = { 12168c2ecf20Sopenharmony_ci { .div = 0, .freq = MT2712_PLL_FMAX }, 12178c2ecf20Sopenharmony_ci { .div = 1, .freq = 1001000000 }, 12188c2ecf20Sopenharmony_ci { .div = 2, .freq = 601250000 }, 12198c2ecf20Sopenharmony_ci { .div = 3, .freq = 250250000 }, 12208c2ecf20Sopenharmony_ci { .div = 4, .freq = 125125000 }, 12218c2ecf20Sopenharmony_ci { } /* sentinel */ 12228c2ecf20Sopenharmony_ci}; 12238c2ecf20Sopenharmony_ci 12248c2ecf20Sopenharmony_cistatic const struct mtk_pll_data plls[] = { 12258c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_MAINPLL, "mainpll", 0x0230, 0x023C, 0xf0000101, 12268c2ecf20Sopenharmony_ci HAVE_RST_BAR, 31, 0x0230, 4, 0, 0, 0, 0x0234, 0), 12278c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_UNIVPLL, "univpll", 0x0240, 0x024C, 0xfe000101, 12288c2ecf20Sopenharmony_ci HAVE_RST_BAR, 31, 0x0240, 4, 0, 0, 0, 0x0244, 0), 12298c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_VCODECPLL, "vcodecpll", 0x0320, 0x032C, 0xc0000101, 12308c2ecf20Sopenharmony_ci 0, 31, 0x0320, 4, 0, 0, 0, 0x0324, 0), 12318c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_VENCPLL, "vencpll", 0x0280, 0x028C, 0x00000101, 12328c2ecf20Sopenharmony_ci 0, 31, 0x0280, 4, 0, 0, 0, 0x0284, 0), 12338c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_APLL1, "apll1", 0x0330, 0x0340, 0x00000101, 12348c2ecf20Sopenharmony_ci 0, 31, 0x0330, 4, 0x0338, 0x0014, 0, 0x0334, 0), 12358c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_APLL2, "apll2", 0x0350, 0x0360, 0x00000101, 12368c2ecf20Sopenharmony_ci 0, 31, 0x0350, 4, 0x0358, 0x0014, 1, 0x0354, 0), 12378c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_LVDSPLL, "lvdspll", 0x0370, 0x037c, 0x00000101, 12388c2ecf20Sopenharmony_ci 0, 31, 0x0370, 4, 0, 0, 0, 0x0374, 0), 12398c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_LVDSPLL2, "lvdspll2", 0x0390, 0x039C, 0x00000101, 12408c2ecf20Sopenharmony_ci 0, 31, 0x0390, 4, 0, 0, 0, 0x0394, 0), 12418c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_MSDCPLL, "msdcpll", 0x0270, 0x027C, 0x00000101, 12428c2ecf20Sopenharmony_ci 0, 31, 0x0270, 4, 0, 0, 0, 0x0274, 0), 12438c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_MSDCPLL2, "msdcpll2", 0x0410, 0x041C, 0x00000101, 12448c2ecf20Sopenharmony_ci 0, 31, 0x0410, 4, 0, 0, 0, 0x0414, 0), 12458c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_TVDPLL, "tvdpll", 0x0290, 0x029C, 0xc0000101, 12468c2ecf20Sopenharmony_ci 0, 31, 0x0290, 4, 0, 0, 0, 0x0294, 0), 12478c2ecf20Sopenharmony_ci PLL_B(CLK_APMIXED_MMPLL, "mmpll", 0x0250, 0x0260, 0x00000101, 12488c2ecf20Sopenharmony_ci 0, 31, 0x0250, 4, 0, 0, 0, 0x0254, 0, 12498c2ecf20Sopenharmony_ci mmpll_div_table), 12508c2ecf20Sopenharmony_ci PLL_B(CLK_APMIXED_ARMCA35PLL, "armca35pll", 0x0100, 0x0110, 0xf0000101, 12518c2ecf20Sopenharmony_ci HAVE_RST_BAR, 31, 0x0100, 4, 0, 0, 0, 0x0104, 0, 12528c2ecf20Sopenharmony_ci armca35pll_div_table), 12538c2ecf20Sopenharmony_ci PLL_B(CLK_APMIXED_ARMCA72PLL, "armca72pll", 0x0210, 0x0220, 0x00000101, 12548c2ecf20Sopenharmony_ci 0, 31, 0x0210, 4, 0, 0, 0, 0x0214, 0, 12558c2ecf20Sopenharmony_ci armca72pll_div_table), 12568c2ecf20Sopenharmony_ci PLL(CLK_APMIXED_ETHERPLL, "etherpll", 0x0300, 0x030C, 0xc0000101, 12578c2ecf20Sopenharmony_ci 0, 31, 0x0300, 4, 0, 0, 0, 0x0304, 0), 12588c2ecf20Sopenharmony_ci}; 12598c2ecf20Sopenharmony_ci 12608c2ecf20Sopenharmony_cistatic int clk_mt2712_apmixed_probe(struct platform_device *pdev) 12618c2ecf20Sopenharmony_ci{ 12628c2ecf20Sopenharmony_ci struct clk_onecell_data *clk_data; 12638c2ecf20Sopenharmony_ci int r; 12648c2ecf20Sopenharmony_ci struct device_node *node = pdev->dev.of_node; 12658c2ecf20Sopenharmony_ci 12668c2ecf20Sopenharmony_ci clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data); 12698c2ecf20Sopenharmony_ci 12708c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); 12718c2ecf20Sopenharmony_ci 12728c2ecf20Sopenharmony_ci if (r != 0) 12738c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 12748c2ecf20Sopenharmony_ci __func__, r); 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_ci return r; 12778c2ecf20Sopenharmony_ci} 12788c2ecf20Sopenharmony_ci 12798c2ecf20Sopenharmony_cistatic struct clk_onecell_data *top_clk_data; 12808c2ecf20Sopenharmony_ci 12818c2ecf20Sopenharmony_cistatic void clk_mt2712_top_init_early(struct device_node *node) 12828c2ecf20Sopenharmony_ci{ 12838c2ecf20Sopenharmony_ci int r, i; 12848c2ecf20Sopenharmony_ci 12858c2ecf20Sopenharmony_ci if (!top_clk_data) { 12868c2ecf20Sopenharmony_ci top_clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK); 12878c2ecf20Sopenharmony_ci 12888c2ecf20Sopenharmony_ci for (i = 0; i < CLK_TOP_NR_CLK; i++) 12898c2ecf20Sopenharmony_ci top_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER); 12908c2ecf20Sopenharmony_ci } 12918c2ecf20Sopenharmony_ci 12928c2ecf20Sopenharmony_ci mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs), 12938c2ecf20Sopenharmony_ci top_clk_data); 12948c2ecf20Sopenharmony_ci 12958c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, top_clk_data); 12968c2ecf20Sopenharmony_ci if (r) 12978c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 12988c2ecf20Sopenharmony_ci __func__, r); 12998c2ecf20Sopenharmony_ci} 13008c2ecf20Sopenharmony_ci 13018c2ecf20Sopenharmony_ciCLK_OF_DECLARE_DRIVER(mt2712_topckgen, "mediatek,mt2712-topckgen", 13028c2ecf20Sopenharmony_ci clk_mt2712_top_init_early); 13038c2ecf20Sopenharmony_ci 13048c2ecf20Sopenharmony_cistatic int clk_mt2712_top_probe(struct platform_device *pdev) 13058c2ecf20Sopenharmony_ci{ 13068c2ecf20Sopenharmony_ci int r, i; 13078c2ecf20Sopenharmony_ci struct device_node *node = pdev->dev.of_node; 13088c2ecf20Sopenharmony_ci void __iomem *base; 13098c2ecf20Sopenharmony_ci 13108c2ecf20Sopenharmony_ci base = devm_platform_ioremap_resource(pdev, 0); 13118c2ecf20Sopenharmony_ci if (IS_ERR(base)) { 13128c2ecf20Sopenharmony_ci pr_err("%s(): ioremap failed\n", __func__); 13138c2ecf20Sopenharmony_ci return PTR_ERR(base); 13148c2ecf20Sopenharmony_ci } 13158c2ecf20Sopenharmony_ci 13168c2ecf20Sopenharmony_ci if (!top_clk_data) { 13178c2ecf20Sopenharmony_ci top_clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK); 13188c2ecf20Sopenharmony_ci } else { 13198c2ecf20Sopenharmony_ci for (i = 0; i < CLK_TOP_NR_CLK; i++) { 13208c2ecf20Sopenharmony_ci if (top_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER)) 13218c2ecf20Sopenharmony_ci top_clk_data->clks[i] = ERR_PTR(-ENOENT); 13228c2ecf20Sopenharmony_ci } 13238c2ecf20Sopenharmony_ci } 13248c2ecf20Sopenharmony_ci 13258c2ecf20Sopenharmony_ci mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), 13268c2ecf20Sopenharmony_ci top_clk_data); 13278c2ecf20Sopenharmony_ci mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs), 13288c2ecf20Sopenharmony_ci top_clk_data); 13298c2ecf20Sopenharmony_ci mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data); 13308c2ecf20Sopenharmony_ci mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base, 13318c2ecf20Sopenharmony_ci &mt2712_clk_lock, top_clk_data); 13328c2ecf20Sopenharmony_ci mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base, 13338c2ecf20Sopenharmony_ci &mt2712_clk_lock, top_clk_data); 13348c2ecf20Sopenharmony_ci mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), 13358c2ecf20Sopenharmony_ci top_clk_data); 13368c2ecf20Sopenharmony_ci 13378c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, top_clk_data); 13388c2ecf20Sopenharmony_ci 13398c2ecf20Sopenharmony_ci if (r != 0) 13408c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 13418c2ecf20Sopenharmony_ci __func__, r); 13428c2ecf20Sopenharmony_ci 13438c2ecf20Sopenharmony_ci return r; 13448c2ecf20Sopenharmony_ci} 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_cistatic int clk_mt2712_infra_probe(struct platform_device *pdev) 13478c2ecf20Sopenharmony_ci{ 13488c2ecf20Sopenharmony_ci struct clk_onecell_data *clk_data; 13498c2ecf20Sopenharmony_ci int r; 13508c2ecf20Sopenharmony_ci struct device_node *node = pdev->dev.of_node; 13518c2ecf20Sopenharmony_ci 13528c2ecf20Sopenharmony_ci clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK); 13538c2ecf20Sopenharmony_ci 13548c2ecf20Sopenharmony_ci mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), 13558c2ecf20Sopenharmony_ci clk_data); 13568c2ecf20Sopenharmony_ci 13578c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); 13588c2ecf20Sopenharmony_ci 13598c2ecf20Sopenharmony_ci if (r != 0) 13608c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 13618c2ecf20Sopenharmony_ci __func__, r); 13628c2ecf20Sopenharmony_ci 13638c2ecf20Sopenharmony_ci mtk_register_reset_controller(node, 2, 0x30); 13648c2ecf20Sopenharmony_ci 13658c2ecf20Sopenharmony_ci return r; 13668c2ecf20Sopenharmony_ci} 13678c2ecf20Sopenharmony_ci 13688c2ecf20Sopenharmony_cistatic int clk_mt2712_peri_probe(struct platform_device *pdev) 13698c2ecf20Sopenharmony_ci{ 13708c2ecf20Sopenharmony_ci struct clk_onecell_data *clk_data; 13718c2ecf20Sopenharmony_ci int r; 13728c2ecf20Sopenharmony_ci struct device_node *node = pdev->dev.of_node; 13738c2ecf20Sopenharmony_ci 13748c2ecf20Sopenharmony_ci clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK); 13758c2ecf20Sopenharmony_ci 13768c2ecf20Sopenharmony_ci mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), 13778c2ecf20Sopenharmony_ci clk_data); 13788c2ecf20Sopenharmony_ci 13798c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); 13808c2ecf20Sopenharmony_ci 13818c2ecf20Sopenharmony_ci if (r != 0) 13828c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 13838c2ecf20Sopenharmony_ci __func__, r); 13848c2ecf20Sopenharmony_ci 13858c2ecf20Sopenharmony_ci mtk_register_reset_controller(node, 2, 0); 13868c2ecf20Sopenharmony_ci 13878c2ecf20Sopenharmony_ci return r; 13888c2ecf20Sopenharmony_ci} 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_cistatic int clk_mt2712_mcu_probe(struct platform_device *pdev) 13918c2ecf20Sopenharmony_ci{ 13928c2ecf20Sopenharmony_ci struct clk_onecell_data *clk_data; 13938c2ecf20Sopenharmony_ci int r; 13948c2ecf20Sopenharmony_ci struct device_node *node = pdev->dev.of_node; 13958c2ecf20Sopenharmony_ci void __iomem *base; 13968c2ecf20Sopenharmony_ci 13978c2ecf20Sopenharmony_ci base = devm_platform_ioremap_resource(pdev, 0); 13988c2ecf20Sopenharmony_ci if (IS_ERR(base)) { 13998c2ecf20Sopenharmony_ci pr_err("%s(): ioremap failed\n", __func__); 14008c2ecf20Sopenharmony_ci return PTR_ERR(base); 14018c2ecf20Sopenharmony_ci } 14028c2ecf20Sopenharmony_ci 14038c2ecf20Sopenharmony_ci clk_data = mtk_alloc_clk_data(CLK_MCU_NR_CLK); 14048c2ecf20Sopenharmony_ci 14058c2ecf20Sopenharmony_ci mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base, 14068c2ecf20Sopenharmony_ci &mt2712_clk_lock, clk_data); 14078c2ecf20Sopenharmony_ci 14088c2ecf20Sopenharmony_ci r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); 14098c2ecf20Sopenharmony_ci 14108c2ecf20Sopenharmony_ci if (r != 0) 14118c2ecf20Sopenharmony_ci pr_err("%s(): could not register clock provider: %d\n", 14128c2ecf20Sopenharmony_ci __func__, r); 14138c2ecf20Sopenharmony_ci 14148c2ecf20Sopenharmony_ci return r; 14158c2ecf20Sopenharmony_ci} 14168c2ecf20Sopenharmony_ci 14178c2ecf20Sopenharmony_cistatic const struct of_device_id of_match_clk_mt2712[] = { 14188c2ecf20Sopenharmony_ci { 14198c2ecf20Sopenharmony_ci .compatible = "mediatek,mt2712-apmixedsys", 14208c2ecf20Sopenharmony_ci .data = clk_mt2712_apmixed_probe, 14218c2ecf20Sopenharmony_ci }, { 14228c2ecf20Sopenharmony_ci .compatible = "mediatek,mt2712-topckgen", 14238c2ecf20Sopenharmony_ci .data = clk_mt2712_top_probe, 14248c2ecf20Sopenharmony_ci }, { 14258c2ecf20Sopenharmony_ci .compatible = "mediatek,mt2712-infracfg", 14268c2ecf20Sopenharmony_ci .data = clk_mt2712_infra_probe, 14278c2ecf20Sopenharmony_ci }, { 14288c2ecf20Sopenharmony_ci .compatible = "mediatek,mt2712-pericfg", 14298c2ecf20Sopenharmony_ci .data = clk_mt2712_peri_probe, 14308c2ecf20Sopenharmony_ci }, { 14318c2ecf20Sopenharmony_ci .compatible = "mediatek,mt2712-mcucfg", 14328c2ecf20Sopenharmony_ci .data = clk_mt2712_mcu_probe, 14338c2ecf20Sopenharmony_ci }, { 14348c2ecf20Sopenharmony_ci /* sentinel */ 14358c2ecf20Sopenharmony_ci } 14368c2ecf20Sopenharmony_ci}; 14378c2ecf20Sopenharmony_ci 14388c2ecf20Sopenharmony_cistatic int clk_mt2712_probe(struct platform_device *pdev) 14398c2ecf20Sopenharmony_ci{ 14408c2ecf20Sopenharmony_ci int (*clk_probe)(struct platform_device *); 14418c2ecf20Sopenharmony_ci int r; 14428c2ecf20Sopenharmony_ci 14438c2ecf20Sopenharmony_ci clk_probe = of_device_get_match_data(&pdev->dev); 14448c2ecf20Sopenharmony_ci if (!clk_probe) 14458c2ecf20Sopenharmony_ci return -EINVAL; 14468c2ecf20Sopenharmony_ci 14478c2ecf20Sopenharmony_ci r = clk_probe(pdev); 14488c2ecf20Sopenharmony_ci if (r != 0) 14498c2ecf20Sopenharmony_ci dev_err(&pdev->dev, 14508c2ecf20Sopenharmony_ci "could not register clock provider: %s: %d\n", 14518c2ecf20Sopenharmony_ci pdev->name, r); 14528c2ecf20Sopenharmony_ci 14538c2ecf20Sopenharmony_ci return r; 14548c2ecf20Sopenharmony_ci} 14558c2ecf20Sopenharmony_ci 14568c2ecf20Sopenharmony_cistatic struct platform_driver clk_mt2712_drv = { 14578c2ecf20Sopenharmony_ci .probe = clk_mt2712_probe, 14588c2ecf20Sopenharmony_ci .driver = { 14598c2ecf20Sopenharmony_ci .name = "clk-mt2712", 14608c2ecf20Sopenharmony_ci .of_match_table = of_match_clk_mt2712, 14618c2ecf20Sopenharmony_ci }, 14628c2ecf20Sopenharmony_ci}; 14638c2ecf20Sopenharmony_ci 14648c2ecf20Sopenharmony_cistatic int __init clk_mt2712_init(void) 14658c2ecf20Sopenharmony_ci{ 14668c2ecf20Sopenharmony_ci return platform_driver_register(&clk_mt2712_drv); 14678c2ecf20Sopenharmony_ci} 14688c2ecf20Sopenharmony_ci 14698c2ecf20Sopenharmony_ciarch_initcall(clk_mt2712_init); 1470