linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T
@ 2025-07-17 13:57 Svyatoslav Ryhel
  2025-07-17 13:57 ` [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel Svyatoslav Ryhel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Svyatoslav Ryhel @ 2025-07-17 13:57 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, David Airlie, Simona Vetter,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Svyatoslav Ryhel
  Cc: dri-devel, devicetree, linux-kernel

Add support for Hydis HV101HD1 MIPI DSI panel used in ASUS VivoTab RT TF600T.

Svyatoslav Ryhel (2):
  dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
  drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel

 .../display/panel/hydis,hv101hd1.yaml         |  60 ++++++
 drivers/gpu/drm/panel/Kconfig                 |  13 ++
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c  | 188 ++++++++++++++++++
 4 files changed, 262 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c

-- 
2.48.1


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

* [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
  2025-07-17 13:57 [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Svyatoslav Ryhel
@ 2025-07-17 13:57 ` Svyatoslav Ryhel
  2025-07-20 23:32   ` Rob Herring (Arm)
  2025-07-17 13:57 ` [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI " Svyatoslav Ryhel
  2025-08-04 15:33 ` [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Neil Armstrong
  2 siblings, 1 reply; 6+ messages in thread
From: Svyatoslav Ryhel @ 2025-07-17 13:57 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, David Airlie, Simona Vetter,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Svyatoslav Ryhel
  Cc: dri-devel, devicetree, linux-kernel

Hydis HV101HD1 is a 2-lane 1366x768 MIPI DSI panel found in ASUS VivoTab RT
TF600T tablet.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../display/panel/hydis,hv101hd1.yaml         | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml b/Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml
new file mode 100644
index 000000000000..f429e84ee65d
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/hydis,hv101hd1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hydis HV101HD1 DSI Display Panel
+
+maintainers:
+  - Svyatoslav Ryhel <clamor95@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: hydis,hv101hd1
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+  vio-supply: true
+
+  backlight: true
+  port: true
+
+required:
+  - compatible
+  - vdd-supply
+  - vio-supply
+  - backlight
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "hydis,hv101hd1";
+            reg = <0>;
+
+            vdd-supply = <&vdd_lcd>;
+            vio-supply = <&vddio_lcd>;
+
+            backlight = <&backlight>;
+
+            port {
+                panel_in: endpoint {
+                    remote-endpoint = <&dsi_out>;
+                };
+            };
+        };
+    };
+...
-- 
2.48.1


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

* [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel
  2025-07-17 13:57 [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Svyatoslav Ryhel
  2025-07-17 13:57 ` [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel Svyatoslav Ryhel
@ 2025-07-17 13:57 ` Svyatoslav Ryhel
  2025-07-30 15:01   ` David Heidelberg
  2025-08-04 15:33 ` [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Neil Armstrong
  2 siblings, 1 reply; 6+ messages in thread
From: Svyatoslav Ryhel @ 2025-07-17 13:57 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, David Airlie, Simona Vetter,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Svyatoslav Ryhel
  Cc: dri-devel, devicetree, linux-kernel

HV101HD1-1E1 is a color active matrix TFT LCD module using amorphous
silicon TFT's (Thin Film Transistors) as an active switching devices. This
module has a 10.1 inch diagonally measured active area with HD resolutions
(1366 horizontal by 768 vertical pixel array).

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/Kconfig                |  13 ++
 drivers/gpu/drm/panel/Makefile               |   1 +
 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c | 188 +++++++++++++++++++
 3 files changed, 202 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index e059b06e0239..eb547da38d56 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -185,6 +185,19 @@ config DRM_PANEL_HIMAX_HX8394
 
 	  If M is selected the module will be called panel-himax-hx8394.
 
+config DRM_PANEL_HYDIS_HV101HD1
+	tristate "Hydis HV101HD1 panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y here if you want to enable support for the Hydis HV101HD1
+	  2-lane 1366x768 MIPI DSI panel found in ASUS VivoTab RT TF600T.
+	  HV101HD1 is a color active matrix TFT LCD module using amorphous
+	  silicon TFT's (Thin Film Transistors) as an active switching devices.
+
+	  If M is selected the module will be called panel-hydis-hv101hd1
+
 config DRM_PANEL_ILITEK_IL9322
 	tristate "Ilitek ILI9322 320x240 QVGA panels"
 	depends on OF && SPI
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index 1bb8ae46b59b..dd910c712996 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d
 obj-$(CONFIG_DRM_PANEL_HIMAX_HX83102) += panel-himax-hx83102.o
 obj-$(CONFIG_DRM_PANEL_HIMAX_HX83112A) += panel-himax-hx83112a.o
 obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o
+obj-$(CONFIG_DRM_PANEL_HYDIS_HV101HD1) += panel-hydis-hv101hd1.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9805) += panel-ilitek-ili9805.o
diff --git a/drivers/gpu/drm/panel/panel-hydis-hv101hd1.c b/drivers/gpu/drm/panel/panel-hydis-hv101hd1.c
new file mode 100644
index 000000000000..46426c388932
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-hydis-hv101hd1.c
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/array_size.h>
+#include <linux/delay.h>
+#include <linux/err.h>
+#include <linux/gpio/consumer.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/property.h>
+#include <linux/regulator/consumer.h>
+
+#include <video/mipi_display.h>
+
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+
+struct hv101hd1 {
+	struct drm_panel panel;
+	struct mipi_dsi_device *dsi;
+	struct regulator_bulk_data *supplies;
+};
+
+static const struct regulator_bulk_data hv101hd1_supplies[] = {
+	{ .supply = "vdd" },
+	{ .supply = "vio" },
+};
+
+static inline struct hv101hd1 *to_hv101hd1(struct drm_panel *panel)
+{
+	return container_of(panel, struct hv101hd1, panel);
+}
+
+static int hv101hd1_prepare(struct drm_panel *panel)
+{
+	struct hv101hd1 *hv = to_hv101hd1(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = hv->dsi };
+	struct device *dev = &hv->dsi->dev;
+	int ret;
+
+	ret = regulator_bulk_enable(ARRAY_SIZE(hv101hd1_supplies), hv->supplies);
+	if (ret) {
+		dev_err(dev, "error enabling regulators (%d)\n", ret);
+		return ret;
+	}
+
+	mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
+
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
+
+	return 0;
+}
+
+static int hv101hd1_disable(struct drm_panel *panel)
+{
+	struct hv101hd1 *hv = to_hv101hd1(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = hv->dsi };
+
+	mipi_dsi_dcs_set_display_off_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 120);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
+
+	return 0;
+}
+
+static int hv101hd1_unprepare(struct drm_panel *panel)
+{
+	struct hv101hd1 *hv = to_hv101hd1(panel);
+
+	return regulator_bulk_disable(ARRAY_SIZE(hv101hd1_supplies),
+				      hv->supplies);
+}
+
+static const struct drm_display_mode hv101hd1_mode = {
+	.clock = (1366 + 74 + 36 + 24) * (768 + 21 + 7 + 4) * 60 / 1000,
+	.hdisplay = 1366,
+	.hsync_start = 1366 + 74,
+	.hsync_end = 1366 + 74 + 36,
+	.htotal = 1366 + 74 + 36 + 24,
+	.vdisplay = 768,
+	.vsync_start = 768 + 21,
+	.vsync_end = 768 + 21 + 7,
+	.vtotal = 768 + 21 + 7 + 4,
+	.width_mm = 140,
+	.height_mm = 220,
+};
+
+static int hv101hd1_get_modes(struct drm_panel *panel, struct drm_connector *connector)
+{
+	struct drm_display_mode *mode;
+
+	mode = drm_mode_duplicate(connector->dev, &hv101hd1_mode);
+	if (!mode)
+		return -ENOMEM;
+
+	drm_mode_set_name(mode);
+
+	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+
+	connector->display_info.width_mm = mode->width_mm;
+	connector->display_info.height_mm = mode->height_mm;
+
+	drm_mode_probed_add(connector, mode);
+
+	return 1;
+}
+
+static const struct drm_panel_funcs hv101hd1_panel_funcs = {
+	.prepare = hv101hd1_prepare,
+	.disable = hv101hd1_disable,
+	.unprepare = hv101hd1_unprepare,
+	.get_modes = hv101hd1_get_modes,
+};
+
+static int hv101hd1_probe(struct mipi_dsi_device *dsi)
+{
+	struct device *dev = &dsi->dev;
+	struct hv101hd1 *hv;
+	int ret;
+
+	hv = devm_drm_panel_alloc(dev, struct hv101hd1, panel,
+				  &hv101hd1_panel_funcs,
+				  DRM_MODE_CONNECTOR_DSI);
+	if (IS_ERR(hv))
+		return PTR_ERR(hv);
+
+	ret = devm_regulator_bulk_get_const(dev, ARRAY_SIZE(hv101hd1_supplies),
+					    hv101hd1_supplies, &hv->supplies);
+	if (ret)
+		return dev_err_probe(dev, ret, "failed to get regulators\n");
+
+	hv->dsi = dsi;
+	mipi_dsi_set_drvdata(dsi, hv);
+
+	dsi->lanes = 2;
+	dsi->format = MIPI_DSI_FMT_RGB888;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM;
+
+	ret = drm_panel_of_backlight(&hv->panel);
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to get backlight\n");
+
+	drm_panel_add(&hv->panel);
+
+	ret = mipi_dsi_attach(dsi);
+	if (ret) {
+		drm_panel_remove(&hv->panel);
+		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
+	}
+
+	return 0;
+}
+
+static void hv101hd1_remove(struct mipi_dsi_device *dsi)
+{
+	struct hv101hd1 *hv = mipi_dsi_get_drvdata(dsi);
+	int ret;
+
+	ret = mipi_dsi_detach(dsi);
+	if (ret < 0)
+		dev_err(&dsi->dev,
+			"Failed to detach from DSI host: %d\n", ret);
+
+	drm_panel_remove(&hv->panel);
+}
+
+static const struct of_device_id hv101hd1_of_match[] = {
+	{ .compatible = "hydis,hv101hd1" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, hv101hd1_of_match);
+
+static struct mipi_dsi_driver hv101hd1_driver = {
+	.driver = {
+		.name = "panel-hv101hd1",
+		.of_match_table = hv101hd1_of_match,
+	},
+	.probe = hv101hd1_probe,
+	.remove = hv101hd1_remove,
+};
+module_mipi_dsi_driver(hv101hd1_driver);
+
+MODULE_AUTHOR("Svyatoslav Ryhel <clamor95@gmail.com>");
+MODULE_DESCRIPTION("DRM driver for Hydis HV101HD1 panel");
+MODULE_LICENSE("GPL");
-- 
2.48.1


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

* Re: [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
  2025-07-17 13:57 ` [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel Svyatoslav Ryhel
@ 2025-07-20 23:32   ` Rob Herring (Arm)
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2025-07-20 23:32 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Jessica Zhang, Simona Vetter, Conor Dooley, linux-kernel,
	devicetree, Maarten Lankhorst, Krzysztof Kozlowski, David Airlie,
	Thomas Zimmermann, Maxime Ripard, dri-devel, Neil Armstrong


On Thu, 17 Jul 2025 16:57:51 +0300, Svyatoslav Ryhel wrote:
> Hydis HV101HD1 is a 2-lane 1366x768 MIPI DSI panel found in ASUS VivoTab RT
> TF600T tablet.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../display/panel/hydis,hv101hd1.yaml         | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel
  2025-07-17 13:57 ` [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI " Svyatoslav Ryhel
@ 2025-07-30 15:01   ` David Heidelberg
  0 siblings, 0 replies; 6+ messages in thread
From: David Heidelberg @ 2025-07-30 15:01 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: dri-devel, devicetree, linux-kernel

On 17/07/2025 15:57, Svyatoslav Ryhel wrote:
> HV101HD1-1E1 is a color active matrix TFT LCD module using amorphous
> silicon TFT's (Thin Film Transistors) as an active switching devices. This
> module has a 10.1 inch diagonally measured active area with HD resolutions
> (1366 horizontal by 768 vertical pixel array).
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/Kconfig                |  13 ++
>   drivers/gpu/drm/panel/Makefile               |   1 +
>   drivers/gpu/drm/panel/panel-hydis-hv101hd1.c | 188 +++++++++++++++++++
>   3 files changed, 202 insertions(+)
>   create mode 100644 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c
> 
<snip>

Reviewed-by: David Heidelberg <david@ixit.cz>

Thank you!

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

* Re: [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T
  2025-07-17 13:57 [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Svyatoslav Ryhel
  2025-07-17 13:57 ` [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel Svyatoslav Ryhel
  2025-07-17 13:57 ` [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI " Svyatoslav Ryhel
@ 2025-08-04 15:33 ` Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2025-08-04 15:33 UTC (permalink / raw)
  To: Jessica Zhang, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Svyatoslav Ryhel
  Cc: dri-devel, devicetree, linux-kernel

Hi,

On Thu, 17 Jul 2025 16:57:50 +0300, Svyatoslav Ryhel wrote:
> Add support for Hydis HV101HD1 MIPI DSI panel used in ASUS VivoTab RT TF600T.
> 
> Svyatoslav Ryhel (2):
>   dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
>   drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel
> 
> .../display/panel/hydis,hv101hd1.yaml         |  60 ++++++
>  drivers/gpu/drm/panel/Kconfig                 |  13 ++
>  drivers/gpu/drm/panel/Makefile                |   1 +
>  drivers/gpu/drm/panel/panel-hydis-hv101hd1.c  | 188 ++++++++++++++++++
>  4 files changed, 262 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/hydis,hv101hd1.yaml
>  create mode 100644 drivers/gpu/drm/panel/panel-hydis-hv101hd1.c
> 
> [...]

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

[1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/bd068333ef090d63a7cf952d70040e768b0aa4cf
[2/2] drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/fdb4e289d2d6fd172591d802db71cef3134c1cf8

-- 
Neil


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

end of thread, other threads:[~2025-08-04 15:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 13:57 [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Svyatoslav Ryhel
2025-07-17 13:57 ` [PATCH v1 1/2] dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel Svyatoslav Ryhel
2025-07-20 23:32   ` Rob Herring (Arm)
2025-07-17 13:57 ` [PATCH v1 2/2] drm: panel: Add support for Hydis HV101HD1 MIPI " Svyatoslav Ryhel
2025-07-30 15:01   ` David Heidelberg
2025-08-04 15:33 ` [PATCH v1 0/2] drm: panel: add support for panel used in ASUS VivoTab RT TF600T Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).