18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2016 AmLogic, Inc. 48c2ecf20Sopenharmony_ci * Michael Turquette <mturquette@baylibre.com> 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/clk-provider.h> 88c2ecf20Sopenharmony_ci#include <linux/init.h> 98c2ecf20Sopenharmony_ci#include <linux/of_device.h> 108c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include "gxbb.h" 138c2ecf20Sopenharmony_ci#include "clk-regmap.h" 148c2ecf20Sopenharmony_ci#include "clk-pll.h" 158c2ecf20Sopenharmony_ci#include "clk-mpll.h" 168c2ecf20Sopenharmony_ci#include "meson-eeclk.h" 178c2ecf20Sopenharmony_ci#include "vid-pll-div.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic DEFINE_SPINLOCK(meson_clk_lock); 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistatic const struct pll_params_table gxbb_gp0_pll_params_table[] = { 228c2ecf20Sopenharmony_ci PLL_PARAMS(32, 1), 238c2ecf20Sopenharmony_ci PLL_PARAMS(33, 1), 248c2ecf20Sopenharmony_ci PLL_PARAMS(34, 1), 258c2ecf20Sopenharmony_ci PLL_PARAMS(35, 1), 268c2ecf20Sopenharmony_ci PLL_PARAMS(36, 1), 278c2ecf20Sopenharmony_ci PLL_PARAMS(37, 1), 288c2ecf20Sopenharmony_ci PLL_PARAMS(38, 1), 298c2ecf20Sopenharmony_ci PLL_PARAMS(39, 1), 308c2ecf20Sopenharmony_ci PLL_PARAMS(40, 1), 318c2ecf20Sopenharmony_ci PLL_PARAMS(41, 1), 328c2ecf20Sopenharmony_ci PLL_PARAMS(42, 1), 338c2ecf20Sopenharmony_ci PLL_PARAMS(43, 1), 348c2ecf20Sopenharmony_ci PLL_PARAMS(44, 1), 358c2ecf20Sopenharmony_ci PLL_PARAMS(45, 1), 368c2ecf20Sopenharmony_ci PLL_PARAMS(46, 1), 378c2ecf20Sopenharmony_ci PLL_PARAMS(47, 1), 388c2ecf20Sopenharmony_ci PLL_PARAMS(48, 1), 398c2ecf20Sopenharmony_ci PLL_PARAMS(49, 1), 408c2ecf20Sopenharmony_ci PLL_PARAMS(50, 1), 418c2ecf20Sopenharmony_ci PLL_PARAMS(51, 1), 428c2ecf20Sopenharmony_ci PLL_PARAMS(52, 1), 438c2ecf20Sopenharmony_ci PLL_PARAMS(53, 1), 448c2ecf20Sopenharmony_ci PLL_PARAMS(54, 1), 458c2ecf20Sopenharmony_ci PLL_PARAMS(55, 1), 468c2ecf20Sopenharmony_ci PLL_PARAMS(56, 1), 478c2ecf20Sopenharmony_ci PLL_PARAMS(57, 1), 488c2ecf20Sopenharmony_ci PLL_PARAMS(58, 1), 498c2ecf20Sopenharmony_ci PLL_PARAMS(59, 1), 508c2ecf20Sopenharmony_ci PLL_PARAMS(60, 1), 518c2ecf20Sopenharmony_ci PLL_PARAMS(61, 1), 528c2ecf20Sopenharmony_ci PLL_PARAMS(62, 1), 538c2ecf20Sopenharmony_ci { /* sentinel */ }, 548c2ecf20Sopenharmony_ci}; 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_cistatic const struct pll_params_table gxl_gp0_pll_params_table[] = { 578c2ecf20Sopenharmony_ci PLL_PARAMS(42, 1), 588c2ecf20Sopenharmony_ci PLL_PARAMS(43, 1), 598c2ecf20Sopenharmony_ci PLL_PARAMS(44, 1), 608c2ecf20Sopenharmony_ci PLL_PARAMS(45, 1), 618c2ecf20Sopenharmony_ci PLL_PARAMS(46, 1), 628c2ecf20Sopenharmony_ci PLL_PARAMS(47, 1), 638c2ecf20Sopenharmony_ci PLL_PARAMS(48, 1), 648c2ecf20Sopenharmony_ci PLL_PARAMS(49, 1), 658c2ecf20Sopenharmony_ci PLL_PARAMS(50, 1), 668c2ecf20Sopenharmony_ci PLL_PARAMS(51, 1), 678c2ecf20Sopenharmony_ci PLL_PARAMS(52, 1), 688c2ecf20Sopenharmony_ci PLL_PARAMS(53, 1), 698c2ecf20Sopenharmony_ci PLL_PARAMS(54, 1), 708c2ecf20Sopenharmony_ci PLL_PARAMS(55, 1), 718c2ecf20Sopenharmony_ci PLL_PARAMS(56, 1), 728c2ecf20Sopenharmony_ci PLL_PARAMS(57, 1), 738c2ecf20Sopenharmony_ci PLL_PARAMS(58, 1), 748c2ecf20Sopenharmony_ci PLL_PARAMS(59, 1), 758c2ecf20Sopenharmony_ci PLL_PARAMS(60, 1), 768c2ecf20Sopenharmony_ci PLL_PARAMS(61, 1), 778c2ecf20Sopenharmony_ci PLL_PARAMS(62, 1), 788c2ecf20Sopenharmony_ci PLL_PARAMS(63, 1), 798c2ecf20Sopenharmony_ci PLL_PARAMS(64, 1), 808c2ecf20Sopenharmony_ci PLL_PARAMS(65, 1), 818c2ecf20Sopenharmony_ci PLL_PARAMS(66, 1), 828c2ecf20Sopenharmony_ci { /* sentinel */ }, 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fixed_pll_dco = { 868c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 878c2ecf20Sopenharmony_ci .en = { 888c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 898c2ecf20Sopenharmony_ci .shift = 30, 908c2ecf20Sopenharmony_ci .width = 1, 918c2ecf20Sopenharmony_ci }, 928c2ecf20Sopenharmony_ci .m = { 938c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 948c2ecf20Sopenharmony_ci .shift = 0, 958c2ecf20Sopenharmony_ci .width = 9, 968c2ecf20Sopenharmony_ci }, 978c2ecf20Sopenharmony_ci .n = { 988c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 998c2ecf20Sopenharmony_ci .shift = 9, 1008c2ecf20Sopenharmony_ci .width = 5, 1018c2ecf20Sopenharmony_ci }, 1028c2ecf20Sopenharmony_ci .frac = { 1038c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL2, 1048c2ecf20Sopenharmony_ci .shift = 0, 1058c2ecf20Sopenharmony_ci .width = 12, 1068c2ecf20Sopenharmony_ci }, 1078c2ecf20Sopenharmony_ci .l = { 1088c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 1098c2ecf20Sopenharmony_ci .shift = 31, 1108c2ecf20Sopenharmony_ci .width = 1, 1118c2ecf20Sopenharmony_ci }, 1128c2ecf20Sopenharmony_ci .rst = { 1138c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 1148c2ecf20Sopenharmony_ci .shift = 29, 1158c2ecf20Sopenharmony_ci .width = 1, 1168c2ecf20Sopenharmony_ci }, 1178c2ecf20Sopenharmony_ci }, 1188c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 1198c2ecf20Sopenharmony_ci .name = "fixed_pll_dco", 1208c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ro_ops, 1218c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 1228c2ecf20Sopenharmony_ci .fw_name = "xtal", 1238c2ecf20Sopenharmony_ci }, 1248c2ecf20Sopenharmony_ci .num_parents = 1, 1258c2ecf20Sopenharmony_ci }, 1268c2ecf20Sopenharmony_ci}; 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fixed_pll = { 1298c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 1308c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL, 1318c2ecf20Sopenharmony_ci .shift = 16, 1328c2ecf20Sopenharmony_ci .width = 2, 1338c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 1348c2ecf20Sopenharmony_ci }, 1358c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 1368c2ecf20Sopenharmony_ci .name = "fixed_pll", 1378c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 1388c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 1398c2ecf20Sopenharmony_ci &gxbb_fixed_pll_dco.hw 1408c2ecf20Sopenharmony_ci }, 1418c2ecf20Sopenharmony_ci .num_parents = 1, 1428c2ecf20Sopenharmony_ci /* 1438c2ecf20Sopenharmony_ci * This clock won't ever change at runtime so 1448c2ecf20Sopenharmony_ci * CLK_SET_RATE_PARENT is not required 1458c2ecf20Sopenharmony_ci */ 1468c2ecf20Sopenharmony_ci }, 1478c2ecf20Sopenharmony_ci}; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_hdmi_pll_pre_mult = { 1508c2ecf20Sopenharmony_ci .mult = 2, 1518c2ecf20Sopenharmony_ci .div = 1, 1528c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 1538c2ecf20Sopenharmony_ci .name = "hdmi_pll_pre_mult", 1548c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 1558c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 1568c2ecf20Sopenharmony_ci .fw_name = "xtal", 1578c2ecf20Sopenharmony_ci }, 1588c2ecf20Sopenharmony_ci .num_parents = 1, 1598c2ecf20Sopenharmony_ci }, 1608c2ecf20Sopenharmony_ci}; 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_pll_dco = { 1638c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 1648c2ecf20Sopenharmony_ci .en = { 1658c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 1668c2ecf20Sopenharmony_ci .shift = 30, 1678c2ecf20Sopenharmony_ci .width = 1, 1688c2ecf20Sopenharmony_ci }, 1698c2ecf20Sopenharmony_ci .m = { 1708c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 1718c2ecf20Sopenharmony_ci .shift = 0, 1728c2ecf20Sopenharmony_ci .width = 9, 1738c2ecf20Sopenharmony_ci }, 1748c2ecf20Sopenharmony_ci .n = { 1758c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 1768c2ecf20Sopenharmony_ci .shift = 9, 1778c2ecf20Sopenharmony_ci .width = 5, 1788c2ecf20Sopenharmony_ci }, 1798c2ecf20Sopenharmony_ci .frac = { 1808c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL2, 1818c2ecf20Sopenharmony_ci .shift = 0, 1828c2ecf20Sopenharmony_ci .width = 12, 1838c2ecf20Sopenharmony_ci }, 1848c2ecf20Sopenharmony_ci .l = { 1858c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 1868c2ecf20Sopenharmony_ci .shift = 31, 1878c2ecf20Sopenharmony_ci .width = 1, 1888c2ecf20Sopenharmony_ci }, 1898c2ecf20Sopenharmony_ci .rst = { 1908c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 1918c2ecf20Sopenharmony_ci .shift = 28, 1928c2ecf20Sopenharmony_ci .width = 1, 1938c2ecf20Sopenharmony_ci }, 1948c2ecf20Sopenharmony_ci }, 1958c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 1968c2ecf20Sopenharmony_ci .name = "hdmi_pll_dco", 1978c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ro_ops, 1988c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 1998c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_pre_mult.hw 2008c2ecf20Sopenharmony_ci }, 2018c2ecf20Sopenharmony_ci .num_parents = 1, 2028c2ecf20Sopenharmony_ci /* 2038c2ecf20Sopenharmony_ci * Display directly handle hdmi pll registers ATM, we need 2048c2ecf20Sopenharmony_ci * NOCACHE to keep our view of the clock as accurate as possible 2058c2ecf20Sopenharmony_ci */ 2068c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE, 2078c2ecf20Sopenharmony_ci }, 2088c2ecf20Sopenharmony_ci}; 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_hdmi_pll_dco = { 2118c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 2128c2ecf20Sopenharmony_ci .en = { 2138c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 2148c2ecf20Sopenharmony_ci .shift = 30, 2158c2ecf20Sopenharmony_ci .width = 1, 2168c2ecf20Sopenharmony_ci }, 2178c2ecf20Sopenharmony_ci .m = { 2188c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 2198c2ecf20Sopenharmony_ci .shift = 0, 2208c2ecf20Sopenharmony_ci .width = 9, 2218c2ecf20Sopenharmony_ci }, 2228c2ecf20Sopenharmony_ci .n = { 2238c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 2248c2ecf20Sopenharmony_ci .shift = 9, 2258c2ecf20Sopenharmony_ci .width = 5, 2268c2ecf20Sopenharmony_ci }, 2278c2ecf20Sopenharmony_ci /* 2288c2ecf20Sopenharmony_ci * On gxl, there is a register shift due to 2298c2ecf20Sopenharmony_ci * HHI_HDMI_PLL_CNTL1 which does not exist on gxbb, 2308c2ecf20Sopenharmony_ci * so we use the HHI_HDMI_PLL_CNTL2 define from GXBB 2318c2ecf20Sopenharmony_ci * instead which is defined at the same offset. 2328c2ecf20Sopenharmony_ci */ 2338c2ecf20Sopenharmony_ci .frac = { 2348c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL2, 2358c2ecf20Sopenharmony_ci .shift = 0, 2368c2ecf20Sopenharmony_ci .width = 10, 2378c2ecf20Sopenharmony_ci }, 2388c2ecf20Sopenharmony_ci .l = { 2398c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 2408c2ecf20Sopenharmony_ci .shift = 31, 2418c2ecf20Sopenharmony_ci .width = 1, 2428c2ecf20Sopenharmony_ci }, 2438c2ecf20Sopenharmony_ci .rst = { 2448c2ecf20Sopenharmony_ci .reg_off = HHI_HDMI_PLL_CNTL, 2458c2ecf20Sopenharmony_ci .shift = 28, 2468c2ecf20Sopenharmony_ci .width = 1, 2478c2ecf20Sopenharmony_ci }, 2488c2ecf20Sopenharmony_ci }, 2498c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 2508c2ecf20Sopenharmony_ci .name = "hdmi_pll_dco", 2518c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ro_ops, 2528c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 2538c2ecf20Sopenharmony_ci .fw_name = "xtal", 2548c2ecf20Sopenharmony_ci }, 2558c2ecf20Sopenharmony_ci .num_parents = 1, 2568c2ecf20Sopenharmony_ci /* 2578c2ecf20Sopenharmony_ci * Display directly handle hdmi pll registers ATM, we need 2588c2ecf20Sopenharmony_ci * NOCACHE to keep our view of the clock as accurate as possible 2598c2ecf20Sopenharmony_ci */ 2608c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE, 2618c2ecf20Sopenharmony_ci }, 2628c2ecf20Sopenharmony_ci}; 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_pll_od = { 2658c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 2668c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL2, 2678c2ecf20Sopenharmony_ci .shift = 16, 2688c2ecf20Sopenharmony_ci .width = 2, 2698c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 2708c2ecf20Sopenharmony_ci }, 2718c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 2728c2ecf20Sopenharmony_ci .name = "hdmi_pll_od", 2738c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 2748c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 2758c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_dco.hw 2768c2ecf20Sopenharmony_ci }, 2778c2ecf20Sopenharmony_ci .num_parents = 1, 2788c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 2798c2ecf20Sopenharmony_ci }, 2808c2ecf20Sopenharmony_ci}; 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_pll_od2 = { 2838c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 2848c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL2, 2858c2ecf20Sopenharmony_ci .shift = 22, 2868c2ecf20Sopenharmony_ci .width = 2, 2878c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 2888c2ecf20Sopenharmony_ci }, 2898c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 2908c2ecf20Sopenharmony_ci .name = "hdmi_pll_od2", 2918c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 2928c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 2938c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_od.hw 2948c2ecf20Sopenharmony_ci }, 2958c2ecf20Sopenharmony_ci .num_parents = 1, 2968c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 2978c2ecf20Sopenharmony_ci }, 2988c2ecf20Sopenharmony_ci}; 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_pll = { 3018c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 3028c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL2, 3038c2ecf20Sopenharmony_ci .shift = 18, 3048c2ecf20Sopenharmony_ci .width = 2, 3058c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 3068c2ecf20Sopenharmony_ci }, 3078c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 3088c2ecf20Sopenharmony_ci .name = "hdmi_pll", 3098c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 3108c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 3118c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_od2.hw 3128c2ecf20Sopenharmony_ci }, 3138c2ecf20Sopenharmony_ci .num_parents = 1, 3148c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 3158c2ecf20Sopenharmony_ci }, 3168c2ecf20Sopenharmony_ci}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_hdmi_pll_od = { 3198c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 3208c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL + 8, 3218c2ecf20Sopenharmony_ci .shift = 21, 3228c2ecf20Sopenharmony_ci .width = 2, 3238c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 3248c2ecf20Sopenharmony_ci }, 3258c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 3268c2ecf20Sopenharmony_ci .name = "hdmi_pll_od", 3278c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 3288c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 3298c2ecf20Sopenharmony_ci &gxl_hdmi_pll_dco.hw 3308c2ecf20Sopenharmony_ci }, 3318c2ecf20Sopenharmony_ci .num_parents = 1, 3328c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 3338c2ecf20Sopenharmony_ci }, 3348c2ecf20Sopenharmony_ci}; 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_hdmi_pll_od2 = { 3378c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 3388c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL + 8, 3398c2ecf20Sopenharmony_ci .shift = 23, 3408c2ecf20Sopenharmony_ci .width = 2, 3418c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 3428c2ecf20Sopenharmony_ci }, 3438c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 3448c2ecf20Sopenharmony_ci .name = "hdmi_pll_od2", 3458c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 3468c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 3478c2ecf20Sopenharmony_ci &gxl_hdmi_pll_od.hw 3488c2ecf20Sopenharmony_ci }, 3498c2ecf20Sopenharmony_ci .num_parents = 1, 3508c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 3518c2ecf20Sopenharmony_ci }, 3528c2ecf20Sopenharmony_ci}; 3538c2ecf20Sopenharmony_ci 3548c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_hdmi_pll = { 3558c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 3568c2ecf20Sopenharmony_ci .offset = HHI_HDMI_PLL_CNTL + 8, 3578c2ecf20Sopenharmony_ci .shift = 19, 3588c2ecf20Sopenharmony_ci .width = 2, 3598c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 3608c2ecf20Sopenharmony_ci }, 3618c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 3628c2ecf20Sopenharmony_ci .name = "hdmi_pll", 3638c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 3648c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 3658c2ecf20Sopenharmony_ci &gxl_hdmi_pll_od2.hw 3668c2ecf20Sopenharmony_ci }, 3678c2ecf20Sopenharmony_ci .num_parents = 1, 3688c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT, 3698c2ecf20Sopenharmony_ci }, 3708c2ecf20Sopenharmony_ci}; 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sys_pll_dco = { 3738c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 3748c2ecf20Sopenharmony_ci .en = { 3758c2ecf20Sopenharmony_ci .reg_off = HHI_SYS_PLL_CNTL, 3768c2ecf20Sopenharmony_ci .shift = 30, 3778c2ecf20Sopenharmony_ci .width = 1, 3788c2ecf20Sopenharmony_ci }, 3798c2ecf20Sopenharmony_ci .m = { 3808c2ecf20Sopenharmony_ci .reg_off = HHI_SYS_PLL_CNTL, 3818c2ecf20Sopenharmony_ci .shift = 0, 3828c2ecf20Sopenharmony_ci .width = 9, 3838c2ecf20Sopenharmony_ci }, 3848c2ecf20Sopenharmony_ci .n = { 3858c2ecf20Sopenharmony_ci .reg_off = HHI_SYS_PLL_CNTL, 3868c2ecf20Sopenharmony_ci .shift = 9, 3878c2ecf20Sopenharmony_ci .width = 5, 3888c2ecf20Sopenharmony_ci }, 3898c2ecf20Sopenharmony_ci .l = { 3908c2ecf20Sopenharmony_ci .reg_off = HHI_SYS_PLL_CNTL, 3918c2ecf20Sopenharmony_ci .shift = 31, 3928c2ecf20Sopenharmony_ci .width = 1, 3938c2ecf20Sopenharmony_ci }, 3948c2ecf20Sopenharmony_ci .rst = { 3958c2ecf20Sopenharmony_ci .reg_off = HHI_SYS_PLL_CNTL, 3968c2ecf20Sopenharmony_ci .shift = 29, 3978c2ecf20Sopenharmony_ci .width = 1, 3988c2ecf20Sopenharmony_ci }, 3998c2ecf20Sopenharmony_ci }, 4008c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 4018c2ecf20Sopenharmony_ci .name = "sys_pll_dco", 4028c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ro_ops, 4038c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 4048c2ecf20Sopenharmony_ci .fw_name = "xtal", 4058c2ecf20Sopenharmony_ci }, 4068c2ecf20Sopenharmony_ci .num_parents = 1, 4078c2ecf20Sopenharmony_ci }, 4088c2ecf20Sopenharmony_ci}; 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sys_pll = { 4118c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 4128c2ecf20Sopenharmony_ci .offset = HHI_SYS_PLL_CNTL, 4138c2ecf20Sopenharmony_ci .shift = 10, 4148c2ecf20Sopenharmony_ci .width = 2, 4158c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 4168c2ecf20Sopenharmony_ci }, 4178c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 4188c2ecf20Sopenharmony_ci .name = "sys_pll", 4198c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 4208c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 4218c2ecf20Sopenharmony_ci &gxbb_sys_pll_dco.hw 4228c2ecf20Sopenharmony_ci }, 4238c2ecf20Sopenharmony_ci .num_parents = 1, 4248c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 4258c2ecf20Sopenharmony_ci }, 4268c2ecf20Sopenharmony_ci}; 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_cistatic const struct reg_sequence gxbb_gp0_init_regs[] = { 4298c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL2, .def = 0x69c80000 }, 4308c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL3, .def = 0x0a5590c4 }, 4318c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL4, .def = 0x0000500d }, 4328c2ecf20Sopenharmony_ci}; 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_gp0_pll_dco = { 4358c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 4368c2ecf20Sopenharmony_ci .en = { 4378c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4388c2ecf20Sopenharmony_ci .shift = 30, 4398c2ecf20Sopenharmony_ci .width = 1, 4408c2ecf20Sopenharmony_ci }, 4418c2ecf20Sopenharmony_ci .m = { 4428c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4438c2ecf20Sopenharmony_ci .shift = 0, 4448c2ecf20Sopenharmony_ci .width = 9, 4458c2ecf20Sopenharmony_ci }, 4468c2ecf20Sopenharmony_ci .n = { 4478c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4488c2ecf20Sopenharmony_ci .shift = 9, 4498c2ecf20Sopenharmony_ci .width = 5, 4508c2ecf20Sopenharmony_ci }, 4518c2ecf20Sopenharmony_ci .l = { 4528c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4538c2ecf20Sopenharmony_ci .shift = 31, 4548c2ecf20Sopenharmony_ci .width = 1, 4558c2ecf20Sopenharmony_ci }, 4568c2ecf20Sopenharmony_ci .rst = { 4578c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4588c2ecf20Sopenharmony_ci .shift = 29, 4598c2ecf20Sopenharmony_ci .width = 1, 4608c2ecf20Sopenharmony_ci }, 4618c2ecf20Sopenharmony_ci .table = gxbb_gp0_pll_params_table, 4628c2ecf20Sopenharmony_ci .init_regs = gxbb_gp0_init_regs, 4638c2ecf20Sopenharmony_ci .init_count = ARRAY_SIZE(gxbb_gp0_init_regs), 4648c2ecf20Sopenharmony_ci }, 4658c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 4668c2ecf20Sopenharmony_ci .name = "gp0_pll_dco", 4678c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ops, 4688c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 4698c2ecf20Sopenharmony_ci .fw_name = "xtal", 4708c2ecf20Sopenharmony_ci }, 4718c2ecf20Sopenharmony_ci .num_parents = 1, 4728c2ecf20Sopenharmony_ci }, 4738c2ecf20Sopenharmony_ci}; 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_cistatic const struct reg_sequence gxl_gp0_init_regs[] = { 4768c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL1, .def = 0xc084b000 }, 4778c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL2, .def = 0xb75020be }, 4788c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL3, .def = 0x0a59a288 }, 4798c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL4, .def = 0xc000004d }, 4808c2ecf20Sopenharmony_ci { .reg = HHI_GP0_PLL_CNTL5, .def = 0x00078000 }, 4818c2ecf20Sopenharmony_ci}; 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_gp0_pll_dco = { 4848c2ecf20Sopenharmony_ci .data = &(struct meson_clk_pll_data){ 4858c2ecf20Sopenharmony_ci .en = { 4868c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4878c2ecf20Sopenharmony_ci .shift = 30, 4888c2ecf20Sopenharmony_ci .width = 1, 4898c2ecf20Sopenharmony_ci }, 4908c2ecf20Sopenharmony_ci .m = { 4918c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4928c2ecf20Sopenharmony_ci .shift = 0, 4938c2ecf20Sopenharmony_ci .width = 9, 4948c2ecf20Sopenharmony_ci }, 4958c2ecf20Sopenharmony_ci .n = { 4968c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 4978c2ecf20Sopenharmony_ci .shift = 9, 4988c2ecf20Sopenharmony_ci .width = 5, 4998c2ecf20Sopenharmony_ci }, 5008c2ecf20Sopenharmony_ci .frac = { 5018c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL1, 5028c2ecf20Sopenharmony_ci .shift = 0, 5038c2ecf20Sopenharmony_ci .width = 10, 5048c2ecf20Sopenharmony_ci }, 5058c2ecf20Sopenharmony_ci .l = { 5068c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 5078c2ecf20Sopenharmony_ci .shift = 31, 5088c2ecf20Sopenharmony_ci .width = 1, 5098c2ecf20Sopenharmony_ci }, 5108c2ecf20Sopenharmony_ci .rst = { 5118c2ecf20Sopenharmony_ci .reg_off = HHI_GP0_PLL_CNTL, 5128c2ecf20Sopenharmony_ci .shift = 29, 5138c2ecf20Sopenharmony_ci .width = 1, 5148c2ecf20Sopenharmony_ci }, 5158c2ecf20Sopenharmony_ci .table = gxl_gp0_pll_params_table, 5168c2ecf20Sopenharmony_ci .init_regs = gxl_gp0_init_regs, 5178c2ecf20Sopenharmony_ci .init_count = ARRAY_SIZE(gxl_gp0_init_regs), 5188c2ecf20Sopenharmony_ci }, 5198c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 5208c2ecf20Sopenharmony_ci .name = "gp0_pll_dco", 5218c2ecf20Sopenharmony_ci .ops = &meson_clk_pll_ops, 5228c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 5238c2ecf20Sopenharmony_ci .fw_name = "xtal", 5248c2ecf20Sopenharmony_ci }, 5258c2ecf20Sopenharmony_ci .num_parents = 1, 5268c2ecf20Sopenharmony_ci }, 5278c2ecf20Sopenharmony_ci}; 5288c2ecf20Sopenharmony_ci 5298c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_gp0_pll = { 5308c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 5318c2ecf20Sopenharmony_ci .offset = HHI_GP0_PLL_CNTL, 5328c2ecf20Sopenharmony_ci .shift = 16, 5338c2ecf20Sopenharmony_ci .width = 2, 5348c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_POWER_OF_TWO, 5358c2ecf20Sopenharmony_ci }, 5368c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 5378c2ecf20Sopenharmony_ci .name = "gp0_pll", 5388c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 5398c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 5408c2ecf20Sopenharmony_ci /* 5418c2ecf20Sopenharmony_ci * Note: 5428c2ecf20Sopenharmony_ci * GXL and GXBB have different gp0_pll_dco (with 5438c2ecf20Sopenharmony_ci * different struct clk_hw). We fallback to the global 5448c2ecf20Sopenharmony_ci * naming string mechanism so gp0_pll picks up the 5458c2ecf20Sopenharmony_ci * appropriate one. 5468c2ecf20Sopenharmony_ci */ 5478c2ecf20Sopenharmony_ci .name = "gp0_pll_dco", 5488c2ecf20Sopenharmony_ci .index = -1, 5498c2ecf20Sopenharmony_ci }, 5508c2ecf20Sopenharmony_ci .num_parents = 1, 5518c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 5528c2ecf20Sopenharmony_ci }, 5538c2ecf20Sopenharmony_ci}; 5548c2ecf20Sopenharmony_ci 5558c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_fclk_div2_div = { 5568c2ecf20Sopenharmony_ci .mult = 1, 5578c2ecf20Sopenharmony_ci .div = 2, 5588c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 5598c2ecf20Sopenharmony_ci .name = "fclk_div2_div", 5608c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 5618c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 5628c2ecf20Sopenharmony_ci &gxbb_fixed_pll.hw 5638c2ecf20Sopenharmony_ci }, 5648c2ecf20Sopenharmony_ci .num_parents = 1, 5658c2ecf20Sopenharmony_ci }, 5668c2ecf20Sopenharmony_ci}; 5678c2ecf20Sopenharmony_ci 5688c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fclk_div2 = { 5698c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 5708c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL6, 5718c2ecf20Sopenharmony_ci .bit_idx = 27, 5728c2ecf20Sopenharmony_ci }, 5738c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 5748c2ecf20Sopenharmony_ci .name = "fclk_div2", 5758c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 5768c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 5778c2ecf20Sopenharmony_ci &gxbb_fclk_div2_div.hw 5788c2ecf20Sopenharmony_ci }, 5798c2ecf20Sopenharmony_ci .num_parents = 1, 5808c2ecf20Sopenharmony_ci .flags = CLK_IS_CRITICAL, 5818c2ecf20Sopenharmony_ci }, 5828c2ecf20Sopenharmony_ci}; 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_fclk_div3_div = { 5858c2ecf20Sopenharmony_ci .mult = 1, 5868c2ecf20Sopenharmony_ci .div = 3, 5878c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 5888c2ecf20Sopenharmony_ci .name = "fclk_div3_div", 5898c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 5908c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_fixed_pll.hw }, 5918c2ecf20Sopenharmony_ci .num_parents = 1, 5928c2ecf20Sopenharmony_ci }, 5938c2ecf20Sopenharmony_ci}; 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fclk_div3 = { 5968c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 5978c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL6, 5988c2ecf20Sopenharmony_ci .bit_idx = 28, 5998c2ecf20Sopenharmony_ci }, 6008c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6018c2ecf20Sopenharmony_ci .name = "fclk_div3", 6028c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 6038c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 6048c2ecf20Sopenharmony_ci &gxbb_fclk_div3_div.hw 6058c2ecf20Sopenharmony_ci }, 6068c2ecf20Sopenharmony_ci .num_parents = 1, 6078c2ecf20Sopenharmony_ci /* 6088c2ecf20Sopenharmony_ci * FIXME: 6098c2ecf20Sopenharmony_ci * This clock, as fdiv2, is used by the SCPI FW and is required 6108c2ecf20Sopenharmony_ci * by the platform to operate correctly. 6118c2ecf20Sopenharmony_ci * Until the following condition are met, we need this clock to 6128c2ecf20Sopenharmony_ci * be marked as critical: 6138c2ecf20Sopenharmony_ci * a) The SCPI generic driver claims and enable all the clocks 6148c2ecf20Sopenharmony_ci * it needs 6158c2ecf20Sopenharmony_ci * b) CCF has a clock hand-off mechanism to make the sure the 6168c2ecf20Sopenharmony_ci * clock stays on until the proper driver comes along 6178c2ecf20Sopenharmony_ci */ 6188c2ecf20Sopenharmony_ci .flags = CLK_IS_CRITICAL, 6198c2ecf20Sopenharmony_ci }, 6208c2ecf20Sopenharmony_ci}; 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_fclk_div4_div = { 6238c2ecf20Sopenharmony_ci .mult = 1, 6248c2ecf20Sopenharmony_ci .div = 4, 6258c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6268c2ecf20Sopenharmony_ci .name = "fclk_div4_div", 6278c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 6288c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_fixed_pll.hw }, 6298c2ecf20Sopenharmony_ci .num_parents = 1, 6308c2ecf20Sopenharmony_ci }, 6318c2ecf20Sopenharmony_ci}; 6328c2ecf20Sopenharmony_ci 6338c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fclk_div4 = { 6348c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 6358c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL6, 6368c2ecf20Sopenharmony_ci .bit_idx = 29, 6378c2ecf20Sopenharmony_ci }, 6388c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6398c2ecf20Sopenharmony_ci .name = "fclk_div4", 6408c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 6418c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 6428c2ecf20Sopenharmony_ci &gxbb_fclk_div4_div.hw 6438c2ecf20Sopenharmony_ci }, 6448c2ecf20Sopenharmony_ci .num_parents = 1, 6458c2ecf20Sopenharmony_ci }, 6468c2ecf20Sopenharmony_ci}; 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_fclk_div5_div = { 6498c2ecf20Sopenharmony_ci .mult = 1, 6508c2ecf20Sopenharmony_ci .div = 5, 6518c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6528c2ecf20Sopenharmony_ci .name = "fclk_div5_div", 6538c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 6548c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_fixed_pll.hw }, 6558c2ecf20Sopenharmony_ci .num_parents = 1, 6568c2ecf20Sopenharmony_ci }, 6578c2ecf20Sopenharmony_ci}; 6588c2ecf20Sopenharmony_ci 6598c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fclk_div5 = { 6608c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 6618c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL6, 6628c2ecf20Sopenharmony_ci .bit_idx = 30, 6638c2ecf20Sopenharmony_ci }, 6648c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6658c2ecf20Sopenharmony_ci .name = "fclk_div5", 6668c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 6678c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 6688c2ecf20Sopenharmony_ci &gxbb_fclk_div5_div.hw 6698c2ecf20Sopenharmony_ci }, 6708c2ecf20Sopenharmony_ci .num_parents = 1, 6718c2ecf20Sopenharmony_ci }, 6728c2ecf20Sopenharmony_ci}; 6738c2ecf20Sopenharmony_ci 6748c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_fclk_div7_div = { 6758c2ecf20Sopenharmony_ci .mult = 1, 6768c2ecf20Sopenharmony_ci .div = 7, 6778c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6788c2ecf20Sopenharmony_ci .name = "fclk_div7_div", 6798c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 6808c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_fixed_pll.hw }, 6818c2ecf20Sopenharmony_ci .num_parents = 1, 6828c2ecf20Sopenharmony_ci }, 6838c2ecf20Sopenharmony_ci}; 6848c2ecf20Sopenharmony_ci 6858c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_fclk_div7 = { 6868c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 6878c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL6, 6888c2ecf20Sopenharmony_ci .bit_idx = 31, 6898c2ecf20Sopenharmony_ci }, 6908c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 6918c2ecf20Sopenharmony_ci .name = "fclk_div7", 6928c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 6938c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 6948c2ecf20Sopenharmony_ci &gxbb_fclk_div7_div.hw 6958c2ecf20Sopenharmony_ci }, 6968c2ecf20Sopenharmony_ci .num_parents = 1, 6978c2ecf20Sopenharmony_ci }, 6988c2ecf20Sopenharmony_ci}; 6998c2ecf20Sopenharmony_ci 7008c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll_prediv = { 7018c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 7028c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL5, 7038c2ecf20Sopenharmony_ci .shift = 12, 7048c2ecf20Sopenharmony_ci .width = 1, 7058c2ecf20Sopenharmony_ci }, 7068c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 7078c2ecf20Sopenharmony_ci .name = "mpll_prediv", 7088c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 7098c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_fixed_pll.hw }, 7108c2ecf20Sopenharmony_ci .num_parents = 1, 7118c2ecf20Sopenharmony_ci }, 7128c2ecf20Sopenharmony_ci}; 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll0_div = { 7158c2ecf20Sopenharmony_ci .data = &(struct meson_clk_mpll_data){ 7168c2ecf20Sopenharmony_ci .sdm = { 7178c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL7, 7188c2ecf20Sopenharmony_ci .shift = 0, 7198c2ecf20Sopenharmony_ci .width = 14, 7208c2ecf20Sopenharmony_ci }, 7218c2ecf20Sopenharmony_ci .sdm_en = { 7228c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL, 7238c2ecf20Sopenharmony_ci .shift = 25, 7248c2ecf20Sopenharmony_ci .width = 1, 7258c2ecf20Sopenharmony_ci }, 7268c2ecf20Sopenharmony_ci .n2 = { 7278c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL7, 7288c2ecf20Sopenharmony_ci .shift = 16, 7298c2ecf20Sopenharmony_ci .width = 9, 7308c2ecf20Sopenharmony_ci }, 7318c2ecf20Sopenharmony_ci .lock = &meson_clk_lock, 7328c2ecf20Sopenharmony_ci }, 7338c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 7348c2ecf20Sopenharmony_ci .name = "mpll0_div", 7358c2ecf20Sopenharmony_ci .ops = &meson_clk_mpll_ops, 7368c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 7378c2ecf20Sopenharmony_ci &gxbb_mpll_prediv.hw 7388c2ecf20Sopenharmony_ci }, 7398c2ecf20Sopenharmony_ci .num_parents = 1, 7408c2ecf20Sopenharmony_ci }, 7418c2ecf20Sopenharmony_ci}; 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_cistatic struct clk_regmap gxl_mpll0_div = { 7448c2ecf20Sopenharmony_ci .data = &(struct meson_clk_mpll_data){ 7458c2ecf20Sopenharmony_ci .sdm = { 7468c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL7, 7478c2ecf20Sopenharmony_ci .shift = 0, 7488c2ecf20Sopenharmony_ci .width = 14, 7498c2ecf20Sopenharmony_ci }, 7508c2ecf20Sopenharmony_ci .sdm_en = { 7518c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL7, 7528c2ecf20Sopenharmony_ci .shift = 15, 7538c2ecf20Sopenharmony_ci .width = 1, 7548c2ecf20Sopenharmony_ci }, 7558c2ecf20Sopenharmony_ci .n2 = { 7568c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL7, 7578c2ecf20Sopenharmony_ci .shift = 16, 7588c2ecf20Sopenharmony_ci .width = 9, 7598c2ecf20Sopenharmony_ci }, 7608c2ecf20Sopenharmony_ci .lock = &meson_clk_lock, 7618c2ecf20Sopenharmony_ci }, 7628c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 7638c2ecf20Sopenharmony_ci .name = "mpll0_div", 7648c2ecf20Sopenharmony_ci .ops = &meson_clk_mpll_ops, 7658c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 7668c2ecf20Sopenharmony_ci &gxbb_mpll_prediv.hw 7678c2ecf20Sopenharmony_ci }, 7688c2ecf20Sopenharmony_ci .num_parents = 1, 7698c2ecf20Sopenharmony_ci }, 7708c2ecf20Sopenharmony_ci}; 7718c2ecf20Sopenharmony_ci 7728c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll0 = { 7738c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 7748c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL7, 7758c2ecf20Sopenharmony_ci .bit_idx = 14, 7768c2ecf20Sopenharmony_ci }, 7778c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 7788c2ecf20Sopenharmony_ci .name = "mpll0", 7798c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 7808c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 7818c2ecf20Sopenharmony_ci /* 7828c2ecf20Sopenharmony_ci * Note: 7838c2ecf20Sopenharmony_ci * GXL and GXBB have different SDM_EN registers. We 7848c2ecf20Sopenharmony_ci * fallback to the global naming string mechanism so 7858c2ecf20Sopenharmony_ci * mpll0_div picks up the appropriate one. 7868c2ecf20Sopenharmony_ci */ 7878c2ecf20Sopenharmony_ci .name = "mpll0_div", 7888c2ecf20Sopenharmony_ci .index = -1, 7898c2ecf20Sopenharmony_ci }, 7908c2ecf20Sopenharmony_ci .num_parents = 1, 7918c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 7928c2ecf20Sopenharmony_ci }, 7938c2ecf20Sopenharmony_ci}; 7948c2ecf20Sopenharmony_ci 7958c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll1_div = { 7968c2ecf20Sopenharmony_ci .data = &(struct meson_clk_mpll_data){ 7978c2ecf20Sopenharmony_ci .sdm = { 7988c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL8, 7998c2ecf20Sopenharmony_ci .shift = 0, 8008c2ecf20Sopenharmony_ci .width = 14, 8018c2ecf20Sopenharmony_ci }, 8028c2ecf20Sopenharmony_ci .sdm_en = { 8038c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL8, 8048c2ecf20Sopenharmony_ci .shift = 15, 8058c2ecf20Sopenharmony_ci .width = 1, 8068c2ecf20Sopenharmony_ci }, 8078c2ecf20Sopenharmony_ci .n2 = { 8088c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL8, 8098c2ecf20Sopenharmony_ci .shift = 16, 8108c2ecf20Sopenharmony_ci .width = 9, 8118c2ecf20Sopenharmony_ci }, 8128c2ecf20Sopenharmony_ci .lock = &meson_clk_lock, 8138c2ecf20Sopenharmony_ci }, 8148c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 8158c2ecf20Sopenharmony_ci .name = "mpll1_div", 8168c2ecf20Sopenharmony_ci .ops = &meson_clk_mpll_ops, 8178c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 8188c2ecf20Sopenharmony_ci &gxbb_mpll_prediv.hw 8198c2ecf20Sopenharmony_ci }, 8208c2ecf20Sopenharmony_ci .num_parents = 1, 8218c2ecf20Sopenharmony_ci }, 8228c2ecf20Sopenharmony_ci}; 8238c2ecf20Sopenharmony_ci 8248c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll1 = { 8258c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 8268c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL8, 8278c2ecf20Sopenharmony_ci .bit_idx = 14, 8288c2ecf20Sopenharmony_ci }, 8298c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 8308c2ecf20Sopenharmony_ci .name = "mpll1", 8318c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 8328c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_mpll1_div.hw }, 8338c2ecf20Sopenharmony_ci .num_parents = 1, 8348c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 8358c2ecf20Sopenharmony_ci }, 8368c2ecf20Sopenharmony_ci}; 8378c2ecf20Sopenharmony_ci 8388c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll2_div = { 8398c2ecf20Sopenharmony_ci .data = &(struct meson_clk_mpll_data){ 8408c2ecf20Sopenharmony_ci .sdm = { 8418c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL9, 8428c2ecf20Sopenharmony_ci .shift = 0, 8438c2ecf20Sopenharmony_ci .width = 14, 8448c2ecf20Sopenharmony_ci }, 8458c2ecf20Sopenharmony_ci .sdm_en = { 8468c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL9, 8478c2ecf20Sopenharmony_ci .shift = 15, 8488c2ecf20Sopenharmony_ci .width = 1, 8498c2ecf20Sopenharmony_ci }, 8508c2ecf20Sopenharmony_ci .n2 = { 8518c2ecf20Sopenharmony_ci .reg_off = HHI_MPLL_CNTL9, 8528c2ecf20Sopenharmony_ci .shift = 16, 8538c2ecf20Sopenharmony_ci .width = 9, 8548c2ecf20Sopenharmony_ci }, 8558c2ecf20Sopenharmony_ci .lock = &meson_clk_lock, 8568c2ecf20Sopenharmony_ci }, 8578c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 8588c2ecf20Sopenharmony_ci .name = "mpll2_div", 8598c2ecf20Sopenharmony_ci .ops = &meson_clk_mpll_ops, 8608c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 8618c2ecf20Sopenharmony_ci &gxbb_mpll_prediv.hw 8628c2ecf20Sopenharmony_ci }, 8638c2ecf20Sopenharmony_ci .num_parents = 1, 8648c2ecf20Sopenharmony_ci }, 8658c2ecf20Sopenharmony_ci}; 8668c2ecf20Sopenharmony_ci 8678c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpll2 = { 8688c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 8698c2ecf20Sopenharmony_ci .offset = HHI_MPLL_CNTL9, 8708c2ecf20Sopenharmony_ci .bit_idx = 14, 8718c2ecf20Sopenharmony_ci }, 8728c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 8738c2ecf20Sopenharmony_ci .name = "mpll2", 8748c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 8758c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_mpll2_div.hw }, 8768c2ecf20Sopenharmony_ci .num_parents = 1, 8778c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 8788c2ecf20Sopenharmony_ci }, 8798c2ecf20Sopenharmony_ci}; 8808c2ecf20Sopenharmony_ci 8818c2ecf20Sopenharmony_cistatic u32 mux_table_clk81[] = { 0, 2, 3, 4, 5, 6, 7 }; 8828c2ecf20Sopenharmony_cistatic const struct clk_parent_data clk81_parent_data[] = { 8838c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 8848c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div7.hw }, 8858c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll1.hw }, 8868c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll2.hw }, 8878c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div4.hw }, 8888c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 8898c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 8908c2ecf20Sopenharmony_ci}; 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpeg_clk_sel = { 8938c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 8948c2ecf20Sopenharmony_ci .offset = HHI_MPEG_CLK_CNTL, 8958c2ecf20Sopenharmony_ci .mask = 0x7, 8968c2ecf20Sopenharmony_ci .shift = 12, 8978c2ecf20Sopenharmony_ci .table = mux_table_clk81, 8988c2ecf20Sopenharmony_ci }, 8998c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9008c2ecf20Sopenharmony_ci .name = "mpeg_clk_sel", 9018c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ro_ops, 9028c2ecf20Sopenharmony_ci /* 9038c2ecf20Sopenharmony_ci * bits 14:12 selects from 8 possible parents: 9048c2ecf20Sopenharmony_ci * xtal, 1'b0 (wtf), fclk_div7, mpll_clkout1, mpll_clkout2, 9058c2ecf20Sopenharmony_ci * fclk_div4, fclk_div3, fclk_div5 9068c2ecf20Sopenharmony_ci */ 9078c2ecf20Sopenharmony_ci .parent_data = clk81_parent_data, 9088c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(clk81_parent_data), 9098c2ecf20Sopenharmony_ci }, 9108c2ecf20Sopenharmony_ci}; 9118c2ecf20Sopenharmony_ci 9128c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mpeg_clk_div = { 9138c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 9148c2ecf20Sopenharmony_ci .offset = HHI_MPEG_CLK_CNTL, 9158c2ecf20Sopenharmony_ci .shift = 0, 9168c2ecf20Sopenharmony_ci .width = 7, 9178c2ecf20Sopenharmony_ci }, 9188c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9198c2ecf20Sopenharmony_ci .name = "mpeg_clk_div", 9208c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ro_ops, 9218c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 9228c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_sel.hw 9238c2ecf20Sopenharmony_ci }, 9248c2ecf20Sopenharmony_ci .num_parents = 1, 9258c2ecf20Sopenharmony_ci }, 9268c2ecf20Sopenharmony_ci}; 9278c2ecf20Sopenharmony_ci 9288c2ecf20Sopenharmony_ci/* the mother of dragons gates */ 9298c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_clk81 = { 9308c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 9318c2ecf20Sopenharmony_ci .offset = HHI_MPEG_CLK_CNTL, 9328c2ecf20Sopenharmony_ci .bit_idx = 7, 9338c2ecf20Sopenharmony_ci }, 9348c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9358c2ecf20Sopenharmony_ci .name = "clk81", 9368c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 9378c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 9388c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_div.hw 9398c2ecf20Sopenharmony_ci }, 9408c2ecf20Sopenharmony_ci .num_parents = 1, 9418c2ecf20Sopenharmony_ci .flags = CLK_IS_CRITICAL, 9428c2ecf20Sopenharmony_ci }, 9438c2ecf20Sopenharmony_ci}; 9448c2ecf20Sopenharmony_ci 9458c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sar_adc_clk_sel = { 9468c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 9478c2ecf20Sopenharmony_ci .offset = HHI_SAR_CLK_CNTL, 9488c2ecf20Sopenharmony_ci .mask = 0x3, 9498c2ecf20Sopenharmony_ci .shift = 9, 9508c2ecf20Sopenharmony_ci }, 9518c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9528c2ecf20Sopenharmony_ci .name = "sar_adc_clk_sel", 9538c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 9548c2ecf20Sopenharmony_ci /* NOTE: The datasheet doesn't list the parents for bit 10 */ 9558c2ecf20Sopenharmony_ci .parent_data = (const struct clk_parent_data []) { 9568c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 9578c2ecf20Sopenharmony_ci { .hw = &gxbb_clk81.hw }, 9588c2ecf20Sopenharmony_ci }, 9598c2ecf20Sopenharmony_ci .num_parents = 2, 9608c2ecf20Sopenharmony_ci }, 9618c2ecf20Sopenharmony_ci}; 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sar_adc_clk_div = { 9648c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 9658c2ecf20Sopenharmony_ci .offset = HHI_SAR_CLK_CNTL, 9668c2ecf20Sopenharmony_ci .shift = 0, 9678c2ecf20Sopenharmony_ci .width = 8, 9688c2ecf20Sopenharmony_ci }, 9698c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9708c2ecf20Sopenharmony_ci .name = "sar_adc_clk_div", 9718c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 9728c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 9738c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_sel.hw 9748c2ecf20Sopenharmony_ci }, 9758c2ecf20Sopenharmony_ci .num_parents = 1, 9768c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 9778c2ecf20Sopenharmony_ci }, 9788c2ecf20Sopenharmony_ci}; 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sar_adc_clk = { 9818c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 9828c2ecf20Sopenharmony_ci .offset = HHI_SAR_CLK_CNTL, 9838c2ecf20Sopenharmony_ci .bit_idx = 8, 9848c2ecf20Sopenharmony_ci }, 9858c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 9868c2ecf20Sopenharmony_ci .name = "sar_adc_clk", 9878c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 9888c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 9898c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_div.hw 9908c2ecf20Sopenharmony_ci }, 9918c2ecf20Sopenharmony_ci .num_parents = 1, 9928c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 9938c2ecf20Sopenharmony_ci }, 9948c2ecf20Sopenharmony_ci}; 9958c2ecf20Sopenharmony_ci 9968c2ecf20Sopenharmony_ci/* 9978c2ecf20Sopenharmony_ci * The MALI IP is clocked by two identical clocks (mali_0 and mali_1) 9988c2ecf20Sopenharmony_ci * muxed by a glitch-free switch. The CCF can manage this glitch-free 9998c2ecf20Sopenharmony_ci * mux because it does top-to-bottom updates the each clock tree and 10008c2ecf20Sopenharmony_ci * switches to the "inactive" one when CLK_SET_RATE_GATE is set. 10018c2ecf20Sopenharmony_ci */ 10028c2ecf20Sopenharmony_ci 10038c2ecf20Sopenharmony_cistatic const struct clk_parent_data gxbb_mali_0_1_parent_data[] = { 10048c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 10058c2ecf20Sopenharmony_ci { .hw = &gxbb_gp0_pll.hw }, 10068c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll2.hw }, 10078c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll1.hw }, 10088c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div7.hw }, 10098c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div4.hw }, 10108c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 10118c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 10128c2ecf20Sopenharmony_ci}; 10138c2ecf20Sopenharmony_ci 10148c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_0_sel = { 10158c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 10168c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 10178c2ecf20Sopenharmony_ci .mask = 0x7, 10188c2ecf20Sopenharmony_ci .shift = 9, 10198c2ecf20Sopenharmony_ci }, 10208c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 10218c2ecf20Sopenharmony_ci .name = "mali_0_sel", 10228c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 10238c2ecf20Sopenharmony_ci .parent_data = gxbb_mali_0_1_parent_data, 10248c2ecf20Sopenharmony_ci .num_parents = 8, 10258c2ecf20Sopenharmony_ci /* 10268c2ecf20Sopenharmony_ci * Don't request the parent to change the rate because 10278c2ecf20Sopenharmony_ci * all GPU frequencies can be derived from the fclk_* 10288c2ecf20Sopenharmony_ci * clocks and one special GP0_PLL setting. This is 10298c2ecf20Sopenharmony_ci * important because we need the MPLL clocks for audio. 10308c2ecf20Sopenharmony_ci */ 10318c2ecf20Sopenharmony_ci .flags = 0, 10328c2ecf20Sopenharmony_ci }, 10338c2ecf20Sopenharmony_ci}; 10348c2ecf20Sopenharmony_ci 10358c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_0_div = { 10368c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 10378c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 10388c2ecf20Sopenharmony_ci .shift = 0, 10398c2ecf20Sopenharmony_ci .width = 7, 10408c2ecf20Sopenharmony_ci }, 10418c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 10428c2ecf20Sopenharmony_ci .name = "mali_0_div", 10438c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 10448c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 10458c2ecf20Sopenharmony_ci &gxbb_mali_0_sel.hw 10468c2ecf20Sopenharmony_ci }, 10478c2ecf20Sopenharmony_ci .num_parents = 1, 10488c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 10498c2ecf20Sopenharmony_ci }, 10508c2ecf20Sopenharmony_ci}; 10518c2ecf20Sopenharmony_ci 10528c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_0 = { 10538c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 10548c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 10558c2ecf20Sopenharmony_ci .bit_idx = 8, 10568c2ecf20Sopenharmony_ci }, 10578c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 10588c2ecf20Sopenharmony_ci .name = "mali_0", 10598c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 10608c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 10618c2ecf20Sopenharmony_ci &gxbb_mali_0_div.hw 10628c2ecf20Sopenharmony_ci }, 10638c2ecf20Sopenharmony_ci .num_parents = 1, 10648c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_GATE | CLK_SET_RATE_PARENT, 10658c2ecf20Sopenharmony_ci }, 10668c2ecf20Sopenharmony_ci}; 10678c2ecf20Sopenharmony_ci 10688c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_1_sel = { 10698c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 10708c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 10718c2ecf20Sopenharmony_ci .mask = 0x7, 10728c2ecf20Sopenharmony_ci .shift = 25, 10738c2ecf20Sopenharmony_ci }, 10748c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 10758c2ecf20Sopenharmony_ci .name = "mali_1_sel", 10768c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 10778c2ecf20Sopenharmony_ci .parent_data = gxbb_mali_0_1_parent_data, 10788c2ecf20Sopenharmony_ci .num_parents = 8, 10798c2ecf20Sopenharmony_ci /* 10808c2ecf20Sopenharmony_ci * Don't request the parent to change the rate because 10818c2ecf20Sopenharmony_ci * all GPU frequencies can be derived from the fclk_* 10828c2ecf20Sopenharmony_ci * clocks and one special GP0_PLL setting. This is 10838c2ecf20Sopenharmony_ci * important because we need the MPLL clocks for audio. 10848c2ecf20Sopenharmony_ci */ 10858c2ecf20Sopenharmony_ci .flags = 0, 10868c2ecf20Sopenharmony_ci }, 10878c2ecf20Sopenharmony_ci}; 10888c2ecf20Sopenharmony_ci 10898c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_1_div = { 10908c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 10918c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 10928c2ecf20Sopenharmony_ci .shift = 16, 10938c2ecf20Sopenharmony_ci .width = 7, 10948c2ecf20Sopenharmony_ci }, 10958c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 10968c2ecf20Sopenharmony_ci .name = "mali_1_div", 10978c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 10988c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 10998c2ecf20Sopenharmony_ci &gxbb_mali_1_sel.hw 11008c2ecf20Sopenharmony_ci }, 11018c2ecf20Sopenharmony_ci .num_parents = 1, 11028c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 11038c2ecf20Sopenharmony_ci }, 11048c2ecf20Sopenharmony_ci}; 11058c2ecf20Sopenharmony_ci 11068c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali_1 = { 11078c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 11088c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 11098c2ecf20Sopenharmony_ci .bit_idx = 24, 11108c2ecf20Sopenharmony_ci }, 11118c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 11128c2ecf20Sopenharmony_ci .name = "mali_1", 11138c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 11148c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 11158c2ecf20Sopenharmony_ci &gxbb_mali_1_div.hw 11168c2ecf20Sopenharmony_ci }, 11178c2ecf20Sopenharmony_ci .num_parents = 1, 11188c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_GATE | CLK_SET_RATE_PARENT, 11198c2ecf20Sopenharmony_ci }, 11208c2ecf20Sopenharmony_ci}; 11218c2ecf20Sopenharmony_ci 11228c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_mali_parent_hws[] = { 11238c2ecf20Sopenharmony_ci &gxbb_mali_0.hw, 11248c2ecf20Sopenharmony_ci &gxbb_mali_1.hw, 11258c2ecf20Sopenharmony_ci}; 11268c2ecf20Sopenharmony_ci 11278c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_mali = { 11288c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 11298c2ecf20Sopenharmony_ci .offset = HHI_MALI_CLK_CNTL, 11308c2ecf20Sopenharmony_ci .mask = 1, 11318c2ecf20Sopenharmony_ci .shift = 31, 11328c2ecf20Sopenharmony_ci }, 11338c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 11348c2ecf20Sopenharmony_ci .name = "mali", 11358c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 11368c2ecf20Sopenharmony_ci .parent_hws = gxbb_mali_parent_hws, 11378c2ecf20Sopenharmony_ci .num_parents = 2, 11388c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 11398c2ecf20Sopenharmony_ci }, 11408c2ecf20Sopenharmony_ci}; 11418c2ecf20Sopenharmony_ci 11428c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_amclk_sel = { 11438c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 11448c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL, 11458c2ecf20Sopenharmony_ci .mask = 0x3, 11468c2ecf20Sopenharmony_ci .shift = 9, 11478c2ecf20Sopenharmony_ci .table = (u32[]){ 1, 2, 3 }, 11488c2ecf20Sopenharmony_ci .flags = CLK_MUX_ROUND_CLOSEST, 11498c2ecf20Sopenharmony_ci }, 11508c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 11518c2ecf20Sopenharmony_ci .name = "cts_amclk_sel", 11528c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 11538c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 11548c2ecf20Sopenharmony_ci &gxbb_mpll0.hw, 11558c2ecf20Sopenharmony_ci &gxbb_mpll1.hw, 11568c2ecf20Sopenharmony_ci &gxbb_mpll2.hw, 11578c2ecf20Sopenharmony_ci }, 11588c2ecf20Sopenharmony_ci .num_parents = 3, 11598c2ecf20Sopenharmony_ci }, 11608c2ecf20Sopenharmony_ci}; 11618c2ecf20Sopenharmony_ci 11628c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_amclk_div = { 11638c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data) { 11648c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL, 11658c2ecf20Sopenharmony_ci .shift = 0, 11668c2ecf20Sopenharmony_ci .width = 8, 11678c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 11688c2ecf20Sopenharmony_ci }, 11698c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 11708c2ecf20Sopenharmony_ci .name = "cts_amclk_div", 11718c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 11728c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 11738c2ecf20Sopenharmony_ci &gxbb_cts_amclk_sel.hw 11748c2ecf20Sopenharmony_ci }, 11758c2ecf20Sopenharmony_ci .num_parents = 1, 11768c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 11778c2ecf20Sopenharmony_ci }, 11788c2ecf20Sopenharmony_ci}; 11798c2ecf20Sopenharmony_ci 11808c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_amclk = { 11818c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 11828c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL, 11838c2ecf20Sopenharmony_ci .bit_idx = 8, 11848c2ecf20Sopenharmony_ci }, 11858c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 11868c2ecf20Sopenharmony_ci .name = "cts_amclk", 11878c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 11888c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 11898c2ecf20Sopenharmony_ci &gxbb_cts_amclk_div.hw 11908c2ecf20Sopenharmony_ci }, 11918c2ecf20Sopenharmony_ci .num_parents = 1, 11928c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 11938c2ecf20Sopenharmony_ci }, 11948c2ecf20Sopenharmony_ci}; 11958c2ecf20Sopenharmony_ci 11968c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_mclk_i958_sel = { 11978c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 11988c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL2, 11998c2ecf20Sopenharmony_ci .mask = 0x3, 12008c2ecf20Sopenharmony_ci .shift = 25, 12018c2ecf20Sopenharmony_ci .table = (u32[]){ 1, 2, 3 }, 12028c2ecf20Sopenharmony_ci .flags = CLK_MUX_ROUND_CLOSEST, 12038c2ecf20Sopenharmony_ci }, 12048c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 12058c2ecf20Sopenharmony_ci .name = "cts_mclk_i958_sel", 12068c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 12078c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 12088c2ecf20Sopenharmony_ci &gxbb_mpll0.hw, 12098c2ecf20Sopenharmony_ci &gxbb_mpll1.hw, 12108c2ecf20Sopenharmony_ci &gxbb_mpll2.hw, 12118c2ecf20Sopenharmony_ci }, 12128c2ecf20Sopenharmony_ci .num_parents = 3, 12138c2ecf20Sopenharmony_ci }, 12148c2ecf20Sopenharmony_ci}; 12158c2ecf20Sopenharmony_ci 12168c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_mclk_i958_div = { 12178c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 12188c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL2, 12198c2ecf20Sopenharmony_ci .shift = 16, 12208c2ecf20Sopenharmony_ci .width = 8, 12218c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 12228c2ecf20Sopenharmony_ci }, 12238c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 12248c2ecf20Sopenharmony_ci .name = "cts_mclk_i958_div", 12258c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 12268c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 12278c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_sel.hw 12288c2ecf20Sopenharmony_ci }, 12298c2ecf20Sopenharmony_ci .num_parents = 1, 12308c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 12318c2ecf20Sopenharmony_ci }, 12328c2ecf20Sopenharmony_ci}; 12338c2ecf20Sopenharmony_ci 12348c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_mclk_i958 = { 12358c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 12368c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL2, 12378c2ecf20Sopenharmony_ci .bit_idx = 24, 12388c2ecf20Sopenharmony_ci }, 12398c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 12408c2ecf20Sopenharmony_ci .name = "cts_mclk_i958", 12418c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 12428c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 12438c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_div.hw 12448c2ecf20Sopenharmony_ci }, 12458c2ecf20Sopenharmony_ci .num_parents = 1, 12468c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 12478c2ecf20Sopenharmony_ci }, 12488c2ecf20Sopenharmony_ci}; 12498c2ecf20Sopenharmony_ci 12508c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_i958 = { 12518c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 12528c2ecf20Sopenharmony_ci .offset = HHI_AUD_CLK_CNTL2, 12538c2ecf20Sopenharmony_ci .mask = 0x1, 12548c2ecf20Sopenharmony_ci .shift = 27, 12558c2ecf20Sopenharmony_ci }, 12568c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 12578c2ecf20Sopenharmony_ci .name = "cts_i958", 12588c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 12598c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 12608c2ecf20Sopenharmony_ci &gxbb_cts_amclk.hw, 12618c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958.hw 12628c2ecf20Sopenharmony_ci }, 12638c2ecf20Sopenharmony_ci .num_parents = 2, 12648c2ecf20Sopenharmony_ci /* 12658c2ecf20Sopenharmony_ci *The parent is specific to origin of the audio data. Let the 12668c2ecf20Sopenharmony_ci * consumer choose the appropriate parent 12678c2ecf20Sopenharmony_ci */ 12688c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, 12698c2ecf20Sopenharmony_ci }, 12708c2ecf20Sopenharmony_ci}; 12718c2ecf20Sopenharmony_ci 12728c2ecf20Sopenharmony_cistatic const struct clk_parent_data gxbb_32k_clk_parent_data[] = { 12738c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 12748c2ecf20Sopenharmony_ci /* 12758c2ecf20Sopenharmony_ci * FIXME: This clock is provided by the ao clock controller but the 12768c2ecf20Sopenharmony_ci * clock is not yet part of the binding of this controller, so string 12778c2ecf20Sopenharmony_ci * name must be use to set this parent. 12788c2ecf20Sopenharmony_ci */ 12798c2ecf20Sopenharmony_ci { .name = "cts_slow_oscin", .index = -1 }, 12808c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 12818c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 12828c2ecf20Sopenharmony_ci}; 12838c2ecf20Sopenharmony_ci 12848c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_32k_clk_sel = { 12858c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 12868c2ecf20Sopenharmony_ci .offset = HHI_32K_CLK_CNTL, 12878c2ecf20Sopenharmony_ci .mask = 0x3, 12888c2ecf20Sopenharmony_ci .shift = 16, 12898c2ecf20Sopenharmony_ci }, 12908c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 12918c2ecf20Sopenharmony_ci .name = "32k_clk_sel", 12928c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 12938c2ecf20Sopenharmony_ci .parent_data = gxbb_32k_clk_parent_data, 12948c2ecf20Sopenharmony_ci .num_parents = 4, 12958c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 12968c2ecf20Sopenharmony_ci }, 12978c2ecf20Sopenharmony_ci}; 12988c2ecf20Sopenharmony_ci 12998c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_32k_clk_div = { 13008c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 13018c2ecf20Sopenharmony_ci .offset = HHI_32K_CLK_CNTL, 13028c2ecf20Sopenharmony_ci .shift = 0, 13038c2ecf20Sopenharmony_ci .width = 14, 13048c2ecf20Sopenharmony_ci }, 13058c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 13068c2ecf20Sopenharmony_ci .name = "32k_clk_div", 13078c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 13088c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 13098c2ecf20Sopenharmony_ci &gxbb_32k_clk_sel.hw 13108c2ecf20Sopenharmony_ci }, 13118c2ecf20Sopenharmony_ci .num_parents = 1, 13128c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_DIVIDER_ROUND_CLOSEST, 13138c2ecf20Sopenharmony_ci }, 13148c2ecf20Sopenharmony_ci}; 13158c2ecf20Sopenharmony_ci 13168c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_32k_clk = { 13178c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 13188c2ecf20Sopenharmony_ci .offset = HHI_32K_CLK_CNTL, 13198c2ecf20Sopenharmony_ci .bit_idx = 15, 13208c2ecf20Sopenharmony_ci }, 13218c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 13228c2ecf20Sopenharmony_ci .name = "32k_clk", 13238c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 13248c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 13258c2ecf20Sopenharmony_ci &gxbb_32k_clk_div.hw 13268c2ecf20Sopenharmony_ci }, 13278c2ecf20Sopenharmony_ci .num_parents = 1, 13288c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 13298c2ecf20Sopenharmony_ci }, 13308c2ecf20Sopenharmony_ci}; 13318c2ecf20Sopenharmony_ci 13328c2ecf20Sopenharmony_cistatic const struct clk_parent_data gxbb_sd_emmc_clk0_parent_data[] = { 13338c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 13348c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div2.hw }, 13358c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 13368c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 13378c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div7.hw }, 13388c2ecf20Sopenharmony_ci /* 13398c2ecf20Sopenharmony_ci * Following these parent clocks, we should also have had mpll2, mpll3 13408c2ecf20Sopenharmony_ci * and gp0_pll but these clocks are too precious to be used here. All 13418c2ecf20Sopenharmony_ci * the necessary rates for MMC and NAND operation can be acheived using 13428c2ecf20Sopenharmony_ci * xtal or fclk_div clocks 13438c2ecf20Sopenharmony_ci */ 13448c2ecf20Sopenharmony_ci}; 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_ci/* SDIO clock */ 13478c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_a_clk0_sel = { 13488c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 13498c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 13508c2ecf20Sopenharmony_ci .mask = 0x7, 13518c2ecf20Sopenharmony_ci .shift = 9, 13528c2ecf20Sopenharmony_ci }, 13538c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 13548c2ecf20Sopenharmony_ci .name = "sd_emmc_a_clk0_sel", 13558c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 13568c2ecf20Sopenharmony_ci .parent_data = gxbb_sd_emmc_clk0_parent_data, 13578c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_data), 13588c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 13598c2ecf20Sopenharmony_ci }, 13608c2ecf20Sopenharmony_ci}; 13618c2ecf20Sopenharmony_ci 13628c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_a_clk0_div = { 13638c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 13648c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 13658c2ecf20Sopenharmony_ci .shift = 0, 13668c2ecf20Sopenharmony_ci .width = 7, 13678c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 13688c2ecf20Sopenharmony_ci }, 13698c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 13708c2ecf20Sopenharmony_ci .name = "sd_emmc_a_clk0_div", 13718c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 13728c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 13738c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_sel.hw 13748c2ecf20Sopenharmony_ci }, 13758c2ecf20Sopenharmony_ci .num_parents = 1, 13768c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 13778c2ecf20Sopenharmony_ci }, 13788c2ecf20Sopenharmony_ci}; 13798c2ecf20Sopenharmony_ci 13808c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_a_clk0 = { 13818c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 13828c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 13838c2ecf20Sopenharmony_ci .bit_idx = 7, 13848c2ecf20Sopenharmony_ci }, 13858c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 13868c2ecf20Sopenharmony_ci .name = "sd_emmc_a_clk0", 13878c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 13888c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 13898c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_div.hw 13908c2ecf20Sopenharmony_ci }, 13918c2ecf20Sopenharmony_ci .num_parents = 1, 13928c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 13938c2ecf20Sopenharmony_ci }, 13948c2ecf20Sopenharmony_ci}; 13958c2ecf20Sopenharmony_ci 13968c2ecf20Sopenharmony_ci/* SDcard clock */ 13978c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_b_clk0_sel = { 13988c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 13998c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 14008c2ecf20Sopenharmony_ci .mask = 0x7, 14018c2ecf20Sopenharmony_ci .shift = 25, 14028c2ecf20Sopenharmony_ci }, 14038c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 14048c2ecf20Sopenharmony_ci .name = "sd_emmc_b_clk0_sel", 14058c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 14068c2ecf20Sopenharmony_ci .parent_data = gxbb_sd_emmc_clk0_parent_data, 14078c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_data), 14088c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14098c2ecf20Sopenharmony_ci }, 14108c2ecf20Sopenharmony_ci}; 14118c2ecf20Sopenharmony_ci 14128c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_b_clk0_div = { 14138c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 14148c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 14158c2ecf20Sopenharmony_ci .shift = 16, 14168c2ecf20Sopenharmony_ci .width = 7, 14178c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 14188c2ecf20Sopenharmony_ci }, 14198c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 14208c2ecf20Sopenharmony_ci .name = "sd_emmc_b_clk0_div", 14218c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 14228c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 14238c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_sel.hw 14248c2ecf20Sopenharmony_ci }, 14258c2ecf20Sopenharmony_ci .num_parents = 1, 14268c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14278c2ecf20Sopenharmony_ci }, 14288c2ecf20Sopenharmony_ci}; 14298c2ecf20Sopenharmony_ci 14308c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_b_clk0 = { 14318c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 14328c2ecf20Sopenharmony_ci .offset = HHI_SD_EMMC_CLK_CNTL, 14338c2ecf20Sopenharmony_ci .bit_idx = 23, 14348c2ecf20Sopenharmony_ci }, 14358c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 14368c2ecf20Sopenharmony_ci .name = "sd_emmc_b_clk0", 14378c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 14388c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 14398c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_div.hw 14408c2ecf20Sopenharmony_ci }, 14418c2ecf20Sopenharmony_ci .num_parents = 1, 14428c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14438c2ecf20Sopenharmony_ci }, 14448c2ecf20Sopenharmony_ci}; 14458c2ecf20Sopenharmony_ci 14468c2ecf20Sopenharmony_ci/* EMMC/NAND clock */ 14478c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_c_clk0_sel = { 14488c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 14498c2ecf20Sopenharmony_ci .offset = HHI_NAND_CLK_CNTL, 14508c2ecf20Sopenharmony_ci .mask = 0x7, 14518c2ecf20Sopenharmony_ci .shift = 9, 14528c2ecf20Sopenharmony_ci }, 14538c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 14548c2ecf20Sopenharmony_ci .name = "sd_emmc_c_clk0_sel", 14558c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 14568c2ecf20Sopenharmony_ci .parent_data = gxbb_sd_emmc_clk0_parent_data, 14578c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_data), 14588c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14598c2ecf20Sopenharmony_ci }, 14608c2ecf20Sopenharmony_ci}; 14618c2ecf20Sopenharmony_ci 14628c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_c_clk0_div = { 14638c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 14648c2ecf20Sopenharmony_ci .offset = HHI_NAND_CLK_CNTL, 14658c2ecf20Sopenharmony_ci .shift = 0, 14668c2ecf20Sopenharmony_ci .width = 7, 14678c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 14688c2ecf20Sopenharmony_ci }, 14698c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 14708c2ecf20Sopenharmony_ci .name = "sd_emmc_c_clk0_div", 14718c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 14728c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 14738c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_sel.hw 14748c2ecf20Sopenharmony_ci }, 14758c2ecf20Sopenharmony_ci .num_parents = 1, 14768c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14778c2ecf20Sopenharmony_ci }, 14788c2ecf20Sopenharmony_ci}; 14798c2ecf20Sopenharmony_ci 14808c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_sd_emmc_c_clk0 = { 14818c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 14828c2ecf20Sopenharmony_ci .offset = HHI_NAND_CLK_CNTL, 14838c2ecf20Sopenharmony_ci .bit_idx = 7, 14848c2ecf20Sopenharmony_ci }, 14858c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 14868c2ecf20Sopenharmony_ci .name = "sd_emmc_c_clk0", 14878c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 14888c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 14898c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_div.hw 14908c2ecf20Sopenharmony_ci }, 14918c2ecf20Sopenharmony_ci .num_parents = 1, 14928c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 14938c2ecf20Sopenharmony_ci }, 14948c2ecf20Sopenharmony_ci}; 14958c2ecf20Sopenharmony_ci 14968c2ecf20Sopenharmony_ci/* VPU Clock */ 14978c2ecf20Sopenharmony_ci 14988c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_vpu_parent_hws[] = { 14998c2ecf20Sopenharmony_ci &gxbb_fclk_div4.hw, 15008c2ecf20Sopenharmony_ci &gxbb_fclk_div3.hw, 15018c2ecf20Sopenharmony_ci &gxbb_fclk_div5.hw, 15028c2ecf20Sopenharmony_ci &gxbb_fclk_div7.hw, 15038c2ecf20Sopenharmony_ci}; 15048c2ecf20Sopenharmony_ci 15058c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_0_sel = { 15068c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 15078c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15088c2ecf20Sopenharmony_ci .mask = 0x3, 15098c2ecf20Sopenharmony_ci .shift = 9, 15108c2ecf20Sopenharmony_ci }, 15118c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 15128c2ecf20Sopenharmony_ci .name = "vpu_0_sel", 15138c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 15148c2ecf20Sopenharmony_ci /* 15158c2ecf20Sopenharmony_ci * bits 9:10 selects from 4 possible parents: 15168c2ecf20Sopenharmony_ci * fclk_div4, fclk_div3, fclk_div5, fclk_div7, 15178c2ecf20Sopenharmony_ci */ 15188c2ecf20Sopenharmony_ci .parent_hws = gxbb_vpu_parent_hws, 15198c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vpu_parent_hws), 15208c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 15218c2ecf20Sopenharmony_ci }, 15228c2ecf20Sopenharmony_ci}; 15238c2ecf20Sopenharmony_ci 15248c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_0_div = { 15258c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 15268c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15278c2ecf20Sopenharmony_ci .shift = 0, 15288c2ecf20Sopenharmony_ci .width = 7, 15298c2ecf20Sopenharmony_ci }, 15308c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 15318c2ecf20Sopenharmony_ci .name = "vpu_0_div", 15328c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 15338c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vpu_0_sel.hw }, 15348c2ecf20Sopenharmony_ci .num_parents = 1, 15358c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 15368c2ecf20Sopenharmony_ci }, 15378c2ecf20Sopenharmony_ci}; 15388c2ecf20Sopenharmony_ci 15398c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_0 = { 15408c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 15418c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15428c2ecf20Sopenharmony_ci .bit_idx = 8, 15438c2ecf20Sopenharmony_ci }, 15448c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 15458c2ecf20Sopenharmony_ci .name = "vpu_0", 15468c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 15478c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vpu_0_div.hw }, 15488c2ecf20Sopenharmony_ci .num_parents = 1, 15498c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 15508c2ecf20Sopenharmony_ci }, 15518c2ecf20Sopenharmony_ci}; 15528c2ecf20Sopenharmony_ci 15538c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_1_sel = { 15548c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 15558c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15568c2ecf20Sopenharmony_ci .mask = 0x3, 15578c2ecf20Sopenharmony_ci .shift = 25, 15588c2ecf20Sopenharmony_ci }, 15598c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 15608c2ecf20Sopenharmony_ci .name = "vpu_1_sel", 15618c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 15628c2ecf20Sopenharmony_ci /* 15638c2ecf20Sopenharmony_ci * bits 25:26 selects from 4 possible parents: 15648c2ecf20Sopenharmony_ci * fclk_div4, fclk_div3, fclk_div5, fclk_div7, 15658c2ecf20Sopenharmony_ci */ 15668c2ecf20Sopenharmony_ci .parent_hws = gxbb_vpu_parent_hws, 15678c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vpu_parent_hws), 15688c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 15698c2ecf20Sopenharmony_ci }, 15708c2ecf20Sopenharmony_ci}; 15718c2ecf20Sopenharmony_ci 15728c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_1_div = { 15738c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 15748c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15758c2ecf20Sopenharmony_ci .shift = 16, 15768c2ecf20Sopenharmony_ci .width = 7, 15778c2ecf20Sopenharmony_ci }, 15788c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 15798c2ecf20Sopenharmony_ci .name = "vpu_1_div", 15808c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 15818c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vpu_1_sel.hw }, 15828c2ecf20Sopenharmony_ci .num_parents = 1, 15838c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 15848c2ecf20Sopenharmony_ci }, 15858c2ecf20Sopenharmony_ci}; 15868c2ecf20Sopenharmony_ci 15878c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu_1 = { 15888c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 15898c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 15908c2ecf20Sopenharmony_ci .bit_idx = 24, 15918c2ecf20Sopenharmony_ci }, 15928c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 15938c2ecf20Sopenharmony_ci .name = "vpu_1", 15948c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 15958c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vpu_1_div.hw }, 15968c2ecf20Sopenharmony_ci .num_parents = 1, 15978c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 15988c2ecf20Sopenharmony_ci }, 15998c2ecf20Sopenharmony_ci}; 16008c2ecf20Sopenharmony_ci 16018c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vpu = { 16028c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 16038c2ecf20Sopenharmony_ci .offset = HHI_VPU_CLK_CNTL, 16048c2ecf20Sopenharmony_ci .mask = 1, 16058c2ecf20Sopenharmony_ci .shift = 31, 16068c2ecf20Sopenharmony_ci }, 16078c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 16088c2ecf20Sopenharmony_ci .name = "vpu", 16098c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 16108c2ecf20Sopenharmony_ci /* 16118c2ecf20Sopenharmony_ci * bit 31 selects from 2 possible parents: 16128c2ecf20Sopenharmony_ci * vpu_0 or vpu_1 16138c2ecf20Sopenharmony_ci */ 16148c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 16158c2ecf20Sopenharmony_ci &gxbb_vpu_0.hw, 16168c2ecf20Sopenharmony_ci &gxbb_vpu_1.hw 16178c2ecf20Sopenharmony_ci }, 16188c2ecf20Sopenharmony_ci .num_parents = 2, 16198c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 16208c2ecf20Sopenharmony_ci }, 16218c2ecf20Sopenharmony_ci}; 16228c2ecf20Sopenharmony_ci 16238c2ecf20Sopenharmony_ci/* VAPB Clock */ 16248c2ecf20Sopenharmony_ci 16258c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_vapb_parent_hws[] = { 16268c2ecf20Sopenharmony_ci &gxbb_fclk_div4.hw, 16278c2ecf20Sopenharmony_ci &gxbb_fclk_div3.hw, 16288c2ecf20Sopenharmony_ci &gxbb_fclk_div5.hw, 16298c2ecf20Sopenharmony_ci &gxbb_fclk_div7.hw, 16308c2ecf20Sopenharmony_ci}; 16318c2ecf20Sopenharmony_ci 16328c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_0_sel = { 16338c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 16348c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 16358c2ecf20Sopenharmony_ci .mask = 0x3, 16368c2ecf20Sopenharmony_ci .shift = 9, 16378c2ecf20Sopenharmony_ci }, 16388c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 16398c2ecf20Sopenharmony_ci .name = "vapb_0_sel", 16408c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 16418c2ecf20Sopenharmony_ci /* 16428c2ecf20Sopenharmony_ci * bits 9:10 selects from 4 possible parents: 16438c2ecf20Sopenharmony_ci * fclk_div4, fclk_div3, fclk_div5, fclk_div7, 16448c2ecf20Sopenharmony_ci */ 16458c2ecf20Sopenharmony_ci .parent_hws = gxbb_vapb_parent_hws, 16468c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vapb_parent_hws), 16478c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 16488c2ecf20Sopenharmony_ci }, 16498c2ecf20Sopenharmony_ci}; 16508c2ecf20Sopenharmony_ci 16518c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_0_div = { 16528c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 16538c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 16548c2ecf20Sopenharmony_ci .shift = 0, 16558c2ecf20Sopenharmony_ci .width = 7, 16568c2ecf20Sopenharmony_ci }, 16578c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 16588c2ecf20Sopenharmony_ci .name = "vapb_0_div", 16598c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 16608c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 16618c2ecf20Sopenharmony_ci &gxbb_vapb_0_sel.hw 16628c2ecf20Sopenharmony_ci }, 16638c2ecf20Sopenharmony_ci .num_parents = 1, 16648c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 16658c2ecf20Sopenharmony_ci }, 16668c2ecf20Sopenharmony_ci}; 16678c2ecf20Sopenharmony_ci 16688c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_0 = { 16698c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 16708c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 16718c2ecf20Sopenharmony_ci .bit_idx = 8, 16728c2ecf20Sopenharmony_ci }, 16738c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 16748c2ecf20Sopenharmony_ci .name = "vapb_0", 16758c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 16768c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 16778c2ecf20Sopenharmony_ci &gxbb_vapb_0_div.hw 16788c2ecf20Sopenharmony_ci }, 16798c2ecf20Sopenharmony_ci .num_parents = 1, 16808c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 16818c2ecf20Sopenharmony_ci }, 16828c2ecf20Sopenharmony_ci}; 16838c2ecf20Sopenharmony_ci 16848c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_1_sel = { 16858c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 16868c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 16878c2ecf20Sopenharmony_ci .mask = 0x3, 16888c2ecf20Sopenharmony_ci .shift = 25, 16898c2ecf20Sopenharmony_ci }, 16908c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 16918c2ecf20Sopenharmony_ci .name = "vapb_1_sel", 16928c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 16938c2ecf20Sopenharmony_ci /* 16948c2ecf20Sopenharmony_ci * bits 25:26 selects from 4 possible parents: 16958c2ecf20Sopenharmony_ci * fclk_div4, fclk_div3, fclk_div5, fclk_div7, 16968c2ecf20Sopenharmony_ci */ 16978c2ecf20Sopenharmony_ci .parent_hws = gxbb_vapb_parent_hws, 16988c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vapb_parent_hws), 16998c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 17008c2ecf20Sopenharmony_ci }, 17018c2ecf20Sopenharmony_ci}; 17028c2ecf20Sopenharmony_ci 17038c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_1_div = { 17048c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 17058c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 17068c2ecf20Sopenharmony_ci .shift = 16, 17078c2ecf20Sopenharmony_ci .width = 7, 17088c2ecf20Sopenharmony_ci }, 17098c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 17108c2ecf20Sopenharmony_ci .name = "vapb_1_div", 17118c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 17128c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 17138c2ecf20Sopenharmony_ci &gxbb_vapb_1_sel.hw 17148c2ecf20Sopenharmony_ci }, 17158c2ecf20Sopenharmony_ci .num_parents = 1, 17168c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 17178c2ecf20Sopenharmony_ci }, 17188c2ecf20Sopenharmony_ci}; 17198c2ecf20Sopenharmony_ci 17208c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_1 = { 17218c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 17228c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 17238c2ecf20Sopenharmony_ci .bit_idx = 24, 17248c2ecf20Sopenharmony_ci }, 17258c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 17268c2ecf20Sopenharmony_ci .name = "vapb_1", 17278c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 17288c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 17298c2ecf20Sopenharmony_ci &gxbb_vapb_1_div.hw 17308c2ecf20Sopenharmony_ci }, 17318c2ecf20Sopenharmony_ci .num_parents = 1, 17328c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 17338c2ecf20Sopenharmony_ci }, 17348c2ecf20Sopenharmony_ci}; 17358c2ecf20Sopenharmony_ci 17368c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb_sel = { 17378c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 17388c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 17398c2ecf20Sopenharmony_ci .mask = 1, 17408c2ecf20Sopenharmony_ci .shift = 31, 17418c2ecf20Sopenharmony_ci }, 17428c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 17438c2ecf20Sopenharmony_ci .name = "vapb_sel", 17448c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 17458c2ecf20Sopenharmony_ci /* 17468c2ecf20Sopenharmony_ci * bit 31 selects from 2 possible parents: 17478c2ecf20Sopenharmony_ci * vapb_0 or vapb_1 17488c2ecf20Sopenharmony_ci */ 17498c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 17508c2ecf20Sopenharmony_ci &gxbb_vapb_0.hw, 17518c2ecf20Sopenharmony_ci &gxbb_vapb_1.hw 17528c2ecf20Sopenharmony_ci }, 17538c2ecf20Sopenharmony_ci .num_parents = 2, 17548c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT, 17558c2ecf20Sopenharmony_ci }, 17568c2ecf20Sopenharmony_ci}; 17578c2ecf20Sopenharmony_ci 17588c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vapb = { 17598c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 17608c2ecf20Sopenharmony_ci .offset = HHI_VAPBCLK_CNTL, 17618c2ecf20Sopenharmony_ci .bit_idx = 30, 17628c2ecf20Sopenharmony_ci }, 17638c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 17648c2ecf20Sopenharmony_ci .name = "vapb", 17658c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 17668c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vapb_sel.hw }, 17678c2ecf20Sopenharmony_ci .num_parents = 1, 17688c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 17698c2ecf20Sopenharmony_ci }, 17708c2ecf20Sopenharmony_ci}; 17718c2ecf20Sopenharmony_ci 17728c2ecf20Sopenharmony_ci/* Video Clocks */ 17738c2ecf20Sopenharmony_ci 17748c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vid_pll_div = { 17758c2ecf20Sopenharmony_ci .data = &(struct meson_vid_pll_div_data){ 17768c2ecf20Sopenharmony_ci .val = { 17778c2ecf20Sopenharmony_ci .reg_off = HHI_VID_PLL_CLK_DIV, 17788c2ecf20Sopenharmony_ci .shift = 0, 17798c2ecf20Sopenharmony_ci .width = 15, 17808c2ecf20Sopenharmony_ci }, 17818c2ecf20Sopenharmony_ci .sel = { 17828c2ecf20Sopenharmony_ci .reg_off = HHI_VID_PLL_CLK_DIV, 17838c2ecf20Sopenharmony_ci .shift = 16, 17848c2ecf20Sopenharmony_ci .width = 2, 17858c2ecf20Sopenharmony_ci }, 17868c2ecf20Sopenharmony_ci }, 17878c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 17888c2ecf20Sopenharmony_ci .name = "vid_pll_div", 17898c2ecf20Sopenharmony_ci .ops = &meson_vid_pll_div_ro_ops, 17908c2ecf20Sopenharmony_ci .parent_data = &(const struct clk_parent_data) { 17918c2ecf20Sopenharmony_ci /* 17928c2ecf20Sopenharmony_ci * Note: 17938c2ecf20Sopenharmony_ci * GXL and GXBB have different hdmi_plls (with 17948c2ecf20Sopenharmony_ci * different struct clk_hw). We fallback to the global 17958c2ecf20Sopenharmony_ci * naming string mechanism so vid_pll_div picks up the 17968c2ecf20Sopenharmony_ci * appropriate one. 17978c2ecf20Sopenharmony_ci */ 17988c2ecf20Sopenharmony_ci .name = "hdmi_pll", 17998c2ecf20Sopenharmony_ci .index = -1, 18008c2ecf20Sopenharmony_ci }, 18018c2ecf20Sopenharmony_ci .num_parents = 1, 18028c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, 18038c2ecf20Sopenharmony_ci }, 18048c2ecf20Sopenharmony_ci}; 18058c2ecf20Sopenharmony_ci 18068c2ecf20Sopenharmony_cistatic const struct clk_parent_data gxbb_vid_pll_parent_data[] = { 18078c2ecf20Sopenharmony_ci { .hw = &gxbb_vid_pll_div.hw }, 18088c2ecf20Sopenharmony_ci /* 18098c2ecf20Sopenharmony_ci * Note: 18108c2ecf20Sopenharmony_ci * GXL and GXBB have different hdmi_plls (with 18118c2ecf20Sopenharmony_ci * different struct clk_hw). We fallback to the global 18128c2ecf20Sopenharmony_ci * naming string mechanism so vid_pll_div picks up the 18138c2ecf20Sopenharmony_ci * appropriate one. 18148c2ecf20Sopenharmony_ci */ 18158c2ecf20Sopenharmony_ci { .name = "hdmi_pll", .index = -1 }, 18168c2ecf20Sopenharmony_ci}; 18178c2ecf20Sopenharmony_ci 18188c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vid_pll_sel = { 18198c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 18208c2ecf20Sopenharmony_ci .offset = HHI_VID_PLL_CLK_DIV, 18218c2ecf20Sopenharmony_ci .mask = 0x1, 18228c2ecf20Sopenharmony_ci .shift = 18, 18238c2ecf20Sopenharmony_ci }, 18248c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 18258c2ecf20Sopenharmony_ci .name = "vid_pll_sel", 18268c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 18278c2ecf20Sopenharmony_ci /* 18288c2ecf20Sopenharmony_ci * bit 18 selects from 2 possible parents: 18298c2ecf20Sopenharmony_ci * vid_pll_div or hdmi_pll 18308c2ecf20Sopenharmony_ci */ 18318c2ecf20Sopenharmony_ci .parent_data = gxbb_vid_pll_parent_data, 18328c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vid_pll_parent_data), 18338c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 18348c2ecf20Sopenharmony_ci }, 18358c2ecf20Sopenharmony_ci}; 18368c2ecf20Sopenharmony_ci 18378c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vid_pll = { 18388c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 18398c2ecf20Sopenharmony_ci .offset = HHI_VID_PLL_CLK_DIV, 18408c2ecf20Sopenharmony_ci .bit_idx = 19, 18418c2ecf20Sopenharmony_ci }, 18428c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 18438c2ecf20Sopenharmony_ci .name = "vid_pll", 18448c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 18458c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 18468c2ecf20Sopenharmony_ci &gxbb_vid_pll_sel.hw 18478c2ecf20Sopenharmony_ci }, 18488c2ecf20Sopenharmony_ci .num_parents = 1, 18498c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 18508c2ecf20Sopenharmony_ci }, 18518c2ecf20Sopenharmony_ci}; 18528c2ecf20Sopenharmony_ci 18538c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_vclk_parent_hws[] = { 18548c2ecf20Sopenharmony_ci &gxbb_vid_pll.hw, 18558c2ecf20Sopenharmony_ci &gxbb_fclk_div4.hw, 18568c2ecf20Sopenharmony_ci &gxbb_fclk_div3.hw, 18578c2ecf20Sopenharmony_ci &gxbb_fclk_div5.hw, 18588c2ecf20Sopenharmony_ci &gxbb_vid_pll.hw, 18598c2ecf20Sopenharmony_ci &gxbb_fclk_div7.hw, 18608c2ecf20Sopenharmony_ci &gxbb_mpll1.hw, 18618c2ecf20Sopenharmony_ci}; 18628c2ecf20Sopenharmony_ci 18638c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_sel = { 18648c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 18658c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 18668c2ecf20Sopenharmony_ci .mask = 0x7, 18678c2ecf20Sopenharmony_ci .shift = 16, 18688c2ecf20Sopenharmony_ci }, 18698c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 18708c2ecf20Sopenharmony_ci .name = "vclk_sel", 18718c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 18728c2ecf20Sopenharmony_ci /* 18738c2ecf20Sopenharmony_ci * bits 16:18 selects from 8 possible parents: 18748c2ecf20Sopenharmony_ci * vid_pll, fclk_div4, fclk_div3, fclk_div5, 18758c2ecf20Sopenharmony_ci * vid_pll, fclk_div7, mp1 18768c2ecf20Sopenharmony_ci */ 18778c2ecf20Sopenharmony_ci .parent_hws = gxbb_vclk_parent_hws, 18788c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vclk_parent_hws), 18798c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 18808c2ecf20Sopenharmony_ci }, 18818c2ecf20Sopenharmony_ci}; 18828c2ecf20Sopenharmony_ci 18838c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_sel = { 18848c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 18858c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 18868c2ecf20Sopenharmony_ci .mask = 0x7, 18878c2ecf20Sopenharmony_ci .shift = 16, 18888c2ecf20Sopenharmony_ci }, 18898c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 18908c2ecf20Sopenharmony_ci .name = "vclk2_sel", 18918c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 18928c2ecf20Sopenharmony_ci /* 18938c2ecf20Sopenharmony_ci * bits 16:18 selects from 8 possible parents: 18948c2ecf20Sopenharmony_ci * vid_pll, fclk_div4, fclk_div3, fclk_div5, 18958c2ecf20Sopenharmony_ci * vid_pll, fclk_div7, mp1 18968c2ecf20Sopenharmony_ci */ 18978c2ecf20Sopenharmony_ci .parent_hws = gxbb_vclk_parent_hws, 18988c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vclk_parent_hws), 18998c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 19008c2ecf20Sopenharmony_ci }, 19018c2ecf20Sopenharmony_ci}; 19028c2ecf20Sopenharmony_ci 19038c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_input = { 19048c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 19058c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_DIV, 19068c2ecf20Sopenharmony_ci .bit_idx = 16, 19078c2ecf20Sopenharmony_ci }, 19088c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 19098c2ecf20Sopenharmony_ci .name = "vclk_input", 19108c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 19118c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk_sel.hw }, 19128c2ecf20Sopenharmony_ci .num_parents = 1, 19138c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 19148c2ecf20Sopenharmony_ci }, 19158c2ecf20Sopenharmony_ci}; 19168c2ecf20Sopenharmony_ci 19178c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_input = { 19188c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 19198c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_DIV, 19208c2ecf20Sopenharmony_ci .bit_idx = 16, 19218c2ecf20Sopenharmony_ci }, 19228c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 19238c2ecf20Sopenharmony_ci .name = "vclk2_input", 19248c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 19258c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2_sel.hw }, 19268c2ecf20Sopenharmony_ci .num_parents = 1, 19278c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 19288c2ecf20Sopenharmony_ci }, 19298c2ecf20Sopenharmony_ci}; 19308c2ecf20Sopenharmony_ci 19318c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div = { 19328c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 19338c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_DIV, 19348c2ecf20Sopenharmony_ci .shift = 0, 19358c2ecf20Sopenharmony_ci .width = 8, 19368c2ecf20Sopenharmony_ci }, 19378c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 19388c2ecf20Sopenharmony_ci .name = "vclk_div", 19398c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 19408c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 19418c2ecf20Sopenharmony_ci &gxbb_vclk_input.hw 19428c2ecf20Sopenharmony_ci }, 19438c2ecf20Sopenharmony_ci .num_parents = 1, 19448c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE, 19458c2ecf20Sopenharmony_ci }, 19468c2ecf20Sopenharmony_ci}; 19478c2ecf20Sopenharmony_ci 19488c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div = { 19498c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 19508c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_DIV, 19518c2ecf20Sopenharmony_ci .shift = 0, 19528c2ecf20Sopenharmony_ci .width = 8, 19538c2ecf20Sopenharmony_ci }, 19548c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 19558c2ecf20Sopenharmony_ci .name = "vclk2_div", 19568c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 19578c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 19588c2ecf20Sopenharmony_ci &gxbb_vclk2_input.hw 19598c2ecf20Sopenharmony_ci }, 19608c2ecf20Sopenharmony_ci .num_parents = 1, 19618c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE, 19628c2ecf20Sopenharmony_ci }, 19638c2ecf20Sopenharmony_ci}; 19648c2ecf20Sopenharmony_ci 19658c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk = { 19668c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 19678c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 19688c2ecf20Sopenharmony_ci .bit_idx = 19, 19698c2ecf20Sopenharmony_ci }, 19708c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 19718c2ecf20Sopenharmony_ci .name = "vclk", 19728c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 19738c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk_div.hw }, 19748c2ecf20Sopenharmony_ci .num_parents = 1, 19758c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 19768c2ecf20Sopenharmony_ci }, 19778c2ecf20Sopenharmony_ci}; 19788c2ecf20Sopenharmony_ci 19798c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2 = { 19808c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 19818c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 19828c2ecf20Sopenharmony_ci .bit_idx = 19, 19838c2ecf20Sopenharmony_ci }, 19848c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 19858c2ecf20Sopenharmony_ci .name = "vclk2", 19868c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 19878c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2_div.hw }, 19888c2ecf20Sopenharmony_ci .num_parents = 1, 19898c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 19908c2ecf20Sopenharmony_ci }, 19918c2ecf20Sopenharmony_ci}; 19928c2ecf20Sopenharmony_ci 19938c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div1 = { 19948c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 19958c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 19968c2ecf20Sopenharmony_ci .bit_idx = 0, 19978c2ecf20Sopenharmony_ci }, 19988c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 19998c2ecf20Sopenharmony_ci .name = "vclk_div1", 20008c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20018c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk.hw }, 20028c2ecf20Sopenharmony_ci .num_parents = 1, 20038c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20048c2ecf20Sopenharmony_ci }, 20058c2ecf20Sopenharmony_ci}; 20068c2ecf20Sopenharmony_ci 20078c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div2_en = { 20088c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20098c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 20108c2ecf20Sopenharmony_ci .bit_idx = 1, 20118c2ecf20Sopenharmony_ci }, 20128c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20138c2ecf20Sopenharmony_ci .name = "vclk_div2_en", 20148c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20158c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk.hw }, 20168c2ecf20Sopenharmony_ci .num_parents = 1, 20178c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20188c2ecf20Sopenharmony_ci }, 20198c2ecf20Sopenharmony_ci}; 20208c2ecf20Sopenharmony_ci 20218c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div4_en = { 20228c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20238c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 20248c2ecf20Sopenharmony_ci .bit_idx = 2, 20258c2ecf20Sopenharmony_ci }, 20268c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20278c2ecf20Sopenharmony_ci .name = "vclk_div4_en", 20288c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20298c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk.hw }, 20308c2ecf20Sopenharmony_ci .num_parents = 1, 20318c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20328c2ecf20Sopenharmony_ci }, 20338c2ecf20Sopenharmony_ci}; 20348c2ecf20Sopenharmony_ci 20358c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div6_en = { 20368c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20378c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 20388c2ecf20Sopenharmony_ci .bit_idx = 3, 20398c2ecf20Sopenharmony_ci }, 20408c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20418c2ecf20Sopenharmony_ci .name = "vclk_div6_en", 20428c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20438c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk.hw }, 20448c2ecf20Sopenharmony_ci .num_parents = 1, 20458c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20468c2ecf20Sopenharmony_ci }, 20478c2ecf20Sopenharmony_ci}; 20488c2ecf20Sopenharmony_ci 20498c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk_div12_en = { 20508c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20518c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL, 20528c2ecf20Sopenharmony_ci .bit_idx = 4, 20538c2ecf20Sopenharmony_ci }, 20548c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20558c2ecf20Sopenharmony_ci .name = "vclk_div12_en", 20568c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20578c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk.hw }, 20588c2ecf20Sopenharmony_ci .num_parents = 1, 20598c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20608c2ecf20Sopenharmony_ci }, 20618c2ecf20Sopenharmony_ci}; 20628c2ecf20Sopenharmony_ci 20638c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div1 = { 20648c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20658c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 20668c2ecf20Sopenharmony_ci .bit_idx = 0, 20678c2ecf20Sopenharmony_ci }, 20688c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20698c2ecf20Sopenharmony_ci .name = "vclk2_div1", 20708c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20718c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2.hw }, 20728c2ecf20Sopenharmony_ci .num_parents = 1, 20738c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20748c2ecf20Sopenharmony_ci }, 20758c2ecf20Sopenharmony_ci}; 20768c2ecf20Sopenharmony_ci 20778c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div2_en = { 20788c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20798c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 20808c2ecf20Sopenharmony_ci .bit_idx = 1, 20818c2ecf20Sopenharmony_ci }, 20828c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20838c2ecf20Sopenharmony_ci .name = "vclk2_div2_en", 20848c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20858c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2.hw }, 20868c2ecf20Sopenharmony_ci .num_parents = 1, 20878c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 20888c2ecf20Sopenharmony_ci }, 20898c2ecf20Sopenharmony_ci}; 20908c2ecf20Sopenharmony_ci 20918c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div4_en = { 20928c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 20938c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 20948c2ecf20Sopenharmony_ci .bit_idx = 2, 20958c2ecf20Sopenharmony_ci }, 20968c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 20978c2ecf20Sopenharmony_ci .name = "vclk2_div4_en", 20988c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 20998c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2.hw }, 21008c2ecf20Sopenharmony_ci .num_parents = 1, 21018c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 21028c2ecf20Sopenharmony_ci }, 21038c2ecf20Sopenharmony_ci}; 21048c2ecf20Sopenharmony_ci 21058c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div6_en = { 21068c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 21078c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 21088c2ecf20Sopenharmony_ci .bit_idx = 3, 21098c2ecf20Sopenharmony_ci }, 21108c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 21118c2ecf20Sopenharmony_ci .name = "vclk2_div6_en", 21128c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 21138c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2.hw }, 21148c2ecf20Sopenharmony_ci .num_parents = 1, 21158c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 21168c2ecf20Sopenharmony_ci }, 21178c2ecf20Sopenharmony_ci}; 21188c2ecf20Sopenharmony_ci 21198c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vclk2_div12_en = { 21208c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 21218c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_CNTL, 21228c2ecf20Sopenharmony_ci .bit_idx = 4, 21238c2ecf20Sopenharmony_ci }, 21248c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 21258c2ecf20Sopenharmony_ci .name = "vclk2_div12_en", 21268c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 21278c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_vclk2.hw }, 21288c2ecf20Sopenharmony_ci .num_parents = 1, 21298c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 21308c2ecf20Sopenharmony_ci }, 21318c2ecf20Sopenharmony_ci}; 21328c2ecf20Sopenharmony_ci 21338c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk_div2 = { 21348c2ecf20Sopenharmony_ci .mult = 1, 21358c2ecf20Sopenharmony_ci .div = 2, 21368c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 21378c2ecf20Sopenharmony_ci .name = "vclk_div2", 21388c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 21398c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 21408c2ecf20Sopenharmony_ci &gxbb_vclk_div2_en.hw 21418c2ecf20Sopenharmony_ci }, 21428c2ecf20Sopenharmony_ci .num_parents = 1, 21438c2ecf20Sopenharmony_ci }, 21448c2ecf20Sopenharmony_ci}; 21458c2ecf20Sopenharmony_ci 21468c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk_div4 = { 21478c2ecf20Sopenharmony_ci .mult = 1, 21488c2ecf20Sopenharmony_ci .div = 4, 21498c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 21508c2ecf20Sopenharmony_ci .name = "vclk_div4", 21518c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 21528c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 21538c2ecf20Sopenharmony_ci &gxbb_vclk_div4_en.hw 21548c2ecf20Sopenharmony_ci }, 21558c2ecf20Sopenharmony_ci .num_parents = 1, 21568c2ecf20Sopenharmony_ci }, 21578c2ecf20Sopenharmony_ci}; 21588c2ecf20Sopenharmony_ci 21598c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk_div6 = { 21608c2ecf20Sopenharmony_ci .mult = 1, 21618c2ecf20Sopenharmony_ci .div = 6, 21628c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 21638c2ecf20Sopenharmony_ci .name = "vclk_div6", 21648c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 21658c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 21668c2ecf20Sopenharmony_ci &gxbb_vclk_div6_en.hw 21678c2ecf20Sopenharmony_ci }, 21688c2ecf20Sopenharmony_ci .num_parents = 1, 21698c2ecf20Sopenharmony_ci }, 21708c2ecf20Sopenharmony_ci}; 21718c2ecf20Sopenharmony_ci 21728c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk_div12 = { 21738c2ecf20Sopenharmony_ci .mult = 1, 21748c2ecf20Sopenharmony_ci .div = 12, 21758c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 21768c2ecf20Sopenharmony_ci .name = "vclk_div12", 21778c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 21788c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 21798c2ecf20Sopenharmony_ci &gxbb_vclk_div12_en.hw 21808c2ecf20Sopenharmony_ci }, 21818c2ecf20Sopenharmony_ci .num_parents = 1, 21828c2ecf20Sopenharmony_ci }, 21838c2ecf20Sopenharmony_ci}; 21848c2ecf20Sopenharmony_ci 21858c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk2_div2 = { 21868c2ecf20Sopenharmony_ci .mult = 1, 21878c2ecf20Sopenharmony_ci .div = 2, 21888c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 21898c2ecf20Sopenharmony_ci .name = "vclk2_div2", 21908c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 21918c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 21928c2ecf20Sopenharmony_ci &gxbb_vclk2_div2_en.hw 21938c2ecf20Sopenharmony_ci }, 21948c2ecf20Sopenharmony_ci .num_parents = 1, 21958c2ecf20Sopenharmony_ci }, 21968c2ecf20Sopenharmony_ci}; 21978c2ecf20Sopenharmony_ci 21988c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk2_div4 = { 21998c2ecf20Sopenharmony_ci .mult = 1, 22008c2ecf20Sopenharmony_ci .div = 4, 22018c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22028c2ecf20Sopenharmony_ci .name = "vclk2_div4", 22038c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 22048c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 22058c2ecf20Sopenharmony_ci &gxbb_vclk2_div4_en.hw 22068c2ecf20Sopenharmony_ci }, 22078c2ecf20Sopenharmony_ci .num_parents = 1, 22088c2ecf20Sopenharmony_ci }, 22098c2ecf20Sopenharmony_ci}; 22108c2ecf20Sopenharmony_ci 22118c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk2_div6 = { 22128c2ecf20Sopenharmony_ci .mult = 1, 22138c2ecf20Sopenharmony_ci .div = 6, 22148c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22158c2ecf20Sopenharmony_ci .name = "vclk2_div6", 22168c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 22178c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 22188c2ecf20Sopenharmony_ci &gxbb_vclk2_div6_en.hw 22198c2ecf20Sopenharmony_ci }, 22208c2ecf20Sopenharmony_ci .num_parents = 1, 22218c2ecf20Sopenharmony_ci }, 22228c2ecf20Sopenharmony_ci}; 22238c2ecf20Sopenharmony_ci 22248c2ecf20Sopenharmony_cistatic struct clk_fixed_factor gxbb_vclk2_div12 = { 22258c2ecf20Sopenharmony_ci .mult = 1, 22268c2ecf20Sopenharmony_ci .div = 12, 22278c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22288c2ecf20Sopenharmony_ci .name = "vclk2_div12", 22298c2ecf20Sopenharmony_ci .ops = &clk_fixed_factor_ops, 22308c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 22318c2ecf20Sopenharmony_ci &gxbb_vclk2_div12_en.hw 22328c2ecf20Sopenharmony_ci }, 22338c2ecf20Sopenharmony_ci .num_parents = 1, 22348c2ecf20Sopenharmony_ci }, 22358c2ecf20Sopenharmony_ci}; 22368c2ecf20Sopenharmony_ci 22378c2ecf20Sopenharmony_cistatic u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 }; 22388c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_cts_parent_hws[] = { 22398c2ecf20Sopenharmony_ci &gxbb_vclk_div1.hw, 22408c2ecf20Sopenharmony_ci &gxbb_vclk_div2.hw, 22418c2ecf20Sopenharmony_ci &gxbb_vclk_div4.hw, 22428c2ecf20Sopenharmony_ci &gxbb_vclk_div6.hw, 22438c2ecf20Sopenharmony_ci &gxbb_vclk_div12.hw, 22448c2ecf20Sopenharmony_ci &gxbb_vclk2_div1.hw, 22458c2ecf20Sopenharmony_ci &gxbb_vclk2_div2.hw, 22468c2ecf20Sopenharmony_ci &gxbb_vclk2_div4.hw, 22478c2ecf20Sopenharmony_ci &gxbb_vclk2_div6.hw, 22488c2ecf20Sopenharmony_ci &gxbb_vclk2_div12.hw, 22498c2ecf20Sopenharmony_ci}; 22508c2ecf20Sopenharmony_ci 22518c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_enci_sel = { 22528c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 22538c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_DIV, 22548c2ecf20Sopenharmony_ci .mask = 0xf, 22558c2ecf20Sopenharmony_ci .shift = 28, 22568c2ecf20Sopenharmony_ci .table = mux_table_cts_sel, 22578c2ecf20Sopenharmony_ci }, 22588c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22598c2ecf20Sopenharmony_ci .name = "cts_enci_sel", 22608c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 22618c2ecf20Sopenharmony_ci .parent_hws = gxbb_cts_parent_hws, 22628c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_cts_parent_hws), 22638c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 22648c2ecf20Sopenharmony_ci }, 22658c2ecf20Sopenharmony_ci}; 22668c2ecf20Sopenharmony_ci 22678c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_encp_sel = { 22688c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 22698c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_DIV, 22708c2ecf20Sopenharmony_ci .mask = 0xf, 22718c2ecf20Sopenharmony_ci .shift = 20, 22728c2ecf20Sopenharmony_ci .table = mux_table_cts_sel, 22738c2ecf20Sopenharmony_ci }, 22748c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22758c2ecf20Sopenharmony_ci .name = "cts_encp_sel", 22768c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 22778c2ecf20Sopenharmony_ci .parent_hws = gxbb_cts_parent_hws, 22788c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_cts_parent_hws), 22798c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 22808c2ecf20Sopenharmony_ci }, 22818c2ecf20Sopenharmony_ci}; 22828c2ecf20Sopenharmony_ci 22838c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_vdac_sel = { 22848c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 22858c2ecf20Sopenharmony_ci .offset = HHI_VIID_CLK_DIV, 22868c2ecf20Sopenharmony_ci .mask = 0xf, 22878c2ecf20Sopenharmony_ci .shift = 28, 22888c2ecf20Sopenharmony_ci .table = mux_table_cts_sel, 22898c2ecf20Sopenharmony_ci }, 22908c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 22918c2ecf20Sopenharmony_ci .name = "cts_vdac_sel", 22928c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 22938c2ecf20Sopenharmony_ci .parent_hws = gxbb_cts_parent_hws, 22948c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_cts_parent_hws), 22958c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 22968c2ecf20Sopenharmony_ci }, 22978c2ecf20Sopenharmony_ci}; 22988c2ecf20Sopenharmony_ci 22998c2ecf20Sopenharmony_ci/* TOFIX: add support for cts_tcon */ 23008c2ecf20Sopenharmony_cistatic u32 mux_table_hdmi_tx_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 }; 23018c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_cts_hdmi_tx_parent_hws[] = { 23028c2ecf20Sopenharmony_ci &gxbb_vclk_div1.hw, 23038c2ecf20Sopenharmony_ci &gxbb_vclk_div2.hw, 23048c2ecf20Sopenharmony_ci &gxbb_vclk_div4.hw, 23058c2ecf20Sopenharmony_ci &gxbb_vclk_div6.hw, 23068c2ecf20Sopenharmony_ci &gxbb_vclk_div12.hw, 23078c2ecf20Sopenharmony_ci &gxbb_vclk2_div1.hw, 23088c2ecf20Sopenharmony_ci &gxbb_vclk2_div2.hw, 23098c2ecf20Sopenharmony_ci &gxbb_vclk2_div4.hw, 23108c2ecf20Sopenharmony_ci &gxbb_vclk2_div6.hw, 23118c2ecf20Sopenharmony_ci &gxbb_vclk2_div12.hw, 23128c2ecf20Sopenharmony_ci}; 23138c2ecf20Sopenharmony_ci 23148c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_tx_sel = { 23158c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 23168c2ecf20Sopenharmony_ci .offset = HHI_HDMI_CLK_CNTL, 23178c2ecf20Sopenharmony_ci .mask = 0xf, 23188c2ecf20Sopenharmony_ci .shift = 16, 23198c2ecf20Sopenharmony_ci .table = mux_table_hdmi_tx_sel, 23208c2ecf20Sopenharmony_ci }, 23218c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 23228c2ecf20Sopenharmony_ci .name = "hdmi_tx_sel", 23238c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 23248c2ecf20Sopenharmony_ci /* 23258c2ecf20Sopenharmony_ci * bits 31:28 selects from 12 possible parents: 23268c2ecf20Sopenharmony_ci * vclk_div1, vclk_div2, vclk_div4, vclk_div6, vclk_div12 23278c2ecf20Sopenharmony_ci * vclk2_div1, vclk2_div2, vclk2_div4, vclk2_div6, vclk2_div12, 23288c2ecf20Sopenharmony_ci * cts_tcon 23298c2ecf20Sopenharmony_ci */ 23308c2ecf20Sopenharmony_ci .parent_hws = gxbb_cts_hdmi_tx_parent_hws, 23318c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_cts_hdmi_tx_parent_hws), 23328c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 23338c2ecf20Sopenharmony_ci }, 23348c2ecf20Sopenharmony_ci}; 23358c2ecf20Sopenharmony_ci 23368c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_enci = { 23378c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 23388c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL2, 23398c2ecf20Sopenharmony_ci .bit_idx = 0, 23408c2ecf20Sopenharmony_ci }, 23418c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 23428c2ecf20Sopenharmony_ci .name = "cts_enci", 23438c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 23448c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 23458c2ecf20Sopenharmony_ci &gxbb_cts_enci_sel.hw 23468c2ecf20Sopenharmony_ci }, 23478c2ecf20Sopenharmony_ci .num_parents = 1, 23488c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 23498c2ecf20Sopenharmony_ci }, 23508c2ecf20Sopenharmony_ci}; 23518c2ecf20Sopenharmony_ci 23528c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_encp = { 23538c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 23548c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL2, 23558c2ecf20Sopenharmony_ci .bit_idx = 2, 23568c2ecf20Sopenharmony_ci }, 23578c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 23588c2ecf20Sopenharmony_ci .name = "cts_encp", 23598c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 23608c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 23618c2ecf20Sopenharmony_ci &gxbb_cts_encp_sel.hw 23628c2ecf20Sopenharmony_ci }, 23638c2ecf20Sopenharmony_ci .num_parents = 1, 23648c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 23658c2ecf20Sopenharmony_ci }, 23668c2ecf20Sopenharmony_ci}; 23678c2ecf20Sopenharmony_ci 23688c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_cts_vdac = { 23698c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 23708c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL2, 23718c2ecf20Sopenharmony_ci .bit_idx = 4, 23728c2ecf20Sopenharmony_ci }, 23738c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 23748c2ecf20Sopenharmony_ci .name = "cts_vdac", 23758c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 23768c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 23778c2ecf20Sopenharmony_ci &gxbb_cts_vdac_sel.hw 23788c2ecf20Sopenharmony_ci }, 23798c2ecf20Sopenharmony_ci .num_parents = 1, 23808c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 23818c2ecf20Sopenharmony_ci }, 23828c2ecf20Sopenharmony_ci}; 23838c2ecf20Sopenharmony_ci 23848c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_tx = { 23858c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 23868c2ecf20Sopenharmony_ci .offset = HHI_VID_CLK_CNTL2, 23878c2ecf20Sopenharmony_ci .bit_idx = 5, 23888c2ecf20Sopenharmony_ci }, 23898c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 23908c2ecf20Sopenharmony_ci .name = "hdmi_tx", 23918c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 23928c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 23938c2ecf20Sopenharmony_ci &gxbb_hdmi_tx_sel.hw 23948c2ecf20Sopenharmony_ci }, 23958c2ecf20Sopenharmony_ci .num_parents = 1, 23968c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 23978c2ecf20Sopenharmony_ci }, 23988c2ecf20Sopenharmony_ci}; 23998c2ecf20Sopenharmony_ci 24008c2ecf20Sopenharmony_ci/* HDMI Clocks */ 24018c2ecf20Sopenharmony_ci 24028c2ecf20Sopenharmony_cistatic const struct clk_parent_data gxbb_hdmi_parent_data[] = { 24038c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 24048c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div4.hw }, 24058c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 24068c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 24078c2ecf20Sopenharmony_ci}; 24088c2ecf20Sopenharmony_ci 24098c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_sel = { 24108c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 24118c2ecf20Sopenharmony_ci .offset = HHI_HDMI_CLK_CNTL, 24128c2ecf20Sopenharmony_ci .mask = 0x3, 24138c2ecf20Sopenharmony_ci .shift = 9, 24148c2ecf20Sopenharmony_ci .flags = CLK_MUX_ROUND_CLOSEST, 24158c2ecf20Sopenharmony_ci }, 24168c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 24178c2ecf20Sopenharmony_ci .name = "hdmi_sel", 24188c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 24198c2ecf20Sopenharmony_ci .parent_data = gxbb_hdmi_parent_data, 24208c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_hdmi_parent_data), 24218c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, 24228c2ecf20Sopenharmony_ci }, 24238c2ecf20Sopenharmony_ci}; 24248c2ecf20Sopenharmony_ci 24258c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi_div = { 24268c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 24278c2ecf20Sopenharmony_ci .offset = HHI_HDMI_CLK_CNTL, 24288c2ecf20Sopenharmony_ci .shift = 0, 24298c2ecf20Sopenharmony_ci .width = 7, 24308c2ecf20Sopenharmony_ci }, 24318c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 24328c2ecf20Sopenharmony_ci .name = "hdmi_div", 24338c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 24348c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_hdmi_sel.hw }, 24358c2ecf20Sopenharmony_ci .num_parents = 1, 24368c2ecf20Sopenharmony_ci .flags = CLK_GET_RATE_NOCACHE, 24378c2ecf20Sopenharmony_ci }, 24388c2ecf20Sopenharmony_ci}; 24398c2ecf20Sopenharmony_ci 24408c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_hdmi = { 24418c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 24428c2ecf20Sopenharmony_ci .offset = HHI_HDMI_CLK_CNTL, 24438c2ecf20Sopenharmony_ci .bit_idx = 8, 24448c2ecf20Sopenharmony_ci }, 24458c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 24468c2ecf20Sopenharmony_ci .name = "hdmi", 24478c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 24488c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { &gxbb_hdmi_div.hw }, 24498c2ecf20Sopenharmony_ci .num_parents = 1, 24508c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 24518c2ecf20Sopenharmony_ci }, 24528c2ecf20Sopenharmony_ci}; 24538c2ecf20Sopenharmony_ci 24548c2ecf20Sopenharmony_ci/* VDEC clocks */ 24558c2ecf20Sopenharmony_ci 24568c2ecf20Sopenharmony_cistatic const struct clk_hw *gxbb_vdec_parent_hws[] = { 24578c2ecf20Sopenharmony_ci &gxbb_fclk_div4.hw, 24588c2ecf20Sopenharmony_ci &gxbb_fclk_div3.hw, 24598c2ecf20Sopenharmony_ci &gxbb_fclk_div5.hw, 24608c2ecf20Sopenharmony_ci &gxbb_fclk_div7.hw, 24618c2ecf20Sopenharmony_ci}; 24628c2ecf20Sopenharmony_ci 24638c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_1_sel = { 24648c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 24658c2ecf20Sopenharmony_ci .offset = HHI_VDEC_CLK_CNTL, 24668c2ecf20Sopenharmony_ci .mask = 0x3, 24678c2ecf20Sopenharmony_ci .shift = 9, 24688c2ecf20Sopenharmony_ci .flags = CLK_MUX_ROUND_CLOSEST, 24698c2ecf20Sopenharmony_ci }, 24708c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 24718c2ecf20Sopenharmony_ci .name = "vdec_1_sel", 24728c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 24738c2ecf20Sopenharmony_ci .parent_hws = gxbb_vdec_parent_hws, 24748c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vdec_parent_hws), 24758c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 24768c2ecf20Sopenharmony_ci }, 24778c2ecf20Sopenharmony_ci}; 24788c2ecf20Sopenharmony_ci 24798c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_1_div = { 24808c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 24818c2ecf20Sopenharmony_ci .offset = HHI_VDEC_CLK_CNTL, 24828c2ecf20Sopenharmony_ci .shift = 0, 24838c2ecf20Sopenharmony_ci .width = 7, 24848c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 24858c2ecf20Sopenharmony_ci }, 24868c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 24878c2ecf20Sopenharmony_ci .name = "vdec_1_div", 24888c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 24898c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 24908c2ecf20Sopenharmony_ci &gxbb_vdec_1_sel.hw 24918c2ecf20Sopenharmony_ci }, 24928c2ecf20Sopenharmony_ci .num_parents = 1, 24938c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 24948c2ecf20Sopenharmony_ci }, 24958c2ecf20Sopenharmony_ci}; 24968c2ecf20Sopenharmony_ci 24978c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_1 = { 24988c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 24998c2ecf20Sopenharmony_ci .offset = HHI_VDEC_CLK_CNTL, 25008c2ecf20Sopenharmony_ci .bit_idx = 8, 25018c2ecf20Sopenharmony_ci }, 25028c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 25038c2ecf20Sopenharmony_ci .name = "vdec_1", 25048c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 25058c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 25068c2ecf20Sopenharmony_ci &gxbb_vdec_1_div.hw 25078c2ecf20Sopenharmony_ci }, 25088c2ecf20Sopenharmony_ci .num_parents = 1, 25098c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 25108c2ecf20Sopenharmony_ci }, 25118c2ecf20Sopenharmony_ci}; 25128c2ecf20Sopenharmony_ci 25138c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_hevc_sel = { 25148c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 25158c2ecf20Sopenharmony_ci .offset = HHI_VDEC2_CLK_CNTL, 25168c2ecf20Sopenharmony_ci .mask = 0x3, 25178c2ecf20Sopenharmony_ci .shift = 25, 25188c2ecf20Sopenharmony_ci .flags = CLK_MUX_ROUND_CLOSEST, 25198c2ecf20Sopenharmony_ci }, 25208c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 25218c2ecf20Sopenharmony_ci .name = "vdec_hevc_sel", 25228c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 25238c2ecf20Sopenharmony_ci .parent_hws = gxbb_vdec_parent_hws, 25248c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gxbb_vdec_parent_hws), 25258c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 25268c2ecf20Sopenharmony_ci }, 25278c2ecf20Sopenharmony_ci}; 25288c2ecf20Sopenharmony_ci 25298c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_hevc_div = { 25308c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 25318c2ecf20Sopenharmony_ci .offset = HHI_VDEC2_CLK_CNTL, 25328c2ecf20Sopenharmony_ci .shift = 16, 25338c2ecf20Sopenharmony_ci .width = 7, 25348c2ecf20Sopenharmony_ci .flags = CLK_DIVIDER_ROUND_CLOSEST, 25358c2ecf20Sopenharmony_ci }, 25368c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 25378c2ecf20Sopenharmony_ci .name = "vdec_hevc_div", 25388c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 25398c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 25408c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_sel.hw 25418c2ecf20Sopenharmony_ci }, 25428c2ecf20Sopenharmony_ci .num_parents = 1, 25438c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 25448c2ecf20Sopenharmony_ci }, 25458c2ecf20Sopenharmony_ci}; 25468c2ecf20Sopenharmony_ci 25478c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_vdec_hevc = { 25488c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 25498c2ecf20Sopenharmony_ci .offset = HHI_VDEC2_CLK_CNTL, 25508c2ecf20Sopenharmony_ci .bit_idx = 24, 25518c2ecf20Sopenharmony_ci }, 25528c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data) { 25538c2ecf20Sopenharmony_ci .name = "vdec_hevc", 25548c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 25558c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 25568c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_div.hw 25578c2ecf20Sopenharmony_ci }, 25588c2ecf20Sopenharmony_ci .num_parents = 1, 25598c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 25608c2ecf20Sopenharmony_ci }, 25618c2ecf20Sopenharmony_ci}; 25628c2ecf20Sopenharmony_ci 25638c2ecf20Sopenharmony_cistatic u32 mux_table_gen_clk[] = { 0, 4, 5, 6, 7, 8, 25648c2ecf20Sopenharmony_ci 9, 10, 11, 13, 14, }; 25658c2ecf20Sopenharmony_cistatic const struct clk_parent_data gen_clk_parent_data[] = { 25668c2ecf20Sopenharmony_ci { .fw_name = "xtal", }, 25678c2ecf20Sopenharmony_ci { .hw = &gxbb_vdec_1.hw }, 25688c2ecf20Sopenharmony_ci { .hw = &gxbb_vdec_hevc.hw }, 25698c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll0.hw }, 25708c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll1.hw }, 25718c2ecf20Sopenharmony_ci { .hw = &gxbb_mpll2.hw }, 25728c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div4.hw }, 25738c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div3.hw }, 25748c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div5.hw }, 25758c2ecf20Sopenharmony_ci { .hw = &gxbb_fclk_div7.hw }, 25768c2ecf20Sopenharmony_ci { .hw = &gxbb_gp0_pll.hw }, 25778c2ecf20Sopenharmony_ci}; 25788c2ecf20Sopenharmony_ci 25798c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_gen_clk_sel = { 25808c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_mux_data){ 25818c2ecf20Sopenharmony_ci .offset = HHI_GEN_CLK_CNTL, 25828c2ecf20Sopenharmony_ci .mask = 0xf, 25838c2ecf20Sopenharmony_ci .shift = 12, 25848c2ecf20Sopenharmony_ci .table = mux_table_gen_clk, 25858c2ecf20Sopenharmony_ci }, 25868c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 25878c2ecf20Sopenharmony_ci .name = "gen_clk_sel", 25888c2ecf20Sopenharmony_ci .ops = &clk_regmap_mux_ops, 25898c2ecf20Sopenharmony_ci /* 25908c2ecf20Sopenharmony_ci * bits 15:12 selects from 14 possible parents: 25918c2ecf20Sopenharmony_ci * xtal, [rtc_oscin_i], [sys_cpu_div16], [ddr_dpll_pt], 25928c2ecf20Sopenharmony_ci * vid_pll, vid2_pll (hevc), mpll0, mpll1, mpll2, fdiv4, 25938c2ecf20Sopenharmony_ci * fdiv3, fdiv5, [cts_msr_clk], fdiv7, gp0_pll 25948c2ecf20Sopenharmony_ci */ 25958c2ecf20Sopenharmony_ci .parent_data = gen_clk_parent_data, 25968c2ecf20Sopenharmony_ci .num_parents = ARRAY_SIZE(gen_clk_parent_data), 25978c2ecf20Sopenharmony_ci }, 25988c2ecf20Sopenharmony_ci}; 25998c2ecf20Sopenharmony_ci 26008c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_gen_clk_div = { 26018c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_div_data){ 26028c2ecf20Sopenharmony_ci .offset = HHI_GEN_CLK_CNTL, 26038c2ecf20Sopenharmony_ci .shift = 0, 26048c2ecf20Sopenharmony_ci .width = 11, 26058c2ecf20Sopenharmony_ci }, 26068c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 26078c2ecf20Sopenharmony_ci .name = "gen_clk_div", 26088c2ecf20Sopenharmony_ci .ops = &clk_regmap_divider_ops, 26098c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 26108c2ecf20Sopenharmony_ci &gxbb_gen_clk_sel.hw 26118c2ecf20Sopenharmony_ci }, 26128c2ecf20Sopenharmony_ci .num_parents = 1, 26138c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 26148c2ecf20Sopenharmony_ci }, 26158c2ecf20Sopenharmony_ci}; 26168c2ecf20Sopenharmony_ci 26178c2ecf20Sopenharmony_cistatic struct clk_regmap gxbb_gen_clk = { 26188c2ecf20Sopenharmony_ci .data = &(struct clk_regmap_gate_data){ 26198c2ecf20Sopenharmony_ci .offset = HHI_GEN_CLK_CNTL, 26208c2ecf20Sopenharmony_ci .bit_idx = 7, 26218c2ecf20Sopenharmony_ci }, 26228c2ecf20Sopenharmony_ci .hw.init = &(struct clk_init_data){ 26238c2ecf20Sopenharmony_ci .name = "gen_clk", 26248c2ecf20Sopenharmony_ci .ops = &clk_regmap_gate_ops, 26258c2ecf20Sopenharmony_ci .parent_hws = (const struct clk_hw *[]) { 26268c2ecf20Sopenharmony_ci &gxbb_gen_clk_div.hw 26278c2ecf20Sopenharmony_ci }, 26288c2ecf20Sopenharmony_ci .num_parents = 1, 26298c2ecf20Sopenharmony_ci .flags = CLK_SET_RATE_PARENT, 26308c2ecf20Sopenharmony_ci }, 26318c2ecf20Sopenharmony_ci}; 26328c2ecf20Sopenharmony_ci 26338c2ecf20Sopenharmony_ci#define MESON_GATE(_name, _reg, _bit) \ 26348c2ecf20Sopenharmony_ci MESON_PCLK(_name, _reg, _bit, &gxbb_clk81.hw) 26358c2ecf20Sopenharmony_ci 26368c2ecf20Sopenharmony_ci/* Everything Else (EE) domain gates */ 26378c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ddr, HHI_GCLK_MPEG0, 0); 26388c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_dos, HHI_GCLK_MPEG0, 1); 26398c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_isa, HHI_GCLK_MPEG0, 5); 26408c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_pl301, HHI_GCLK_MPEG0, 6); 26418c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_periphs, HHI_GCLK_MPEG0, 7); 26428c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_spicc, HHI_GCLK_MPEG0, 8); 26438c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_i2c, HHI_GCLK_MPEG0, 9); 26448c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_sana, HHI_GCLK_MPEG0, 10); 26458c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_smart_card, HHI_GCLK_MPEG0, 11); 26468c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_rng0, HHI_GCLK_MPEG0, 12); 26478c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_uart0, HHI_GCLK_MPEG0, 13); 26488c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_sdhc, HHI_GCLK_MPEG0, 14); 26498c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_stream, HHI_GCLK_MPEG0, 15); 26508c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_async_fifo, HHI_GCLK_MPEG0, 16); 26518c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_sdio, HHI_GCLK_MPEG0, 17); 26528c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_abuf, HHI_GCLK_MPEG0, 18); 26538c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_hiu_iface, HHI_GCLK_MPEG0, 19); 26548c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_assist_misc, HHI_GCLK_MPEG0, 23); 26558c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_emmc_a, HHI_GCLK_MPEG0, 24); 26568c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_emmc_b, HHI_GCLK_MPEG0, 25); 26578c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_emmc_c, HHI_GCLK_MPEG0, 26); 26588c2ecf20Sopenharmony_cistatic MESON_GATE(gxl_acodec, HHI_GCLK_MPEG0, 28); 26598c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_spi, HHI_GCLK_MPEG0, 30); 26608c2ecf20Sopenharmony_ci 26618c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_i2s_spdif, HHI_GCLK_MPEG1, 2); 26628c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_eth, HHI_GCLK_MPEG1, 3); 26638c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_demux, HHI_GCLK_MPEG1, 4); 26648c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_blkmv, HHI_GCLK_MPEG1, 14); 26658c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_aiu, HHI_GCLK_MPEG1, 15); 26668c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_uart1, HHI_GCLK_MPEG1, 16); 26678c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_g2d, HHI_GCLK_MPEG1, 20); 26688c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_usb0, HHI_GCLK_MPEG1, 21); 26698c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_usb1, HHI_GCLK_MPEG1, 22); 26708c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_reset, HHI_GCLK_MPEG1, 23); 26718c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_nand, HHI_GCLK_MPEG1, 24); 26728c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_dos_parser, HHI_GCLK_MPEG1, 25); 26738c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_usb, HHI_GCLK_MPEG1, 26); 26748c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vdin1, HHI_GCLK_MPEG1, 28); 26758c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ahb_arb0, HHI_GCLK_MPEG1, 29); 26768c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_efuse, HHI_GCLK_MPEG1, 30); 26778c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_boot_rom, HHI_GCLK_MPEG1, 31); 26788c2ecf20Sopenharmony_ci 26798c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ahb_data_bus, HHI_GCLK_MPEG2, 1); 26808c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ahb_ctrl_bus, HHI_GCLK_MPEG2, 2); 26818c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_hdmi_intr_sync, HHI_GCLK_MPEG2, 3); 26828c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_hdmi_pclk, HHI_GCLK_MPEG2, 4); 26838c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_usb1_ddr_bridge, HHI_GCLK_MPEG2, 8); 26848c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_usb0_ddr_bridge, HHI_GCLK_MPEG2, 9); 26858c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_mmc_pclk, HHI_GCLK_MPEG2, 11); 26868c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_dvin, HHI_GCLK_MPEG2, 12); 26878c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_uart2, HHI_GCLK_MPEG2, 15); 26888c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_sar_adc, HHI_GCLK_MPEG2, 22); 26898c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vpu_intr, HHI_GCLK_MPEG2, 25); 26908c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_sec_ahb_ahb3_bridge, HHI_GCLK_MPEG2, 26); 26918c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_clk81_a53, HHI_GCLK_MPEG2, 29); 26928c2ecf20Sopenharmony_ci 26938c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_venci0, HHI_GCLK_OTHER, 1); 26948c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_venci1, HHI_GCLK_OTHER, 2); 26958c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_vencp0, HHI_GCLK_OTHER, 3); 26968c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_vencp1, HHI_GCLK_OTHER, 4); 26978c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_gclk_venci_int0, HHI_GCLK_OTHER, 8); 26988c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_gclk_vencp_int, HHI_GCLK_OTHER, 9); 26998c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_dac_clk, HHI_GCLK_OTHER, 10); 27008c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_aoclk_gate, HHI_GCLK_OTHER, 14); 27018c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_iec958_gate, HHI_GCLK_OTHER, 16); 27028c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_enc480p, HHI_GCLK_OTHER, 20); 27038c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_rng1, HHI_GCLK_OTHER, 21); 27048c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_gclk_venci_int1, HHI_GCLK_OTHER, 22); 27058c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_venclmcc, HHI_GCLK_OTHER, 24); 27068c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk2_vencl, HHI_GCLK_OTHER, 25); 27078c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_vclk_other, HHI_GCLK_OTHER, 26); 27088c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_edp, HHI_GCLK_OTHER, 31); 27098c2ecf20Sopenharmony_ci 27108c2ecf20Sopenharmony_ci/* Always On (AO) domain gates */ 27118c2ecf20Sopenharmony_ci 27128c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ao_media_cpu, HHI_GCLK_AO, 0); 27138c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ao_ahb_sram, HHI_GCLK_AO, 1); 27148c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ao_ahb_bus, HHI_GCLK_AO, 2); 27158c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ao_iface, HHI_GCLK_AO, 3); 27168c2ecf20Sopenharmony_cistatic MESON_GATE(gxbb_ao_i2c, HHI_GCLK_AO, 4); 27178c2ecf20Sopenharmony_ci 27188c2ecf20Sopenharmony_ci/* AIU gates */ 27198c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_aiu_glue, HHI_GCLK_MPEG1, 6, &gxbb_aiu.hw); 27208c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_iec958, HHI_GCLK_MPEG1, 7, &gxbb_aiu_glue.hw); 27218c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_i2s_out, HHI_GCLK_MPEG1, 8, &gxbb_aiu_glue.hw); 27228c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_amclk, HHI_GCLK_MPEG1, 9, &gxbb_aiu_glue.hw); 27238c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_aififo2, HHI_GCLK_MPEG1, 10, &gxbb_aiu_glue.hw); 27248c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_mixer, HHI_GCLK_MPEG1, 11, &gxbb_aiu_glue.hw); 27258c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_mixer_iface, HHI_GCLK_MPEG1, 12, &gxbb_aiu_glue.hw); 27268c2ecf20Sopenharmony_cistatic MESON_PCLK(gxbb_adc, HHI_GCLK_MPEG1, 13, &gxbb_aiu_glue.hw); 27278c2ecf20Sopenharmony_ci 27288c2ecf20Sopenharmony_ci/* Array of all clocks provided by this provider */ 27298c2ecf20Sopenharmony_ci 27308c2ecf20Sopenharmony_cistatic struct clk_hw_onecell_data gxbb_hw_onecell_data = { 27318c2ecf20Sopenharmony_ci .hws = { 27328c2ecf20Sopenharmony_ci [CLKID_SYS_PLL] = &gxbb_sys_pll.hw, 27338c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL] = &gxbb_hdmi_pll.hw, 27348c2ecf20Sopenharmony_ci [CLKID_FIXED_PLL] = &gxbb_fixed_pll.hw, 27358c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV2] = &gxbb_fclk_div2.hw, 27368c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV3] = &gxbb_fclk_div3.hw, 27378c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV4] = &gxbb_fclk_div4.hw, 27388c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV5] = &gxbb_fclk_div5.hw, 27398c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV7] = &gxbb_fclk_div7.hw, 27408c2ecf20Sopenharmony_ci [CLKID_GP0_PLL] = &gxbb_gp0_pll.hw, 27418c2ecf20Sopenharmony_ci [CLKID_MPEG_SEL] = &gxbb_mpeg_clk_sel.hw, 27428c2ecf20Sopenharmony_ci [CLKID_MPEG_DIV] = &gxbb_mpeg_clk_div.hw, 27438c2ecf20Sopenharmony_ci [CLKID_CLK81] = &gxbb_clk81.hw, 27448c2ecf20Sopenharmony_ci [CLKID_MPLL0] = &gxbb_mpll0.hw, 27458c2ecf20Sopenharmony_ci [CLKID_MPLL1] = &gxbb_mpll1.hw, 27468c2ecf20Sopenharmony_ci [CLKID_MPLL2] = &gxbb_mpll2.hw, 27478c2ecf20Sopenharmony_ci [CLKID_DDR] = &gxbb_ddr.hw, 27488c2ecf20Sopenharmony_ci [CLKID_DOS] = &gxbb_dos.hw, 27498c2ecf20Sopenharmony_ci [CLKID_ISA] = &gxbb_isa.hw, 27508c2ecf20Sopenharmony_ci [CLKID_PL301] = &gxbb_pl301.hw, 27518c2ecf20Sopenharmony_ci [CLKID_PERIPHS] = &gxbb_periphs.hw, 27528c2ecf20Sopenharmony_ci [CLKID_SPICC] = &gxbb_spicc.hw, 27538c2ecf20Sopenharmony_ci [CLKID_I2C] = &gxbb_i2c.hw, 27548c2ecf20Sopenharmony_ci [CLKID_SAR_ADC] = &gxbb_sar_adc.hw, 27558c2ecf20Sopenharmony_ci [CLKID_SMART_CARD] = &gxbb_smart_card.hw, 27568c2ecf20Sopenharmony_ci [CLKID_RNG0] = &gxbb_rng0.hw, 27578c2ecf20Sopenharmony_ci [CLKID_UART0] = &gxbb_uart0.hw, 27588c2ecf20Sopenharmony_ci [CLKID_SDHC] = &gxbb_sdhc.hw, 27598c2ecf20Sopenharmony_ci [CLKID_STREAM] = &gxbb_stream.hw, 27608c2ecf20Sopenharmony_ci [CLKID_ASYNC_FIFO] = &gxbb_async_fifo.hw, 27618c2ecf20Sopenharmony_ci [CLKID_SDIO] = &gxbb_sdio.hw, 27628c2ecf20Sopenharmony_ci [CLKID_ABUF] = &gxbb_abuf.hw, 27638c2ecf20Sopenharmony_ci [CLKID_HIU_IFACE] = &gxbb_hiu_iface.hw, 27648c2ecf20Sopenharmony_ci [CLKID_ASSIST_MISC] = &gxbb_assist_misc.hw, 27658c2ecf20Sopenharmony_ci [CLKID_SPI] = &gxbb_spi.hw, 27668c2ecf20Sopenharmony_ci [CLKID_I2S_SPDIF] = &gxbb_i2s_spdif.hw, 27678c2ecf20Sopenharmony_ci [CLKID_ETH] = &gxbb_eth.hw, 27688c2ecf20Sopenharmony_ci [CLKID_DEMUX] = &gxbb_demux.hw, 27698c2ecf20Sopenharmony_ci [CLKID_AIU_GLUE] = &gxbb_aiu_glue.hw, 27708c2ecf20Sopenharmony_ci [CLKID_IEC958] = &gxbb_iec958.hw, 27718c2ecf20Sopenharmony_ci [CLKID_I2S_OUT] = &gxbb_i2s_out.hw, 27728c2ecf20Sopenharmony_ci [CLKID_AMCLK] = &gxbb_amclk.hw, 27738c2ecf20Sopenharmony_ci [CLKID_AIFIFO2] = &gxbb_aififo2.hw, 27748c2ecf20Sopenharmony_ci [CLKID_MIXER] = &gxbb_mixer.hw, 27758c2ecf20Sopenharmony_ci [CLKID_MIXER_IFACE] = &gxbb_mixer_iface.hw, 27768c2ecf20Sopenharmony_ci [CLKID_ADC] = &gxbb_adc.hw, 27778c2ecf20Sopenharmony_ci [CLKID_BLKMV] = &gxbb_blkmv.hw, 27788c2ecf20Sopenharmony_ci [CLKID_AIU] = &gxbb_aiu.hw, 27798c2ecf20Sopenharmony_ci [CLKID_UART1] = &gxbb_uart1.hw, 27808c2ecf20Sopenharmony_ci [CLKID_G2D] = &gxbb_g2d.hw, 27818c2ecf20Sopenharmony_ci [CLKID_USB0] = &gxbb_usb0.hw, 27828c2ecf20Sopenharmony_ci [CLKID_USB1] = &gxbb_usb1.hw, 27838c2ecf20Sopenharmony_ci [CLKID_RESET] = &gxbb_reset.hw, 27848c2ecf20Sopenharmony_ci [CLKID_NAND] = &gxbb_nand.hw, 27858c2ecf20Sopenharmony_ci [CLKID_DOS_PARSER] = &gxbb_dos_parser.hw, 27868c2ecf20Sopenharmony_ci [CLKID_USB] = &gxbb_usb.hw, 27878c2ecf20Sopenharmony_ci [CLKID_VDIN1] = &gxbb_vdin1.hw, 27888c2ecf20Sopenharmony_ci [CLKID_AHB_ARB0] = &gxbb_ahb_arb0.hw, 27898c2ecf20Sopenharmony_ci [CLKID_EFUSE] = &gxbb_efuse.hw, 27908c2ecf20Sopenharmony_ci [CLKID_BOOT_ROM] = &gxbb_boot_rom.hw, 27918c2ecf20Sopenharmony_ci [CLKID_AHB_DATA_BUS] = &gxbb_ahb_data_bus.hw, 27928c2ecf20Sopenharmony_ci [CLKID_AHB_CTRL_BUS] = &gxbb_ahb_ctrl_bus.hw, 27938c2ecf20Sopenharmony_ci [CLKID_HDMI_INTR_SYNC] = &gxbb_hdmi_intr_sync.hw, 27948c2ecf20Sopenharmony_ci [CLKID_HDMI_PCLK] = &gxbb_hdmi_pclk.hw, 27958c2ecf20Sopenharmony_ci [CLKID_USB1_DDR_BRIDGE] = &gxbb_usb1_ddr_bridge.hw, 27968c2ecf20Sopenharmony_ci [CLKID_USB0_DDR_BRIDGE] = &gxbb_usb0_ddr_bridge.hw, 27978c2ecf20Sopenharmony_ci [CLKID_MMC_PCLK] = &gxbb_mmc_pclk.hw, 27988c2ecf20Sopenharmony_ci [CLKID_DVIN] = &gxbb_dvin.hw, 27998c2ecf20Sopenharmony_ci [CLKID_UART2] = &gxbb_uart2.hw, 28008c2ecf20Sopenharmony_ci [CLKID_SANA] = &gxbb_sana.hw, 28018c2ecf20Sopenharmony_ci [CLKID_VPU_INTR] = &gxbb_vpu_intr.hw, 28028c2ecf20Sopenharmony_ci [CLKID_SEC_AHB_AHB3_BRIDGE] = &gxbb_sec_ahb_ahb3_bridge.hw, 28038c2ecf20Sopenharmony_ci [CLKID_CLK81_A53] = &gxbb_clk81_a53.hw, 28048c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCI0] = &gxbb_vclk2_venci0.hw, 28058c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCI1] = &gxbb_vclk2_venci1.hw, 28068c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCP0] = &gxbb_vclk2_vencp0.hw, 28078c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCP1] = &gxbb_vclk2_vencp1.hw, 28088c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT0] = &gxbb_gclk_venci_int0.hw, 28098c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT] = &gxbb_gclk_vencp_int.hw, 28108c2ecf20Sopenharmony_ci [CLKID_DAC_CLK] = &gxbb_dac_clk.hw, 28118c2ecf20Sopenharmony_ci [CLKID_AOCLK_GATE] = &gxbb_aoclk_gate.hw, 28128c2ecf20Sopenharmony_ci [CLKID_IEC958_GATE] = &gxbb_iec958_gate.hw, 28138c2ecf20Sopenharmony_ci [CLKID_ENC480P] = &gxbb_enc480p.hw, 28148c2ecf20Sopenharmony_ci [CLKID_RNG1] = &gxbb_rng1.hw, 28158c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT1] = &gxbb_gclk_venci_int1.hw, 28168c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCLMCC] = &gxbb_vclk2_venclmcc.hw, 28178c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCL] = &gxbb_vclk2_vencl.hw, 28188c2ecf20Sopenharmony_ci [CLKID_VCLK_OTHER] = &gxbb_vclk_other.hw, 28198c2ecf20Sopenharmony_ci [CLKID_EDP] = &gxbb_edp.hw, 28208c2ecf20Sopenharmony_ci [CLKID_AO_MEDIA_CPU] = &gxbb_ao_media_cpu.hw, 28218c2ecf20Sopenharmony_ci [CLKID_AO_AHB_SRAM] = &gxbb_ao_ahb_sram.hw, 28228c2ecf20Sopenharmony_ci [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, 28238c2ecf20Sopenharmony_ci [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, 28248c2ecf20Sopenharmony_ci [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, 28258c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A] = &gxbb_emmc_a.hw, 28268c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B] = &gxbb_emmc_b.hw, 28278c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C] = &gxbb_emmc_c.hw, 28288c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_CLK] = &gxbb_sar_adc_clk.hw, 28298c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_SEL] = &gxbb_sar_adc_clk_sel.hw, 28308c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_DIV] = &gxbb_sar_adc_clk_div.hw, 28318c2ecf20Sopenharmony_ci [CLKID_MALI_0_SEL] = &gxbb_mali_0_sel.hw, 28328c2ecf20Sopenharmony_ci [CLKID_MALI_0_DIV] = &gxbb_mali_0_div.hw, 28338c2ecf20Sopenharmony_ci [CLKID_MALI_0] = &gxbb_mali_0.hw, 28348c2ecf20Sopenharmony_ci [CLKID_MALI_1_SEL] = &gxbb_mali_1_sel.hw, 28358c2ecf20Sopenharmony_ci [CLKID_MALI_1_DIV] = &gxbb_mali_1_div.hw, 28368c2ecf20Sopenharmony_ci [CLKID_MALI_1] = &gxbb_mali_1.hw, 28378c2ecf20Sopenharmony_ci [CLKID_MALI] = &gxbb_mali.hw, 28388c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK] = &gxbb_cts_amclk.hw, 28398c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK_SEL] = &gxbb_cts_amclk_sel.hw, 28408c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK_DIV] = &gxbb_cts_amclk_div.hw, 28418c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958] = &gxbb_cts_mclk_i958.hw, 28428c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958_SEL] = &gxbb_cts_mclk_i958_sel.hw, 28438c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958_DIV] = &gxbb_cts_mclk_i958_div.hw, 28448c2ecf20Sopenharmony_ci [CLKID_CTS_I958] = &gxbb_cts_i958.hw, 28458c2ecf20Sopenharmony_ci [CLKID_32K_CLK] = &gxbb_32k_clk.hw, 28468c2ecf20Sopenharmony_ci [CLKID_32K_CLK_SEL] = &gxbb_32k_clk_sel.hw, 28478c2ecf20Sopenharmony_ci [CLKID_32K_CLK_DIV] = &gxbb_32k_clk_div.hw, 28488c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0_SEL] = &gxbb_sd_emmc_a_clk0_sel.hw, 28498c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0_DIV] = &gxbb_sd_emmc_a_clk0_div.hw, 28508c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0] = &gxbb_sd_emmc_a_clk0.hw, 28518c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0_SEL] = &gxbb_sd_emmc_b_clk0_sel.hw, 28528c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0_DIV] = &gxbb_sd_emmc_b_clk0_div.hw, 28538c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0] = &gxbb_sd_emmc_b_clk0.hw, 28548c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0_SEL] = &gxbb_sd_emmc_c_clk0_sel.hw, 28558c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0_DIV] = &gxbb_sd_emmc_c_clk0_div.hw, 28568c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0] = &gxbb_sd_emmc_c_clk0.hw, 28578c2ecf20Sopenharmony_ci [CLKID_VPU_0_SEL] = &gxbb_vpu_0_sel.hw, 28588c2ecf20Sopenharmony_ci [CLKID_VPU_0_DIV] = &gxbb_vpu_0_div.hw, 28598c2ecf20Sopenharmony_ci [CLKID_VPU_0] = &gxbb_vpu_0.hw, 28608c2ecf20Sopenharmony_ci [CLKID_VPU_1_SEL] = &gxbb_vpu_1_sel.hw, 28618c2ecf20Sopenharmony_ci [CLKID_VPU_1_DIV] = &gxbb_vpu_1_div.hw, 28628c2ecf20Sopenharmony_ci [CLKID_VPU_1] = &gxbb_vpu_1.hw, 28638c2ecf20Sopenharmony_ci [CLKID_VPU] = &gxbb_vpu.hw, 28648c2ecf20Sopenharmony_ci [CLKID_VAPB_0_SEL] = &gxbb_vapb_0_sel.hw, 28658c2ecf20Sopenharmony_ci [CLKID_VAPB_0_DIV] = &gxbb_vapb_0_div.hw, 28668c2ecf20Sopenharmony_ci [CLKID_VAPB_0] = &gxbb_vapb_0.hw, 28678c2ecf20Sopenharmony_ci [CLKID_VAPB_1_SEL] = &gxbb_vapb_1_sel.hw, 28688c2ecf20Sopenharmony_ci [CLKID_VAPB_1_DIV] = &gxbb_vapb_1_div.hw, 28698c2ecf20Sopenharmony_ci [CLKID_VAPB_1] = &gxbb_vapb_1.hw, 28708c2ecf20Sopenharmony_ci [CLKID_VAPB_SEL] = &gxbb_vapb_sel.hw, 28718c2ecf20Sopenharmony_ci [CLKID_VAPB] = &gxbb_vapb.hw, 28728c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_PRE_MULT] = &gxbb_hdmi_pll_pre_mult.hw, 28738c2ecf20Sopenharmony_ci [CLKID_MPLL0_DIV] = &gxbb_mpll0_div.hw, 28748c2ecf20Sopenharmony_ci [CLKID_MPLL1_DIV] = &gxbb_mpll1_div.hw, 28758c2ecf20Sopenharmony_ci [CLKID_MPLL2_DIV] = &gxbb_mpll2_div.hw, 28768c2ecf20Sopenharmony_ci [CLKID_MPLL_PREDIV] = &gxbb_mpll_prediv.hw, 28778c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV2_DIV] = &gxbb_fclk_div2_div.hw, 28788c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV3_DIV] = &gxbb_fclk_div3_div.hw, 28798c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV4_DIV] = &gxbb_fclk_div4_div.hw, 28808c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV5_DIV] = &gxbb_fclk_div5_div.hw, 28818c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV7_DIV] = &gxbb_fclk_div7_div.hw, 28828c2ecf20Sopenharmony_ci [CLKID_VDEC_1_SEL] = &gxbb_vdec_1_sel.hw, 28838c2ecf20Sopenharmony_ci [CLKID_VDEC_1_DIV] = &gxbb_vdec_1_div.hw, 28848c2ecf20Sopenharmony_ci [CLKID_VDEC_1] = &gxbb_vdec_1.hw, 28858c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC_SEL] = &gxbb_vdec_hevc_sel.hw, 28868c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC_DIV] = &gxbb_vdec_hevc_div.hw, 28878c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC] = &gxbb_vdec_hevc.hw, 28888c2ecf20Sopenharmony_ci [CLKID_GEN_CLK_SEL] = &gxbb_gen_clk_sel.hw, 28898c2ecf20Sopenharmony_ci [CLKID_GEN_CLK_DIV] = &gxbb_gen_clk_div.hw, 28908c2ecf20Sopenharmony_ci [CLKID_GEN_CLK] = &gxbb_gen_clk.hw, 28918c2ecf20Sopenharmony_ci [CLKID_FIXED_PLL_DCO] = &gxbb_fixed_pll_dco.hw, 28928c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_DCO] = &gxbb_hdmi_pll_dco.hw, 28938c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_OD] = &gxbb_hdmi_pll_od.hw, 28948c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_OD2] = &gxbb_hdmi_pll_od2.hw, 28958c2ecf20Sopenharmony_ci [CLKID_SYS_PLL_DCO] = &gxbb_sys_pll_dco.hw, 28968c2ecf20Sopenharmony_ci [CLKID_GP0_PLL_DCO] = &gxbb_gp0_pll_dco.hw, 28978c2ecf20Sopenharmony_ci [CLKID_VID_PLL_DIV] = &gxbb_vid_pll_div.hw, 28988c2ecf20Sopenharmony_ci [CLKID_VID_PLL_SEL] = &gxbb_vid_pll_sel.hw, 28998c2ecf20Sopenharmony_ci [CLKID_VID_PLL] = &gxbb_vid_pll.hw, 29008c2ecf20Sopenharmony_ci [CLKID_VCLK_SEL] = &gxbb_vclk_sel.hw, 29018c2ecf20Sopenharmony_ci [CLKID_VCLK2_SEL] = &gxbb_vclk2_sel.hw, 29028c2ecf20Sopenharmony_ci [CLKID_VCLK_INPUT] = &gxbb_vclk_input.hw, 29038c2ecf20Sopenharmony_ci [CLKID_VCLK2_INPUT] = &gxbb_vclk2_input.hw, 29048c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV] = &gxbb_vclk_div.hw, 29058c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV] = &gxbb_vclk2_div.hw, 29068c2ecf20Sopenharmony_ci [CLKID_VCLK] = &gxbb_vclk.hw, 29078c2ecf20Sopenharmony_ci [CLKID_VCLK2] = &gxbb_vclk2.hw, 29088c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV1] = &gxbb_vclk_div1.hw, 29098c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV2_EN] = &gxbb_vclk_div2_en.hw, 29108c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV2] = &gxbb_vclk_div2.hw, 29118c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV4_EN] = &gxbb_vclk_div4_en.hw, 29128c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV4] = &gxbb_vclk_div4.hw, 29138c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV6_EN] = &gxbb_vclk_div6_en.hw, 29148c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV6] = &gxbb_vclk_div6.hw, 29158c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV12_EN] = &gxbb_vclk_div12_en.hw, 29168c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV12] = &gxbb_vclk_div12.hw, 29178c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV1] = &gxbb_vclk2_div1.hw, 29188c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV2_EN] = &gxbb_vclk2_div2_en.hw, 29198c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV2] = &gxbb_vclk2_div2.hw, 29208c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV4_EN] = &gxbb_vclk2_div4_en.hw, 29218c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV4] = &gxbb_vclk2_div4.hw, 29228c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV6_EN] = &gxbb_vclk2_div6_en.hw, 29238c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV6] = &gxbb_vclk2_div6.hw, 29248c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV12_EN] = &gxbb_vclk2_div12_en.hw, 29258c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV12] = &gxbb_vclk2_div12.hw, 29268c2ecf20Sopenharmony_ci [CLKID_CTS_ENCI_SEL] = &gxbb_cts_enci_sel.hw, 29278c2ecf20Sopenharmony_ci [CLKID_CTS_ENCP_SEL] = &gxbb_cts_encp_sel.hw, 29288c2ecf20Sopenharmony_ci [CLKID_CTS_VDAC_SEL] = &gxbb_cts_vdac_sel.hw, 29298c2ecf20Sopenharmony_ci [CLKID_HDMI_TX_SEL] = &gxbb_hdmi_tx_sel.hw, 29308c2ecf20Sopenharmony_ci [CLKID_CTS_ENCI] = &gxbb_cts_enci.hw, 29318c2ecf20Sopenharmony_ci [CLKID_CTS_ENCP] = &gxbb_cts_encp.hw, 29328c2ecf20Sopenharmony_ci [CLKID_CTS_VDAC] = &gxbb_cts_vdac.hw, 29338c2ecf20Sopenharmony_ci [CLKID_HDMI_TX] = &gxbb_hdmi_tx.hw, 29348c2ecf20Sopenharmony_ci [CLKID_HDMI_SEL] = &gxbb_hdmi_sel.hw, 29358c2ecf20Sopenharmony_ci [CLKID_HDMI_DIV] = &gxbb_hdmi_div.hw, 29368c2ecf20Sopenharmony_ci [CLKID_HDMI] = &gxbb_hdmi.hw, 29378c2ecf20Sopenharmony_ci [NR_CLKS] = NULL, 29388c2ecf20Sopenharmony_ci }, 29398c2ecf20Sopenharmony_ci .num = NR_CLKS, 29408c2ecf20Sopenharmony_ci}; 29418c2ecf20Sopenharmony_ci 29428c2ecf20Sopenharmony_cistatic struct clk_hw_onecell_data gxl_hw_onecell_data = { 29438c2ecf20Sopenharmony_ci .hws = { 29448c2ecf20Sopenharmony_ci [CLKID_SYS_PLL] = &gxbb_sys_pll.hw, 29458c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL] = &gxl_hdmi_pll.hw, 29468c2ecf20Sopenharmony_ci [CLKID_FIXED_PLL] = &gxbb_fixed_pll.hw, 29478c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV2] = &gxbb_fclk_div2.hw, 29488c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV3] = &gxbb_fclk_div3.hw, 29498c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV4] = &gxbb_fclk_div4.hw, 29508c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV5] = &gxbb_fclk_div5.hw, 29518c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV7] = &gxbb_fclk_div7.hw, 29528c2ecf20Sopenharmony_ci [CLKID_GP0_PLL] = &gxbb_gp0_pll.hw, 29538c2ecf20Sopenharmony_ci [CLKID_MPEG_SEL] = &gxbb_mpeg_clk_sel.hw, 29548c2ecf20Sopenharmony_ci [CLKID_MPEG_DIV] = &gxbb_mpeg_clk_div.hw, 29558c2ecf20Sopenharmony_ci [CLKID_CLK81] = &gxbb_clk81.hw, 29568c2ecf20Sopenharmony_ci [CLKID_MPLL0] = &gxbb_mpll0.hw, 29578c2ecf20Sopenharmony_ci [CLKID_MPLL1] = &gxbb_mpll1.hw, 29588c2ecf20Sopenharmony_ci [CLKID_MPLL2] = &gxbb_mpll2.hw, 29598c2ecf20Sopenharmony_ci [CLKID_DDR] = &gxbb_ddr.hw, 29608c2ecf20Sopenharmony_ci [CLKID_DOS] = &gxbb_dos.hw, 29618c2ecf20Sopenharmony_ci [CLKID_ISA] = &gxbb_isa.hw, 29628c2ecf20Sopenharmony_ci [CLKID_PL301] = &gxbb_pl301.hw, 29638c2ecf20Sopenharmony_ci [CLKID_PERIPHS] = &gxbb_periphs.hw, 29648c2ecf20Sopenharmony_ci [CLKID_SPICC] = &gxbb_spicc.hw, 29658c2ecf20Sopenharmony_ci [CLKID_I2C] = &gxbb_i2c.hw, 29668c2ecf20Sopenharmony_ci [CLKID_SAR_ADC] = &gxbb_sar_adc.hw, 29678c2ecf20Sopenharmony_ci [CLKID_SMART_CARD] = &gxbb_smart_card.hw, 29688c2ecf20Sopenharmony_ci [CLKID_RNG0] = &gxbb_rng0.hw, 29698c2ecf20Sopenharmony_ci [CLKID_UART0] = &gxbb_uart0.hw, 29708c2ecf20Sopenharmony_ci [CLKID_SDHC] = &gxbb_sdhc.hw, 29718c2ecf20Sopenharmony_ci [CLKID_STREAM] = &gxbb_stream.hw, 29728c2ecf20Sopenharmony_ci [CLKID_ASYNC_FIFO] = &gxbb_async_fifo.hw, 29738c2ecf20Sopenharmony_ci [CLKID_SDIO] = &gxbb_sdio.hw, 29748c2ecf20Sopenharmony_ci [CLKID_ABUF] = &gxbb_abuf.hw, 29758c2ecf20Sopenharmony_ci [CLKID_HIU_IFACE] = &gxbb_hiu_iface.hw, 29768c2ecf20Sopenharmony_ci [CLKID_ASSIST_MISC] = &gxbb_assist_misc.hw, 29778c2ecf20Sopenharmony_ci [CLKID_SPI] = &gxbb_spi.hw, 29788c2ecf20Sopenharmony_ci [CLKID_I2S_SPDIF] = &gxbb_i2s_spdif.hw, 29798c2ecf20Sopenharmony_ci [CLKID_ETH] = &gxbb_eth.hw, 29808c2ecf20Sopenharmony_ci [CLKID_DEMUX] = &gxbb_demux.hw, 29818c2ecf20Sopenharmony_ci [CLKID_AIU_GLUE] = &gxbb_aiu_glue.hw, 29828c2ecf20Sopenharmony_ci [CLKID_IEC958] = &gxbb_iec958.hw, 29838c2ecf20Sopenharmony_ci [CLKID_I2S_OUT] = &gxbb_i2s_out.hw, 29848c2ecf20Sopenharmony_ci [CLKID_AMCLK] = &gxbb_amclk.hw, 29858c2ecf20Sopenharmony_ci [CLKID_AIFIFO2] = &gxbb_aififo2.hw, 29868c2ecf20Sopenharmony_ci [CLKID_MIXER] = &gxbb_mixer.hw, 29878c2ecf20Sopenharmony_ci [CLKID_MIXER_IFACE] = &gxbb_mixer_iface.hw, 29888c2ecf20Sopenharmony_ci [CLKID_ADC] = &gxbb_adc.hw, 29898c2ecf20Sopenharmony_ci [CLKID_BLKMV] = &gxbb_blkmv.hw, 29908c2ecf20Sopenharmony_ci [CLKID_AIU] = &gxbb_aiu.hw, 29918c2ecf20Sopenharmony_ci [CLKID_UART1] = &gxbb_uart1.hw, 29928c2ecf20Sopenharmony_ci [CLKID_G2D] = &gxbb_g2d.hw, 29938c2ecf20Sopenharmony_ci [CLKID_USB0] = &gxbb_usb0.hw, 29948c2ecf20Sopenharmony_ci [CLKID_USB1] = &gxbb_usb1.hw, 29958c2ecf20Sopenharmony_ci [CLKID_RESET] = &gxbb_reset.hw, 29968c2ecf20Sopenharmony_ci [CLKID_NAND] = &gxbb_nand.hw, 29978c2ecf20Sopenharmony_ci [CLKID_DOS_PARSER] = &gxbb_dos_parser.hw, 29988c2ecf20Sopenharmony_ci [CLKID_USB] = &gxbb_usb.hw, 29998c2ecf20Sopenharmony_ci [CLKID_VDIN1] = &gxbb_vdin1.hw, 30008c2ecf20Sopenharmony_ci [CLKID_AHB_ARB0] = &gxbb_ahb_arb0.hw, 30018c2ecf20Sopenharmony_ci [CLKID_EFUSE] = &gxbb_efuse.hw, 30028c2ecf20Sopenharmony_ci [CLKID_BOOT_ROM] = &gxbb_boot_rom.hw, 30038c2ecf20Sopenharmony_ci [CLKID_AHB_DATA_BUS] = &gxbb_ahb_data_bus.hw, 30048c2ecf20Sopenharmony_ci [CLKID_AHB_CTRL_BUS] = &gxbb_ahb_ctrl_bus.hw, 30058c2ecf20Sopenharmony_ci [CLKID_HDMI_INTR_SYNC] = &gxbb_hdmi_intr_sync.hw, 30068c2ecf20Sopenharmony_ci [CLKID_HDMI_PCLK] = &gxbb_hdmi_pclk.hw, 30078c2ecf20Sopenharmony_ci [CLKID_USB1_DDR_BRIDGE] = &gxbb_usb1_ddr_bridge.hw, 30088c2ecf20Sopenharmony_ci [CLKID_USB0_DDR_BRIDGE] = &gxbb_usb0_ddr_bridge.hw, 30098c2ecf20Sopenharmony_ci [CLKID_MMC_PCLK] = &gxbb_mmc_pclk.hw, 30108c2ecf20Sopenharmony_ci [CLKID_DVIN] = &gxbb_dvin.hw, 30118c2ecf20Sopenharmony_ci [CLKID_UART2] = &gxbb_uart2.hw, 30128c2ecf20Sopenharmony_ci [CLKID_SANA] = &gxbb_sana.hw, 30138c2ecf20Sopenharmony_ci [CLKID_VPU_INTR] = &gxbb_vpu_intr.hw, 30148c2ecf20Sopenharmony_ci [CLKID_SEC_AHB_AHB3_BRIDGE] = &gxbb_sec_ahb_ahb3_bridge.hw, 30158c2ecf20Sopenharmony_ci [CLKID_CLK81_A53] = &gxbb_clk81_a53.hw, 30168c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCI0] = &gxbb_vclk2_venci0.hw, 30178c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCI1] = &gxbb_vclk2_venci1.hw, 30188c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCP0] = &gxbb_vclk2_vencp0.hw, 30198c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCP1] = &gxbb_vclk2_vencp1.hw, 30208c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT0] = &gxbb_gclk_venci_int0.hw, 30218c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT] = &gxbb_gclk_vencp_int.hw, 30228c2ecf20Sopenharmony_ci [CLKID_DAC_CLK] = &gxbb_dac_clk.hw, 30238c2ecf20Sopenharmony_ci [CLKID_AOCLK_GATE] = &gxbb_aoclk_gate.hw, 30248c2ecf20Sopenharmony_ci [CLKID_IEC958_GATE] = &gxbb_iec958_gate.hw, 30258c2ecf20Sopenharmony_ci [CLKID_ENC480P] = &gxbb_enc480p.hw, 30268c2ecf20Sopenharmony_ci [CLKID_RNG1] = &gxbb_rng1.hw, 30278c2ecf20Sopenharmony_ci [CLKID_GCLK_VENCI_INT1] = &gxbb_gclk_venci_int1.hw, 30288c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCLMCC] = &gxbb_vclk2_venclmcc.hw, 30298c2ecf20Sopenharmony_ci [CLKID_VCLK2_VENCL] = &gxbb_vclk2_vencl.hw, 30308c2ecf20Sopenharmony_ci [CLKID_VCLK_OTHER] = &gxbb_vclk_other.hw, 30318c2ecf20Sopenharmony_ci [CLKID_EDP] = &gxbb_edp.hw, 30328c2ecf20Sopenharmony_ci [CLKID_AO_MEDIA_CPU] = &gxbb_ao_media_cpu.hw, 30338c2ecf20Sopenharmony_ci [CLKID_AO_AHB_SRAM] = &gxbb_ao_ahb_sram.hw, 30348c2ecf20Sopenharmony_ci [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, 30358c2ecf20Sopenharmony_ci [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, 30368c2ecf20Sopenharmony_ci [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, 30378c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A] = &gxbb_emmc_a.hw, 30388c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B] = &gxbb_emmc_b.hw, 30398c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C] = &gxbb_emmc_c.hw, 30408c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_CLK] = &gxbb_sar_adc_clk.hw, 30418c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_SEL] = &gxbb_sar_adc_clk_sel.hw, 30428c2ecf20Sopenharmony_ci [CLKID_SAR_ADC_DIV] = &gxbb_sar_adc_clk_div.hw, 30438c2ecf20Sopenharmony_ci [CLKID_MALI_0_SEL] = &gxbb_mali_0_sel.hw, 30448c2ecf20Sopenharmony_ci [CLKID_MALI_0_DIV] = &gxbb_mali_0_div.hw, 30458c2ecf20Sopenharmony_ci [CLKID_MALI_0] = &gxbb_mali_0.hw, 30468c2ecf20Sopenharmony_ci [CLKID_MALI_1_SEL] = &gxbb_mali_1_sel.hw, 30478c2ecf20Sopenharmony_ci [CLKID_MALI_1_DIV] = &gxbb_mali_1_div.hw, 30488c2ecf20Sopenharmony_ci [CLKID_MALI_1] = &gxbb_mali_1.hw, 30498c2ecf20Sopenharmony_ci [CLKID_MALI] = &gxbb_mali.hw, 30508c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK] = &gxbb_cts_amclk.hw, 30518c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK_SEL] = &gxbb_cts_amclk_sel.hw, 30528c2ecf20Sopenharmony_ci [CLKID_CTS_AMCLK_DIV] = &gxbb_cts_amclk_div.hw, 30538c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958] = &gxbb_cts_mclk_i958.hw, 30548c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958_SEL] = &gxbb_cts_mclk_i958_sel.hw, 30558c2ecf20Sopenharmony_ci [CLKID_CTS_MCLK_I958_DIV] = &gxbb_cts_mclk_i958_div.hw, 30568c2ecf20Sopenharmony_ci [CLKID_CTS_I958] = &gxbb_cts_i958.hw, 30578c2ecf20Sopenharmony_ci [CLKID_32K_CLK] = &gxbb_32k_clk.hw, 30588c2ecf20Sopenharmony_ci [CLKID_32K_CLK_SEL] = &gxbb_32k_clk_sel.hw, 30598c2ecf20Sopenharmony_ci [CLKID_32K_CLK_DIV] = &gxbb_32k_clk_div.hw, 30608c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0_SEL] = &gxbb_sd_emmc_a_clk0_sel.hw, 30618c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0_DIV] = &gxbb_sd_emmc_a_clk0_div.hw, 30628c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_A_CLK0] = &gxbb_sd_emmc_a_clk0.hw, 30638c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0_SEL] = &gxbb_sd_emmc_b_clk0_sel.hw, 30648c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0_DIV] = &gxbb_sd_emmc_b_clk0_div.hw, 30658c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_B_CLK0] = &gxbb_sd_emmc_b_clk0.hw, 30668c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0_SEL] = &gxbb_sd_emmc_c_clk0_sel.hw, 30678c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0_DIV] = &gxbb_sd_emmc_c_clk0_div.hw, 30688c2ecf20Sopenharmony_ci [CLKID_SD_EMMC_C_CLK0] = &gxbb_sd_emmc_c_clk0.hw, 30698c2ecf20Sopenharmony_ci [CLKID_VPU_0_SEL] = &gxbb_vpu_0_sel.hw, 30708c2ecf20Sopenharmony_ci [CLKID_VPU_0_DIV] = &gxbb_vpu_0_div.hw, 30718c2ecf20Sopenharmony_ci [CLKID_VPU_0] = &gxbb_vpu_0.hw, 30728c2ecf20Sopenharmony_ci [CLKID_VPU_1_SEL] = &gxbb_vpu_1_sel.hw, 30738c2ecf20Sopenharmony_ci [CLKID_VPU_1_DIV] = &gxbb_vpu_1_div.hw, 30748c2ecf20Sopenharmony_ci [CLKID_VPU_1] = &gxbb_vpu_1.hw, 30758c2ecf20Sopenharmony_ci [CLKID_VPU] = &gxbb_vpu.hw, 30768c2ecf20Sopenharmony_ci [CLKID_VAPB_0_SEL] = &gxbb_vapb_0_sel.hw, 30778c2ecf20Sopenharmony_ci [CLKID_VAPB_0_DIV] = &gxbb_vapb_0_div.hw, 30788c2ecf20Sopenharmony_ci [CLKID_VAPB_0] = &gxbb_vapb_0.hw, 30798c2ecf20Sopenharmony_ci [CLKID_VAPB_1_SEL] = &gxbb_vapb_1_sel.hw, 30808c2ecf20Sopenharmony_ci [CLKID_VAPB_1_DIV] = &gxbb_vapb_1_div.hw, 30818c2ecf20Sopenharmony_ci [CLKID_VAPB_1] = &gxbb_vapb_1.hw, 30828c2ecf20Sopenharmony_ci [CLKID_VAPB_SEL] = &gxbb_vapb_sel.hw, 30838c2ecf20Sopenharmony_ci [CLKID_VAPB] = &gxbb_vapb.hw, 30848c2ecf20Sopenharmony_ci [CLKID_MPLL0_DIV] = &gxl_mpll0_div.hw, 30858c2ecf20Sopenharmony_ci [CLKID_MPLL1_DIV] = &gxbb_mpll1_div.hw, 30868c2ecf20Sopenharmony_ci [CLKID_MPLL2_DIV] = &gxbb_mpll2_div.hw, 30878c2ecf20Sopenharmony_ci [CLKID_MPLL_PREDIV] = &gxbb_mpll_prediv.hw, 30888c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV2_DIV] = &gxbb_fclk_div2_div.hw, 30898c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV3_DIV] = &gxbb_fclk_div3_div.hw, 30908c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV4_DIV] = &gxbb_fclk_div4_div.hw, 30918c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV5_DIV] = &gxbb_fclk_div5_div.hw, 30928c2ecf20Sopenharmony_ci [CLKID_FCLK_DIV7_DIV] = &gxbb_fclk_div7_div.hw, 30938c2ecf20Sopenharmony_ci [CLKID_VDEC_1_SEL] = &gxbb_vdec_1_sel.hw, 30948c2ecf20Sopenharmony_ci [CLKID_VDEC_1_DIV] = &gxbb_vdec_1_div.hw, 30958c2ecf20Sopenharmony_ci [CLKID_VDEC_1] = &gxbb_vdec_1.hw, 30968c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC_SEL] = &gxbb_vdec_hevc_sel.hw, 30978c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC_DIV] = &gxbb_vdec_hevc_div.hw, 30988c2ecf20Sopenharmony_ci [CLKID_VDEC_HEVC] = &gxbb_vdec_hevc.hw, 30998c2ecf20Sopenharmony_ci [CLKID_GEN_CLK_SEL] = &gxbb_gen_clk_sel.hw, 31008c2ecf20Sopenharmony_ci [CLKID_GEN_CLK_DIV] = &gxbb_gen_clk_div.hw, 31018c2ecf20Sopenharmony_ci [CLKID_GEN_CLK] = &gxbb_gen_clk.hw, 31028c2ecf20Sopenharmony_ci [CLKID_FIXED_PLL_DCO] = &gxbb_fixed_pll_dco.hw, 31038c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_DCO] = &gxl_hdmi_pll_dco.hw, 31048c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_OD] = &gxl_hdmi_pll_od.hw, 31058c2ecf20Sopenharmony_ci [CLKID_HDMI_PLL_OD2] = &gxl_hdmi_pll_od2.hw, 31068c2ecf20Sopenharmony_ci [CLKID_SYS_PLL_DCO] = &gxbb_sys_pll_dco.hw, 31078c2ecf20Sopenharmony_ci [CLKID_GP0_PLL_DCO] = &gxl_gp0_pll_dco.hw, 31088c2ecf20Sopenharmony_ci [CLKID_VID_PLL_DIV] = &gxbb_vid_pll_div.hw, 31098c2ecf20Sopenharmony_ci [CLKID_VID_PLL_SEL] = &gxbb_vid_pll_sel.hw, 31108c2ecf20Sopenharmony_ci [CLKID_VID_PLL] = &gxbb_vid_pll.hw, 31118c2ecf20Sopenharmony_ci [CLKID_VCLK_SEL] = &gxbb_vclk_sel.hw, 31128c2ecf20Sopenharmony_ci [CLKID_VCLK2_SEL] = &gxbb_vclk2_sel.hw, 31138c2ecf20Sopenharmony_ci [CLKID_VCLK_INPUT] = &gxbb_vclk_input.hw, 31148c2ecf20Sopenharmony_ci [CLKID_VCLK2_INPUT] = &gxbb_vclk2_input.hw, 31158c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV] = &gxbb_vclk_div.hw, 31168c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV] = &gxbb_vclk2_div.hw, 31178c2ecf20Sopenharmony_ci [CLKID_VCLK] = &gxbb_vclk.hw, 31188c2ecf20Sopenharmony_ci [CLKID_VCLK2] = &gxbb_vclk2.hw, 31198c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV1] = &gxbb_vclk_div1.hw, 31208c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV2_EN] = &gxbb_vclk_div2_en.hw, 31218c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV2] = &gxbb_vclk_div2.hw, 31228c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV4_EN] = &gxbb_vclk_div4_en.hw, 31238c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV4] = &gxbb_vclk_div4.hw, 31248c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV6_EN] = &gxbb_vclk_div6_en.hw, 31258c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV6] = &gxbb_vclk_div6.hw, 31268c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV12_EN] = &gxbb_vclk_div12_en.hw, 31278c2ecf20Sopenharmony_ci [CLKID_VCLK_DIV12] = &gxbb_vclk_div12.hw, 31288c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV1] = &gxbb_vclk2_div1.hw, 31298c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV2_EN] = &gxbb_vclk2_div2_en.hw, 31308c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV2] = &gxbb_vclk2_div2.hw, 31318c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV4_EN] = &gxbb_vclk2_div4_en.hw, 31328c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV4] = &gxbb_vclk2_div4.hw, 31338c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV6_EN] = &gxbb_vclk2_div6_en.hw, 31348c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV6] = &gxbb_vclk2_div6.hw, 31358c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV12_EN] = &gxbb_vclk2_div12_en.hw, 31368c2ecf20Sopenharmony_ci [CLKID_VCLK2_DIV12] = &gxbb_vclk2_div12.hw, 31378c2ecf20Sopenharmony_ci [CLKID_CTS_ENCI_SEL] = &gxbb_cts_enci_sel.hw, 31388c2ecf20Sopenharmony_ci [CLKID_CTS_ENCP_SEL] = &gxbb_cts_encp_sel.hw, 31398c2ecf20Sopenharmony_ci [CLKID_CTS_VDAC_SEL] = &gxbb_cts_vdac_sel.hw, 31408c2ecf20Sopenharmony_ci [CLKID_HDMI_TX_SEL] = &gxbb_hdmi_tx_sel.hw, 31418c2ecf20Sopenharmony_ci [CLKID_CTS_ENCI] = &gxbb_cts_enci.hw, 31428c2ecf20Sopenharmony_ci [CLKID_CTS_ENCP] = &gxbb_cts_encp.hw, 31438c2ecf20Sopenharmony_ci [CLKID_CTS_VDAC] = &gxbb_cts_vdac.hw, 31448c2ecf20Sopenharmony_ci [CLKID_HDMI_TX] = &gxbb_hdmi_tx.hw, 31458c2ecf20Sopenharmony_ci [CLKID_HDMI_SEL] = &gxbb_hdmi_sel.hw, 31468c2ecf20Sopenharmony_ci [CLKID_HDMI_DIV] = &gxbb_hdmi_div.hw, 31478c2ecf20Sopenharmony_ci [CLKID_HDMI] = &gxbb_hdmi.hw, 31488c2ecf20Sopenharmony_ci [CLKID_ACODEC] = &gxl_acodec.hw, 31498c2ecf20Sopenharmony_ci [NR_CLKS] = NULL, 31508c2ecf20Sopenharmony_ci }, 31518c2ecf20Sopenharmony_ci .num = NR_CLKS, 31528c2ecf20Sopenharmony_ci}; 31538c2ecf20Sopenharmony_ci 31548c2ecf20Sopenharmony_cistatic struct clk_regmap *const gxbb_clk_regmaps[] = { 31558c2ecf20Sopenharmony_ci &gxbb_clk81, 31568c2ecf20Sopenharmony_ci &gxbb_ddr, 31578c2ecf20Sopenharmony_ci &gxbb_dos, 31588c2ecf20Sopenharmony_ci &gxbb_isa, 31598c2ecf20Sopenharmony_ci &gxbb_pl301, 31608c2ecf20Sopenharmony_ci &gxbb_periphs, 31618c2ecf20Sopenharmony_ci &gxbb_spicc, 31628c2ecf20Sopenharmony_ci &gxbb_i2c, 31638c2ecf20Sopenharmony_ci &gxbb_sar_adc, 31648c2ecf20Sopenharmony_ci &gxbb_smart_card, 31658c2ecf20Sopenharmony_ci &gxbb_rng0, 31668c2ecf20Sopenharmony_ci &gxbb_uart0, 31678c2ecf20Sopenharmony_ci &gxbb_sdhc, 31688c2ecf20Sopenharmony_ci &gxbb_stream, 31698c2ecf20Sopenharmony_ci &gxbb_async_fifo, 31708c2ecf20Sopenharmony_ci &gxbb_sdio, 31718c2ecf20Sopenharmony_ci &gxbb_abuf, 31728c2ecf20Sopenharmony_ci &gxbb_hiu_iface, 31738c2ecf20Sopenharmony_ci &gxbb_assist_misc, 31748c2ecf20Sopenharmony_ci &gxbb_spi, 31758c2ecf20Sopenharmony_ci &gxbb_i2s_spdif, 31768c2ecf20Sopenharmony_ci &gxbb_eth, 31778c2ecf20Sopenharmony_ci &gxbb_demux, 31788c2ecf20Sopenharmony_ci &gxbb_aiu_glue, 31798c2ecf20Sopenharmony_ci &gxbb_iec958, 31808c2ecf20Sopenharmony_ci &gxbb_i2s_out, 31818c2ecf20Sopenharmony_ci &gxbb_amclk, 31828c2ecf20Sopenharmony_ci &gxbb_aififo2, 31838c2ecf20Sopenharmony_ci &gxbb_mixer, 31848c2ecf20Sopenharmony_ci &gxbb_mixer_iface, 31858c2ecf20Sopenharmony_ci &gxbb_adc, 31868c2ecf20Sopenharmony_ci &gxbb_blkmv, 31878c2ecf20Sopenharmony_ci &gxbb_aiu, 31888c2ecf20Sopenharmony_ci &gxbb_uart1, 31898c2ecf20Sopenharmony_ci &gxbb_g2d, 31908c2ecf20Sopenharmony_ci &gxbb_usb0, 31918c2ecf20Sopenharmony_ci &gxbb_usb1, 31928c2ecf20Sopenharmony_ci &gxbb_reset, 31938c2ecf20Sopenharmony_ci &gxbb_nand, 31948c2ecf20Sopenharmony_ci &gxbb_dos_parser, 31958c2ecf20Sopenharmony_ci &gxbb_usb, 31968c2ecf20Sopenharmony_ci &gxbb_vdin1, 31978c2ecf20Sopenharmony_ci &gxbb_ahb_arb0, 31988c2ecf20Sopenharmony_ci &gxbb_efuse, 31998c2ecf20Sopenharmony_ci &gxbb_boot_rom, 32008c2ecf20Sopenharmony_ci &gxbb_ahb_data_bus, 32018c2ecf20Sopenharmony_ci &gxbb_ahb_ctrl_bus, 32028c2ecf20Sopenharmony_ci &gxbb_hdmi_intr_sync, 32038c2ecf20Sopenharmony_ci &gxbb_hdmi_pclk, 32048c2ecf20Sopenharmony_ci &gxbb_usb1_ddr_bridge, 32058c2ecf20Sopenharmony_ci &gxbb_usb0_ddr_bridge, 32068c2ecf20Sopenharmony_ci &gxbb_mmc_pclk, 32078c2ecf20Sopenharmony_ci &gxbb_dvin, 32088c2ecf20Sopenharmony_ci &gxbb_uart2, 32098c2ecf20Sopenharmony_ci &gxbb_sana, 32108c2ecf20Sopenharmony_ci &gxbb_vpu_intr, 32118c2ecf20Sopenharmony_ci &gxbb_sec_ahb_ahb3_bridge, 32128c2ecf20Sopenharmony_ci &gxbb_clk81_a53, 32138c2ecf20Sopenharmony_ci &gxbb_vclk2_venci0, 32148c2ecf20Sopenharmony_ci &gxbb_vclk2_venci1, 32158c2ecf20Sopenharmony_ci &gxbb_vclk2_vencp0, 32168c2ecf20Sopenharmony_ci &gxbb_vclk2_vencp1, 32178c2ecf20Sopenharmony_ci &gxbb_gclk_venci_int0, 32188c2ecf20Sopenharmony_ci &gxbb_gclk_vencp_int, 32198c2ecf20Sopenharmony_ci &gxbb_dac_clk, 32208c2ecf20Sopenharmony_ci &gxbb_aoclk_gate, 32218c2ecf20Sopenharmony_ci &gxbb_iec958_gate, 32228c2ecf20Sopenharmony_ci &gxbb_enc480p, 32238c2ecf20Sopenharmony_ci &gxbb_rng1, 32248c2ecf20Sopenharmony_ci &gxbb_gclk_venci_int1, 32258c2ecf20Sopenharmony_ci &gxbb_vclk2_venclmcc, 32268c2ecf20Sopenharmony_ci &gxbb_vclk2_vencl, 32278c2ecf20Sopenharmony_ci &gxbb_vclk_other, 32288c2ecf20Sopenharmony_ci &gxbb_edp, 32298c2ecf20Sopenharmony_ci &gxbb_ao_media_cpu, 32308c2ecf20Sopenharmony_ci &gxbb_ao_ahb_sram, 32318c2ecf20Sopenharmony_ci &gxbb_ao_ahb_bus, 32328c2ecf20Sopenharmony_ci &gxbb_ao_iface, 32338c2ecf20Sopenharmony_ci &gxbb_ao_i2c, 32348c2ecf20Sopenharmony_ci &gxbb_emmc_a, 32358c2ecf20Sopenharmony_ci &gxbb_emmc_b, 32368c2ecf20Sopenharmony_ci &gxbb_emmc_c, 32378c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk, 32388c2ecf20Sopenharmony_ci &gxbb_mali_0, 32398c2ecf20Sopenharmony_ci &gxbb_mali_1, 32408c2ecf20Sopenharmony_ci &gxbb_cts_amclk, 32418c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958, 32428c2ecf20Sopenharmony_ci &gxbb_32k_clk, 32438c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0, 32448c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0, 32458c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0, 32468c2ecf20Sopenharmony_ci &gxbb_vpu_0, 32478c2ecf20Sopenharmony_ci &gxbb_vpu_1, 32488c2ecf20Sopenharmony_ci &gxbb_vapb_0, 32498c2ecf20Sopenharmony_ci &gxbb_vapb_1, 32508c2ecf20Sopenharmony_ci &gxbb_vapb, 32518c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_div, 32528c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_div, 32538c2ecf20Sopenharmony_ci &gxbb_mali_0_div, 32548c2ecf20Sopenharmony_ci &gxbb_mali_1_div, 32558c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_div, 32568c2ecf20Sopenharmony_ci &gxbb_32k_clk_div, 32578c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_div, 32588c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_div, 32598c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_div, 32608c2ecf20Sopenharmony_ci &gxbb_vpu_0_div, 32618c2ecf20Sopenharmony_ci &gxbb_vpu_1_div, 32628c2ecf20Sopenharmony_ci &gxbb_vapb_0_div, 32638c2ecf20Sopenharmony_ci &gxbb_vapb_1_div, 32648c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_sel, 32658c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_sel, 32668c2ecf20Sopenharmony_ci &gxbb_mali_0_sel, 32678c2ecf20Sopenharmony_ci &gxbb_mali_1_sel, 32688c2ecf20Sopenharmony_ci &gxbb_mali, 32698c2ecf20Sopenharmony_ci &gxbb_cts_amclk_sel, 32708c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_sel, 32718c2ecf20Sopenharmony_ci &gxbb_cts_i958, 32728c2ecf20Sopenharmony_ci &gxbb_32k_clk_sel, 32738c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_sel, 32748c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_sel, 32758c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_sel, 32768c2ecf20Sopenharmony_ci &gxbb_vpu_0_sel, 32778c2ecf20Sopenharmony_ci &gxbb_vpu_1_sel, 32788c2ecf20Sopenharmony_ci &gxbb_vpu, 32798c2ecf20Sopenharmony_ci &gxbb_vapb_0_sel, 32808c2ecf20Sopenharmony_ci &gxbb_vapb_1_sel, 32818c2ecf20Sopenharmony_ci &gxbb_vapb_sel, 32828c2ecf20Sopenharmony_ci &gxbb_mpll0, 32838c2ecf20Sopenharmony_ci &gxbb_mpll1, 32848c2ecf20Sopenharmony_ci &gxbb_mpll2, 32858c2ecf20Sopenharmony_ci &gxbb_mpll0_div, 32868c2ecf20Sopenharmony_ci &gxbb_mpll1_div, 32878c2ecf20Sopenharmony_ci &gxbb_mpll2_div, 32888c2ecf20Sopenharmony_ci &gxbb_cts_amclk_div, 32898c2ecf20Sopenharmony_ci &gxbb_fixed_pll, 32908c2ecf20Sopenharmony_ci &gxbb_sys_pll, 32918c2ecf20Sopenharmony_ci &gxbb_mpll_prediv, 32928c2ecf20Sopenharmony_ci &gxbb_fclk_div2, 32938c2ecf20Sopenharmony_ci &gxbb_fclk_div3, 32948c2ecf20Sopenharmony_ci &gxbb_fclk_div4, 32958c2ecf20Sopenharmony_ci &gxbb_fclk_div5, 32968c2ecf20Sopenharmony_ci &gxbb_fclk_div7, 32978c2ecf20Sopenharmony_ci &gxbb_vdec_1_sel, 32988c2ecf20Sopenharmony_ci &gxbb_vdec_1_div, 32998c2ecf20Sopenharmony_ci &gxbb_vdec_1, 33008c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_sel, 33018c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_div, 33028c2ecf20Sopenharmony_ci &gxbb_vdec_hevc, 33038c2ecf20Sopenharmony_ci &gxbb_gen_clk_sel, 33048c2ecf20Sopenharmony_ci &gxbb_gen_clk_div, 33058c2ecf20Sopenharmony_ci &gxbb_gen_clk, 33068c2ecf20Sopenharmony_ci &gxbb_fixed_pll_dco, 33078c2ecf20Sopenharmony_ci &gxbb_sys_pll_dco, 33088c2ecf20Sopenharmony_ci &gxbb_gp0_pll, 33098c2ecf20Sopenharmony_ci &gxbb_vid_pll, 33108c2ecf20Sopenharmony_ci &gxbb_vid_pll_sel, 33118c2ecf20Sopenharmony_ci &gxbb_vid_pll_div, 33128c2ecf20Sopenharmony_ci &gxbb_vclk, 33138c2ecf20Sopenharmony_ci &gxbb_vclk_sel, 33148c2ecf20Sopenharmony_ci &gxbb_vclk_div, 33158c2ecf20Sopenharmony_ci &gxbb_vclk_input, 33168c2ecf20Sopenharmony_ci &gxbb_vclk_div1, 33178c2ecf20Sopenharmony_ci &gxbb_vclk_div2_en, 33188c2ecf20Sopenharmony_ci &gxbb_vclk_div4_en, 33198c2ecf20Sopenharmony_ci &gxbb_vclk_div6_en, 33208c2ecf20Sopenharmony_ci &gxbb_vclk_div12_en, 33218c2ecf20Sopenharmony_ci &gxbb_vclk2, 33228c2ecf20Sopenharmony_ci &gxbb_vclk2_sel, 33238c2ecf20Sopenharmony_ci &gxbb_vclk2_div, 33248c2ecf20Sopenharmony_ci &gxbb_vclk2_input, 33258c2ecf20Sopenharmony_ci &gxbb_vclk2_div1, 33268c2ecf20Sopenharmony_ci &gxbb_vclk2_div2_en, 33278c2ecf20Sopenharmony_ci &gxbb_vclk2_div4_en, 33288c2ecf20Sopenharmony_ci &gxbb_vclk2_div6_en, 33298c2ecf20Sopenharmony_ci &gxbb_vclk2_div12_en, 33308c2ecf20Sopenharmony_ci &gxbb_cts_enci, 33318c2ecf20Sopenharmony_ci &gxbb_cts_enci_sel, 33328c2ecf20Sopenharmony_ci &gxbb_cts_encp, 33338c2ecf20Sopenharmony_ci &gxbb_cts_encp_sel, 33348c2ecf20Sopenharmony_ci &gxbb_cts_vdac, 33358c2ecf20Sopenharmony_ci &gxbb_cts_vdac_sel, 33368c2ecf20Sopenharmony_ci &gxbb_hdmi_tx, 33378c2ecf20Sopenharmony_ci &gxbb_hdmi_tx_sel, 33388c2ecf20Sopenharmony_ci &gxbb_hdmi_sel, 33398c2ecf20Sopenharmony_ci &gxbb_hdmi_div, 33408c2ecf20Sopenharmony_ci &gxbb_hdmi, 33418c2ecf20Sopenharmony_ci &gxbb_gp0_pll_dco, 33428c2ecf20Sopenharmony_ci &gxbb_hdmi_pll, 33438c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_od, 33448c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_od2, 33458c2ecf20Sopenharmony_ci &gxbb_hdmi_pll_dco, 33468c2ecf20Sopenharmony_ci}; 33478c2ecf20Sopenharmony_ci 33488c2ecf20Sopenharmony_cistatic struct clk_regmap *const gxl_clk_regmaps[] = { 33498c2ecf20Sopenharmony_ci &gxbb_clk81, 33508c2ecf20Sopenharmony_ci &gxbb_ddr, 33518c2ecf20Sopenharmony_ci &gxbb_dos, 33528c2ecf20Sopenharmony_ci &gxbb_isa, 33538c2ecf20Sopenharmony_ci &gxbb_pl301, 33548c2ecf20Sopenharmony_ci &gxbb_periphs, 33558c2ecf20Sopenharmony_ci &gxbb_spicc, 33568c2ecf20Sopenharmony_ci &gxbb_i2c, 33578c2ecf20Sopenharmony_ci &gxbb_sar_adc, 33588c2ecf20Sopenharmony_ci &gxbb_smart_card, 33598c2ecf20Sopenharmony_ci &gxbb_rng0, 33608c2ecf20Sopenharmony_ci &gxbb_uart0, 33618c2ecf20Sopenharmony_ci &gxbb_sdhc, 33628c2ecf20Sopenharmony_ci &gxbb_stream, 33638c2ecf20Sopenharmony_ci &gxbb_async_fifo, 33648c2ecf20Sopenharmony_ci &gxbb_sdio, 33658c2ecf20Sopenharmony_ci &gxbb_abuf, 33668c2ecf20Sopenharmony_ci &gxbb_hiu_iface, 33678c2ecf20Sopenharmony_ci &gxbb_assist_misc, 33688c2ecf20Sopenharmony_ci &gxbb_spi, 33698c2ecf20Sopenharmony_ci &gxbb_i2s_spdif, 33708c2ecf20Sopenharmony_ci &gxbb_eth, 33718c2ecf20Sopenharmony_ci &gxbb_demux, 33728c2ecf20Sopenharmony_ci &gxbb_aiu_glue, 33738c2ecf20Sopenharmony_ci &gxbb_iec958, 33748c2ecf20Sopenharmony_ci &gxbb_i2s_out, 33758c2ecf20Sopenharmony_ci &gxbb_amclk, 33768c2ecf20Sopenharmony_ci &gxbb_aififo2, 33778c2ecf20Sopenharmony_ci &gxbb_mixer, 33788c2ecf20Sopenharmony_ci &gxbb_mixer_iface, 33798c2ecf20Sopenharmony_ci &gxbb_adc, 33808c2ecf20Sopenharmony_ci &gxbb_blkmv, 33818c2ecf20Sopenharmony_ci &gxbb_aiu, 33828c2ecf20Sopenharmony_ci &gxbb_uart1, 33838c2ecf20Sopenharmony_ci &gxbb_g2d, 33848c2ecf20Sopenharmony_ci &gxbb_usb0, 33858c2ecf20Sopenharmony_ci &gxbb_usb1, 33868c2ecf20Sopenharmony_ci &gxbb_reset, 33878c2ecf20Sopenharmony_ci &gxbb_nand, 33888c2ecf20Sopenharmony_ci &gxbb_dos_parser, 33898c2ecf20Sopenharmony_ci &gxbb_usb, 33908c2ecf20Sopenharmony_ci &gxbb_vdin1, 33918c2ecf20Sopenharmony_ci &gxbb_ahb_arb0, 33928c2ecf20Sopenharmony_ci &gxbb_efuse, 33938c2ecf20Sopenharmony_ci &gxbb_boot_rom, 33948c2ecf20Sopenharmony_ci &gxbb_ahb_data_bus, 33958c2ecf20Sopenharmony_ci &gxbb_ahb_ctrl_bus, 33968c2ecf20Sopenharmony_ci &gxbb_hdmi_intr_sync, 33978c2ecf20Sopenharmony_ci &gxbb_hdmi_pclk, 33988c2ecf20Sopenharmony_ci &gxbb_usb1_ddr_bridge, 33998c2ecf20Sopenharmony_ci &gxbb_usb0_ddr_bridge, 34008c2ecf20Sopenharmony_ci &gxbb_mmc_pclk, 34018c2ecf20Sopenharmony_ci &gxbb_dvin, 34028c2ecf20Sopenharmony_ci &gxbb_uart2, 34038c2ecf20Sopenharmony_ci &gxbb_sana, 34048c2ecf20Sopenharmony_ci &gxbb_vpu_intr, 34058c2ecf20Sopenharmony_ci &gxbb_sec_ahb_ahb3_bridge, 34068c2ecf20Sopenharmony_ci &gxbb_clk81_a53, 34078c2ecf20Sopenharmony_ci &gxbb_vclk2_venci0, 34088c2ecf20Sopenharmony_ci &gxbb_vclk2_venci1, 34098c2ecf20Sopenharmony_ci &gxbb_vclk2_vencp0, 34108c2ecf20Sopenharmony_ci &gxbb_vclk2_vencp1, 34118c2ecf20Sopenharmony_ci &gxbb_gclk_venci_int0, 34128c2ecf20Sopenharmony_ci &gxbb_gclk_vencp_int, 34138c2ecf20Sopenharmony_ci &gxbb_dac_clk, 34148c2ecf20Sopenharmony_ci &gxbb_aoclk_gate, 34158c2ecf20Sopenharmony_ci &gxbb_iec958_gate, 34168c2ecf20Sopenharmony_ci &gxbb_enc480p, 34178c2ecf20Sopenharmony_ci &gxbb_rng1, 34188c2ecf20Sopenharmony_ci &gxbb_gclk_venci_int1, 34198c2ecf20Sopenharmony_ci &gxbb_vclk2_venclmcc, 34208c2ecf20Sopenharmony_ci &gxbb_vclk2_vencl, 34218c2ecf20Sopenharmony_ci &gxbb_vclk_other, 34228c2ecf20Sopenharmony_ci &gxbb_edp, 34238c2ecf20Sopenharmony_ci &gxbb_ao_media_cpu, 34248c2ecf20Sopenharmony_ci &gxbb_ao_ahb_sram, 34258c2ecf20Sopenharmony_ci &gxbb_ao_ahb_bus, 34268c2ecf20Sopenharmony_ci &gxbb_ao_iface, 34278c2ecf20Sopenharmony_ci &gxbb_ao_i2c, 34288c2ecf20Sopenharmony_ci &gxbb_emmc_a, 34298c2ecf20Sopenharmony_ci &gxbb_emmc_b, 34308c2ecf20Sopenharmony_ci &gxbb_emmc_c, 34318c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk, 34328c2ecf20Sopenharmony_ci &gxbb_mali_0, 34338c2ecf20Sopenharmony_ci &gxbb_mali_1, 34348c2ecf20Sopenharmony_ci &gxbb_cts_amclk, 34358c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958, 34368c2ecf20Sopenharmony_ci &gxbb_32k_clk, 34378c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0, 34388c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0, 34398c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0, 34408c2ecf20Sopenharmony_ci &gxbb_vpu_0, 34418c2ecf20Sopenharmony_ci &gxbb_vpu_1, 34428c2ecf20Sopenharmony_ci &gxbb_vapb_0, 34438c2ecf20Sopenharmony_ci &gxbb_vapb_1, 34448c2ecf20Sopenharmony_ci &gxbb_vapb, 34458c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_div, 34468c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_div, 34478c2ecf20Sopenharmony_ci &gxbb_mali_0_div, 34488c2ecf20Sopenharmony_ci &gxbb_mali_1_div, 34498c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_div, 34508c2ecf20Sopenharmony_ci &gxbb_32k_clk_div, 34518c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_div, 34528c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_div, 34538c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_div, 34548c2ecf20Sopenharmony_ci &gxbb_vpu_0_div, 34558c2ecf20Sopenharmony_ci &gxbb_vpu_1_div, 34568c2ecf20Sopenharmony_ci &gxbb_vapb_0_div, 34578c2ecf20Sopenharmony_ci &gxbb_vapb_1_div, 34588c2ecf20Sopenharmony_ci &gxbb_mpeg_clk_sel, 34598c2ecf20Sopenharmony_ci &gxbb_sar_adc_clk_sel, 34608c2ecf20Sopenharmony_ci &gxbb_mali_0_sel, 34618c2ecf20Sopenharmony_ci &gxbb_mali_1_sel, 34628c2ecf20Sopenharmony_ci &gxbb_mali, 34638c2ecf20Sopenharmony_ci &gxbb_cts_amclk_sel, 34648c2ecf20Sopenharmony_ci &gxbb_cts_mclk_i958_sel, 34658c2ecf20Sopenharmony_ci &gxbb_cts_i958, 34668c2ecf20Sopenharmony_ci &gxbb_32k_clk_sel, 34678c2ecf20Sopenharmony_ci &gxbb_sd_emmc_a_clk0_sel, 34688c2ecf20Sopenharmony_ci &gxbb_sd_emmc_b_clk0_sel, 34698c2ecf20Sopenharmony_ci &gxbb_sd_emmc_c_clk0_sel, 34708c2ecf20Sopenharmony_ci &gxbb_vpu_0_sel, 34718c2ecf20Sopenharmony_ci &gxbb_vpu_1_sel, 34728c2ecf20Sopenharmony_ci &gxbb_vpu, 34738c2ecf20Sopenharmony_ci &gxbb_vapb_0_sel, 34748c2ecf20Sopenharmony_ci &gxbb_vapb_1_sel, 34758c2ecf20Sopenharmony_ci &gxbb_vapb_sel, 34768c2ecf20Sopenharmony_ci &gxbb_mpll0, 34778c2ecf20Sopenharmony_ci &gxbb_mpll1, 34788c2ecf20Sopenharmony_ci &gxbb_mpll2, 34798c2ecf20Sopenharmony_ci &gxl_mpll0_div, 34808c2ecf20Sopenharmony_ci &gxbb_mpll1_div, 34818c2ecf20Sopenharmony_ci &gxbb_mpll2_div, 34828c2ecf20Sopenharmony_ci &gxbb_cts_amclk_div, 34838c2ecf20Sopenharmony_ci &gxbb_fixed_pll, 34848c2ecf20Sopenharmony_ci &gxbb_sys_pll, 34858c2ecf20Sopenharmony_ci &gxbb_mpll_prediv, 34868c2ecf20Sopenharmony_ci &gxbb_fclk_div2, 34878c2ecf20Sopenharmony_ci &gxbb_fclk_div3, 34888c2ecf20Sopenharmony_ci &gxbb_fclk_div4, 34898c2ecf20Sopenharmony_ci &gxbb_fclk_div5, 34908c2ecf20Sopenharmony_ci &gxbb_fclk_div7, 34918c2ecf20Sopenharmony_ci &gxbb_vdec_1_sel, 34928c2ecf20Sopenharmony_ci &gxbb_vdec_1_div, 34938c2ecf20Sopenharmony_ci &gxbb_vdec_1, 34948c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_sel, 34958c2ecf20Sopenharmony_ci &gxbb_vdec_hevc_div, 34968c2ecf20Sopenharmony_ci &gxbb_vdec_hevc, 34978c2ecf20Sopenharmony_ci &gxbb_gen_clk_sel, 34988c2ecf20Sopenharmony_ci &gxbb_gen_clk_div, 34998c2ecf20Sopenharmony_ci &gxbb_gen_clk, 35008c2ecf20Sopenharmony_ci &gxbb_fixed_pll_dco, 35018c2ecf20Sopenharmony_ci &gxbb_sys_pll_dco, 35028c2ecf20Sopenharmony_ci &gxbb_gp0_pll, 35038c2ecf20Sopenharmony_ci &gxbb_vid_pll, 35048c2ecf20Sopenharmony_ci &gxbb_vid_pll_sel, 35058c2ecf20Sopenharmony_ci &gxbb_vid_pll_div, 35068c2ecf20Sopenharmony_ci &gxbb_vclk, 35078c2ecf20Sopenharmony_ci &gxbb_vclk_sel, 35088c2ecf20Sopenharmony_ci &gxbb_vclk_div, 35098c2ecf20Sopenharmony_ci &gxbb_vclk_input, 35108c2ecf20Sopenharmony_ci &gxbb_vclk_div1, 35118c2ecf20Sopenharmony_ci &gxbb_vclk_div2_en, 35128c2ecf20Sopenharmony_ci &gxbb_vclk_div4_en, 35138c2ecf20Sopenharmony_ci &gxbb_vclk_div6_en, 35148c2ecf20Sopenharmony_ci &gxbb_vclk_div12_en, 35158c2ecf20Sopenharmony_ci &gxbb_vclk2, 35168c2ecf20Sopenharmony_ci &gxbb_vclk2_sel, 35178c2ecf20Sopenharmony_ci &gxbb_vclk2_div, 35188c2ecf20Sopenharmony_ci &gxbb_vclk2_input, 35198c2ecf20Sopenharmony_ci &gxbb_vclk2_div1, 35208c2ecf20Sopenharmony_ci &gxbb_vclk2_div2_en, 35218c2ecf20Sopenharmony_ci &gxbb_vclk2_div4_en, 35228c2ecf20Sopenharmony_ci &gxbb_vclk2_div6_en, 35238c2ecf20Sopenharmony_ci &gxbb_vclk2_div12_en, 35248c2ecf20Sopenharmony_ci &gxbb_cts_enci, 35258c2ecf20Sopenharmony_ci &gxbb_cts_enci_sel, 35268c2ecf20Sopenharmony_ci &gxbb_cts_encp, 35278c2ecf20Sopenharmony_ci &gxbb_cts_encp_sel, 35288c2ecf20Sopenharmony_ci &gxbb_cts_vdac, 35298c2ecf20Sopenharmony_ci &gxbb_cts_vdac_sel, 35308c2ecf20Sopenharmony_ci &gxbb_hdmi_tx, 35318c2ecf20Sopenharmony_ci &gxbb_hdmi_tx_sel, 35328c2ecf20Sopenharmony_ci &gxbb_hdmi_sel, 35338c2ecf20Sopenharmony_ci &gxbb_hdmi_div, 35348c2ecf20Sopenharmony_ci &gxbb_hdmi, 35358c2ecf20Sopenharmony_ci &gxl_gp0_pll_dco, 35368c2ecf20Sopenharmony_ci &gxl_hdmi_pll, 35378c2ecf20Sopenharmony_ci &gxl_hdmi_pll_od, 35388c2ecf20Sopenharmony_ci &gxl_hdmi_pll_od2, 35398c2ecf20Sopenharmony_ci &gxl_hdmi_pll_dco, 35408c2ecf20Sopenharmony_ci &gxl_acodec, 35418c2ecf20Sopenharmony_ci}; 35428c2ecf20Sopenharmony_ci 35438c2ecf20Sopenharmony_cistatic const struct meson_eeclkc_data gxbb_clkc_data = { 35448c2ecf20Sopenharmony_ci .regmap_clks = gxbb_clk_regmaps, 35458c2ecf20Sopenharmony_ci .regmap_clk_num = ARRAY_SIZE(gxbb_clk_regmaps), 35468c2ecf20Sopenharmony_ci .hw_onecell_data = &gxbb_hw_onecell_data, 35478c2ecf20Sopenharmony_ci}; 35488c2ecf20Sopenharmony_ci 35498c2ecf20Sopenharmony_cistatic const struct meson_eeclkc_data gxl_clkc_data = { 35508c2ecf20Sopenharmony_ci .regmap_clks = gxl_clk_regmaps, 35518c2ecf20Sopenharmony_ci .regmap_clk_num = ARRAY_SIZE(gxl_clk_regmaps), 35528c2ecf20Sopenharmony_ci .hw_onecell_data = &gxl_hw_onecell_data, 35538c2ecf20Sopenharmony_ci}; 35548c2ecf20Sopenharmony_ci 35558c2ecf20Sopenharmony_cistatic const struct of_device_id clkc_match_table[] = { 35568c2ecf20Sopenharmony_ci { .compatible = "amlogic,gxbb-clkc", .data = &gxbb_clkc_data }, 35578c2ecf20Sopenharmony_ci { .compatible = "amlogic,gxl-clkc", .data = &gxl_clkc_data }, 35588c2ecf20Sopenharmony_ci {}, 35598c2ecf20Sopenharmony_ci}; 35608c2ecf20Sopenharmony_ci 35618c2ecf20Sopenharmony_cistatic struct platform_driver gxbb_driver = { 35628c2ecf20Sopenharmony_ci .probe = meson_eeclkc_probe, 35638c2ecf20Sopenharmony_ci .driver = { 35648c2ecf20Sopenharmony_ci .name = "gxbb-clkc", 35658c2ecf20Sopenharmony_ci .of_match_table = clkc_match_table, 35668c2ecf20Sopenharmony_ci }, 35678c2ecf20Sopenharmony_ci}; 35688c2ecf20Sopenharmony_ci 35698c2ecf20Sopenharmony_cibuiltin_platform_driver(gxbb_driver); 3570