| /* |
| Montage Technology M88RS6000 |
| - DVBS/S2 Satellite demod/tuner driver |
| Copyright (C) 2014 Max Nibble <nibble.max@gmail.com> |
| |
| */ |
| |
| #ifndef DVBSKY_M88RS6000_PRIV_H |
| #define DVBSKY_M88RS6000_PRIV_H |
| |
| #define FW_DOWN_SIZE 32 |
| #define FW_DOWN_LOOP (8192/FW_DOWN_SIZE) |
| #define RS6000_DEFAULT_FIRMWARE "dvbsky-firmware/dvb-fe-rs6000.fw" |
| #define MT_FE_MCLK_KHZ 96000 /* in kHz */ |
| #define MT_FE_CRYSTAL_KHZ 27000 /* in kHz */ |
| #define FREQ_OFFSET_AT_SMALL_SYM_RATE_KHz 3000 |
| #define RS6000_ID 0x6000 |
| |
| struct m88rs6000_state { |
| struct i2c_adapter *i2c; |
| const struct dvbsky_m88rs6000_config *config; |
| |
| struct dvb_frontend frontend; |
| |
| u8 tuner_addr; |
| u32 preBer; |
| u8 skip_fw_load; |
| u8 first_lock; /* The first time of signal lock */ |
| u16 demod_id; /* demod chip type */ |
| u16 tuner_id; /* tuner chip type */ |
| fe_delivery_system_t delivery_system; |
| u32 iMclkKHz; |
| }; |
| |
| /* For M88RS6000 demod dvbs mode.*/ |
| static u8 rs6000_dvbs_init_tab[] = { |
| 0x23, 0x07, |
| 0x08, 0x03, |
| 0x0c, 0x02, |
| 0x20, 0x00, |
| 0x21, 0x54, |
| 0x25, 0x82, |
| 0x27, 0x31, |
| 0x30, 0x08, |
| 0x31, 0x40, |
| 0x32, 0x32, |
| 0x33, 0x35, |
| 0x35, 0xff, |
| 0x3a, 0x00, |
| 0x37, 0x10, |
| 0x38, 0x10, |
| 0x39, 0x02, |
| 0x42, 0x60, |
| 0x4a, 0x80, |
| 0x4b, 0x04, |
| 0x4d, 0x91, |
| 0x5d, 0xc8, |
| 0x50, 0x36, |
| 0x51, 0x36, |
| 0x52, 0x36, |
| 0x53, 0x36, |
| 0x63, 0x0f, |
| 0x64, 0x30, |
| 0x65, 0x40, |
| 0x68, 0x26, |
| 0x69, 0x4c, |
| 0x70, 0x20, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x40, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x60, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x80, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0xa0, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x1f, |
| 0x76, 0x38, |
| 0x77, 0xa6, |
| 0x78, 0x0c, |
| 0x79, 0x80, |
| 0x7f, 0x14, |
| 0x7c, 0x00, |
| 0xae, 0x82, |
| 0x80, 0x64, |
| 0x81, 0x66, |
| 0x82, 0x44, |
| 0x85, 0x04, |
| 0xcd, 0xf4, |
| 0x90, 0x33, |
| 0xa0, 0x44, |
| 0xbe, 0x00, |
| 0xc0, 0x08, |
| 0xc3, 0x10, |
| 0xc4, 0x08, |
| 0xc5, 0xf0, |
| 0xc6, 0xff, |
| 0xc7, 0x00, |
| 0xc8, 0x1a, |
| 0xc9, 0x80, |
| 0xe0, 0xf8, |
| 0xe6, 0x8b, |
| 0xd0, 0x40, |
| 0xf8, 0x20, |
| 0xfa, 0x0f, |
| 0x00, 0x00, |
| 0xbd, 0x01, |
| 0xb8, 0x00, |
| }; |
| |
| /* For M88RS6000 demod dvbs2 mode.*/ |
| static u8 rs6000_dvbs2_init_tab[] = { |
| 0x23, 0x07, |
| 0x08, 0x07, |
| 0x0c, 0x02, |
| 0x20, 0x00, |
| 0x21, 0x54, |
| 0x25, 0x82, |
| 0x27, 0x31, |
| 0x30, 0x08, |
| 0x32, 0x32, |
| 0x33, 0x35, |
| 0x35, 0xff, |
| 0x3a, 0x00, |
| 0x37, 0x10, |
| 0x38, 0x10, |
| 0x39, 0x02, |
| 0x42, 0x60, |
| 0x4a, 0x80, |
| 0x4b, 0x04, |
| 0x4d, 0x91, |
| 0x5d, 0xc8, |
| 0x50, 0x36, |
| 0x51, 0x36, |
| 0x52, 0x36, |
| 0x53, 0x36, |
| 0x63, 0x0f, |
| 0x64, 0x10, |
| 0x65, 0x20, |
| 0x68, 0x46, |
| 0x69, 0xcd, |
| 0x70, 0x20, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x40, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x60, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x80, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0xa0, |
| 0x71, 0x70, |
| 0x72, 0x04, |
| 0x73, 0x00, |
| 0x70, 0x1f, |
| 0x76, 0x38, |
| 0x77, 0xa6, |
| 0x78, 0x0c, |
| 0x79, 0x80, |
| 0x7f, 0x14, |
| 0x85, 0x08, |
| 0xcd, 0xf4, |
| 0x90, 0x33, |
| 0x86, 0x00, |
| 0x87, 0x0f, |
| 0x89, 0x00, |
| 0x8b, 0x44, |
| 0x8c, 0x66, |
| 0x9d, 0xc1, |
| 0x8a, 0x10, |
| 0xad, 0x40, |
| 0xa0, 0x44, |
| 0xbe, 0x00, |
| 0xc0, 0x08, |
| 0xc1, 0x10, |
| 0xc2, 0x08, |
| 0xc3, 0x10, |
| 0xc4, 0x08, |
| 0xc5, 0xf0, |
| 0xc6, 0xff, |
| 0xc7, 0x00, |
| 0xc8, 0x1a, |
| 0xc9, 0x80, |
| 0xca, 0x23, |
| 0xcb, 0x24, |
| 0xcc, 0xf4, |
| 0xce, 0x74, |
| 0x00, 0x00, |
| 0xbd, 0x01, |
| 0xb8, 0x00, |
| }; |
| |
| #endif /* DVBSKY_M88RS6000_PRIV_H */ |