xref: /linux/drivers/media/dvb-frontends/drxd_firm.c (revision 89ee7f4f33ad6bb993b605cf73c4b914c81ef3e8)
1*89ee7f4fSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
29a0bf528SMauro Carvalho Chehab /*
39a0bf528SMauro Carvalho Chehab  * drxd_firm.c : DRXD firmware tables
49a0bf528SMauro Carvalho Chehab  *
59a0bf528SMauro Carvalho Chehab  * Copyright (C) 2006-2007 Micronas
69a0bf528SMauro Carvalho Chehab  */
79a0bf528SMauro Carvalho Chehab 
89a0bf528SMauro Carvalho Chehab /* TODO: generate this file with a script from a settings file */
99a0bf528SMauro Carvalho Chehab 
109a0bf528SMauro Carvalho Chehab /* Contains A2 firmware version: 1.4.2
119a0bf528SMauro Carvalho Chehab  * Contains B1 firmware version: 3.3.33
129a0bf528SMauro Carvalho Chehab  * Contains settings from driver 1.4.23
139a0bf528SMauro Carvalho Chehab */
149a0bf528SMauro Carvalho Chehab 
159a0bf528SMauro Carvalho Chehab #include "drxd_firm.h"
169a0bf528SMauro Carvalho Chehab 
179a0bf528SMauro Carvalho Chehab #define ADDRESS(x)     ((x) & 0xFF), (((x)>>8) & 0xFF), (((x)>>16) & 0xFF), (((x)>>24) & 0xFF)
189a0bf528SMauro Carvalho Chehab #define LENGTH(x)      ((x) & 0xFF), (((x)>>8) & 0xFF)
199a0bf528SMauro Carvalho Chehab 
209a0bf528SMauro Carvalho Chehab /* Is written via block write, must be little endian */
219a0bf528SMauro Carvalho Chehab #define DATA16(x)      ((x) & 0xFF), (((x)>>8) & 0xFF)
229a0bf528SMauro Carvalho Chehab 
239a0bf528SMauro Carvalho Chehab #define WRBLOCK(a, l) ADDRESS(a), LENGTH(l)
249a0bf528SMauro Carvalho Chehab #define WR16(a, d) ADDRESS(a), LENGTH(1), DATA16(d)
259a0bf528SMauro Carvalho Chehab 
269a0bf528SMauro Carvalho Chehab #define END_OF_TABLE      0xFF, 0xFF, 0xFF, 0xFF
279a0bf528SMauro Carvalho Chehab 
289a0bf528SMauro Carvalho Chehab /* HI firmware patches */
299a0bf528SMauro Carvalho Chehab 
309a0bf528SMauro Carvalho Chehab #define HI_TR_FUNC_ADDR HI_IF_RAM_USR_BEGIN__A
319a0bf528SMauro Carvalho Chehab #define HI_TR_FUNC_SIZE 9	/* size of this function in instruction words */
329a0bf528SMauro Carvalho Chehab 
339a0bf528SMauro Carvalho Chehab u8 DRXD_InitAtomicRead[] = {
349a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_TR_FUNC_ADDR, HI_TR_FUNC_SIZE),
359a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;           */
369a0bf528SMauro Carvalho Chehab 	0x60, 0x04,		/* r0rami.dt -> ring.xba;           */
379a0bf528SMauro Carvalho Chehab 	0x61, 0x04,		/* r0rami.dt -> ring.xad;           */
389a0bf528SMauro Carvalho Chehab 	0xE3, 0x07,		/* HI_RA_RAM_USR_BEGIN -> ring.iad; */
399a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* (long immediate)                 */
409a0bf528SMauro Carvalho Chehab 	0x64, 0x04,		/* r0rami.dt -> ring.len;           */
419a0bf528SMauro Carvalho Chehab 	0x65, 0x04,		/* r0rami.dt -> ring.ctl;           */
429a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;           */
439a0bf528SMauro Carvalho Chehab 	0x38, 0x00,		/* 0         -> jumps.ad;           */
449a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
459a0bf528SMauro Carvalho Chehab };
469a0bf528SMauro Carvalho Chehab 
479a0bf528SMauro Carvalho Chehab /* Pins D0 and D1 of the parallel MPEG output can be used
489a0bf528SMauro Carvalho Chehab    to set the I2C address of a device. */
499a0bf528SMauro Carvalho Chehab 
509a0bf528SMauro Carvalho Chehab #define HI_RST_FUNC_ADDR (HI_IF_RAM_USR_BEGIN__A + HI_TR_FUNC_SIZE)
519a0bf528SMauro Carvalho Chehab #define HI_RST_FUNC_SIZE 54	/* size of this function in instruction words */
529a0bf528SMauro Carvalho Chehab 
539a0bf528SMauro Carvalho Chehab /* D0 Version */
549a0bf528SMauro Carvalho Chehab u8 DRXD_HiI2cPatch_1[] = {
559a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_RST_FUNC_ADDR, HI_RST_FUNC_SIZE),
569a0bf528SMauro Carvalho Chehab 	0xC8, 0x07, 0x01, 0x00,	/* MASK      -> reg0.dt;                        */
579a0bf528SMauro Carvalho Chehab 	0xE0, 0x07, 0x15, 0x02,	/* (EC__BLK << 6) + EC_OC_REG__BNK -> ring.xba; */
589a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
599a0bf528SMauro Carvalho Chehab 	0xA2, 0x00,		/* M_BNK_ID_DAT -> ring.iba;                    */
609a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
619a0bf528SMauro Carvalho Chehab 	0x24, 0x00,		/* 0         -> ring.len;                       */
629a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
639a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
649a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
659a0bf528SMauro Carvalho Chehab 	0xC0, 0x07, 0xFF, 0x0F,	/* -1        -> w0ram.dt;                       */
669a0bf528SMauro Carvalho Chehab 	0x63, 0x00,		/* &data+1   -> ring.iad;                       */
679a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
689a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
699a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x38, 0x00,	/* EC_OC_REG_OCR_MPG_USR_DAT__A -> ring.xad;    */
709a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
719a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
729a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
739a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
749a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
759a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
769a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
779a0bf528SMauro Carvalho Chehab 	0x0F, 0x04,		/* r0ram.dt  -> and.op;                         */
789a0bf528SMauro Carvalho Chehab 	0x1C, 0x06,		/* reg0.dt   -> and.tr;                         */
799a0bf528SMauro Carvalho Chehab 	0xCF, 0x04,		/* and.rs    -> add.op;                         */
809a0bf528SMauro Carvalho Chehab 	0xD0, 0x07, 0x70, 0x00,	/* DEF_DEV_ID -> add.tr;                        */
819a0bf528SMauro Carvalho Chehab 	0xD0, 0x04,		/* add.rs    -> add.tr;                         */
829a0bf528SMauro Carvalho Chehab 	0xC8, 0x04,		/* add.rs    -> reg0.dt;                        */
839a0bf528SMauro Carvalho Chehab 	0x60, 0x00,		/* reg0.dt   -> w0ram.dt;                       */
849a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x10, 0x00,	/* SLV0_BASE -> w0rami.ad;                      */
859a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
869a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
879a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x20, 0x00,	/* SLV1_BASE -> w0rami.ad;                      */
889a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
899a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
909a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x30, 0x00,	/* CMD_BASE  -> w0rami.ad;                      */
919a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
929a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
939a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
949a0bf528SMauro Carvalho Chehab 	0x68, 0x00,		/* M_IC_SEL_PT1 -> i2c.sel;                     */
959a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
969a0bf528SMauro Carvalho Chehab 	0x28, 0x00,		/* M_IC_SEL_PT0 -> i2c.sel;                     */
979a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
989a0bf528SMauro Carvalho Chehab 	0xF8, 0x07, 0x2F, 0x00,	/* 0x2F      -> jumps.ad;                       */
999a0bf528SMauro Carvalho Chehab 
1009a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 0) + 1)),
1019a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1029a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 1) + 1)),
1039a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1049a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 2) + 1)),
1059a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1069a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 3) + 1)),
1079a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1089a0bf528SMauro Carvalho Chehab 
1099a0bf528SMauro Carvalho Chehab 	/* Force quick and dirty reset */
1109a0bf528SMauro Carvalho Chehab 	WR16(B_HI_CT_REG_COMM_STATE__A, 0),
1119a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
1129a0bf528SMauro Carvalho Chehab };
1139a0bf528SMauro Carvalho Chehab 
1149a0bf528SMauro Carvalho Chehab /* D0,D1 Version */
1159a0bf528SMauro Carvalho Chehab u8 DRXD_HiI2cPatch_3[] = {
1169a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_RST_FUNC_ADDR, HI_RST_FUNC_SIZE),
1179a0bf528SMauro Carvalho Chehab 	0xC8, 0x07, 0x03, 0x00,	/* MASK      -> reg0.dt;                        */
1189a0bf528SMauro Carvalho Chehab 	0xE0, 0x07, 0x15, 0x02,	/* (EC__BLK << 6) + EC_OC_REG__BNK -> ring.xba; */
1199a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
1209a0bf528SMauro Carvalho Chehab 	0xA2, 0x00,		/* M_BNK_ID_DAT -> ring.iba;                    */
1219a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
1229a0bf528SMauro Carvalho Chehab 	0x24, 0x00,		/* 0         -> ring.len;                       */
1239a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
1249a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1259a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
1269a0bf528SMauro Carvalho Chehab 	0xC0, 0x07, 0xFF, 0x0F,	/* -1        -> w0ram.dt;                       */
1279a0bf528SMauro Carvalho Chehab 	0x63, 0x00,		/* &data+1   -> ring.iad;                       */
1289a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
1299a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1309a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x38, 0x00,	/* EC_OC_REG_OCR_MPG_USR_DAT__A -> ring.xad;    */
1319a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
1329a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1339a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
1349a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
1359a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
1369a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1379a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
1389a0bf528SMauro Carvalho Chehab 	0x0F, 0x04,		/* r0ram.dt  -> and.op;                         */
1399a0bf528SMauro Carvalho Chehab 	0x1C, 0x06,		/* reg0.dt   -> and.tr;                         */
1409a0bf528SMauro Carvalho Chehab 	0xCF, 0x04,		/* and.rs    -> add.op;                         */
1419a0bf528SMauro Carvalho Chehab 	0xD0, 0x07, 0x70, 0x00,	/* DEF_DEV_ID -> add.tr;                        */
1429a0bf528SMauro Carvalho Chehab 	0xD0, 0x04,		/* add.rs    -> add.tr;                         */
1439a0bf528SMauro Carvalho Chehab 	0xC8, 0x04,		/* add.rs    -> reg0.dt;                        */
1449a0bf528SMauro Carvalho Chehab 	0x60, 0x00,		/* reg0.dt   -> w0ram.dt;                       */
1459a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x10, 0x00,	/* SLV0_BASE -> w0rami.ad;                      */
1469a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1479a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1489a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x20, 0x00,	/* SLV1_BASE -> w0rami.ad;                      */
1499a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1509a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1519a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x30, 0x00,	/* CMD_BASE  -> w0rami.ad;                      */
1529a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1539a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1549a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1559a0bf528SMauro Carvalho Chehab 	0x68, 0x00,		/* M_IC_SEL_PT1 -> i2c.sel;                     */
1569a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1579a0bf528SMauro Carvalho Chehab 	0x28, 0x00,		/* M_IC_SEL_PT0 -> i2c.sel;                     */
1589a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1599a0bf528SMauro Carvalho Chehab 	0xF8, 0x07, 0x2F, 0x00,	/* 0x2F      -> jumps.ad;                       */
1609a0bf528SMauro Carvalho Chehab 
1619a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 0) + 1)),
1629a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1639a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 1) + 1)),
1649a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1659a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 2) + 1)),
1669a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1679a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 3) + 1)),
1689a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1699a0bf528SMauro Carvalho Chehab 
1709a0bf528SMauro Carvalho Chehab 	/* Force quick and dirty reset */
1719a0bf528SMauro Carvalho Chehab 	WR16(B_HI_CT_REG_COMM_STATE__A, 0),
1729a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
1739a0bf528SMauro Carvalho Chehab };
1749a0bf528SMauro Carvalho Chehab 
1759a0bf528SMauro Carvalho Chehab u8 DRXD_ResetCEFR[] = {
1769a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_FR_TREAL00__A, 57),
1779a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL00__A */
1789a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG00__A */
1799a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL01__A */
1809a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG01__A */
1819a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL02__A */
1829a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG02__A */
1839a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL03__A */
1849a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG03__A */
1859a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL04__A */
1869a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG04__A */
1879a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL05__A */
1889a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG05__A */
1899a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL06__A */
1909a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG06__A */
1919a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL07__A */
1929a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG07__A */
1939a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL08__A */
1949a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG08__A */
1959a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL09__A */
1969a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG09__A */
1979a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL10__A */
1989a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG10__A */
1999a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL11__A */
2009a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG11__A */
2019a0bf528SMauro Carvalho Chehab 
2029a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_MID_TAP__A */
2039a0bf528SMauro Carvalho Chehab 
2049a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G00__A */
2059a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G01__A */
2069a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G02__A */
2079a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G03__A */
2089a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G04__A */
2099a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G05__A */
2109a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G06__A */
2119a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G07__A */
2129a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G08__A */
2139a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G09__A */
2149a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G10__A */
2159a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G11__A */
2169a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G12__A */
2179a0bf528SMauro Carvalho Chehab 
2189a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* CE_REG_FR_RIO_G00__A */
2199a0bf528SMauro Carvalho Chehab 	0x90, 0x01,		/* CE_REG_FR_RIO_G01__A */
2209a0bf528SMauro Carvalho Chehab 	0x0B, 0x01,		/* CE_REG_FR_RIO_G02__A */
2219a0bf528SMauro Carvalho Chehab 	0xC8, 0x00,		/* CE_REG_FR_RIO_G03__A */
2229a0bf528SMauro Carvalho Chehab 	0xA0, 0x00,		/* CE_REG_FR_RIO_G04__A */
2239a0bf528SMauro Carvalho Chehab 	0x85, 0x00,		/* CE_REG_FR_RIO_G05__A */
2249a0bf528SMauro Carvalho Chehab 	0x72, 0x00,		/* CE_REG_FR_RIO_G06__A */
2259a0bf528SMauro Carvalho Chehab 	0x64, 0x00,		/* CE_REG_FR_RIO_G07__A */
2269a0bf528SMauro Carvalho Chehab 	0x59, 0x00,		/* CE_REG_FR_RIO_G08__A */
2279a0bf528SMauro Carvalho Chehab 	0x50, 0x00,		/* CE_REG_FR_RIO_G09__A */
2289a0bf528SMauro Carvalho Chehab 	0x49, 0x00,		/* CE_REG_FR_RIO_G10__A */
2299a0bf528SMauro Carvalho Chehab 
2309a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* CE_REG_FR_MODE__A     */
2319a0bf528SMauro Carvalho Chehab 	0x78, 0x00,		/* CE_REG_FR_SQS_TRH__A  */
2329a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_RIO_GAIN__A */
2339a0bf528SMauro Carvalho Chehab 	0x00, 0x02,		/* CE_REG_FR_BYPASS__A   */
2349a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* CE_REG_FR_PM_SET__A   */
2359a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CE_REG_FR_ERR_SH__A   */
2369a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* CE_REG_FR_MAN_SH__A   */
2379a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* CE_REG_FR_TAP_SH__A   */
2389a0bf528SMauro Carvalho Chehab 
2399a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
2409a0bf528SMauro Carvalho Chehab };
2419a0bf528SMauro Carvalho Chehab 
2429a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEA2_1[] = {
2439a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AD_REG_PD__A, 3),
2449a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AD_REG_PD__A          */
2459a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AD_REG_INVEXT__A      */
2469a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AD_REG_CLKNEG__A      */
2479a0bf528SMauro Carvalho Chehab 
2489a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_DCE_AUR_CNT__A, 2),
2499a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_DCE_AUR_CNT__A */
2509a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_DCE_RUR_CNT__A */
2519a0bf528SMauro Carvalho Chehab 
2529a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_ACE_AUR_CNT__A, 2),
2539a0bf528SMauro Carvalho Chehab 	0x0E, 0x00,		/* FE_AG_REG_ACE_AUR_CNT__A */
2549a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_ACE_RUR_CNT__A */
2559a0bf528SMauro Carvalho Chehab 
2569a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_EGC_FLA_RGN__A, 5),
2579a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* FE_AG_REG_EGC_FLA_RGN__A */
2589a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* FE_AG_REG_EGC_SLO_RGN__A */
2599a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_JMP_PSN__A */
2609a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_FLA_INC__A */
2619a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_FLA_DEC__A */
2629a0bf528SMauro Carvalho Chehab 
2639a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_GC1_AGC_MAX__A, 2),
2649a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* FE_AG_REG_GC1_AGC_MAX__A */
2659a0bf528SMauro Carvalho Chehab 	0x00, 0xFE,		/* FE_AG_REG_GC1_AGC_MIN__A */
2669a0bf528SMauro Carvalho Chehab 
2679a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_IND_WIN__A, 29),
2689a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_IND_WIN__A     */
2699a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_AG_REG_IND_THD_LOL__A */
2709a0bf528SMauro Carvalho Chehab 	0x0F, 0x00,		/* FE_AG_REG_IND_THD_HIL__A */
2719a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_IND_DEL__A     don't care */
2729a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* FE_AG_REG_IND_PD1_WRI__A */
2739a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* FE_AG_REG_PDA_AUR_CNT__A */
2749a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDA_RUR_CNT__A */
2759a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDA_AVE_DAT__A don't care  */
2769a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_RUR_CNT__A */
2779a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AG_REG_PDC_SET_LVL__A */
2789a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* FE_AG_REG_PDC_FLA_RGN__A */
2799a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_JMP_PSN__A don't care  */
2809a0bf528SMauro Carvalho Chehab 	0xFF, 0xFF,		/* FE_AG_REG_PDC_FLA_STP__A */
2819a0bf528SMauro Carvalho Chehab 	0xFF, 0xFF,		/* FE_AG_REG_PDC_SLO_STP__A */
2829a0bf528SMauro Carvalho Chehab 	0x00, 0x1F,		/* FE_AG_REG_PDC_PD2_WRI__A don't care  */
2839a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_MAP_DAT__A don't care  */
2849a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* FE_AG_REG_PDC_MAX__A     */
2859a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* FE_AG_REG_TGA_AUR_CNT__A */
2869a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGA_RUR_CNT__A */
2879a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGA_AVE_DAT__A don't care  */
2889a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_RUR_CNT__A */
2899a0bf528SMauro Carvalho Chehab 	0x22, 0x00,		/* FE_AG_REG_TGC_SET_LVL__A */
2909a0bf528SMauro Carvalho Chehab 	0x15, 0x00,		/* FE_AG_REG_TGC_FLA_RGN__A */
2919a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_JMP_PSN__A don't care  */
2929a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AG_REG_TGC_FLA_STP__A */
2939a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* FE_AG_REG_TGC_SLO_STP__A */
2949a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_MAP_DAT__A don't care  */
2959a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_FGA_AUR_CNT__A */
2969a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_FGA_RUR_CNT__A */
2979a0bf528SMauro Carvalho Chehab 
2989a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_BGC_FGC_WRI__A, 2),
2999a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_BGC_FGC_WRI__A */
3009a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_BGC_CGC_WRI__A */
3019a0bf528SMauro Carvalho Chehab 
3029a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_FD_REG_SCL__A, 3),
3039a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_FD_REG_SCL__A         */
3049a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* FE_FD_REG_MAX_LEV__A     */
3059a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_FD_REG_NR__A          */
3069a0bf528SMauro Carvalho Chehab 
3079a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_CF_REG_SCL__A, 5),
3089a0bf528SMauro Carvalho Chehab 	0x16, 0x00,		/* FE_CF_REG_SCL__A         */
3099a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* FE_CF_REG_MAX_LEV__A     */
3109a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* FE_CF_REG_NR__A          */
3119a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_CF_REG_IMP_VAL__A     */
3129a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_CF_REG_MEAS_VAL__A    */
3139a0bf528SMauro Carvalho Chehab 
3149a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_CU_REG_FRM_CNT_RST__A, 2),
3159a0bf528SMauro Carvalho Chehab 	0x00, 0x08,		/* FE_CU_REG_FRM_CNT_RST__A */
3169a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_CU_REG_FRM_CNT_STR__A */
3179a0bf528SMauro Carvalho Chehab 
3189a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3199a0bf528SMauro Carvalho Chehab };
3209a0bf528SMauro Carvalho Chehab 
3219a0bf528SMauro Carvalho Chehab    /* with PGA */
3229a0bf528SMauro Carvalho Chehab /*   WR16COND( DRXD_WITH_PGA, FE_AG_REG_AG_PGA_MODE__A   , 0x0004), */
3239a0bf528SMauro Carvalho Chehab    /* without PGA */
3249a0bf528SMauro Carvalho Chehab /*   WR16COND( DRXD_WITHOUT_PGA, FE_AG_REG_AG_PGA_MODE__A   , 0x0001), */
3259a0bf528SMauro Carvalho Chehab /*   WR16(FE_AG_REG_AG_AGC_SIO__A,  (extAttr -> FeAgRegAgAgcSio), 0x0000 );*/
3269a0bf528SMauro Carvalho Chehab /*   WR16(FE_AG_REG_AG_PWD__A        ,(extAttr -> FeAgRegAgPwd), 0x0000 );*/
3279a0bf528SMauro Carvalho Chehab 
3289a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEA2_2[] = {
3299a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_CDR_RUR_CNT__A, 0x0010),
3309a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_FGM_WRI__A, 48),
3319a0bf528SMauro Carvalho Chehab 	/* Activate measurement, activate scale */
3329a0bf528SMauro Carvalho Chehab 	WR16(FE_FD_REG_MEAS_VAL__A, 0x0001),
3339a0bf528SMauro Carvalho Chehab 
3349a0bf528SMauro Carvalho Chehab 	WR16(FE_CU_REG_COMM_EXEC__A, 0x0001),
3359a0bf528SMauro Carvalho Chehab 	WR16(FE_CF_REG_COMM_EXEC__A, 0x0001),
3369a0bf528SMauro Carvalho Chehab 	WR16(FE_IF_REG_COMM_EXEC__A, 0x0001),
3379a0bf528SMauro Carvalho Chehab 	WR16(FE_FD_REG_COMM_EXEC__A, 0x0001),
3389a0bf528SMauro Carvalho Chehab 	WR16(FE_FS_REG_COMM_EXEC__A, 0x0001),
3399a0bf528SMauro Carvalho Chehab 	WR16(FE_AD_REG_COMM_EXEC__A, 0x0001),
3409a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_COMM_EXEC__A, 0x0001),
3419a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_AG_MODE_LOP__A, 0x895E),
3429a0bf528SMauro Carvalho Chehab 
3439a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3449a0bf528SMauro Carvalho Chehab };
3459a0bf528SMauro Carvalho Chehab 
3469a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEB1_1[] = {
3479a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_PD__A, 0x0000),
3489a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_CLKNEG__A, 0x0000),
3499a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_BGC_FGC_WRI__A, 0x0000),
3509a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_BGC_CGC_WRI__A, 0x0000),
3519a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_AG_MODE_LOP__A, 0x000a),
3529a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_PD1_WRI__A, 35),
3539a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_WIN__A, 0),
3549a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_THD_LOL__A, 8),
3559a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_THD_HIL__A, 8),
3569a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 1),
3579a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_EGC_FLA_RGN__A, 7),
3589a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3599a0bf528SMauro Carvalho Chehab };
3609a0bf528SMauro Carvalho Chehab 
3619a0bf528SMauro Carvalho Chehab 	/* with PGA */
3629a0bf528SMauro Carvalho Chehab /*      WR16(B_FE_AG_REG_AG_PGA_MODE__A   , 0x0000, 0x0000); */
3639a0bf528SMauro Carvalho Chehab        /* without PGA */
3649a0bf528SMauro Carvalho Chehab /*      WR16(B_FE_AG_REG_AG_PGA_MODE__A   ,
3659a0bf528SMauro Carvalho Chehab 	     B_FE_AG_REG_AG_PGA_MODE_PFN_PCN_AFY_REN, 0x0000);*/
3669a0bf528SMauro Carvalho Chehab 									     /*   WR16(B_FE_AG_REG_AG_AGC_SIO__A,(extAttr -> FeAgRegAgAgcSio), 0x0000 );*//*added HS 23-05-2005 */
3679a0bf528SMauro Carvalho Chehab /*   WR16(B_FE_AG_REG_AG_PWD__A    ,(extAttr -> FeAgRegAgPwd), 0x0000 );*/
3689a0bf528SMauro Carvalho Chehab 
3699a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEB1_2[] = {
3709a0bf528SMauro Carvalho Chehab 	WR16(B_FE_COMM_EXEC__A, 0x0001),
3719a0bf528SMauro Carvalho Chehab 
3729a0bf528SMauro Carvalho Chehab 	/* RF-AGC setup */
3739a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDA_AUR_CNT__A, 0x0C),
3749a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_SET_LVL__A, 0x01),
3759a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_FLA_RGN__A, 0x02),
3769a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_FLA_STP__A, 0xFFFF),
3779a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_SLO_STP__A, 0xFFFF),
3789a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_MAX__A, 0x02),
3799a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGA_AUR_CNT__A, 0x0C),
3809a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_SET_LVL__A, 0x22),
3819a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_FLA_RGN__A, 0x15),
3829a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_FLA_STP__A, 0x01),
3839a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_SLO_STP__A, 0x0A),
3849a0bf528SMauro Carvalho Chehab 
3859a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_DIV_NFC_CLP__A, 0),
3869a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_CTR_NFC_OCR__A, 25000),
3879a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_CTR_NFC_ICR__A, 1),
3889a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3899a0bf528SMauro Carvalho Chehab };
3909a0bf528SMauro Carvalho Chehab 
3919a0bf528SMauro Carvalho Chehab u8 DRXD_InitCPA2[] = {
3929a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_BR_SPL_OFFSET__A, 2),
3939a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CP_REG_BR_SPL_OFFSET__A  */
3949a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* CP_REG_BR_STR_DEL__A     */
3959a0bf528SMauro Carvalho Chehab 
3969a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_RT_ANG_INC0__A, 4),
3979a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CP_REG_RT_ANG_INC0__A    */
3989a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CP_REG_RT_ANG_INC1__A    */
3999a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* CP_REG_RT_DETECT_ENA__A  */
4009a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* CP_REG_RT_DETECT_TRH__A  */
4019a0bf528SMauro Carvalho Chehab 
4029a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_AC_NEXP_OFFS__A, 5),
4039a0bf528SMauro Carvalho Chehab 	0x32, 0x00,		/* CP_REG_AC_NEXP_OFFS__A   */
4049a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CP_REG_AC_AVER_POW__A    */
4059a0bf528SMauro Carvalho Chehab 	0x82, 0x00,		/* CP_REG_AC_MAX_POW__A     */
4069a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* CP_REG_AC_WEIGHT_MAN__A  */
4079a0bf528SMauro Carvalho Chehab 	0x0F, 0x00,		/* CP_REG_AC_WEIGHT_EXP__A  */
4089a0bf528SMauro Carvalho Chehab 
4099a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_AC_AMP_MODE__A, 2),
4109a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* CP_REG_AC_AMP_MODE__A    */
4119a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CP_REG_AC_AMP_FIX__A     */
4129a0bf528SMauro Carvalho Chehab 
4139a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_INTERVAL__A, 0x0005),
4149a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_RT_EXP_MARG__A, 0x0004),
4159a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_AC_ANG_MODE__A, 0x0003),
4169a0bf528SMauro Carvalho Chehab 
4179a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_COMM_EXEC__A, 0x0001),
4189a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4199a0bf528SMauro Carvalho Chehab };
4209a0bf528SMauro Carvalho Chehab 
4219a0bf528SMauro Carvalho Chehab u8 DRXD_InitCPB1[] = {
4229a0bf528SMauro Carvalho Chehab 	WR16(B_CP_REG_BR_SPL_OFFSET__A, 0x0008),
4239a0bf528SMauro Carvalho Chehab 	WR16(B_CP_COMM_EXEC__A, 0x0001),
4249a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4259a0bf528SMauro Carvalho Chehab };
4269a0bf528SMauro Carvalho Chehab 
4279a0bf528SMauro Carvalho Chehab u8 DRXD_InitCEA2[] = {
4289a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_AVG_POW__A, 4),
4299a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CE_REG_AVG_POW__A        */
4309a0bf528SMauro Carvalho Chehab 	0x78, 0x00,		/* CE_REG_MAX_POW__A        */
4319a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CE_REG_ATT__A            */
4329a0bf528SMauro Carvalho Chehab 	0x17, 0x00,		/* CE_REG_NRED__A           */
4339a0bf528SMauro Carvalho Chehab 
4349a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_NE_ERR_SELECT__A, 2),
4359a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CE_REG_NE_ERR_SELECT__A  */
4369a0bf528SMauro Carvalho Chehab 	0xEB, 0xFF,		/* CE_REG_NE_TD_CAL__A      */
4379a0bf528SMauro Carvalho Chehab 
4389a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_NE_MIXAVG__A, 2),
4399a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* CE_REG_NE_MIXAVG__A      */
4409a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_NE_NUPD_OFS__A    */
4419a0bf528SMauro Carvalho Chehab 
4429a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_PE_NEXP_OFFS__A, 2),
4439a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_PE_NEXP_OFFS__A   */
4449a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_PE_TIMESHIFT__A   */
4459a0bf528SMauro Carvalho Chehab 
4469a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_TP_A0_TAP_NEW__A, 3),
4479a0bf528SMauro Carvalho Chehab 	0x00, 0x01,		/* CE_REG_TP_A0_TAP_NEW__A       */
4489a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CE_REG_TP_A0_TAP_NEW_VALID__A */
4499a0bf528SMauro Carvalho Chehab 	0x0E, 0x00,		/* CE_REG_TP_A0_MU_LMS_STEP__A   */
4509a0bf528SMauro Carvalho Chehab 
4519a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_TP_A1_TAP_NEW__A, 3),
4529a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_TP_A1_TAP_NEW__A        */
4539a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CE_REG_TP_A1_TAP_NEW_VALID__A  */
4549a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* CE_REG_TP_A1_MU_LMS_STEP__A    */
4559a0bf528SMauro Carvalho Chehab 
4569a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_FI_SHT_INCR__A, 2),
4579a0bf528SMauro Carvalho Chehab 	0x12, 0x00,		/* CE_REG_FI_SHT_INCR__A          */
4589a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* CE_REG_FI_EXP_NORM__A          */
4599a0bf528SMauro Carvalho Chehab 
4609a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_IR_INPUTSEL__A, 3),
4619a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_IR_INPUTSEL__A          */
4629a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_IR_STARTPOS__A          */
4639a0bf528SMauro Carvalho Chehab 	0xFF, 0x00,		/* CE_REG_IR_NEXP_THRES__A        */
4649a0bf528SMauro Carvalho Chehab 
4659a0bf528SMauro Carvalho Chehab 	WR16(CE_REG_TI_NEXP_OFFS__A, 0x0000),
4669a0bf528SMauro Carvalho Chehab 
4679a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4689a0bf528SMauro Carvalho Chehab };
4699a0bf528SMauro Carvalho Chehab 
4709a0bf528SMauro Carvalho Chehab u8 DRXD_InitCEB1[] = {
4719a0bf528SMauro Carvalho Chehab 	WR16(B_CE_REG_TI_PHN_ENABLE__A, 0x0001),
4729a0bf528SMauro Carvalho Chehab 	WR16(B_CE_REG_FR_PM_SET__A, 0x000D),
4739a0bf528SMauro Carvalho Chehab 
4749a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4759a0bf528SMauro Carvalho Chehab };
4769a0bf528SMauro Carvalho Chehab 
4779a0bf528SMauro Carvalho Chehab u8 DRXD_InitEQA2[] = {
4789a0bf528SMauro Carvalho Chehab 	WRBLOCK(EQ_REG_OT_QNT_THRES0__A, 4),
4799a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* EQ_REG_OT_QNT_THRES0__A        */
4809a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* EQ_REG_OT_QNT_THRES1__A        */
4819a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EQ_REG_OT_CSI_STEP__A          */
4829a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EQ_REG_OT_CSI_OFFSET__A        */
4839a0bf528SMauro Carvalho Chehab 
4849a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_TD_REQ_SMB_CNT__A, 0x0200),
4859a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_IS_CLIP_EXP__A, 0x001F),
4869a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_SN_OFFSET__A, (u16) (-7)),
4879a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_RC_SEL_CAR__A, 0x0002),
4889a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_COMM_EXEC__A, 0x0001),
4899a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4909a0bf528SMauro Carvalho Chehab };
4919a0bf528SMauro Carvalho Chehab 
4929a0bf528SMauro Carvalho Chehab u8 DRXD_InitEQB1[] = {
4939a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_COMM_EXEC__A, 0x0001),
4949a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4959a0bf528SMauro Carvalho Chehab };
4969a0bf528SMauro Carvalho Chehab 
4979a0bf528SMauro Carvalho Chehab u8 DRXD_ResetECRAM[] = {
4989a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
4999a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
5009a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
5019a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
5029a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
5039a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
5049a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
5059a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
5069a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
5079a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
5089a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
5099a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
5109a0bf528SMauro Carvalho Chehab 
5119a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
5129a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
5139a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
5149a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
5159a0bf528SMauro Carvalho Chehab };
5169a0bf528SMauro Carvalho Chehab 
5179a0bf528SMauro Carvalho Chehab u8 DRXD_InitECA2[] = {
5189a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_SB_REG_CSI_HI__A, 6),
5199a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* EC_SB_REG_CSI_HI__A            */
5209a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* EC_SB_REG_CSI_LO__A            */
5219a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* EC_SB_REG_SMB_TGL__A           */
5229a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_HI__A            */
5239a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_MID__A           */
5249a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_LO__A            */
5259a0bf528SMauro Carvalho Chehab 
5269a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_RS_REG_REQ_PCK_CNT__A, 2),
5279a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_RS_REG_REQ_PCK_CNT__A       */
5289a0bf528SMauro Carvalho Chehab 	DATA16(EC_RS_REG_VAL_PCK),	/* EC_RS_REG_VAL__A               */
5299a0bf528SMauro Carvalho Chehab 
5309a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_TMD_TOP_MODE__A, 5),
5319a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_TOP_MODE__A      */
5329a0bf528SMauro Carvalho Chehab 	0xF4, 0x01,		/* EC_OC_REG_TMD_TOP_CNT__A       */
5339a0bf528SMauro Carvalho Chehab 	0xC0, 0x03,		/* EC_OC_REG_TMD_HIL_MAR__A       */
5349a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* EC_OC_REG_TMD_LOL_MAR__A       */
5359a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_CUR_CNT__A       */
5369a0bf528SMauro Carvalho Chehab 
5379a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_AVR_ASH_CNT__A, 2),
5389a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EC_OC_REG_AVR_ASH_CNT__A       */
5399a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EC_OC_REG_AVR_BSH_CNT__A       */
5409a0bf528SMauro Carvalho Chehab 
5419a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_MODE__A, 7),
5429a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* EC_OC_REG_RCN_MODE__A          */
5439a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CRA_LOP__A       */
5449a0bf528SMauro Carvalho Chehab 	0xc0, 0x00,		/* EC_OC_REG_RCN_CRA_HIP__A       */
5459a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_OC_REG_RCN_CST_LOP__A       */
5469a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CST_HIP__A       */
5479a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* EC_OC_REG_RCN_SET_LVL__A       */
5489a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* EC_OC_REG_RCN_GAI_LVL__A       */
5499a0bf528SMauro Carvalho Chehab 
5509a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_CLP_LOP__A, 2),
5519a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CLP_LOP__A       */
5529a0bf528SMauro Carvalho Chehab 	0xC0, 0x00,		/* EC_OC_REG_RCN_CLP_HIP__A       */
5539a0bf528SMauro Carvalho Chehab 
5549a0bf528SMauro Carvalho Chehab 	WR16(EC_SB_REG_CSI_OFS__A, 0x0001),
5559a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_FORCE__A, 0x0002),
5569a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_REQ_SMB_CNT__A, 0x0001),
5579a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_RLK_ENA__A, 0x0001),
5589a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_SYNC__A, 0x0664),
5599a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OC_MON_SIO__A, 0x0000),
5609a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_SNC_ISC_LVL__A, 0x0D0C),
5619a0bf528SMauro Carvalho Chehab 	/* Output zero on monitorbus pads, power saving */
5629a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_UOS__A,
5639a0bf528SMauro Carvalho Chehab 	     (EC_OC_REG_OCR_MON_UOS_DAT_0_ENABLE |
5649a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_1_ENABLE |
5659a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_2_ENABLE |
5669a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_3_ENABLE |
5679a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_4_ENABLE |
5689a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_5_ENABLE |
5699a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_6_ENABLE |
5709a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_7_ENABLE |
5719a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_8_ENABLE |
5729a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_9_ENABLE |
5739a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_VAL_ENABLE |
5749a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_CLK_ENABLE)),
5759a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_WRI__A,
5769a0bf528SMauro Carvalho Chehab 	     EC_OC_REG_OCR_MON_WRI_INIT),
5779a0bf528SMauro Carvalho Chehab 
5789a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
5799a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
5809a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
5819a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
5829a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
5839a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
5849a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
5859a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
5869a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
5879a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
5889a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
5899a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
5909a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
5919a0bf528SMauro Carvalho Chehab 
5929a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
5939a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
5949a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
5959a0bf528SMauro Carvalho Chehab 
5969a0bf528SMauro Carvalho Chehab 	WR16(EC_SB_REG_COMM_EXEC__A, 0x0001),
5979a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_COMM_EXEC__A, 0x0001),
5989a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0001),
5999a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_REG_COMM_EXEC__A, 0x0001),
6009a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
6019a0bf528SMauro Carvalho Chehab };
6029a0bf528SMauro Carvalho Chehab 
6039a0bf528SMauro Carvalho Chehab u8 DRXD_InitECB1[] = {
6049a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS0__A, 0x0001),
6059a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS1__A, 0x0001),
6069a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS2__A, 0x0001),
6079a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_LO__A, 0x000c),
6089a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_HI__A, 0x0018),
6099a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_HI__A, 0x007f),
6109a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_MID__A, 0x007f),
6119a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_LO__A, 0x007f),
6129a0bf528SMauro Carvalho Chehab 
6139a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_CLKMODE__A, 0x0002),
6149a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_PER__A, 0x0006),
6159a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_BUR__A, 0x0001),
6169a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCR_CLKMODE__A, 0x0000),
6179a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_GAI_LVL__A, 0x000D),
6189a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_OC_MPG_SIO__A, 0x0000),
6199a0bf528SMauro Carvalho Chehab 
6209a0bf528SMauro Carvalho Chehab 	/* Needed because shadow registers do not have correct default value */
6219a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CST_LOP__A, 0x1000),
6229a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CST_HIP__A, 0x0000),
6239a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CRA_LOP__A, 0x0000),
6249a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CRA_HIP__A, 0x00C0),
6259a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CLP_LOP__A, 0x0000),
6269a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CLP_HIP__A, 0x00C0),
6279a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_INC_LOP__A, 0x0000),
6289a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_INC_HIP__A, 0x00C0),
6299a0bf528SMauro Carvalho Chehab 
6309a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OD_REG_SYNC__A, 0x0664),
6319a0bf528SMauro Carvalho Chehab 	WR16(B_EC_RS_REG_REQ_PCK_CNT__A, 0x1000),
6329a0bf528SMauro Carvalho Chehab 
6339a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
6349a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
6359a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
6369a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
6379a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
6389a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
6399a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
6409a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
6419a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
6429a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
6439a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
6449a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
6459a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
6469a0bf528SMauro Carvalho Chehab 
6479a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
6489a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
6499a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
6509a0bf528SMauro Carvalho Chehab 
6519a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_COMM_EXEC__A, 0x0001),
6529a0bf528SMauro Carvalho Chehab 	WR16(B_EC_VD_REG_COMM_EXEC__A, 0x0001),
6539a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OD_REG_COMM_EXEC__A, 0x0001),
6549a0bf528SMauro Carvalho Chehab 	WR16(B_EC_RS_REG_COMM_EXEC__A, 0x0001),
6559a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
6569a0bf528SMauro Carvalho Chehab };
6579a0bf528SMauro Carvalho Chehab 
6589a0bf528SMauro Carvalho Chehab u8 DRXD_ResetECA2[] = {
6599a0bf528SMauro Carvalho Chehab 
6609a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_COMM_EXEC__A, 0x0000),
6619a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0000),
6629a0bf528SMauro Carvalho Chehab 
6639a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_TMD_TOP_MODE__A, 5),
6649a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_TOP_MODE__A      */
6659a0bf528SMauro Carvalho Chehab 	0xF4, 0x01,		/* EC_OC_REG_TMD_TOP_CNT__A       */
6669a0bf528SMauro Carvalho Chehab 	0xC0, 0x03,		/* EC_OC_REG_TMD_HIL_MAR__A       */
6679a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* EC_OC_REG_TMD_LOL_MAR__A       */
6689a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_CUR_CNT__A       */
6699a0bf528SMauro Carvalho Chehab 
6709a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_AVR_ASH_CNT__A, 2),
6719a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EC_OC_REG_AVR_ASH_CNT__A       */
6729a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EC_OC_REG_AVR_BSH_CNT__A       */
6739a0bf528SMauro Carvalho Chehab 
6749a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_MODE__A, 7),
6759a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* EC_OC_REG_RCN_MODE__A          */
6769a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CRA_LOP__A       */
6779a0bf528SMauro Carvalho Chehab 	0xc0, 0x00,		/* EC_OC_REG_RCN_CRA_HIP__A       */
6789a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_OC_REG_RCN_CST_LOP__A       */
6799a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CST_HIP__A       */
6809a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* EC_OC_REG_RCN_SET_LVL__A       */
6819a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* EC_OC_REG_RCN_GAI_LVL__A       */
6829a0bf528SMauro Carvalho Chehab 
6839a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_CLP_LOP__A, 2),
6849a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CLP_LOP__A       */
6859a0bf528SMauro Carvalho Chehab 	0xC0, 0x00,		/* EC_OC_REG_RCN_CLP_HIP__A       */
6869a0bf528SMauro Carvalho Chehab 
6879a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_SYNC__A, 0x0664),
6889a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OC_MON_SIO__A, 0x0000),
6899a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_SNC_ISC_LVL__A, 0x0D0C),
6909a0bf528SMauro Carvalho Chehab 	/* Output zero on monitorbus pads, power saving */
6919a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_UOS__A,
6929a0bf528SMauro Carvalho Chehab 	     (EC_OC_REG_OCR_MON_UOS_DAT_0_ENABLE |
6939a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_1_ENABLE |
6949a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_2_ENABLE |
6959a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_3_ENABLE |
6969a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_4_ENABLE |
6979a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_5_ENABLE |
6989a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_6_ENABLE |
6999a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_7_ENABLE |
7009a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_8_ENABLE |
7019a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_9_ENABLE |
7029a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_VAL_ENABLE |
7039a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_CLK_ENABLE)),
7049a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_WRI__A,
7059a0bf528SMauro Carvalho Chehab 	     EC_OC_REG_OCR_MON_WRI_INIT),
7069a0bf528SMauro Carvalho Chehab 
7079a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
7089a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
7099a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
7109a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
7119a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
7129a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
7139a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
7149a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
7159a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
7169a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
7179a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
7189a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
7199a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
7209a0bf528SMauro Carvalho Chehab 
7219a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
7229a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
7239a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
7249a0bf528SMauro Carvalho Chehab 
7259a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0001),
7269a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7279a0bf528SMauro Carvalho Chehab };
7289a0bf528SMauro Carvalho Chehab 
7299a0bf528SMauro Carvalho Chehab u8 DRXD_InitSC[] = {
7309a0bf528SMauro Carvalho Chehab 	WR16(SC_COMM_EXEC__A, 0),
7319a0bf528SMauro Carvalho Chehab 	WR16(SC_COMM_STATE__A, 0),
7329a0bf528SMauro Carvalho Chehab 
7339a0bf528SMauro Carvalho Chehab #ifdef COMPILE_FOR_QT
7349a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_BE_OPT_DELAY__A, 0x100),
7359a0bf528SMauro Carvalho Chehab #endif
7369a0bf528SMauro Carvalho Chehab 
7379a0bf528SMauro Carvalho Chehab 	/* SC is not started, this is done in SetChannels() */
7389a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7399a0bf528SMauro Carvalho Chehab };
7409a0bf528SMauro Carvalho Chehab 
7419a0bf528SMauro Carvalho Chehab /* Diversity settings */
7429a0bf528SMauro Carvalho Chehab 
7439a0bf528SMauro Carvalho Chehab u8 DRXD_InitDiversityFront[] = {
7449a0bf528SMauro Carvalho Chehab 	/* Start demod ********* RF in , diversity out **************************** */
7459a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_CONFIG__A, B_SC_RA_RAM_CONFIG_FR_ENABLE__M |
7469a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_FREQSCAN__M),
7479a0bf528SMauro Carvalho Chehab 
7489a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_2K__A, 0x7),
7499a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_8K__A, 0x7),
7509a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A, IRLEN_COARSE_8K),
7519a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A, 1 << (11 - IRLEN_COARSE_8K)),
7529a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A, 1 << (17 - IRLEN_COARSE_8K)),
7539a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A, IRLEN_FINE_8K),
7549a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A, 1 << (11 - IRLEN_FINE_8K)),
7559a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A, 1 << (17 - IRLEN_FINE_8K)),
7569a0bf528SMauro Carvalho Chehab 
7579a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A, IRLEN_COARSE_2K),
7589a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A, 1 << (11 - IRLEN_COARSE_2K)),
7599a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A, 1 << (17 - IRLEN_COARSE_2K)),
7609a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A, IRLEN_FINE_2K),
7619a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A, 1 << (11 - IRLEN_FINE_2K)),
7629a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A, 1 << (17 - IRLEN_FINE_2K)),
7639a0bf528SMauro Carvalho Chehab 
7649a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, 7),
7659a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, 4),
7669a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, 7),
7679a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, 4),
7689a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, 500),
7699a0bf528SMauro Carvalho Chehab 
7709a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0001),
7719a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_OC_MODE_HIP__A, 0x0010),
7729a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_PASS_B_CE |
7739a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_LOCAL_B_CE | B_EQ_REG_RC_SEL_CAR_MEAS_B_CE),
7749a0bf528SMauro Carvalho Chehab 
7759a0bf528SMauro Carvalho Chehab 	/*    0x2a ), *//* CE to PASS mux */
7769a0bf528SMauro Carvalho Chehab 
7779a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7789a0bf528SMauro Carvalho Chehab };
7799a0bf528SMauro Carvalho Chehab 
7809a0bf528SMauro Carvalho Chehab u8 DRXD_InitDiversityEnd[] = {
7819a0bf528SMauro Carvalho Chehab 	/* End demod *********** combining RF in and diversity in, MPEG TS out **** */
7829a0bf528SMauro Carvalho Chehab 	/* disable near/far; switch on timing slave mode */
7839a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_CONFIG__A, B_SC_RA_RAM_CONFIG_FR_ENABLE__M |
7849a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_FREQSCAN__M |
7859a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_DIV_ECHO_ENABLE__M |
7869a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_SLAVE__M |
7879a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_DIV_BLANK_ENABLE__M
7889a0bf528SMauro Carvalho Chehab /* MV from CtrlDiversity */
7899a0bf528SMauro Carvalho Chehab 	    ),
7909a0bf528SMauro Carvalho Chehab #ifdef DRXDDIV_SRMM_SLAVING
7919a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_2K__A, 0x3c7),
7929a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_8K__A, 0x3c7),
7939a0bf528SMauro Carvalho Chehab #else
7949a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_2K__A, 0x7),
7959a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_8K__A, 0x7),
7969a0bf528SMauro Carvalho Chehab #endif
7979a0bf528SMauro Carvalho Chehab 
7989a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A, IRLEN_COARSE_8K),
7999a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A, 1 << (11 - IRLEN_COARSE_8K)),
8009a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A, 1 << (17 - IRLEN_COARSE_8K)),
8019a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A, IRLEN_FINE_8K),
8029a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A, 1 << (11 - IRLEN_FINE_8K)),
8039a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A, 1 << (17 - IRLEN_FINE_8K)),
8049a0bf528SMauro Carvalho Chehab 
8059a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A, IRLEN_COARSE_2K),
8069a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A, 1 << (11 - IRLEN_COARSE_2K)),
8079a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A, 1 << (17 - IRLEN_COARSE_2K)),
8089a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A, IRLEN_FINE_2K),
8099a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A, 1 << (11 - IRLEN_FINE_2K)),
8109a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A, 1 << (17 - IRLEN_FINE_2K)),
8119a0bf528SMauro Carvalho Chehab 
8129a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, 7),
8139a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, 4),
8149a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, 7),
8159a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, 4),
8169a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, 500),
8179a0bf528SMauro Carvalho Chehab 
8189a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0001),
8199a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8209a0bf528SMauro Carvalho Chehab };
8219a0bf528SMauro Carvalho Chehab 
8229a0bf528SMauro Carvalho Chehab u8 DRXD_DisableDiversity[] = {
8239a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_2K__A, B_SC_RA_RAM_LC_ABS_2K__PRE),
8249a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_8K__A, B_SC_RA_RAM_LC_ABS_8K__PRE),
8259a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A,
8269a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_LENGTH__PRE),
8279a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A,
8289a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_FREQINC__PRE),
8299a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A,
8309a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_KAISINC__PRE),
8319a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A,
8329a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_LENGTH__PRE),
8339a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A,
8349a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_FREQINC__PRE),
8359a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A,
8369a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_KAISINC__PRE),
8379a0bf528SMauro Carvalho Chehab 
8389a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A,
8399a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_LENGTH__PRE),
8409a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A,
8419a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_FREQINC__PRE),
8429a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A,
8439a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_KAISINC__PRE),
8449a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A,
8459a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_LENGTH__PRE),
8469a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A,
8479a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_FREQINC__PRE),
8489a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A,
8499a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_KAISINC__PRE),
8509a0bf528SMauro Carvalho Chehab 
8519a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, B_LC_RA_RAM_FILTER_CRMM_A__PRE),
8529a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, B_LC_RA_RAM_FILTER_CRMM_B__PRE),
8539a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, B_LC_RA_RAM_FILTER_SRMM_A__PRE),
8549a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, B_LC_RA_RAM_FILTER_SRMM_B__PRE),
8559a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, B_LC_RA_RAM_FILTER_SYM_SET__PRE),
8569a0bf528SMauro Carvalho Chehab 
8579a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0000),
8589a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_INIT),	/* combining disabled */
8599a0bf528SMauro Carvalho Chehab 
8609a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8619a0bf528SMauro Carvalho Chehab };
8629a0bf528SMauro Carvalho Chehab 
8639a0bf528SMauro Carvalho Chehab u8 DRXD_StartDiversityFront[] = {
8649a0bf528SMauro Carvalho Chehab 	/* Start demod, RF in and diversity out, no combining */
8659a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 0x0),
8669a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_FDB_IN__A, 0x0),
8679a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_INVEXT__A, 0x0),
8689a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_COMM_MB__A, 0x12),	/* EQ to MB out */
8699a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_PASS_B_CE |	/* CE to PASS mux */
8709a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_LOCAL_B_CE | B_EQ_REG_RC_SEL_CAR_MEAS_B_CE),
8719a0bf528SMauro Carvalho Chehab 
8729a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_ECHO_SHIFT_LIM__A, 2),
8739a0bf528SMauro Carvalho Chehab 
8749a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8759a0bf528SMauro Carvalho Chehab };
8769a0bf528SMauro Carvalho Chehab 
8779a0bf528SMauro Carvalho Chehab u8 DRXD_StartDiversityEnd[] = {
8789a0bf528SMauro Carvalho Chehab 	/* End demod, combining RF in and diversity in, MPEG TS out */
8799a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 0x0),	/* disable impulse noise cruncher */
8809a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_INVEXT__A, 0x0),	/* clock inversion (for sohard board) */
881868c9a17SMauro Carvalho Chehab 	WR16(B_CP_REG_BR_STR_DEL__A, 10),	/* apparently no mb delay matching is best */
8829a0bf528SMauro Carvalho Chehab 
8839a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_DIV_ON |	/* org = 0x81 combining enabled */
8849a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_MEAS_A_CC |
8859a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_PASS_A_CC | B_EQ_REG_RC_SEL_CAR_LOCAL_A_CC),
8869a0bf528SMauro Carvalho Chehab 
8879a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8889a0bf528SMauro Carvalho Chehab };
8899a0bf528SMauro Carvalho Chehab 
8909a0bf528SMauro Carvalho Chehab u8 DRXD_DiversityDelay8MHZ[] = {
8919a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_32__A, 1150 - 50),
8929a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_16__A, 1100 - 50),
8939a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_8__A, 1000 - 50),
8949a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_4__A, 800 - 50),
8959a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_32__A, 5420 - 50),
8969a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_16__A, 5200 - 50),
8979a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_8__A, 4800 - 50),
8989a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_4__A, 4000 - 50),
8999a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
9009a0bf528SMauro Carvalho Chehab };
9019a0bf528SMauro Carvalho Chehab 
9029a0bf528SMauro Carvalho Chehab u8 DRXD_DiversityDelay6MHZ[] =	/* also used ok for 7 MHz */
9039a0bf528SMauro Carvalho Chehab {
9049a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_32__A, 1100 - 50),
9059a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_16__A, 1000 - 50),
9069a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_8__A, 900 - 50),
9079a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_4__A, 600 - 50),
9089a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_32__A, 5300 - 50),
9099a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_16__A, 5000 - 50),
9109a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_8__A, 4500 - 50),
9119a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_4__A, 3500 - 50),
9129a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
9139a0bf528SMauro Carvalho Chehab };
914