Lines Matching +full:0 +full:xc4000

17 #include "xc4000.h"
29 …vation of Low-Noise-Amplifier(s) (LNA), if applicable for the device (default: 0=automatic/off).");
42 .i2c_address = 0x60,
45 .i2c_address = 0x61,
52 .setup = (1 << 8) | (5 << 5) | (0 << 4) | (0 << 3) | (0 << 2) | (2 << 0),
57 .agc2_min = 0,
59 .agc1_pt1 = 0,
62 .agc1_slope1 = 0,
65 .agc2_pt1 = 0,
74 .max_time = 0x196,
75 .ln_adc_level = 0x1cc7,
79 .max_time = 0x196,
80 .ln_adc_level = 0x1cc7,
88 if (adap->id == 0) { in bristol_frontend_attach()
89 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
91 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
97 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); in bristol_frontend_attach()
99 …numeration(&adap->dev->i2c_adap, 2, DEFAULT_DIB3000P_I2C_ADDRESS, bristol_dib3000mc_config) != 0) { in bristol_frontend_attach()
100 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
105 return (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, in bristol_frontend_attach()
106 (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; in bristol_frontend_attach()
112 { .addr = 0x50, .flags = 0, .buf = &adrs, .len = 1 }, in eeprom_read()
113 { .addr = 0x50, .flags = I2C_M_RD, .buf = pval, .len = 1 }, in eeprom_read()
116 return 0; in eeprom_read()
122 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); in bristol_tuner_attach()
127 if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; in bristol_tuner_attach()
129 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, in bristol_tuner_attach()
131 -ENODEV : 0; in bristol_tuner_attach()
141 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm…
142 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
143 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8)
144 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
149 0,
152 0,
155 0,
162 0,
181 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm…
182 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
183 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8)
184 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
189 0,
192 0,
195 0,
198 0,
202 0,
206 0,
210 0,
228 .pll_bypass = 0,
229 .enable_refdiv = 0,
230 .bypclk_div = 0,
234 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
235 .ifreq = 0,
267 { .i2c_address = 0x60
269 { .i2c_address = 0x60
280 if (adap->id == 0) { in stk7700P2_frontend_attach()
286 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700P2_frontend_attach()
292 != 0) { in stk7700P2_frontend_attach()
299 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in stk7700P2_frontend_attach()
300 0x80 + (adap->id << 1), in stk7700P2_frontend_attach()
303 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700P2_frontend_attach()
313 if (adap->id == 0) { in stk7700d_frontend_attach()
319 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700d_frontend_attach()
326 != 0) { in stk7700d_frontend_attach()
333 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in stk7700d_frontend_attach()
334 0x80 + (adap->id << 1), in stk7700d_frontend_attach()
337 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700d_frontend_attach()
345 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in stk7700d_tuner_attach()
347 return dvb_attach(mt2266_attach, adap->fe_adap[0].fe, tun_i2c, in stk7700d_tuner_attach()
348 &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; in stk7700d_tuner_attach()
354 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0,
355 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
356 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
357 ….setup = (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) | (0 << 4)…
360 .alpha_level = 0,
362 .wbd_inv = 0,
364 .wbd_sel = 0,
366 .agc1_max = 0,
367 .agc1_min = 0,
370 .agc1_pt1 = 0,
371 .agc1_pt2 = 0,
372 .agc1_pt3 = 0,
373 .agc1_slope1 = 0,
374 .agc1_slope2 = 0,
375 .agc2_pt1 = 0,
394 .pll_bypass = 0,
395 .enable_refdiv = 0,
396 .bypclk_div = 0,
399 .modulo = 0,
400 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */
428 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); in stk7700ph_xc3028_callback()
430 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in stk7700ph_xc3028_callback()
440 return 0; in stk7700ph_xc3028_callback()
450 .i2c_addr = 0x61,
464 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7700ph_frontend_attach()
471 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700ph_frontend_attach()
479 &stk7700ph_dib7700_xc3028_config) != 0) { in stk7700ph_frontend_attach()
486 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7700ph_frontend_attach()
489 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700ph_frontend_attach()
497 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in stk7700ph_tuner_attach()
503 adap->fe_adap[0].fe->callback = stk7700ph_xc3028_callback; in stk7700ph_tuner_attach()
505 return dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &stk7700ph_xc3028_config) in stk7700ph_tuner_attach()
506 == NULL ? -ENODEV : 0; in stk7700ph_tuner_attach()
524 if (st->fw_version >= 0x10200) { in dib0700_rc_query_old_firmware()
529 return 0; in dib0700_rc_query_old_firmware()
532 st->buf[0] = REQUEST_POLL_RC; in dib0700_rc_query_old_firmware()
533 st->buf[1] = 0; in dib0700_rc_query_old_firmware()
536 if (i <= 0) { in dib0700_rc_query_old_firmware()
542 if (st->buf[0] == 0 && st->buf[1] == 0 in dib0700_rc_query_old_firmware()
543 && st->buf[2] == 0 && st->buf[3] == 0) in dib0700_rc_query_old_firmware()
544 return 0; in dib0700_rc_query_old_firmware()
552 /* NEC protocol sends repeat code as 0 0 0 FF */ in dib0700_rc_query_old_firmware()
553 if ((st->buf[3 - 2] == 0x00) && (st->buf[3 - 3] == 0x00) && in dib0700_rc_query_old_firmware()
554 (st->buf[3] == 0xff)) { in dib0700_rc_query_old_firmware()
556 return 0; in dib0700_rc_query_old_firmware()
561 toggle = 0; in dib0700_rc_query_old_firmware()
573 return 0; in dib0700_rc_query_old_firmware()
580 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm…
581 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
582 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
583 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
588 0,
591 0,
593 0,
594 0,
600 0,
616 { 0,
625 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm…
626 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
627 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) | (0 << 4)…
630 .alpha_level = 0,
632 .wbd_inv = 0,
634 .wbd_sel = 0,
635 .wbd_alpha = 0,
639 .agc2_min = 0,
640 .agc1_pt1 = 0,
643 .agc1_slope1 = 0,
645 .agc2_pt1 = 0,
646 .agc2_pt2 = 0,
647 .agc2_slope1 = 0,
653 .perform_agc_softsplit = 0,
663 .pll_bypass = 0,
664 .enable_refdiv = 0,
665 .bypclk_div = 0,
668 .modulo = 0,
669 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
711 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700p_frontend_attach()
712 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(50); in stk7700p_frontend_attach()
717 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); in stk7700p_frontend_attach()
723 st->mt2060_if1[0] = 1220; in stk7700p_frontend_attach()
726 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config… in stk7700p_frontend_attach()
729 memset(&state->dib7000p_ops, 0, sizeof(state->dib7000p_ops)); in stk7700p_frontend_attach()
730 …adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_con… in stk7700p_frontend_attach()
733 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700p_frontend_attach()
737 0x60
751 if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; in stk7700p_tuner_attach()
754 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in stk7700p_tuner_attach()
756 tun_i2c = dib7000m_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in stk7700p_tuner_attach()
758 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk7700p_mt2060_config, in stk7700p_tuner_attach()
759 if1) == NULL ? -ENODEV : 0; in stk7700p_tuner_attach()
765 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm…
766 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
767 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) | (0 << 4)…
770 .alpha_level = 0,
772 .wbd_inv = 0,
777 .agc1_min = 0,
779 .agc2_min = 0,
780 .agc1_pt1 = 0,
793 .perform_agc_softsplit = 0,
802 return state->dib7000p_ops.set_gpio(fe, 8, 0, !onoff); in dib7070_tuner_reset()
811 return state->dib7000p_ops.set_gpio(fe, 9, 0, onoff); in dib7070_tuner_sleep()
836 .clock_pad_drive = 0,
869 state->dib7000p_ops.set_gpio(fe, 0, 0, 1); in dib7770_set_param_override()
874 state->dib7000p_ops.set_gpio(fe, 0, 0, 0); in dib7770_set_param_override()
886 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in dib7770p_tuner_attach()
889 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib7770p_tuner_attach()
893 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib7770p_tuner_attach()
894 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7770_set_param_override; in dib7770p_tuner_attach()
895 return 0; in dib7770p_tuner_attach()
901 …struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INT… in dib7070p_tuner_attach()
903 if (adap->id == 0) { in dib7070p_tuner_attach()
904 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) in dib7070p_tuner_attach()
907 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) in dib7070p_tuner_attach()
911 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib7070p_tuner_attach()
912 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; in dib7070p_tuner_attach()
913 return 0; in dib7070p_tuner_attach()
923 return state->dib7000p_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); in stk7700p_pid_filter()
924 return dib7000m_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); in stk7700p_pid_filter()
932 return state->dib7000p_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); in stk7700p_pid_filter_ctrl()
933 return dib7000m_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); in stk7700p_pid_filter_ctrl()
939 return state->dib7000p_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); in stk70x0p_pid_filter()
945 return state->dib7000p_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); in stk70x0p_pid_filter_ctrl()
955 .pll_bypass = 0,
956 .enable_refdiv = 0,
957 .bypclk_div = 0,
961 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
962 .ifreq = (0 << 25) | 0,
994 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7070p_frontend_attach()
1001 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7070p_frontend_attach()
1011 &dib7070p_dib7000p_config) != 0) { in stk7070p_frontend_attach()
1018 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7070p_frontend_attach()
1020 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070p_frontend_attach()
1039 .disable_sample_and_hold = 0,
1052 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7770p_frontend_attach()
1059 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7770p_frontend_attach()
1069 &dib7770p_dib7000p_config) != 0) { in stk7770p_frontend_attach()
1076 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7770p_frontend_attach()
1078 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7770p_frontend_attach()
1085 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1086 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1087 * P_agc_inv_pwm2=0,P_agc_inh_dc_rv_est=0,
1088 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1089 * P_agc_write=0 */
1090 (0 << 15) | (0 << 14) | (7 << 11) | (0 << 10) | (0 << 9) |
1091 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1092 (0 << 0), /* setup*/
1097 0, /* alpha_level*/
1100 0, /* wbd_inv*/
1106 0, /* agc1_min*/
1109 0, /* agc2_min*/
1111 0, /* agc1_pt1*/
1126 0, /* perform_agc_softsplit*/
1129 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1130 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1131 * P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1132 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1133 * P_agc_write=0 */
1134 (0 << 15) | (0 << 14) | (1 << 11) | (0 << 10) | (0 << 9) |
1135 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1136 (0 << 0), /* setup */
1141 0, /* alpha_level*/
1144 0, /* wbd_inv*/
1150 0, /* agc1_min*/
1153 0, /* agc2_min*/
1155 0, /* agc1_pt1*/
1170 0, /* perform_agc_softsplit*/
1181 .pll_bypass = 0,
1182 .enable_refdiv = 0,
1183 .bypclk_div = 0,
1187 .sad_cfg = (3 << 14) | (1 << 12) | (599 << 0), /* sad_cfg: refsel, sel, freq_15k*/
1188 .ifreq = (0 << 25) | 0, /* ifreq = 0.000000 MHz*/
1210 .drives = 0x2d98,
1226 .drives = 0x2d98,
1235 return state->dib8000_ops.set_gpio(fe, 5, 0, !onoff); in dib80xx_tuner_reset()
1243 return state->dib8000_ops.set_gpio(fe, 0, 0, onoff); in dib80xx_tuner_sleep()
1248 { 0xffff, 6},
1261 .charge_pump = 0,
1263 .osc_buffer_state = 0,
1275 .charge_pump = 0,
1277 .osc_buffer_state = 0,
1308 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, in dib807x_tuner_attach()
1311 if (adap->id == 0) { in dib807x_tuner_attach()
1312 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib807x_tuner_attach()
1313 &dib807x_dib0070_config[0]) == NULL) in dib807x_tuner_attach()
1316 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib807x_tuner_attach()
1321 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib807x_tuner_attach()
1322 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib807x_set_param_override; in dib807x_tuner_attach()
1323 return 0; in dib807x_tuner_attach()
1331 return state->dib8000_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); in stk80xx_pid_filter()
1339 return state->dib8000_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); in stk80xx_pid_filter_ctrl()
1356 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk807x_frontend_attach()
1366 0x80, 0); in stk807x_frontend_attach()
1368 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, in stk807x_frontend_attach()
1369 &dib807x_dib8000_config[0]); in stk807x_frontend_attach()
1371 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807x_frontend_attach()
1382 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk807xpvr_frontend_attach0()
1390 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk807xpvr_frontend_attach0()
1399 /* initialize IC 0 */ in stk807xpvr_frontend_attach0()
1400 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80, 0); in stk807xpvr_frontend_attach0()
1402 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, in stk807xpvr_frontend_attach0()
1403 &dib807x_dib8000_config[0]); in stk807xpvr_frontend_attach0()
1405 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807xpvr_frontend_attach0()
1416 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82, 0); in stk807xpvr_frontend_attach1()
1418 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, in stk807xpvr_frontend_attach1()
1421 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807xpvr_frontend_attach1()
1428 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1429 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1430 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1431 .setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1432 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1437 .alpha_level = 0,
1440 .wbd_inv = 0,
1446 .agc1_min = 0,
1449 .agc2_min = 0,
1451 .agc1_pt1 = 0,
1466 .perform_agc_softsplit = 0,
1470 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1471 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1472 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1473 .setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1474 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1479 .alpha_level = 0,
1482 .wbd_inv = 0,
1487 .agc1_max = 0,
1488 .agc1_min = 0,
1491 .agc2_min = 0,
1493 .agc1_pt1 = 0,
1508 .perform_agc_softsplit = 0,
1520 .pll_bypass = 0,
1522 .enable_refdiv = 0,
1523 .bypclk_div = 0,
1528 .sad_cfg = (3 << 14) | (1 << 12) | (599 << 0),
1530 .ifreq = (0 << 25) | 0,
1549 if (restart == 0) /* before AGC startup */ in dib8090_agc_control()
1568 .div_cfg = 0x31,
1570 .drives = 0x2d98,
1587 .div_cfg = 0x31,
1589 .drives = 0x2d08,
1597 { 120, 0, 500, 0, 500, 4 }, /* CBAND */
1598 { 170, 0, 450, 0, 450, 4 }, /* CBAND */
1601 { 0xFFFF, 34, 700, 36, 616, 6 }, /* default */
1610 .io.pll_int_loop_filt = 0,
1629 u32 freq_adc, ratio, rest, max = 0; in dib8090_compute_pll_parameters()
1657 int ret = 0; in dib8096_set_param_override()
1665 state->dib8000_ops.set_gpio(fe, 3, 0, 1); in dib8096_set_param_override()
1668 state->dib8000_ops.set_gpio(fe, 3, 0, 0); in dib8096_set_param_override()
1673 if (ret < 0) in dib8096_set_param_override()
1682 …b8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, 0); in dib8096_set_param_override()
1715 state->dib8000_ops.set_gpio(fe, 6, 0, 1); in dib8096_set_param_override()
1719 state->dib8000_ops.set_gpio(fe, 6, 0, 0); in dib8096_set_param_override()
1733 return 0; in dib8096_set_param_override()
1739 …struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTE… in dib809x_tuner_attach()
1741 /* FIXME: if adap->id != 0, check if it is fe_adap[1] */ in dib809x_tuner_attach()
1742 if (!dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config)) in dib809x_tuner_attach()
1745 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib809x_tuner_attach()
1746 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; in dib809x_tuner_attach()
1747 return 0; in dib809x_tuner_attach()
1763 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk809x_frontend_attach()
1772 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80, 0); in stk809x_frontend_attach()
1774 …adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[ in stk809x_frontend_attach()
1776 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk809x_frontend_attach()
1786 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x82, 0); in stk809x_frontend1_attach()
1788 …adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[… in stk809x_frontend1_attach()
1790 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk809x_frontend1_attach()
1797 struct dvb_frontend *fe_slave = st->dib8000_ops.get_slave_frontend(adap->fe_adap[0].fe, 1); in nim8096md_tuner_attach()
1803 fe_slave->dvb = adap->fe_adap[0].fe->dvb; in nim8096md_tuner_attach()
1806 tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in nim8096md_tuner_attach()
1807 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) in nim8096md_tuner_attach()
1810 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in nim8096md_tuner_attach()
1811 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; in nim8096md_tuner_attach()
1813 return 0; in nim8096md_tuner_attach()
1824 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in nim8096md_frontend_attach()
1832 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim8096md_frontend_attach()
1841 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 0x80, 0); in nim8096md_frontend_attach()
1843 …adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[ in nim8096md_frontend_attach()
1844 if (adap->fe_adap[0].fe == NULL) in nim8096md_frontend_attach()
1851 fe_slave = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); in nim8096md_frontend_attach()
1852 state->dib8000_ops.set_slave_frontend(adap->fe_adap[0].fe, fe_slave); in nim8096md_frontend_attach()
1854 return fe_slave == NULL ? -ENODEV : 0; in nim8096md_frontend_attach()
1861 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1862 P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1863 P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1864 P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1865 P_agc_write=0 */
1866 .setup = (0 << 15) | (0 << 14) | (5 << 11)
1867 | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5)
1868 | (0 << 4) | (5 << 1) | (0 << 0),
1873 .alpha_level = 0,
1876 .wbd_inv = 0,
1882 .agc1_min = 0,
1885 .agc2_min = 0,
1887 .agc1_pt1 = 0,
1888 .agc1_pt2 = 0,
1890 .agc1_slope1 = 0,
1895 .agc2_slope2 = 0,
1902 .perform_agc_softsplit = 0,
1905 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1906 P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1907 P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1908 P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1909 P_agc_write=0 */
1910 .setup = (0 << 15) | (0 << 14) | (5 << 11)
1911 | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5)
1912 | (0 << 4) | (5 << 1) | (0 << 0),
1917 .alpha_level = 0,
1920 .wbd_inv = 0,
1926 .agc1_min = 0,
1929 .agc2_min = 0,
1931 .agc1_pt1 = 0,
1932 .agc1_pt2 = 0,
1934 .agc1_slope1 = 0,
1939 .agc2_slope2 = 0,
1946 .perform_agc_softsplit = 0,
1956 .pll_reset = 0,
1957 .pll_bypass = 0,
1958 .enable_refdiv = 0,
1959 .bypclk_div = 0,
1960 .IO_CLK_en_core = 0,
1961 .ADClkSrc = 0,
1963 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
1964 .ifreq = (0 << 25) | 0,
1991 {1700, 0, 250, 0, 100, 6},
1992 {2600, 0, 250, 0, 100, 6},
1993 { 0xFFFF, 0, 0, 0, 0, 0},
1998 .io.pll_bypass = 0,
1999 .io.pll_range = 0,
2002 .io.adc_clock_ratio = 0,
2003 .io.pll_int_loop_filt = 0,
2011 .analog_output = 0,
2013 .wbd_vhf_offset = 0,
2014 .wbd_cband_offset = 0,
2016 .clkoutdrive = 0,
2020 .ls_cfg_pad_drv = 0,
2021 .data_tx_drv = 0,
2024 .force_cband_input = 0,
2035 u8 spur = 0, prediv = 0, loopdiv = 0, min_prediv = 1, max_prediv = 1; in dib8096p_get_best_sampling()
2041 u32 fcp = 0, fs = 0, fdem = 0, fmem = 0; in dib8096p_get_best_sampling()
2042 u32 harmonic_id = 0; in dib8096p_get_best_sampling()
2044 adc->timf = 0; in dib8096p_get_best_sampling()
2075 spur = 0; in dib8096p_get_best_sampling()
2100 if (adc->pll_loopdiv == 0 && adc->pll_prediv == 0) in dib8096p_get_best_sampling()
2102 return 0; in dib8096p_get_best_sampling()
2115 if (ret < 0) in dib8096p_agc_startup()
2117 memset(&pll, 0, sizeof(struct dibx000_bandwidth_config)); in dib8096p_agc_startup()
2125 if (dib8096p_get_best_sampling(fe, &adc) == 0) { in dib8096p_agc_startup()
2130 state->dib8000_ops.update_pll(fe, &pll, fe->dtv_property_cache.bandwidth_hz / 1000, 0); in dib8096p_agc_startup()
2134 return 0; in dib8096p_agc_startup()
2147 if (fw_version >= 0x10200) in tfe8096p_frontend_attach()
2156 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe8096p_frontend_attach()
2165 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80, 1); in tfe8096p_frontend_attach()
2167 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, in tfe8096p_frontend_attach()
2168 0x80, &tfe8096p_dib8000_config); in tfe8096p_frontend_attach()
2170 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe8096p_frontend_attach()
2176 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe8096p_tuner_attach()
2182 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, in tfe8096p_tuner_attach()
2186 st->dib8000_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe8096p_tuner_attach()
2188 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe8096p_tuner_attach()
2189 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096p_agc_startup; in tfe8096p_tuner_attach()
2190 return 0; in tfe8096p_tuner_attach()
2196 return dib9000_fw_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); in dib90x0_pid_filter()
2201 return dib9000_fw_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); in dib90x0_pid_filter_ctrl()
2206 return dib9000_set_gpio(fe, 5, 0, !onoff); in dib90x0_tuner_reset()
2211 return dib9000_set_gpio(fe, 0, 0, onoff); in dib90x0_tuner_sleep()
2216 u8 wb[4] = { 0xc >> 8, 0xc & 0xff, 0, 0 }; in dib01x0_pmu_update()
2219 {.addr = 0x1e >> 1, .flags = 0, .buf = wb, .len = 2}, in dib01x0_pmu_update()
2220 {.addr = 0x1e >> 1, .flags = I2C_M_RD, .buf = rb, .len = 2}, in dib01x0_pmu_update()
2229 switch (rb[0] << 8 | rb[1]) { in dib01x0_pmu_update()
2230 case 0: in dib01x0_pmu_update()
2244 for (index_data = 0; index_data < len; index_data += 2) { in dib01x0_pmu_update()
2245 wb[2] = (data[index_data + 1] >> 8) & 0xff; in dib01x0_pmu_update()
2246 wb[3] = (data[index_data + 1]) & 0xff; in dib01x0_pmu_update()
2248 if (data[index_data] == 0) { in dib01x0_pmu_update()
2249 wb[0] = (data[index_data] >> 8) & 0xff; in dib01x0_pmu_update()
2250 wb[1] = (data[index_data]) & 0xff; in dib01x0_pmu_update()
2251 msg[0].len = 2; in dib01x0_pmu_update()
2254 wb[2] |= rb[0]; in dib01x0_pmu_update()
2258 wb[0] = (data[index_data] >> 8)&0xff; in dib01x0_pmu_update()
2259 wb[1] = (data[index_data])&0xff; in dib01x0_pmu_update()
2260 msg[0].len = 4; in dib01x0_pmu_update()
2261 if (i2c_transfer(i2c, &msg[0], 1) != 1) in dib01x0_pmu_update()
2264 return 0; in dib01x0_pmu_update()
2274 ….if_drives = (0 << 15) | (1 << 13) | (0 << 12) | (3 << 10) | (0 << 9) | (1 << 7) | (0 << 6) | (0 <…
2278 …{ 240, { BOARD_GPIO_COMPONENT_DEMOD, BOARD_GPIO_FUNCTION_SUBBAND_GPIO, 0x0008, 0x0000, 0x0008 } },…
2279 …PIO_COMPONENT_DEMOD, BOARD_GPIO_FUNCTION_SUBBAND_GPIO, 0x0008, 0x0000, 0x0000 } }, /* GPIO 3 to 0
2280 { 0 },
2284 … = BOARD_GPIO_FUNCTION_COMPONENT_ON, .mask = 0x10 | 0x21, .direction = 0 & ~0x21, .value = (0x10 &…
2285 …ction = BOARD_GPIO_FUNCTION_COMPONENT_OFF, .mask = 0x10 | 0x21, .direction = 0 & ~0x21, .value = 0
2297 ….if_drives = (0 << 15) | (1 << 13) | (0 << 12) | (3 << 10) | (0 << 9) | (1 << 7) | (0 << 6) | (0 <…
2305 ….if_drives = (0 << 15) | (1 << 13) | (0 << 12) | (3 << 10) | (0 << 9) | (1 << 7) | (0 << 6) | (0 <…
2309 …{ 240, { BOARD_GPIO_COMPONENT_DEMOD, BOARD_GPIO_FUNCTION_SUBBAND_GPIO, 0x0006, 0x0000, 0x0006 } },…
2310 …_COMPONENT_DEMOD, BOARD_GPIO_FUNCTION_SUBBAND_GPIO, 0x0006, 0x0000, 0x0000 } }, /* GPIO 1 and 2 to…
2311 { 0 },
2315 … = BOARD_GPIO_FUNCTION_COMPONENT_ON, .mask = 0x10 | 0x21, .direction = 0 & ~0x21, .value = (0x10 &…
2316 …ction = BOARD_GPIO_FUNCTION_COMPONENT_OFF, .mask = 0x10 | 0x21, .direction = 0 & ~0x21, .value = 0
2322 .io.pll_bypass = 0,
2327 .io.pll_int_loop_filt = 0,
2331 .clkouttobamse = 0,
2332 .analog_output = 0,
2333 .use_pwm_agc = 0,
2334 .clkoutdrive = 0,
2335 .freq_offset_khz_uhf = 0,
2336 .freq_offset_khz_vhf = 0,
2341 .io.pll_bypass = 0,
2346 .io.pll_int_loop_filt = 0,
2351 .analog_output = 0,
2352 .use_pwm_agc = 0,
2353 .clkoutdrive = 0,
2354 .freq_offset_khz_uhf = 0,
2355 .freq_offset_khz_vhf = 0,
2357 .io.pll_bypass = 0,
2362 .io.pll_int_loop_filt = 0,
2366 .clkouttobamse = 0,
2367 .analog_output = 0,
2368 .use_pwm_agc = 0,
2369 .clkoutdrive = 0,
2370 .freq_offset_khz_uhf = 0,
2371 .freq_offset_khz_vhf = 0,
2384 if (fw_version >= 0x10200) in stk9090m_frontend_attach()
2393 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk9090m_frontend_attach()
2402 dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80); in stk9090m_frontend_attach()
2413 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); in stk9090m_frontend_attach()
2415 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk9090m_frontend_attach()
2421 struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in dib9090_tuner_attach()
2423 1, 0x1374, in dib9090_tuner_attach()
2424 2, 0x01a2, in dib9090_tuner_attach()
2425 7, 0x0020, in dib9090_tuner_attach()
2426 0, 0x00ef, in dib9090_tuner_attach()
2427 8, 0x0486, in dib9090_tuner_attach()
2432 if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) in dib9090_tuner_attach()
2434 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in dib9090_tuner_attach()
2437 if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0) in dib9090_tuner_attach()
2440 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in dib9090_tuner_attach()
2443 return 0; in dib9090_tuner_attach()
2456 if (fw_version >= 0x10200) in nim9090md_frontend_attach()
2465 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim9090md_frontend_attach()
2480 nim9090md_config[0].microcode_B_fe_size = state->frontend_firmware->size; in nim9090md_frontend_attach()
2481 nim9090md_config[0].microcode_B_fe_buffer = state->frontend_firmware->data; in nim9090md_frontend_attach()
2485 dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); in nim9090md_frontend_attach()
2486 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); in nim9090md_frontend_attach()
2488 if (adap->fe_adap[0].fe == NULL) in nim9090md_frontend_attach()
2491 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); in nim9090md_frontend_attach()
2492 dib9000_i2c_enumeration(i2c, 1, 0x12, 0x82); in nim9090md_frontend_attach()
2494 fe_slave = dvb_attach(dib9000_attach, i2c, 0x82, &nim9090md_config[1]); in nim9090md_frontend_attach()
2495 dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); in nim9090md_frontend_attach()
2497 return fe_slave == NULL ? -ENODEV : 0; in nim9090md_frontend_attach()
2506 1, 0x5374, in nim9090md_tuner_attach()
2507 2, 0x01ae, in nim9090md_tuner_attach()
2508 7, 0x0020, in nim9090md_tuner_attach()
2509 0, 0x00ef, in nim9090md_tuner_attach()
2510 8, 0x0406, in nim9090md_tuner_attach()
2514 i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2515 …if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NUL… in nim9090md_tuner_attach()
2517 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in nim9090md_tuner_attach()
2520 if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0) in nim9090md_tuner_attach()
2524 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in nim9090md_tuner_attach()
2527 fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); in nim9090md_tuner_attach()
2529 i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2535 fe_slave->dvb = adap->fe_adap[0].fe->dvb; in nim9090md_tuner_attach()
2536 dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500); in nim9090md_tuner_attach()
2537 if (dib9000_firmware_post_pll_init(fe_slave) < 0) in nim9090md_tuner_attach()
2542 return 0; in nim9090md_tuner_attach()
2548 u8 spur = 0, prediv = 0, loopdiv = 0, min_prediv = 1, max_prediv = 1; in dib7090p_get_best_sampling()
2555 u32 fcp = 0, fs = 0, fdem = 0; in dib7090p_get_best_sampling()
2556 u32 harmonic_id = 0; in dib7090p_get_best_sampling()
2560 adc->timf = 0; in dib7090p_get_best_sampling()
2588 spur = 0; in dib7090p_get_best_sampling()
2613 if (adc->pll_loopdiv == 0 && adc->pll_prediv == 0) in dib7090p_get_best_sampling()
2616 return 0; in dib7090p_get_best_sampling()
2629 if (ret < 0) in dib7090_agc_startup()
2632 memset(&pll, 0, sizeof(struct dibx000_bandwidth_config)); in dib7090_agc_startup()
2637 if (dib7090p_get_best_sampling(fe, &adc) == 0) { in dib7090_agc_startup()
2644 return 0; in dib7090_agc_startup()
2650 if (restart == 0) /* before AGC startup */ in dib7090_agc_restart()
2652 return 0; in dib7090_agc_restart()
2663 state->dib7000p_ops.set_gpio(fe, 8, 0, 0); in tfe7790p_update_lna()
2664 state->dib7000p_ops.set_agc1_min(fe, 0); in tfe7790p_update_lna()
2666 state->dib7000p_ops.set_gpio(fe, 8, 0, 1); in tfe7790p_update_lna()
2670 return 0; in tfe7790p_update_lna()
2676 {1700, 0, 250, 0, 100, 6},
2677 {2600, 0, 250, 0, 100, 6},
2678 { 0xFFFF, 0, 0, 0, 0, 0},
2684 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0, P_agc_inv_pwm…
2685 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
2686 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) |…
2691 .alpha_level = 0,
2694 .wbd_inv = 0,
2703 .agc2_min = 0,
2705 .agc1_pt1 = 0,
2716 .alpha_exp = 0,
2720 .perform_agc_softsplit = 0,
2723 …/* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0, P_agc_inv_pwm…
2724 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
2725 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) |…
2730 .alpha_level = 0,
2733 .wbd_inv = 0,
2739 .agc1_min = 0,
2742 .agc2_min = 0,
2744 .agc1_pt1 = 0,
2745 .agc1_pt2 = 0,
2747 .agc1_slope1 = 0,
2752 .agc2_slope2 = 0,
2755 .alpha_exp = 0,
2759 .perform_agc_softsplit = 0,
2768 .pll_range = 0,
2769 .pll_reset = 0,
2770 .pll_bypass = 0,
2771 .enable_refdiv = 0,
2772 .bypclk_div = 0,
2776 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
2777 .ifreq = (0 << 25) | 0,
2797 .pwm_freq_div = 0,
2801 .spur_protect = 0,
2802 .disable_sample_and_hold = 0,
2803 .enable_current_mirror = 0,
2804 .diversity_delay = 0,
2817 state->dib7000p_ops.set_gpio(fe, 5, 0, 0); in tfe7090p_pvr_update_lna()
2818 state->dib7000p_ops.set_agc1_min(fe, 0); in tfe7090p_pvr_update_lna()
2820 state->dib7000p_ops.set_gpio(fe, 5, 0, 1); in tfe7090p_pvr_update_lna()
2824 return 0; in tfe7090p_pvr_update_lna()
2843 .pwm_freq_div = 0,
2847 .spur_protect = 0,
2848 .disable_sample_and_hold = 0,
2849 .enable_current_mirror = 0,
2850 .diversity_delay = 0,
2853 .default_i2c_addr = 0x90,
2870 .pwm_freq_div = 0,
2874 .spur_protect = 0,
2875 .disable_sample_and_hold = 0,
2876 .enable_current_mirror = 0,
2877 .diversity_delay = 0,
2880 .default_i2c_addr = 0x92,
2881 .enMpegOutput = 0,
2887 .io.pll_bypass = 0,
2888 .io.pll_range = 0,
2891 .io.adc_clock_ratio = 0,
2892 .io.pll_int_loop_filt = 0,
2894 .freq_offset_khz_uhf = 0,
2895 .freq_offset_khz_vhf = 0,
2898 .analog_output = 0,
2900 .wbd_vhf_offset = 0,
2901 .wbd_cband_offset = 0,
2903 .clkoutdrive = 0,
2905 .fref_clock_ratio = 0,
2909 .ls_cfg_pad_drv = 0,
2910 .data_tx_drv = 0,
2930 .pwm_freq_div = 0,
2934 .spur_protect = 0,
2935 .disable_sample_and_hold = 0,
2936 .enable_current_mirror = 0,
2937 .diversity_delay = 0,
2945 .io.pll_bypass = 0,
2946 .io.pll_range = 0,
2949 .io.adc_clock_ratio = 0,
2950 .io.pll_int_loop_filt = 0,
2952 .freq_offset_khz_uhf = 0,
2953 .freq_offset_khz_vhf = 0,
2956 .analog_output = 0,
2958 .wbd_vhf_offset = 0,
2959 .wbd_cband_offset = 0,
2961 .clkoutdrive = 0,
2963 .fref_clock_ratio = 0,
2967 .ls_cfg_pad_drv = 0,
2968 .data_tx_drv = 0,
2971 .force_cband_input = 0,
2972 .is_dib7090e = 0,
2979 .io.pll_bypass = 0,
2980 .io.pll_range = 0,
2983 .io.adc_clock_ratio = 0,
2984 .io.pll_int_loop_filt = 0,
2990 .analog_output = 0,
2992 .wbd_vhf_offset = 0,
2993 .wbd_cband_offset = 0,
2995 .clkoutdrive = 0,
2997 .fref_clock_ratio = 0,
3001 .ls_cfg_pad_drv = 0,
3002 .data_tx_drv = 0,
3007 .io.pll_bypass = 0,
3008 .io.pll_range = 0,
3011 .io.adc_clock_ratio = 0,
3012 .io.pll_int_loop_filt = 0,
3018 .analog_output = 0,
3020 .wbd_vhf_offset = 0,
3021 .wbd_cband_offset = 0,
3023 .clkoutdrive = 0,
3025 .fref_clock_ratio = 0,
3029 .ls_cfg_pad_drv = 0,
3030 .data_tx_drv = 0,
3048 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim7090_frontend_attach()
3055 …tate->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) { in nim7090_frontend_attach()
3060 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_confi… in nim7090_frontend_attach()
3062 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in nim7090_frontend_attach()
3068 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in nim7090_tuner_attach()
3074 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) in nim7090_tuner_attach()
3077 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in nim7090_tuner_attach()
3079 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in nim7090_tuner_attach()
3080 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in nim7090_tuner_attach()
3081 return 0; in nim7090_tuner_attach()
3100 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7090pvr_frontend0_attach()
3107 /* initialize IC 0 */ in tfe7090pvr_frontend0_attach()
3108 …>dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0)… in tfe7090pvr_frontend0_attach()
3115 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_co… in tfe7090pvr_frontend0_attach()
3116 if (adap->fe_adap[0].fe == NULL) in tfe7090pvr_frontend0_attach()
3119 state->dib7000p_ops.slave_reset(adap->fe_adap[0].fe); in tfe7090pvr_frontend0_attach()
3121 return 0; in tfe7090pvr_frontend0_attach()
3129 if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { in tfe7090pvr_frontend1_attach()
3137 …i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFAC… in tfe7090pvr_frontend1_attach()
3138 if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { in tfe7090pvr_frontend1_attach()
3144 adap->fe_adap[0].fe = state->dib7000p_ops.init(i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); in tfe7090pvr_frontend1_attach()
3147 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7090pvr_frontend1_attach()
3153 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner0_attach()
3155 tfe7090pvr_dib0090_config[0].reset = st->dib7000p_ops.tuner_sleep; in tfe7090pvr_tuner0_attach()
3156 tfe7090pvr_dib0090_config[0].sleep = st->dib7000p_ops.tuner_sleep; in tfe7090pvr_tuner0_attach()
3157 tfe7090pvr_dib0090_config[0].get_adc_power = st->dib7000p_ops.get_adc_power; in tfe7090pvr_tuner0_attach()
3159 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == N… in tfe7090pvr_tuner0_attach()
3162 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner0_attach()
3164 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner0_attach()
3165 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner0_attach()
3166 return 0; in tfe7090pvr_tuner0_attach()
3172 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner1_attach()
3178 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == N… in tfe7090pvr_tuner1_attach()
3181 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner1_attach()
3183 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner1_attach()
3184 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner1_attach()
3185 return 0; in tfe7090pvr_tuner1_attach()
3204 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7790p_frontend_attach()
3212 1, 0x10, &tfe7790p_dib7000p_config) != 0) { in tfe7790p_frontend_attach()
3218 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in tfe7790p_frontend_attach()
3219 0x80, &tfe7790p_dib7000p_config); in tfe7790p_frontend_attach()
3221 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7790p_frontend_attach()
3228 st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7790p_tuner_attach()
3235 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, in tfe7790p_tuner_attach()
3239 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7790p_tuner_attach()
3241 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7790p_tuner_attach()
3242 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7790p_tuner_attach()
3243 return 0; in tfe7790p_tuner_attach()
3286 dib0700_set_gpio(dev, GPIO10, GPIO_OUT, 0); in stk7070pd_init()
3307 stk7070pd_dib7000p_config) != 0) { in stk7070pd_frontend_attach0()
3314 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach0()
3315 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach0()
3325 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach1()
3326 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach1()
3340 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, in novatd_read_status_override()
3353 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, 0); in novatd_sleep_override()
3373 if (adap->id == 0) { in novatd_frontend_attach()
3377 dib0700_set_gpio(dev, GPIO0, GPIO_OUT, 0); in novatd_frontend_attach()
3378 dib0700_set_gpio(dev, GPIO1, GPIO_OUT, 0); in novatd_frontend_attach()
3382 stk7070pd_dib7000p_config) != 0) { in novatd_frontend_attach()
3390 adap->fe_adap[0].fe = state->dib7000p_ops.init(&dev->i2c_adap, in novatd_frontend_attach()
3391 adap->id == 0 ? 0x80 : 0x82, in novatd_frontend_attach()
3394 if (adap->fe_adap[0].fe == NULL) in novatd_frontend_attach()
3397 st->read_status = adap->fe_adap[0].fe->ops.read_status; in novatd_frontend_attach()
3398 adap->fe_adap[0].fe->ops.read_status = novatd_read_status_override; in novatd_frontend_attach()
3399 st->sleep = adap->fe_adap[0].fe->ops.sleep; in novatd_frontend_attach()
3400 adap->fe_adap[0].fe->ops.sleep = novatd_sleep_override; in novatd_frontend_attach()
3402 return 0; in novatd_frontend_attach()
3438 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); in s5h1411_frontend_attach()
3439 dib0700_set_gpio(adap->dev, GPIO3, GPIO_OUT, 0); in s5h1411_frontend_attach()
3442 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in s5h1411_frontend_attach()
3450 dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 0); in s5h1411_frontend_attach()
3457 adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, in s5h1411_frontend_attach()
3459 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in s5h1411_frontend_attach()
3469 dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); in dib0700_xc5000_tuner_callback()
3478 return 0; in dib0700_xc5000_tuner_callback()
3482 .i2c_address = 0x64,
3489 adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; in xc5000_tuner_attach()
3491 return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, in xc5000_tuner_attach()
3493 == NULL ? -ENODEV : 0; in xc5000_tuner_attach()
3504 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); in dib0700_xc4000_tuner_callback()
3506 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in dib0700_xc4000_tuner_callback()
3508 err("xc4000: unknown tuner callback command: %d\n", command); in dib0700_xc4000_tuner_callback()
3512 return 0; in dib0700_xc4000_tuner_callback()
3517 .setup = 0x64,
3518 .inv_gain = 0x02c8,
3519 .time_stabiliz = 0x15,
3520 .alpha_level = 0x00,
3521 .thlock = 0x76,
3522 .wbd_inv = 0x01,
3523 .wbd_ref = 0x0b33,
3524 .wbd_sel = 0x00,
3525 .wbd_alpha = 0x02,
3526 .agc1_max = 0x00,
3527 .agc1_min = 0x00,
3528 .agc2_max = 0x9b26,
3529 .agc2_min = 0x26ca,
3530 .agc1_pt1 = 0x00,
3531 .agc1_pt2 = 0x00,
3532 .agc1_pt3 = 0x00,
3533 .agc1_slope1 = 0x00,
3534 .agc1_slope2 = 0x00,
3535 .agc2_pt1 = 0x00,
3536 .agc2_pt2 = 0x80,
3537 .agc2_slope1 = 0x1d,
3538 .agc2_slope2 = 0x1d,
3539 .alpha_mant = 0x11,
3540 .alpha_exp = 0x1b,
3541 .beta_mant = 0x17,
3542 .beta_exp = 0x33,
3543 .perform_agc_softsplit = 0x00,
3553 .pll_bypass = 0,
3554 .enable_refdiv = 0,
3555 .bypclk_div = 0,
3558 .modulo = 0,
3584 GPIO8 - LNA (1=off 0=on)
3587 GPIO8 - xc4000 reset
3598 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in pctv340e_frontend_attach()
3604 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in pctv340e_frontend_attach()
3619 if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { in pctv340e_frontend_attach()
3625 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x12, in pctv340e_frontend_attach()
3629 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in pctv340e_frontend_attach()
3633 .i2c_address = 0x61,
3635 .dvb_amplitude = 0,
3636 .set_smoothedcvbs = 0,
3645 /* The xc4000 is not on the main i2c bus */ in xc4000_tuner_attach()
3646 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in xc4000_tuner_attach()
3650 return 0; in xc4000_tuner_attach()
3654 adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; in xc4000_tuner_attach()
3656 return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, in xc4000_tuner_attach()
3658 == NULL ? -ENODEV : 0; in xc4000_tuner_attach()
3662 .i2c_addr = 0x0e,
3666 .deny_i2c_rptr = 0,
3670 .usref_8vsb = 0x0500,
3699 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3707 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3712 adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, in lgdt3305_frontend_attach()
3716 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in lgdt3305_frontend_attach()
3721 return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, in mxl5007t_tuner_attach()
3722 &adap->dev->i2c_adap, 0x60, in mxl5007t_tuner_attach()
3723 &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; in mxl5007t_tuner_attach()
3739 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in xbox_one_attach()
3747 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in xbox_one_attach()
3753 mn88472_config.fe = &adap->fe_adap[0].fe; in xbox_one_attach()
3758 memset(&info, 0, sizeof(struct i2c_board_info)); in xbox_one_attach()
3760 info.addr = 0x18; in xbox_one_attach()
3771 adap->fe_adap[0].fe = mn88472_config.get_dvb_frontend(client_demod); in xbox_one_attach()
3774 memset(&tda18250_config, 0, sizeof(tda18250_config)); in xbox_one_attach()
3783 tda18250_config.fe = adap->fe_adap[0].fe; in xbox_one_attach()
3785 memset(&info, 0, sizeof(struct i2c_board_info)); in xbox_one_attach()
3787 info.addr = 0x60; in xbox_one_attach()
3798 return 0; in xbox_one_attach()
3966 DVB_USB_DEV_VER(PIXELVIEW, PIXELVIEW_SBTVD, 0x000, 0x3f00),
4038 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4098 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4106 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4142 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4154 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4207 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4252 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4333 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4378 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4390 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4435 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4447 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4501 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4513 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4550 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4618 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4654 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4684 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4734 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4778 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4791 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4828 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4865 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4902 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4939 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4976 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5013 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5027 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5059 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5099 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5136 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5174 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5189 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5222 DIB0700_DEFAULT_STREAMING_CONFIG(0x82),