18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (C) 2013 Broadcom Corporation
38c2ecf20Sopenharmony_ci * Copyright 2013 Linaro Limited
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or
68c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License as
78c2ecf20Sopenharmony_ci * published by the Free Software Foundation version 2.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This program is distributed "as is" WITHOUT ANY WARRANTY of any
108c2ecf20Sopenharmony_ci * kind, whether express or implied; without even the implied warranty
118c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
128c2ecf20Sopenharmony_ci * GNU General Public License for more details.
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#include "clk-kona.h"
168c2ecf20Sopenharmony_ci#include "dt-bindings/clock/bcm281xx.h"
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#define BCM281XX_CCU_COMMON(_name, _ucase_name) \
198c2ecf20Sopenharmony_ci	KONA_CCU_COMMON(BCM281XX, _name, _ucase_name)
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci/* Root CCU */
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistatic struct peri_clk_data frac_1m_data = {
248c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x214, 16, 0, 1),
258c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0e04, 0),
268c2ecf20Sopenharmony_ci	.div		= FRAC_DIVIDER(0x0e00, 0, 22, 16),
278c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal"),
288c2ecf20Sopenharmony_ci};
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cistatic struct ccu_data root_ccu_data = {
318c2ecf20Sopenharmony_ci	BCM281XX_CCU_COMMON(root, ROOT),
328c2ecf20Sopenharmony_ci	.kona_clks	= {
338c2ecf20Sopenharmony_ci		[BCM281XX_ROOT_CCU_FRAC_1M] =
348c2ecf20Sopenharmony_ci			KONA_CLK(root, frac_1m, peri),
358c2ecf20Sopenharmony_ci		[BCM281XX_ROOT_CCU_CLOCK_COUNT] = LAST_KONA_CLK,
368c2ecf20Sopenharmony_ci	},
378c2ecf20Sopenharmony_ci};
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci/* AON CCU */
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_cistatic struct peri_clk_data hub_timer_data = {
428c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0414, 16, 0, 1),
438c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("bbl_32k",
448c2ecf20Sopenharmony_ci				 "frac_1m",
458c2ecf20Sopenharmony_ci				 "dft_19_5m"),
468c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a10, 0, 2),
478c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0a40, 4),
488c2ecf20Sopenharmony_ci};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_cistatic struct peri_clk_data pmu_bsc_data = {
518c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0418, 16, 0, 1),
528c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
538c2ecf20Sopenharmony_ci				 "pmu_bsc_var",
548c2ecf20Sopenharmony_ci				 "bbl_32k"),
558c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a04, 0, 2),
568c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a04, 3, 4),
578c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0a40, 0),
588c2ecf20Sopenharmony_ci};
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_cistatic struct peri_clk_data pmu_bsc_var_data = {
618c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("var_312m",
628c2ecf20Sopenharmony_ci				 "ref_312m"),
638c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a00, 0, 2),
648c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a00, 4, 5),
658c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0a40, 2),
668c2ecf20Sopenharmony_ci};
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_cistatic struct ccu_data aon_ccu_data = {
698c2ecf20Sopenharmony_ci	BCM281XX_CCU_COMMON(aon, AON),
708c2ecf20Sopenharmony_ci	.kona_clks	= {
718c2ecf20Sopenharmony_ci		[BCM281XX_AON_CCU_HUB_TIMER] =
728c2ecf20Sopenharmony_ci			KONA_CLK(aon, hub_timer, peri),
738c2ecf20Sopenharmony_ci		[BCM281XX_AON_CCU_PMU_BSC] =
748c2ecf20Sopenharmony_ci			KONA_CLK(aon, pmu_bsc, peri),
758c2ecf20Sopenharmony_ci		[BCM281XX_AON_CCU_PMU_BSC_VAR] =
768c2ecf20Sopenharmony_ci			KONA_CLK(aon, pmu_bsc_var, peri),
778c2ecf20Sopenharmony_ci		[BCM281XX_AON_CCU_CLOCK_COUNT] = LAST_KONA_CLK,
788c2ecf20Sopenharmony_ci	},
798c2ecf20Sopenharmony_ci};
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci/* Hub CCU */
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_cistatic struct peri_clk_data tmon_1m_data = {
848c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x04a4, 18, 2, 3),
858c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
868c2ecf20Sopenharmony_ci				 "frac_1m"),
878c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0e74, 0, 2),
888c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0e84, 1),
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_cistatic struct ccu_data hub_ccu_data = {
928c2ecf20Sopenharmony_ci	BCM281XX_CCU_COMMON(hub, HUB),
938c2ecf20Sopenharmony_ci	.kona_clks	= {
948c2ecf20Sopenharmony_ci		[BCM281XX_HUB_CCU_TMON_1M] =
958c2ecf20Sopenharmony_ci			KONA_CLK(hub, tmon_1m, peri),
968c2ecf20Sopenharmony_ci		[BCM281XX_HUB_CCU_CLOCK_COUNT] = LAST_KONA_CLK,
978c2ecf20Sopenharmony_ci	},
988c2ecf20Sopenharmony_ci};
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ci/* Master CCU */
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_cistatic struct peri_clk_data sdio1_data = {
1038c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0358, 18, 2, 3),
1048c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1058c2ecf20Sopenharmony_ci				 "var_52m",
1068c2ecf20Sopenharmony_ci				 "ref_52m",
1078c2ecf20Sopenharmony_ci				 "var_96m",
1088c2ecf20Sopenharmony_ci				 "ref_96m"),
1098c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a28, 0, 3),
1108c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a28, 4, 14),
1118c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 9),
1128c2ecf20Sopenharmony_ci};
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_cistatic struct peri_clk_data sdio2_data = {
1158c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x035c, 18, 2, 3),
1168c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1178c2ecf20Sopenharmony_ci				 "var_52m",
1188c2ecf20Sopenharmony_ci				 "ref_52m",
1198c2ecf20Sopenharmony_ci				 "var_96m",
1208c2ecf20Sopenharmony_ci				 "ref_96m"),
1218c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a2c, 0, 3),
1228c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a2c, 4, 14),
1238c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 10),
1248c2ecf20Sopenharmony_ci};
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_cistatic struct peri_clk_data sdio3_data = {
1278c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0364, 18, 2, 3),
1288c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1298c2ecf20Sopenharmony_ci				 "var_52m",
1308c2ecf20Sopenharmony_ci				 "ref_52m",
1318c2ecf20Sopenharmony_ci				 "var_96m",
1328c2ecf20Sopenharmony_ci				 "ref_96m"),
1338c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a34, 0, 3),
1348c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a34, 4, 14),
1358c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 12),
1368c2ecf20Sopenharmony_ci};
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_cistatic struct peri_clk_data sdio4_data = {
1398c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0360, 18, 2, 3),
1408c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1418c2ecf20Sopenharmony_ci				 "var_52m",
1428c2ecf20Sopenharmony_ci				 "ref_52m",
1438c2ecf20Sopenharmony_ci				 "var_96m",
1448c2ecf20Sopenharmony_ci				 "ref_96m"),
1458c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a30, 0, 3),
1468c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a30, 4, 14),
1478c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 11),
1488c2ecf20Sopenharmony_ci};
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_cistatic struct peri_clk_data usb_ic_data = {
1518c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0354, 18, 2, 3),
1528c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1538c2ecf20Sopenharmony_ci				 "var_96m",
1548c2ecf20Sopenharmony_ci				 "ref_96m"),
1558c2ecf20Sopenharmony_ci	.div		= FIXED_DIVIDER(2),
1568c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a24, 0, 2),
1578c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 7),
1588c2ecf20Sopenharmony_ci};
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci/* also called usbh_48m */
1618c2ecf20Sopenharmony_cistatic struct peri_clk_data hsic2_48m_data = {
1628c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0370, 18, 2, 3),
1638c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1648c2ecf20Sopenharmony_ci				 "var_96m",
1658c2ecf20Sopenharmony_ci				 "ref_96m"),
1668c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a38, 0, 2),
1678c2ecf20Sopenharmony_ci	.div		= FIXED_DIVIDER(2),
1688c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 5),
1698c2ecf20Sopenharmony_ci};
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci/* also called usbh_12m */
1728c2ecf20Sopenharmony_cistatic struct peri_clk_data hsic2_12m_data = {
1738c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0370, 20, 4, 5),
1748c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a38, 12, 2),
1758c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
1768c2ecf20Sopenharmony_ci				 "var_96m",
1778c2ecf20Sopenharmony_ci				 "ref_96m"),
1788c2ecf20Sopenharmony_ci	.pre_div	= FIXED_DIVIDER(2),
1798c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a38, 0, 2),
1808c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 5),
1818c2ecf20Sopenharmony_ci};
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_cistatic struct ccu_data master_ccu_data = {
1848c2ecf20Sopenharmony_ci	BCM281XX_CCU_COMMON(master, MASTER),
1858c2ecf20Sopenharmony_ci	.kona_clks	= {
1868c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_SDIO1] =
1878c2ecf20Sopenharmony_ci			KONA_CLK(master, sdio1, peri),
1888c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_SDIO2] =
1898c2ecf20Sopenharmony_ci			KONA_CLK(master, sdio2, peri),
1908c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_SDIO3] =
1918c2ecf20Sopenharmony_ci			KONA_CLK(master, sdio3, peri),
1928c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_SDIO4] =
1938c2ecf20Sopenharmony_ci			KONA_CLK(master, sdio4, peri),
1948c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_USB_IC] =
1958c2ecf20Sopenharmony_ci			KONA_CLK(master, usb_ic, peri),
1968c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_HSIC2_48M] =
1978c2ecf20Sopenharmony_ci			KONA_CLK(master, hsic2_48m, peri),
1988c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_HSIC2_12M] =
1998c2ecf20Sopenharmony_ci			KONA_CLK(master, hsic2_12m, peri),
2008c2ecf20Sopenharmony_ci		[BCM281XX_MASTER_CCU_CLOCK_COUNT] = LAST_KONA_CLK,
2018c2ecf20Sopenharmony_ci	},
2028c2ecf20Sopenharmony_ci};
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ci/* Slave CCU */
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_cistatic struct peri_clk_data uartb_data = {
2078c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0400, 18, 2, 3),
2088c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2098c2ecf20Sopenharmony_ci				 "var_156m",
2108c2ecf20Sopenharmony_ci				 "ref_156m"),
2118c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a10, 0, 2),
2128c2ecf20Sopenharmony_ci	.div		= FRAC_DIVIDER(0x0a10, 4, 12, 8),
2138c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 2),
2148c2ecf20Sopenharmony_ci};
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_cistatic struct peri_clk_data uartb2_data = {
2178c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0404, 18, 2, 3),
2188c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2198c2ecf20Sopenharmony_ci				 "var_156m",
2208c2ecf20Sopenharmony_ci				 "ref_156m"),
2218c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a14, 0, 2),
2228c2ecf20Sopenharmony_ci	.div		= FRAC_DIVIDER(0x0a14, 4, 12, 8),
2238c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 3),
2248c2ecf20Sopenharmony_ci};
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_cistatic struct peri_clk_data uartb3_data = {
2278c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0408, 18, 2, 3),
2288c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2298c2ecf20Sopenharmony_ci				 "var_156m",
2308c2ecf20Sopenharmony_ci				 "ref_156m"),
2318c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a18, 0, 2),
2328c2ecf20Sopenharmony_ci	.div		= FRAC_DIVIDER(0x0a18, 4, 12, 8),
2338c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 4),
2348c2ecf20Sopenharmony_ci};
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_cistatic struct peri_clk_data uartb4_data = {
2378c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0408, 18, 2, 3),
2388c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2398c2ecf20Sopenharmony_ci				 "var_156m",
2408c2ecf20Sopenharmony_ci				 "ref_156m"),
2418c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a1c, 0, 2),
2428c2ecf20Sopenharmony_ci	.div		= FRAC_DIVIDER(0x0a1c, 4, 12, 8),
2438c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 5),
2448c2ecf20Sopenharmony_ci};
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_cistatic struct peri_clk_data ssp0_data = {
2478c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0410, 18, 2, 3),
2488c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2498c2ecf20Sopenharmony_ci				 "var_104m",
2508c2ecf20Sopenharmony_ci				 "ref_104m",
2518c2ecf20Sopenharmony_ci				 "var_96m",
2528c2ecf20Sopenharmony_ci				 "ref_96m"),
2538c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a20, 0, 3),
2548c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a20, 4, 14),
2558c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 6),
2568c2ecf20Sopenharmony_ci};
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_cistatic struct peri_clk_data ssp2_data = {
2598c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0418, 18, 2, 3),
2608c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2618c2ecf20Sopenharmony_ci				 "var_104m",
2628c2ecf20Sopenharmony_ci				 "ref_104m",
2638c2ecf20Sopenharmony_ci				 "var_96m",
2648c2ecf20Sopenharmony_ci				 "ref_96m"),
2658c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a28, 0, 3),
2668c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a28, 4, 14),
2678c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 8),
2688c2ecf20Sopenharmony_ci};
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_cistatic struct peri_clk_data bsc1_data = {
2718c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0458, 18, 2, 3),
2728c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2738c2ecf20Sopenharmony_ci				 "var_104m",
2748c2ecf20Sopenharmony_ci				 "ref_104m",
2758c2ecf20Sopenharmony_ci				 "var_13m",
2768c2ecf20Sopenharmony_ci				 "ref_13m"),
2778c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a64, 0, 3),
2788c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 23),
2798c2ecf20Sopenharmony_ci};
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_cistatic struct peri_clk_data bsc2_data = {
2828c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x045c, 18, 2, 3),
2838c2ecf20Sopenharmony_ci	.clocks	= CLOCKS("ref_crystal",
2848c2ecf20Sopenharmony_ci				 "var_104m",
2858c2ecf20Sopenharmony_ci				 "ref_104m",
2868c2ecf20Sopenharmony_ci				 "var_13m",
2878c2ecf20Sopenharmony_ci				 "ref_13m"),
2888c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a68, 0, 3),
2898c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 24),
2908c2ecf20Sopenharmony_ci};
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_cistatic struct peri_clk_data bsc3_data = {
2938c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0484, 18, 2, 3),
2948c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
2958c2ecf20Sopenharmony_ci				 "var_104m",
2968c2ecf20Sopenharmony_ci				 "ref_104m",
2978c2ecf20Sopenharmony_ci				 "var_13m",
2988c2ecf20Sopenharmony_ci				 "ref_13m"),
2998c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a84, 0, 3),
3008c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0b00, 2),
3018c2ecf20Sopenharmony_ci};
3028c2ecf20Sopenharmony_ci
3038c2ecf20Sopenharmony_cistatic struct peri_clk_data pwm_data = {
3048c2ecf20Sopenharmony_ci	.gate		= HW_SW_GATE(0x0468, 18, 2, 3),
3058c2ecf20Sopenharmony_ci	.clocks		= CLOCKS("ref_crystal",
3068c2ecf20Sopenharmony_ci				 "var_104m"),
3078c2ecf20Sopenharmony_ci	.sel		= SELECTOR(0x0a70, 0, 2),
3088c2ecf20Sopenharmony_ci	.div		= DIVIDER(0x0a70, 4, 3),
3098c2ecf20Sopenharmony_ci	.trig		= TRIGGER(0x0afc, 15),
3108c2ecf20Sopenharmony_ci};
3118c2ecf20Sopenharmony_ci
3128c2ecf20Sopenharmony_cistatic struct ccu_data slave_ccu_data = {
3138c2ecf20Sopenharmony_ci	BCM281XX_CCU_COMMON(slave, SLAVE),
3148c2ecf20Sopenharmony_ci	.kona_clks	= {
3158c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_UARTB] =
3168c2ecf20Sopenharmony_ci			KONA_CLK(slave, uartb, peri),
3178c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_UARTB2] =
3188c2ecf20Sopenharmony_ci			KONA_CLK(slave, uartb2, peri),
3198c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_UARTB3] =
3208c2ecf20Sopenharmony_ci			KONA_CLK(slave, uartb3, peri),
3218c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_UARTB4] =
3228c2ecf20Sopenharmony_ci			KONA_CLK(slave, uartb4, peri),
3238c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_SSP0] =
3248c2ecf20Sopenharmony_ci			KONA_CLK(slave, ssp0, peri),
3258c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_SSP2] =
3268c2ecf20Sopenharmony_ci			KONA_CLK(slave, ssp2, peri),
3278c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_BSC1] =
3288c2ecf20Sopenharmony_ci			KONA_CLK(slave, bsc1, peri),
3298c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_BSC2] =
3308c2ecf20Sopenharmony_ci			KONA_CLK(slave, bsc2, peri),
3318c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_BSC3] =
3328c2ecf20Sopenharmony_ci			KONA_CLK(slave, bsc3, peri),
3338c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_PWM] =
3348c2ecf20Sopenharmony_ci			KONA_CLK(slave, pwm, peri),
3358c2ecf20Sopenharmony_ci		[BCM281XX_SLAVE_CCU_CLOCK_COUNT] = LAST_KONA_CLK,
3368c2ecf20Sopenharmony_ci	},
3378c2ecf20Sopenharmony_ci};
3388c2ecf20Sopenharmony_ci
3398c2ecf20Sopenharmony_ci/* Device tree match table callback functions */
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_cistatic void __init kona_dt_root_ccu_setup(struct device_node *node)
3428c2ecf20Sopenharmony_ci{
3438c2ecf20Sopenharmony_ci	kona_dt_ccu_setup(&root_ccu_data, node);
3448c2ecf20Sopenharmony_ci}
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_cistatic void __init kona_dt_aon_ccu_setup(struct device_node *node)
3478c2ecf20Sopenharmony_ci{
3488c2ecf20Sopenharmony_ci	kona_dt_ccu_setup(&aon_ccu_data, node);
3498c2ecf20Sopenharmony_ci}
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_cistatic void __init kona_dt_hub_ccu_setup(struct device_node *node)
3528c2ecf20Sopenharmony_ci{
3538c2ecf20Sopenharmony_ci	kona_dt_ccu_setup(&hub_ccu_data, node);
3548c2ecf20Sopenharmony_ci}
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_cistatic void __init kona_dt_master_ccu_setup(struct device_node *node)
3578c2ecf20Sopenharmony_ci{
3588c2ecf20Sopenharmony_ci	kona_dt_ccu_setup(&master_ccu_data, node);
3598c2ecf20Sopenharmony_ci}
3608c2ecf20Sopenharmony_ci
3618c2ecf20Sopenharmony_cistatic void __init kona_dt_slave_ccu_setup(struct device_node *node)
3628c2ecf20Sopenharmony_ci{
3638c2ecf20Sopenharmony_ci	kona_dt_ccu_setup(&slave_ccu_data, node);
3648c2ecf20Sopenharmony_ci}
3658c2ecf20Sopenharmony_ci
3668c2ecf20Sopenharmony_ciCLK_OF_DECLARE(bcm281xx_root_ccu, BCM281XX_DT_ROOT_CCU_COMPAT,
3678c2ecf20Sopenharmony_ci			kona_dt_root_ccu_setup);
3688c2ecf20Sopenharmony_ciCLK_OF_DECLARE(bcm281xx_aon_ccu, BCM281XX_DT_AON_CCU_COMPAT,
3698c2ecf20Sopenharmony_ci			kona_dt_aon_ccu_setup);
3708c2ecf20Sopenharmony_ciCLK_OF_DECLARE(bcm281xx_hub_ccu, BCM281XX_DT_HUB_CCU_COMPAT,
3718c2ecf20Sopenharmony_ci			kona_dt_hub_ccu_setup);
3728c2ecf20Sopenharmony_ciCLK_OF_DECLARE(bcm281xx_master_ccu, BCM281XX_DT_MASTER_CCU_COMPAT,
3738c2ecf20Sopenharmony_ci			kona_dt_master_ccu_setup);
3748c2ecf20Sopenharmony_ciCLK_OF_DECLARE(bcm281xx_slave_ccu, BCM281XX_DT_SLAVE_CCU_COMPAT,
3758c2ecf20Sopenharmony_ci			kona_dt_slave_ccu_setup);
376