4 * Copyright (C) 2013 Texas Instruments, Inc.
6 * Tero Kristo (t-kristo@ti.com)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/list.h>
15 #include <linux/clk.h>
16 #include <linux/clkdev.h>
17 #include <linux/clk/ti.h>
18 #include <dt-bindings/clock/dra7.h>
22 #define DRA7_DPLL_GMAC_DEFFREQ 1000000000
23 #define DRA7_DPLL_USB_DEFFREQ 960000000
25 int __init dra7xx_dt_clk_init(void)
28 struct clk *dpll_ck, *hdcp_ck;
30 ti_dt_clocks_register(dra7xx_compat_clks);
32 omap2_clk_disable_autoidle_all();
36 dpll_ck = clk_get_sys(NULL, "dpll_gmac_ck");
37 rc = clk_set_rate(dpll_ck, DRA7_DPLL_GMAC_DEFFREQ);
39 pr_err("%s: failed to configure GMAC DPLL!\n", __func__);
41 dpll_ck = clk_get_sys(NULL, "dpll_usb_ck");
42 rc = clk_set_rate(dpll_ck, DRA7_DPLL_USB_DEFFREQ);
44 pr_err("%s: failed to configure USB DPLL!\n", __func__);
46 dpll_ck = clk_get_sys(NULL, "dpll_usb_m2_ck");
47 rc = clk_set_rate(dpll_ck, DRA7_DPLL_USB_DEFFREQ/2);
49 pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__);
51 hdcp_ck = clk_get_sys(NULL, "dss_deshdcp_clk");
52 rc = clk_prepare_enable(hdcp_ck);
54 pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);