aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-03-28 08:58:56 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-09 03:53:05 -0400
commite4a9e94cc58ed6e4efb02b80be3a9bf57f448d07 (patch)
treec4b33461be5176e7c5ae7cc1590501b889f13ad1 /include/video
parent3acc797c1db2eb873b13a07f21fe9572af4b78ee (diff)
OMAPDSS: DSI: implement generic DSI pin config
In preparation for device tree, this patch changes how the DSI pins are configured. The current configuration method is only doable with board files and the configuration data is OMAP specific. This patch moves the configuration data to the panel's platform data, and the data can easily be given via DT in the future. The configuration data format is also changed to a generic one which should be suitable for all platforms. The new format is an array of pin numbers, where the array items start from clock + and -, then data1 + and -, and so on. For example: { 0, // pin num for clock lane + 1, // pin num for clock lane - 2, // pin num for data1 lane + 3, // pin num for data1 lane - ... } The pin numbers are translated by the DSI driver and used to configure the hardware appropriately. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/omap-panel-nokia-dsi.h3
-rw-r--r--include/video/omapdss.h28
2 files changed, 20 insertions, 11 deletions
diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h
index 7dc71f9c13e6..04219a295539 100644
--- a/include/video/omap-panel-nokia-dsi.h
+++ b/include/video/omap-panel-nokia-dsi.h
@@ -11,6 +11,7 @@ struct omap_dss_device;
11 * @esd_interval: interval of ESD checks, 0 = disabled (ms) 11 * @esd_interval: interval of ESD checks, 0 = disabled (ms)
12 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) 12 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
13 * @use_dsi_backlight: true if panel uses DSI command to control backlight 13 * @use_dsi_backlight: true if panel uses DSI command to control backlight
14 * @pin_config: DSI pin configuration
14 */ 15 */
15struct nokia_dsi_panel_data { 16struct nokia_dsi_panel_data {
16 const char *name; 17 const char *name;
@@ -24,6 +25,8 @@ struct nokia_dsi_panel_data {
24 unsigned ulps_timeout; 25 unsigned ulps_timeout;
25 26
26 bool use_dsi_backlight; 27 bool use_dsi_backlight;
28
29 struct omap_dsi_pin_config pin_config;
27}; 30};
28 31
29#endif /* __OMAP_NOKIA_DSI_PANEL_H */ 32#endif /* __OMAP_NOKIA_DSI_PANEL_H */
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 483f67caa7ad..1c46a14341dd 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -468,6 +468,21 @@ struct omap_overlay_manager {
468 int (*wait_for_vsync)(struct omap_overlay_manager *mgr); 468 int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
469}; 469};
470 470
471/* 22 pins means 1 clk lane and 10 data lanes */
472#define OMAP_DSS_MAX_DSI_PINS 22
473
474struct omap_dsi_pin_config {
475 int num_pins;
476 /*
477 * pin numbers in the following order:
478 * clk+, clk-
479 * data1+, data1-
480 * data2+, data2-
481 * ...
482 */
483 int pins[OMAP_DSS_MAX_DSI_PINS];
484};
485
471struct omap_dss_device { 486struct omap_dss_device {
472 struct device dev; 487 struct device dev;
473 488
@@ -490,17 +505,6 @@ struct omap_dss_device {
490 } sdi; 505 } sdi;
491 506
492 struct { 507 struct {
493 u8 clk_lane;
494 u8 clk_pol;
495 u8 data1_lane;
496 u8 data1_pol;
497 u8 data2_lane;
498 u8 data2_pol;
499 u8 data3_lane;
500 u8 data3_pol;
501 u8 data4_lane;
502 u8 data4_pol;
503
504 int module; 508 int module;
505 509
506 bool ext_te; 510 bool ext_te;
@@ -687,6 +691,8 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
687int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel); 691int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel);
688int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); 692int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
689void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); 693void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
694int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev,
695 const struct omap_dsi_pin_config *pin_cfg);
690 696
691int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); 697int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
692void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, 698void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,