[media] stv0367: Add support for 16Mhz reference clock
authorPeter Griffin <peter.griffin@linaro.org>
Thu, 30 Jul 2015 17:08:52 +0000 (14:08 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 18:55:52 +0000 (15:55 -0300)
The B2100A dvb NIM card from ST has 2x stv0367 demodulators
and 2x TDA18212 silicon tuners, with a 16Mhz crystal. To
get this working properly with the upstream driver we need
to add support for the 16Mhz reference clock.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/stv0367.c

index 9a49db1ae1abc7b434fa7def16ae22fe1dba32df..44cb73f68af658cf0a8f94c7a3e4476e51d9de5f 100644 (file)
@@ -1554,6 +1554,11 @@ static int stv0367ter_init(struct dvb_frontend *fe)
 
        switch (state->config->xtal) {
                /*set internal freq to 53.125MHz */
+       case 16000000:
+               stv0367_writereg(state, R367TER_PLLMDIV, 0x2);
+               stv0367_writereg(state, R367TER_PLLNDIV, 0x1b);
+               stv0367_writereg(state, R367TER_PLLSETUP, 0x18);
+               break;
        case 25000000:
                stv0367_writereg(state, R367TER_PLLMDIV, 0xa);
                stv0367_writereg(state, R367TER_PLLNDIV, 0x55);