18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (C) 2015 Broadcom Corporation 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 58c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License as 68c2ecf20Sopenharmony_ci * published by the Free Software Foundation version 2. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * This program is distributed "as is" WITHOUT ANY WARRANTY of any 98c2ecf20Sopenharmony_ci * kind, whether express or implied; without even the implied warranty 108c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 118c2ecf20Sopenharmony_ci * GNU General Public License for more details. 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <linux/kernel.h> 158c2ecf20Sopenharmony_ci#include <linux/err.h> 168c2ecf20Sopenharmony_ci#include <linux/clk-provider.h> 178c2ecf20Sopenharmony_ci#include <linux/io.h> 188c2ecf20Sopenharmony_ci#include <linux/of.h> 198c2ecf20Sopenharmony_ci#include <linux/of_address.h> 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#include <dt-bindings/clock/bcm-ns2.h> 228c2ecf20Sopenharmony_ci#include "clk-iproc.h" 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define REG_VAL(o, s, w) { .offset = o, .shift = s, .width = w, } 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define AON_VAL(o, pw, ps, is) { .offset = o, .pwr_width = pw, \ 278c2ecf20Sopenharmony_ci .pwr_shift = ps, .iso_shift = is } 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define RESET_VAL(o, rs, prs) { .offset = o, .reset_shift = rs, \ 308c2ecf20Sopenharmony_ci .p_reset_shift = prs } 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define DF_VAL(o, kis, kiw, kps, kpw, kas, kaw) { .offset = o, .ki_shift = kis,\ 338c2ecf20Sopenharmony_ci .ki_width = kiw, .kp_shift = kps, .kp_width = kpw, .ka_shift = kas, \ 348c2ecf20Sopenharmony_ci .ka_width = kaw } 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define VCO_CTRL_VAL(uo, lo) { .u_offset = uo, .l_offset = lo } 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define ENABLE_VAL(o, es, hs, bs) { .offset = o, .enable_shift = es, \ 398c2ecf20Sopenharmony_ci .hold_shift = hs, .bypass_shift = bs } 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistatic const struct iproc_pll_ctrl genpll_scr = { 428c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON | IPROC_CLK_PLL_SPLIT_STAT_CTRL, 438c2ecf20Sopenharmony_ci .aon = AON_VAL(0x0, 1, 15, 12), 448c2ecf20Sopenharmony_ci .reset = RESET_VAL(0x4, 2, 1), 458c2ecf20Sopenharmony_ci .dig_filter = DF_VAL(0x0, 9, 3, 5, 4, 2, 3), 468c2ecf20Sopenharmony_ci .ndiv_int = REG_VAL(0x8, 4, 10), 478c2ecf20Sopenharmony_ci .pdiv = REG_VAL(0x8, 0, 4), 488c2ecf20Sopenharmony_ci .vco_ctrl = VCO_CTRL_VAL(0x10, 0xc), 498c2ecf20Sopenharmony_ci .status = REG_VAL(0x0, 27, 1), 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cistatic const struct iproc_clk_ctrl genpll_scr_clk[] = { 548c2ecf20Sopenharmony_ci /* bypass_shift, the last value passed into ENABLE_VAL(), is not defined 558c2ecf20Sopenharmony_ci * in NS2. However, it doesn't appear to be used anywhere, so setting 568c2ecf20Sopenharmony_ci * it to 0. 578c2ecf20Sopenharmony_ci */ 588c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_SCR_CLK] = { 598c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_SCR_CLK, 608c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 618c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 18, 12, 0), 628c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x18, 0, 8), 638c2ecf20Sopenharmony_ci }, 648c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_FS_CLK] = { 658c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_FS_CLK, 668c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 678c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 19, 13, 0), 688c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x18, 8, 8), 698c2ecf20Sopenharmony_ci }, 708c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_AUDIO_CLK] = { 718c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_AUDIO_CLK, 728c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 738c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 20, 14, 0), 748c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 0, 8), 758c2ecf20Sopenharmony_ci }, 768c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_CH3_UNUSED] = { 778c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_CH3_UNUSED, 788c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 798c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 21, 15, 0), 808c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 8, 8), 818c2ecf20Sopenharmony_ci }, 828c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_CH4_UNUSED] = { 838c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_CH4_UNUSED, 848c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 858c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 22, 16, 0), 868c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 16, 8), 878c2ecf20Sopenharmony_ci }, 888c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SCR_CH5_UNUSED] = { 898c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SCR_CH5_UNUSED, 908c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 918c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 23, 17, 0), 928c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 24, 8), 938c2ecf20Sopenharmony_ci }, 948c2ecf20Sopenharmony_ci}; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_cistatic void __init ns2_genpll_scr_clk_init(struct device_node *node) 978c2ecf20Sopenharmony_ci{ 988c2ecf20Sopenharmony_ci iproc_pll_clk_setup(node, &genpll_scr, NULL, 0, genpll_scr_clk, 998c2ecf20Sopenharmony_ci ARRAY_SIZE(genpll_scr_clk)); 1008c2ecf20Sopenharmony_ci} 1018c2ecf20Sopenharmony_ciCLK_OF_DECLARE(ns2_genpll_src_clk, "brcm,ns2-genpll-scr", 1028c2ecf20Sopenharmony_ci ns2_genpll_scr_clk_init); 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_cistatic const struct iproc_pll_ctrl genpll_sw = { 1058c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON | IPROC_CLK_PLL_SPLIT_STAT_CTRL, 1068c2ecf20Sopenharmony_ci .aon = AON_VAL(0x0, 1, 11, 10), 1078c2ecf20Sopenharmony_ci .reset = RESET_VAL(0x4, 2, 1), 1088c2ecf20Sopenharmony_ci .dig_filter = DF_VAL(0x0, 9, 3, 5, 4, 2, 3), 1098c2ecf20Sopenharmony_ci .ndiv_int = REG_VAL(0x8, 4, 10), 1108c2ecf20Sopenharmony_ci .pdiv = REG_VAL(0x8, 0, 4), 1118c2ecf20Sopenharmony_ci .vco_ctrl = VCO_CTRL_VAL(0x10, 0xc), 1128c2ecf20Sopenharmony_ci .status = REG_VAL(0x0, 13, 1), 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_cistatic const struct iproc_clk_ctrl genpll_sw_clk[] = { 1168c2ecf20Sopenharmony_ci /* bypass_shift, the last value passed into ENABLE_VAL(), is not defined 1178c2ecf20Sopenharmony_ci * in NS2. However, it doesn't appear to be used anywhere, so setting 1188c2ecf20Sopenharmony_ci * it to 0. 1198c2ecf20Sopenharmony_ci */ 1208c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_RPE_CLK] = { 1218c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_RPE_CLK, 1228c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1238c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 18, 12, 0), 1248c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x18, 0, 8), 1258c2ecf20Sopenharmony_ci }, 1268c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_250_CLK] = { 1278c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_250_CLK, 1288c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1298c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 19, 13, 0), 1308c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x18, 8, 8), 1318c2ecf20Sopenharmony_ci }, 1328c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_NIC_CLK] = { 1338c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_NIC_CLK, 1348c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1358c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 20, 14, 0), 1368c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 0, 8), 1378c2ecf20Sopenharmony_ci }, 1388c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_CHIMP_CLK] = { 1398c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_CHIMP_CLK, 1408c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1418c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 21, 15, 0), 1428c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 8, 8), 1438c2ecf20Sopenharmony_ci }, 1448c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_PORT_CLK] = { 1458c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_PORT_CLK, 1468c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1478c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 22, 16, 0), 1488c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 16, 8), 1498c2ecf20Sopenharmony_ci }, 1508c2ecf20Sopenharmony_ci [BCM_NS2_GENPLL_SW_SDIO_CLK] = { 1518c2ecf20Sopenharmony_ci .channel = BCM_NS2_GENPLL_SW_SDIO_CLK, 1528c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1538c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 23, 17, 0), 1548c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 24, 8), 1558c2ecf20Sopenharmony_ci }, 1568c2ecf20Sopenharmony_ci}; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_cistatic void __init ns2_genpll_sw_clk_init(struct device_node *node) 1598c2ecf20Sopenharmony_ci{ 1608c2ecf20Sopenharmony_ci iproc_pll_clk_setup(node, &genpll_sw, NULL, 0, genpll_sw_clk, 1618c2ecf20Sopenharmony_ci ARRAY_SIZE(genpll_sw_clk)); 1628c2ecf20Sopenharmony_ci} 1638c2ecf20Sopenharmony_ciCLK_OF_DECLARE(ns2_genpll_sw_clk, "brcm,ns2-genpll-sw", 1648c2ecf20Sopenharmony_ci ns2_genpll_sw_clk_init); 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_cistatic const struct iproc_pll_ctrl lcpll_ddr = { 1678c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON | IPROC_CLK_PLL_SPLIT_STAT_CTRL, 1688c2ecf20Sopenharmony_ci .aon = AON_VAL(0x0, 2, 1, 0), 1698c2ecf20Sopenharmony_ci .reset = RESET_VAL(0x4, 2, 1), 1708c2ecf20Sopenharmony_ci .dig_filter = DF_VAL(0x0, 9, 3, 5, 4, 1, 4), 1718c2ecf20Sopenharmony_ci .ndiv_int = REG_VAL(0x8, 4, 10), 1728c2ecf20Sopenharmony_ci .pdiv = REG_VAL(0x8, 0, 4), 1738c2ecf20Sopenharmony_ci .vco_ctrl = VCO_CTRL_VAL(0x10, 0xc), 1748c2ecf20Sopenharmony_ci .status = REG_VAL(0x0, 0, 1), 1758c2ecf20Sopenharmony_ci}; 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_cistatic const struct iproc_clk_ctrl lcpll_ddr_clk[] = { 1788c2ecf20Sopenharmony_ci /* bypass_shift, the last value passed into ENABLE_VAL(), is not defined 1798c2ecf20Sopenharmony_ci * in NS2. However, it doesn't appear to be used anywhere, so setting 1808c2ecf20Sopenharmony_ci * it to 0. 1818c2ecf20Sopenharmony_ci */ 1828c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_PCIE_SATA_USB_CLK] = { 1838c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_PCIE_SATA_USB_CLK, 1848c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1858c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 18, 12, 0), 1868c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 0, 8), 1878c2ecf20Sopenharmony_ci }, 1888c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_DDR_CLK] = { 1898c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_DDR_CLK, 1908c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1918c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 19, 13, 0), 1928c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 8, 8), 1938c2ecf20Sopenharmony_ci }, 1948c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_CH2_UNUSED] = { 1958c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_CH2_UNUSED, 1968c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 1978c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 20, 14, 0), 1988c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 0, 8), 1998c2ecf20Sopenharmony_ci }, 2008c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_CH3_UNUSED] = { 2018c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_CH3_UNUSED, 2028c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2038c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 21, 15, 0), 2048c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 8, 8), 2058c2ecf20Sopenharmony_ci }, 2068c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_CH4_UNUSED] = { 2078c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_CH4_UNUSED, 2088c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2098c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 22, 16, 0), 2108c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 16, 8), 2118c2ecf20Sopenharmony_ci }, 2128c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_DDR_CH5_UNUSED] = { 2138c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_DDR_CH5_UNUSED, 2148c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2158c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 23, 17, 0), 2168c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 24, 8), 2178c2ecf20Sopenharmony_ci }, 2188c2ecf20Sopenharmony_ci}; 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_cistatic void __init ns2_lcpll_ddr_clk_init(struct device_node *node) 2218c2ecf20Sopenharmony_ci{ 2228c2ecf20Sopenharmony_ci iproc_pll_clk_setup(node, &lcpll_ddr, NULL, 0, lcpll_ddr_clk, 2238c2ecf20Sopenharmony_ci ARRAY_SIZE(lcpll_ddr_clk)); 2248c2ecf20Sopenharmony_ci} 2258c2ecf20Sopenharmony_ciCLK_OF_DECLARE(ns2_lcpll_ddr_clk, "brcm,ns2-lcpll-ddr", 2268c2ecf20Sopenharmony_ci ns2_lcpll_ddr_clk_init); 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_cistatic const struct iproc_pll_ctrl lcpll_ports = { 2298c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON | IPROC_CLK_PLL_SPLIT_STAT_CTRL, 2308c2ecf20Sopenharmony_ci .aon = AON_VAL(0x0, 2, 5, 4), 2318c2ecf20Sopenharmony_ci .reset = RESET_VAL(0x4, 2, 1), 2328c2ecf20Sopenharmony_ci .dig_filter = DF_VAL(0x0, 9, 3, 5, 4, 1, 4), 2338c2ecf20Sopenharmony_ci .ndiv_int = REG_VAL(0x8, 4, 10), 2348c2ecf20Sopenharmony_ci .pdiv = REG_VAL(0x8, 0, 4), 2358c2ecf20Sopenharmony_ci .vco_ctrl = VCO_CTRL_VAL(0x10, 0xc), 2368c2ecf20Sopenharmony_ci .status = REG_VAL(0x0, 0, 1), 2378c2ecf20Sopenharmony_ci}; 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_cistatic const struct iproc_clk_ctrl lcpll_ports_clk[] = { 2408c2ecf20Sopenharmony_ci /* bypass_shift, the last value passed into ENABLE_VAL(), is not defined 2418c2ecf20Sopenharmony_ci * in NS2. However, it doesn't appear to be used anywhere, so setting 2428c2ecf20Sopenharmony_ci * it to 0. 2438c2ecf20Sopenharmony_ci */ 2448c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_WAN_CLK] = { 2458c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_WAN_CLK, 2468c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2478c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 18, 12, 0), 2488c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 0, 8), 2498c2ecf20Sopenharmony_ci }, 2508c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_RGMII_CLK] = { 2518c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_RGMII_CLK, 2528c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2538c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 19, 13, 0), 2548c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x14, 8, 8), 2558c2ecf20Sopenharmony_ci }, 2568c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_CH2_UNUSED] = { 2578c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_CH2_UNUSED, 2588c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2598c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 20, 14, 0), 2608c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 0, 8), 2618c2ecf20Sopenharmony_ci }, 2628c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_CH3_UNUSED] = { 2638c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_CH3_UNUSED, 2648c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2658c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 21, 15, 0), 2668c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 8, 8), 2678c2ecf20Sopenharmony_ci }, 2688c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_CH4_UNUSED] = { 2698c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_CH4_UNUSED, 2708c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2718c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 22, 16, 0), 2728c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 16, 8), 2738c2ecf20Sopenharmony_ci }, 2748c2ecf20Sopenharmony_ci [BCM_NS2_LCPLL_PORTS_CH5_UNUSED] = { 2758c2ecf20Sopenharmony_ci .channel = BCM_NS2_LCPLL_PORTS_CH5_UNUSED, 2768c2ecf20Sopenharmony_ci .flags = IPROC_CLK_AON, 2778c2ecf20Sopenharmony_ci .enable = ENABLE_VAL(0x0, 23, 17, 0), 2788c2ecf20Sopenharmony_ci .mdiv = REG_VAL(0x10, 24, 8), 2798c2ecf20Sopenharmony_ci }, 2808c2ecf20Sopenharmony_ci}; 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_cistatic void __init ns2_lcpll_ports_clk_init(struct device_node *node) 2838c2ecf20Sopenharmony_ci{ 2848c2ecf20Sopenharmony_ci iproc_pll_clk_setup(node, &lcpll_ports, NULL, 0, lcpll_ports_clk, 2858c2ecf20Sopenharmony_ci ARRAY_SIZE(lcpll_ports_clk)); 2868c2ecf20Sopenharmony_ci} 2878c2ecf20Sopenharmony_ciCLK_OF_DECLARE(ns2_lcpll_ports_clk, "brcm,ns2-lcpll-ports", 2888c2ecf20Sopenharmony_ci ns2_lcpll_ports_clk_init); 289