18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * OMAP5 Clock init
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2013 Texas Instruments, Inc.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Tero Kristo (t-kristo@ti.com)
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <linux/kernel.h>
118c2ecf20Sopenharmony_ci#include <linux/list.h>
128c2ecf20Sopenharmony_ci#include <linux/clk.h>
138c2ecf20Sopenharmony_ci#include <linux/clkdev.h>
148c2ecf20Sopenharmony_ci#include <linux/io.h>
158c2ecf20Sopenharmony_ci#include <linux/clk/ti.h>
168c2ecf20Sopenharmony_ci#include <dt-bindings/clock/omap5.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#include "clock.h"
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define OMAP5_DPLL_ABE_DEFFREQ				98304000
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/*
238c2ecf20Sopenharmony_ci * OMAP543x TRM, section "3.6.3.9.5 DPLL_USB Preferred Settings"
248c2ecf20Sopenharmony_ci * states it must be at 960MHz
258c2ecf20Sopenharmony_ci */
268c2ecf20Sopenharmony_ci#define OMAP5_DPLL_USB_DEFFREQ				960000000
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_mpu_clkctrl_regs[] __initconst = {
298c2ecf20Sopenharmony_ci	{ OMAP5_MPU_CLKCTRL, NULL, 0, "dpll_mpu_m2_ck" },
308c2ecf20Sopenharmony_ci	{ 0 },
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_dsp_clkctrl_regs[] __initconst = {
348c2ecf20Sopenharmony_ci	{ OMAP5_MMU_DSP_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_h11x2_ck" },
358c2ecf20Sopenharmony_ci	{ 0 },
368c2ecf20Sopenharmony_ci};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_cistatic const char * const omap5_aess_fclk_parents[] __initconst = {
398c2ecf20Sopenharmony_ci	"abe_clk",
408c2ecf20Sopenharmony_ci	NULL,
418c2ecf20Sopenharmony_ci};
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_div_data omap5_aess_fclk_data __initconst = {
448c2ecf20Sopenharmony_ci	.max_div = 2,
458c2ecf20Sopenharmony_ci};
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_aess_bit_data[] __initconst = {
488c2ecf20Sopenharmony_ci	{ 24, TI_CLK_DIVIDER, omap5_aess_fclk_parents, &omap5_aess_fclk_data },
498c2ecf20Sopenharmony_ci	{ 0 },
508c2ecf20Sopenharmony_ci};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_cistatic const char * const omap5_dmic_gfclk_parents[] __initconst = {
538c2ecf20Sopenharmony_ci	"abe_cm:clk:0018:26",
548c2ecf20Sopenharmony_ci	"pad_clks_ck",
558c2ecf20Sopenharmony_ci	"slimbus_clk",
568c2ecf20Sopenharmony_ci	NULL,
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_cistatic const char * const omap5_dmic_sync_mux_ck_parents[] __initconst = {
608c2ecf20Sopenharmony_ci	"abe_24m_fclk",
618c2ecf20Sopenharmony_ci	"dss_syc_gfclk_div",
628c2ecf20Sopenharmony_ci	"func_24m_clk",
638c2ecf20Sopenharmony_ci	NULL,
648c2ecf20Sopenharmony_ci};
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_dmic_bit_data[] __initconst = {
678c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_dmic_gfclk_parents, NULL },
688c2ecf20Sopenharmony_ci	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
698c2ecf20Sopenharmony_ci	{ 0 },
708c2ecf20Sopenharmony_ci};
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_cistatic const char * const omap5_mcbsp1_gfclk_parents[] __initconst = {
738c2ecf20Sopenharmony_ci	"abe_cm:clk:0028:26",
748c2ecf20Sopenharmony_ci	"pad_clks_ck",
758c2ecf20Sopenharmony_ci	"slimbus_clk",
768c2ecf20Sopenharmony_ci	NULL,
778c2ecf20Sopenharmony_ci};
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_mcbsp1_bit_data[] __initconst = {
808c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_mcbsp1_gfclk_parents, NULL },
818c2ecf20Sopenharmony_ci	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
828c2ecf20Sopenharmony_ci	{ 0 },
838c2ecf20Sopenharmony_ci};
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_cistatic const char * const omap5_mcbsp2_gfclk_parents[] __initconst = {
868c2ecf20Sopenharmony_ci	"abe_cm:clk:0030:26",
878c2ecf20Sopenharmony_ci	"pad_clks_ck",
888c2ecf20Sopenharmony_ci	"slimbus_clk",
898c2ecf20Sopenharmony_ci	NULL,
908c2ecf20Sopenharmony_ci};
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_mcbsp2_bit_data[] __initconst = {
938c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_mcbsp2_gfclk_parents, NULL },
948c2ecf20Sopenharmony_ci	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
958c2ecf20Sopenharmony_ci	{ 0 },
968c2ecf20Sopenharmony_ci};
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_cistatic const char * const omap5_mcbsp3_gfclk_parents[] __initconst = {
998c2ecf20Sopenharmony_ci	"abe_cm:clk:0038:26",
1008c2ecf20Sopenharmony_ci	"pad_clks_ck",
1018c2ecf20Sopenharmony_ci	"slimbus_clk",
1028c2ecf20Sopenharmony_ci	NULL,
1038c2ecf20Sopenharmony_ci};
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_mcbsp3_bit_data[] __initconst = {
1068c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_mcbsp3_gfclk_parents, NULL },
1078c2ecf20Sopenharmony_ci	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
1088c2ecf20Sopenharmony_ci	{ 0 },
1098c2ecf20Sopenharmony_ci};
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_cistatic const char * const omap5_timer5_gfclk_mux_parents[] __initconst = {
1128c2ecf20Sopenharmony_ci	"dss_syc_gfclk_div",
1138c2ecf20Sopenharmony_ci	"sys_32k_ck",
1148c2ecf20Sopenharmony_ci	NULL,
1158c2ecf20Sopenharmony_ci};
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer5_bit_data[] __initconst = {
1188c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1198c2ecf20Sopenharmony_ci	{ 0 },
1208c2ecf20Sopenharmony_ci};
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer6_bit_data[] __initconst = {
1238c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1248c2ecf20Sopenharmony_ci	{ 0 },
1258c2ecf20Sopenharmony_ci};
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer7_bit_data[] __initconst = {
1288c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1298c2ecf20Sopenharmony_ci	{ 0 },
1308c2ecf20Sopenharmony_ci};
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer8_bit_data[] __initconst = {
1338c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1348c2ecf20Sopenharmony_ci	{ 0 },
1358c2ecf20Sopenharmony_ci};
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_abe_clkctrl_regs[] __initconst = {
1388c2ecf20Sopenharmony_ci	{ OMAP5_L4_ABE_CLKCTRL, NULL, 0, "abe_iclk" },
1398c2ecf20Sopenharmony_ci	{ OMAP5_AESS_CLKCTRL, omap5_aess_bit_data, CLKF_SW_SUP, "abe_cm:clk:0008:24" },
1408c2ecf20Sopenharmony_ci	{ OMAP5_MCPDM_CLKCTRL, NULL, CLKF_SW_SUP, "pad_clks_ck" },
1418c2ecf20Sopenharmony_ci	{ OMAP5_DMIC_CLKCTRL, omap5_dmic_bit_data, CLKF_SW_SUP, "abe_cm:clk:0018:24" },
1428c2ecf20Sopenharmony_ci	{ OMAP5_MCBSP1_CLKCTRL, omap5_mcbsp1_bit_data, CLKF_SW_SUP, "abe_cm:clk:0028:24" },
1438c2ecf20Sopenharmony_ci	{ OMAP5_MCBSP2_CLKCTRL, omap5_mcbsp2_bit_data, CLKF_SW_SUP, "abe_cm:clk:0030:24" },
1448c2ecf20Sopenharmony_ci	{ OMAP5_MCBSP3_CLKCTRL, omap5_mcbsp3_bit_data, CLKF_SW_SUP, "abe_cm:clk:0038:24" },
1458c2ecf20Sopenharmony_ci	{ OMAP5_TIMER5_CLKCTRL, omap5_timer5_bit_data, CLKF_SW_SUP, "abe_cm:clk:0048:24" },
1468c2ecf20Sopenharmony_ci	{ OMAP5_TIMER6_CLKCTRL, omap5_timer6_bit_data, CLKF_SW_SUP, "abe_cm:clk:0050:24" },
1478c2ecf20Sopenharmony_ci	{ OMAP5_TIMER7_CLKCTRL, omap5_timer7_bit_data, CLKF_SW_SUP, "abe_cm:clk:0058:24" },
1488c2ecf20Sopenharmony_ci	{ OMAP5_TIMER8_CLKCTRL, omap5_timer8_bit_data, CLKF_SW_SUP, "abe_cm:clk:0060:24" },
1498c2ecf20Sopenharmony_ci	{ 0 },
1508c2ecf20Sopenharmony_ci};
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l3main1_clkctrl_regs[] __initconst = {
1538c2ecf20Sopenharmony_ci	{ OMAP5_L3_MAIN_1_CLKCTRL, NULL, 0, "l3_iclk_div" },
1548c2ecf20Sopenharmony_ci	{ 0 },
1558c2ecf20Sopenharmony_ci};
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l3main2_clkctrl_regs[] __initconst = {
1588c2ecf20Sopenharmony_ci	{ OMAP5_L3_MAIN_2_CLKCTRL, NULL, 0, "l3_iclk_div" },
1598c2ecf20Sopenharmony_ci	{ 0 },
1608c2ecf20Sopenharmony_ci};
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_ipu_clkctrl_regs[] __initconst = {
1638c2ecf20Sopenharmony_ci	{ OMAP5_MMU_IPU_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_core_h22x2_ck" },
1648c2ecf20Sopenharmony_ci	{ 0 },
1658c2ecf20Sopenharmony_ci};
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_dma_clkctrl_regs[] __initconst = {
1688c2ecf20Sopenharmony_ci	{ OMAP5_DMA_SYSTEM_CLKCTRL, NULL, 0, "l3_iclk_div" },
1698c2ecf20Sopenharmony_ci	{ 0 },
1708c2ecf20Sopenharmony_ci};
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_emif_clkctrl_regs[] __initconst = {
1738c2ecf20Sopenharmony_ci	{ OMAP5_DMM_CLKCTRL, NULL, 0, "l3_iclk_div" },
1748c2ecf20Sopenharmony_ci	{ OMAP5_EMIF1_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h11x2_ck" },
1758c2ecf20Sopenharmony_ci	{ OMAP5_EMIF2_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h11x2_ck" },
1768c2ecf20Sopenharmony_ci	{ 0 },
1778c2ecf20Sopenharmony_ci};
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l4cfg_clkctrl_regs[] __initconst = {
1808c2ecf20Sopenharmony_ci	{ OMAP5_L4_CFG_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1818c2ecf20Sopenharmony_ci	{ OMAP5_SPINLOCK_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1828c2ecf20Sopenharmony_ci	{ OMAP5_MAILBOX_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1838c2ecf20Sopenharmony_ci	{ 0 },
1848c2ecf20Sopenharmony_ci};
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l3instr_clkctrl_regs[] __initconst = {
1878c2ecf20Sopenharmony_ci	{ OMAP5_L3_MAIN_3_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
1888c2ecf20Sopenharmony_ci	{ OMAP5_L3_INSTR_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
1898c2ecf20Sopenharmony_ci	{ 0 },
1908c2ecf20Sopenharmony_ci};
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_cistatic const char * const omap5_timer10_gfclk_mux_parents[] __initconst = {
1938c2ecf20Sopenharmony_ci	"sys_clkin",
1948c2ecf20Sopenharmony_ci	"sys_32k_ck",
1958c2ecf20Sopenharmony_ci	NULL,
1968c2ecf20Sopenharmony_ci};
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer10_bit_data[] __initconst = {
1998c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2008c2ecf20Sopenharmony_ci	{ 0 },
2018c2ecf20Sopenharmony_ci};
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer11_bit_data[] __initconst = {
2048c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2058c2ecf20Sopenharmony_ci	{ 0 },
2068c2ecf20Sopenharmony_ci};
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer2_bit_data[] __initconst = {
2098c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2108c2ecf20Sopenharmony_ci	{ 0 },
2118c2ecf20Sopenharmony_ci};
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer3_bit_data[] __initconst = {
2148c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2158c2ecf20Sopenharmony_ci	{ 0 },
2168c2ecf20Sopenharmony_ci};
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer4_bit_data[] __initconst = {
2198c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2208c2ecf20Sopenharmony_ci	{ 0 },
2218c2ecf20Sopenharmony_ci};
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer9_bit_data[] __initconst = {
2248c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2258c2ecf20Sopenharmony_ci	{ 0 },
2268c2ecf20Sopenharmony_ci};
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_cistatic const char * const omap5_gpio2_dbclk_parents[] __initconst = {
2298c2ecf20Sopenharmony_ci	"sys_32k_ck",
2308c2ecf20Sopenharmony_ci	NULL,
2318c2ecf20Sopenharmony_ci};
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio2_bit_data[] __initconst = {
2348c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2358c2ecf20Sopenharmony_ci	{ 0 },
2368c2ecf20Sopenharmony_ci};
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio3_bit_data[] __initconst = {
2398c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2408c2ecf20Sopenharmony_ci	{ 0 },
2418c2ecf20Sopenharmony_ci};
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio4_bit_data[] __initconst = {
2448c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2458c2ecf20Sopenharmony_ci	{ 0 },
2468c2ecf20Sopenharmony_ci};
2478c2ecf20Sopenharmony_ci
2488c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio5_bit_data[] __initconst = {
2498c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2508c2ecf20Sopenharmony_ci	{ 0 },
2518c2ecf20Sopenharmony_ci};
2528c2ecf20Sopenharmony_ci
2538c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio6_bit_data[] __initconst = {
2548c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2558c2ecf20Sopenharmony_ci	{ 0 },
2568c2ecf20Sopenharmony_ci};
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio7_bit_data[] __initconst = {
2598c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2608c2ecf20Sopenharmony_ci	{ 0 },
2618c2ecf20Sopenharmony_ci};
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio8_bit_data[] __initconst = {
2648c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2658c2ecf20Sopenharmony_ci	{ 0 },
2668c2ecf20Sopenharmony_ci};
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l4per_clkctrl_regs[] __initconst = {
2698c2ecf20Sopenharmony_ci	{ OMAP5_TIMER10_CLKCTRL, omap5_timer10_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0008:24" },
2708c2ecf20Sopenharmony_ci	{ OMAP5_TIMER11_CLKCTRL, omap5_timer11_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0010:24" },
2718c2ecf20Sopenharmony_ci	{ OMAP5_TIMER2_CLKCTRL, omap5_timer2_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0018:24" },
2728c2ecf20Sopenharmony_ci	{ OMAP5_TIMER3_CLKCTRL, omap5_timer3_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0020:24" },
2738c2ecf20Sopenharmony_ci	{ OMAP5_TIMER4_CLKCTRL, omap5_timer4_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0028:24" },
2748c2ecf20Sopenharmony_ci	{ OMAP5_TIMER9_CLKCTRL, omap5_timer9_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0030:24" },
2758c2ecf20Sopenharmony_ci	{ OMAP5_GPIO2_CLKCTRL, omap5_gpio2_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2768c2ecf20Sopenharmony_ci	{ OMAP5_GPIO3_CLKCTRL, omap5_gpio3_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2778c2ecf20Sopenharmony_ci	{ OMAP5_GPIO4_CLKCTRL, omap5_gpio4_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2788c2ecf20Sopenharmony_ci	{ OMAP5_GPIO5_CLKCTRL, omap5_gpio5_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2798c2ecf20Sopenharmony_ci	{ OMAP5_GPIO6_CLKCTRL, omap5_gpio6_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2808c2ecf20Sopenharmony_ci	{ OMAP5_I2C1_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2818c2ecf20Sopenharmony_ci	{ OMAP5_I2C2_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2828c2ecf20Sopenharmony_ci	{ OMAP5_I2C3_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2838c2ecf20Sopenharmony_ci	{ OMAP5_I2C4_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2848c2ecf20Sopenharmony_ci	{ OMAP5_L4_PER_CLKCTRL, NULL, 0, "l4_root_clk_div" },
2858c2ecf20Sopenharmony_ci	{ OMAP5_MCSPI1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2868c2ecf20Sopenharmony_ci	{ OMAP5_MCSPI2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2878c2ecf20Sopenharmony_ci	{ OMAP5_MCSPI3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2888c2ecf20Sopenharmony_ci	{ OMAP5_MCSPI4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2898c2ecf20Sopenharmony_ci	{ OMAP5_GPIO7_CLKCTRL, omap5_gpio7_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2908c2ecf20Sopenharmony_ci	{ OMAP5_GPIO8_CLKCTRL, omap5_gpio8_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2918c2ecf20Sopenharmony_ci	{ OMAP5_MMC3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2928c2ecf20Sopenharmony_ci	{ OMAP5_MMC4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2938c2ecf20Sopenharmony_ci	{ OMAP5_UART1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2948c2ecf20Sopenharmony_ci	{ OMAP5_UART2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2958c2ecf20Sopenharmony_ci	{ OMAP5_UART3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2968c2ecf20Sopenharmony_ci	{ OMAP5_UART4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2978c2ecf20Sopenharmony_ci	{ OMAP5_MMC5_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2988c2ecf20Sopenharmony_ci	{ OMAP5_I2C5_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2998c2ecf20Sopenharmony_ci	{ OMAP5_UART5_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
3008c2ecf20Sopenharmony_ci	{ OMAP5_UART6_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
3018c2ecf20Sopenharmony_ci	{ 0 },
3028c2ecf20Sopenharmony_ci};
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_cistatic const struct
3058c2ecf20Sopenharmony_ciomap_clkctrl_reg_data omap5_l4_secure_clkctrl_regs[] __initconst = {
3068c2ecf20Sopenharmony_ci	{ OMAP5_AES1_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
3078c2ecf20Sopenharmony_ci	{ OMAP5_AES2_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
3088c2ecf20Sopenharmony_ci	{ OMAP5_DES3DES_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
3098c2ecf20Sopenharmony_ci	{ OMAP5_FPKA_CLKCTRL, NULL, CLKF_SW_SUP, "l4_root_clk_div" },
3108c2ecf20Sopenharmony_ci	{ OMAP5_RNG_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l4_root_clk_div" },
3118c2ecf20Sopenharmony_ci	{ OMAP5_SHA2MD5_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
3128c2ecf20Sopenharmony_ci	{ OMAP5_DMA_CRYPTO_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l3_iclk_div" },
3138c2ecf20Sopenharmony_ci	{ 0 },
3148c2ecf20Sopenharmony_ci};
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_iva_clkctrl_regs[] __initconst = {
3178c2ecf20Sopenharmony_ci	{ OMAP5_IVA_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" },
3188c2ecf20Sopenharmony_ci	{ OMAP5_SL2IF_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" },
3198c2ecf20Sopenharmony_ci	{ 0 },
3208c2ecf20Sopenharmony_ci};
3218c2ecf20Sopenharmony_ci
3228c2ecf20Sopenharmony_cistatic const char * const omap5_dss_dss_clk_parents[] __initconst = {
3238c2ecf20Sopenharmony_ci	"dpll_per_h12x2_ck",
3248c2ecf20Sopenharmony_ci	NULL,
3258c2ecf20Sopenharmony_ci};
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_cistatic const char * const omap5_dss_48mhz_clk_parents[] __initconst = {
3288c2ecf20Sopenharmony_ci	"func_48m_fclk",
3298c2ecf20Sopenharmony_ci	NULL,
3308c2ecf20Sopenharmony_ci};
3318c2ecf20Sopenharmony_ci
3328c2ecf20Sopenharmony_cistatic const char * const omap5_dss_sys_clk_parents[] __initconst = {
3338c2ecf20Sopenharmony_ci	"dss_syc_gfclk_div",
3348c2ecf20Sopenharmony_ci	NULL,
3358c2ecf20Sopenharmony_ci};
3368c2ecf20Sopenharmony_ci
3378c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_dss_core_bit_data[] __initconst = {
3388c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_dss_dss_clk_parents, NULL },
3398c2ecf20Sopenharmony_ci	{ 9, TI_CLK_GATE, omap5_dss_48mhz_clk_parents, NULL },
3408c2ecf20Sopenharmony_ci	{ 10, TI_CLK_GATE, omap5_dss_sys_clk_parents, NULL },
3418c2ecf20Sopenharmony_ci	{ 11, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
3428c2ecf20Sopenharmony_ci	{ 0 },
3438c2ecf20Sopenharmony_ci};
3448c2ecf20Sopenharmony_ci
3458c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_dss_clkctrl_regs[] __initconst = {
3468c2ecf20Sopenharmony_ci	{ OMAP5_DSS_CORE_CLKCTRL, omap5_dss_core_bit_data, CLKF_SW_SUP, "dss_cm:clk:0000:8" },
3478c2ecf20Sopenharmony_ci	{ 0 },
3488c2ecf20Sopenharmony_ci};
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_cistatic const char * const omap5_gpu_core_mux_parents[] __initconst = {
3518c2ecf20Sopenharmony_ci	"dpll_core_h14x2_ck",
3528c2ecf20Sopenharmony_ci	"dpll_per_h14x2_ck",
3538c2ecf20Sopenharmony_ci	NULL,
3548c2ecf20Sopenharmony_ci};
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_cistatic const char * const omap5_gpu_hyd_mux_parents[] __initconst = {
3578c2ecf20Sopenharmony_ci	"dpll_core_h14x2_ck",
3588c2ecf20Sopenharmony_ci	"dpll_per_h14x2_ck",
3598c2ecf20Sopenharmony_ci	NULL,
3608c2ecf20Sopenharmony_ci};
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_cistatic const char * const omap5_gpu_sys_clk_parents[] __initconst = {
3638c2ecf20Sopenharmony_ci	"sys_clkin",
3648c2ecf20Sopenharmony_ci	NULL,
3658c2ecf20Sopenharmony_ci};
3668c2ecf20Sopenharmony_ci
3678c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_div_data omap5_gpu_sys_clk_data __initconst = {
3688c2ecf20Sopenharmony_ci	.max_div = 2,
3698c2ecf20Sopenharmony_ci};
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpu_core_bit_data[] __initconst = {
3728c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_gpu_core_mux_parents, NULL },
3738c2ecf20Sopenharmony_ci	{ 25, TI_CLK_MUX, omap5_gpu_hyd_mux_parents, NULL },
3748c2ecf20Sopenharmony_ci	{ 26, TI_CLK_DIVIDER, omap5_gpu_sys_clk_parents, &omap5_gpu_sys_clk_data },
3758c2ecf20Sopenharmony_ci	{ 0 },
3768c2ecf20Sopenharmony_ci};
3778c2ecf20Sopenharmony_ci
3788c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_gpu_clkctrl_regs[] __initconst = {
3798c2ecf20Sopenharmony_ci	{ OMAP5_GPU_CLKCTRL, omap5_gpu_core_bit_data, CLKF_SW_SUP, "gpu_cm:clk:0000:24" },
3808c2ecf20Sopenharmony_ci	{ 0 },
3818c2ecf20Sopenharmony_ci};
3828c2ecf20Sopenharmony_ci
3838c2ecf20Sopenharmony_cistatic const char * const omap5_mmc1_fclk_mux_parents[] __initconst = {
3848c2ecf20Sopenharmony_ci	"func_128m_clk",
3858c2ecf20Sopenharmony_ci	"dpll_per_m2x2_ck",
3868c2ecf20Sopenharmony_ci	NULL,
3878c2ecf20Sopenharmony_ci};
3888c2ecf20Sopenharmony_ci
3898c2ecf20Sopenharmony_cistatic const char * const omap5_mmc1_fclk_parents[] __initconst = {
3908c2ecf20Sopenharmony_ci	"l3init_cm:clk:0008:24",
3918c2ecf20Sopenharmony_ci	NULL,
3928c2ecf20Sopenharmony_ci};
3938c2ecf20Sopenharmony_ci
3948c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_div_data omap5_mmc1_fclk_data __initconst = {
3958c2ecf20Sopenharmony_ci	.max_div = 2,
3968c2ecf20Sopenharmony_ci};
3978c2ecf20Sopenharmony_ci
3988c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_mmc1_bit_data[] __initconst = {
3998c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
4008c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_mmc1_fclk_mux_parents, NULL },
4018c2ecf20Sopenharmony_ci	{ 25, TI_CLK_DIVIDER, omap5_mmc1_fclk_parents, &omap5_mmc1_fclk_data },
4028c2ecf20Sopenharmony_ci	{ 0 },
4038c2ecf20Sopenharmony_ci};
4048c2ecf20Sopenharmony_ci
4058c2ecf20Sopenharmony_cistatic const char * const omap5_mmc2_fclk_parents[] __initconst = {
4068c2ecf20Sopenharmony_ci	"l3init_cm:clk:0010:24",
4078c2ecf20Sopenharmony_ci	NULL,
4088c2ecf20Sopenharmony_ci};
4098c2ecf20Sopenharmony_ci
4108c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_div_data omap5_mmc2_fclk_data __initconst = {
4118c2ecf20Sopenharmony_ci	.max_div = 2,
4128c2ecf20Sopenharmony_ci};
4138c2ecf20Sopenharmony_ci
4148c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_mmc2_bit_data[] __initconst = {
4158c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_mmc1_fclk_mux_parents, NULL },
4168c2ecf20Sopenharmony_ci	{ 25, TI_CLK_DIVIDER, omap5_mmc2_fclk_parents, &omap5_mmc2_fclk_data },
4178c2ecf20Sopenharmony_ci	{ 0 },
4188c2ecf20Sopenharmony_ci};
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_cistatic const char * const omap5_usb_host_hs_hsic60m_p3_clk_parents[] __initconst = {
4218c2ecf20Sopenharmony_ci	"l3init_60m_fclk",
4228c2ecf20Sopenharmony_ci	NULL,
4238c2ecf20Sopenharmony_ci};
4248c2ecf20Sopenharmony_ci
4258c2ecf20Sopenharmony_cistatic const char * const omap5_usb_host_hs_hsic480m_p3_clk_parents[] __initconst = {
4268c2ecf20Sopenharmony_ci	"dpll_usb_m2_ck",
4278c2ecf20Sopenharmony_ci	NULL,
4288c2ecf20Sopenharmony_ci};
4298c2ecf20Sopenharmony_ci
4308c2ecf20Sopenharmony_cistatic const char * const omap5_usb_host_hs_utmi_p1_clk_parents[] __initconst = {
4318c2ecf20Sopenharmony_ci	"l3init_cm:clk:0038:24",
4328c2ecf20Sopenharmony_ci	NULL,
4338c2ecf20Sopenharmony_ci};
4348c2ecf20Sopenharmony_ci
4358c2ecf20Sopenharmony_cistatic const char * const omap5_usb_host_hs_utmi_p2_clk_parents[] __initconst = {
4368c2ecf20Sopenharmony_ci	"l3init_cm:clk:0038:25",
4378c2ecf20Sopenharmony_ci	NULL,
4388c2ecf20Sopenharmony_ci};
4398c2ecf20Sopenharmony_ci
4408c2ecf20Sopenharmony_cistatic const char * const omap5_utmi_p1_gfclk_parents[] __initconst = {
4418c2ecf20Sopenharmony_ci	"l3init_60m_fclk",
4428c2ecf20Sopenharmony_ci	"xclk60mhsp1_ck",
4438c2ecf20Sopenharmony_ci	NULL,
4448c2ecf20Sopenharmony_ci};
4458c2ecf20Sopenharmony_ci
4468c2ecf20Sopenharmony_cistatic const char * const omap5_utmi_p2_gfclk_parents[] __initconst = {
4478c2ecf20Sopenharmony_ci	"l3init_60m_fclk",
4488c2ecf20Sopenharmony_ci	"xclk60mhsp2_ck",
4498c2ecf20Sopenharmony_ci	NULL,
4508c2ecf20Sopenharmony_ci};
4518c2ecf20Sopenharmony_ci
4528c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_usb_host_hs_bit_data[] __initconst = {
4538c2ecf20Sopenharmony_ci	{ 6, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4548c2ecf20Sopenharmony_ci	{ 7, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4558c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_usb_host_hs_utmi_p1_clk_parents, NULL },
4568c2ecf20Sopenharmony_ci	{ 9, TI_CLK_GATE, omap5_usb_host_hs_utmi_p2_clk_parents, NULL },
4578c2ecf20Sopenharmony_ci	{ 10, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4588c2ecf20Sopenharmony_ci	{ 11, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4598c2ecf20Sopenharmony_ci	{ 12, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4608c2ecf20Sopenharmony_ci	{ 13, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4618c2ecf20Sopenharmony_ci	{ 14, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4628c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_utmi_p1_gfclk_parents, NULL },
4638c2ecf20Sopenharmony_ci	{ 25, TI_CLK_MUX, omap5_utmi_p2_gfclk_parents, NULL },
4648c2ecf20Sopenharmony_ci	{ 0 },
4658c2ecf20Sopenharmony_ci};
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_usb_tll_hs_bit_data[] __initconst = {
4688c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4698c2ecf20Sopenharmony_ci	{ 9, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4708c2ecf20Sopenharmony_ci	{ 10, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4718c2ecf20Sopenharmony_ci	{ 0 },
4728c2ecf20Sopenharmony_ci};
4738c2ecf20Sopenharmony_ci
4748c2ecf20Sopenharmony_cistatic const char * const omap5_sata_ref_clk_parents[] __initconst = {
4758c2ecf20Sopenharmony_ci	"sys_clkin",
4768c2ecf20Sopenharmony_ci	NULL,
4778c2ecf20Sopenharmony_ci};
4788c2ecf20Sopenharmony_ci
4798c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_sata_bit_data[] __initconst = {
4808c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_sata_ref_clk_parents, NULL },
4818c2ecf20Sopenharmony_ci	{ 0 },
4828c2ecf20Sopenharmony_ci};
4838c2ecf20Sopenharmony_ci
4848c2ecf20Sopenharmony_cistatic const char * const omap5_usb_otg_ss_refclk960m_parents[] __initconst = {
4858c2ecf20Sopenharmony_ci	"dpll_usb_clkdcoldo",
4868c2ecf20Sopenharmony_ci	NULL,
4878c2ecf20Sopenharmony_ci};
4888c2ecf20Sopenharmony_ci
4898c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_usb_otg_ss_bit_data[] __initconst = {
4908c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_usb_otg_ss_refclk960m_parents, NULL },
4918c2ecf20Sopenharmony_ci	{ 0 },
4928c2ecf20Sopenharmony_ci};
4938c2ecf20Sopenharmony_ci
4948c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_l3init_clkctrl_regs[] __initconst = {
4958c2ecf20Sopenharmony_ci	{ OMAP5_MMC1_CLKCTRL, omap5_mmc1_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0008:25" },
4968c2ecf20Sopenharmony_ci	{ OMAP5_MMC2_CLKCTRL, omap5_mmc2_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0010:25" },
4978c2ecf20Sopenharmony_ci	{ OMAP5_USB_HOST_HS_CLKCTRL, omap5_usb_host_hs_bit_data, CLKF_SW_SUP, "l3init_60m_fclk" },
4988c2ecf20Sopenharmony_ci	{ OMAP5_USB_TLL_HS_CLKCTRL, omap5_usb_tll_hs_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
4998c2ecf20Sopenharmony_ci	{ OMAP5_SATA_CLKCTRL, omap5_sata_bit_data, CLKF_SW_SUP, "func_48m_fclk" },
5008c2ecf20Sopenharmony_ci	{ OMAP5_OCP2SCP1_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
5018c2ecf20Sopenharmony_ci	{ OMAP5_OCP2SCP3_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
5028c2ecf20Sopenharmony_ci	{ OMAP5_USB_OTG_SS_CLKCTRL, omap5_usb_otg_ss_bit_data, CLKF_HW_SUP, "dpll_core_h13x2_ck" },
5038c2ecf20Sopenharmony_ci	{ 0 },
5048c2ecf20Sopenharmony_ci};
5058c2ecf20Sopenharmony_ci
5068c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_gpio1_bit_data[] __initconst = {
5078c2ecf20Sopenharmony_ci	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
5088c2ecf20Sopenharmony_ci	{ 0 },
5098c2ecf20Sopenharmony_ci};
5108c2ecf20Sopenharmony_ci
5118c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_bit_data omap5_timer1_bit_data[] __initconst = {
5128c2ecf20Sopenharmony_ci	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
5138c2ecf20Sopenharmony_ci	{ 0 },
5148c2ecf20Sopenharmony_ci};
5158c2ecf20Sopenharmony_ci
5168c2ecf20Sopenharmony_cistatic const struct omap_clkctrl_reg_data omap5_wkupaon_clkctrl_regs[] __initconst = {
5178c2ecf20Sopenharmony_ci	{ OMAP5_L4_WKUP_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
5188c2ecf20Sopenharmony_ci	{ OMAP5_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
5198c2ecf20Sopenharmony_ci	{ OMAP5_GPIO1_CLKCTRL, omap5_gpio1_bit_data, CLKF_HW_SUP, "wkupaon_iclk_mux" },
5208c2ecf20Sopenharmony_ci	{ OMAP5_TIMER1_CLKCTRL, omap5_timer1_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0020:24" },
5218c2ecf20Sopenharmony_ci	{ OMAP5_COUNTER_32K_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
5228c2ecf20Sopenharmony_ci	{ OMAP5_KBD_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
5238c2ecf20Sopenharmony_ci	{ 0 },
5248c2ecf20Sopenharmony_ci};
5258c2ecf20Sopenharmony_ci
5268c2ecf20Sopenharmony_ciconst struct omap_clkctrl_data omap5_clkctrl_data[] __initconst = {
5278c2ecf20Sopenharmony_ci	{ 0x4a004320, omap5_mpu_clkctrl_regs },
5288c2ecf20Sopenharmony_ci	{ 0x4a004420, omap5_dsp_clkctrl_regs },
5298c2ecf20Sopenharmony_ci	{ 0x4a004520, omap5_abe_clkctrl_regs },
5308c2ecf20Sopenharmony_ci	{ 0x4a008720, omap5_l3main1_clkctrl_regs },
5318c2ecf20Sopenharmony_ci	{ 0x4a008820, omap5_l3main2_clkctrl_regs },
5328c2ecf20Sopenharmony_ci	{ 0x4a008920, omap5_ipu_clkctrl_regs },
5338c2ecf20Sopenharmony_ci	{ 0x4a008a20, omap5_dma_clkctrl_regs },
5348c2ecf20Sopenharmony_ci	{ 0x4a008b20, omap5_emif_clkctrl_regs },
5358c2ecf20Sopenharmony_ci	{ 0x4a008d20, omap5_l4cfg_clkctrl_regs },
5368c2ecf20Sopenharmony_ci	{ 0x4a008e20, omap5_l3instr_clkctrl_regs },
5378c2ecf20Sopenharmony_ci	{ 0x4a009020, omap5_l4per_clkctrl_regs },
5388c2ecf20Sopenharmony_ci	{ 0x4a0091a0, omap5_l4_secure_clkctrl_regs },
5398c2ecf20Sopenharmony_ci	{ 0x4a009220, omap5_iva_clkctrl_regs },
5408c2ecf20Sopenharmony_ci	{ 0x4a009420, omap5_dss_clkctrl_regs },
5418c2ecf20Sopenharmony_ci	{ 0x4a009520, omap5_gpu_clkctrl_regs },
5428c2ecf20Sopenharmony_ci	{ 0x4a009620, omap5_l3init_clkctrl_regs },
5438c2ecf20Sopenharmony_ci	{ 0x4ae07920, omap5_wkupaon_clkctrl_regs },
5448c2ecf20Sopenharmony_ci	{ 0 },
5458c2ecf20Sopenharmony_ci};
5468c2ecf20Sopenharmony_ci
5478c2ecf20Sopenharmony_cistatic struct ti_dt_clk omap54xx_clks[] = {
5488c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"),
5498c2ecf20Sopenharmony_ci	DT_CLK(NULL, "sys_clkin_ck", "sys_clkin"),
5508c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dmic_gfclk", "abe_cm:0018:24"),
5518c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dmic_sync_mux_ck", "abe_cm:0018:26"),
5528c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dss_32khz_clk", "dss_cm:0000:11"),
5538c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dss_48mhz_clk", "dss_cm:0000:9"),
5548c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dss_dss_clk", "dss_cm:0000:8"),
5558c2ecf20Sopenharmony_ci	DT_CLK(NULL, "dss_sys_clk", "dss_cm:0000:10"),
5568c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio1_dbclk", "wkupaon_cm:0018:8"),
5578c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio2_dbclk", "l4per_cm:0040:8"),
5588c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio3_dbclk", "l4per_cm:0048:8"),
5598c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio4_dbclk", "l4per_cm:0050:8"),
5608c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio5_dbclk", "l4per_cm:0058:8"),
5618c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio6_dbclk", "l4per_cm:0060:8"),
5628c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio7_dbclk", "l4per_cm:00f0:8"),
5638c2ecf20Sopenharmony_ci	DT_CLK(NULL, "gpio8_dbclk", "l4per_cm:00f8:8"),
5648c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp1_gfclk", "abe_cm:0028:24"),
5658c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe_cm:0028:26"),
5668c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp2_gfclk", "abe_cm:0030:24"),
5678c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe_cm:0030:26"),
5688c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp3_gfclk", "abe_cm:0038:24"),
5698c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe_cm:0038:26"),
5708c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mmc1_32khz_clk", "l3init_cm:0008:8"),
5718c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mmc1_fclk", "l3init_cm:0008:25"),
5728c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mmc1_fclk_mux", "l3init_cm:0008:24"),
5738c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mmc2_fclk", "l3init_cm:0010:25"),
5748c2ecf20Sopenharmony_ci	DT_CLK(NULL, "mmc2_fclk_mux", "l3init_cm:0010:24"),
5758c2ecf20Sopenharmony_ci	DT_CLK(NULL, "sata_ref_clk", "l3init_cm:0068:8"),
5768c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer10_gfclk_mux", "l4per_cm:0008:24"),
5778c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer11_gfclk_mux", "l4per_cm:0010:24"),
5788c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer1_gfclk_mux", "wkupaon_cm:0020:24"),
5798c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer2_gfclk_mux", "l4per_cm:0018:24"),
5808c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer3_gfclk_mux", "l4per_cm:0020:24"),
5818c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer4_gfclk_mux", "l4per_cm:0028:24"),
5828c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer5_gfclk_mux", "abe_cm:0048:24"),
5838c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer6_gfclk_mux", "abe_cm:0050:24"),
5848c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer7_gfclk_mux", "abe_cm:0058:24"),
5858c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer8_gfclk_mux", "abe_cm:0060:24"),
5868c2ecf20Sopenharmony_ci	DT_CLK(NULL, "timer9_gfclk_mux", "l4per_cm:0030:24"),
5878c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3init_cm:0038:13"),
5888c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3init_cm:0038:14"),
5898c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic480m_p3_clk", "l3init_cm:0038:7"),
5908c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3init_cm:0038:11"),
5918c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3init_cm:0038:12"),
5928c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_hsic60m_p3_clk", "l3init_cm:0038:6"),
5938c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3init_cm:0038:8"),
5948c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3init_cm:0038:9"),
5958c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3init_cm:0038:10"),
5968c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_otg_ss_refclk960m", "l3init_cm:00d0:8"),
5978c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3init_cm:0048:8"),
5988c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3init_cm:0048:9"),
5998c2ecf20Sopenharmony_ci	DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3init_cm:0048:10"),
6008c2ecf20Sopenharmony_ci	DT_CLK(NULL, "utmi_p1_gfclk", "l3init_cm:0038:24"),
6018c2ecf20Sopenharmony_ci	DT_CLK(NULL, "utmi_p2_gfclk", "l3init_cm:0038:25"),
6028c2ecf20Sopenharmony_ci	{ .node_name = NULL },
6038c2ecf20Sopenharmony_ci};
6048c2ecf20Sopenharmony_ci
6058c2ecf20Sopenharmony_ciint __init omap5xxx_dt_clk_init(void)
6068c2ecf20Sopenharmony_ci{
6078c2ecf20Sopenharmony_ci	int rc;
6088c2ecf20Sopenharmony_ci	struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll;
6098c2ecf20Sopenharmony_ci
6108c2ecf20Sopenharmony_ci	ti_dt_clocks_register(omap54xx_clks);
6118c2ecf20Sopenharmony_ci
6128c2ecf20Sopenharmony_ci	omap2_clk_disable_autoidle_all();
6138c2ecf20Sopenharmony_ci
6148c2ecf20Sopenharmony_ci	ti_clk_add_aliases();
6158c2ecf20Sopenharmony_ci
6168c2ecf20Sopenharmony_ci	abe_dpll_ref = clk_get_sys(NULL, "abe_dpll_clk_mux");
6178c2ecf20Sopenharmony_ci	sys_32k_ck = clk_get_sys(NULL, "sys_32k_ck");
6188c2ecf20Sopenharmony_ci	rc = clk_set_parent(abe_dpll_ref, sys_32k_ck);
6198c2ecf20Sopenharmony_ci	abe_dpll = clk_get_sys(NULL, "dpll_abe_ck");
6208c2ecf20Sopenharmony_ci	if (!rc)
6218c2ecf20Sopenharmony_ci		rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ);
6228c2ecf20Sopenharmony_ci	if (rc)
6238c2ecf20Sopenharmony_ci		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
6248c2ecf20Sopenharmony_ci
6258c2ecf20Sopenharmony_ci	abe_dpll = clk_get_sys(NULL, "dpll_abe_m2x2_ck");
6268c2ecf20Sopenharmony_ci	if (!rc)
6278c2ecf20Sopenharmony_ci		rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ * 2);
6288c2ecf20Sopenharmony_ci	if (rc)
6298c2ecf20Sopenharmony_ci		pr_err("%s: failed to configure ABE m2x2 DPLL!\n", __func__);
6308c2ecf20Sopenharmony_ci
6318c2ecf20Sopenharmony_ci	usb_dpll = clk_get_sys(NULL, "dpll_usb_ck");
6328c2ecf20Sopenharmony_ci	rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ);
6338c2ecf20Sopenharmony_ci	if (rc)
6348c2ecf20Sopenharmony_ci		pr_err("%s: failed to configure USB DPLL!\n", __func__);
6358c2ecf20Sopenharmony_ci
6368c2ecf20Sopenharmony_ci	usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck");
6378c2ecf20Sopenharmony_ci	rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ/2);
6388c2ecf20Sopenharmony_ci	if (rc)
6398c2ecf20Sopenharmony_ci		pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__);
6408c2ecf20Sopenharmony_ci
6418c2ecf20Sopenharmony_ci	return 0;
6428c2ecf20Sopenharmony_ci}
643