152b14728STero Kristo /* 252b14728STero Kristo * OMAP5 Clock init 352b14728STero Kristo * 452b14728STero Kristo * Copyright (C) 2013 Texas Instruments, Inc. 552b14728STero Kristo * 652b14728STero Kristo * Tero Kristo (t-kristo@ti.com) 752b14728STero Kristo * 852b14728STero Kristo * This program is free software; you can redistribute it and/or modify 952b14728STero Kristo * it under the terms of the GNU General Public License version 2 as 1052b14728STero Kristo * published by the Free Software Foundation. 1152b14728STero Kristo */ 1252b14728STero Kristo 1352b14728STero Kristo #include <linux/kernel.h> 1452b14728STero Kristo #include <linux/list.h> 15*e387088aSStephen Boyd #include <linux/clk.h> 1652b14728STero Kristo #include <linux/clkdev.h> 1752b14728STero Kristo #include <linux/io.h> 1852b14728STero Kristo #include <linux/clk/ti.h> 1952b14728STero 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 2852b14728STero Kristo static struct ti_dt_clk omap54xx_clks[] = { 2952b14728STero Kristo DT_CLK(NULL, "pad_clks_src_ck", "pad_clks_src_ck"), 3052b14728STero Kristo DT_CLK(NULL, "pad_clks_ck", "pad_clks_ck"), 3152b14728STero Kristo DT_CLK(NULL, "secure_32k_clk_src_ck", "secure_32k_clk_src_ck"), 3252b14728STero Kristo DT_CLK(NULL, "slimbus_src_clk", "slimbus_src_clk"), 3352b14728STero Kristo DT_CLK(NULL, "slimbus_clk", "slimbus_clk"), 3452b14728STero Kristo DT_CLK(NULL, "sys_32k_ck", "sys_32k_ck"), 3552b14728STero Kristo DT_CLK(NULL, "virt_12000000_ck", "virt_12000000_ck"), 3652b14728STero Kristo DT_CLK(NULL, "virt_13000000_ck", "virt_13000000_ck"), 3752b14728STero Kristo DT_CLK(NULL, "virt_16800000_ck", "virt_16800000_ck"), 3852b14728STero Kristo DT_CLK(NULL, "virt_19200000_ck", "virt_19200000_ck"), 3952b14728STero Kristo DT_CLK(NULL, "virt_26000000_ck", "virt_26000000_ck"), 4052b14728STero Kristo DT_CLK(NULL, "virt_27000000_ck", "virt_27000000_ck"), 4152b14728STero Kristo DT_CLK(NULL, "virt_38400000_ck", "virt_38400000_ck"), 4252b14728STero Kristo DT_CLK(NULL, "sys_clkin", "sys_clkin"), 4352b14728STero Kristo DT_CLK(NULL, "xclk60mhsp1_ck", "xclk60mhsp1_ck"), 4452b14728STero Kristo DT_CLK(NULL, "xclk60mhsp2_ck", "xclk60mhsp2_ck"), 4552b14728STero Kristo DT_CLK(NULL, "abe_dpll_bypass_clk_mux", "abe_dpll_bypass_clk_mux"), 4652b14728STero Kristo DT_CLK(NULL, "abe_dpll_clk_mux", "abe_dpll_clk_mux"), 4752b14728STero Kristo DT_CLK(NULL, "dpll_abe_ck", "dpll_abe_ck"), 4852b14728STero Kristo DT_CLK(NULL, "dpll_abe_x2_ck", "dpll_abe_x2_ck"), 4952b14728STero Kristo DT_CLK(NULL, "dpll_abe_m2x2_ck", "dpll_abe_m2x2_ck"), 5052b14728STero Kristo DT_CLK(NULL, "abe_24m_fclk", "abe_24m_fclk"), 5152b14728STero Kristo DT_CLK(NULL, "abe_clk", "abe_clk"), 5252b14728STero Kristo DT_CLK(NULL, "abe_iclk", "abe_iclk"), 5352b14728STero Kristo DT_CLK(NULL, "abe_lp_clk_div", "abe_lp_clk_div"), 5452b14728STero Kristo DT_CLK(NULL, "dpll_abe_m3x2_ck", "dpll_abe_m3x2_ck"), 5552b14728STero Kristo DT_CLK(NULL, "dpll_core_ck", "dpll_core_ck"), 5652b14728STero Kristo DT_CLK(NULL, "dpll_core_x2_ck", "dpll_core_x2_ck"), 5752b14728STero Kristo DT_CLK(NULL, "dpll_core_h21x2_ck", "dpll_core_h21x2_ck"), 5852b14728STero Kristo DT_CLK(NULL, "c2c_fclk", "c2c_fclk"), 5952b14728STero Kristo DT_CLK(NULL, "c2c_iclk", "c2c_iclk"), 6052b14728STero Kristo DT_CLK(NULL, "custefuse_sys_gfclk_div", "custefuse_sys_gfclk_div"), 6152b14728STero Kristo DT_CLK(NULL, "dpll_core_h11x2_ck", "dpll_core_h11x2_ck"), 6252b14728STero Kristo DT_CLK(NULL, "dpll_core_h12x2_ck", "dpll_core_h12x2_ck"), 6352b14728STero Kristo DT_CLK(NULL, "dpll_core_h13x2_ck", "dpll_core_h13x2_ck"), 6452b14728STero Kristo DT_CLK(NULL, "dpll_core_h14x2_ck", "dpll_core_h14x2_ck"), 6552b14728STero Kristo DT_CLK(NULL, "dpll_core_h22x2_ck", "dpll_core_h22x2_ck"), 6652b14728STero Kristo DT_CLK(NULL, "dpll_core_h23x2_ck", "dpll_core_h23x2_ck"), 6752b14728STero Kristo DT_CLK(NULL, "dpll_core_h24x2_ck", "dpll_core_h24x2_ck"), 6852b14728STero Kristo DT_CLK(NULL, "dpll_core_m2_ck", "dpll_core_m2_ck"), 6952b14728STero Kristo DT_CLK(NULL, "dpll_core_m3x2_ck", "dpll_core_m3x2_ck"), 7052b14728STero Kristo DT_CLK(NULL, "iva_dpll_hs_clk_div", "iva_dpll_hs_clk_div"), 7152b14728STero Kristo DT_CLK(NULL, "dpll_iva_ck", "dpll_iva_ck"), 7252b14728STero Kristo DT_CLK(NULL, "dpll_iva_x2_ck", "dpll_iva_x2_ck"), 7352b14728STero Kristo DT_CLK(NULL, "dpll_iva_h11x2_ck", "dpll_iva_h11x2_ck"), 7452b14728STero Kristo DT_CLK(NULL, "dpll_iva_h12x2_ck", "dpll_iva_h12x2_ck"), 7552b14728STero Kristo DT_CLK(NULL, "mpu_dpll_hs_clk_div", "mpu_dpll_hs_clk_div"), 7652b14728STero Kristo DT_CLK(NULL, "dpll_mpu_ck", "dpll_mpu_ck"), 7752b14728STero Kristo DT_CLK(NULL, "dpll_mpu_m2_ck", "dpll_mpu_m2_ck"), 7852b14728STero Kristo DT_CLK(NULL, "per_dpll_hs_clk_div", "per_dpll_hs_clk_div"), 7952b14728STero Kristo DT_CLK(NULL, "dpll_per_ck", "dpll_per_ck"), 8052b14728STero Kristo DT_CLK(NULL, "dpll_per_x2_ck", "dpll_per_x2_ck"), 8152b14728STero Kristo DT_CLK(NULL, "dpll_per_h11x2_ck", "dpll_per_h11x2_ck"), 8252b14728STero Kristo DT_CLK(NULL, "dpll_per_h12x2_ck", "dpll_per_h12x2_ck"), 8352b14728STero Kristo DT_CLK(NULL, "dpll_per_h14x2_ck", "dpll_per_h14x2_ck"), 8452b14728STero Kristo DT_CLK(NULL, "dpll_per_m2_ck", "dpll_per_m2_ck"), 8552b14728STero Kristo DT_CLK(NULL, "dpll_per_m2x2_ck", "dpll_per_m2x2_ck"), 8652b14728STero Kristo DT_CLK(NULL, "dpll_per_m3x2_ck", "dpll_per_m3x2_ck"), 8752b14728STero Kristo DT_CLK(NULL, "dpll_unipro1_ck", "dpll_unipro1_ck"), 8852b14728STero Kristo DT_CLK(NULL, "dpll_unipro1_clkdcoldo", "dpll_unipro1_clkdcoldo"), 8952b14728STero Kristo DT_CLK(NULL, "dpll_unipro1_m2_ck", "dpll_unipro1_m2_ck"), 9052b14728STero Kristo DT_CLK(NULL, "dpll_unipro2_ck", "dpll_unipro2_ck"), 9152b14728STero Kristo DT_CLK(NULL, "dpll_unipro2_clkdcoldo", "dpll_unipro2_clkdcoldo"), 9252b14728STero Kristo DT_CLK(NULL, "dpll_unipro2_m2_ck", "dpll_unipro2_m2_ck"), 9352b14728STero Kristo DT_CLK(NULL, "usb_dpll_hs_clk_div", "usb_dpll_hs_clk_div"), 9452b14728STero Kristo DT_CLK(NULL, "dpll_usb_ck", "dpll_usb_ck"), 9552b14728STero Kristo DT_CLK(NULL, "dpll_usb_clkdcoldo", "dpll_usb_clkdcoldo"), 9652b14728STero Kristo DT_CLK(NULL, "dpll_usb_m2_ck", "dpll_usb_m2_ck"), 9752b14728STero Kristo DT_CLK(NULL, "dss_syc_gfclk_div", "dss_syc_gfclk_div"), 9852b14728STero Kristo DT_CLK(NULL, "func_128m_clk", "func_128m_clk"), 9952b14728STero Kristo DT_CLK(NULL, "func_12m_fclk", "func_12m_fclk"), 10052b14728STero Kristo DT_CLK(NULL, "func_24m_clk", "func_24m_clk"), 10152b14728STero Kristo DT_CLK(NULL, "func_48m_fclk", "func_48m_fclk"), 10252b14728STero Kristo DT_CLK(NULL, "func_96m_fclk", "func_96m_fclk"), 10352b14728STero Kristo DT_CLK(NULL, "l3_iclk_div", "l3_iclk_div"), 10452b14728STero Kristo DT_CLK(NULL, "gpu_l3_iclk", "gpu_l3_iclk"), 10552b14728STero Kristo DT_CLK(NULL, "l3init_60m_fclk", "l3init_60m_fclk"), 10652b14728STero Kristo DT_CLK(NULL, "wkupaon_iclk_mux", "wkupaon_iclk_mux"), 10752b14728STero Kristo DT_CLK(NULL, "l3instr_ts_gclk_div", "l3instr_ts_gclk_div"), 10852b14728STero Kristo DT_CLK(NULL, "l4_root_clk_div", "l4_root_clk_div"), 10952b14728STero Kristo DT_CLK(NULL, "dss_32khz_clk", "dss_32khz_clk"), 11052b14728STero Kristo DT_CLK(NULL, "dss_48mhz_clk", "dss_48mhz_clk"), 11152b14728STero Kristo DT_CLK(NULL, "dss_dss_clk", "dss_dss_clk"), 11252b14728STero Kristo DT_CLK(NULL, "dss_sys_clk", "dss_sys_clk"), 11352b14728STero Kristo DT_CLK(NULL, "gpio1_dbclk", "gpio1_dbclk"), 11452b14728STero Kristo DT_CLK(NULL, "gpio2_dbclk", "gpio2_dbclk"), 11552b14728STero Kristo DT_CLK(NULL, "gpio3_dbclk", "gpio3_dbclk"), 11652b14728STero Kristo DT_CLK(NULL, "gpio4_dbclk", "gpio4_dbclk"), 11752b14728STero Kristo DT_CLK(NULL, "gpio5_dbclk", "gpio5_dbclk"), 11852b14728STero Kristo DT_CLK(NULL, "gpio6_dbclk", "gpio6_dbclk"), 11952b14728STero Kristo DT_CLK(NULL, "gpio7_dbclk", "gpio7_dbclk"), 12052b14728STero Kristo DT_CLK(NULL, "gpio8_dbclk", "gpio8_dbclk"), 12152b14728STero Kristo DT_CLK(NULL, "iss_ctrlclk", "iss_ctrlclk"), 12252b14728STero Kristo DT_CLK(NULL, "lli_txphy_clk", "lli_txphy_clk"), 12352b14728STero Kristo DT_CLK(NULL, "lli_txphy_ls_clk", "lli_txphy_ls_clk"), 12452b14728STero Kristo DT_CLK(NULL, "mmc1_32khz_clk", "mmc1_32khz_clk"), 12552b14728STero Kristo DT_CLK(NULL, "sata_ref_clk", "sata_ref_clk"), 12652b14728STero Kristo DT_CLK(NULL, "slimbus1_slimbus_clk", "slimbus1_slimbus_clk"), 12752b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "usb_host_hs_hsic480m_p1_clk"), 12852b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "usb_host_hs_hsic480m_p2_clk"), 12952b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic480m_p3_clk", "usb_host_hs_hsic480m_p3_clk"), 13052b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "usb_host_hs_hsic60m_p1_clk"), 13152b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "usb_host_hs_hsic60m_p2_clk"), 13252b14728STero Kristo DT_CLK(NULL, "usb_host_hs_hsic60m_p3_clk", "usb_host_hs_hsic60m_p3_clk"), 13352b14728STero Kristo DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "usb_host_hs_utmi_p1_clk"), 13452b14728STero Kristo DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "usb_host_hs_utmi_p2_clk"), 13552b14728STero Kristo DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "usb_host_hs_utmi_p3_clk"), 13652b14728STero Kristo DT_CLK(NULL, "usb_otg_ss_refclk960m", "usb_otg_ss_refclk960m"), 13752b14728STero Kristo DT_CLK(NULL, "usb_phy_cm_clk32k", "usb_phy_cm_clk32k"), 13852b14728STero Kristo DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "usb_tll_hs_usb_ch0_clk"), 13952b14728STero Kristo DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "usb_tll_hs_usb_ch1_clk"), 14052b14728STero Kristo DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "usb_tll_hs_usb_ch2_clk"), 14152b14728STero Kristo DT_CLK(NULL, "aess_fclk", "aess_fclk"), 14252b14728STero Kristo DT_CLK(NULL, "dmic_sync_mux_ck", "dmic_sync_mux_ck"), 14352b14728STero Kristo DT_CLK(NULL, "dmic_gfclk", "dmic_gfclk"), 14452b14728STero Kristo DT_CLK(NULL, "fdif_fclk", "fdif_fclk"), 14552b14728STero Kristo DT_CLK(NULL, "gpu_core_gclk_mux", "gpu_core_gclk_mux"), 14652b14728STero Kristo DT_CLK(NULL, "gpu_hyd_gclk_mux", "gpu_hyd_gclk_mux"), 14752b14728STero Kristo DT_CLK(NULL, "hsi_fclk", "hsi_fclk"), 14852b14728STero Kristo DT_CLK(NULL, "mcasp_sync_mux_ck", "mcasp_sync_mux_ck"), 14952b14728STero Kristo DT_CLK(NULL, "mcasp_gfclk", "mcasp_gfclk"), 15052b14728STero Kristo DT_CLK(NULL, "mcbsp1_sync_mux_ck", "mcbsp1_sync_mux_ck"), 15152b14728STero Kristo DT_CLK(NULL, "mcbsp1_gfclk", "mcbsp1_gfclk"), 15252b14728STero Kristo DT_CLK(NULL, "mcbsp2_sync_mux_ck", "mcbsp2_sync_mux_ck"), 15352b14728STero Kristo DT_CLK(NULL, "mcbsp2_gfclk", "mcbsp2_gfclk"), 15452b14728STero Kristo DT_CLK(NULL, "mcbsp3_sync_mux_ck", "mcbsp3_sync_mux_ck"), 15552b14728STero Kristo DT_CLK(NULL, "mcbsp3_gfclk", "mcbsp3_gfclk"), 15652b14728STero Kristo DT_CLK(NULL, "mmc1_fclk_mux", "mmc1_fclk_mux"), 15752b14728STero Kristo DT_CLK(NULL, "mmc1_fclk", "mmc1_fclk"), 15852b14728STero Kristo DT_CLK(NULL, "mmc2_fclk_mux", "mmc2_fclk_mux"), 15952b14728STero Kristo DT_CLK(NULL, "mmc2_fclk", "mmc2_fclk"), 16052b14728STero Kristo DT_CLK(NULL, "timer10_gfclk_mux", "timer10_gfclk_mux"), 16152b14728STero Kristo DT_CLK(NULL, "timer11_gfclk_mux", "timer11_gfclk_mux"), 16252b14728STero Kristo DT_CLK(NULL, "timer1_gfclk_mux", "timer1_gfclk_mux"), 16352b14728STero Kristo DT_CLK(NULL, "timer2_gfclk_mux", "timer2_gfclk_mux"), 16452b14728STero Kristo DT_CLK(NULL, "timer3_gfclk_mux", "timer3_gfclk_mux"), 16552b14728STero Kristo DT_CLK(NULL, "timer4_gfclk_mux", "timer4_gfclk_mux"), 16652b14728STero Kristo DT_CLK(NULL, "timer5_gfclk_mux", "timer5_gfclk_mux"), 16752b14728STero Kristo DT_CLK(NULL, "timer6_gfclk_mux", "timer6_gfclk_mux"), 16852b14728STero Kristo DT_CLK(NULL, "timer7_gfclk_mux", "timer7_gfclk_mux"), 16952b14728STero Kristo DT_CLK(NULL, "timer8_gfclk_mux", "timer8_gfclk_mux"), 17052b14728STero Kristo DT_CLK(NULL, "timer9_gfclk_mux", "timer9_gfclk_mux"), 17152b14728STero Kristo DT_CLK(NULL, "utmi_p1_gfclk", "utmi_p1_gfclk"), 17252b14728STero Kristo DT_CLK(NULL, "utmi_p2_gfclk", "utmi_p2_gfclk"), 17352b14728STero Kristo DT_CLK(NULL, "auxclk0_src_ck", "auxclk0_src_ck"), 17452b14728STero Kristo DT_CLK(NULL, "auxclk0_ck", "auxclk0_ck"), 17552b14728STero Kristo DT_CLK(NULL, "auxclkreq0_ck", "auxclkreq0_ck"), 17652b14728STero Kristo DT_CLK(NULL, "auxclk1_src_ck", "auxclk1_src_ck"), 17752b14728STero Kristo DT_CLK(NULL, "auxclk1_ck", "auxclk1_ck"), 17852b14728STero Kristo DT_CLK(NULL, "auxclkreq1_ck", "auxclkreq1_ck"), 17952b14728STero Kristo DT_CLK(NULL, "auxclk2_src_ck", "auxclk2_src_ck"), 18052b14728STero Kristo DT_CLK(NULL, "auxclk2_ck", "auxclk2_ck"), 18152b14728STero Kristo DT_CLK(NULL, "auxclkreq2_ck", "auxclkreq2_ck"), 18252b14728STero Kristo DT_CLK(NULL, "auxclk3_src_ck", "auxclk3_src_ck"), 18352b14728STero Kristo DT_CLK(NULL, "auxclk3_ck", "auxclk3_ck"), 18452b14728STero Kristo DT_CLK(NULL, "auxclkreq3_ck", "auxclkreq3_ck"), 18552b14728STero Kristo DT_CLK("omap_i2c.1", "ick", "dummy_ck"), 18652b14728STero Kristo DT_CLK("omap_i2c.2", "ick", "dummy_ck"), 18752b14728STero Kristo DT_CLK("omap_i2c.3", "ick", "dummy_ck"), 18852b14728STero Kristo DT_CLK("omap_i2c.4", "ick", "dummy_ck"), 18952b14728STero Kristo DT_CLK(NULL, "mailboxes_ick", "dummy_ck"), 19052b14728STero Kristo DT_CLK("omap_hsmmc.0", "ick", "dummy_ck"), 19152b14728STero Kristo DT_CLK("omap_hsmmc.1", "ick", "dummy_ck"), 19252b14728STero Kristo DT_CLK("omap_hsmmc.2", "ick", "dummy_ck"), 19352b14728STero Kristo DT_CLK("omap_hsmmc.3", "ick", "dummy_ck"), 19452b14728STero Kristo DT_CLK("omap_hsmmc.4", "ick", "dummy_ck"), 19552b14728STero Kristo DT_CLK("omap-mcbsp.1", "ick", "dummy_ck"), 19652b14728STero Kristo DT_CLK("omap-mcbsp.2", "ick", "dummy_ck"), 19752b14728STero Kristo DT_CLK("omap-mcbsp.3", "ick", "dummy_ck"), 19852b14728STero Kristo DT_CLK("omap-mcbsp.4", "ick", "dummy_ck"), 19952b14728STero Kristo DT_CLK("omap2_mcspi.1", "ick", "dummy_ck"), 20052b14728STero Kristo DT_CLK("omap2_mcspi.2", "ick", "dummy_ck"), 20152b14728STero Kristo DT_CLK("omap2_mcspi.3", "ick", "dummy_ck"), 20252b14728STero Kristo DT_CLK("omap2_mcspi.4", "ick", "dummy_ck"), 20352b14728STero Kristo DT_CLK(NULL, "uart1_ick", "dummy_ck"), 20452b14728STero Kristo DT_CLK(NULL, "uart2_ick", "dummy_ck"), 20552b14728STero Kristo DT_CLK(NULL, "uart3_ick", "dummy_ck"), 20652b14728STero Kristo DT_CLK(NULL, "uart4_ick", "dummy_ck"), 20752b14728STero Kristo DT_CLK("usbhs_omap", "usbhost_ick", "dummy_ck"), 20852b14728STero Kristo DT_CLK("usbhs_omap", "usbtll_fck", "dummy_ck"), 20952b14728STero Kristo DT_CLK("omap_wdt", "ick", "dummy_ck"), 21052b14728STero Kristo DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"), 21152b14728STero Kristo DT_CLK("omap_timer.1", "sys_ck", "sys_clkin"), 21252b14728STero Kristo DT_CLK("omap_timer.2", "sys_ck", "sys_clkin"), 21352b14728STero Kristo DT_CLK("omap_timer.3", "sys_ck", "sys_clkin"), 21452b14728STero Kristo DT_CLK("omap_timer.4", "sys_ck", "sys_clkin"), 21552b14728STero Kristo DT_CLK("omap_timer.9", "sys_ck", "sys_clkin"), 21652b14728STero Kristo DT_CLK("omap_timer.10", "sys_ck", "sys_clkin"), 21752b14728STero Kristo DT_CLK("omap_timer.11", "sys_ck", "sys_clkin"), 21852b14728STero Kristo DT_CLK("omap_timer.5", "sys_ck", "dss_syc_gfclk_div"), 21952b14728STero Kristo DT_CLK("omap_timer.6", "sys_ck", "dss_syc_gfclk_div"), 22052b14728STero Kristo DT_CLK("omap_timer.7", "sys_ck", "dss_syc_gfclk_div"), 22152b14728STero Kristo DT_CLK("omap_timer.8", "sys_ck", "dss_syc_gfclk_div"), 22252b14728STero Kristo { .node_name = NULL }, 22352b14728STero Kristo }; 22452b14728STero Kristo 22552b14728STero Kristo int __init omap5xxx_dt_clk_init(void) 22652b14728STero Kristo { 22752b14728STero Kristo int rc; 22862125a46SRoger Quadros struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll; 22952b14728STero Kristo 23052b14728STero Kristo ti_dt_clocks_register(omap54xx_clks); 23152b14728STero Kristo 23252b14728STero Kristo omap2_clk_disable_autoidle_all(); 23352b14728STero Kristo 23452b14728STero Kristo abe_dpll_ref = clk_get_sys(NULL, "abe_dpll_clk_mux"); 23552b14728STero Kristo sys_32k_ck = clk_get_sys(NULL, "sys_32k_ck"); 23652b14728STero Kristo rc = clk_set_parent(abe_dpll_ref, sys_32k_ck); 23752b14728STero Kristo abe_dpll = clk_get_sys(NULL, "dpll_abe_ck"); 23852b14728STero Kristo if (!rc) 23952b14728STero Kristo rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ); 24052b14728STero Kristo if (rc) 24152b14728STero Kristo pr_err("%s: failed to configure ABE DPLL!\n", __func__); 24252b14728STero Kristo 24381c7e03aSPeter Ujfalusi abe_dpll = clk_get_sys(NULL, "dpll_abe_m2x2_ck"); 24481c7e03aSPeter Ujfalusi if (!rc) 24581c7e03aSPeter Ujfalusi rc = clk_set_rate(abe_dpll, OMAP5_DPLL_ABE_DEFFREQ * 2); 24681c7e03aSPeter Ujfalusi if (rc) 24781c7e03aSPeter Ujfalusi pr_err("%s: failed to configure ABE m2x2 DPLL!\n", __func__); 24881c7e03aSPeter Ujfalusi 24962125a46SRoger Quadros usb_dpll = clk_get_sys(NULL, "dpll_usb_ck"); 25062125a46SRoger Quadros rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ); 25162125a46SRoger Quadros if (rc) 25262125a46SRoger Quadros pr_err("%s: failed to configure USB DPLL!\n", __func__); 25362125a46SRoger Quadros 25462125a46SRoger Quadros usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck"); 25562125a46SRoger Quadros rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ/2); 25662125a46SRoger Quadros if (rc) 25762125a46SRoger Quadros pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__); 25862125a46SRoger Quadros 25952b14728STero Kristo return 0; 26052b14728STero Kristo } 261