summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabreauto.dtsi2
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c7
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c26
3 files changed, 31 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 95513cd10d4e..d9c3af9f58e9 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -30,7 +30,7 @@
};
clocks {
- codec_osc: codec_osc {
+ codec_osc: anaclk2 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24576000>;
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 9bc6f6166b8e..59ec5fe965fb 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -484,8 +484,10 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
clk_register_clkdev(clk[ahb], "ahb", NULL);
clk_register_clkdev(clk[cko1], "cko1", NULL);
clk_register_clkdev(clk[arm], NULL, "cpu0");
- clk_register_clkdev(clk[pll4_post_div], "pll4_post_div", NULL);
- clk_register_clkdev(clk[pll4_audio], "pll4_audio", NULL);
+ clk_register_clkdev(clk[pll4_audio_div], "pll4_audio_div", NULL);
+ clk_register_clkdev(clk[pll4_sel], "pll4_sel", NULL);
+ clk_register_clkdev(clk[lvds2_in], "lvds2_in", NULL);
+ clk_register_clkdev(clk[esai], "esai", NULL);
if ((imx_get_soc_revision() != IMX_CHIP_REVISION_1_0) || cpu_is_imx6dl()) {
clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]);
@@ -558,6 +560,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
clk_set_parent(clk[ssi1_sel], clk[pll4_audio_div]);
clk_set_parent(clk[ssi2_sel], clk[pll4_audio_div]);
clk_set_parent(clk[ssi3_sel], clk[pll4_audio_div]);
+ clk_set_parent(clk[esai_sel], clk[pll4_audio_div]);
clk_set_parent(clk[spdif_sel], clk[pll3_pfd3_454m]);
clk_set_parent(clk[asrc_sel], clk[pll3_usb_otg]);
clk_set_rate(clk[asrc_sel], 7500000);
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 8dbd402ec3b5..5fb11af5643d 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -398,6 +398,28 @@ put_node:
of_node_put(np);
}
+#define ESAI_AUDIO_MCLK 24576000
+
+static void __init imx6q_audio_lvds2_init(void)
+{
+ struct clk *pll4_sel, *lvds2_in, *pll4_audio_div, *esai;
+
+ pll4_audio_div = clk_get_sys(NULL, "pll4_audio_div");
+ pll4_sel = clk_get_sys(NULL, "pll4_sel");
+ lvds2_in = clk_get_sys(NULL, "lvds2_in");
+ esai = clk_get_sys(NULL, "esai");
+ if (IS_ERR(pll4_audio_div) || IS_ERR(pll4_sel) ||
+ IS_ERR(lvds2_in) || IS_ERR(esai))
+ return;
+
+ if (clk_get_rate(lvds2_in) != ESAI_AUDIO_MCLK)
+ return;
+
+ clk_set_parent(pll4_sel, lvds2_in);
+ clk_set_rate(pll4_audio_div, 786432000);
+ clk_set_rate(esai, ESAI_AUDIO_MCLK);
+}
+
static struct platform_device imx6q_cpufreq_pdev = {
.name = "imx6-cpufreq",
};
@@ -431,8 +453,10 @@ static void __init imx6q_init_late(void)
}
if (of_machine_is_compatible("fsl,imx6q-sabreauto")
- || of_machine_is_compatible("fsl,imx6dl-sabreauto"))
+ || of_machine_is_compatible("fsl,imx6dl-sabreauto")) {
imx6q_flexcan_fixup_auto();
+ imx6q_audio_lvds2_init();
+ }
}
static void __init imx6q_map_io(void)