]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00299756-3 ARM: imx6q: Add the clock route from external OSC to ESAI clock
authorNicolin Chen <Guangyu.Chen@freescale.com>
Tue, 18 Feb 2014 12:54:25 +0000 (20:54 +0800)
committerNicolin Chen <Guangyu.Chen@freescale.com>
Wed, 19 Feb 2014 10:50:12 +0000 (18:50 +0800)
commit4588363363f1c6e354a4047708049196639fe1a2
treea2d91922d928967e7b861bb5c2b1fa7b8dcddc98
parent0d7ac3c74923d82d474280403e32d0a233e28ff5
ENGR00299756-3 ARM: imx6q: Add the clock route from external OSC to ESAI clock

This patch mainly adds the clock route from external 24.576MHz OSC to internal
ESAI clock via analog clock2 PADs on the SoC and pll4 so that ESAI can get an
entirely synchronous clock source against CS42888.

[ 1, We found if using pll4 to generate a 24.576MHz from inernal 24.0MHz OSC,
  we would get noise during the audio playback via ESAI->CS42888 even though
  this generated clock's rate is equal to the external one statistically. It
  might be resulted from the tiny difference between two clock source, which
  might be crucial to the sensitive CODEC we use -- CS42888. So we here apply
  the old 3.0.35 way to feed ESAI the same clock source as CS42888.

  2, Ideally, we should use bypass mode for pll4 since we only need to get
  the raw rate (24.576MHz) while currently bypass mode in clk-pllv3.c isn't
  entirely supported: The clock rate would be fixed to 24.0MHz if setting to
  bypass, which would cause child clock get an incorrect rate and the driver
  who uses the child clock fail to derive a needed clock rate, and it might
  be dangerous to involve the clk-pllv3.c driver to this fix. Thus we here
  apply 3.0.35 way provisionally. ]

Expected result:

anaclk2                 0           1            24576000
 lvds2_in               0           1            24576000
  pll4_sel              0           1            24576000
   pll4_audio           0           1            786432000
    pll4_post_div       0           1            786432000
     pll4_audio_div     0           1            786432000
      esai_sel          0           1            786432000
       esai_pred        0           1            98304000
        esai_podf       0           1            24576000
         esai           0           1            24576000

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 49584be724d4d9c7a753d2b981b3932d8d871eb4)
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
arch/arm/mach-imx/clk-imx6q.c
arch/arm/mach-imx/mach-imx6q.c