[v3,8/8] drm/panel: simple: Add Rockteck RK101II01D-CT panel

Message ID 1541579245-10715-9-git-send-email-jsarha@ti.com
State New
Headers show
Series
  • drm/tidss: new display driver for TI's DSS6 & DSS7
Related show

Commit Message

Jyri Sarha Nov. 7, 2018, 8:27 a.m.
Add support for Rockteck RK101II01D-CT, 10.1" 1280x800 TFT with LVDS
interface, LED backlight and integrated Goodix GT928 capacitive touch
panel.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 .../display/panel/rockteck,rk101ii01d-ct.txt       |  8 ++++++
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 drivers/gpu/drm/panel/panel-simple.c               | 31 ++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/rockteck,rk101ii01d-ct.txt

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/rockteck,rk101ii01d-ct.txt b/Documentation/devicetree/bindings/display/panel/rockteck,rk101ii01d-ct.txt
new file mode 100644
index 0000000..f7f0f59
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/rockteck,rk101ii01d-ct.txt
@@ -0,0 +1,8 @@ 
+Rockteck 10.1" TFT 1280x800 Pixels
+- with LVDS interface, LED Backlight and capacitive touch panel
+
+Required properties:
+- compatible: should be "rockteck,rk101ii01d-ct"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 2c3fc51..2975e88 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -321,6 +321,7 @@  ricoh	Ricoh Co. Ltd.
 rikomagic	Rikomagic Tech Corp. Ltd
 riscv	RISC-V Foundation
 rockchip	Fuzhou Rockchip Electronics Co., Ltd
+rocktech	Rocktech Displays Limited
 rohm	ROHM Semiconductor Co., Ltd
 roofull	Shenzhen Roofull Technology Co, Ltd
 samsung	Samsung Semiconductor
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 97964f7..9bac698 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1926,6 +1926,34 @@  static const struct panel_desc rocktech_rk070er9427 = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };
 
+static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = {
+	.clock = 71100,
+	.hdisplay = 1280,
+	.hsync_start = 1280 + 48,
+	.hsync_end = 1280 + 48 + 32,
+	.htotal = 1280 + 48 + 32 + 80,
+	.vdisplay = 800,
+	.vsync_start = 800 + 2,
+	.vsync_end = 800 + 2 + 5,
+	.vtotal = 800 + 2 + 5 + 16,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc rocktech_rk101ii01d_ct = {
+	.modes = &rocktech_rk101ii01d_ct_mode,
+	.num_modes = 1,
+	.size = {
+		.width = 217,
+		.height = 136,
+	},
+	.delay = {
+		.prepare = 50,
+		.disable = 50,
+	},
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+};
+
 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
 	.clock = 271560,
 	.hdisplay = 2560,
@@ -2511,6 +2539,9 @@  static const struct of_device_id platform_of_match[] = {
 		.compatible = "rocktech,rk070er9427",
 		.data = &rocktech_rk070er9427,
 	}, {
+		.compatible = "rockteck,rk101ii01d-ct",
+		.data = &rocktech_rk101ii01d_ct,
+	}, {
 		.compatible = "samsung,lsn122dl01-c01",
 		.data = &samsung_lsn122dl01_c01,
 	}, {