Skip to content

Commit f955b78

Browse files
eng33pelwell
authored andcommitted
drivers:gpu:drm:panel: Added waveshare 5.0inch, 6.25inch, and 8.8inch dsi screen devices
Signed-off-by: eng33 <eng33@waveshare.com>
1 parent 31be188 commit f955b78

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

drivers/gpu/drm/panel/panel-waveshare-dsi.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,51 @@ static const struct drm_display_mode ws_panel_4_mode = {
150150
.vtotal = 720 + 8 + 4 + 16,
151151
};
152152

153+
/* 5.0inch 720x1280
154+
* https://www.waveshare.com/5inch-dsi-lcd-d.htm
155+
*/
156+
static const struct drm_display_mode ws_panel_5_0_mode = {
157+
.clock = 83333,
158+
.hdisplay = 720,
159+
.hsync_start = 720 + 100,
160+
.hsync_end = 720 + 100 + 80,
161+
.htotal = 720 + 100 + 80 + 100,
162+
.vdisplay = 1280,
163+
.vsync_start = 1280 + 20,
164+
.vsync_end = 1280 + 20 + 20,
165+
.vtotal = 1280 + 20 + 20 + 20,
166+
};
167+
168+
/* 6.25inch 720x1560
169+
* https://www.waveshare.com/6.25inch-dsi-lcd.htm
170+
*/
171+
static const struct drm_display_mode ws_panel_6_25_mode = {
172+
.clock = 83333,
173+
.hdisplay = 720,
174+
.hsync_start = 720 + 50,
175+
.hsync_end = 720 + 50 + 50,
176+
.htotal = 720 + 50 + 50 + 50,
177+
.vdisplay = 1560,
178+
.vsync_start = 1560 + 20,
179+
.vsync_end = 1560 + 20 + 20,
180+
.vtotal = 1560 + 20 + 20 + 20,
181+
};
182+
183+
/* 8.8inch 480x1920
184+
* https://www.waveshare.com/8.8inch-dsi-lcd.htm
185+
*/
186+
static const struct drm_display_mode ws_panel_8_8_mode = {
187+
.clock = 83333,
188+
.hdisplay = 480,
189+
.hsync_start = 480 + 50,
190+
.hsync_end = 480 + 50 + 50,
191+
.htotal = 480 + 50 + 50 + 50,
192+
.vdisplay = 1920,
193+
.vsync_start = 1920 + 20,
194+
.vsync_end = 1920 + 20 + 20,
195+
.vtotal = 1920 + 20 + 20 + 20,
196+
};
197+
153198
static struct ws_panel *panel_to_ts(struct drm_panel *panel)
154199
{
155200
return container_of(panel, struct ws_panel, base);
@@ -412,6 +457,16 @@ static const struct of_device_id ws_panel_of_ids[] = {
412457
}, {
413458
.compatible = "waveshare,4inch-panel",
414459
.data = &ws_panel_4_mode,
460+
}, {
461+
.compatible = "waveshare,5.0inch-panel",
462+
.data = &ws_panel_5_0_mode,
463+
}, {
464+
.compatible = "waveshare,6.25inch-panel",
465+
.data = &ws_panel_6_25_mode,
466+
}, {
467+
.compatible = "waveshare,8.8inch-panel",
468+
.data = &ws_panel_8_8_mode,
469+
}, {
415470
}, {
416471
/* sentinel */
417472
}

0 commit comments

Comments
 (0)