diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-09-22 00:48:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:07 -0400 |
commit | 2491fbb7d5d83ea78c6127cb589c9e6c7649e0aa (patch) | |
tree | bc900e87c54426f59d7071461687b3a2d1864138 | |
parent | 1cbd89dbde2a473f2f3d47ae31163d80fc8ca7e7 (diff) |
V4L/DVB (9023): cx88: HVR3000 / 4000 GPIO related changes
Patch by Darron Broad.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index a0e6156bc20f..0203c7579a32 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1349,27 +1349,30 @@ static const struct cx88_board cx88_boards[] = { | |||
1349 | .radio_addr = ADDR_UNSET, | 1349 | .radio_addr = ADDR_UNSET, |
1350 | .tda9887_conf = TDA9887_PRESENT, | 1350 | .tda9887_conf = TDA9887_PRESENT, |
1351 | .audio_chip = V4L2_IDENT_WM8775, | 1351 | .audio_chip = V4L2_IDENT_WM8775, |
1352 | /* | ||
1353 | * gpio0 as reported by Mike Crash <mike AT mikecrash.com> | ||
1354 | */ | ||
1352 | .input = {{ | 1355 | .input = {{ |
1353 | .type = CX88_VMUX_TELEVISION, | 1356 | .type = CX88_VMUX_TELEVISION, |
1354 | .vmux = 0, | 1357 | .vmux = 0, |
1355 | .gpio0 = 0xe780, | 1358 | .gpio0 = 0xef88, |
1356 | .audioroute = 1, | 1359 | .audioroute = 1, |
1357 | },{ | 1360 | },{ |
1358 | .type = CX88_VMUX_COMPOSITE1, | 1361 | .type = CX88_VMUX_COMPOSITE1, |
1359 | .vmux = 1, | 1362 | .vmux = 1, |
1360 | .gpio0 = 0xe780, | 1363 | .gpio0 = 0xef88, |
1361 | .audioroute = 2, | 1364 | .audioroute = 2, |
1362 | },{ | 1365 | },{ |
1363 | .type = CX88_VMUX_SVIDEO, | 1366 | .type = CX88_VMUX_SVIDEO, |
1364 | .vmux = 2, | 1367 | .vmux = 2, |
1365 | .gpio0 = 0xe780, | 1368 | .gpio0 = 0xef88, |
1366 | .audioroute = 2, | 1369 | .audioroute = 2, |
1367 | }}, | 1370 | }}, |
1368 | /* fixme: Add radio support */ | 1371 | /* fixme: Add radio support */ |
1369 | .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD, | 1372 | .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD, |
1370 | .radio = { | 1373 | .radio = { |
1371 | .type = CX88_RADIO, | 1374 | .type = CX88_RADIO, |
1372 | .gpio0 = 0xe780, | 1375 | .gpio0 = 0xef88, |
1373 | }, | 1376 | }, |
1374 | }, | 1377 | }, |
1375 | [CX88_BOARD_ADSTECH_PTV_390] = { | 1378 | [CX88_BOARD_ADSTECH_PTV_390] = { |
@@ -1680,6 +1683,26 @@ static const struct cx88_board cx88_boards[] = { | |||
1680 | * S-Video 0xc4bf 0xc4bb | 1683 | * S-Video 0xc4bf 0xc4bb |
1681 | * Composite1 0xc4ff 0xc4fb | 1684 | * Composite1 0xc4ff 0xc4fb |
1682 | * S-Video1 0xc4ff 0xc4fb | 1685 | * S-Video1 0xc4ff 0xc4fb |
1686 | * | ||
1687 | * BIT VALUE FUNCTION GP{x}_IO | ||
1688 | * 0 1 I:? | ||
1689 | * 1 1 I:? | ||
1690 | * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH | ||
1691 | * 3 1 I:? | ||
1692 | * 4 1 I:? | ||
1693 | * 5 1 I:? | ||
1694 | * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION | ||
1695 | * 7 1 O:DVB-T DEMOD RESET LOW | ||
1696 | * | ||
1697 | * BIT VALUE FUNCTION GP{x}_OE | ||
1698 | * 8 0 I | ||
1699 | * 9 0 I | ||
1700 | * a 1 O | ||
1701 | * b 0 I | ||
1702 | * c 0 I | ||
1703 | * d 0 I | ||
1704 | * e 1 O | ||
1705 | * f 1 O | ||
1683 | */ | 1706 | */ |
1684 | .input = {{ | 1707 | .input = {{ |
1685 | .type = CX88_VMUX_TELEVISION, | 1708 | .type = CX88_VMUX_TELEVISION, |
@@ -2512,13 +2535,18 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
2512 | { | 2535 | { |
2513 | switch (core->boardnr) { | 2536 | switch (core->boardnr) { |
2514 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 2537 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
2515 | /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */ | 2538 | /* |
2516 | /* We leave here with the 702 on the bus */ | 2539 | * Bring the 702 demod up before i2c scanning/attach or devices are hidden |
2517 | cx_write(MO_GP0_IO, 0x0000e780); | 2540 | * We leave here with the 702 on the bus |
2541 | * | ||
2542 | * "reset the IR receiver on GPIO[3]" | ||
2543 | * Reported by Mike Crash <mike AT mikecrash.com> | ||
2544 | */ | ||
2545 | cx_write(MO_GP0_IO, 0x0000ef88); | ||
2518 | udelay(1000); | 2546 | udelay(1000); |
2519 | cx_clear(MO_GP0_IO, 0x00000080); | 2547 | cx_clear(MO_GP0_IO, 0x00000088); |
2520 | udelay(50); | 2548 | udelay(50); |
2521 | cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */ | 2549 | cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */ |
2522 | udelay(1000); | 2550 | udelay(1000); |
2523 | break; | 2551 | break; |
2524 | 2552 | ||
@@ -2531,15 +2559,18 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
2531 | msleep(10); | 2559 | msleep(10); |
2532 | break; | 2560 | break; |
2533 | 2561 | ||
2534 | case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD: | 2562 | case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD: |
2535 | /* Enable the xc5000 tuner */ | 2563 | /* Enable the xc5000 tuner */ |
2536 | cx_set(MO_GP0_IO, 0x00001010); | 2564 | cx_set(MO_GP0_IO, 0x00001010); |
2537 | break; | 2565 | break; |
2566 | |||
2567 | case CX88_BOARD_HAUPPAUGE_HVR3000: | ||
2538 | case CX88_BOARD_HAUPPAUGE_HVR4000: | 2568 | case CX88_BOARD_HAUPPAUGE_HVR4000: |
2539 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | 2569 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: |
2540 | /* Init GPIO to allow tuner to attach */ | 2570 | /* Init GPIO */ |
2541 | cx_write(MO_GP0_IO, 0x0000c4bf); | 2571 | cx_write(MO_GP0_IO, core->board.input[0].gpio0); |
2542 | udelay(1000); | 2572 | udelay(1000); |
2573 | break; | ||
2543 | } | 2574 | } |
2544 | } | 2575 | } |
2545 | 2576 | ||