xref: /openbmc/linux/drivers/clk/ti/clk-44xx.c (revision cc2d819d)
1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
221876ea5STero Kristo /*
321876ea5STero Kristo  * OMAP4 Clock init
421876ea5STero Kristo  *
521876ea5STero Kristo  * Copyright (C) 2013 Texas Instruments, Inc.
621876ea5STero Kristo  *
721876ea5STero Kristo  * Tero Kristo (t-kristo@ti.com)
821876ea5STero Kristo  */
921876ea5STero Kristo 
1021876ea5STero Kristo #include <linux/kernel.h>
1121876ea5STero Kristo #include <linux/list.h>
12e387088aSStephen Boyd #include <linux/clk.h>
1321876ea5STero Kristo #include <linux/clkdev.h>
1421876ea5STero Kristo #include <linux/clk/ti.h>
151c881b5aSTero Kristo #include <dt-bindings/clock/omap4.h>
1621876ea5STero Kristo 
17a3314e9cSTero Kristo #include "clock.h"
18a3314e9cSTero Kristo 
1921876ea5STero Kristo /*
2021876ea5STero Kristo  * OMAP4 ABE DPLL default frequency. In OMAP4460 TRM version V, section
2121876ea5STero Kristo  * "3.6.3.2.3 CM1_ABE Clock Generator" states that the "DPLL_ABE_X2_CLK
2221876ea5STero Kristo  * must be set to 196.608 MHz" and hence, the DPLL locked frequency is
2321876ea5STero Kristo  * half of this value.
2421876ea5STero Kristo  */
2521876ea5STero Kristo #define OMAP4_DPLL_ABE_DEFFREQ				98304000
2621876ea5STero Kristo 
2721876ea5STero Kristo /*
2821876ea5STero Kristo  * OMAP4 USB DPLL default frequency. In OMAP4430 TRM version V, section
2921876ea5STero Kristo  * "3.6.3.9.5 DPLL_USB Preferred Settings" shows that the preferred
3021876ea5STero Kristo  * locked frequency for the USB DPLL is 960MHz.
3121876ea5STero Kristo  */
3221876ea5STero Kristo #define OMAP4_DPLL_USB_DEFFREQ				960000000
3321876ea5STero Kristo 
341c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_mpuss_clkctrl_regs[] __initconst = {
35fe7020e6STero Kristo 	{ OMAP4_MPU_CLKCTRL, NULL, 0, "dpll_mpu_m2_ck" },
361c881b5aSTero Kristo 	{ 0 },
371c881b5aSTero Kristo };
381c881b5aSTero Kristo 
391c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_tesla_clkctrl_regs[] __initconst = {
40e1799d45SSuman Anna 	{ OMAP4_DSP_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_m4x2_ck" },
411c881b5aSTero Kristo 	{ 0 },
421c881b5aSTero Kristo };
431c881b5aSTero Kristo 
441c881b5aSTero Kristo static const char * const omap4_aess_fclk_parents[] __initconst = {
451c881b5aSTero Kristo 	"abe_clk",
461c881b5aSTero Kristo 	NULL,
471c881b5aSTero Kristo };
481c881b5aSTero Kristo 
491c881b5aSTero Kristo static const struct omap_clkctrl_div_data omap4_aess_fclk_data __initconst = {
501c881b5aSTero Kristo 	.max_div = 2,
511c881b5aSTero Kristo };
521c881b5aSTero Kristo 
531c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_aess_bit_data[] __initconst = {
541c881b5aSTero Kristo 	{ 24, TI_CLK_DIVIDER, omap4_aess_fclk_parents, &omap4_aess_fclk_data },
551c881b5aSTero Kristo 	{ 0 },
561c881b5aSTero Kristo };
571c881b5aSTero Kristo 
581c881b5aSTero Kristo static const char * const omap4_func_dmic_abe_gfclk_parents[] __initconst = {
59255584b1STony Lindgren 	"abe-clkctrl:0018:26",
601c881b5aSTero Kristo 	"pad_clks_ck",
611c881b5aSTero Kristo 	"slimbus_clk",
621c881b5aSTero Kristo 	NULL,
631c881b5aSTero Kristo };
641c881b5aSTero Kristo 
651c881b5aSTero Kristo static const char * const omap4_dmic_sync_mux_ck_parents[] __initconst = {
661c881b5aSTero Kristo 	"abe_24m_fclk",
671c881b5aSTero Kristo 	"syc_clk_div_ck",
681c881b5aSTero Kristo 	"func_24m_clk",
691c881b5aSTero Kristo 	NULL,
701c881b5aSTero Kristo };
711c881b5aSTero Kristo 
721c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_dmic_bit_data[] __initconst = {
731c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_func_dmic_abe_gfclk_parents, NULL },
741c881b5aSTero Kristo 	{ 26, TI_CLK_MUX, omap4_dmic_sync_mux_ck_parents, NULL },
751c881b5aSTero Kristo 	{ 0 },
761c881b5aSTero Kristo };
771c881b5aSTero Kristo 
781c881b5aSTero Kristo static const char * const omap4_func_mcasp_abe_gfclk_parents[] __initconst = {
79255584b1STony Lindgren 	"abe-clkctrl:0020:26",
801c881b5aSTero Kristo 	"pad_clks_ck",
811c881b5aSTero Kristo 	"slimbus_clk",
821c881b5aSTero Kristo 	NULL,
831c881b5aSTero Kristo };
841c881b5aSTero Kristo 
851c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mcasp_bit_data[] __initconst = {
861c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_func_mcasp_abe_gfclk_parents, NULL },
871c881b5aSTero Kristo 	{ 26, TI_CLK_MUX, omap4_dmic_sync_mux_ck_parents, NULL },
881c881b5aSTero Kristo 	{ 0 },
891c881b5aSTero Kristo };
901c881b5aSTero Kristo 
911c881b5aSTero Kristo static const char * const omap4_func_mcbsp1_gfclk_parents[] __initconst = {
92255584b1STony Lindgren 	"abe-clkctrl:0028:26",
931c881b5aSTero Kristo 	"pad_clks_ck",
941c881b5aSTero Kristo 	"slimbus_clk",
951c881b5aSTero Kristo 	NULL,
961c881b5aSTero Kristo };
971c881b5aSTero Kristo 
981c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mcbsp1_bit_data[] __initconst = {
991c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_func_mcbsp1_gfclk_parents, NULL },
1001c881b5aSTero Kristo 	{ 26, TI_CLK_MUX, omap4_dmic_sync_mux_ck_parents, NULL },
1011c881b5aSTero Kristo 	{ 0 },
1021c881b5aSTero Kristo };
1031c881b5aSTero Kristo 
1041c881b5aSTero Kristo static const char * const omap4_func_mcbsp2_gfclk_parents[] __initconst = {
105255584b1STony Lindgren 	"abe-clkctrl:0030:26",
1061c881b5aSTero Kristo 	"pad_clks_ck",
1071c881b5aSTero Kristo 	"slimbus_clk",
1081c881b5aSTero Kristo 	NULL,
1091c881b5aSTero Kristo };
1101c881b5aSTero Kristo 
1111c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mcbsp2_bit_data[] __initconst = {
1121c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_func_mcbsp2_gfclk_parents, NULL },
1131c881b5aSTero Kristo 	{ 26, TI_CLK_MUX, omap4_dmic_sync_mux_ck_parents, NULL },
1141c881b5aSTero Kristo 	{ 0 },
1151c881b5aSTero Kristo };
1161c881b5aSTero Kristo 
1171c881b5aSTero Kristo static const char * const omap4_func_mcbsp3_gfclk_parents[] __initconst = {
118255584b1STony Lindgren 	"abe-clkctrl:0038:26",
1191c881b5aSTero Kristo 	"pad_clks_ck",
1201c881b5aSTero Kristo 	"slimbus_clk",
1211c881b5aSTero Kristo 	NULL,
1221c881b5aSTero Kristo };
1231c881b5aSTero Kristo 
1241c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mcbsp3_bit_data[] __initconst = {
1251c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_func_mcbsp3_gfclk_parents, NULL },
1261c881b5aSTero Kristo 	{ 26, TI_CLK_MUX, omap4_dmic_sync_mux_ck_parents, NULL },
1271c881b5aSTero Kristo 	{ 0 },
1281c881b5aSTero Kristo };
1291c881b5aSTero Kristo 
1301c881b5aSTero Kristo static const char * const omap4_slimbus1_fclk_0_parents[] __initconst = {
1311c881b5aSTero Kristo 	"abe_24m_fclk",
1321c881b5aSTero Kristo 	NULL,
1331c881b5aSTero Kristo };
1341c881b5aSTero Kristo 
1351c881b5aSTero Kristo static const char * const omap4_slimbus1_fclk_1_parents[] __initconst = {
1361c881b5aSTero Kristo 	"func_24m_clk",
1371c881b5aSTero Kristo 	NULL,
1381c881b5aSTero Kristo };
1391c881b5aSTero Kristo 
1401c881b5aSTero Kristo static const char * const omap4_slimbus1_fclk_2_parents[] __initconst = {
1411c881b5aSTero Kristo 	"pad_clks_ck",
1421c881b5aSTero Kristo 	NULL,
1431c881b5aSTero Kristo };
1441c881b5aSTero Kristo 
1451c881b5aSTero Kristo static const char * const omap4_slimbus1_slimbus_clk_parents[] __initconst = {
1461c881b5aSTero Kristo 	"slimbus_clk",
1471c881b5aSTero Kristo 	NULL,
1481c881b5aSTero Kristo };
1491c881b5aSTero Kristo 
1501c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_slimbus1_bit_data[] __initconst = {
1511c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_slimbus1_fclk_0_parents, NULL },
1521c881b5aSTero Kristo 	{ 9, TI_CLK_GATE, omap4_slimbus1_fclk_1_parents, NULL },
1531c881b5aSTero Kristo 	{ 10, TI_CLK_GATE, omap4_slimbus1_fclk_2_parents, NULL },
1541c881b5aSTero Kristo 	{ 11, TI_CLK_GATE, omap4_slimbus1_slimbus_clk_parents, NULL },
1551c881b5aSTero Kristo 	{ 0 },
1561c881b5aSTero Kristo };
1571c881b5aSTero Kristo 
1581c881b5aSTero Kristo static const char * const omap4_timer5_sync_mux_parents[] __initconst = {
1591c881b5aSTero Kristo 	"syc_clk_div_ck",
1601c881b5aSTero Kristo 	"sys_32k_ck",
1611c881b5aSTero Kristo 	NULL,
1621c881b5aSTero Kristo };
1631c881b5aSTero Kristo 
1641c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer5_bit_data[] __initconst = {
1651c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_timer5_sync_mux_parents, NULL },
1661c881b5aSTero Kristo 	{ 0 },
1671c881b5aSTero Kristo };
1681c881b5aSTero Kristo 
1691c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer6_bit_data[] __initconst = {
1701c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_timer5_sync_mux_parents, NULL },
1711c881b5aSTero Kristo 	{ 0 },
1721c881b5aSTero Kristo };
1731c881b5aSTero Kristo 
1741c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer7_bit_data[] __initconst = {
1751c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_timer5_sync_mux_parents, NULL },
1761c881b5aSTero Kristo 	{ 0 },
1771c881b5aSTero Kristo };
1781c881b5aSTero Kristo 
1791c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer8_bit_data[] __initconst = {
1801c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_timer5_sync_mux_parents, NULL },
1811c881b5aSTero Kristo 	{ 0 },
1821c881b5aSTero Kristo };
1831c881b5aSTero Kristo 
1841c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_abe_clkctrl_regs[] __initconst = {
1851c881b5aSTero Kristo 	{ OMAP4_L4_ABE_CLKCTRL, NULL, 0, "ocp_abe_iclk" },
186255584b1STony Lindgren 	{ OMAP4_AESS_CLKCTRL, omap4_aess_bit_data, CLKF_SW_SUP, "abe-clkctrl:0008:24" },
1871c881b5aSTero Kristo 	{ OMAP4_MCPDM_CLKCTRL, NULL, CLKF_SW_SUP, "pad_clks_ck" },
188255584b1STony Lindgren 	{ OMAP4_DMIC_CLKCTRL, omap4_dmic_bit_data, CLKF_SW_SUP, "abe-clkctrl:0018:24" },
189255584b1STony Lindgren 	{ OMAP4_MCASP_CLKCTRL, omap4_mcasp_bit_data, CLKF_SW_SUP, "abe-clkctrl:0020:24" },
190255584b1STony Lindgren 	{ OMAP4_MCBSP1_CLKCTRL, omap4_mcbsp1_bit_data, CLKF_SW_SUP, "abe-clkctrl:0028:24" },
191255584b1STony Lindgren 	{ OMAP4_MCBSP2_CLKCTRL, omap4_mcbsp2_bit_data, CLKF_SW_SUP, "abe-clkctrl:0030:24" },
192255584b1STony Lindgren 	{ OMAP4_MCBSP3_CLKCTRL, omap4_mcbsp3_bit_data, CLKF_SW_SUP, "abe-clkctrl:0038:24" },
193255584b1STony Lindgren 	{ OMAP4_SLIMBUS1_CLKCTRL, omap4_slimbus1_bit_data, CLKF_SW_SUP, "abe-clkctrl:0040:8" },
194255584b1STony Lindgren 	{ OMAP4_TIMER5_CLKCTRL, omap4_timer5_bit_data, CLKF_SW_SUP, "abe-clkctrl:0048:24" },
195255584b1STony Lindgren 	{ OMAP4_TIMER6_CLKCTRL, omap4_timer6_bit_data, CLKF_SW_SUP, "abe-clkctrl:0050:24" },
196255584b1STony Lindgren 	{ OMAP4_TIMER7_CLKCTRL, omap4_timer7_bit_data, CLKF_SW_SUP, "abe-clkctrl:0058:24" },
197255584b1STony Lindgren 	{ OMAP4_TIMER8_CLKCTRL, omap4_timer8_bit_data, CLKF_SW_SUP, "abe-clkctrl:0060:24" },
1981c881b5aSTero Kristo 	{ OMAP4_WD_TIMER3_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
1991c881b5aSTero Kristo 	{ 0 },
2001c881b5aSTero Kristo };
2011c881b5aSTero Kristo 
2021c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l4_ao_clkctrl_regs[] __initconst = {
2031c881b5aSTero Kristo 	{ OMAP4_SMARTREFLEX_MPU_CLKCTRL, NULL, CLKF_SW_SUP, "l4_wkup_clk_mux_ck" },
2041c881b5aSTero Kristo 	{ OMAP4_SMARTREFLEX_IVA_CLKCTRL, NULL, CLKF_SW_SUP, "l4_wkup_clk_mux_ck" },
2051c881b5aSTero Kristo 	{ OMAP4_SMARTREFLEX_CORE_CLKCTRL, NULL, CLKF_SW_SUP, "l4_wkup_clk_mux_ck" },
2061c881b5aSTero Kristo 	{ 0 },
2071c881b5aSTero Kristo };
2081c881b5aSTero Kristo 
2091c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_1_clkctrl_regs[] __initconst = {
2101c881b5aSTero Kristo 	{ OMAP4_L3_MAIN_1_CLKCTRL, NULL, 0, "l3_div_ck" },
2111c881b5aSTero Kristo 	{ 0 },
2121c881b5aSTero Kristo };
2131c881b5aSTero Kristo 
2141c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_2_clkctrl_regs[] __initconst = {
2151c881b5aSTero Kristo 	{ OMAP4_L3_MAIN_2_CLKCTRL, NULL, 0, "l3_div_ck" },
2161c881b5aSTero Kristo 	{ OMAP4_GPMC_CLKCTRL, NULL, CLKF_HW_SUP, "l3_div_ck" },
2171c881b5aSTero Kristo 	{ OMAP4_OCMC_RAM_CLKCTRL, NULL, 0, "l3_div_ck" },
2181c881b5aSTero Kristo 	{ 0 },
2191c881b5aSTero Kristo };
2201c881b5aSTero Kristo 
2211c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_ducati_clkctrl_regs[] __initconst = {
222e1799d45SSuman Anna 	{ OMAP4_IPU_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "ducati_clk_mux_ck" },
2231c881b5aSTero Kristo 	{ 0 },
2241c881b5aSTero Kristo };
2251c881b5aSTero Kristo 
2261c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_dma_clkctrl_regs[] __initconst = {
2271c881b5aSTero Kristo 	{ OMAP4_DMA_SYSTEM_CLKCTRL, NULL, 0, "l3_div_ck" },
2281c881b5aSTero Kristo 	{ 0 },
2291c881b5aSTero Kristo };
2301c881b5aSTero Kristo 
2311c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_emif_clkctrl_regs[] __initconst = {
2321c881b5aSTero Kristo 	{ OMAP4_DMM_CLKCTRL, NULL, 0, "l3_div_ck" },
2331c881b5aSTero Kristo 	{ OMAP4_EMIF1_CLKCTRL, NULL, CLKF_HW_SUP, "ddrphy_ck" },
2341c881b5aSTero Kristo 	{ OMAP4_EMIF2_CLKCTRL, NULL, CLKF_HW_SUP, "ddrphy_ck" },
2351c881b5aSTero Kristo 	{ 0 },
2361c881b5aSTero Kristo };
2371c881b5aSTero Kristo 
2381c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_d2d_clkctrl_regs[] __initconst = {
2391c881b5aSTero Kristo 	{ OMAP4_C2C_CLKCTRL, NULL, 0, "div_core_ck" },
2401c881b5aSTero Kristo 	{ 0 },
2411c881b5aSTero Kristo };
2421c881b5aSTero Kristo 
2431c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l4_cfg_clkctrl_regs[] __initconst = {
2441c881b5aSTero Kristo 	{ OMAP4_L4_CFG_CLKCTRL, NULL, 0, "l4_div_ck" },
2451c881b5aSTero Kristo 	{ OMAP4_SPINLOCK_CLKCTRL, NULL, 0, "l4_div_ck" },
2461c881b5aSTero Kristo 	{ OMAP4_MAILBOX_CLKCTRL, NULL, 0, "l4_div_ck" },
2471c881b5aSTero Kristo 	{ 0 },
2481c881b5aSTero Kristo };
2491c881b5aSTero Kristo 
2501c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_instr_clkctrl_regs[] __initconst = {
2511c881b5aSTero Kristo 	{ OMAP4_L3_MAIN_3_CLKCTRL, NULL, CLKF_HW_SUP, "l3_div_ck" },
2521c881b5aSTero Kristo 	{ OMAP4_L3_INSTR_CLKCTRL, NULL, CLKF_HW_SUP, "l3_div_ck" },
2531c881b5aSTero Kristo 	{ OMAP4_OCP_WP_NOC_CLKCTRL, NULL, CLKF_HW_SUP, "l3_div_ck" },
2541c881b5aSTero Kristo 	{ 0 },
2551c881b5aSTero Kristo };
2561c881b5aSTero Kristo 
2571c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_ivahd_clkctrl_regs[] __initconst = {
2583614fb09STony Lindgren 	{ OMAP4_IVA_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_m5x2_ck" },
2591c881b5aSTero Kristo 	{ OMAP4_SL2IF_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_m5x2_ck" },
2601c881b5aSTero Kristo 	{ 0 },
2611c881b5aSTero Kristo };
2621c881b5aSTero Kristo 
2631c881b5aSTero Kristo static const char * const omap4_iss_ctrlclk_parents[] __initconst = {
2641c881b5aSTero Kristo 	"func_96m_fclk",
2651c881b5aSTero Kristo 	NULL,
2661c881b5aSTero Kristo };
2671c881b5aSTero Kristo 
2681c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_iss_bit_data[] __initconst = {
2691c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_iss_ctrlclk_parents, NULL },
2701c881b5aSTero Kristo 	{ 0 },
2711c881b5aSTero Kristo };
2721c881b5aSTero Kristo 
2731c881b5aSTero Kristo static const char * const omap4_fdif_fck_parents[] __initconst = {
2741c881b5aSTero Kristo 	"dpll_per_m4x2_ck",
2751c881b5aSTero Kristo 	NULL,
2761c881b5aSTero Kristo };
2771c881b5aSTero Kristo 
2781c881b5aSTero Kristo static const struct omap_clkctrl_div_data omap4_fdif_fck_data __initconst = {
2791c881b5aSTero Kristo 	.max_div = 4,
280fe7020e6STero Kristo 	.flags = CLK_DIVIDER_POWER_OF_TWO,
2811c881b5aSTero Kristo };
2821c881b5aSTero Kristo 
2831c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_fdif_bit_data[] __initconst = {
2841c881b5aSTero Kristo 	{ 24, TI_CLK_DIVIDER, omap4_fdif_fck_parents, &omap4_fdif_fck_data },
2851c881b5aSTero Kristo 	{ 0 },
2861c881b5aSTero Kristo };
2871c881b5aSTero Kristo 
2881c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_iss_clkctrl_regs[] __initconst = {
2891c881b5aSTero Kristo 	{ OMAP4_ISS_CLKCTRL, omap4_iss_bit_data, CLKF_SW_SUP, "ducati_clk_mux_ck" },
290255584b1STony Lindgren 	{ OMAP4_FDIF_CLKCTRL, omap4_fdif_bit_data, CLKF_SW_SUP, "iss-clkctrl:0008:24" },
2911c881b5aSTero Kristo 	{ 0 },
2921c881b5aSTero Kristo };
2931c881b5aSTero Kristo 
2941c881b5aSTero Kristo static const char * const omap4_dss_dss_clk_parents[] __initconst = {
2951c881b5aSTero Kristo 	"dpll_per_m5x2_ck",
2961c881b5aSTero Kristo 	NULL,
2971c881b5aSTero Kristo };
2981c881b5aSTero Kristo 
2991c881b5aSTero Kristo static const char * const omap4_dss_48mhz_clk_parents[] __initconst = {
3001c881b5aSTero Kristo 	"func_48mc_fclk",
3011c881b5aSTero Kristo 	NULL,
3021c881b5aSTero Kristo };
3031c881b5aSTero Kristo 
3041c881b5aSTero Kristo static const char * const omap4_dss_sys_clk_parents[] __initconst = {
3051c881b5aSTero Kristo 	"syc_clk_div_ck",
3061c881b5aSTero Kristo 	NULL,
3071c881b5aSTero Kristo };
3081c881b5aSTero Kristo 
3091c881b5aSTero Kristo static const char * const omap4_dss_tv_clk_parents[] __initconst = {
3101c881b5aSTero Kristo 	"extalt_clkin_ck",
3111c881b5aSTero Kristo 	NULL,
3121c881b5aSTero Kristo };
3131c881b5aSTero Kristo 
3141c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_dss_core_bit_data[] __initconst = {
3151c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_dss_dss_clk_parents, NULL },
3161c881b5aSTero Kristo 	{ 9, TI_CLK_GATE, omap4_dss_48mhz_clk_parents, NULL },
3171c881b5aSTero Kristo 	{ 10, TI_CLK_GATE, omap4_dss_sys_clk_parents, NULL },
3181c881b5aSTero Kristo 	{ 11, TI_CLK_GATE, omap4_dss_tv_clk_parents, NULL },
3191c881b5aSTero Kristo 	{ 0 },
3201c881b5aSTero Kristo };
3211c881b5aSTero Kristo 
3221c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_dss_clkctrl_regs[] __initconst = {
323255584b1STony Lindgren 	{ OMAP4_DSS_CORE_CLKCTRL, omap4_dss_core_bit_data, CLKF_SW_SUP, "l3-dss-clkctrl:0000:8" },
3241c881b5aSTero Kristo 	{ 0 },
3251c881b5aSTero Kristo };
3261c881b5aSTero Kristo 
3271c881b5aSTero Kristo static const char * const omap4_sgx_clk_mux_parents[] __initconst = {
3281c881b5aSTero Kristo 	"dpll_core_m7x2_ck",
3291c881b5aSTero Kristo 	"dpll_per_m7x2_ck",
3301c881b5aSTero Kristo 	NULL,
3311c881b5aSTero Kristo };
3321c881b5aSTero Kristo 
3331c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpu_bit_data[] __initconst = {
3341c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_sgx_clk_mux_parents, NULL },
3351c881b5aSTero Kristo 	{ 0 },
3361c881b5aSTero Kristo };
3371c881b5aSTero Kristo 
3381c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_gfx_clkctrl_regs[] __initconst = {
339255584b1STony Lindgren 	{ OMAP4_GPU_CLKCTRL, omap4_gpu_bit_data, CLKF_SW_SUP, "l3-gfx-clkctrl:0000:24" },
3401c881b5aSTero Kristo 	{ 0 },
3411c881b5aSTero Kristo };
3421c881b5aSTero Kristo 
3431c881b5aSTero Kristo static const char * const omap4_hsmmc1_fclk_parents[] __initconst = {
3441c881b5aSTero Kristo 	"func_64m_fclk",
3451c881b5aSTero Kristo 	"func_96m_fclk",
3461c881b5aSTero Kristo 	NULL,
3471c881b5aSTero Kristo };
3481c881b5aSTero Kristo 
3491c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mmc1_bit_data[] __initconst = {
3501c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_hsmmc1_fclk_parents, NULL },
3511c881b5aSTero Kristo 	{ 0 },
3521c881b5aSTero Kristo };
3531c881b5aSTero Kristo 
3541c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mmc2_bit_data[] __initconst = {
3551c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_hsmmc1_fclk_parents, NULL },
3561c881b5aSTero Kristo 	{ 0 },
3571c881b5aSTero Kristo };
3581c881b5aSTero Kristo 
3591c881b5aSTero Kristo static const char * const omap4_hsi_fck_parents[] __initconst = {
3601c881b5aSTero Kristo 	"dpll_per_m2x2_ck",
3611c881b5aSTero Kristo 	NULL,
3621c881b5aSTero Kristo };
3631c881b5aSTero Kristo 
3641c881b5aSTero Kristo static const struct omap_clkctrl_div_data omap4_hsi_fck_data __initconst = {
3651c881b5aSTero Kristo 	.max_div = 4,
366fe7020e6STero Kristo 	.flags = CLK_DIVIDER_POWER_OF_TWO,
3671c881b5aSTero Kristo };
3681c881b5aSTero Kristo 
3691c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_hsi_bit_data[] __initconst = {
3701c881b5aSTero Kristo 	{ 24, TI_CLK_DIVIDER, omap4_hsi_fck_parents, &omap4_hsi_fck_data },
3711c881b5aSTero Kristo 	{ 0 },
3721c881b5aSTero Kristo };
3731c881b5aSTero Kristo 
3741c881b5aSTero Kristo static const char * const omap4_usb_host_hs_utmi_p1_clk_parents[] __initconst = {
375255584b1STony Lindgren 	"l3-init-clkctrl:0038:24",
3761c881b5aSTero Kristo 	NULL,
3771c881b5aSTero Kristo };
3781c881b5aSTero Kristo 
3791c881b5aSTero Kristo static const char * const omap4_usb_host_hs_utmi_p2_clk_parents[] __initconst = {
380255584b1STony Lindgren 	"l3-init-clkctrl:0038:25",
3811c881b5aSTero Kristo 	NULL,
3821c881b5aSTero Kristo };
3831c881b5aSTero Kristo 
3841c881b5aSTero Kristo static const char * const omap4_usb_host_hs_utmi_p3_clk_parents[] __initconst = {
3851c881b5aSTero Kristo 	"init_60m_fclk",
3861c881b5aSTero Kristo 	NULL,
3871c881b5aSTero Kristo };
3881c881b5aSTero Kristo 
3891c881b5aSTero Kristo static const char * const omap4_usb_host_hs_hsic480m_p1_clk_parents[] __initconst = {
3901c881b5aSTero Kristo 	"dpll_usb_m2_ck",
3911c881b5aSTero Kristo 	NULL,
3921c881b5aSTero Kristo };
3931c881b5aSTero Kristo 
3941c881b5aSTero Kristo static const char * const omap4_utmi_p1_gfclk_parents[] __initconst = {
3951c881b5aSTero Kristo 	"init_60m_fclk",
3961c881b5aSTero Kristo 	"xclk60mhsp1_ck",
3971c881b5aSTero Kristo 	NULL,
3981c881b5aSTero Kristo };
3991c881b5aSTero Kristo 
4001c881b5aSTero Kristo static const char * const omap4_utmi_p2_gfclk_parents[] __initconst = {
4011c881b5aSTero Kristo 	"init_60m_fclk",
4021c881b5aSTero Kristo 	"xclk60mhsp2_ck",
4031c881b5aSTero Kristo 	NULL,
4041c881b5aSTero Kristo };
4051c881b5aSTero Kristo 
4061c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_usb_host_hs_bit_data[] __initconst = {
4071c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_usb_host_hs_utmi_p1_clk_parents, NULL },
4081c881b5aSTero Kristo 	{ 9, TI_CLK_GATE, omap4_usb_host_hs_utmi_p2_clk_parents, NULL },
4091c881b5aSTero Kristo 	{ 10, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4101c881b5aSTero Kristo 	{ 11, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4111c881b5aSTero Kristo 	{ 12, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4121c881b5aSTero Kristo 	{ 13, TI_CLK_GATE, omap4_usb_host_hs_hsic480m_p1_clk_parents, NULL },
4131c881b5aSTero Kristo 	{ 14, TI_CLK_GATE, omap4_usb_host_hs_hsic480m_p1_clk_parents, NULL },
4141c881b5aSTero Kristo 	{ 15, TI_CLK_GATE, omap4_dss_48mhz_clk_parents, NULL },
4151c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_utmi_p1_gfclk_parents, NULL },
4161c881b5aSTero Kristo 	{ 25, TI_CLK_MUX, omap4_utmi_p2_gfclk_parents, NULL },
4171c881b5aSTero Kristo 	{ 0 },
4181c881b5aSTero Kristo };
4191c881b5aSTero Kristo 
4201c881b5aSTero Kristo static const char * const omap4_usb_otg_hs_xclk_parents[] __initconst = {
421255584b1STony Lindgren 	"l3-init-clkctrl:0040:24",
4221c881b5aSTero Kristo 	NULL,
4231c881b5aSTero Kristo };
4241c881b5aSTero Kristo 
4251c881b5aSTero Kristo static const char * const omap4_otg_60m_gfclk_parents[] __initconst = {
4261c881b5aSTero Kristo 	"utmi_phy_clkout_ck",
4271c881b5aSTero Kristo 	"xclk60motg_ck",
4281c881b5aSTero Kristo 	NULL,
4291c881b5aSTero Kristo };
4301c881b5aSTero Kristo 
4311c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_usb_otg_hs_bit_data[] __initconst = {
4321c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_usb_otg_hs_xclk_parents, NULL },
4331c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_otg_60m_gfclk_parents, NULL },
4341c881b5aSTero Kristo 	{ 0 },
4351c881b5aSTero Kristo };
4361c881b5aSTero Kristo 
4371c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_usb_tll_hs_bit_data[] __initconst = {
4381c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4391c881b5aSTero Kristo 	{ 9, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4401c881b5aSTero Kristo 	{ 10, TI_CLK_GATE, omap4_usb_host_hs_utmi_p3_clk_parents, NULL },
4411c881b5aSTero Kristo 	{ 0 },
4421c881b5aSTero Kristo };
4431c881b5aSTero Kristo 
4441c881b5aSTero Kristo static const char * const omap4_ocp2scp_usb_phy_phy_48m_parents[] __initconst = {
4451c881b5aSTero Kristo 	"func_48m_fclk",
4461c881b5aSTero Kristo 	NULL,
4471c881b5aSTero Kristo };
4481c881b5aSTero Kristo 
4491c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_ocp2scp_usb_phy_bit_data[] __initconst = {
4501c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_ocp2scp_usb_phy_phy_48m_parents, NULL },
4511c881b5aSTero Kristo 	{ 0 },
4521c881b5aSTero Kristo };
4531c881b5aSTero Kristo 
4541c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l3_init_clkctrl_regs[] __initconst = {
455255584b1STony Lindgren 	{ OMAP4_MMC1_CLKCTRL, omap4_mmc1_bit_data, CLKF_SW_SUP, "l3-init-clkctrl:0008:24" },
456255584b1STony Lindgren 	{ OMAP4_MMC2_CLKCTRL, omap4_mmc2_bit_data, CLKF_SW_SUP, "l3-init-clkctrl:0010:24" },
457255584b1STony Lindgren 	{ OMAP4_HSI_CLKCTRL, omap4_hsi_bit_data, CLKF_HW_SUP, "l3-init-clkctrl:0018:24" },
4581c881b5aSTero Kristo 	{ OMAP4_USB_HOST_HS_CLKCTRL, omap4_usb_host_hs_bit_data, CLKF_SW_SUP, "init_60m_fclk" },
4591c881b5aSTero Kristo 	{ OMAP4_USB_OTG_HS_CLKCTRL, omap4_usb_otg_hs_bit_data, CLKF_HW_SUP, "l3_div_ck" },
4601c881b5aSTero Kristo 	{ OMAP4_USB_TLL_HS_CLKCTRL, omap4_usb_tll_hs_bit_data, CLKF_HW_SUP, "l4_div_ck" },
4611c881b5aSTero Kristo 	{ OMAP4_USB_HOST_FS_CLKCTRL, NULL, CLKF_SW_SUP, "func_48mc_fclk" },
462255584b1STony Lindgren 	{ OMAP4_OCP2SCP_USB_PHY_CLKCTRL, omap4_ocp2scp_usb_phy_bit_data, CLKF_HW_SUP, "l3-init-clkctrl:00c0:8" },
4631c881b5aSTero Kristo 	{ 0 },
4641c881b5aSTero Kristo };
4651c881b5aSTero Kristo 
4661c881b5aSTero Kristo static const char * const omap4_cm2_dm10_mux_parents[] __initconst = {
4671c881b5aSTero Kristo 	"sys_clkin_ck",
4681c881b5aSTero Kristo 	"sys_32k_ck",
4691c881b5aSTero Kristo 	NULL,
4701c881b5aSTero Kristo };
4711c881b5aSTero Kristo 
4721c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer10_bit_data[] __initconst = {
4731c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4741c881b5aSTero Kristo 	{ 0 },
4751c881b5aSTero Kristo };
4761c881b5aSTero Kristo 
4771c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer11_bit_data[] __initconst = {
4781c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4791c881b5aSTero Kristo 	{ 0 },
4801c881b5aSTero Kristo };
4811c881b5aSTero Kristo 
4821c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer2_bit_data[] __initconst = {
4831c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4841c881b5aSTero Kristo 	{ 0 },
4851c881b5aSTero Kristo };
4861c881b5aSTero Kristo 
4871c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer3_bit_data[] __initconst = {
4881c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4891c881b5aSTero Kristo 	{ 0 },
4901c881b5aSTero Kristo };
4911c881b5aSTero Kristo 
4921c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer4_bit_data[] __initconst = {
4931c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4941c881b5aSTero Kristo 	{ 0 },
4951c881b5aSTero Kristo };
4961c881b5aSTero Kristo 
4971c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer9_bit_data[] __initconst = {
4981c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
4991c881b5aSTero Kristo 	{ 0 },
5001c881b5aSTero Kristo };
5011c881b5aSTero Kristo 
5021c881b5aSTero Kristo static const char * const omap4_gpio2_dbclk_parents[] __initconst = {
5031c881b5aSTero Kristo 	"sys_32k_ck",
5041c881b5aSTero Kristo 	NULL,
5051c881b5aSTero Kristo };
5061c881b5aSTero Kristo 
5071c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio2_bit_data[] __initconst = {
5081c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
5091c881b5aSTero Kristo 	{ 0 },
5101c881b5aSTero Kristo };
5111c881b5aSTero Kristo 
5121c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio3_bit_data[] __initconst = {
5131c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
5141c881b5aSTero Kristo 	{ 0 },
5151c881b5aSTero Kristo };
5161c881b5aSTero Kristo 
5171c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio4_bit_data[] __initconst = {
5181c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
5191c881b5aSTero Kristo 	{ 0 },
5201c881b5aSTero Kristo };
5211c881b5aSTero Kristo 
5221c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio5_bit_data[] __initconst = {
5231c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
5241c881b5aSTero Kristo 	{ 0 },
5251c881b5aSTero Kristo };
5261c881b5aSTero Kristo 
5271c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio6_bit_data[] __initconst = {
5281c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
5291c881b5aSTero Kristo 	{ 0 },
5301c881b5aSTero Kristo };
5311c881b5aSTero Kristo 
5321c881b5aSTero Kristo static const char * const omap4_per_mcbsp4_gfclk_parents[] __initconst = {
533255584b1STony Lindgren 	"l4-per-clkctrl:00c0:26",
5341c881b5aSTero Kristo 	"pad_clks_ck",
5351c881b5aSTero Kristo 	NULL,
5361c881b5aSTero Kristo };
5371c881b5aSTero Kristo 
5381c881b5aSTero Kristo static const char * const omap4_mcbsp4_sync_mux_ck_parents[] __initconst = {
5391c881b5aSTero Kristo 	"func_96m_fclk",
5401c881b5aSTero Kristo 	"per_abe_nc_fclk",
5411c881b5aSTero Kristo 	NULL,
5421c881b5aSTero Kristo };
5431c881b5aSTero Kristo 
5441c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_mcbsp4_bit_data[] __initconst = {
5451c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_per_mcbsp4_gfclk_parents, NULL },
546fe7020e6STero Kristo 	{ 26, TI_CLK_MUX, omap4_mcbsp4_sync_mux_ck_parents, NULL },
5471c881b5aSTero Kristo 	{ 0 },
5481c881b5aSTero Kristo };
5491c881b5aSTero Kristo 
5501c881b5aSTero Kristo static const char * const omap4_slimbus2_fclk_0_parents[] __initconst = {
5511c881b5aSTero Kristo 	"func_24mc_fclk",
5521c881b5aSTero Kristo 	NULL,
5531c881b5aSTero Kristo };
5541c881b5aSTero Kristo 
5551c881b5aSTero Kristo static const char * const omap4_slimbus2_fclk_1_parents[] __initconst = {
5561c881b5aSTero Kristo 	"per_abe_24m_fclk",
5571c881b5aSTero Kristo 	NULL,
5581c881b5aSTero Kristo };
5591c881b5aSTero Kristo 
5601c881b5aSTero Kristo static const char * const omap4_slimbus2_slimbus_clk_parents[] __initconst = {
5611c881b5aSTero Kristo 	"pad_slimbus_core_clks_ck",
5621c881b5aSTero Kristo 	NULL,
5631c881b5aSTero Kristo };
5641c881b5aSTero Kristo 
5651c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_slimbus2_bit_data[] __initconst = {
5661c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_slimbus2_fclk_0_parents, NULL },
5671c881b5aSTero Kristo 	{ 9, TI_CLK_GATE, omap4_slimbus2_fclk_1_parents, NULL },
5681c881b5aSTero Kristo 	{ 10, TI_CLK_GATE, omap4_slimbus2_slimbus_clk_parents, NULL },
5691c881b5aSTero Kristo 	{ 0 },
5701c881b5aSTero Kristo };
5711c881b5aSTero Kristo 
5721c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l4_per_clkctrl_regs[] __initconst = {
573255584b1STony Lindgren 	{ OMAP4_TIMER10_CLKCTRL, omap4_timer10_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0008:24" },
574255584b1STony Lindgren 	{ OMAP4_TIMER11_CLKCTRL, omap4_timer11_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0010:24" },
575255584b1STony Lindgren 	{ OMAP4_TIMER2_CLKCTRL, omap4_timer2_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0018:24" },
576255584b1STony Lindgren 	{ OMAP4_TIMER3_CLKCTRL, omap4_timer3_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0020:24" },
577255584b1STony Lindgren 	{ OMAP4_TIMER4_CLKCTRL, omap4_timer4_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0028:24" },
578255584b1STony Lindgren 	{ OMAP4_TIMER9_CLKCTRL, omap4_timer9_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0030:24" },
5791c881b5aSTero Kristo 	{ OMAP4_ELM_CLKCTRL, NULL, 0, "l4_div_ck" },
5801c881b5aSTero Kristo 	{ OMAP4_GPIO2_CLKCTRL, omap4_gpio2_bit_data, CLKF_HW_SUP, "l4_div_ck" },
5811c881b5aSTero Kristo 	{ OMAP4_GPIO3_CLKCTRL, omap4_gpio3_bit_data, CLKF_HW_SUP, "l4_div_ck" },
5821c881b5aSTero Kristo 	{ OMAP4_GPIO4_CLKCTRL, omap4_gpio4_bit_data, CLKF_HW_SUP, "l4_div_ck" },
5831c881b5aSTero Kristo 	{ OMAP4_GPIO5_CLKCTRL, omap4_gpio5_bit_data, CLKF_HW_SUP, "l4_div_ck" },
5841c881b5aSTero Kristo 	{ OMAP4_GPIO6_CLKCTRL, omap4_gpio6_bit_data, CLKF_HW_SUP, "l4_div_ck" },
5851c881b5aSTero Kristo 	{ OMAP4_HDQ1W_CLKCTRL, NULL, CLKF_SW_SUP, "func_12m_fclk" },
5861c881b5aSTero Kristo 	{ OMAP4_I2C1_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
5871c881b5aSTero Kristo 	{ OMAP4_I2C2_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
5881c881b5aSTero Kristo 	{ OMAP4_I2C3_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
5891c881b5aSTero Kristo 	{ OMAP4_I2C4_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
5901c881b5aSTero Kristo 	{ OMAP4_L4_PER_CLKCTRL, NULL, 0, "l4_div_ck" },
591255584b1STony Lindgren 	{ OMAP4_MCBSP4_CLKCTRL, omap4_mcbsp4_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:00c0:24" },
5921c881b5aSTero Kristo 	{ OMAP4_MCSPI1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
5931c881b5aSTero Kristo 	{ OMAP4_MCSPI2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
5941c881b5aSTero Kristo 	{ OMAP4_MCSPI3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
5951c881b5aSTero Kristo 	{ OMAP4_MCSPI4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
5961c881b5aSTero Kristo 	{ OMAP4_MMC3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
5971c881b5aSTero Kristo 	{ OMAP4_MMC4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
598255584b1STony Lindgren 	{ OMAP4_SLIMBUS2_CLKCTRL, omap4_slimbus2_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0118:8" },
5991c881b5aSTero Kristo 	{ OMAP4_UART1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
6001c881b5aSTero Kristo 	{ OMAP4_UART2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
6011c881b5aSTero Kristo 	{ OMAP4_UART3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
6021c881b5aSTero Kristo 	{ OMAP4_UART4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
6031c881b5aSTero Kristo 	{ OMAP4_MMC5_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
6041c881b5aSTero Kristo 	{ 0 },
6051c881b5aSTero Kristo };
6061c881b5aSTero Kristo 
607cfcbc2dbSTony Lindgren static const struct
608cfcbc2dbSTony Lindgren omap_clkctrl_reg_data omap4_l4_secure_clkctrl_regs[] __initconst = {
60974c0ac10STero Kristo 	{ OMAP4_AES1_CLKCTRL, NULL, CLKF_SW_SUP, "l3_div_ck" },
61074c0ac10STero Kristo 	{ OMAP4_AES2_CLKCTRL, NULL, CLKF_SW_SUP, "l3_div_ck" },
61174c0ac10STero Kristo 	{ OMAP4_DES3DES_CLKCTRL, NULL, CLKF_SW_SUP, "l4_div_ck" },
61274c0ac10STero Kristo 	{ OMAP4_PKA_CLKCTRL, NULL, CLKF_SW_SUP, "l4_div_ck" },
61374c0ac10STero Kristo 	{ OMAP4_RNG_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l4_div_ck" },
61474c0ac10STero Kristo 	{ OMAP4_SHA2MD5_CLKCTRL, NULL, CLKF_SW_SUP, "l3_div_ck" },
61574c0ac10STero Kristo 	{ OMAP4_CRYPTODMA_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l3_div_ck" },
616cfcbc2dbSTony Lindgren 	{ 0 },
617cfcbc2dbSTony Lindgren };
618cfcbc2dbSTony Lindgren 
6191c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_gpio1_bit_data[] __initconst = {
6201c881b5aSTero Kristo 	{ 8, TI_CLK_GATE, omap4_gpio2_dbclk_parents, NULL },
6211c881b5aSTero Kristo 	{ 0 },
6221c881b5aSTero Kristo };
6231c881b5aSTero Kristo 
6241c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_timer1_bit_data[] __initconst = {
6251c881b5aSTero Kristo 	{ 24, TI_CLK_MUX, omap4_cm2_dm10_mux_parents, NULL },
6261c881b5aSTero Kristo 	{ 0 },
6271c881b5aSTero Kristo };
6281c881b5aSTero Kristo 
6291c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_l4_wkup_clkctrl_regs[] __initconst = {
6301c881b5aSTero Kristo 	{ OMAP4_L4_WKUP_CLKCTRL, NULL, 0, "l4_wkup_clk_mux_ck" },
6311c881b5aSTero Kristo 	{ OMAP4_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
6321c881b5aSTero Kristo 	{ OMAP4_GPIO1_CLKCTRL, omap4_gpio1_bit_data, CLKF_HW_SUP, "l4_wkup_clk_mux_ck" },
633255584b1STony Lindgren 	{ OMAP4_TIMER1_CLKCTRL, omap4_timer1_bit_data, CLKF_SW_SUP, "l4-wkup-clkctrl:0020:24" },
6341c881b5aSTero Kristo 	{ OMAP4_COUNTER_32K_CLKCTRL, NULL, 0, "sys_32k_ck" },
6351c881b5aSTero Kristo 	{ OMAP4_KBD_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
6361c881b5aSTero Kristo 	{ 0 },
6371c881b5aSTero Kristo };
6381c881b5aSTero Kristo 
6391c881b5aSTero Kristo static const char * const omap4_pmd_stm_clock_mux_ck_parents[] __initconst = {
6401c881b5aSTero Kristo 	"sys_clkin_ck",
6411c881b5aSTero Kristo 	"dpll_core_m6x2_ck",
6421c881b5aSTero Kristo 	"tie_low_clock_ck",
6431c881b5aSTero Kristo 	NULL,
6441c881b5aSTero Kristo };
6451c881b5aSTero Kristo 
6461c881b5aSTero Kristo static const char * const omap4_trace_clk_div_div_ck_parents[] __initconst = {
647255584b1STony Lindgren 	"emu-sys-clkctrl:0000:22",
6481c881b5aSTero Kristo 	NULL,
6491c881b5aSTero Kristo };
6501c881b5aSTero Kristo 
6511c881b5aSTero Kristo static const int omap4_trace_clk_div_div_ck_divs[] __initconst = {
6521c881b5aSTero Kristo 	0,
6531c881b5aSTero Kristo 	1,
6541c881b5aSTero Kristo 	2,
6551c881b5aSTero Kristo 	0,
6561c881b5aSTero Kristo 	4,
6571c881b5aSTero Kristo 	-1,
6581c881b5aSTero Kristo };
6591c881b5aSTero Kristo 
6601c881b5aSTero Kristo static const struct omap_clkctrl_div_data omap4_trace_clk_div_div_ck_data __initconst = {
6611c881b5aSTero Kristo 	.dividers = omap4_trace_clk_div_div_ck_divs,
6621c881b5aSTero Kristo };
6631c881b5aSTero Kristo 
6641c881b5aSTero Kristo static const char * const omap4_stm_clk_div_ck_parents[] __initconst = {
665255584b1STony Lindgren 	"emu-sys-clkctrl:0000:20",
6661c881b5aSTero Kristo 	NULL,
6671c881b5aSTero Kristo };
6681c881b5aSTero Kristo 
6691c881b5aSTero Kristo static const struct omap_clkctrl_div_data omap4_stm_clk_div_ck_data __initconst = {
6701c881b5aSTero Kristo 	.max_div = 64,
671fe7020e6STero Kristo 	.flags = CLK_DIVIDER_POWER_OF_TWO,
6721c881b5aSTero Kristo };
6731c881b5aSTero Kristo 
6741c881b5aSTero Kristo static const struct omap_clkctrl_bit_data omap4_debugss_bit_data[] __initconst = {
6751c881b5aSTero Kristo 	{ 20, TI_CLK_MUX, omap4_pmd_stm_clock_mux_ck_parents, NULL },
6761c881b5aSTero Kristo 	{ 22, TI_CLK_MUX, omap4_pmd_stm_clock_mux_ck_parents, NULL },
6771c881b5aSTero Kristo 	{ 24, TI_CLK_DIVIDER, omap4_trace_clk_div_div_ck_parents, &omap4_trace_clk_div_div_ck_data },
6781c881b5aSTero Kristo 	{ 27, TI_CLK_DIVIDER, omap4_stm_clk_div_ck_parents, &omap4_stm_clk_div_ck_data },
6791c881b5aSTero Kristo 	{ 0 },
6801c881b5aSTero Kristo };
6811c881b5aSTero Kristo 
6821c881b5aSTero Kristo static const struct omap_clkctrl_reg_data omap4_emu_sys_clkctrl_regs[] __initconst = {
6831c881b5aSTero Kristo 	{ OMAP4_DEBUGSS_CLKCTRL, omap4_debugss_bit_data, 0, "trace_clk_div_ck" },
6841c881b5aSTero Kristo 	{ 0 },
6851c881b5aSTero Kristo };
6861c881b5aSTero Kristo 
6871c881b5aSTero Kristo const struct omap_clkctrl_data omap4_clkctrl_data[] __initconst = {
6881c881b5aSTero Kristo 	{ 0x4a004320, omap4_mpuss_clkctrl_regs },
6891c881b5aSTero Kristo 	{ 0x4a004420, omap4_tesla_clkctrl_regs },
6901c881b5aSTero Kristo 	{ 0x4a004520, omap4_abe_clkctrl_regs },
6911c881b5aSTero Kristo 	{ 0x4a008620, omap4_l4_ao_clkctrl_regs },
6921c881b5aSTero Kristo 	{ 0x4a008720, omap4_l3_1_clkctrl_regs },
6931c881b5aSTero Kristo 	{ 0x4a008820, omap4_l3_2_clkctrl_regs },
6941c881b5aSTero Kristo 	{ 0x4a008920, omap4_ducati_clkctrl_regs },
6951c881b5aSTero Kristo 	{ 0x4a008a20, omap4_l3_dma_clkctrl_regs },
6961c881b5aSTero Kristo 	{ 0x4a008b20, omap4_l3_emif_clkctrl_regs },
6971c881b5aSTero Kristo 	{ 0x4a008c20, omap4_d2d_clkctrl_regs },
6981c881b5aSTero Kristo 	{ 0x4a008d20, omap4_l4_cfg_clkctrl_regs },
6991c881b5aSTero Kristo 	{ 0x4a008e20, omap4_l3_instr_clkctrl_regs },
7001c881b5aSTero Kristo 	{ 0x4a008f20, omap4_ivahd_clkctrl_regs },
7011c881b5aSTero Kristo 	{ 0x4a009020, omap4_iss_clkctrl_regs },
7021c881b5aSTero Kristo 	{ 0x4a009120, omap4_l3_dss_clkctrl_regs },
7031c881b5aSTero Kristo 	{ 0x4a009220, omap4_l3_gfx_clkctrl_regs },
7041c881b5aSTero Kristo 	{ 0x4a009320, omap4_l3_init_clkctrl_regs },
7051c881b5aSTero Kristo 	{ 0x4a009420, omap4_l4_per_clkctrl_regs },
706cfcbc2dbSTony Lindgren 	{ 0x4a0095a0, omap4_l4_secure_clkctrl_regs },
7071c881b5aSTero Kristo 	{ 0x4a307820, omap4_l4_wkup_clkctrl_regs },
7081c881b5aSTero Kristo 	{ 0x4a307a20, omap4_emu_sys_clkctrl_regs },
7091c881b5aSTero Kristo 	{ 0 },
7101c881b5aSTero Kristo };
7111c881b5aSTero Kristo 
71221876ea5STero Kristo static struct ti_dt_clk omap44xx_clks[] = {
71321876ea5STero Kristo 	DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"),
714fe7020e6STero Kristo 	/*
715fe7020e6STero Kristo 	 * XXX: All the clock aliases below are only needed for legacy
716fe7020e6STero Kristo 	 * hwmod support. Once hwmod is removed, these can be removed
717fe7020e6STero Kristo 	 * also.
718fe7020e6STero Kristo 	 */
719255584b1STony Lindgren 	DT_CLK(NULL, "aess_fclk", "abe-clkctrl:0008:24"),
720255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm10_mux", "l4-per-clkctrl:0008:24"),
721255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm11_mux", "l4-per-clkctrl:0010:24"),
722255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm2_mux", "l4-per-clkctrl:0018:24"),
723255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm3_mux", "l4-per-clkctrl:0020:24"),
724255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm4_mux", "l4-per-clkctrl:0028:24"),
725255584b1STony Lindgren 	DT_CLK(NULL, "cm2_dm9_mux", "l4-per-clkctrl:0030:24"),
726255584b1STony Lindgren 	DT_CLK(NULL, "dmic_sync_mux_ck", "abe-clkctrl:0018:26"),
727255584b1STony Lindgren 	DT_CLK(NULL, "dmt1_clk_mux", "l4-wkup-clkctrl:0020:24"),
728255584b1STony Lindgren 	DT_CLK(NULL, "dss_48mhz_clk", "l3-dss-clkctrl:0000:9"),
729255584b1STony Lindgren 	DT_CLK(NULL, "dss_dss_clk", "l3-dss-clkctrl:0000:8"),
730255584b1STony Lindgren 	DT_CLK(NULL, "dss_sys_clk", "l3-dss-clkctrl:0000:10"),
731255584b1STony Lindgren 	DT_CLK(NULL, "dss_tv_clk", "l3-dss-clkctrl:0000:11"),
732255584b1STony Lindgren 	DT_CLK(NULL, "fdif_fck", "iss-clkctrl:0008:24"),
733255584b1STony Lindgren 	DT_CLK(NULL, "func_dmic_abe_gfclk", "abe-clkctrl:0018:24"),
734255584b1STony Lindgren 	DT_CLK(NULL, "func_mcasp_abe_gfclk", "abe-clkctrl:0020:24"),
735255584b1STony Lindgren 	DT_CLK(NULL, "func_mcbsp1_gfclk", "abe-clkctrl:0028:24"),
736255584b1STony Lindgren 	DT_CLK(NULL, "func_mcbsp2_gfclk", "abe-clkctrl:0030:24"),
737255584b1STony Lindgren 	DT_CLK(NULL, "func_mcbsp3_gfclk", "abe-clkctrl:0038:24"),
738255584b1STony Lindgren 	DT_CLK(NULL, "gpio1_dbclk", "l4-wkup-clkctrl:0018:8"),
739255584b1STony Lindgren 	DT_CLK(NULL, "gpio2_dbclk", "l4-per-clkctrl:0040:8"),
740255584b1STony Lindgren 	DT_CLK(NULL, "gpio3_dbclk", "l4-per-clkctrl:0048:8"),
741255584b1STony Lindgren 	DT_CLK(NULL, "gpio4_dbclk", "l4-per-clkctrl:0050:8"),
742255584b1STony Lindgren 	DT_CLK(NULL, "gpio5_dbclk", "l4-per-clkctrl:0058:8"),
743255584b1STony Lindgren 	DT_CLK(NULL, "gpio6_dbclk", "l4-per-clkctrl:0060:8"),
744255584b1STony Lindgren 	DT_CLK(NULL, "hsi_fck", "l3-init-clkctrl:0018:24"),
745255584b1STony Lindgren 	DT_CLK(NULL, "hsmmc1_fclk", "l3-init-clkctrl:0008:24"),
746255584b1STony Lindgren 	DT_CLK(NULL, "hsmmc2_fclk", "l3-init-clkctrl:0010:24"),
747255584b1STony Lindgren 	DT_CLK(NULL, "iss_ctrlclk", "iss-clkctrl:0000:8"),
748255584b1STony Lindgren 	DT_CLK(NULL, "mcasp_sync_mux_ck", "abe-clkctrl:0020:26"),
749255584b1STony Lindgren 	DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
750255584b1STony Lindgren 	DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
751255584b1STony Lindgren 	DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
752*cc2d819dSTony Lindgren 	DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"),
753*cc2d819dSTony Lindgren 	DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"),
754*cc2d819dSTony Lindgren 	DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"),
755255584b1STony Lindgren 	DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4-per-clkctrl:00c0:26"),
756*cc2d819dSTony Lindgren 	DT_CLK("48096000.mcbsp", "prcm_fck", "l4-per-clkctrl:00c0:26"),
757255584b1STony Lindgren 	DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3-init-clkctrl:00c0:8"),
758255584b1STony Lindgren 	DT_CLK(NULL, "otg_60m_gfclk", "l3-init-clkctrl:0040:24"),
759*cc2d819dSTony Lindgren 	DT_CLK(NULL, "pad_fck", "pad_clks_ck"),
760255584b1STony Lindgren 	DT_CLK(NULL, "per_mcbsp4_gfclk", "l4-per-clkctrl:00c0:24"),
761255584b1STony Lindgren 	DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu-sys-clkctrl:0000:20"),
762255584b1STony Lindgren 	DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"),
763255584b1STony Lindgren 	DT_CLK(NULL, "sgx_clk_mux", "l3-gfx-clkctrl:0000:24"),
764255584b1STony Lindgren 	DT_CLK(NULL, "slimbus1_fclk_0", "abe-clkctrl:0040:8"),
765255584b1STony Lindgren 	DT_CLK(NULL, "slimbus1_fclk_1", "abe-clkctrl:0040:9"),
766255584b1STony Lindgren 	DT_CLK(NULL, "slimbus1_fclk_2", "abe-clkctrl:0040:10"),
767255584b1STony Lindgren 	DT_CLK(NULL, "slimbus1_slimbus_clk", "abe-clkctrl:0040:11"),
768255584b1STony Lindgren 	DT_CLK(NULL, "slimbus2_fclk_0", "l4-per-clkctrl:0118:8"),
769255584b1STony Lindgren 	DT_CLK(NULL, "slimbus2_fclk_1", "l4-per-clkctrl:0118:9"),
770255584b1STony Lindgren 	DT_CLK(NULL, "slimbus2_slimbus_clk", "l4-per-clkctrl:0118:10"),
771255584b1STony Lindgren 	DT_CLK(NULL, "stm_clk_div_ck", "emu-sys-clkctrl:0000:27"),
772255584b1STony Lindgren 	DT_CLK(NULL, "timer5_sync_mux", "abe-clkctrl:0048:24"),
773255584b1STony Lindgren 	DT_CLK(NULL, "timer6_sync_mux", "abe-clkctrl:0050:24"),
774255584b1STony Lindgren 	DT_CLK(NULL, "timer7_sync_mux", "abe-clkctrl:0058:24"),
775255584b1STony Lindgren 	DT_CLK(NULL, "timer8_sync_mux", "abe-clkctrl:0060:24"),
776255584b1STony Lindgren 	DT_CLK(NULL, "trace_clk_div_div_ck", "emu-sys-clkctrl:0000:24"),
777255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_func48mclk", "l3-init-clkctrl:0038:15"),
778255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3-init-clkctrl:0038:13"),
779255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3-init-clkctrl:0038:14"),
780255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3-init-clkctrl:0038:11"),
781255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3-init-clkctrl:0038:12"),
782255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3-init-clkctrl:0038:8"),
783255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3-init-clkctrl:0038:9"),
784255584b1STony Lindgren 	DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3_init-clkctrl:0038:10"),
785255584b1STony Lindgren 	DT_CLK(NULL, "usb_otg_hs_xclk", "l3-init-clkctrl:0040:8"),
786255584b1STony Lindgren 	DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3-init-clkctrl:0048:8"),
787255584b1STony Lindgren 	DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3-init-clkctrl:0048:9"),
788255584b1STony Lindgren 	DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3-init-clkctrl:0048:10"),
789255584b1STony Lindgren 	DT_CLK(NULL, "utmi_p1_gfclk", "l3-init-clkctrl:0038:24"),
790255584b1STony Lindgren 	DT_CLK(NULL, "utmi_p2_gfclk", "l3-init-clkctrl:0038:25"),
79121876ea5STero Kristo 	{ .node_name = NULL },
79221876ea5STero Kristo };
79321876ea5STero Kristo 
omap4xxx_dt_clk_init(void)79421876ea5STero Kristo int __init omap4xxx_dt_clk_init(void)
79521876ea5STero Kristo {
79621876ea5STero Kristo 	int rc;
79721876ea5STero Kristo 	struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll;
79821876ea5STero Kristo 
79921876ea5STero Kristo 	ti_dt_clocks_register(omap44xx_clks);
80021876ea5STero Kristo 
80121876ea5STero Kristo 	omap2_clk_disable_autoidle_all();
80221876ea5STero Kristo 
803b6312da5STero Kristo 	ti_clk_add_aliases();
804b6312da5STero Kristo 
80521876ea5STero Kristo 	/*
80621876ea5STero Kristo 	 * Lock USB DPLL on OMAP4 devices so that the L3INIT power
80721876ea5STero Kristo 	 * domain can transition to retention state when not in use.
80821876ea5STero Kristo 	 */
80921876ea5STero Kristo 	usb_dpll = clk_get_sys(NULL, "dpll_usb_ck");
81021876ea5STero Kristo 	rc = clk_set_rate(usb_dpll, OMAP4_DPLL_USB_DEFFREQ);
81121876ea5STero Kristo 	if (rc)
81221876ea5STero Kristo 		pr_err("%s: failed to configure USB DPLL!\n", __func__);
81321876ea5STero Kristo 
81421876ea5STero Kristo 	/*
81521876ea5STero Kristo 	 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
81621876ea5STero Kristo 	 * state when turning the ABE clock domain. Workaround this by
81721876ea5STero Kristo 	 * locking the ABE DPLL on boot.
81821876ea5STero Kristo 	 * Lock the ABE DPLL in any case to avoid issues with audio.
81921876ea5STero Kristo 	 */
82021876ea5STero Kristo 	abe_dpll_ref = clk_get_sys(NULL, "abe_dpll_refclk_mux_ck");
82121876ea5STero Kristo 	sys_32k_ck = clk_get_sys(NULL, "sys_32k_ck");
82221876ea5STero Kristo 	rc = clk_set_parent(abe_dpll_ref, sys_32k_ck);
82321876ea5STero Kristo 	abe_dpll = clk_get_sys(NULL, "dpll_abe_ck");
82421876ea5STero Kristo 	if (!rc)
82521876ea5STero Kristo 		rc = clk_set_rate(abe_dpll, OMAP4_DPLL_ABE_DEFFREQ);
82621876ea5STero Kristo 	if (rc)
82721876ea5STero Kristo 		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
82821876ea5STero Kristo 
82921876ea5STero Kristo 	return 0;
83021876ea5STero Kristo }
831