diff options
author | Scott Jiang <scott.jiang.linux@gmail.com> | 2012-06-01 12:06:25 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-07-24 01:39:49 -0400 |
commit | 338881a5045fe211577e1e9c9088b608b81ca698 (patch) | |
tree | bcc997250ecda7610d90af4e0ccf3dd53910f645 | |
parent | b0ce61d550cb59928df3eabff0791b22f08f1e06 (diff) |
v4l2: add adv7842 video decoder driver
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
-rw-r--r-- | arch/blackfin/mach-bf609/boards/ezkit.c | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c index adc08e18dbc1..a2f991f914cc 100644 --- a/arch/blackfin/mach-bf609/boards/ezkit.c +++ b/arch/blackfin/mach-bf609/boards/ezkit.c | |||
@@ -825,6 +825,10 @@ static struct adau1761_platform_data adau1761_info = { | |||
825 | static const unsigned short ppi_req[] = { | 825 | static const unsigned short ppi_req[] = { |
826 | P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3, | 826 | P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3, |
827 | P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, | 827 | P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, |
828 | P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, | ||
829 | P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, | ||
830 | P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19, | ||
831 | P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23, | ||
828 | P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2, | 832 | P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2, |
829 | 0, | 833 | 0, |
830 | }; | 834 | }; |
@@ -875,6 +879,101 @@ static struct bfin_capture_config bfin_capture_data = { | |||
875 | }; | 879 | }; |
876 | #endif | 880 | #endif |
877 | 881 | ||
882 | #if defined(CONFIG_VIDEO_ADV7842) \ | ||
883 | || defined(CONFIG_VIDEO_ADV7842_MODULE) | ||
884 | #include <media/adv7842.h> | ||
885 | |||
886 | static struct v4l2_input adv7842_inputs[] = { | ||
887 | { | ||
888 | .index = 0, | ||
889 | .name = "Composite", | ||
890 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
891 | .std = V4L2_STD_ALL, | ||
892 | }, | ||
893 | { | ||
894 | .index = 1, | ||
895 | .name = "S-Video", | ||
896 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
897 | .std = V4L2_STD_ALL, | ||
898 | }, | ||
899 | { | ||
900 | .index = 2, | ||
901 | .name = "Component", | ||
902 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
903 | .std = V4L2_STD_ALL, | ||
904 | }, | ||
905 | { | ||
906 | .index = 3, | ||
907 | .name = "VGA", | ||
908 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
909 | .std = V4L2_STD_ALL, | ||
910 | }, | ||
911 | { | ||
912 | .index = 4, | ||
913 | .name = "HDMI", | ||
914 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
915 | .std = V4L2_STD_ALL, | ||
916 | }, | ||
917 | }; | ||
918 | |||
919 | static struct bcap_route adv7842_routes[] = { | ||
920 | { | ||
921 | .input = 3, | ||
922 | }, | ||
923 | { | ||
924 | .input = 4, | ||
925 | }, | ||
926 | { | ||
927 | .input = 2, | ||
928 | }, | ||
929 | { | ||
930 | .input = 1, | ||
931 | }, | ||
932 | { | ||
933 | .input = 0, | ||
934 | }, | ||
935 | }; | ||
936 | |||
937 | static struct adv7842_platform_data adv7842_data = { | ||
938 | .ain_sel = ADV7842_AIN10_11_12_NC_SYNC_4_1, | ||
939 | .op_ch_sel = ADV7842_OP_CH_SEL_BRG, | ||
940 | .prim_mode = ADV7842_PRIM_MODE_SDP, | ||
941 | .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1, | ||
942 | .inp_color_space = ADV7842_INP_COLOR_SPACE_AUTO, | ||
943 | .op_format_sel = ADV7842_OP_FORMAT_SEL_SDR_ITU656_8, | ||
944 | .op_656_range = 1, | ||
945 | .blank_data = 1, | ||
946 | .insert_av_codes = 1, | ||
947 | .i2c_sdp_io = 0x30, | ||
948 | .i2c_sdp = 0x31, | ||
949 | .i2c_cp = 0x32, | ||
950 | .i2c_vdp = 0x33, | ||
951 | .i2c_afe = 0x34, | ||
952 | .i2c_hdmi = 0x35, | ||
953 | .i2c_repeater = 0x36, | ||
954 | .i2c_edid = 0x37, | ||
955 | .i2c_infoframe = 0x38, | ||
956 | .i2c_cec = 0x39, | ||
957 | .i2c_avlink = 0x3a, | ||
958 | }; | ||
959 | |||
960 | static struct bfin_capture_config bfin_capture_data = { | ||
961 | .card_name = "BF609", | ||
962 | .inputs = adv7842_inputs, | ||
963 | .num_inputs = ARRAY_SIZE(adv7842_inputs), | ||
964 | .routes = adv7842_routes, | ||
965 | .i2c_adapter_id = 0, | ||
966 | .board_info = { | ||
967 | .type = "adv7842", | ||
968 | .addr = 0x20, | ||
969 | .platform_data = (void *)&adv7842_data, | ||
970 | }, | ||
971 | .ppi_info = &ppi_info, | ||
972 | .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FLDSEL | ||
973 | | EPPI_CTL_ACTIVE656), | ||
974 | }; | ||
975 | #endif | ||
976 | |||
878 | static struct platform_device bfin_capture_device = { | 977 | static struct platform_device bfin_capture_device = { |
879 | .name = "bfin_capture", | 978 | .name = "bfin_capture", |
880 | .dev = { | 979 | .dev = { |