Lines Matching +full:reset +full:- +full:gpio
1 // SPDX-License-Identifier: GPL-2.0-or-later
14 #include <media/drv-intf/cx25840.h>
19 #include "netup-eeprom.h"
20 #include "netup-init.h"
21 #include "altera-ci.h"
24 #include "cx23888-ir.h"
29 "NetUP Dual DVB-T/C CI card revision");
35 "\t\t\tHVR-1250 (reported safe)\n"
41 /* ------------------------------------------------------------------ */
64 .name = "Hauppauge WinTV-HVR1800lp",
85 .name = "Hauppauge WinTV-HVR1800",
117 .name = "Hauppauge WinTV-HVR1250",
157 .name = "Hauppauge WinTV-HVR1500Q",
161 .name = "Hauppauge WinTV-HVR1500",
188 .name = "Hauppauge WinTV-HVR1200",
192 .name = "Hauppauge WinTV-HVR1700",
196 .name = "Hauppauge WinTV-HVR1400",
205 .name = "DViCO FusionHDTV DVB-T Dual Express",
297 .name = "DVBWorld DVB-S2 2005",
302 .name = "NetUP Dual DVB-S2 CI",
307 .name = "Hauppauge WinTV-HVR1270",
311 .name = "Hauppauge WinTV-HVR1275",
315 .name = "Hauppauge WinTV-HVR1255",
344 .name = "Hauppauge WinTV-HVR1255",
367 .name = "Hauppauge WinTV-HVR1210",
371 .name = "Mygica X8506 DMB-TH",
401 .name = "Magic-Pro ProHDTV Extreme 2",
431 .name = "Hauppauge WinTV-HVR1850",
465 .name = "Hauppauge WinTV-HVR1290",
469 .name = "Mygica X8558 PRO DMB-TH",
522 .name = "NetUP Dual DVB-T/C-CI RF",
536 .name = "MPX-885",
561 .name = "Mygica X8502/X8507 ISDB-T",
604 .name = "Prof Revolution DVB-S2 8000",
608 .name = "Hauppauge WinTV-HVR4400/HVR5500",
650 .name = "DViCO FusionHDTV DVB-T Dual Express2",
655 .name = "Hauppauge ImpactVCB-e",
684 .name = "Technotrend TT-budget CT2-4500 CI",
702 .name = "Hauppauge WinTV-HVR5525",
778 .name = "Hauppauge WinTV-QuadHD-DVB",
794 .name = "Hauppauge WinTV-QuadHD-DVB(885)",
800 .name = "Hauppauge WinTV-QuadHD-ATSC",
815 .name = "Hauppauge WinTV-QuadHD-ATSC(885)",
821 .name = "Hauppauge WinTV-HVR-1265(161111)",
841 .name = "Hauppauge WinTV-Starburst2",
866 /* ------------------------------------------------------------------ */
1093 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-4400 (Model 121xxx, Hybrid DVB-T/S2, …
1097 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2…
1101 ….card = CX23885_BOARD_HAUPPAUGE_STARBURST, /* Hauppauge WinTV Starburst (Model 121x00, DVB-S2…
1105 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2…
1181 …CX23885_BOARD_HAUPPAUGE_HVR1265_K4, /* Hauppauge WinTV HVR-1265 (Model 161xx1, Hybrid ATSC/QAM-B) …
1198 if (0 == dev->pci->subsystem_vendor && in cx23885_card_list()
1199 0 == dev->pci->subsystem_device) { in cx23885_card_list()
1204 "%s: -- tux\n", in cx23885_card_list()
1205 dev->name, dev->name, dev->name, dev->name, dev->name); in cx23885_card_list()
1211 dev->name, dev->name, dev->name, dev->name); in cx23885_card_list()
1214 dev->name); in cx23885_card_list()
1216 pr_info("%s: card=%d -> %s\n", in cx23885_card_list()
1217 dev->name, i, cx23885_boards[i].name); in cx23885_card_list()
1237 dev->name, in viewcast_eeprom()
1238 cx23885_boards[dev->board].name, in viewcast_eeprom()
1251 /* WinTV-HVR1270 (PCIe, Retail, half height) in hauppauge_eeprom()
1254 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1255 * DVB-T and basic analog, IR Blast */ in hauppauge_eeprom()
1257 /* WinTV-HVR1270 (PCIe, Retail, half height) in hauppauge_eeprom()
1260 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1261 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1263 /* WinTV-HVR1275 (PCIe, Retail, half height) in hauppauge_eeprom()
1266 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1267 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1269 /* WinTV-HVR1270 (PCIe, Retail, full height) in hauppauge_eeprom()
1272 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1273 * DVB-T and basic analog, IR Blast */ in hauppauge_eeprom()
1275 /* WinTV-HVR1270 (PCIe, Retail, full height) in hauppauge_eeprom()
1278 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1279 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1281 /* WinTV-HVR1275 (PCIe, Retail, full height) in hauppauge_eeprom()
1284 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1285 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1287 /* WinTV-HVR1200 (PCIe, Retail, full height) in hauppauge_eeprom()
1288 * DVB-T and basic analog */ in hauppauge_eeprom()
1290 /* WinTV-ImpactVCB-e (PCIe, Retail, half height) in hauppauge_eeprom()
1293 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1294 * DVB-T and basic analog */ in hauppauge_eeprom()
1296 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1297 * DVB-T and basic analog */ in hauppauge_eeprom()
1299 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1300 * DVB-T and basic analog */ in hauppauge_eeprom()
1302 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1303 * DVB-T and basic analog */ in hauppauge_eeprom()
1305 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1306 * DVB-T and basic analog */ in hauppauge_eeprom()
1308 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1309 * DVB-T and basic analog */ in hauppauge_eeprom()
1311 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1312 * DVB-T and basic analog */ in hauppauge_eeprom()
1314 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1315 * DVB-T and basic analog */ in hauppauge_eeprom()
1317 /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual in hauppauge_eeprom()
1320 /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC in hauppauge_eeprom()
1323 /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC in hauppauge_eeprom()
1326 /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM in hauppauge_eeprom()
1329 /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM in hauppauge_eeprom()
1332 /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, in hauppauge_eeprom()
1335 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, in hauppauge_eeprom()
1338 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, in hauppauge_eeprom()
1341 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, in hauppauge_eeprom()
1344 /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, in hauppauge_eeprom()
1347 /* WinTV-HVR1250 (PCIe, Retail, IR, full height, in hauppauge_eeprom()
1350 /* WinTV-HVR1250 (PCIe, Retail, IR, half height, in hauppauge_eeprom()
1353 /* WinTV-HVR1250 (PCIe, No IR, half height, in hauppauge_eeprom()
1356 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, in hauppauge_eeprom()
1359 /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, in hauppauge_eeprom()
1362 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, in hauppauge_eeprom()
1365 /* WinTV-HVR1400 (Express Card, Retail, IR, in hauppauge_eeprom()
1366 * DVB-T and Basic analog */ in hauppauge_eeprom()
1368 /* WinTV-HVR1700 (PCIe, OEM, No IR, half height) in hauppauge_eeprom()
1369 * DVB-T and MPEG2 HW Encoder */ in hauppauge_eeprom()
1371 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) in hauppauge_eeprom()
1372 * DVB-T and MPEG2 HW Encoder */ in hauppauge_eeprom()
1375 /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM, in hauppauge_eeprom()
1379 /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR, in hauppauge_eeprom()
1382 /* WinTV-HVR4400 (PCIe, DVB-S2, DVB-C/T) */ in hauppauge_eeprom()
1385 /* WinTV-HVR5500 (PCIe, DVB-S2, DVB-C/T) */ in hauppauge_eeprom()
1388 /* WinTV-HVR5525 (PCIe, DVB-S/S2, DVB-T/T2/C) */ in hauppauge_eeprom()
1391 /* WinTV-HVR-1265 K4 (PCIe, Analog/ATSC/QAM-B) */ in hauppauge_eeprom()
1395 /* WinTV-QuadHD (DVB) Tuner Pair 1 (PCIe, IR, half height, in hauppauge_eeprom()
1396 DVB-T/T2/C, DVB-T/T2/C */ in hauppauge_eeprom()
1400 /* WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height, in hauppauge_eeprom()
1401 DVB-T/T2/C, DVB-T/T2/C */ in hauppauge_eeprom()
1405 /* WinTV-QuadHD (ATSC) Tuner Pair 1 (PCIe, IR, half height, in hauppauge_eeprom()
1406 * ATSC/QAM-B, ATSC/QAM-B */ in hauppauge_eeprom()
1410 /* WinTV-QuadHD (ATSC) Tuner Pair 2 (PCIe, IR, half height, in hauppauge_eeprom()
1411 * ATSC/QAM-B, ATSC/QAM-B */ in hauppauge_eeprom()
1415 dev->name, tv.model); in hauppauge_eeprom()
1420 dev->name, tv.model); in hauppauge_eeprom()
1424 to the cx23885 gpio's. If this chip doesn't get init'ed the demod
1433 switch (dev->board) { in tbs_card_init()
1444 ((buf[i >> 3] >> (7 - (i & 7))) & 1) | 4); in tbs_card_init()
1455 struct cx23885_dev *dev = port->dev; in cx23885_tuner_callback()
1464 return -EINVAL; in cx23885_tuner_callback()
1467 switch (dev->board) { in cx23885_tuner_callback()
1477 /* Tuner Reset Command */ in cx23885_tuner_callback()
1484 * we need to reset the correct gpio. */ in cx23885_tuner_callback()
1485 if (port->nr == 1) in cx23885_tuner_callback()
1487 else if (port->nr == 2) in cx23885_tuner_callback()
1491 /* Tuner Reset Command */ in cx23885_tuner_callback()
1495 altera_ci_tuner_reset(dev, port->nr); in cx23885_tuner_callback()
1498 /* XC3028L Reset Command */ in cx23885_tuner_callback()
1504 /* Drive the tuner into reset and back out */ in cx23885_tuner_callback()
1515 switch (dev->board) { in cx23885_gpio_setup()
1517 /* GPIO-0 cx24227 demodulator reset */ in cx23885_gpio_setup()
1518 cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ in cx23885_gpio_setup()
1521 /* GPIO-0 cx24227 demodulator */ in cx23885_gpio_setup()
1522 /* GPIO-2 xc3028 tuner */ in cx23885_gpio_setup()
1524 /* Put the parts into reset */ in cx23885_gpio_setup()
1529 /* Bring the parts out of reset */ in cx23885_gpio_setup()
1533 /* GPIO-0 cx24227 demodulator reset */ in cx23885_gpio_setup()
1534 /* GPIO-2 xc5000 tuner reset */ in cx23885_gpio_setup()
1535 cx_set(GP0_IO, 0x00050005); /* Bring the part out of reset */ in cx23885_gpio_setup()
1538 /* GPIO-0 656_CLK */ in cx23885_gpio_setup()
1539 /* GPIO-1 656_D0 */ in cx23885_gpio_setup()
1540 /* GPIO-2 8295A Reset */ in cx23885_gpio_setup()
1541 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1542 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1543 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1544 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1546 /* CX23417 GPIO's */ in cx23885_gpio_setup()
1547 /* EIO15 Zilog Reset */ in cx23885_gpio_setup()
1548 /* EIO14 S5H1409/CX24227 Reset */ in cx23885_gpio_setup()
1551 /* Put the demod into reset and protect the eeprom */ in cx23885_gpio_setup()
1555 /* Bring the demod and blaster out of reset */ in cx23885_gpio_setup()
1559 /* Force the TDA8295A into reset and back */ in cx23885_gpio_setup()
1569 /* GPIO-0 tda10048 demodulator reset */ in cx23885_gpio_setup()
1570 /* GPIO-2 tda18271 tuner reset */ in cx23885_gpio_setup()
1572 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1580 /* GPIO-0 TDA10048 demodulator reset */ in cx23885_gpio_setup()
1581 /* GPIO-2 TDA8295A Reset */ in cx23885_gpio_setup()
1582 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1583 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1584 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1586 /* The following GPIO's are on the interna AVCore (cx25840) */ in cx23885_gpio_setup()
1587 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1588 /* GPIO-20 IR_TX 416/DVBT Select */ in cx23885_gpio_setup()
1589 /* GPIO-21 IIS DAT */ in cx23885_gpio_setup()
1590 /* GPIO-22 IIS WCLK */ in cx23885_gpio_setup()
1591 /* GPIO-23 IIS BCLK */ in cx23885_gpio_setup()
1593 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1601 /* GPIO-0 Dibcom7000p demodulator reset */ in cx23885_gpio_setup()
1602 /* GPIO-2 xc3028L tuner reset */ in cx23885_gpio_setup()
1603 /* GPIO-13 LED */ in cx23885_gpio_setup()
1605 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1613 /* GPIO-0 xc5000 tuner reset i2c bus 0 */ in cx23885_gpio_setup()
1614 /* GPIO-1 s5h1409 demod reset i2c bus 0 */ in cx23885_gpio_setup()
1615 /* GPIO-2 xc5000 tuner reset i2c bus 1 */ in cx23885_gpio_setup()
1616 /* GPIO-3 s5h1409 demod reset i2c bus 0 */ in cx23885_gpio_setup()
1618 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1627 /* GPIO-0 portb xc3028 reset */ in cx23885_gpio_setup()
1628 /* GPIO-1 portb zl10353 reset */ in cx23885_gpio_setup()
1629 /* GPIO-2 portc xc3028 reset */ in cx23885_gpio_setup()
1630 /* GPIO-3 portc zl10353 reset */ in cx23885_gpio_setup()
1632 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1645 /* GPIO-2 xc3028 tuner reset */ in cx23885_gpio_setup()
1647 /* The following GPIO's are on the internal AVCore (cx25840) */ in cx23885_gpio_setup()
1648 /* GPIO-? zl10353 demod reset */ in cx23885_gpio_setup()
1650 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1671 /* GPIO-0 INTA from CiMax1 in cx23885_gpio_setup()
1672 GPIO-1 INTB from CiMax2 in cx23885_gpio_setup()
1673 GPIO-2 reset chips in cx23885_gpio_setup()
1674 GPIO-3 to GPIO-10 data/addr for CA in cx23885_gpio_setup()
1675 GPIO-11 ~CS0 to CiMax1 in cx23885_gpio_setup()
1676 GPIO-12 ~CS1 to CiMax2 in cx23885_gpio_setup()
1677 GPIO-13 ADL0 load LSB addr in cx23885_gpio_setup()
1678 GPIO-14 ADL1 load MSB addr in cx23885_gpio_setup()
1679 GPIO-15 ~RDY from CiMax in cx23885_gpio_setup()
1680 GPIO-17 ~RD to CiMax in cx23885_gpio_setup()
1681 GPIO-18 ~WR to CiMax in cx23885_gpio_setup()
1683 cx_set(GP0_IO, 0x00040000); /* GPIO as out */ in cx23885_gpio_setup()
1684 /* GPIO1 and GPIO2 as INTA and INTB from CiMaxes, reset low */ in cx23885_gpio_setup()
1686 msleep(100);/* reset delay */ in cx23885_gpio_setup()
1687 cx_set(GP0_IO, 0x00040004); /* GPIO as out, reset high */ in cx23885_gpio_setup()
1688 cx_write(MC417_CTL, 0x00000037);/* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1689 /* GPIO-15 IN as ~ACK, rest as OUT */ in cx23885_gpio_setup()
1701 /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */ in cx23885_gpio_setup()
1702 /* GPIO-6 I2C Gate which can isolate the demod from the bus */ in cx23885_gpio_setup()
1703 /* GPIO-9 Demod reset */ in cx23885_gpio_setup()
1705 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1715 /* GPIO-0 (0)Analog / (1)Digital TV */ in cx23885_gpio_setup()
1716 /* GPIO-1 reset XC5000 */ in cx23885_gpio_setup()
1717 /* GPIO-2 demod reset */ in cx23885_gpio_setup()
1725 /* GPIO-0 reset first ATBM8830 */ in cx23885_gpio_setup()
1726 /* GPIO-1 reset second ATBM8830 */ in cx23885_gpio_setup()
1735 /* GPIO-0 656_CLK */ in cx23885_gpio_setup()
1736 /* GPIO-1 656_D0 */ in cx23885_gpio_setup()
1737 /* GPIO-2 Wake# */ in cx23885_gpio_setup()
1738 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1739 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1740 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1741 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1742 /* GPIO-20 C_IR_TX */ in cx23885_gpio_setup()
1743 /* GPIO-21 I2S DAT */ in cx23885_gpio_setup()
1744 /* GPIO-22 I2S WCLK */ in cx23885_gpio_setup()
1745 /* GPIO-23 I2S BCLK */ in cx23885_gpio_setup()
1746 /* ALT GPIO: EXP GPIO LATCH */ in cx23885_gpio_setup()
1748 /* CX23417 GPIO's */ in cx23885_gpio_setup()
1749 /* GPIO-14 S5H1411/CX24228 Reset */ in cx23885_gpio_setup()
1750 /* GPIO-13 EEPROM write protect */ in cx23885_gpio_setup()
1753 /* Put the demod into reset and protect the eeprom */ in cx23885_gpio_setup()
1757 /* Bring the demod out of reset */ in cx23885_gpio_setup()
1761 /* CX24228 GPIO */ in cx23885_gpio_setup()
1765 cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ in cx23885_gpio_setup()
1768 /* GPIO-0 ~INT in in cx23885_gpio_setup()
1769 GPIO-1 TMS out in cx23885_gpio_setup()
1770 GPIO-2 ~reset chips out in cx23885_gpio_setup()
1771 GPIO-3 to GPIO-10 data/addr for CA in/out in cx23885_gpio_setup()
1772 GPIO-11 ~CS out in cx23885_gpio_setup()
1773 GPIO-12 ADDR out in cx23885_gpio_setup()
1774 GPIO-13 ~WR out in cx23885_gpio_setup()
1775 GPIO-14 ~RD out in cx23885_gpio_setup()
1776 GPIO-15 ~RDY in in cx23885_gpio_setup()
1777 GPIO-16 TCK out in cx23885_gpio_setup()
1778 GPIO-17 TDO in in cx23885_gpio_setup()
1779 GPIO-18 TDI out in cx23885_gpio_setup()
1781 cx_set(GP0_IO, 0x00060000); /* GPIO-1,2 as out */ in cx23885_gpio_setup()
1782 /* GPIO-0 as INT, reset & TMS low */ in cx23885_gpio_setup()
1784 msleep(100);/* reset delay */ in cx23885_gpio_setup()
1785 cx_set(GP0_IO, 0x00000004); /* reset high */ in cx23885_gpio_setup()
1786 cx_write(MC417_CTL, 0x00000037);/* enable GPIO-3..18 pins */ in cx23885_gpio_setup()
1787 /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */ in cx23885_gpio_setup()
1796 /* GPIO-8 tda10071 demod reset */ in cx23885_gpio_setup()
1797 /* GPIO-9 si2165 demod reset (only HVR4400/HVR5500)*/ in cx23885_gpio_setup()
1799 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1810 /* GPIO-0,1,2 setup direction as output */ in cx23885_gpio_setup()
1813 /* AF9013 demod reset */ in cx23885_gpio_setup()
1828 /* XC3028L tuner reset */ in cx23885_gpio_setup()
1837 /* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1848 * GPIO-0 INTA from CiMax, input in cx23885_gpio_setup()
1849 * GPIO-1 reset CiMax, output, high active in cx23885_gpio_setup()
1850 * GPIO-2 reset demod, output, low active in cx23885_gpio_setup()
1851 * GPIO-3 to GPIO-10 data/addr for CAM in cx23885_gpio_setup()
1852 * GPIO-11 ~CS0 to CiMax1 in cx23885_gpio_setup()
1853 * GPIO-12 ~CS1 to CiMax2 in cx23885_gpio_setup()
1854 * GPIO-13 ADL0 load LSB addr in cx23885_gpio_setup()
1855 * GPIO-14 ADL1 load MSB addr in cx23885_gpio_setup()
1856 * GPIO-15 ~RDY from CiMax in cx23885_gpio_setup()
1857 * GPIO-17 ~RD to CiMax in cx23885_gpio_setup()
1858 * GPIO-18 ~WR to CiMax in cx23885_gpio_setup()
1861 cx_set(GP0_IO, 0x00060002); /* GPIO 1/2 as output */ in cx23885_gpio_setup()
1862 cx_clear(GP0_IO, 0x00010004); /* GPIO 0 as input */ in cx23885_gpio_setup()
1863 msleep(100); /* reset delay */ in cx23885_gpio_setup()
1864 cx_set(GP0_IO, 0x00060004); /* GPIO as out, reset high */ in cx23885_gpio_setup()
1866 cx_write(MC417_CTL, 0x00000037); /* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1868 /* GPIO-15 IN as ~ACK, rest as OUT */ in cx23885_gpio_setup()
1886 * HVR5525 GPIO Details: in cx23885_gpio_setup()
1887 * GPIO-00 IR_WIDE in cx23885_gpio_setup()
1888 * GPIO-02 wake# in cx23885_gpio_setup()
1889 * GPIO-03 VAUX Pres. in cx23885_gpio_setup()
1890 * GPIO-07 PROG# in cx23885_gpio_setup()
1891 * GPIO-08 SAT_RESN in cx23885_gpio_setup()
1892 * GPIO-09 TER_RESN in cx23885_gpio_setup()
1893 * GPIO-10 B2_SENSE in cx23885_gpio_setup()
1894 * GPIO-11 B1_SENSE in cx23885_gpio_setup()
1895 * GPIO-15 IR_LED_STATUS in cx23885_gpio_setup()
1896 * GPIO-19 IR_NARROW in cx23885_gpio_setup()
1897 * GPIO-20 Blauster1 in cx23885_gpio_setup()
1901 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1911 * card does not have any GPIO's connected to subcomponents. in cx23885_gpio_setup()
1920 * GPIO-08 TER1_RESN in cx23885_gpio_setup()
1921 * GPIO-09 TER2_RESN in cx23885_gpio_setup()
1923 /* Put the parts into reset and back */ in cx23885_gpio_setup()
1965 switch (dev->board) { in cx23885_ir_init()
1983 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); in cx23885_ir_init()
1984 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
1992 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); in cx23885_ir_init()
1993 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
1999 v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, ¶ms); in cx23885_ir_init()
2003 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); in cx23885_ir_init()
2005 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); in cx23885_ir_init()
2021 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); in cx23885_ir_init()
2022 if (dev->sd_ir == NULL) { in cx23885_ir_init()
2023 ret = -ENODEV; in cx23885_ir_init()
2026 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2032 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); in cx23885_ir_init()
2033 if (dev->sd_ir == NULL) { in cx23885_ir_init()
2034 ret = -ENODEV; in cx23885_ir_init()
2037 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2042 request_module("ir-kbd-i2c"); in cx23885_ir_init()
2051 switch (dev->board) { in cx23885_ir_fini()
2057 dev->sd_ir = NULL; in cx23885_ir_fini()
2074 dev->sd_ir = NULL; in cx23885_ir_fini()
2106 switch (dev->board) { in cx23885_ir_pci_int_enable()
2110 if (dev->sd_ir) in cx23885_ir_pci_int_enable()
2126 if (dev->sd_ir) in cx23885_ir_pci_int_enable()
2134 struct cx23885_tsport *ts1 = &dev->ts1; in cx23885_card_setup()
2135 struct cx23885_tsport *ts2 = &dev->ts2; in cx23885_card_setup()
2139 if (dev->i2c_bus[0].i2c_rc == 0) { in cx23885_card_setup()
2140 dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1; in cx23885_card_setup()
2141 tveeprom_read(&dev->i2c_bus[0].i2c_client, in cx23885_card_setup()
2145 switch (dev->board) { in cx23885_card_setup()
2147 if (dev->i2c_bus[0].i2c_rc == 0) { in cx23885_card_setup()
2157 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2181 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2186 dev->i2c_bus[1].i2c_client.addr = 0xa0 >> 1; in cx23885_card_setup()
2187 tveeprom_read(&dev->i2c_bus[1].i2c_client, in cx23885_card_setup()
2189 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2194 switch (dev->board) { in cx23885_card_setup()
2197 ts1->gen_ctrl_val = 0x4; /* Parallel */ in cx23885_card_setup()
2198 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2199 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2202 ts2->gen_ctrl_val = 0x10e; in cx23885_card_setup()
2203 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2204 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2209 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2210 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2211 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2214 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2215 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2216 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2220 /* Defaults for VID B - Analog encoder */ in cx23885_card_setup()
2222 ts1->gen_ctrl_val = 0x10e; in cx23885_card_setup()
2223 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2224 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2227 ts1->vld_misc_val = 0x2000; in cx23885_card_setup()
2228 ts1->hw_sop_ctrl_val = (0x47 << 16 | 188 << 4 | 0xc); in cx23885_card_setup()
2232 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2233 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2234 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2237 ts1->gen_ctrl_val = 0x4; /* Parallel */ in cx23885_card_setup()
2238 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2239 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2249 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2250 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2251 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2256 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2257 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2258 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2259 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2260 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2261 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2265 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2266 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2267 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2268 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2269 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2270 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2276 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2277 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2278 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2281 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2282 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2283 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2284 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2285 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2286 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2289 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2290 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2291 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2292 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2293 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2294 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2297 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2298 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2299 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2303 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2304 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2305 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2306 ts2->gen_ctrl_val = 0x8; /* Serial bus */ in cx23885_card_setup()
2307 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2308 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2311 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2312 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2313 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2314 ts2->gen_ctrl_val = 0xe; /* Serial bus */ in cx23885_card_setup()
2315 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2316 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2320 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2321 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2322 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2323 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2324 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2325 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2332 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2333 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2334 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2335 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2336 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2337 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2360 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2361 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2362 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2368 switch (dev->board) { in cx23885_card_setup()
2416 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2417 &dev->i2c_bus[2].i2c_adap, in cx23885_card_setup()
2419 if (dev->sd_cx25840) { in cx23885_card_setup()
2421 v4l2_set_subdev_hostdata(dev->sd_cx25840, in cx23885_card_setup()
2422 &dev->clk_freq); in cx23885_card_setup()
2424 dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE; in cx23885_card_setup()
2425 v4l2_subdev_call(dev->sd_cx25840, core, load_fw); in cx23885_card_setup()
2430 switch (dev->board) { in cx23885_card_setup()
2432 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2433 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2438 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2439 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2442 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2443 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2448 /* AUX-PLL 27MHz CLK */ in cx23885_card_setup()
2449 switch (dev->board) { in cx23885_card_setup()
2456 const char *filename = "dvb-netup-altera-01.fw"; in cx23885_card_setup()
2467 netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo); in cx23885_card_setup()
2473 filename = "dvb-netup-altera-04.fw"; in cx23885_card_setup()
2476 filename = "dvb-netup-altera-01.fw"; in cx23885_card_setup()
2482 ret = request_firmware(&fw, filename, &dev->pci->dev); in cx23885_card_setup()