]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: twl6040: Correct HPPLL configuration for 19.2 and 38.4 MHz mclk
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 6 May 2014 08:46:10 +0000 (11:46 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 3 Jun 2014 07:11:28 +0000 (08:11 +0100)
When the MCLK is 19.2 or 38.4 MHz the HPPLL need to be enabled and can be
put in bypass mode.
This will fix HPPLL use on boards with 19.2MHz mclk.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/twl6040.c

index 12b314ea48dc72ed0420f5570010c376ba3ebe6e..ae26d84b3a595088e9261fb31be8efae6db6f0d9 100644 (file)
@@ -441,12 +441,9 @@ int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
                                            TWL6040_HPLLENA;
                                break;
                        case 19200000:
-                               /*
-                               * PLL disabled
-                               * (enable PLL if MCLK jitter quality
-                               *  doesn't meet specification)
-                               */
-                               hppllctl |= TWL6040_MCLK_19200KHZ;
+                               /* PLL enabled, bypass mode */
+                               hppllctl |= TWL6040_MCLK_19200KHZ |
+                                           TWL6040_HPLLBP | TWL6040_HPLLENA;
                                break;
                        case 26000000:
                                /* PLL enabled, active mode */
@@ -454,9 +451,9 @@ int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
                                            TWL6040_HPLLENA;
                                break;
                        case 38400000:
-                               /* PLL enabled, active mode */
+                               /* PLL enabled, bypass mode */
                                hppllctl |= TWL6040_MCLK_38400KHZ |
-                                           TWL6040_HPLLENA;
+                                           TWL6040_HPLLBP | TWL6040_HPLLENA;
                                break;
                        default:
                                dev_err(twl6040->dev,