Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support
@ 2024-12-16 16:21 Luca Ceresoli
  2024-12-16 16:21 ` [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Luca Ceresoli @ 2024-12-16 16:21 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg
  Cc: Thomas Petazzoni, dri-devel, devicetree, linux-kernel,
	Luca Ceresoli

This small series adds DT bindings and panel-simple implementation for the
Tianma TM070JDHG34-00 7" panel. Due to how the datasheet computes the
blanking time, a quirk is needed in the timing implementation. A comment
documents that in patch 2.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Changes in v2:
- Fix bindings patch
- add Reviewed-by tag
- Link to v1: https://lore.kernel.org/r/20241210-tianma_tm070jdhg34-v1-0-9fb7fe6b6cf0@bootlin.com

---
Luca Ceresoli (2):
      dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel
      drm/panel: simple: Add Tianma TM070JDHG34-00 panel support

 .../bindings/display/panel/panel-simple.yaml       |  2 ++
 drivers/gpu/drm/panel/panel-simple.c               | 42 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)
---
base-commit: 2ade8304e5fce7b972ef46011946186f1466c9bf
change-id: 20241210-tianma_tm070jdhg34-60cb8440b164

Best regards,
-- 
Luca Ceresoli <luca.ceresoli@bootlin.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel
  2024-12-16 16:21 [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Luca Ceresoli
@ 2024-12-16 16:21 ` Luca Ceresoli
  2024-12-16 18:33   ` Conor Dooley
  2024-12-16 16:21 ` [PATCH v2 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support Luca Ceresoli
  2024-12-18 10:25 ` [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Neil Armstrong
  2 siblings, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2024-12-16 16:21 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg
  Cc: Thomas Petazzoni, dri-devel, devicetree, linux-kernel,
	Luca Ceresoli

Add the Tianma Micro-electronics TM070JDHG34-00 7.0" LVDS LCD TFT panel.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

---

Changes in v2:
 - fix inverted lines
---
 Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index 18b63f356bb4bbf6d2c8e58b13ebb14c5f4004ad..fc334a8aa6d914c1222a9767fec4ae5beb147031 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -280,6 +280,8 @@ properties:
       - team-source-display,tst043015cmhx
         # Tianma Micro-electronics TM070JDHG30 7.0" WXGA TFT LCD panel
       - tianma,tm070jdhg30
+        # Tianma Micro-electronics TM070JDHG34-00 7.0" WXGA (1280x800) LVDS TFT LCD panel
+      - tianma,tm070jdhg34-00
         # Tianma Micro-electronics TM070JVHG33 7.0" WXGA TFT LCD panel
       - tianma,tm070jvhg33
         # Tianma Micro-electronics TM070RVHG71 7.0" WXGA TFT LCD panel

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support
  2024-12-16 16:21 [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Luca Ceresoli
  2024-12-16 16:21 ` [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
@ 2024-12-16 16:21 ` Luca Ceresoli
  2024-12-18 10:25 ` [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Neil Armstrong
  2 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli @ 2024-12-16 16:21 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg
  Cc: Thomas Petazzoni, dri-devel, devicetree, linux-kernel,
	Luca Ceresoli

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 <neil.armstrong@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---

Changes in v2: none
---
 drivers/gpu/drm/panel/panel-simple.c | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 1562f122724137dec37eb11443eafc896ef2f2e8..b3c931a4e46a2568b3678d664f11b189873fa1e2 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -4286,6 +4286,45 @@ static const struct panel_desc tianma_tm070jvhg33 = {
 	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
 };
 
+/*
+ * The datasheet computes total blanking as back porch + front porch, not
+ * including sync pulse width. This is for both H and V. To make the total
+ * blanking and period correct, subtract the pulse width from the front
+ * porch.
+ *
+ * This works well for the Min and Typ values, but for Max values the sync
+ * pulse width is higher than back porch + front porch, so work around that
+ * by reducing the Max sync length value to 1 and then treating the Max
+ * porches as in the Min and Typ cases.
+ *
+ * Exact datasheet values are added as a comment where they differ from the
+ * ones implemented for the above reason.
+ */
+static const struct display_timing tianma_tm070jdhg34_00_timing = {
+	.pixelclock = { 68400000, 71900000, 78100000 },
+	.hactive = { 1280, 1280, 1280 },
+	.hfront_porch = { 130, 138, 158 }, /* 131, 139, 159 */
+	.hback_porch = { 5, 5, 5 },
+	.hsync_len = { 1, 1, 1 }, /* 1, 1, 256 */
+	.vactive = { 800, 800, 800 },
+	.vfront_porch = { 2, 39, 98 }, /* 3, 40, 99 */
+	.vback_porch = { 2, 2, 2 },
+	.vsync_len = { 1, 1, 1 }, /* 1, 1, 128 */
+	.flags = DISPLAY_FLAGS_DE_HIGH,
+};
+
+static const struct panel_desc tianma_tm070jdhg34_00 = {
+	.timings = &tianma_tm070jdhg34_00_timing,
+	.num_timings = 1,
+	.bpc = 8,
+	.size = {
+		.width = 150, /* 149.76 */
+		.height = 94, /* 93.60 */
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct display_timing tianma_tm070rvhg71_timing = {
 	.pixelclock = { 27700000, 29200000, 39600000 },
 	.hactive = { 800, 800, 800 },
@@ -5028,6 +5067,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "tianma,tm070jdhg30",
 		.data = &tianma_tm070jdhg30,
+	}, {
+		.compatible = "tianma,tm070jdhg34-00",
+		.data = &tianma_tm070jdhg34_00,
 	}, {
 		.compatible = "tianma,tm070jvhg33",
 		.data = &tianma_tm070jvhg33,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel
  2024-12-16 16:21 ` [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
@ 2024-12-16 18:33   ` Conor Dooley
  0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2024-12-16 18:33 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
	Thomas Petazzoni, dri-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

On Mon, Dec 16, 2024 at 05:21:34PM +0100, Luca Ceresoli wrote:
> Add the Tianma Micro-electronics TM070JDHG34-00 7.0" LVDS LCD TFT panel.
> 
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support
  2024-12-16 16:21 [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Luca Ceresoli
  2024-12-16 16:21 ` [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
  2024-12-16 16:21 ` [PATCH v2 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support Luca Ceresoli
@ 2024-12-18 10:25 ` Neil Armstrong
  2 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2024-12-18 10:25 UTC (permalink / raw)
  To: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
	Luca Ceresoli
  Cc: Thomas Petazzoni, dri-devel, devicetree, linux-kernel

Hi,

On Mon, 16 Dec 2024 17:21:33 +0100, Luca Ceresoli wrote:
> This small series adds DT bindings and panel-simple implementation for the
> Tianma TM070JDHG34-00 7" panel. Due to how the datasheet computes the
> blanking time, a quirk is needed in the timing implementation. A comment
> documents that in patch 2.
> 
> 

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/0c8d3b4a0342c5feb6887d18efd1273d80530674
[2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/bf6daaa281f7d11fcd91a68935142916afc51c53

-- 
Neil


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-18 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 16:21 [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Luca Ceresoli
2024-12-16 16:21 ` [PATCH v2 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
2024-12-16 18:33   ` Conor Dooley
2024-12-16 16:21 ` [PATCH v2 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support Luca Ceresoli
2024-12-18 10:25 ` [PATCH v2 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox