xref: /linux/drivers/clk/ti/clk-54xx.c (revision f968045fb92e5408c25f1b4eae21bab4882e88e8)
1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
252b14728STero Kristo /*
352b14728STero Kristo  * OMAP5 Clock init
452b14728STero Kristo  *
552b14728STero Kristo  * Copyright (C) 2013 Texas Instruments, Inc.
652b14728STero Kristo  *
752b14728STero Kristo  * Tero Kristo (t-kristo@ti.com)
852b14728STero Kristo  */
952b14728STero Kristo 
1052b14728STero Kristo #include <linux/kernel.h>
1152b14728STero Kristo #include <linux/list.h>
12e387088aSStephen Boyd #include <linux/clk.h>
1352b14728STero Kristo #include <linux/clkdev.h>
1452b14728STero Kristo #include <linux/io.h>
1552b14728STero Kristo #include <linux/clk/ti.h>
160ad902f6STero Kristo #include <dt-bindings/clock/omap5.h>
1752b14728STero Kristo 
18a3314e9cSTero Kristo #include "clock.h"
19a3314e9cSTero Kristo 
2052b14728STero Kristo #define OMAP5_DPLL_ABE_DEFFREQ				98304000
2152b14728STero Kristo 
2262125a46SRoger Quadros /*
2362125a46SRoger Quadros  * OMAP543x TRM, section "3.6.3.9.5 DPLL_USB Preferred Settings"
2462125a46SRoger Quadros  * states it must be at 960MHz
2562125a46SRoger Quadros  */
2662125a46SRoger Quadros #define OMAP5_DPLL_USB_DEFFREQ				960000000
2762125a46SRoger Quadros 
280ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_mpu_clkctrl_regs[] __initconst = {
290ad902f6STero Kristo 	{ OMAP5_MPU_CLKCTRL, NULL, 0, "dpll_mpu_m2_ck" },
300ad902f6STero Kristo 	{ 0 },
310ad902f6STero Kristo };
320ad902f6STero Kristo 
330ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_dsp_clkctrl_regs[] __initconst = {
3495a62bf2SSuman Anna 	{ OMAP5_MMU_DSP_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_h11x2_ck" },
350ad902f6STero Kristo 	{ 0 },
360ad902f6STero Kristo };
370ad902f6STero Kristo 
38364975eeSTony Lindgren static const char * const omap5_aess_fclk_parents[] __initconst = {
39364975eeSTony Lindgren 	"abe_clk",
40364975eeSTony Lindgren 	NULL,
41364975eeSTony Lindgren };
42364975eeSTony Lindgren 
43364975eeSTony Lindgren static const struct omap_clkctrl_div_data omap5_aess_fclk_data __initconst = {
44364975eeSTony Lindgren 	.max_div = 2,
45364975eeSTony Lindgren };
46364975eeSTony Lindgren 
47364975eeSTony Lindgren static const struct omap_clkctrl_bit_data omap5_aess_bit_data[] __initconst = {
48364975eeSTony Lindgren 	{ 24, TI_CLK_DIVIDER, omap5_aess_fclk_parents, &omap5_aess_fclk_data },
49364975eeSTony Lindgren 	{ 0 },
50364975eeSTony Lindgren };
51364975eeSTony Lindgren 
520ad902f6STero Kristo static const char * const omap5_dmic_gfclk_parents[] __initconst = {
530ad902f6STero Kristo 	"abe_cm:clk:0018:26",
540ad902f6STero Kristo 	"pad_clks_ck",
550ad902f6STero Kristo 	"slimbus_clk",
560ad902f6STero Kristo 	NULL,
570ad902f6STero Kristo };
580ad902f6STero Kristo 
590ad902f6STero Kristo static const char * const omap5_dmic_sync_mux_ck_parents[] __initconst = {
600ad902f6STero Kristo 	"abe_24m_fclk",
610ad902f6STero Kristo 	"dss_syc_gfclk_div",
620ad902f6STero Kristo 	"func_24m_clk",
630ad902f6STero Kristo 	NULL,
640ad902f6STero Kristo };
650ad902f6STero Kristo 
660ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_dmic_bit_data[] __initconst = {
670ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_dmic_gfclk_parents, NULL },
680ad902f6STero Kristo 	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
690ad902f6STero Kristo 	{ 0 },
700ad902f6STero Kristo };
710ad902f6STero Kristo 
720ad902f6STero Kristo static const char * const omap5_mcbsp1_gfclk_parents[] __initconst = {
730ad902f6STero Kristo 	"abe_cm:clk:0028:26",
740ad902f6STero Kristo 	"pad_clks_ck",
750ad902f6STero Kristo 	"slimbus_clk",
760ad902f6STero Kristo 	NULL,
770ad902f6STero Kristo };
780ad902f6STero Kristo 
790ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_mcbsp1_bit_data[] __initconst = {
800ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_mcbsp1_gfclk_parents, NULL },
810ad902f6STero Kristo 	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
820ad902f6STero Kristo 	{ 0 },
830ad902f6STero Kristo };
840ad902f6STero Kristo 
850ad902f6STero Kristo static const char * const omap5_mcbsp2_gfclk_parents[] __initconst = {
860ad902f6STero Kristo 	"abe_cm:clk:0030:26",
870ad902f6STero Kristo 	"pad_clks_ck",
880ad902f6STero Kristo 	"slimbus_clk",
890ad902f6STero Kristo 	NULL,
900ad902f6STero Kristo };
910ad902f6STero Kristo 
920ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_mcbsp2_bit_data[] __initconst = {
930ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_mcbsp2_gfclk_parents, NULL },
940ad902f6STero Kristo 	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
950ad902f6STero Kristo 	{ 0 },
960ad902f6STero Kristo };
970ad902f6STero Kristo 
980ad902f6STero Kristo static const char * const omap5_mcbsp3_gfclk_parents[] __initconst = {
990ad902f6STero Kristo 	"abe_cm:clk:0038:26",
1000ad902f6STero Kristo 	"pad_clks_ck",
1010ad902f6STero Kristo 	"slimbus_clk",
1020ad902f6STero Kristo 	NULL,
1030ad902f6STero Kristo };
1040ad902f6STero Kristo 
1050ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_mcbsp3_bit_data[] __initconst = {
1060ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_mcbsp3_gfclk_parents, NULL },
1070ad902f6STero Kristo 	{ 26, TI_CLK_MUX, omap5_dmic_sync_mux_ck_parents, NULL },
1080ad902f6STero Kristo 	{ 0 },
1090ad902f6STero Kristo };
1100ad902f6STero Kristo 
1110ad902f6STero Kristo static const char * const omap5_timer5_gfclk_mux_parents[] __initconst = {
1120ad902f6STero Kristo 	"dss_syc_gfclk_div",
1130ad902f6STero Kristo 	"sys_32k_ck",
1140ad902f6STero Kristo 	NULL,
1150ad902f6STero Kristo };
1160ad902f6STero Kristo 
1170ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer5_bit_data[] __initconst = {
1180ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1190ad902f6STero Kristo 	{ 0 },
1200ad902f6STero Kristo };
1210ad902f6STero Kristo 
1220ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer6_bit_data[] __initconst = {
1230ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1240ad902f6STero Kristo 	{ 0 },
1250ad902f6STero Kristo };
1260ad902f6STero Kristo 
1270ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer7_bit_data[] __initconst = {
1280ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1290ad902f6STero Kristo 	{ 0 },
1300ad902f6STero Kristo };
1310ad902f6STero Kristo 
1320ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer8_bit_data[] __initconst = {
1330ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer5_gfclk_mux_parents, NULL },
1340ad902f6STero Kristo 	{ 0 },
1350ad902f6STero Kristo };
1360ad902f6STero Kristo 
1370ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_abe_clkctrl_regs[] __initconst = {
1380ad902f6STero Kristo 	{ OMAP5_L4_ABE_CLKCTRL, NULL, 0, "abe_iclk" },
139364975eeSTony Lindgren 	{ OMAP5_AESS_CLKCTRL, omap5_aess_bit_data, CLKF_SW_SUP, "abe_cm:clk:0008:24" },
1400ad902f6STero Kristo 	{ OMAP5_MCPDM_CLKCTRL, NULL, CLKF_SW_SUP, "pad_clks_ck" },
1410ad902f6STero Kristo 	{ OMAP5_DMIC_CLKCTRL, omap5_dmic_bit_data, CLKF_SW_SUP, "abe_cm:clk:0018:24" },
1420ad902f6STero Kristo 	{ OMAP5_MCBSP1_CLKCTRL, omap5_mcbsp1_bit_data, CLKF_SW_SUP, "abe_cm:clk:0028:24" },
1430ad902f6STero Kristo 	{ OMAP5_MCBSP2_CLKCTRL, omap5_mcbsp2_bit_data, CLKF_SW_SUP, "abe_cm:clk:0030:24" },
1440ad902f6STero Kristo 	{ OMAP5_MCBSP3_CLKCTRL, omap5_mcbsp3_bit_data, CLKF_SW_SUP, "abe_cm:clk:0038:24" },
1450ad902f6STero Kristo 	{ OMAP5_TIMER5_CLKCTRL, omap5_timer5_bit_data, CLKF_SW_SUP, "abe_cm:clk:0048:24" },
1460ad902f6STero Kristo 	{ OMAP5_TIMER6_CLKCTRL, omap5_timer6_bit_data, CLKF_SW_SUP, "abe_cm:clk:0050:24" },
1470ad902f6STero Kristo 	{ OMAP5_TIMER7_CLKCTRL, omap5_timer7_bit_data, CLKF_SW_SUP, "abe_cm:clk:0058:24" },
1480ad902f6STero Kristo 	{ OMAP5_TIMER8_CLKCTRL, omap5_timer8_bit_data, CLKF_SW_SUP, "abe_cm:clk:0060:24" },
1490ad902f6STero Kristo 	{ 0 },
1500ad902f6STero Kristo };
1510ad902f6STero Kristo 
1520ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l3main1_clkctrl_regs[] __initconst = {
1530ad902f6STero Kristo 	{ OMAP5_L3_MAIN_1_CLKCTRL, NULL, 0, "l3_iclk_div" },
1540ad902f6STero Kristo 	{ 0 },
1550ad902f6STero Kristo };
1560ad902f6STero Kristo 
1570ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l3main2_clkctrl_regs[] __initconst = {
1580ad902f6STero Kristo 	{ OMAP5_L3_MAIN_2_CLKCTRL, NULL, 0, "l3_iclk_div" },
1590ad902f6STero Kristo 	{ 0 },
1600ad902f6STero Kristo };
1610ad902f6STero Kristo 
1620ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_ipu_clkctrl_regs[] __initconst = {
16395a62bf2SSuman Anna 	{ OMAP5_MMU_IPU_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_core_h22x2_ck" },
1640ad902f6STero Kristo 	{ 0 },
1650ad902f6STero Kristo };
1660ad902f6STero Kristo 
1670ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_dma_clkctrl_regs[] __initconst = {
1680ad902f6STero Kristo 	{ OMAP5_DMA_SYSTEM_CLKCTRL, NULL, 0, "l3_iclk_div" },
1690ad902f6STero Kristo 	{ 0 },
1700ad902f6STero Kristo };
1710ad902f6STero Kristo 
1720ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_emif_clkctrl_regs[] __initconst = {
1730ad902f6STero Kristo 	{ OMAP5_DMM_CLKCTRL, NULL, 0, "l3_iclk_div" },
1740ad902f6STero Kristo 	{ OMAP5_EMIF1_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h11x2_ck" },
1750ad902f6STero Kristo 	{ OMAP5_EMIF2_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h11x2_ck" },
1760ad902f6STero Kristo 	{ 0 },
1770ad902f6STero Kristo };
1780ad902f6STero Kristo 
1790ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l4cfg_clkctrl_regs[] __initconst = {
1800ad902f6STero Kristo 	{ OMAP5_L4_CFG_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1810ad902f6STero Kristo 	{ OMAP5_SPINLOCK_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1820ad902f6STero Kristo 	{ OMAP5_MAILBOX_CLKCTRL, NULL, 0, "l4_root_clk_div" },
1830ad902f6STero Kristo 	{ 0 },
1840ad902f6STero Kristo };
1850ad902f6STero Kristo 
1860ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l3instr_clkctrl_regs[] __initconst = {
1870ad902f6STero Kristo 	{ OMAP5_L3_MAIN_3_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
1880ad902f6STero Kristo 	{ OMAP5_L3_INSTR_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
1890ad902f6STero Kristo 	{ 0 },
1900ad902f6STero Kristo };
1910ad902f6STero Kristo 
1920ad902f6STero Kristo static const char * const omap5_timer10_gfclk_mux_parents[] __initconst = {
1930ad902f6STero Kristo 	"sys_clkin",
1940ad902f6STero Kristo 	"sys_32k_ck",
1950ad902f6STero Kristo 	NULL,
1960ad902f6STero Kristo };
1970ad902f6STero Kristo 
1980ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer10_bit_data[] __initconst = {
1990ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2000ad902f6STero Kristo 	{ 0 },
2010ad902f6STero Kristo };
2020ad902f6STero Kristo 
2030ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer11_bit_data[] __initconst = {
2040ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2050ad902f6STero Kristo 	{ 0 },
2060ad902f6STero Kristo };
2070ad902f6STero Kristo 
2080ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer2_bit_data[] __initconst = {
2090ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2100ad902f6STero Kristo 	{ 0 },
2110ad902f6STero Kristo };
2120ad902f6STero Kristo 
2130ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer3_bit_data[] __initconst = {
2140ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2150ad902f6STero Kristo 	{ 0 },
2160ad902f6STero Kristo };
2170ad902f6STero Kristo 
2180ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer4_bit_data[] __initconst = {
2190ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2200ad902f6STero Kristo 	{ 0 },
2210ad902f6STero Kristo };
2220ad902f6STero Kristo 
2230ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer9_bit_data[] __initconst = {
2240ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
2250ad902f6STero Kristo 	{ 0 },
2260ad902f6STero Kristo };
2270ad902f6STero Kristo 
2280ad902f6STero Kristo static const char * const omap5_gpio2_dbclk_parents[] __initconst = {
2290ad902f6STero Kristo 	"sys_32k_ck",
2300ad902f6STero Kristo 	NULL,
2310ad902f6STero Kristo };
2320ad902f6STero Kristo 
2330ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio2_bit_data[] __initconst = {
2340ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2350ad902f6STero Kristo 	{ 0 },
2360ad902f6STero Kristo };
2370ad902f6STero Kristo 
2380ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio3_bit_data[] __initconst = {
2390ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2400ad902f6STero Kristo 	{ 0 },
2410ad902f6STero Kristo };
2420ad902f6STero Kristo 
2430ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio4_bit_data[] __initconst = {
2440ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2450ad902f6STero Kristo 	{ 0 },
2460ad902f6STero Kristo };
2470ad902f6STero Kristo 
2480ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio5_bit_data[] __initconst = {
2490ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2500ad902f6STero Kristo 	{ 0 },
2510ad902f6STero Kristo };
2520ad902f6STero Kristo 
2530ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio6_bit_data[] __initconst = {
2540ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2550ad902f6STero Kristo 	{ 0 },
2560ad902f6STero Kristo };
2570ad902f6STero Kristo 
2580ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio7_bit_data[] __initconst = {
2590ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2600ad902f6STero Kristo 	{ 0 },
2610ad902f6STero Kristo };
2620ad902f6STero Kristo 
2630ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio8_bit_data[] __initconst = {
2640ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
2650ad902f6STero Kristo 	{ 0 },
2660ad902f6STero Kristo };
2670ad902f6STero Kristo 
2680ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l4per_clkctrl_regs[] __initconst = {
2690ad902f6STero Kristo 	{ OMAP5_TIMER10_CLKCTRL, omap5_timer10_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0008:24" },
2700ad902f6STero Kristo 	{ OMAP5_TIMER11_CLKCTRL, omap5_timer11_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0010:24" },
2710ad902f6STero Kristo 	{ OMAP5_TIMER2_CLKCTRL, omap5_timer2_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0018:24" },
2720ad902f6STero Kristo 	{ OMAP5_TIMER3_CLKCTRL, omap5_timer3_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0020:24" },
2730ad902f6STero Kristo 	{ OMAP5_TIMER4_CLKCTRL, omap5_timer4_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0028:24" },
2740ad902f6STero Kristo 	{ OMAP5_TIMER9_CLKCTRL, omap5_timer9_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0030:24" },
2750ad902f6STero Kristo 	{ OMAP5_GPIO2_CLKCTRL, omap5_gpio2_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2760ad902f6STero Kristo 	{ OMAP5_GPIO3_CLKCTRL, omap5_gpio3_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2770ad902f6STero Kristo 	{ OMAP5_GPIO4_CLKCTRL, omap5_gpio4_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2780ad902f6STero Kristo 	{ OMAP5_GPIO5_CLKCTRL, omap5_gpio5_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2790ad902f6STero Kristo 	{ OMAP5_GPIO6_CLKCTRL, omap5_gpio6_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2800ad902f6STero Kristo 	{ OMAP5_I2C1_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2810ad902f6STero Kristo 	{ OMAP5_I2C2_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2820ad902f6STero Kristo 	{ OMAP5_I2C3_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2830ad902f6STero Kristo 	{ OMAP5_I2C4_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2840ad902f6STero Kristo 	{ OMAP5_L4_PER_CLKCTRL, NULL, 0, "l4_root_clk_div" },
2850ad902f6STero Kristo 	{ OMAP5_MCSPI1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2860ad902f6STero Kristo 	{ OMAP5_MCSPI2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2870ad902f6STero Kristo 	{ OMAP5_MCSPI3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2880ad902f6STero Kristo 	{ OMAP5_MCSPI4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2890ad902f6STero Kristo 	{ OMAP5_GPIO7_CLKCTRL, omap5_gpio7_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2900ad902f6STero Kristo 	{ OMAP5_GPIO8_CLKCTRL, omap5_gpio8_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
2910ad902f6STero Kristo 	{ OMAP5_MMC3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2920ad902f6STero Kristo 	{ OMAP5_MMC4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2930ad902f6STero Kristo 	{ OMAP5_UART1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2940ad902f6STero Kristo 	{ OMAP5_UART2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2950ad902f6STero Kristo 	{ OMAP5_UART3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2960ad902f6STero Kristo 	{ OMAP5_UART4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
2970ad902f6STero Kristo 	{ OMAP5_MMC5_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2980ad902f6STero Kristo 	{ OMAP5_I2C5_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
2990ad902f6STero Kristo 	{ OMAP5_UART5_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
3000ad902f6STero Kristo 	{ OMAP5_UART6_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
3010ad902f6STero Kristo 	{ 0 },
3020ad902f6STero Kristo };
3030ad902f6STero Kristo 
304723a567fSTony Lindgren static const struct
305723a567fSTony Lindgren omap_clkctrl_reg_data omap5_l4_secure_clkctrl_regs[] __initconst = {
306*f968045fSTero Kristo 	{ OMAP5_AES1_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
307*f968045fSTero Kristo 	{ OMAP5_AES2_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
308*f968045fSTero Kristo 	{ OMAP5_DES3DES_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
309*f968045fSTero Kristo 	{ OMAP5_FPKA_CLKCTRL, NULL, CLKF_SW_SUP, "l4_root_clk_div" },
310*f968045fSTero Kristo 	{ OMAP5_RNG_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l4_root_clk_div" },
311*f968045fSTero Kristo 	{ OMAP5_SHA2MD5_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" },
312*f968045fSTero Kristo 	{ OMAP5_DMA_CRYPTO_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l3_iclk_div" },
313723a567fSTony Lindgren 	{ 0 },
314723a567fSTony Lindgren };
315723a567fSTony Lindgren 
31625999e61STero Kristo static const struct omap_clkctrl_reg_data omap5_iva_clkctrl_regs[] __initconst = {
31725999e61STero Kristo 	{ OMAP5_IVA_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" },
31825999e61STero Kristo 	{ OMAP5_SL2IF_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" },
31925999e61STero Kristo 	{ 0 },
32025999e61STero Kristo };
32125999e61STero Kristo 
3220ad902f6STero Kristo static const char * const omap5_dss_dss_clk_parents[] __initconst = {
3230ad902f6STero Kristo 	"dpll_per_h12x2_ck",
3240ad902f6STero Kristo 	NULL,
3250ad902f6STero Kristo };
3260ad902f6STero Kristo 
3270ad902f6STero Kristo static const char * const omap5_dss_48mhz_clk_parents[] __initconst = {
3280ad902f6STero Kristo 	"func_48m_fclk",
3290ad902f6STero Kristo 	NULL,
3300ad902f6STero Kristo };
3310ad902f6STero Kristo 
3320ad902f6STero Kristo static const char * const omap5_dss_sys_clk_parents[] __initconst = {
3330ad902f6STero Kristo 	"dss_syc_gfclk_div",
3340ad902f6STero Kristo 	NULL,
3350ad902f6STero Kristo };
3360ad902f6STero Kristo 
3370ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_dss_core_bit_data[] __initconst = {
3380ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_dss_dss_clk_parents, NULL },
3390ad902f6STero Kristo 	{ 9, TI_CLK_GATE, omap5_dss_48mhz_clk_parents, NULL },
3400ad902f6STero Kristo 	{ 10, TI_CLK_GATE, omap5_dss_sys_clk_parents, NULL },
3410ad902f6STero Kristo 	{ 11, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
3420ad902f6STero Kristo 	{ 0 },
3430ad902f6STero Kristo };
3440ad902f6STero Kristo 
3450ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_dss_clkctrl_regs[] __initconst = {
3460ad902f6STero Kristo 	{ OMAP5_DSS_CORE_CLKCTRL, omap5_dss_core_bit_data, CLKF_SW_SUP, "dss_cm:clk:0000:8" },
3470ad902f6STero Kristo 	{ 0 },
3480ad902f6STero Kristo };
3490ad902f6STero Kristo 
350fd568374STony Lindgren static const char * const omap5_gpu_core_mux_parents[] __initconst = {
351fd568374STony Lindgren 	"dpll_core_h14x2_ck",
352fd568374STony Lindgren 	"dpll_per_h14x2_ck",
353fd568374STony Lindgren 	NULL,
354fd568374STony Lindgren };
355fd568374STony Lindgren 
356fd568374STony Lindgren static const char * const omap5_gpu_hyd_mux_parents[] __initconst = {
357fd568374STony Lindgren 	"dpll_core_h14x2_ck",
358fd568374STony Lindgren 	"dpll_per_h14x2_ck",
359fd568374STony Lindgren 	NULL,
360fd568374STony Lindgren };
361fd568374STony Lindgren 
362fd568374STony Lindgren static const char * const omap5_gpu_sys_clk_parents[] __initconst = {
363fd568374STony Lindgren 	"sys_clkin",
364fd568374STony Lindgren 	NULL,
365fd568374STony Lindgren };
366fd568374STony Lindgren 
367fd568374STony Lindgren static const struct omap_clkctrl_div_data omap5_gpu_sys_clk_data __initconst = {
368fd568374STony Lindgren 	.max_div = 2,
369fd568374STony Lindgren };
370fd568374STony Lindgren 
371fd568374STony Lindgren static const struct omap_clkctrl_bit_data omap5_gpu_core_bit_data[] __initconst = {
372fd568374STony Lindgren 	{ 24, TI_CLK_MUX, omap5_gpu_core_mux_parents, NULL },
373fd568374STony Lindgren 	{ 25, TI_CLK_MUX, omap5_gpu_hyd_mux_parents, NULL },
374fd568374STony Lindgren 	{ 26, TI_CLK_DIVIDER, omap5_gpu_sys_clk_parents, &omap5_gpu_sys_clk_data },
375fd568374STony Lindgren 	{ 0 },
376fd568374STony Lindgren };
377fd568374STony Lindgren 
378fd568374STony Lindgren static const struct omap_clkctrl_reg_data omap5_gpu_clkctrl_regs[] __initconst = {
379fd568374STony Lindgren 	{ OMAP5_GPU_CLKCTRL, omap5_gpu_core_bit_data, CLKF_SW_SUP, "gpu_cm:clk:0000:24" },
380fd568374STony Lindgren 	{ 0 },
381fd568374STony Lindgren };
382fd568374STony Lindgren 
3830ad902f6STero Kristo static const char * const omap5_mmc1_fclk_mux_parents[] __initconst = {
3840ad902f6STero Kristo 	"func_128m_clk",
3850ad902f6STero Kristo 	"dpll_per_m2x2_ck",
3860ad902f6STero Kristo 	NULL,
3870ad902f6STero Kristo };
3880ad902f6STero Kristo 
3890ad902f6STero Kristo static const char * const omap5_mmc1_fclk_parents[] __initconst = {
3900ad902f6STero Kristo 	"l3init_cm:clk:0008:24",
3910ad902f6STero Kristo 	NULL,
3920ad902f6STero Kristo };
3930ad902f6STero Kristo 
3940ad902f6STero Kristo static const struct omap_clkctrl_div_data omap5_mmc1_fclk_data __initconst = {
3950ad902f6STero Kristo 	.max_div = 2,
3960ad902f6STero Kristo };
3970ad902f6STero Kristo 
3980ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_mmc1_bit_data[] __initconst = {
3990ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
4000ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_mmc1_fclk_mux_parents, NULL },
4010ad902f6STero Kristo 	{ 25, TI_CLK_DIVIDER, omap5_mmc1_fclk_parents, &omap5_mmc1_fclk_data },
4020ad902f6STero Kristo 	{ 0 },
4030ad902f6STero Kristo };
4040ad902f6STero Kristo 
4050ad902f6STero Kristo static const char * const omap5_mmc2_fclk_parents[] __initconst = {
4060ad902f6STero Kristo 	"l3init_cm:clk:0010:24",
4070ad902f6STero Kristo 	NULL,
4080ad902f6STero Kristo };
4090ad902f6STero Kristo 
4100ad902f6STero Kristo static const struct omap_clkctrl_div_data omap5_mmc2_fclk_data __initconst = {
4110ad902f6STero Kristo 	.max_div = 2,
4120ad902f6STero Kristo };
4130ad902f6STero Kristo 
4140ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_mmc2_bit_data[] __initconst = {
4150ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_mmc1_fclk_mux_parents, NULL },
4160ad902f6STero Kristo 	{ 25, TI_CLK_DIVIDER, omap5_mmc2_fclk_parents, &omap5_mmc2_fclk_data },
4170ad902f6STero Kristo 	{ 0 },
4180ad902f6STero Kristo };
4190ad902f6STero Kristo 
4200ad902f6STero Kristo static const char * const omap5_usb_host_hs_hsic60m_p3_clk_parents[] __initconst = {
4210ad902f6STero Kristo 	"l3init_60m_fclk",
4220ad902f6STero Kristo 	NULL,
4230ad902f6STero Kristo };
4240ad902f6STero Kristo 
4250ad902f6STero Kristo static const char * const omap5_usb_host_hs_hsic480m_p3_clk_parents[] __initconst = {
4260ad902f6STero Kristo 	"dpll_usb_m2_ck",
4270ad902f6STero Kristo 	NULL,
4280ad902f6STero Kristo };
4290ad902f6STero Kristo 
4300ad902f6STero Kristo static const char * const omap5_usb_host_hs_utmi_p1_clk_parents[] __initconst = {
4310ad902f6STero Kristo 	"l3init_cm:clk:0038:24",
4320ad902f6STero Kristo 	NULL,
4330ad902f6STero Kristo };
4340ad902f6STero Kristo 
4350ad902f6STero Kristo static const char * const omap5_usb_host_hs_utmi_p2_clk_parents[] __initconst = {
4360ad902f6STero Kristo 	"l3init_cm:clk:0038:25",
4370ad902f6STero Kristo 	NULL,
4380ad902f6STero Kristo };
4390ad902f6STero Kristo 
4400ad902f6STero Kristo static const char * const omap5_utmi_p1_gfclk_parents[] __initconst = {
4410ad902f6STero Kristo 	"l3init_60m_fclk",
4420ad902f6STero Kristo 	"xclk60mhsp1_ck",
4430ad902f6STero Kristo 	NULL,
4440ad902f6STero Kristo };
4450ad902f6STero Kristo 
4460ad902f6STero Kristo static const char * const omap5_utmi_p2_gfclk_parents[] __initconst = {
4470ad902f6STero Kristo 	"l3init_60m_fclk",
4480ad902f6STero Kristo 	"xclk60mhsp2_ck",
4490ad902f6STero Kristo 	NULL,
4500ad902f6STero Kristo };
4510ad902f6STero Kristo 
4520ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_usb_host_hs_bit_data[] __initconst = {
4530ad902f6STero Kristo 	{ 6, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4540ad902f6STero Kristo 	{ 7, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4550ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_usb_host_hs_utmi_p1_clk_parents, NULL },
4560ad902f6STero Kristo 	{ 9, TI_CLK_GATE, omap5_usb_host_hs_utmi_p2_clk_parents, NULL },
4570ad902f6STero Kristo 	{ 10, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4580ad902f6STero Kristo 	{ 11, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4590ad902f6STero Kristo 	{ 12, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4600ad902f6STero Kristo 	{ 13, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4610ad902f6STero Kristo 	{ 14, TI_CLK_GATE, omap5_usb_host_hs_hsic480m_p3_clk_parents, NULL },
4620ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_utmi_p1_gfclk_parents, NULL },
4630ad902f6STero Kristo 	{ 25, TI_CLK_MUX, omap5_utmi_p2_gfclk_parents, NULL },
4640ad902f6STero Kristo 	{ 0 },
4650ad902f6STero Kristo };
4660ad902f6STero Kristo 
4670ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_usb_tll_hs_bit_data[] __initconst = {
4680ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4690ad902f6STero Kristo 	{ 9, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4700ad902f6STero Kristo 	{ 10, TI_CLK_GATE, omap5_usb_host_hs_hsic60m_p3_clk_parents, NULL },
4710ad902f6STero Kristo 	{ 0 },
4720ad902f6STero Kristo };
4730ad902f6STero Kristo 
4740ad902f6STero Kristo static const char * const omap5_sata_ref_clk_parents[] __initconst = {
4750ad902f6STero Kristo 	"sys_clkin",
4760ad902f6STero Kristo 	NULL,
4770ad902f6STero Kristo };
4780ad902f6STero Kristo 
4790ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_sata_bit_data[] __initconst = {
4800ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_sata_ref_clk_parents, NULL },
4810ad902f6STero Kristo 	{ 0 },
4820ad902f6STero Kristo };
4830ad902f6STero Kristo 
4840ad902f6STero Kristo static const char * const omap5_usb_otg_ss_refclk960m_parents[] __initconst = {
4850ad902f6STero Kristo 	"dpll_usb_clkdcoldo",
4860ad902f6STero Kristo 	NULL,
4870ad902f6STero Kristo };
4880ad902f6STero Kristo 
4890ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_usb_otg_ss_bit_data[] __initconst = {
4900ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_usb_otg_ss_refclk960m_parents, NULL },
4910ad902f6STero Kristo 	{ 0 },
4920ad902f6STero Kristo };
4930ad902f6STero Kristo 
4940ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_l3init_clkctrl_regs[] __initconst = {
4950ad902f6STero Kristo 	{ OMAP5_MMC1_CLKCTRL, omap5_mmc1_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0008:25" },
4960ad902f6STero Kristo 	{ OMAP5_MMC2_CLKCTRL, omap5_mmc2_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0010:25" },
4970ad902f6STero Kristo 	{ OMAP5_USB_HOST_HS_CLKCTRL, omap5_usb_host_hs_bit_data, CLKF_SW_SUP, "l3init_60m_fclk" },
4980ad902f6STero Kristo 	{ OMAP5_USB_TLL_HS_CLKCTRL, omap5_usb_tll_hs_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
4990ad902f6STero Kristo 	{ OMAP5_SATA_CLKCTRL, omap5_sata_bit_data, CLKF_SW_SUP, "func_48m_fclk" },
5000ad902f6STero Kristo 	{ OMAP5_OCP2SCP1_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
5010ad902f6STero Kristo 	{ OMAP5_OCP2SCP3_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" },
5020ad902f6STero Kristo 	{ OMAP5_USB_OTG_SS_CLKCTRL, omap5_usb_otg_ss_bit_data, CLKF_HW_SUP, "dpll_core_h13x2_ck" },
5030ad902f6STero Kristo 	{ 0 },
5040ad902f6STero Kristo };
5050ad902f6STero Kristo 
5060ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_gpio1_bit_data[] __initconst = {
5070ad902f6STero Kristo 	{ 8, TI_CLK_GATE, omap5_gpio2_dbclk_parents, NULL },
5080ad902f6STero Kristo 	{ 0 },
5090ad902f6STero Kristo };
5100ad902f6STero Kristo 
5110ad902f6STero Kristo static const struct omap_clkctrl_bit_data omap5_timer1_bit_data[] __initconst = {
5120ad902f6STero Kristo 	{ 24, TI_CLK_MUX, omap5_timer10_gfclk_mux_parents, NULL },
5130ad902f6STero Kristo 	{ 0 },
5140ad902f6STero Kristo };
5150ad902f6STero Kristo 
5160ad902f6STero Kristo static const struct omap_clkctrl_reg_data omap5_wkupaon_clkctrl_regs[] __initconst = {
5170ad902f6STero Kristo 	{ OMAP5_L4_WKUP_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
5180ad902f6STero Kristo 	{ OMAP5_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
5190ad902f6STero Kristo 	{ OMAP5_GPIO1_CLKCTRL, omap5_gpio1_bit_data, CLKF_HW_SUP, "wkupaon_iclk_mux" },
5200ad902f6STero Kristo 	{ OMAP5_TIMER1_CLKCTRL, omap5_timer1_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0020:24" },
5210ad902f6STero Kristo 	{ OMAP5_COUNTER_32K_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
5220ad902f6STero Kristo 	{ OMAP5_KBD_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
5230ad902f6STero Kristo 	{ 0 },
5240ad902f6STero Kristo };
5250ad902f6STero Kristo 
5260ad902f6STero Kristo const struct omap_clkctrl_data omap5_clkctrl_data[] __initconst = {
5270ad902f6STero Kristo 	{ 0x4a004320, omap5_mpu_clkctrl_regs },
5280ad902f6STero Kristo 	{ 0x4a004420, omap5_dsp_clkctrl_regs },
5290ad902f6STero Kristo 	{ 0x4a004520, omap5_abe_clkctrl_regs },
5300ad902f6STero Kristo 	{ 0x4a008720, omap5_l3main1_clkctrl_regs },
5310ad902f6STero Kristo 	{ 0x4a008820, omap5_l3main2_clkctrl_regs },
5320ad902f6STero Kristo 	{ 0x4a008920, omap5_ipu_clkctrl_regs },
5330ad902f6STero Kristo 	{ 0x4a008a20, omap5_dma_clkctrl_regs },
5340ad902f6STero Kristo 	{ 0x4a008b20, omap5_emif_clkctrl_regs },
5350ad902f6STero Kristo 	{ 0x4a008d20, omap5_l4cfg_clkctrl_regs },
5360ad902f6STero Kristo 	{ 0x4a008e20, omap5_l3instr_clkctrl_regs },
5370ad902f6STero Kristo 	{ 0x4a009020, omap5_l4per_clkctrl_regs },
538723a567fSTony Lindgren 	{ 0x4a0091a0, omap5_l4_secure_clkctrl_regs },
53925999e61STero Kristo 	{ 0x4a009220, omap5_iva_clkctrl_regs },
5400ad902f6STero Kristo 	{ 0x4a009420, omap5_dss_clkctrl_regs },
541fd568374STony Lindgren 	{ 0x4a009520, omap5_gpu_clkctrl_regs },
5420ad902f6STero Kristo 	{ 0x4a009620, omap5_l3init_clkctrl_regs },
5430ad902f6STero Kristo 	{ 0x4ae07920, omap5_wkupaon_clkctrl_regs },
5440ad902f6STero Kristo 	{ 0 },
5450ad902f6STero Kristo };
5460ad902f6STero Kristo 
54752b14728STero Kristo static struct ti_dt_clk omap54xx_clks[] = {
54852b14728STero Kristo 	DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"),
549d5630b7aSGrygorii Strashko 	DT_CLK(NULL, "sys_clkin_ck", "sys_clkin"),
5500ad902f6STero Kristo 	DT_CLK(NULL, "dmic_gfclk", "abe_cm:0018:24"),
5510ad902f6STero Kristo 	DT_CLK(NULL, "dmic_sync_mux_ck", "abe_cm:0018:26"),
5520ad902f6STero Kristo 	DT_CLK(NULL, "dss_32khz_clk", "dss_cm:0000:11"),
5530ad902f6STero Kristo 	DT_CLK(NULL, "dss_48mhz_clk", "dss_cm:0000:9"),
5540ad902f6STero Kristo 	DT_CLK(NULL, "dss_dss_clk", "dss_cm:0000:8"),
5550ad902f6STero Kristo 	DT_CLK(NULL, "dss_sys_clk", "dss_cm:0000:10"),
5560ad902f6STero Kristo 	DT_CLK(NULL, "gpio1_dbclk", "wkupaon_cm:0018:8"),
5570ad902f6STero Kristo 	DT_CLK(NULL, "gpio2_dbclk", "l4per_cm:0040:8"),
5580ad902f6STero Kristo 	DT_CLK(NULL, "gpio3_dbclk", "l4per_cm:0048:8"),
5590ad902f6STero Kristo 	DT_CLK(NULL, "gpio4_dbclk", "l4per_cm:0050:8"),
5600ad902f6STero Kristo 	DT_CLK(NULL, "gpio5_dbclk", "l4per_cm:0058:8"),
5610ad902f6STero Kristo 	DT_CLK(NULL, "gpio6_dbclk", "l4per_cm:0060:8"),
5620ad902f6STero Kristo 	DT_CLK(NULL, "gpio7_dbclk", "l4per_cm:00f0:8"),
5630ad902f6STero Kristo 	DT_CLK(NULL, "gpio8_dbclk", "l4per_cm:00f8:8"),
5640ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp1_gfclk", "abe_cm:0028:24"),
5650ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe_cm:0028:26"),
5660ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp2_gfclk", "abe_cm:0030:24"),
5670ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe_cm:0030:26"),
5680ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp3_gfclk", "abe_cm:0038:24"),
5690ad902f6STero Kristo 	DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe_cm:0038:26"),
5700ad902f6STero Kristo 	DT_CLK(NULL, "mmc1_32khz_clk", "l3init_cm:0008:8"),
5710ad902f6STero Kristo 	DT_CLK(NULL, "mmc1_fclk", "l3init_cm:0008:25"),
5720ad902f6STero Kristo 	DT_CLK(NULL, "mmc1_fclk_mux", "l3init_cm:0008:24"),
5730ad902f6STero Kristo 	DT_CLK(NULL, "mmc2_fclk", "l3init_cm:0010:25"),
5740ad902f6STero Kristo 	DT_CLK(NULL, "mmc2_fclk_mux", "l3init_cm:0010:24"),
5750ad902f6STero Kristo 	DT_CLK(NULL, "sata_ref_clk", "l3init_cm:0068:8"),
5760ad902f6STero Kristo 	DT_CLK(NULL, "timer10_gfclk_mux", "l4per_cm:0008:24"),
5770ad902f6STero Kristo 	DT_CLK(NULL, "timer11_gfclk_mux", "l4per_cm:0010:24"),
5780ad902f6STero Kristo 	DT_CLK(NULL, "timer1_gfclk_mux", "wkupaon_cm:0020:24"),
5790ad902f6STero Kristo 	DT_CLK(NULL, "timer2_gfclk_mux", "l4per_cm:0018:24"),
5800ad902f6STero Kristo 	DT_CLK(NULL, "timer3_gfclk_mux", "l4per_cm:0020:24"),
5810ad902f6STero Kristo 	DT_CLK(NULL, "timer4_gfclk_mux", "l4per_cm:0028:24"),
5820ad902f6STero Kristo 	DT_CLK(NULL, "timer5_gfclk_mux", "abe_cm:0048:24"),
5830ad902f6STero Kristo 	DT_CLK(NULL, "timer6_gfclk_mux", "abe_cm:0050:24"),
5840ad902f6STero Kristo 	DT_CLK(NULL, "timer7_gfclk_mux", "abe_cm:0058:24"),
5850ad902f6STero Kristo 	DT_CLK(NULL, "timer8_gfclk_mux", "abe_cm:0060:24"),
5860ad902f6STero Kristo 	DT_CLK(NULL, "timer9_gfclk_mux", "l4per_cm:0030:24"),
5870ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3init_cm:0038:13"),
5880ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3init_cm:0038:14"),
5890ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic480m_p3_clk", "l3init_cm:0038:7"),
5900ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3init_cm:0038:11"),
5910ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3init_cm:0038:12"),
5920ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_hsic60m_p3_clk", "l3init_cm:0038:6"),
5930ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3init_cm:0038:8"),
5940ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3init_cm:0038:9"),
5950ad902f6STero Kristo 	DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3init_cm:0038:10"),
5960ad902f6STero Kristo 	DT_CLK(NULL, "usb_otg_ss_refclk960m", "l3init_cm:00d0:8"),
5970ad902f6STero Kristo 	DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3init_cm:0048:8"),
5980ad902f6STero Kristo 	DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3init_cm:0048:9"),
5990ad902f6STero Kristo 	DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3init_cm:0048:10"),
6000ad902f6STero Kristo 	DT_CLK(NULL, "utmi_p1_gfclk", "l3init_cm:0038:24"),
6010ad902f6STero Kristo 	DT_CLK(NULL, "utmi_p2_gfclk", "l3init_cm:0038:25"),
60252b14728STero Kristo 	{ .node_name = NULL },
60352b14728STero Kristo };
60452b14728STero Kristo 
60552b14728STero Kristo int __init omap5xxx_dt_clk_init(void)
60652b14728STero Kristo {
60752b14728STero Kristo 	int rc;
60862125a46SRoger Quadros 	struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll;
60952b14728STero Kristo 
61052b14728STero Kristo 	ti_dt_clocks_register(omap54xx_clks);
61152b14728STero Kristo 
61252b14728STero Kristo 	omap2_clk_disable_autoidle_all();
61352b14728STero Kristo 
614d41e5304STero Kristo 	ti_clk_add_aliases();
615d41e5304STero Kristo 
61652b14728STero Kristo 	abe_dpll_ref = clk_get_sys(NULL, "abe_dpll_clk_mux");
61752b14728STero Kristo 	sys_32k_ck = clk_get_sys(NULL, "sys_32k_ck");
61852b14728STero Kristo 	rc = clk_set_parent(abe_dpll_ref, sys_32k_ck);
61952b14728STero Kristo 	abe_dpll = clk_get_sys(NULL, "dpll_abe_ck");
62052b14728STero Kristo 	if (!rc)
62152b14728STero Kristo 		rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ);
62252b14728STero Kristo 	if (rc)
62352b14728STero Kristo 		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
62452b14728STero Kristo 
62581c7e03aSPeter Ujfalusi 	abe_dpll = clk_get_sys(NULL, "dpll_abe_m2x2_ck");
62681c7e03aSPeter Ujfalusi 	if (!rc)
62781c7e03aSPeter Ujfalusi 		rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ * 2);
62881c7e03aSPeter Ujfalusi 	if (rc)
62981c7e03aSPeter Ujfalusi 		pr_err("%s: failed to configure ABE m2x2 DPLL!\n", __func__);
63081c7e03aSPeter Ujfalusi 
63162125a46SRoger Quadros 	usb_dpll = clk_get_sys(NULL, "dpll_usb_ck");
63262125a46SRoger Quadros 	rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ);
63362125a46SRoger Quadros 	if (rc)
63462125a46SRoger Quadros 		pr_err("%s: failed to configure USB DPLL!\n", __func__);
63562125a46SRoger Quadros 
63662125a46SRoger Quadros 	usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck");
63762125a46SRoger Quadros 	rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ/2);
63862125a46SRoger Quadros 	if (rc)
63962125a46SRoger Quadros 		pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__);
64062125a46SRoger Quadros 
64152b14728STero Kristo 	return 0;
64252b14728STero Kristo }
643