Skip to content

Commit bf6daaa

Browse files
lucaceresolisuperna9999
authored andcommitted
drm/panel: simple: Add Tianma TM070JDHG34-00 panel support
Add Tianma TM070JDHG34-00 7.0" 1280x800 LVDS RGB TFT LCD panel. Panel info and datasheet: https://fortec.us/products/tm070jdhg34-00/ Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0c8d3b4 commit bf6daaa

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

drivers/gpu/drm/panel/panel-simple.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4307,6 +4307,45 @@ static const struct panel_desc tianma_tm070jvhg33 = {
43074307
.bus_flags = DRM_BUS_FLAG_DE_HIGH,
43084308
};
43094309

4310+
/*
4311+
* The datasheet computes total blanking as back porch + front porch, not
4312+
* including sync pulse width. This is for both H and V. To make the total
4313+
* blanking and period correct, subtract the pulse width from the front
4314+
* porch.
4315+
*
4316+
* This works well for the Min and Typ values, but for Max values the sync
4317+
* pulse width is higher than back porch + front porch, so work around that
4318+
* by reducing the Max sync length value to 1 and then treating the Max
4319+
* porches as in the Min and Typ cases.
4320+
*
4321+
* Exact datasheet values are added as a comment where they differ from the
4322+
* ones implemented for the above reason.
4323+
*/
4324+
static const struct display_timing tianma_tm070jdhg34_00_timing = {
4325+
.pixelclock = { 68400000, 71900000, 78100000 },
4326+
.hactive = { 1280, 1280, 1280 },
4327+
.hfront_porch = { 130, 138, 158 }, /* 131, 139, 159 */
4328+
.hback_porch = { 5, 5, 5 },
4329+
.hsync_len = { 1, 1, 1 }, /* 1, 1, 256 */
4330+
.vactive = { 800, 800, 800 },
4331+
.vfront_porch = { 2, 39, 98 }, /* 3, 40, 99 */
4332+
.vback_porch = { 2, 2, 2 },
4333+
.vsync_len = { 1, 1, 1 }, /* 1, 1, 128 */
4334+
.flags = DISPLAY_FLAGS_DE_HIGH,
4335+
};
4336+
4337+
static const struct panel_desc tianma_tm070jdhg34_00 = {
4338+
.timings = &tianma_tm070jdhg34_00_timing,
4339+
.num_timings = 1,
4340+
.bpc = 8,
4341+
.size = {
4342+
.width = 150, /* 149.76 */
4343+
.height = 94, /* 93.60 */
4344+
},
4345+
.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
4346+
.connector_type = DRM_MODE_CONNECTOR_LVDS,
4347+
};
4348+
43104349
static const struct display_timing tianma_tm070rvhg71_timing = {
43114350
.pixelclock = { 27700000, 29200000, 39600000 },
43124351
.hactive = { 800, 800, 800 },
@@ -5052,6 +5091,9 @@ static const struct of_device_id platform_of_match[] = {
50525091
}, {
50535092
.compatible = "tianma,tm070jdhg30",
50545093
.data = &tianma_tm070jdhg30,
5094+
}, {
5095+
.compatible = "tianma,tm070jdhg34-00",
5096+
.data = &tianma_tm070jdhg34_00,
50555097
}, {
50565098
.compatible = "tianma,tm070jvhg33",
50575099
.data = &tianma_tm070jvhg33,

0 commit comments

Comments
 (0)