]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dsi: Set up link clocks for DSIv2
authorArchit Taneja <architt@codeaurora.org>
Fri, 9 Oct 2015 11:02:38 +0000 (16:32 +0530)
committerRob Clark <robdclark@gmail.com>
Mon, 14 Dec 2015 15:40:35 +0000 (10:40 -0500)
commit8b8221883b6396c22ef5aa26c0887be673e3d45d
treecad9ab80485beb4b70adcb6763f21a4b8293aef3
parentfb202c2f3053f15672c9535f093a641c308e3f29
drm/msm/dsi: Set up link clocks for DSIv2

DSIv2 (DSI on older A family chips) has slightly different link clock
requirements.

First, we have an extra clock called src_clk (with a dedicated RCG).
This is required by the DSI controller to process the pixel data
coming from MDP. It needs to be set at the rate "pclk * bytes_per_pixel".

We also need to explicitly configure esc_clk. On DSI6G chips, we don't
need to set a rate to esc_clk because its RCG is always sourced from
crystal clock (19.2 Mhz in all cases), which is within the escape clock
frequency range in the mipi DSI spec. For chips with DSIv2, the crystal
clock rate may not be within the required range (27Mhz on APQ8064).
Therefore, we derive it from the DSI byte clock. We calculate an esc_clck
rate that is within the mipi spec and also divisible by the byte clock
rate.

When setting rate and enabling the link clocks, we make sure that byte_clk
is configured before esc_clk, and src_clk before pixel_clk. We create two
different link_enable funcs for DSI6G and DSIv2 since the sequences are
different.

We also obtain two extra source clocks (dsi_src_clk and esc_src_clk) and
set their parent to the clocks provided by DSI PLL.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c