diff options
author | Scott Jiang <scott.jiang.linux@gmail.com> | 2012-07-13 17:43:33 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-07-24 01:39:53 -0400 |
commit | e942d619fdd8eb9194c1305ea5968ffb78619f0d (patch) | |
tree | d71f0491d0f64e48e8e89f3bc362c0bbd31f06e2 /arch/blackfin | |
parent | acb3166dab2bc6755408a015d69e4b47626741df (diff) |
bf609: add adv7511 display support
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf609/boards/ezkit.c | 101 |
1 files changed, 90 insertions, 11 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c index 0d8aa11b8950..9f9f597dc1be 100644 --- a/arch/blackfin/mach-bf609/boards/ezkit.c +++ b/arch/blackfin/mach-bf609/boards/ezkit.c | |||
@@ -974,17 +974,17 @@ static struct adv7842_platform_data adv7842_data = { | |||
974 | .prim_mode = ADV7842_PRIM_MODE_SDP, | 974 | .prim_mode = ADV7842_PRIM_MODE_SDP, |
975 | .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1, | 975 | .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1, |
976 | .inp_color_space = ADV7842_INP_COLOR_SPACE_AUTO, | 976 | .inp_color_space = ADV7842_INP_COLOR_SPACE_AUTO, |
977 | .i2c_sdp_io = 0x30, | 977 | .i2c_sdp_io = 0x40, |
978 | .i2c_sdp = 0x31, | 978 | .i2c_sdp = 0x41, |
979 | .i2c_cp = 0x32, | 979 | .i2c_cp = 0x42, |
980 | .i2c_vdp = 0x33, | 980 | .i2c_vdp = 0x43, |
981 | .i2c_afe = 0x34, | 981 | .i2c_afe = 0x44, |
982 | .i2c_hdmi = 0x35, | 982 | .i2c_hdmi = 0x45, |
983 | .i2c_repeater = 0x36, | 983 | .i2c_repeater = 0x46, |
984 | .i2c_edid = 0x37, | 984 | .i2c_edid = 0x47, |
985 | .i2c_infoframe = 0x39, | 985 | .i2c_infoframe = 0x48, |
986 | .i2c_cec = 0x3a, | 986 | .i2c_cec = 0x49, |
987 | .i2c_avlink = 0x3b, | 987 | .i2c_avlink = 0x4a, |
988 | .i2c_ex = 0x26, | 988 | .i2c_ex = 0x26, |
989 | }; | 989 | }; |
990 | 990 | ||
@@ -1013,6 +1013,80 @@ static struct platform_device bfin_capture_device = { | |||
1013 | }; | 1013 | }; |
1014 | #endif | 1014 | #endif |
1015 | 1015 | ||
1016 | #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ | ||
1017 | || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE) | ||
1018 | #include <linux/videodev2.h> | ||
1019 | #include <media/blackfin/bfin_display.h> | ||
1020 | #include <media/blackfin/ppi.h> | ||
1021 | |||
1022 | static const unsigned short ppi_req_disp[] = { | ||
1023 | P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3, | ||
1024 | P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, | ||
1025 | P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, | ||
1026 | P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, | ||
1027 | P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2, | ||
1028 | 0, | ||
1029 | }; | ||
1030 | |||
1031 | static const struct ppi_info ppi_info = { | ||
1032 | .type = PPI_TYPE_EPPI3, | ||
1033 | .dma_ch = CH_EPPI0_CH0, | ||
1034 | .irq_err = IRQ_EPPI0_STAT, | ||
1035 | .base = (void __iomem *)EPPI0_STAT, | ||
1036 | .pin_req = ppi_req_disp, | ||
1037 | }; | ||
1038 | |||
1039 | #if defined(CONFIG_VIDEO_ADV7511) \ | ||
1040 | || defined(CONFIG_VIDEO_ADV7511_MODULE) | ||
1041 | #include <media/adv7511.h> | ||
1042 | |||
1043 | static struct v4l2_output adv7511_outputs[] = { | ||
1044 | { | ||
1045 | .index = 0, | ||
1046 | .name = "HDMI", | ||
1047 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
1048 | .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS, | ||
1049 | }, | ||
1050 | }; | ||
1051 | |||
1052 | static struct disp_route adv7511_routes[] = { | ||
1053 | { | ||
1054 | .output = 0, | ||
1055 | }, | ||
1056 | }; | ||
1057 | |||
1058 | static struct adv7511_platform_data adv7511_data = { | ||
1059 | .edid_addr = 0x7e, | ||
1060 | .i2c_ex = 0x25, | ||
1061 | }; | ||
1062 | |||
1063 | static struct bfin_display_config bfin_display_data = { | ||
1064 | .card_name = "BF609", | ||
1065 | .outputs = adv7511_outputs, | ||
1066 | .num_outputs = ARRAY_SIZE(adv7511_outputs), | ||
1067 | .routes = adv7511_routes, | ||
1068 | .i2c_adapter_id = 0, | ||
1069 | .board_info = { | ||
1070 | .type = "adv7511", | ||
1071 | .addr = 0x39, | ||
1072 | .platform_data = (void *)&adv7511_data, | ||
1073 | }, | ||
1074 | .ppi_info = &ppi_info, | ||
1075 | .ppi_control = (EPPI_CTL_SPLTWRD | PACK_EN | DLEN_16 | ||
1076 | | EPPI_CTL_FS1LO_FS2LO | EPPI_CTL_POLC3 | ||
1077 | | EPPI_CTL_IFSGEN | EPPI_CTL_SYNC2 | ||
1078 | | EPPI_CTL_NON656 | EPPI_CTL_DIR), | ||
1079 | }; | ||
1080 | #endif | ||
1081 | |||
1082 | static struct platform_device bfin_display_device = { | ||
1083 | .name = "bfin_display", | ||
1084 | .dev = { | ||
1085 | .platform_data = &bfin_display_data, | ||
1086 | }, | ||
1087 | }; | ||
1088 | #endif | ||
1089 | |||
1016 | #if defined(CONFIG_BFIN_CRC) | 1090 | #if defined(CONFIG_BFIN_CRC) |
1017 | #define BFIN_CRC_NAME "bfin-crc" | 1091 | #define BFIN_CRC_NAME "bfin-crc" |
1018 | 1092 | ||
@@ -1477,6 +1551,11 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
1477 | || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) | 1551 | || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE) |
1478 | &bfin_capture_device, | 1552 | &bfin_capture_device, |
1479 | #endif | 1553 | #endif |
1554 | #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ | ||
1555 | || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE) | ||
1556 | &bfin_display_device, | ||
1557 | #endif | ||
1558 | |||
1480 | }; | 1559 | }; |
1481 | 1560 | ||
1482 | static int __init ezkit_init(void) | 1561 | static int __init ezkit_init(void) |