diff options
| author | Mikhail Khelik <mkhelik@cisco.com> | 2013-12-20 03:12:00 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-07 02:52:27 -0500 |
| commit | f31b62e14a000f4e7bf37ad8a84b13cb2079de21 (patch) | |
| tree | 912992fbb8a45e7307e6fd851c9453627f64c9b2 | |
| parent | 4a31a93a71e9d5d32945aa6f9a5de59ce3be2b94 (diff) | |
[media] adv7604: add hdmi driver strength adjustment
The driver strength is board dependent, so set it from the platform_data.
Signed-off-by: Mikhail Khelik <mkhelik@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| -rw-r--r-- | drivers/media/i2c/adv7604.c | 7 | ||||
| -rw-r--r-- | include/media/adv7604.h | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 6372d316e50a..00ce2716e319 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
| @@ -1942,7 +1942,12 @@ static int adv7604_core_init(struct v4l2_subdev *sd) | |||
| 1942 | /* TODO from platform data */ | 1942 | /* TODO from platform data */ |
| 1943 | cp_write(sd, 0x69, 0x30); /* Enable CP CSC */ | 1943 | cp_write(sd, 0x69, 0x30); /* Enable CP CSC */ |
| 1944 | io_write(sd, 0x06, 0xa6); /* positive VS and HS */ | 1944 | io_write(sd, 0x06, 0xa6); /* positive VS and HS */ |
| 1945 | io_write(sd, 0x14, 0x7f); /* Drive strength adjusted to max */ | 1945 | |
| 1946 | /* Adjust drive strength */ | ||
| 1947 | io_write(sd, 0x14, 0x40 | pdata->dr_str_data << 4 | | ||
| 1948 | pdata->dr_str_clk << 2 | | ||
| 1949 | pdata->dr_str_sync); | ||
| 1950 | |||
| 1946 | cp_write(sd, 0xba, (pdata->hdmi_free_run_mode << 1) | 0x01); /* HDMI free run */ | 1951 | cp_write(sd, 0xba, (pdata->hdmi_free_run_mode << 1) | 0x01); /* HDMI free run */ |
| 1947 | cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */ | 1952 | cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */ |
| 1948 | cp_write(sd, 0xf9, 0x23); /* STDI ch. 1 - LCVS change threshold - | 1953 | cp_write(sd, 0xf9, 0x23); /* STDI ch. 1 - LCVS change threshold - |
diff --git a/include/media/adv7604.h b/include/media/adv7604.h index 0c96e169dbe3..22fd1ac9d71b 100644 --- a/include/media/adv7604.h +++ b/include/media/adv7604.h | |||
| @@ -78,6 +78,12 @@ enum adv7604_op_format_sel { | |||
| 78 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_24_MODE2 = 0x8a, | 78 | ADV7604_OP_FORMAT_SEL_SDR_ITU656_24_MODE2 = 0x8a, |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | enum adv7604_drive_strength { | ||
| 82 | ADV7604_DR_STR_MEDIUM_LOW = 1, | ||
| 83 | ADV7604_DR_STR_MEDIUM_HIGH = 2, | ||
| 84 | ADV7604_DR_STR_HIGH = 3, | ||
| 85 | }; | ||
| 86 | |||
| 81 | /* Platform dependent definition */ | 87 | /* Platform dependent definition */ |
| 82 | struct adv7604_platform_data { | 88 | struct adv7604_platform_data { |
| 83 | /* connector - HDMI or DVI? */ | 89 | /* connector - HDMI or DVI? */ |
| @@ -110,6 +116,11 @@ struct adv7604_platform_data { | |||
| 110 | unsigned replicate_av_codes:1; | 116 | unsigned replicate_av_codes:1; |
| 111 | unsigned invert_cbcr:1; | 117 | unsigned invert_cbcr:1; |
| 112 | 118 | ||
| 119 | /* IO register 0x14 */ | ||
| 120 | enum adv7604_drive_strength dr_str_data; | ||
| 121 | enum adv7604_drive_strength dr_str_clk; | ||
| 122 | enum adv7604_drive_strength dr_str_sync; | ||
| 123 | |||
| 113 | /* IO register 0x30 */ | 124 | /* IO register 0x30 */ |
| 114 | unsigned output_bus_lsb_to_msb:1; | 125 | unsigned output_bus_lsb_to_msb:1; |
| 115 | 126 | ||
