aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/dss-common.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-24 04:29:03 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-28 03:23:19 -0400
commit7346582dd116181f3c6e9e3c4525f5c0c6cf430b (patch)
treede07613e56584f31314722f4aa528a11913a93fb /arch/arm/mach-omap2/dss-common.c
parent488e352b2baadafc3e21a627b7ec8810402d47d1 (diff)
ARM: OMAP: dss-common: use new display drivers
Use the new display drivers for OMAP4 Panda and OMAP4 SDP boards. The new OMAP display drivers were merged for 3.11, and we can now change the board files to use the new ones and phase out the old ones. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/dss-common.c')
-rw-r--r--arch/arm/mach-omap2/dss-common.c186
1 files changed, 109 insertions, 77 deletions
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index 00c049243d25..321541223bb7 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -25,6 +25,7 @@
25 25
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/platform_device.h>
28 29
29#include <video/omapdss.h> 30#include <video/omapdss.h>
30#include <video/omap-panel-data.h> 31#include <video/omap-panel-data.h>
@@ -37,52 +38,76 @@
37#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 38#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
38#define HDMI_GPIO_HPD 63 /* Hotplug detect */ 39#define HDMI_GPIO_HPD 63 /* Hotplug detect */
39 40
40/* Display DVI */
41#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 41#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
42 42
43/* Using generic display panel */ 43/* DVI Connector */
44static struct tfp410_platform_data omap4_dvi_panel = { 44static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = {
45 .i2c_bus_num = 2, 45 .name = "dvi",
46 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 46 .source = "tfp410.0",
47 .i2c_bus_num = 2,
47}; 48};
48 49
49static struct omap_dss_device omap4_panda_dvi_device = { 50static struct platform_device omap4_panda_dvi_connector_device = {
50 .type = OMAP_DISPLAY_TYPE_DPI, 51 .name = "connector-dvi",
51 .name = "dvi", 52 .id = 0,
52 .driver_name = "tfp410", 53 .dev.platform_data = &omap4_panda_dvi_connector_pdata,
53 .data = &omap4_dvi_panel, 54};
54 .phy.dpi.data_lines = 24, 55
55 .channel = OMAP_DSS_CHANNEL_LCD2, 56/* TFP410 DPI-to-DVI chip */
57static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = {
58 .name = "tfp410.0",
59 .source = "dpi.0",
60 .data_lines = 24,
61 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
62};
63
64static struct platform_device omap4_panda_tfp410_device = {
65 .name = "tfp410",
66 .id = 0,
67 .dev.platform_data = &omap4_panda_tfp410_pdata,
56}; 68};
57 69
58static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { 70/* HDMI Connector */
71static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = {
72 .name = "hdmi",
73 .source = "tpd12s015.0",
74};
75
76static struct platform_device omap4_panda_hdmi_connector_device = {
77 .name = "connector-hdmi",
78 .id = 0,
79 .dev.platform_data = &omap4_panda_hdmi_connector_pdata,
80};
81
82/* TPD12S015 HDMI ESD protection & level shifter chip */
83static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = {
84 .name = "tpd12s015.0",
85 .source = "hdmi.0",
86
59 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, 87 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
60 .ls_oe_gpio = HDMI_GPIO_LS_OE, 88 .ls_oe_gpio = HDMI_GPIO_LS_OE,
61 .hpd_gpio = HDMI_GPIO_HPD, 89 .hpd_gpio = HDMI_GPIO_HPD,
62}; 90};
63 91
64static struct omap_dss_device omap4_panda_hdmi_device = { 92static struct platform_device omap4_panda_tpd_device = {
65 .name = "hdmi", 93 .name = "tpd12s015",
66 .driver_name = "hdmi_panel", 94 .id = 0,
67 .type = OMAP_DISPLAY_TYPE_HDMI, 95 .dev.platform_data = &omap4_panda_tpd_pdata,
68 .channel = OMAP_DSS_CHANNEL_DIGIT,
69 .data = &omap4_panda_hdmi_data,
70};
71
72static struct omap_dss_device *omap4_panda_dss_devices[] = {
73 &omap4_panda_dvi_device,
74 &omap4_panda_hdmi_device,
75}; 96};
76 97
77static struct omap_dss_board_info omap4_panda_dss_data = { 98static struct omap_dss_board_info omap4_panda_dss_data = {
78 .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), 99 .default_display_name = "dvi",
79 .devices = omap4_panda_dss_devices,
80 .default_device = &omap4_panda_dvi_device,
81}; 100};
82 101
83void __init omap4_panda_display_init_of(void) 102void __init omap4_panda_display_init_of(void)
84{ 103{
85 omap_display_init(&omap4_panda_dss_data); 104 omap_display_init(&omap4_panda_dss_data);
105
106 platform_device_register(&omap4_panda_tfp410_device);
107 platform_device_register(&omap4_panda_dvi_connector_device);
108
109 platform_device_register(&omap4_panda_tpd_device);
110 platform_device_register(&omap4_panda_hdmi_connector_device);
86} 111}
87 112
88 113
@@ -91,67 +116,71 @@ void __init omap4_panda_display_init_of(void)
91#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ 116#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
92#define DLP_POWER_ON_GPIO 40 117#define DLP_POWER_ON_GPIO 40
93 118
94static struct nokia_dsi_panel_data dsi1_panel = { 119static struct panel_dsicm_platform_data dsi1_panel = {
95 .name = "taal", 120 .name = "lcd",
96 .reset_gpio = 102, 121 .source = "dsi.0",
97 .use_ext_te = false, 122 .reset_gpio = 102,
98 .ext_te_gpio = 101, 123 .use_ext_te = false,
99 .esd_interval = 0, 124 .ext_te_gpio = 101,
100 .pin_config = { 125 .pin_config = {
101 .num_pins = 6, 126 .num_pins = 6,
102 .pins = { 0, 1, 2, 3, 4, 5 }, 127 .pins = { 0, 1, 2, 3, 4, 5 },
103 },
104};
105
106static struct omap_dss_device sdp4430_lcd_device = {
107 .name = "lcd",
108 .driver_name = "taal",
109 .type = OMAP_DISPLAY_TYPE_DSI,
110 .data = &dsi1_panel,
111 .phy.dsi = {
112 .module = 0,
113 }, 128 },
114 .channel = OMAP_DSS_CHANNEL_LCD,
115}; 129};
116 130
117static struct nokia_dsi_panel_data dsi2_panel = { 131static struct platform_device sdp4430_lcd_device = {
118 .name = "taal", 132 .name = "panel-dsi-cm",
119 .reset_gpio = 104, 133 .id = 0,
120 .use_ext_te = false, 134 .dev.platform_data = &dsi1_panel,
121 .ext_te_gpio = 103,
122 .esd_interval = 0,
123 .pin_config = {
124 .num_pins = 6,
125 .pins = { 0, 1, 2, 3, 4, 5 },
126 },
127}; 135};
128 136
129static struct omap_dss_device sdp4430_lcd2_device = { 137static struct panel_dsicm_platform_data dsi2_panel = {
130 .name = "lcd2", 138 .name = "lcd2",
131 .driver_name = "taal", 139 .source = "dsi.1",
132 .type = OMAP_DISPLAY_TYPE_DSI, 140 .reset_gpio = 104,
133 .data = &dsi2_panel, 141 .use_ext_te = false,
134 .phy.dsi = { 142 .ext_te_gpio = 103,
135 143 .pin_config = {
136 .module = 1, 144 .num_pins = 6,
145 .pins = { 0, 1, 2, 3, 4, 5 },
137 }, 146 },
138 .channel = OMAP_DSS_CHANNEL_LCD2,
139}; 147};
140 148
141static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 149static struct platform_device sdp4430_lcd2_device = {
150 .name = "panel-dsi-cm",
151 .id = 1,
152 .dev.platform_data = &dsi2_panel,
153};
154
155/* HDMI Connector */
156static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = {
157 .name = "hdmi",
158 .source = "tpd12s015.0",
159};
160
161static struct platform_device sdp4430_hdmi_connector_device = {
162 .name = "connector-hdmi",
163 .id = 0,
164 .dev.platform_data = &sdp4430_hdmi_connector_pdata,
165};
166
167/* TPD12S015 HDMI ESD protection & level shifter chip */
168static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = {
169 .name = "tpd12s015.0",
170 .source = "hdmi.0",
171
142 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, 172 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
143 .ls_oe_gpio = HDMI_GPIO_LS_OE, 173 .ls_oe_gpio = HDMI_GPIO_LS_OE,
144 .hpd_gpio = HDMI_GPIO_HPD, 174 .hpd_gpio = HDMI_GPIO_HPD,
145}; 175};
146 176
147static struct omap_dss_device sdp4430_hdmi_device = { 177static struct platform_device sdp4430_tpd_device = {
148 .name = "hdmi", 178 .name = "tpd12s015",
149 .driver_name = "hdmi_panel", 179 .id = 0,
150 .type = OMAP_DISPLAY_TYPE_HDMI, 180 .dev.platform_data = &sdp4430_tpd_pdata,
151 .channel = OMAP_DSS_CHANNEL_DIGIT,
152 .data = &sdp4430_hdmi_data,
153}; 181};
154 182
183
155static struct picodlp_panel_data sdp4430_picodlp_pdata = { 184static struct picodlp_panel_data sdp4430_picodlp_pdata = {
156 .picodlp_adapter_id = 2, 185 .picodlp_adapter_id = 2,
157 .emu_done_gpio = 44, 186 .emu_done_gpio = 44,
@@ -168,16 +197,13 @@ static struct omap_dss_device sdp4430_picodlp_device = {
168}; 197};
169 198
170static struct omap_dss_device *sdp4430_dss_devices[] = { 199static struct omap_dss_device *sdp4430_dss_devices[] = {
171 &sdp4430_lcd_device,
172 &sdp4430_lcd2_device,
173 &sdp4430_hdmi_device,
174 &sdp4430_picodlp_device, 200 &sdp4430_picodlp_device,
175}; 201};
176 202
177static struct omap_dss_board_info sdp4430_dss_data = { 203static struct omap_dss_board_info sdp4430_dss_data = {
178 .num_devices = ARRAY_SIZE(sdp4430_dss_devices), 204 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
179 .devices = sdp4430_dss_devices, 205 .devices = sdp4430_dss_devices,
180 .default_device = &sdp4430_lcd_device, 206 .default_display_name = "lcd",
181}; 207};
182 208
183/* 209/*
@@ -201,4 +227,10 @@ void __init omap_4430sdp_display_init_of(void)
201 pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__); 227 pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
202 228
203 omap_display_init(&sdp4430_dss_data); 229 omap_display_init(&sdp4430_dss_data);
230
231 platform_device_register(&sdp4430_lcd_device);
232 platform_device_register(&sdp4430_lcd2_device);
233
234 platform_device_register(&sdp4430_tpd_device);
235 platform_device_register(&sdp4430_hdmi_connector_device);
204} 236}