clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 30 Nov 2015 21:07:53 +0000 (22:07 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 6 May 2016 15:47:40 +0000 (17:47 +0200)
The configurable hdmi_ref output of the PLL block is derived from
the tvdpll_594m clock signal via a configurable PLL post-divider.
It is used as the PLL reference input to the HDMI PHY module.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: James Liao <jamesjj.liao@mediatek.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/clk-mt8173.c
include/dt-bindings/clock/mt8173-clk.h

index 85c0bfc626ae88e851ef9fdfb1f05272c7071846..cf4fcb61ed28bbc4ffcca73411f264e1a175bdc9 100644 (file)
@@ -1095,6 +1095,11 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
                clk_data->clks[cku->id] = clk;
        }
 
+       clk = clk_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0,
+                                  base + 0x40, 16, 3, CLK_DIVIDER_POWER_OF_TWO,
+                                  NULL);
+       clk_data->clks[CLK_APMIXED_HDMI_REF] = clk;
+
        r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
        if (r)
                pr_err("%s(): could not register clock provider: %d\n",
index 7956ba1bc9744a5fccd7b5b3cc915929752a146f..6094bf7e50abb6146c18c013b49d93c7ab1f52ce 100644 (file)
 #define CLK_APMIXED_LVDSPLL            13
 #define CLK_APMIXED_MSDCPLL2           14
 #define CLK_APMIXED_REF2USB_TX         15
-#define CLK_APMIXED_NR_CLK             16
+#define CLK_APMIXED_HDMI_REF           16
+#define CLK_APMIXED_NR_CLK             17
 
 /* INFRA_SYS */