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 if (!adap->fe_adap[0].fe) { in stk9090m_frontend_attach()
2420 return 0; in stk9090m_frontend_attach()
2426 struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in dib9090_tuner_attach()
2428 1, 0x1374, in dib9090_tuner_attach()
2429 2, 0x01a2, in dib9090_tuner_attach()
2430 7, 0x0020, in dib9090_tuner_attach()
2431 0, 0x00ef, in dib9090_tuner_attach()
2432 8, 0x0486, in dib9090_tuner_attach()
2437 if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) in dib9090_tuner_attach()
2439 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in dib9090_tuner_attach()
2442 if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0) in dib9090_tuner_attach()
2445 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in dib9090_tuner_attach()
2448 return 0; in dib9090_tuner_attach()
2461 if (fw_version >= 0x10200) in nim9090md_frontend_attach()
2470 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim9090md_frontend_attach()
2485 nim9090md_config[0].microcode_B_fe_size = state->frontend_firmware->size; in nim9090md_frontend_attach()
2486 nim9090md_config[0].microcode_B_fe_buffer = state->frontend_firmware->data; in nim9090md_frontend_attach()
2490 dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); in nim9090md_frontend_attach()
2491 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); in nim9090md_frontend_attach()
2493 if (!adap->fe_adap[0].fe) { in nim9090md_frontend_attach()
2498 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); in nim9090md_frontend_attach()
2499 dib9000_i2c_enumeration(i2c, 1, 0x12, 0x82); in nim9090md_frontend_attach()
2501 fe_slave = dvb_attach(dib9000_attach, i2c, 0x82, &nim9090md_config[1]); in nim9090md_frontend_attach()
2502 dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); in nim9090md_frontend_attach()
2509 return 0; in nim9090md_frontend_attach()
2518 1, 0x5374, in nim9090md_tuner_attach()
2519 2, 0x01ae, in nim9090md_tuner_attach()
2520 7, 0x0020, in nim9090md_tuner_attach()
2521 0, 0x00ef, in nim9090md_tuner_attach()
2522 8, 0x0406, in nim9090md_tuner_attach()
2526 i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2527 …if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NUL… in nim9090md_tuner_attach()
2529 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in nim9090md_tuner_attach()
2532 if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0) in nim9090md_tuner_attach()
2536 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in nim9090md_tuner_attach()
2539 fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); in nim9090md_tuner_attach()
2541 i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2547 fe_slave->dvb = adap->fe_adap[0].fe->dvb; in nim9090md_tuner_attach()
2548 dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500); in nim9090md_tuner_attach()
2549 if (dib9000_firmware_post_pll_init(fe_slave) < 0) in nim9090md_tuner_attach()
2554 return 0; in nim9090md_tuner_attach()
2560 u8 spur = 0, prediv = 0, loopdiv = 0, min_prediv = 1, max_prediv = 1; in dib7090p_get_best_sampling()
2567 u32 fcp = 0, fs = 0, fdem = 0; in dib7090p_get_best_sampling()
2568 u32 harmonic_id = 0; in dib7090p_get_best_sampling()
2572 adc->timf = 0; in dib7090p_get_best_sampling()
2600 spur = 0; in dib7090p_get_best_sampling()
2625 if (adc->pll_loopdiv == 0 && adc->pll_prediv == 0) in dib7090p_get_best_sampling()
2628 return 0; in dib7090p_get_best_sampling()
2641 if (ret < 0) in dib7090_agc_startup()
2644 memset(&pll, 0, sizeof(struct dibx000_bandwidth_config)); in dib7090_agc_startup()
2649 if (dib7090p_get_best_sampling(fe, &adc) == 0) { in dib7090_agc_startup()
2656 return 0; in dib7090_agc_startup()
2662 if (restart == 0) /* before AGC startup */ in dib7090_agc_restart()
2664 return 0; in dib7090_agc_restart()
2675 state->dib7000p_ops.set_gpio(fe, 8, 0, 0); in tfe7790p_update_lna()
2676 state->dib7000p_ops.set_agc1_min(fe, 0); in tfe7790p_update_lna()
2678 state->dib7000p_ops.set_gpio(fe, 8, 0, 1); in tfe7790p_update_lna()
2682 return 0; in tfe7790p_update_lna()
2688 {1700, 0, 250, 0, 100, 6},
2689 {2600, 0, 250, 0, 100, 6},
2690 { 0xFFFF, 0, 0, 0, 0, 0},
2696 …/* 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…
2697 * 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 */
2698 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) |…
2703 .alpha_level = 0,
2706 .wbd_inv = 0,
2715 .agc2_min = 0,
2717 .agc1_pt1 = 0,
2728 .alpha_exp = 0,
2732 .perform_agc_softsplit = 0,
2735 …/* 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…
2736 * 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 */
2737 ….setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | (3 << 5) |…
2742 .alpha_level = 0,
2745 .wbd_inv = 0,
2751 .agc1_min = 0,
2754 .agc2_min = 0,
2756 .agc1_pt1 = 0,
2757 .agc1_pt2 = 0,
2759 .agc1_slope1 = 0,
2764 .agc2_slope2 = 0,
2767 .alpha_exp = 0,
2771 .perform_agc_softsplit = 0,
2780 .pll_range = 0,
2781 .pll_reset = 0,
2782 .pll_bypass = 0,
2783 .enable_refdiv = 0,
2784 .bypclk_div = 0,
2788 .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0),
2789 .ifreq = (0 << 25) | 0,
2809 .pwm_freq_div = 0,
2813 .spur_protect = 0,
2814 .disable_sample_and_hold = 0,
2815 .enable_current_mirror = 0,
2816 .diversity_delay = 0,
2829 state->dib7000p_ops.set_gpio(fe, 5, 0, 0); in tfe7090p_pvr_update_lna()
2830 state->dib7000p_ops.set_agc1_min(fe, 0); in tfe7090p_pvr_update_lna()
2832 state->dib7000p_ops.set_gpio(fe, 5, 0, 1); in tfe7090p_pvr_update_lna()
2836 return 0; in tfe7090p_pvr_update_lna()
2855 .pwm_freq_div = 0,
2859 .spur_protect = 0,
2860 .disable_sample_and_hold = 0,
2861 .enable_current_mirror = 0,
2862 .diversity_delay = 0,
2865 .default_i2c_addr = 0x90,
2882 .pwm_freq_div = 0,
2886 .spur_protect = 0,
2887 .disable_sample_and_hold = 0,
2888 .enable_current_mirror = 0,
2889 .diversity_delay = 0,
2892 .default_i2c_addr = 0x92,
2893 .enMpegOutput = 0,
2899 .io.pll_bypass = 0,
2900 .io.pll_range = 0,
2903 .io.adc_clock_ratio = 0,
2904 .io.pll_int_loop_filt = 0,
2906 .freq_offset_khz_uhf = 0,
2907 .freq_offset_khz_vhf = 0,
2910 .analog_output = 0,
2912 .wbd_vhf_offset = 0,
2913 .wbd_cband_offset = 0,
2915 .clkoutdrive = 0,
2917 .fref_clock_ratio = 0,
2921 .ls_cfg_pad_drv = 0,
2922 .data_tx_drv = 0,
2942 .pwm_freq_div = 0,
2946 .spur_protect = 0,
2947 .disable_sample_and_hold = 0,
2948 .enable_current_mirror = 0,
2949 .diversity_delay = 0,
2957 .io.pll_bypass = 0,
2958 .io.pll_range = 0,
2961 .io.adc_clock_ratio = 0,
2962 .io.pll_int_loop_filt = 0,
2964 .freq_offset_khz_uhf = 0,
2965 .freq_offset_khz_vhf = 0,
2968 .analog_output = 0,
2970 .wbd_vhf_offset = 0,
2971 .wbd_cband_offset = 0,
2973 .clkoutdrive = 0,
2975 .fref_clock_ratio = 0,
2979 .ls_cfg_pad_drv = 0,
2980 .data_tx_drv = 0,
2983 .force_cband_input = 0,
2984 .is_dib7090e = 0,
2991 .io.pll_bypass = 0,
2992 .io.pll_range = 0,
2995 .io.adc_clock_ratio = 0,
2996 .io.pll_int_loop_filt = 0,
3002 .analog_output = 0,
3004 .wbd_vhf_offset = 0,
3005 .wbd_cband_offset = 0,
3007 .clkoutdrive = 0,
3009 .fref_clock_ratio = 0,
3013 .ls_cfg_pad_drv = 0,
3014 .data_tx_drv = 0,
3019 .io.pll_bypass = 0,
3020 .io.pll_range = 0,
3023 .io.adc_clock_ratio = 0,
3024 .io.pll_int_loop_filt = 0,
3030 .analog_output = 0,
3032 .wbd_vhf_offset = 0,
3033 .wbd_cband_offset = 0,
3035 .clkoutdrive = 0,
3037 .fref_clock_ratio = 0,
3041 .ls_cfg_pad_drv = 0,
3042 .data_tx_drv = 0,
3060 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim7090_frontend_attach()
3067 …tate->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) { in nim7090_frontend_attach()
3072 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_confi… in nim7090_frontend_attach()
3074 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in nim7090_frontend_attach()
3080 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in nim7090_tuner_attach()
3086 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) in nim7090_tuner_attach()
3089 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in nim7090_tuner_attach()
3091 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in nim7090_tuner_attach()
3092 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in nim7090_tuner_attach()
3093 return 0; in nim7090_tuner_attach()
3112 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7090pvr_frontend0_attach()
3119 /* initialize IC 0 */ in tfe7090pvr_frontend0_attach()
3120 …>dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0)… in tfe7090pvr_frontend0_attach()
3127 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_co… in tfe7090pvr_frontend0_attach()
3128 if (adap->fe_adap[0].fe == NULL) in tfe7090pvr_frontend0_attach()
3131 state->dib7000p_ops.slave_reset(adap->fe_adap[0].fe); in tfe7090pvr_frontend0_attach()
3133 return 0; in tfe7090pvr_frontend0_attach()
3141 if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { in tfe7090pvr_frontend1_attach()
3149 …i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFAC… in tfe7090pvr_frontend1_attach()
3150 if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { in tfe7090pvr_frontend1_attach()
3156 adap->fe_adap[0].fe = state->dib7000p_ops.init(i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); in tfe7090pvr_frontend1_attach()
3159 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7090pvr_frontend1_attach()
3165 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner0_attach()
3167 tfe7090pvr_dib0090_config[0].reset = st->dib7000p_ops.tuner_sleep; in tfe7090pvr_tuner0_attach()
3168 tfe7090pvr_dib0090_config[0].sleep = st->dib7000p_ops.tuner_sleep; in tfe7090pvr_tuner0_attach()
3169 tfe7090pvr_dib0090_config[0].get_adc_power = st->dib7000p_ops.get_adc_power; in tfe7090pvr_tuner0_attach()
3171 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == N… in tfe7090pvr_tuner0_attach()
3174 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner0_attach()
3176 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner0_attach()
3177 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner0_attach()
3178 return 0; in tfe7090pvr_tuner0_attach()
3184 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner1_attach()
3190 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == N… in tfe7090pvr_tuner1_attach()
3193 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner1_attach()
3195 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner1_attach()
3196 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner1_attach()
3197 return 0; in tfe7090pvr_tuner1_attach()
3216 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7790p_frontend_attach()
3224 1, 0x10, &tfe7790p_dib7000p_config) != 0) { in tfe7790p_frontend_attach()
3230 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in tfe7790p_frontend_attach()
3231 0x80, &tfe7790p_dib7000p_config); in tfe7790p_frontend_attach()
3233 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7790p_frontend_attach()
3240 st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7790p_tuner_attach()
3247 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, in tfe7790p_tuner_attach()
3251 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7790p_tuner_attach()
3253 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7790p_tuner_attach()
3254 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7790p_tuner_attach()
3255 return 0; in tfe7790p_tuner_attach()
3298 dib0700_set_gpio(dev, GPIO10, GPIO_OUT, 0); in stk7070pd_init()
3319 stk7070pd_dib7000p_config) != 0) { in stk7070pd_frontend_attach0()
3326 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach0()
3327 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach0()
3337 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach1()
3338 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach1()
3352 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, in novatd_read_status_override()
3365 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, 0); in novatd_sleep_override()
3385 if (adap->id == 0) { in novatd_frontend_attach()
3389 dib0700_set_gpio(dev, GPIO0, GPIO_OUT, 0); in novatd_frontend_attach()
3390 dib0700_set_gpio(dev, GPIO1, GPIO_OUT, 0); in novatd_frontend_attach()
3394 stk7070pd_dib7000p_config) != 0) { in novatd_frontend_attach()
3402 adap->fe_adap[0].fe = state->dib7000p_ops.init(&dev->i2c_adap, in novatd_frontend_attach()
3403 adap->id == 0 ? 0x80 : 0x82, in novatd_frontend_attach()
3406 if (adap->fe_adap[0].fe == NULL) in novatd_frontend_attach()
3409 st->read_status = adap->fe_adap[0].fe->ops.read_status; in novatd_frontend_attach()
3410 adap->fe_adap[0].fe->ops.read_status = novatd_read_status_override; in novatd_frontend_attach()
3411 st->sleep = adap->fe_adap[0].fe->ops.sleep; in novatd_frontend_attach()
3412 adap->fe_adap[0].fe->ops.sleep = novatd_sleep_override; in novatd_frontend_attach()
3414 return 0; in novatd_frontend_attach()
3450 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); in s5h1411_frontend_attach()
3451 dib0700_set_gpio(adap->dev, GPIO3, GPIO_OUT, 0); in s5h1411_frontend_attach()
3454 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in s5h1411_frontend_attach()
3462 dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 0); in s5h1411_frontend_attach()
3469 adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, in s5h1411_frontend_attach()
3471 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in s5h1411_frontend_attach()
3481 dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); in dib0700_xc5000_tuner_callback()
3490 return 0; in dib0700_xc5000_tuner_callback()
3494 .i2c_address = 0x64,
3501 adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; in xc5000_tuner_attach()
3503 return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, in xc5000_tuner_attach()
3505 == NULL ? -ENODEV : 0; in xc5000_tuner_attach()
3516 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); in dib0700_xc4000_tuner_callback()
3518 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in dib0700_xc4000_tuner_callback()
3520 err("xc4000: unknown tuner callback command: %d\n", command); in dib0700_xc4000_tuner_callback()
3524 return 0; in dib0700_xc4000_tuner_callback()
3529 .setup = 0x64,
3530 .inv_gain = 0x02c8,
3531 .time_stabiliz = 0x15,
3532 .alpha_level = 0x00,
3533 .thlock = 0x76,
3534 .wbd_inv = 0x01,
3535 .wbd_ref = 0x0b33,
3536 .wbd_sel = 0x00,
3537 .wbd_alpha = 0x02,
3538 .agc1_max = 0x00,
3539 .agc1_min = 0x00,
3540 .agc2_max = 0x9b26,
3541 .agc2_min = 0x26ca,
3542 .agc1_pt1 = 0x00,
3543 .agc1_pt2 = 0x00,
3544 .agc1_pt3 = 0x00,
3545 .agc1_slope1 = 0x00,
3546 .agc1_slope2 = 0x00,
3547 .agc2_pt1 = 0x00,
3548 .agc2_pt2 = 0x80,
3549 .agc2_slope1 = 0x1d,
3550 .agc2_slope2 = 0x1d,
3551 .alpha_mant = 0x11,
3552 .alpha_exp = 0x1b,
3553 .beta_mant = 0x17,
3554 .beta_exp = 0x33,
3555 .perform_agc_softsplit = 0x00,
3565 .pll_bypass = 0,
3566 .enable_refdiv = 0,
3567 .bypclk_div = 0,
3570 .modulo = 0,
3596 GPIO8 - LNA (1=off 0=on)
3599 GPIO8 - xc4000 reset
3610 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in pctv340e_frontend_attach()
3616 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in pctv340e_frontend_attach()
3631 if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { in pctv340e_frontend_attach()
3637 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x12, in pctv340e_frontend_attach()
3641 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in pctv340e_frontend_attach()
3645 .i2c_address = 0x61,
3647 .dvb_amplitude = 0,
3648 .set_smoothedcvbs = 0,
3657 /* The xc4000 is not on the main i2c bus */ in xc4000_tuner_attach()
3658 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in xc4000_tuner_attach()
3662 return 0; in xc4000_tuner_attach()
3666 adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; in xc4000_tuner_attach()
3668 return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, in xc4000_tuner_attach()
3670 == NULL ? -ENODEV : 0; in xc4000_tuner_attach()
3674 .i2c_addr = 0x0e,
3678 .deny_i2c_rptr = 0,
3682 .usref_8vsb = 0x0500,
3711 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3719 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3724 adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, in lgdt3305_frontend_attach()
3728 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in lgdt3305_frontend_attach()
3733 return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, in mxl5007t_tuner_attach()
3734 &adap->dev->i2c_adap, 0x60, in mxl5007t_tuner_attach()
3735 &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; in mxl5007t_tuner_attach()
3751 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in xbox_one_attach()
3759 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in xbox_one_attach()
3765 mn88472_config.fe = &adap->fe_adap[0].fe; in xbox_one_attach()
3770 memset(&info, 0, sizeof(struct i2c_board_info)); in xbox_one_attach()
3772 info.addr = 0x18; in xbox_one_attach()
3783 adap->fe_adap[0].fe = mn88472_config.get_dvb_frontend(client_demod); in xbox_one_attach()
3786 memset(&tda18250_config, 0, sizeof(tda18250_config)); in xbox_one_attach()
3795 tda18250_config.fe = adap->fe_adap[0].fe; in xbox_one_attach()
3797 memset(&info, 0, sizeof(struct i2c_board_info)); in xbox_one_attach()
3799 info.addr = 0x60; in xbox_one_attach()
3810 return 0; in xbox_one_attach()
3978 DVB_USB_DEV_VER(PIXELVIEW, PIXELVIEW_SBTVD, 0x000, 0x3f00),
4050 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4110 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4118 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4154 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4166 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4219 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4264 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4345 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4390 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4402 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4447 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4459 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4513 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4525 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4562 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4630 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4666 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4696 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4746 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4790 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4803 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4840 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4877 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4914 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4951 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4988 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5025 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5039 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5071 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5111 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5148 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5186 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
5201 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
5234 DIB0700_DEFAULT_STREAMING_CONFIG(0x82),