aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2017-02-28 11:02:00 -0500
committerSekhar Nori <nsekhar@ti.com>2017-03-07 06:13:19 -0500
commit99228481331cdd75981767b23b83ef0ca7aa11da (patch)
tree03c595561b22286407fab324bf6ae95ca2970c54
parente503eaa314d3cb1f6c2c1820bb382d50de61acad (diff)
ARM: davinci: add pdata-quirks for da850-evm vpif display
Similarly to vpif capture: we need to register the vpif display driver and the corresponding adv7343 encoder in pdata-quirks as the DT support is not complete - there isn't currently a way to define the output_routing in the V4L2 drivers (c.f. s_routing) via DT. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--arch/arm/mach-davinci/pdata-quirks.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c
index 4a9603d5e083..329f5402ad1d 100644
--- a/arch/arm/mach-davinci/pdata-quirks.c
+++ b/arch/arm/mach-davinci/pdata-quirks.c
@@ -11,6 +11,7 @@
11#include <linux/of_platform.h> 11#include <linux/of_platform.h>
12 12
13#include <media/i2c/tvp514x.h> 13#include <media/i2c/tvp514x.h>
14#include <media/i2c/adv7343.h>
14 15
15#include <mach/common.h> 16#include <mach/common.h>
16#include <mach/da8xx.h> 17#include <mach/da8xx.h>
@@ -126,6 +127,70 @@ static void __init da850_vpif_capture_legacy_init_evm(void)
126 da850_vpif_legacy_register_capture(); 127 da850_vpif_legacy_register_capture();
127} 128}
128 129
130static struct adv7343_platform_data adv7343_pdata = {
131 .mode_config = {
132 .dac = { 1, 1, 1 },
133 },
134 .sd_config = {
135 .sd_dac_out = { 1 },
136 },
137};
138
139static struct vpif_subdev_info da850_vpif_subdev[] = {
140 {
141 .name = "adv7343",
142 .board_info = {
143 I2C_BOARD_INFO("adv7343", 0x2a),
144 .platform_data = &adv7343_pdata,
145 },
146 },
147};
148
149static const struct vpif_output da850_ch0_outputs[] = {
150 {
151 .output = {
152 .index = 0,
153 .name = "Composite",
154 .type = V4L2_OUTPUT_TYPE_ANALOG,
155 .capabilities = V4L2_OUT_CAP_STD,
156 .std = V4L2_STD_ALL,
157 },
158 .subdev_name = "adv7343",
159 .output_route = ADV7343_COMPOSITE_ID,
160 },
161 {
162 .output = {
163 .index = 1,
164 .name = "S-Video",
165 .type = V4L2_OUTPUT_TYPE_ANALOG,
166 .capabilities = V4L2_OUT_CAP_STD,
167 .std = V4L2_STD_ALL,
168 },
169 .subdev_name = "adv7343",
170 .output_route = ADV7343_SVIDEO_ID,
171 },
172};
173
174static struct vpif_display_config da850_vpif_display_config = {
175 .subdevinfo = da850_vpif_subdev,
176 .subdev_count = ARRAY_SIZE(da850_vpif_subdev),
177 .chan_config[0] = {
178 .outputs = da850_ch0_outputs,
179 .output_count = ARRAY_SIZE(da850_ch0_outputs),
180 },
181 .card_name = "DA850/OMAP-L138 Video Display",
182};
183
184static void __init da850_vpif_display_legacy_init_evm(void)
185{
186 int ret;
187
188 ret = da850_register_vpif_display(&da850_vpif_display_config);
189 if (ret)
190 pr_warn("%s: VPIF display setup failed: %d\n",
191 __func__, ret);
192}
193
129static void pdata_quirks_check(struct pdata_init *quirks) 194static void pdata_quirks_check(struct pdata_init *quirks)
130{ 195{
131 while (quirks->compatible) { 196 while (quirks->compatible) {
@@ -139,6 +204,7 @@ static void pdata_quirks_check(struct pdata_init *quirks)
139 204
140static struct pdata_init pdata_quirks[] __initdata = { 205static struct pdata_init pdata_quirks[] __initdata = {
141 { "ti,da850-lcdk", da850_vpif_capture_legacy_init_lcdk, }, 206 { "ti,da850-lcdk", da850_vpif_capture_legacy_init_lcdk, },
207 { "ti,da850-evm", da850_vpif_display_legacy_init_evm, },
142 { "ti,da850-evm", da850_vpif_capture_legacy_init_evm, }, 208 { "ti,da850-evm", da850_vpif_capture_legacy_init_evm, },
143 { /* sentinel */ }, 209 { /* sentinel */ },
144}; 210};