dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/8] Add support for panels found in various Tegra devices
@ 2025-09-29 14:24 Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel Svyatoslav Ryhel
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Add support for panels found in various Tegra30 and Tegra114 devices,
including panels in Tegra Note 7, Surface RT, Surface 2 and Ideapad
Yoga 11 T30.

Anton Bambura (1):
  gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver

Svyatoslav Ryhel (7):
  dt-bindings: display: panel: properly document LG LD070WX3 panel
  gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  ARM: tn7: adjust panel node
  dt-bindings: display: panel: document Samsung LTL106AL01 simple panel
  gpu/drm: panel: simple-panel: add Samsung LTL106AL01 LVDS panel
    support
  dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI
    panel
  gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry

 .../bindings/display/panel/lg,ld070wx3.yaml   |  60 ++++++
 .../display/panel/panel-simple-dsi.yaml       |   4 +-
 .../bindings/display/panel/panel-simple.yaml  |   2 +
 arch/arm/boot/dts/nvidia/tegra114-tn7.dts     |  13 +-
 drivers/gpu/drm/panel/Kconfig                 |  26 +++
 drivers/gpu/drm/panel/Makefile                |   2 +
 drivers/gpu/drm/panel/panel-edp.c             |   1 +
 drivers/gpu/drm/panel/panel-lg-ld070wx3.c     | 182 ++++++++++++++++++
 .../gpu/drm/panel/panel-samsung-ltl106hl02.c  | 179 +++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c          |  65 ++++---
 10 files changed, 495 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-lg-ld070wx3.c
 create mode 100644 drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c

-- 
2.48.1


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

* [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-30  3:07   ` Doug Anderson
  2025-09-29 14:24 ` [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel Svyatoslav Ryhel
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
clearly is not. Address this by adding the proper schema for this panel.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
 .../display/panel/panel-simple-dsi.yaml       |  2 -
 2 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
new file mode 100644
index 000000000000..0a82cf311452
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LG Corporation 7" WXGA TFT LCD panel
+
+maintainers:
+  - Svyatoslav Ryhel <clamor95@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    items:
+      - const: lg,ld070wx3-sl01
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+  vcc-supply: true
+
+  backlight: true
+  port: true
+
+required:
+  - compatible
+  - vdd-supply
+  - vcc-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "lg,ld070wx3-sl01";
+            reg = <0>;
+
+            vdd-supply = <&vdd_3v3_lcd>;
+            vcc-supply = <&vcc_1v8_lcd>;
+
+            backlight = <&backlight>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&dsi0_out>;
+                };
+            };
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
index 9b92a05791cc..f9f1e76a810c 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
@@ -42,8 +42,6 @@ properties:
       - kingdisplay,kd097d04
         # LG ACX467AKM-7 4.95" 1080×1920 LCD Panel
       - lg,acx467akm-7
-        # LG Corporation 7" WXGA TFT LCD panel
-      - lg,ld070wx3-sl01
         # LG Corporation 5" HD TFT LCD panel
       - lg,lh500wx1-sd03
         # Lincoln LCD197 5" 1080x1920 LCD panel
-- 
2.48.1


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

* [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-30  3:14   ` Doug Anderson
  2025-09-29 14:24 ` [PATCH v1 3/8] ARM: tn7: adjust panel node Svyatoslav Ryhel
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

The LD070WX3 is a Color Active Matrix Liquid Crystal Display with an
integral Light Emitting Diode (LED) backlight system. The matrix employs
a-Si Thin Film Transistor as the active element. It is a transmissive type
display operating in the normally Black mode. This TFT-LCD has 7.0 inches
diagonally measured active display area with WXGA resolution (800 by 1280
pixel array).

LG LD070WX3-SL01 MIPI DSI panel was treated as simple DSI panel when it is
actually not and requires proper setup for correct work. Simple panel work
relied on preliminary configuration done by bootloader.

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-lg-ld070wx3.c | 182 ++++++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c      |  31 ----
 4 files changed, 196 insertions(+), 31 deletions(-)
 create mode 100644 drivers/gpu/drm/panel/panel-lg-ld070wx3.c

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index aad4e0da8f75..ca5c5e60cfa1 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -398,6 +398,19 @@ config DRM_PANEL_LG_LB035Q02
 	  (found on the Gumstix Overo Palo35 board). To compile this driver as
 	  a module, choose M here.
 
+config DRM_PANEL_LG_LD070WX3
+	tristate "LG LD070WX3 MIPI DSI panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	select VIDEOMODE_HELPERS
+	help
+	  Say Y here if you want to enable support for the LD070WX3 MIPI DSI
+	  panel found in the NVIDIA Tegra Note 7 tablet.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called panel-lg-ld070wx3.
+
 config DRM_PANEL_LG_LG4573
 	tristate "LG4573 RGB/SPI panel"
 	depends on OF && SPI
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index a6a100e4c4e6..a673a74cd371 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -40,6 +40,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o
 obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o
 obj-$(CONFIG_DRM_PANEL_LINCOLNTECH_LCD197) += panel-lincolntech-lcd197.o
 obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o
+obj-$(CONFIG_DRM_PANEL_LG_LD070WX3) += panel-lg-ld070wx3.o
 obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
 obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o
 obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o
diff --git a/drivers/gpu/drm/panel/panel-lg-ld070wx3.c b/drivers/gpu/drm/panel/panel-lg-ld070wx3.c
new file mode 100644
index 000000000000..da46a317a749
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-lg-ld070wx3.c
@@ -0,0 +1,182 @@
+// 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>
+#include <drm/drm_probe_helper.h>
+
+struct lg_ld070wx3 {
+	struct drm_panel panel;
+	struct mipi_dsi_device *dsi;
+
+	struct regulator_bulk_data supplies[2];
+};
+
+static inline struct lg_ld070wx3 *to_lg_ld070wx3(struct drm_panel *panel)
+{
+	return container_of(panel, struct lg_ld070wx3, panel);
+}
+
+static int lg_ld070wx3_prepare(struct drm_panel *panel)
+{
+	struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
+	struct device *dev = panel->dev;
+	int ret;
+
+	ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable power supplies: %d\n", ret);
+		return ret;
+	}
+
+	/*
+	 * According to spec delay between enabling supply is 0,
+	 * for regulators to reach required voltage ~5ms needed.
+	 * MIPI interface signal for setup requires additional
+	 * 110ms which in total results in 115ms.
+	 */
+	mdelay(115);
+
+	mipi_dsi_dcs_soft_reset_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
+
+	/* Differential input impedance selection */
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xae, 0x0b);
+
+	/* Enter test mode 1 and 2*/
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0xea);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x5f);
+
+	/* Increased MIPI CLK driving ability */
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x68);
+
+	/* Exit test mode 1 and 2 */
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0x00);
+	mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x00);
+
+	return 0;
+}
+
+static int lg_ld070wx3_unprepare(struct drm_panel *panel)
+{
+	struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
+
+	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+
+	msleep(50);
+
+	regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
+
+	/* power supply must be off for at least 1s after panel disable */
+	msleep(1000);
+
+	return 0;
+}
+
+static const struct drm_display_mode lg_ld070wx3_mode = {
+	.clock = (800 + 32 + 48 + 8) * (1280 + 5 + 3 + 1) * 60 / 1000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 32,
+	.hsync_end = 800 + 32 + 48,
+	.htotal = 800 + 32 + 48 + 8,
+	.vdisplay = 1280,
+	.vsync_start = 1280 + 5,
+	.vsync_end = 1280 + 5 + 3,
+	.vtotal = 1280 + 5 + 3 + 1,
+	.width_mm = 94,
+	.height_mm = 151,
+	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static int lg_ld070wx3_get_modes(struct drm_panel *panel,
+				 struct drm_connector *connector)
+{
+	return drm_connector_helper_get_modes_fixed(connector, &lg_ld070wx3_mode);
+}
+
+static const struct drm_panel_funcs lg_ld070wx3_panel_funcs = {
+	.prepare = lg_ld070wx3_prepare,
+	.unprepare = lg_ld070wx3_unprepare,
+	.get_modes = lg_ld070wx3_get_modes,
+};
+
+static int lg_ld070wx3_probe(struct mipi_dsi_device *dsi)
+{
+	struct device *dev = &dsi->dev;
+	struct lg_ld070wx3 *priv;
+	int ret;
+
+	priv = devm_drm_panel_alloc(dev, struct lg_ld070wx3, panel,
+				    &lg_ld070wx3_panel_funcs,
+				    DRM_MODE_CONNECTOR_DSI);
+	if (IS_ERR(priv))
+		return PTR_ERR(priv);
+
+	priv->supplies[0].supply = "vcc";
+	priv->supplies[1].supply = "vdd";
+
+	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), priv->supplies);
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "failed to get regulators\n");
+
+	priv->dsi = dsi;
+	mipi_dsi_set_drvdata(dsi, priv);
+
+	dsi->lanes = 4;
+	dsi->format = MIPI_DSI_FMT_RGB888;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM;
+
+	ret = drm_panel_of_backlight(&priv->panel);
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "failed to get backlight\n");
+
+	drm_panel_add(&priv->panel);
+
+	ret = devm_mipi_dsi_attach(dev, dsi);
+	if (ret < 0) {
+		drm_panel_remove(&priv->panel);
+		return dev_err_probe(dev, ret, "failed to attach to DSI host\n");
+	}
+
+	return 0;
+}
+
+static void lg_ld070wx3_remove(struct mipi_dsi_device *dsi)
+{
+	struct lg_ld070wx3 *priv = mipi_dsi_get_drvdata(dsi);
+
+	drm_panel_remove(&priv->panel);
+}
+
+static const struct of_device_id lg_ld070wx3_of_match[] = {
+	{ .compatible = "lg,ld070wx3-sl01" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, lg_ld070wx3_of_match);
+
+static struct mipi_dsi_driver lg_ld070wx3_driver = {
+	.driver = {
+		.name = "panel-lg-ld070wx3",
+		.of_match_table = lg_ld070wx3_of_match,
+	},
+	.probe = lg_ld070wx3_probe,
+	.remove = lg_ld070wx3_remove,
+};
+module_mipi_dsi_driver(lg_ld070wx3_driver);
+
+MODULE_AUTHOR("Svyatoslav Ryhel <clamor95@gmail.com>");
+MODULE_DESCRIPTION("LG LD070WX3-SL01 DSI panel driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9f81fa960b46..ea2cdddb9b8f 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -5512,34 +5512,6 @@ static const struct panel_desc_dsi boe_tv080wum_nl0 = {
 	.lanes = 4,
 };
 
-static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
-	.clock = 71000,
-	.hdisplay = 800,
-	.hsync_start = 800 + 32,
-	.hsync_end = 800 + 32 + 1,
-	.htotal = 800 + 32 + 1 + 57,
-	.vdisplay = 1280,
-	.vsync_start = 1280 + 28,
-	.vsync_end = 1280 + 28 + 1,
-	.vtotal = 1280 + 28 + 1 + 14,
-};
-
-static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
-	.desc = {
-		.modes = &lg_ld070wx3_sl01_mode,
-		.num_modes = 1,
-		.bpc = 8,
-		.size = {
-			.width = 94,
-			.height = 151,
-		},
-		.connector_type = DRM_MODE_CONNECTOR_DSI,
-	},
-	.flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
-	.format = MIPI_DSI_FMT_RGB888,
-	.lanes = 4,
-};
-
 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
 	.clock = 67000,
 	.hdisplay = 720,
@@ -5663,9 +5635,6 @@ static const struct of_device_id dsi_of_match[] = {
 	}, {
 		.compatible = "boe,tv080wum-nl0",
 		.data = &boe_tv080wum_nl0
-	}, {
-		.compatible = "lg,ld070wx3-sl01",
-		.data = &lg_ld070wx3_sl01
 	}, {
 		.compatible = "lg,lh500wx1-sd03",
 		.data = &lg_lh500wx1_sd03
-- 
2.48.1


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

* [PATCH v1 3/8] ARM: tn7: adjust panel node
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel Svyatoslav Ryhel
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Adjust panel node in Tegra Note 7 according to the updated schema.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 arch/arm/boot/dts/nvidia/tegra114-tn7.dts | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/nvidia/tegra114-tn7.dts b/arch/arm/boot/dts/nvidia/tegra114-tn7.dts
index bfbdb345575a..75fbafb4a872 100644
--- a/arch/arm/boot/dts/nvidia/tegra114-tn7.dts
+++ b/arch/arm/boot/dts/nvidia/tegra114-tn7.dts
@@ -43,7 +43,9 @@ panel@0 {
 				compatible = "lg,ld070wx3-sl01";
 				reg = <0>;
 
-				power-supply = <&vdd_lcd>;
+				vdd-supply = <&avdd_lcd>;
+				vcc-supply = <&dvdd_lcd>;
+
 				backlight = <&backlight>;
 			};
 		};
@@ -101,11 +103,10 @@ smps45 {
 						regulator-boot-on;
 					};
 
-					smps6 {
+					avdd_lcd: smps6 {
 						regulator-name = "va-lcd-hv";
-						regulator-min-microvolt = <3000000>;
-						regulator-max-microvolt = <3000000>;
-						regulator-always-on;
+						regulator-min-microvolt = <3160000>;
+						regulator-max-microvolt = <3160000>;
 						regulator-boot-on;
 					};
 
@@ -325,7 +326,7 @@ lcd_bl_en: regulator-lcden {
 		regulator-boot-on;
 	};
 
-	vdd_lcd: regulator-lcd {
+	dvdd_lcd: regulator-lcd {
 		compatible = "regulator-fixed";
 		regulator-name = "VD_LCD_1V8";
 		regulator-min-microvolt = <1800000>;
-- 
2.48.1


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

* [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
                   ` (2 preceding siblings ...)
  2025-09-29 14:24 ` [PATCH v1 3/8] ARM: tn7: adjust panel node Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-10-06 22:14   ` Rob Herring (Arm)
  2025-09-29 14:24 ` [PATCH v1 5/8] gpu/drm: panel: simple-panel: add Samsung LTL106AL01 LVDS panel support Svyatoslav Ryhel
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Document Samsung LTL106AL01 simple LVDS panel.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../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 5542c9229d54..93ddb3823d3d 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -268,6 +268,8 @@ properties:
       - rocktech,rk043fn48h
         # Samsung Electronics 10.1" WXGA (1280x800) TFT LCD panel
       - samsung,ltl101al01
+        # Samsung Electronics 10.6" FWXGA (1366x768) TFT LCD panel
+      - samsung,ltl106al01
         # Samsung Electronics 10.1" WSVGA TFT LCD panel
       - samsung,ltn101nt05
         # Satoz SAT050AT40H12R2 5.0" WVGA TFT LCD panel
-- 
2.48.1


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

* [PATCH v1 5/8] gpu/drm: panel: simple-panel: add Samsung LTL106AL01 LVDS panel support
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
                   ` (3 preceding siblings ...)
  2025-09-29 14:24 ` [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel Svyatoslav Ryhel
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Samsung LTL106AL01 is a 10.6" FWXGA (1366x768) simple LVDS panel found in
Microsoft Surface RT tablet.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index ea2cdddb9b8f..6626393d7565 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -4144,6 +4144,37 @@ static const struct panel_desc samsung_ltl101al01 = {
 	.connector_type = DRM_MODE_CONNECTOR_LVDS,
 };
 
+static const struct display_timing samsung_ltl106al01_timing = {
+	.pixelclock = { 71980000, 71980000, 71980000 },
+	.hactive = { 1366, 1366, 1366 },
+	.hfront_porch = { 56, 56, 56 },
+	.hback_porch = { 106, 106, 106 },
+	.hsync_len = { 14, 14, 14 },
+	.vactive = { 768, 768, 768 },
+	.vfront_porch = { 3, 3, 3 },
+	.vback_porch = { 6, 6, 6 },
+	.vsync_len = { 1, 1, 1 },
+	.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
+};
+
+static const struct panel_desc samsung_ltl106al01 = {
+	.timings = &samsung_ltl106al01_timing,
+	.num_timings = 1,
+	.bpc = 8,
+	.size = {
+		.width = 235,
+		.height = 132,
+	},
+	.delay = {
+		.prepare = 5,
+		.enable = 10,
+		.disable = 10,
+		.unprepare = 5,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct drm_display_mode samsung_ltn101nt05_mode = {
 	.clock = 54030,
 	.hdisplay = 1024,
@@ -5302,6 +5333,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "samsung,ltl101al01",
 		.data = &samsung_ltl101al01,
+	}, {
+		.compatible = "samsung,ltl106al01",
+		.data = &samsung_ltl106al01,
 	}, {
 		.compatible = "samsung,ltn101nt05",
 		.data = &samsung_ltn101nt05,
-- 
2.48.1


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

* [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
                   ` (4 preceding siblings ...)
  2025-09-29 14:24 ` [PATCH v1 5/8] gpu/drm: panel: simple-panel: add Samsung LTL106AL01 LVDS panel support Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-10-06 22:14   ` Rob Herring (Arm)
  2025-09-29 14:24 ` [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver Svyatoslav Ryhel
  2025-09-29 14:24 ` [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry Svyatoslav Ryhel
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Samsung LTL106HL02 is a simple DSI which requires only a power supply and
an optional reset gpio.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../devicetree/bindings/display/panel/panel-simple-dsi.yaml     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
index f9f1e76a810c..01ac0af0e299 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
@@ -52,6 +52,8 @@ properties:
       - panasonic,vvx10f004b00
         # Panasonic 10" WUXGA TFT LCD panel
       - panasonic,vvx10f034n00
+        # Samsung ltl106hl02 10.6" Full HD TFT LCD panel
+      - samsung,ltl106hl02-001
         # Samsung s6e3fa7 1080x2220 based AMS559NK06 AMOLED panel
       - samsung,s6e3fa7-ams559nk06
         # Samsung s6e3fc2x01 1080x2340 AMOLED panel
-- 
2.48.1


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

* [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
                   ` (5 preceding siblings ...)
  2025-09-29 14:24 ` [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-30 19:35   ` Dmitry Baryshkov
  2025-09-29 14:24 ` [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry Svyatoslav Ryhel
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

From: Anton Bambura <jenneron@protonmail.com>

LTL106HL02 is a color active matrix TFT (Thin Film Transistor) liquid
crystal display (LCD) that uses amorphous silicon TFT as switching
devices. This model is composed of a TFT LCD panel, a driver circuit and a
backlight unit. The resolution of a 10.6" contains 1920 x 1080 pixels and
can display up to 16,8M color with wide viewing angle.

Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/Kconfig                 |  13 ++
 drivers/gpu/drm/panel/Makefile                |   1 +
 .../gpu/drm/panel/panel-samsung-ltl106hl02.c  | 179 ++++++++++++++++++
 3 files changed, 193 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index ca5c5e60cfa1..55e4d5135562 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -745,6 +745,19 @@ config DRM_PANEL_SAMSUNG_LD9040
 	depends on BACKLIGHT_CLASS_DEVICE
 	select VIDEOMODE_HELPERS
 
+config DRM_PANEL_SAMSUNG_LTL106HL02
+	tristate "Samsung LTL106HL02 panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	select VIDEOMODE_HELPERS
+	help
+	  Say Y here if you want to enable support for the Samsung LTL106HL02
+	  panel driver which is used in Microsoft Surface 2.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called panel-samsung-ltl106hl02.
+
 config DRM_PANEL_SAMSUNG_S6E3FA7
 	tristate "Samsung S6E3FA7 panel driver"
 	depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index a673a74cd371..48a10fbdca89 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -73,6 +73,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08) += panel-samsung-ams639rq08.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o
+obj-$(CONFIG_DRM_PANEL_SAMSUNG_LTL106HL02) += panel-samsung-ltl106hl02.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o
 obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o
diff --git a/drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c b/drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c
new file mode 100644
index 000000000000..362b2323b771
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c
@@ -0,0 +1,179 @@
+// 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>
+#include <drm/drm_probe_helper.h>
+
+struct samsung_ltl106hl02 {
+	struct drm_panel panel;
+	struct mipi_dsi_device *dsi;
+
+	struct regulator *supply;
+	struct gpio_desc *reset_gpio;
+};
+
+static inline struct samsung_ltl106hl02 *to_samsung_ltl106hl02(struct drm_panel *panel)
+{
+	return container_of(panel, struct samsung_ltl106hl02, panel);
+}
+
+static void samsung_ltl106hl02_reset(struct samsung_ltl106hl02 *ctx)
+{
+	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+	usleep_range(10000, 11000);
+	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+	usleep_range(2000, 3000);
+}
+
+static int samsung_ltl106hl02_prepare(struct drm_panel *panel)
+{
+	struct samsung_ltl106hl02 *ctx = to_samsung_ltl106hl02(panel);
+	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+	struct device *dev = &ctx->dsi->dev;
+	int ret;
+
+	ret = regulator_enable(ctx->supply);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable power supply %d\n", ret);
+		return ret;
+	}
+
+	if (ctx->reset_gpio)
+		samsung_ltl106hl02_reset(ctx);
+
+	mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+	mipi_dsi_msleep(&dsi_ctx, 70);
+
+	mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
+	mipi_dsi_msleep(&dsi_ctx, 5);
+
+	return 0;
+}
+
+static int samsung_ltl106hl02_unprepare(struct drm_panel *panel)
+{
+	struct samsung_ltl106hl02 *ctx = to_samsung_ltl106hl02(panel);
+	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+	mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
+	mipi_dsi_msleep(&dsi_ctx, 50);
+	mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+	mipi_dsi_msleep(&dsi_ctx, 150);
+
+	if (ctx->reset_gpio)
+		gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+
+	regulator_disable(ctx->supply);
+
+	return 0;
+}
+
+static const struct drm_display_mode samsung_ltl106hl02_mode = {
+	.clock = (1920 + 32 + 32 + 64) * (1080 + 6 + 3 + 22) * 60 / 1000,
+	.hdisplay = 1920,
+	.hsync_start = 1920 + 32,
+	.hsync_end = 1920 + 32 + 32,
+	.htotal = 1920 + 32 + 32 + 64,
+	.vdisplay = 1080,
+	.vsync_start = 1080 + 6,
+	.vsync_end = 1080 + 6 + 3,
+	.vtotal = 1080 + 6 + 3 + 22,
+	.width_mm = 235,
+	.height_mm = 132,
+	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static int samsung_ltl106hl02_get_modes(struct drm_panel *panel,
+					struct drm_connector *connector)
+{
+	return drm_connector_helper_get_modes_fixed(connector, &samsung_ltl106hl02_mode);
+}
+
+static const struct drm_panel_funcs samsung_ltl106hl02_panel_funcs = {
+	.prepare = samsung_ltl106hl02_prepare,
+	.unprepare = samsung_ltl106hl02_unprepare,
+	.get_modes = samsung_ltl106hl02_get_modes,
+};
+
+static int samsung_ltl106hl02_probe(struct mipi_dsi_device *dsi)
+{
+	struct device *dev = &dsi->dev;
+	struct samsung_ltl106hl02 *ctx;
+	int ret;
+
+	ctx = devm_drm_panel_alloc(dev, struct samsung_ltl106hl02, panel,
+				   &samsung_ltl106hl02_panel_funcs,
+				   DRM_MODE_CONNECTOR_DSI);
+	if (IS_ERR(ctx))
+		return PTR_ERR(ctx);
+
+	ctx->supply = devm_regulator_get(dev, "power");
+	if (IS_ERR(ctx->supply))
+		return dev_err_probe(dev, PTR_ERR(ctx->supply),
+				     "Failed to get power regulator\n");
+
+	ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
+	if (IS_ERR(ctx->reset_gpio))
+		return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
+				     "Failed to get reset-gpios\n");
+
+	ctx->dsi = dsi;
+	mipi_dsi_set_drvdata(dsi, ctx);
+
+	dsi->lanes = 4;
+	dsi->format = MIPI_DSI_FMT_RGB888;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM;
+
+	ret = drm_panel_of_backlight(&ctx->panel);
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to get backlight\n");
+
+	drm_panel_add(&ctx->panel);
+
+	ret = devm_mipi_dsi_attach(dev, dsi);
+	if (ret < 0) {
+		drm_panel_remove(&ctx->panel);
+		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
+	}
+
+	return 0;
+}
+
+static void samsung_ltl106hl02_remove(struct mipi_dsi_device *dsi)
+{
+	struct samsung_ltl106hl02 *ctx = mipi_dsi_get_drvdata(dsi);
+
+	drm_panel_remove(&ctx->panel);
+}
+
+static const struct of_device_id samsung_ltl106hl02_of_match[] = {
+	{ .compatible = "samsung,ltl106hl02-001" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, samsung_ltl106hl02_of_match);
+
+static struct mipi_dsi_driver samsung_ltl106hl02_driver = {
+	.driver = {
+		.name = "panel-samsung-ltl106hl02",
+		.of_match_table = samsung_ltl106hl02_of_match,
+	},
+	.probe = samsung_ltl106hl02_probe,
+	.remove = samsung_ltl106hl02_remove,
+};
+module_mipi_dsi_driver(samsung_ltl106hl02_driver);
+
+MODULE_AUTHOR("Anton Bambura <jenneron@protonmail.com>");
+MODULE_DESCRIPTION("DRM driver for Samsung LTL106HL02 video mode DSI panel");
+MODULE_LICENSE("GPL");
-- 
2.48.1


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

* [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry
  2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
                   ` (6 preceding siblings ...)
  2025-09-29 14:24 ` [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver Svyatoslav Ryhel
@ 2025-09-29 14:24 ` Svyatoslav Ryhel
  2025-09-30  3:15   ` Doug Anderson
  7 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-29 14:24 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,
	Jonathan Hunter, Douglas Anderson, Svyatoslav Ryhel, Sam Ravnborg
  Cc: dri-devel, devicetree, linux-kernel, linux-tegra

Add an eDP panel entry for AUO B116XAN02.0 used in Lenovo IdeaPad Yoga 11
with Tegra 3 SoC.

The raw edid of the panel is:

00 ff ff ff ff ff ff 00 06 af 5c 20 00 00 00 00
00 16 01 04 90 1a 0e 78 02 99 85 95 55 56 92 28
22 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 12 1b 56 5a 50 00 19 30 30 20
46 00 00 90 10 00 00 18 00 00 00 0f 00 00 00 00
00 00 00 00 00 00 00 00 00 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 42 31 31 36 58 41 4e 30 32 2e 30 20 0a 00 f1

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-edp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 90e8c154a978..f01c11f7b59a 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1865,6 +1865,7 @@ static const struct edp_panel_entry edp_panels[] = {
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x1e9b, &delay_200_500_e50, "B133UAN02.1"),
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x1ea5, &delay_200_500_e50, "B116XAK01.6"),
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x203d, &delay_200_500_e50, "B140HTN02.0"),
+	EDP_PANEL_ENTRY('A', 'U', 'O', 0x205c, &delay_200_500_e50, "B116XAN02.0"),
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x208d, &delay_200_500_e50, "B140HTN02.1"),
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x235c, &delay_200_500_e50, "B116XTN02.3"),
 	EDP_PANEL_ENTRY('A', 'U', 'O', 0x239b, &delay_200_500_e50, "B116XAN06.1"),
-- 
2.48.1


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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-09-29 14:24 ` [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel Svyatoslav Ryhel
@ 2025-09-30  3:07   ` Doug Anderson
  2025-09-30  5:02     ` Svyatoslav Ryhel
  0 siblings, 1 reply; 25+ messages in thread
From: Doug Anderson @ 2025-09-30  3:07 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> clearly is not. Address this by adding the proper schema for this panel.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
>  .../display/panel/panel-simple-dsi.yaml       |  2 -
>  2 files changed, 60 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> new file mode 100644
> index 000000000000..0a82cf311452
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LG Corporation 7" WXGA TFT LCD panel
> +
> +maintainers:
> +  - Svyatoslav Ryhel <clamor95@gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: lg,ld070wx3-sl01
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply: true
> +  vcc-supply: true
> +
> +  backlight: true
> +  port: true
> +
> +required:
> +  - compatible
> +  - vdd-supply
> +  - vcc-supply

I suspect you'll get a NAK here because you're not preserving backward
compatibility for existing device trees. While there can sometimes be
reasons to do that, you'd need to provide a very strong justification.


It seems like instead of breaking compatibility you could just have
two supplies:

* power-supply - The name for the "dvdd" supply.
* avdd-supply - The name for the "avdd" supply.

...and then you make both of them not "required". Maybe you'd add some
documentation saying that things might not work 100% correctly if they
weren't provided but that old device trees didn't specify them?

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

* Re: [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-29 14:24 ` [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel Svyatoslav Ryhel
@ 2025-09-30  3:14   ` Doug Anderson
  2025-09-30  5:13     ` Svyatoslav Ryhel
  0 siblings, 1 reply; 25+ messages in thread
From: Doug Anderson @ 2025-09-30  3:14 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> +static int lg_ld070wx3_prepare(struct drm_panel *panel)
> +{
> +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> +       struct device *dev = panel->dev;
> +       int ret;
> +
> +       ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies);
> +       if (ret < 0) {
> +               dev_err(dev, "failed to enable power supplies: %d\n", ret);
> +               return ret;
> +       }
> +
> +       /*
> +        * According to spec delay between enabling supply is 0,
> +        * for regulators to reach required voltage ~5ms needed.
> +        * MIPI interface signal for setup requires additional
> +        * 110ms which in total results in 115ms.
> +        */
> +       mdelay(115);
> +
> +       mipi_dsi_dcs_soft_reset_multi(&ctx);
> +       mipi_dsi_msleep(&ctx, 20);
> +
> +       /* Differential input impedance selection */
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xae, 0x0b);
> +
> +       /* Enter test mode 1 and 2*/
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0xea);
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x5f);
> +
> +       /* Increased MIPI CLK driving ability */
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x68);
> +
> +       /* Exit test mode 1 and 2 */
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0x00);
> +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x00);
> +
> +       return 0;

Shouldn't this return the accumulated error?


> +static int lg_ld070wx3_unprepare(struct drm_panel *panel)
> +{
> +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> +
> +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
> +

Maybe add some comment about ignoring the accumulated error in the
context and still doing the sleeps?


> +       msleep(50);
> +
> +       regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> +
> +       /* power supply must be off for at least 1s after panel disable */
> +       msleep(1000);

Presumably it would be better to keep track of the time you turned it
off and then make sure you don't turn it on again before that time?
Otherwise you've got a pretty wasteful delay here.


> +static int lg_ld070wx3_probe(struct mipi_dsi_device *dsi)
> +{
> +       struct device *dev = &dsi->dev;
> +       struct lg_ld070wx3 *priv;
> +       int ret;
> +
> +       priv = devm_drm_panel_alloc(dev, struct lg_ld070wx3, panel,
> +                                   &lg_ld070wx3_panel_funcs,
> +                                   DRM_MODE_CONNECTOR_DSI);
> +       if (IS_ERR(priv))
> +               return PTR_ERR(priv);
> +
> +       priv->supplies[0].supply = "vcc";
> +       priv->supplies[1].supply = "vdd";
> +
> +       ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), priv->supplies);
> +       if (ret < 0)
> +               return dev_err_probe(dev, ret, "failed to get regulators\n");

Better to use devm_regulator_bulk_get_const() so you don't need to
manually init the supplies?

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

* Re: [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry
  2025-09-29 14:24 ` [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry Svyatoslav Ryhel
@ 2025-09-30  3:15   ` Doug Anderson
  2025-10-02 21:25     ` Doug Anderson
  0 siblings, 1 reply; 25+ messages in thread
From: Doug Anderson @ 2025-09-30  3:15 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> Add an eDP panel entry for AUO B116XAN02.0 used in Lenovo IdeaPad Yoga 11
> with Tegra 3 SoC.
>
> The raw edid of the panel is:
>
> 00 ff ff ff ff ff ff 00 06 af 5c 20 00 00 00 00
> 00 16 01 04 90 1a 0e 78 02 99 85 95 55 56 92 28
> 22 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
> 01 01 01 01 01 01 12 1b 56 5a 50 00 19 30 30 20
> 46 00 00 90 10 00 00 18 00 00 00 0f 00 00 00 00
> 00 00 00 00 00 00 00 00 00 20 00 00 00 fe 00 41
> 55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
> 00 42 31 31 36 58 41 4e 30 32 2e 30 20 0a 00 f1
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-edp.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-09-30  3:07   ` Doug Anderson
@ 2025-09-30  5:02     ` Svyatoslav Ryhel
  2025-10-02 21:35       ` Doug Anderson
  0 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-30  5:02 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

вт, 30 вер. 2025 р. о 06:12 Doug Anderson <dianders@chromium.org> пише:
>
> Hi,
>
> On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> >
> > LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> > clearly is not. Address this by adding the proper schema for this panel.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
> >  .../display/panel/panel-simple-dsi.yaml       |  2 -
> >  2 files changed, 60 insertions(+), 2 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > new file mode 100644
> > index 000000000000..0a82cf311452
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: LG Corporation 7" WXGA TFT LCD panel
> > +
> > +maintainers:
> > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > +
> > +allOf:
> > +  - $ref: panel-common.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - const: lg,ld070wx3-sl01
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  vdd-supply: true
> > +  vcc-supply: true
> > +
> > +  backlight: true
> > +  port: true
> > +
> > +required:
> > +  - compatible
> > +  - vdd-supply
> > +  - vcc-supply
>
> I suspect you'll get a NAK here because you're not preserving backward
> compatibility for existing device trees. While there can sometimes be
> reasons to do that, you'd need to provide a very strong justification.
>
>
> It seems like instead of breaking compatibility you could just have
> two supplies:
>
> * power-supply - The name for the "dvdd" supply.
> * avdd-supply - The name for the "avdd" supply.
>
> ...and then you make both of them not "required". Maybe you'd add some
> documentation saying that things might not work 100% correctly if they
> weren't provided but that old device trees didn't specify them?

Schema describes hardware. If it does not (and in this case it clearly
DOES NOT), then such schema should be adjusted according to hardware.
If there are any users of such binding, they should be adjusted too
(third commit of this patchset does exactly that). Panel datasheet is
explicit, panel has ONLY vdd supply and vcc supply, names are taken
from there too.

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

* Re: [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-30  3:14   ` Doug Anderson
@ 2025-09-30  5:13     ` Svyatoslav Ryhel
  2025-09-30 14:29       ` Doug Anderson
  0 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-30  5:13 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

вт, 30 вер. 2025 р. о 06:20 Doug Anderson <dianders@chromium.org> пише:
>
> Hi,
>
> On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> >
> > +static int lg_ld070wx3_prepare(struct drm_panel *panel)
> > +{
> > +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> > +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> > +       struct device *dev = panel->dev;
> > +       int ret;
> > +
> > +       ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies);
> > +       if (ret < 0) {
> > +               dev_err(dev, "failed to enable power supplies: %d\n", ret);
> > +               return ret;
> > +       }
> > +
> > +       /*
> > +        * According to spec delay between enabling supply is 0,
> > +        * for regulators to reach required voltage ~5ms needed.
> > +        * MIPI interface signal for setup requires additional
> > +        * 110ms which in total results in 115ms.
> > +        */
> > +       mdelay(115);
> > +
> > +       mipi_dsi_dcs_soft_reset_multi(&ctx);
> > +       mipi_dsi_msleep(&ctx, 20);
> > +
> > +       /* Differential input impedance selection */
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xae, 0x0b);
> > +
> > +       /* Enter test mode 1 and 2*/
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0xea);
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x5f);
> > +
> > +       /* Increased MIPI CLK driving ability */
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x68);
> > +
> > +       /* Exit test mode 1 and 2 */
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xee, 0x00);
> > +       mipi_dsi_dcs_write_seq_multi(&ctx, 0xef, 0x00);
> > +
> > +       return 0;
>
> Shouldn't this return the accumulated error?
>

Downstream does not, and I am not, though I agree that this may be a
decent idea. Thank you.

>
> > +static int lg_ld070wx3_unprepare(struct drm_panel *panel)
> > +{
> > +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> > +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> > +
> > +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
> > +
>
> Maybe add some comment about ignoring the accumulated error in the
> context and still doing the sleeps?
>

Isn't that obvious? Regardless of what command returns power supply
should be turned off, preferably with a set amount of delays (delays
are taken from datasheet) to avoid leaving panel in uncertain state
with power on.

>
> > +       msleep(50);
> > +
> > +       regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> > +
> > +       /* power supply must be off for at least 1s after panel disable */
> > +       msleep(1000);
>
> Presumably it would be better to keep track of the time you turned it
> off and then make sure you don't turn it on again before that time?
> Otherwise you've got a pretty wasteful delay here.
>

And how do you propose to implement that? Should I use mutex?
Datasheet is clear regarding this, after supply is turned off there
MUST be AT LEAST 1 second of delay before supplies can be turned back
on.

>
> > +static int lg_ld070wx3_probe(struct mipi_dsi_device *dsi)
> > +{
> > +       struct device *dev = &dsi->dev;
> > +       struct lg_ld070wx3 *priv;
> > +       int ret;
> > +
> > +       priv = devm_drm_panel_alloc(dev, struct lg_ld070wx3, panel,
> > +                                   &lg_ld070wx3_panel_funcs,
> > +                                   DRM_MODE_CONNECTOR_DSI);
> > +       if (IS_ERR(priv))
> > +               return PTR_ERR(priv);
> > +
> > +       priv->supplies[0].supply = "vcc";
> > +       priv->supplies[1].supply = "vdd";
> > +
> > +       ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), priv->supplies);
> > +       if (ret < 0)
> > +               return dev_err_probe(dev, ret, "failed to get regulators\n");
>
> Better to use devm_regulator_bulk_get_const() so you don't need to
> manually init the supplies?

So you propose to init supplies in the probe? Are you aware that
between probe and panel prepare may be 8-10 seconds, sometimes even
more. Having power supplies enabled without panel configuration may
result in permanent panel damage during that time especially since
panel has no hardware reset mechanism.

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

* Re: [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-30  5:13     ` Svyatoslav Ryhel
@ 2025-09-30 14:29       ` Doug Anderson
  2025-09-30 14:47         ` Svyatoslav Ryhel
  0 siblings, 1 reply; 25+ messages in thread
From: Doug Anderson @ 2025-09-30 14:29 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 10:13 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> > > +static int lg_ld070wx3_unprepare(struct drm_panel *panel)
> > > +{
> > > +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> > > +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> > > +
> > > +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
> > > +
> >
> > Maybe add some comment about ignoring the accumulated error in the
> > context and still doing the sleeps?
> >
>
> Isn't that obvious? Regardless of what command returns power supply
> should be turned off, preferably with a set amount of delays (delays
> are taken from datasheet) to avoid leaving panel in uncertain state
> with power on.

I won't insist, though IMO any time an error return is purposely
ignored a comment about why can be justified.


> > > +       msleep(50);
> > > +
> > > +       regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> > > +
> > > +       /* power supply must be off for at least 1s after panel disable */
> > > +       msleep(1000);
> >
> > Presumably it would be better to keep track of the time you turned it
> > off and then make sure you don't turn it on again before that time?
> > Otherwise you've got a pretty wasteful delay here.
> >
>
> And how do you propose to implement that? Should I use mutex?
> Datasheet is clear regarding this, after supply is turned off there
> MUST be AT LEAST 1 second of delay before supplies can be turned back
> on.

You don't really need a mutex since the DRM core will make sure that
prepare and unprepare can't be called at the same time. panel-edp
implements this. See `unprepared_time` I believe.

NOTE: if you want to get really deep into this, it's actually a bit of
a complicated topic and I would also encourage you to add an
"off-on-delay-us" to the regulator in your device tree (which only
works on some regulators but really should be universal). This is
important because:

1. The regulator could be shared by other consumers and they could
cause violations of this.

2. The regulator could potentially be in either state when Linux starts.

3. The regulator framework could adjust the state of the regulator at
regulator probe time.

The "off-on-delay-us" handles at least some more of those cases,
though I seem to remember that at least a few of them still have rough
edges...


> > > +static int lg_ld070wx3_probe(struct mipi_dsi_device *dsi)
> > > +{
> > > +       struct device *dev = &dsi->dev;
> > > +       struct lg_ld070wx3 *priv;
> > > +       int ret;
> > > +
> > > +       priv = devm_drm_panel_alloc(dev, struct lg_ld070wx3, panel,
> > > +                                   &lg_ld070wx3_panel_funcs,
> > > +                                   DRM_MODE_CONNECTOR_DSI);
> > > +       if (IS_ERR(priv))
> > > +               return PTR_ERR(priv);
> > > +
> > > +       priv->supplies[0].supply = "vcc";
> > > +       priv->supplies[1].supply = "vdd";
> > > +
> > > +       ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), priv->supplies);
> > > +       if (ret < 0)
> > > +               return dev_err_probe(dev, ret, "failed to get regulators\n");
> >
> > Better to use devm_regulator_bulk_get_const() so you don't need to
> > manually init the supplies?
>
> So you propose to init supplies in the probe? Are you aware that
> between probe and panel prepare may be 8-10 seconds, sometimes even
> more. Having power supplies enabled without panel configuration may
> result in permanent panel damage during that time especially since
> panel has no hardware reset mechanism.

Maybe look more closely at devm_regulator_bulk_get_const(). Really it
should just save you the lines of code:

  priv->supplies[0].supply = "vcc";
  priv->supplies[1].supply = "vdd";

...and it lets you put those names in a "static const" table in your
driver. All the timings of when regulators are initted should be the
same.

-Doug

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

* Re: [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-30 14:29       ` Doug Anderson
@ 2025-09-30 14:47         ` Svyatoslav Ryhel
  2025-09-30 14:59           ` Doug Anderson
  0 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-30 14:47 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

вт, 30 вер. 2025 р. о 17:34 Doug Anderson <dianders@chromium.org> пише:
>
> Hi,
>
> On Mon, Sep 29, 2025 at 10:13 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> >
> > > > +static int lg_ld070wx3_unprepare(struct drm_panel *panel)
> > > > +{
> > > > +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> > > > +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> > > > +
> > > > +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
> > > > +
> > >
> > > Maybe add some comment about ignoring the accumulated error in the
> > > context and still doing the sleeps?
> > >
> >
> > Isn't that obvious? Regardless of what command returns power supply
> > should be turned off, preferably with a set amount of delays (delays
> > are taken from datasheet) to avoid leaving panel in uncertain state
> > with power on.
>
> I won't insist, though IMO any time an error return is purposely
> ignored a comment about why can be justified.
>
>
> > > > +       msleep(50);
> > > > +
> > > > +       regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> > > > +
> > > > +       /* power supply must be off for at least 1s after panel disable */
> > > > +       msleep(1000);
> > >
> > > Presumably it would be better to keep track of the time you turned it
> > > off and then make sure you don't turn it on again before that time?
> > > Otherwise you've got a pretty wasteful delay here.
> > >
> >
> > And how do you propose to implement that? Should I use mutex?
> > Datasheet is clear regarding this, after supply is turned off there
> > MUST be AT LEAST 1 second of delay before supplies can be turned back
> > on.
>
> You don't really need a mutex since the DRM core will make sure that
> prepare and unprepare can't be called at the same time. panel-edp
> implements this. See `unprepared_time` I believe.
>
> NOTE: if you want to get really deep into this, it's actually a bit of
> a complicated topic and I would also encourage you to add an

Please spare me of this, I have enough stuff to work with and have no
capacity to delve into depth of drm any deeper. In case this panel had
a reset I would not care about regulators too much, but it already
gave me too much pain and caused partially reversible damage to itself
that I am not willing to risk.

> "off-on-delay-us" to the regulator in your device tree (which only
> works on some regulators but really should be universal). This is
> important because:
>
> 1. The regulator could be shared by other consumers and they could
> cause violations of this.
>
> 2. The regulator could potentially be in either state when Linux starts.
>
> 3. The regulator framework could adjust the state of the regulator at
> regulator probe time.
>
> The "off-on-delay-us" handles at least some more of those cases,
> though I seem to remember that at least a few of them still have rough
> edges...

regulator may be not fixes and not handled fully by framework, I am
not wiling to risk.

>
>
> > > > +static int lg_ld070wx3_probe(struct mipi_dsi_device *dsi)
> > > > +{
> > > > +       struct device *dev = &dsi->dev;
> > > > +       struct lg_ld070wx3 *priv;
> > > > +       int ret;
> > > > +
> > > > +       priv = devm_drm_panel_alloc(dev, struct lg_ld070wx3, panel,
> > > > +                                   &lg_ld070wx3_panel_funcs,
> > > > +                                   DRM_MODE_CONNECTOR_DSI);
> > > > +       if (IS_ERR(priv))
> > > > +               return PTR_ERR(priv);
> > > > +
> > > > +       priv->supplies[0].supply = "vcc";
> > > > +       priv->supplies[1].supply = "vdd";
> > > > +
> > > > +       ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), priv->supplies);
> > > > +       if (ret < 0)
> > > > +               return dev_err_probe(dev, ret, "failed to get regulators\n");
> > >
> > > Better to use devm_regulator_bulk_get_const() so you don't need to
> > > manually init the supplies?
> >
> > So you propose to init supplies in the probe? Are you aware that
> > between probe and panel prepare may be 8-10 seconds, sometimes even
> > more. Having power supplies enabled without panel configuration may
> > result in permanent panel damage during that time especially since
> > panel has no hardware reset mechanism.
>
> Maybe look more closely at devm_regulator_bulk_get_const(). Really it
> should just save you the lines of code:
>
>   priv->supplies[0].supply = "vcc";
>   priv->supplies[1].supply = "vdd";
>
> ...and it lets you put those names in a "static const" table in your
> driver. All the timings of when regulators are initted should be the
> same.
>

Here it is my bad, devm_regulator_bulk_get_const indeed should be
preferred. I thought you meant devm_regulator_bulk_get_enable which is
not the case.

> -Doug

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

* Re: [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel
  2025-09-30 14:47         ` Svyatoslav Ryhel
@ 2025-09-30 14:59           ` Doug Anderson
  0 siblings, 0 replies; 25+ messages in thread
From: Doug Anderson @ 2025-09-30 14:59 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Tue, Sep 30, 2025 at 7:48 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> вт, 30 вер. 2025 р. о 17:34 Doug Anderson <dianders@chromium.org> пише:
> >
> > Hi,
> >
> > On Mon, Sep 29, 2025 at 10:13 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > >
> > > > > +static int lg_ld070wx3_unprepare(struct drm_panel *panel)
> > > > > +{
> > > > > +       struct lg_ld070wx3 *priv = to_lg_ld070wx3(panel);
> > > > > +       struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
> > > > > +
> > > > > +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
> > > > > +
> > > >
> > > > Maybe add some comment about ignoring the accumulated error in the
> > > > context and still doing the sleeps?
> > > >
> > >
> > > Isn't that obvious? Regardless of what command returns power supply
> > > should be turned off, preferably with a set amount of delays (delays
> > > are taken from datasheet) to avoid leaving panel in uncertain state
> > > with power on.
> >
> > I won't insist, though IMO any time an error return is purposely
> > ignored a comment about why can be justified.
> >
> >
> > > > > +       msleep(50);
> > > > > +
> > > > > +       regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
> > > > > +
> > > > > +       /* power supply must be off for at least 1s after panel disable */
> > > > > +       msleep(1000);
> > > >
> > > > Presumably it would be better to keep track of the time you turned it
> > > > off and then make sure you don't turn it on again before that time?
> > > > Otherwise you've got a pretty wasteful delay here.
> > > >
> > >
> > > And how do you propose to implement that? Should I use mutex?
> > > Datasheet is clear regarding this, after supply is turned off there
> > > MUST be AT LEAST 1 second of delay before supplies can be turned back
> > > on.
> >
> > You don't really need a mutex since the DRM core will make sure that
> > prepare and unprepare can't be called at the same time. panel-edp
> > implements this. See `unprepared_time` I believe.
> >
> > NOTE: if you want to get really deep into this, it's actually a bit of
> > a complicated topic and I would also encourage you to add an
>
> Please spare me of this, I have enough stuff to work with and have no
> capacity to delve into depth of drm any deeper. In case this panel had
> a reset I would not care about regulators too much, but it already
> gave me too much pain and caused partially reversible damage to itself
> that I am not willing to risk.

I won't insist. It's not much code, but it could always be done later.

-Doug

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

* Re: [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver
  2025-09-29 14:24 ` [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver Svyatoslav Ryhel
@ 2025-09-30 19:35   ` Dmitry Baryshkov
  0 siblings, 0 replies; 25+ messages in thread
From: Dmitry Baryshkov @ 2025-09-30 19:35 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Douglas Anderson, Sam Ravnborg, dri-devel,
	devicetree, linux-kernel, linux-tegra

On Mon, Sep 29, 2025 at 05:24:53PM +0300, Svyatoslav Ryhel wrote:
> From: Anton Bambura <jenneron@protonmail.com>
> 
> LTL106HL02 is a color active matrix TFT (Thin Film Transistor) liquid
> crystal display (LCD) that uses amorphous silicon TFT as switching
> devices. This model is composed of a TFT LCD panel, a driver circuit and a
> backlight unit. The resolution of a 10.6" contains 1920 x 1080 pixels and
> can display up to 16,8M color with wide viewing angle.
> 
> Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
> Signed-off-by: Anton Bambura <jenneron@protonmail.com>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/gpu/drm/panel/Kconfig                 |  13 ++
>  drivers/gpu/drm/panel/Makefile                |   1 +
>  .../gpu/drm/panel/panel-samsung-ltl106hl02.c  | 179 ++++++++++++++++++
>  3 files changed, 193 insertions(+)
>  create mode 100644 drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry
  2025-09-30  3:15   ` Doug Anderson
@ 2025-10-02 21:25     ` Doug Anderson
  0 siblings, 0 replies; 25+ messages in thread
From: Doug Anderson @ 2025-10-02 21:25 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 8:15 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> >
> > Add an eDP panel entry for AUO B116XAN02.0 used in Lenovo IdeaPad Yoga 11
> > with Tegra 3 SoC.
> >
> > The raw edid of the panel is:
> >
> > 00 ff ff ff ff ff ff 00 06 af 5c 20 00 00 00 00
> > 00 16 01 04 90 1a 0e 78 02 99 85 95 55 56 92 28
> > 22 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
> > 01 01 01 01 01 01 12 1b 56 5a 50 00 19 30 30 20
> > 46 00 00 90 10 00 00 18 00 00 00 0f 00 00 00 00
> > 00 00 00 00 00 00 00 00 00 20 00 00 00 fe 00 41
> > 55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
> > 00 42 31 31 36 58 41 4e 30 32 2e 30 20 0a 00 f1
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  drivers/gpu/drm/panel/panel-edp.c | 1 +
> >  1 file changed, 1 insertion(+)
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>

Pushed just this patch to drm-misc-next to get it out of the way,
since there are no dependencies.

[8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry
      commit: 5b50bb435629ab206cfa1cca3d71847d4523f88b

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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-09-30  5:02     ` Svyatoslav Ryhel
@ 2025-10-02 21:35       ` Doug Anderson
  2025-10-06 22:13         ` Rob Herring
  0 siblings, 1 reply; 25+ messages in thread
From: Doug Anderson @ 2025-10-02 21:35 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

Hi,

On Mon, Sep 29, 2025 at 10:03 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
>
> вт, 30 вер. 2025 р. о 06:12 Doug Anderson <dianders@chromium.org> пише:
> >
> > Hi,
> >
> > On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > >
> > > LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> > > clearly is not. Address this by adding the proper schema for this panel.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > >  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
> > >  .../display/panel/panel-simple-dsi.yaml       |  2 -
> > >  2 files changed, 60 insertions(+), 2 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > new file mode 100644
> > > index 000000000000..0a82cf311452
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: LG Corporation 7" WXGA TFT LCD panel
> > > +
> > > +maintainers:
> > > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > > +
> > > +allOf:
> > > +  - $ref: panel-common.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    items:
> > > +      - const: lg,ld070wx3-sl01
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  vdd-supply: true
> > > +  vcc-supply: true
> > > +
> > > +  backlight: true
> > > +  port: true
> > > +
> > > +required:
> > > +  - compatible
> > > +  - vdd-supply
> > > +  - vcc-supply
> >
> > I suspect you'll get a NAK here because you're not preserving backward
> > compatibility for existing device trees. While there can sometimes be
> > reasons to do that, you'd need to provide a very strong justification.
> >
> >
> > It seems like instead of breaking compatibility you could just have
> > two supplies:
> >
> > * power-supply - The name for the "dvdd" supply.
> > * avdd-supply - The name for the "avdd" supply.
> >
> > ...and then you make both of them not "required". Maybe you'd add some
> > documentation saying that things might not work 100% correctly if they
> > weren't provided but that old device trees didn't specify them?
>
> Schema describes hardware. If it does not (and in this case it clearly
> DOES NOT), then such schema should be adjusted according to hardware.
> If there are any users of such binding, they should be adjusted too
> (third commit of this patchset does exactly that). Panel datasheet is
> explicit, panel has ONLY vdd supply and vcc supply, names are taken
> from there too.

I'm more than happy to defer to DT people on this, but the general
argument is that "device tree" is supposed to remain forever forward
compatible. In other words, someone could have taken a snapshot of the
"tegra114-tn7.dts" device tree at any point in time and then shipped
it in some BIOS. Presumably the old "tegra114-tn7.dts" (for some
reason) managed to init the panel properly in the past and the idea is
that there should still be a way to init the panel with the old device
tree now.

Obviously, that's an ideal version of the world and sometimes
hard/impossible to make a reality, but it's supposed to be what we
strive for.

From a more practical standpoint, the dts changes and code changes
will go through different trees and so making them mutually depend on
each other can leave people broken if they happen to have one patch
but not the other.

I suppose one way to handle this (if DT people like it) is to keep the
bindings the way you have it but then add some layer of backward
compatibility in the driver. It will mean that anyone with the old DTS
would officially not "validate" properly against the new bindings, but
I think that could be OK as long as it was explicitly mentioned in the
commit message. Obviously, though, DT bindings reviewers would have
the last word there...

-Doug

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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-10-02 21:35       ` Doug Anderson
@ 2025-10-06 22:13         ` Rob Herring
  2025-10-07  5:24           ` Svyatoslav Ryhel
  0 siblings, 1 reply; 25+ messages in thread
From: Rob Herring @ 2025-10-06 22:13 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Svyatoslav Ryhel, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

On Thu, Oct 02, 2025 at 02:35:42PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Sep 29, 2025 at 10:03 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> >
> > вт, 30 вер. 2025 р. о 06:12 Doug Anderson <dianders@chromium.org> пише:
> > >
> > > Hi,
> > >
> > > On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > > >
> > > > LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> > > > clearly is not. Address this by adding the proper schema for this panel.
> > > >
> > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > > ---
> > > >  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
> > > >  .../display/panel/panel-simple-dsi.yaml       |  2 -
> > > >  2 files changed, 60 insertions(+), 2 deletions(-)
> > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > > new file mode 100644
> > > > index 000000000000..0a82cf311452
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: LG Corporation 7" WXGA TFT LCD panel
> > > > +
> > > > +maintainers:
> > > > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > > > +
> > > > +allOf:
> > > > +  - $ref: panel-common.yaml#
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    items:
> > > > +      - const: lg,ld070wx3-sl01
> > > > +
> > > > +  reg:
> > > > +    maxItems: 1
> > > > +
> > > > +  vdd-supply: true
> > > > +  vcc-supply: true
> > > > +
> > > > +  backlight: true
> > > > +  port: true
> > > > +
> > > > +required:
> > > > +  - compatible
> > > > +  - vdd-supply
> > > > +  - vcc-supply
> > >
> > > I suspect you'll get a NAK here because you're not preserving backward
> > > compatibility for existing device trees. While there can sometimes be
> > > reasons to do that, you'd need to provide a very strong justification.
> > >
> > >
> > > It seems like instead of breaking compatibility you could just have
> > > two supplies:
> > >
> > > * power-supply - The name for the "dvdd" supply.
> > > * avdd-supply - The name for the "avdd" supply.
> > >
> > > ...and then you make both of them not "required". Maybe you'd add some
> > > documentation saying that things might not work 100% correctly if they
> > > weren't provided but that old device trees didn't specify them?
> >
> > Schema describes hardware. If it does not (and in this case it clearly
> > DOES NOT), then such schema should be adjusted according to hardware.

The priority is:

1) ABI
2) describe h/w accurately

IMO, if there are 2 rails on the h/w and you have 2 supplies in the DT, 
then you have described the h/w. names are less important.

> > If there are any users of such binding, they should be adjusted too
> > (third commit of this patchset does exactly that). Panel datasheet is
> > explicit, panel has ONLY vdd supply and vcc supply, names are taken
> > from there too.
> 
> I'm more than happy to defer to DT people on this, but the general
> argument is that "device tree" is supposed to remain forever forward
> compatible. In other words, someone could have taken a snapshot of the
> "tegra114-tn7.dts" device tree at any point in time and then shipped
> it in some BIOS. Presumably the old "tegra114-tn7.dts" (for some
> reason) managed to init the panel properly in the past and the idea is
> that there should still be a way to init the panel with the old device
> tree now.
> 
> Obviously, that's an ideal version of the world and sometimes
> hard/impossible to make a reality, but it's supposed to be what we
> strive for.
> 
> >From a more practical standpoint, the dts changes and code changes
> will go through different trees and so making them mutually depend on
> each other can leave people broken if they happen to have one patch
> but not the other.
> 
> I suppose one way to handle this (if DT people like it) is to keep the
> bindings the way you have it but then add some layer of backward
> compatibility in the driver. It will mean that anyone with the old DTS
> would officially not "validate" properly against the new bindings, but
> I think that could be OK as long as it was explicitly mentioned in the
> commit message. Obviously, though, DT bindings reviewers would have
> the last word there...

That's fine, but then I prefer we keep 'power-supply' as deprecated. 
Then if we ever validate that drivers only use documented properties, 
it would pass. We already check drivers use documented compatible 
strings, so that wouldn't be too hard to do.

Rob

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

* Re: [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel
  2025-09-29 14:24 ` [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel Svyatoslav Ryhel
@ 2025-10-06 22:14   ` Rob Herring (Arm)
  0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-06 22:14 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Douglas Anderson, Neil Armstrong, Sam Ravnborg, dri-devel,
	David Airlie, linux-tegra, linux-kernel, Maxime Ripard,
	Jessica Zhang, Thierry Reding, devicetree, Thomas Zimmermann,
	Simona Vetter, Maarten Lankhorst, Krzysztof Kozlowski,
	Conor Dooley, Jonathan Hunter


On Mon, 29 Sep 2025 17:24:50 +0300, Svyatoslav Ryhel wrote:
> Document Samsung LTL106AL01 simple LVDS panel.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
>  1 file changed, 2 insertions(+)
> 

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


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

* Re: [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel
  2025-09-29 14:24 ` [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel Svyatoslav Ryhel
@ 2025-10-06 22:14   ` Rob Herring (Arm)
  0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring (Arm) @ 2025-10-06 22:14 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Neil Armstrong, linux-tegra, Krzysztof Kozlowski, Thierry Reding,
	David Airlie, Maxime Ripard, devicetree, Douglas Anderson,
	Jessica Zhang, Conor Dooley, Maarten Lankhorst, Sam Ravnborg,
	dri-devel, linux-kernel, Simona Vetter, Jonathan Hunter,
	Thomas Zimmermann


On Mon, 29 Sep 2025 17:24:52 +0300, Svyatoslav Ryhel wrote:
> Samsung LTL106HL02 is a simple DSI which requires only a power supply and
> an optional reset gpio.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  .../devicetree/bindings/display/panel/panel-simple-dsi.yaml     | 2 ++
>  1 file changed, 2 insertions(+)
> 

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


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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-10-06 22:13         ` Rob Herring
@ 2025-10-07  5:24           ` Svyatoslav Ryhel
  2025-10-08  1:38             ` Rob Herring
  0 siblings, 1 reply; 25+ messages in thread
From: Svyatoslav Ryhel @ 2025-10-07  5:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: Doug Anderson, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

вт, 7 жовт. 2025 р. о 01:13 Rob Herring <robh@kernel.org> пише:
>
> On Thu, Oct 02, 2025 at 02:35:42PM -0700, Doug Anderson wrote:
> > Hi,
> >
> > On Mon, Sep 29, 2025 at 10:03 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > >
> > > вт, 30 вер. 2025 р. о 06:12 Doug Anderson <dianders@chromium.org> пише:
> > > >
> > > > Hi,
> > > >
> > > > On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > > > >
> > > > > LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> > > > > clearly is not. Address this by adding the proper schema for this panel.
> > > > >
> > > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > > > ---
> > > > >  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
> > > > >  .../display/panel/panel-simple-dsi.yaml       |  2 -
> > > > >  2 files changed, 60 insertions(+), 2 deletions(-)
> > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > > > new file mode 100644
> > > > > index 000000000000..0a82cf311452
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > +
> > > > > +title: LG Corporation 7" WXGA TFT LCD panel
> > > > > +
> > > > > +maintainers:
> > > > > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > > > > +
> > > > > +allOf:
> > > > > +  - $ref: panel-common.yaml#
> > > > > +
> > > > > +properties:
> > > > > +  compatible:
> > > > > +    items:
> > > > > +      - const: lg,ld070wx3-sl01
> > > > > +
> > > > > +  reg:
> > > > > +    maxItems: 1
> > > > > +
> > > > > +  vdd-supply: true
> > > > > +  vcc-supply: true
> > > > > +
> > > > > +  backlight: true
> > > > > +  port: true
> > > > > +
> > > > > +required:
> > > > > +  - compatible
> > > > > +  - vdd-supply
> > > > > +  - vcc-supply
> > > >
> > > > I suspect you'll get a NAK here because you're not preserving backward
> > > > compatibility for existing device trees. While there can sometimes be
> > > > reasons to do that, you'd need to provide a very strong justification.
> > > >
> > > >
> > > > It seems like instead of breaking compatibility you could just have
> > > > two supplies:
> > > >
> > > > * power-supply - The name for the "dvdd" supply.
> > > > * avdd-supply - The name for the "avdd" supply.
> > > >
> > > > ...and then you make both of them not "required". Maybe you'd add some
> > > > documentation saying that things might not work 100% correctly if they
> > > > weren't provided but that old device trees didn't specify them?
> > >
> > > Schema describes hardware. If it does not (and in this case it clearly
> > > DOES NOT), then such schema should be adjusted according to hardware.
>
> The priority is:
>
> 1) ABI
> 2) describe h/w accurately
>
> IMO, if there are 2 rails on the h/w and you have 2 supplies in the DT,
> then you have described the h/w. names are less important.
>
> > > If there are any users of such binding, they should be adjusted too
> > > (third commit of this patchset does exactly that). Panel datasheet is
> > > explicit, panel has ONLY vdd supply and vcc supply, names are taken
> > > from there too.
> >
> > I'm more than happy to defer to DT people on this, but the general
> > argument is that "device tree" is supposed to remain forever forward
> > compatible. In other words, someone could have taken a snapshot of the
> > "tegra114-tn7.dts" device tree at any point in time and then shipped
> > it in some BIOS. Presumably the old "tegra114-tn7.dts" (for some
> > reason) managed to init the panel properly in the past and the idea is
> > that there should still be a way to init the panel with the old device
> > tree now.
> >
> > Obviously, that's an ideal version of the world and sometimes
> > hard/impossible to make a reality, but it's supposed to be what we
> > strive for.
> >
> > >From a more practical standpoint, the dts changes and code changes
> > will go through different trees and so making them mutually depend on
> > each other can leave people broken if they happen to have one patch
> > but not the other.
> >
> > I suppose one way to handle this (if DT people like it) is to keep the
> > bindings the way you have it but then add some layer of backward
> > compatibility in the driver. It will mean that anyone with the old DTS
> > would officially not "validate" properly against the new bindings, but
> > I think that could be OK as long as it was explicitly mentioned in the
> > commit message. Obviously, though, DT bindings reviewers would have
> > the last word there...
>
> That's fine, but then I prefer we keep 'power-supply' as deprecated.
> Then if we ever validate that drivers only use documented properties,
> it would pass. We already check drivers use documented compatible
> strings, so that wouldn't be too hard to do.
>

Sure, but ATM there is only one user of this compatible in the
mainline Linux kernel, which is Nvidia tablet Tegra Note 7 and:

1. Node used in its tree is addressed in the third commit of this patchset
2. Its panel is broken anyway since it cannot init properly if
bootloader does not leave a pre-inited panel, it cannot suspend
properly and it has a loose regulator which relies on always-on
property rather then being hooked to the panel.

I can assure you that besides me there seems to be no one interested
in this tablet.

> Rob

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

* Re: [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel
  2025-10-07  5:24           ` Svyatoslav Ryhel
@ 2025-10-08  1:38             ` Rob Herring
  0 siblings, 0 replies; 25+ messages in thread
From: Rob Herring @ 2025-10-08  1:38 UTC (permalink / raw)
  To: Svyatoslav Ryhel
  Cc: Doug Anderson, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, Sam Ravnborg, dri-devel, devicetree,
	linux-kernel, linux-tegra

On Tue, Oct 07, 2025 at 08:24:06AM +0300, Svyatoslav Ryhel wrote:
> вт, 7 жовт. 2025 р. о 01:13 Rob Herring <robh@kernel.org> пише:
> >
> > On Thu, Oct 02, 2025 at 02:35:42PM -0700, Doug Anderson wrote:
> > > Hi,
> > >
> > > On Mon, Sep 29, 2025 at 10:03 PM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > > >
> > > > вт, 30 вер. 2025 р. о 06:12 Doug Anderson <dianders@chromium.org> пише:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Mon, Sep 29, 2025 at 7:25 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote:
> > > > > >
> > > > > > LG LD070WX3-SL01 was mistakenly documented as a simple DSI panel, which it
> > > > > > clearly is not. Address this by adding the proper schema for this panel.
> > > > > >
> > > > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > > > > ---
> > > > > >  .../bindings/display/panel/lg,ld070wx3.yaml   | 60 +++++++++++++++++++
> > > > > >  .../display/panel/panel-simple-dsi.yaml       |  2 -
> > > > > >  2 files changed, 60 insertions(+), 2 deletions(-)
> > > > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.yaml
> > > > > > new file mode 100644
> > > > > > index 000000000000..0a82cf311452
> > > > > > --- /dev/null
> > > > > > +++ b/Documentation/devicetree/bindings/display/panel/lg,ld070wx3.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/lg,ld070wx3.yaml#
> > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > +
> > > > > > +title: LG Corporation 7" WXGA TFT LCD panel
> > > > > > +
> > > > > > +maintainers:
> > > > > > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > > > > > +
> > > > > > +allOf:
> > > > > > +  - $ref: panel-common.yaml#
> > > > > > +
> > > > > > +properties:
> > > > > > +  compatible:
> > > > > > +    items:
> > > > > > +      - const: lg,ld070wx3-sl01
> > > > > > +
> > > > > > +  reg:
> > > > > > +    maxItems: 1
> > > > > > +
> > > > > > +  vdd-supply: true
> > > > > > +  vcc-supply: true
> > > > > > +
> > > > > > +  backlight: true
> > > > > > +  port: true
> > > > > > +
> > > > > > +required:
> > > > > > +  - compatible
> > > > > > +  - vdd-supply
> > > > > > +  - vcc-supply
> > > > >
> > > > > I suspect you'll get a NAK here because you're not preserving backward
> > > > > compatibility for existing device trees. While there can sometimes be
> > > > > reasons to do that, you'd need to provide a very strong justification.
> > > > >
> > > > >
> > > > > It seems like instead of breaking compatibility you could just have
> > > > > two supplies:
> > > > >
> > > > > * power-supply - The name for the "dvdd" supply.
> > > > > * avdd-supply - The name for the "avdd" supply.
> > > > >
> > > > > ...and then you make both of them not "required". Maybe you'd add some
> > > > > documentation saying that things might not work 100% correctly if they
> > > > > weren't provided but that old device trees didn't specify them?
> > > >
> > > > Schema describes hardware. If it does not (and in this case it clearly
> > > > DOES NOT), then such schema should be adjusted according to hardware.
> >
> > The priority is:
> >
> > 1) ABI
> > 2) describe h/w accurately
> >
> > IMO, if there are 2 rails on the h/w and you have 2 supplies in the DT,
> > then you have described the h/w. names are less important.
> >
> > > > If there are any users of such binding, they should be adjusted too
> > > > (third commit of this patchset does exactly that). Panel datasheet is
> > > > explicit, panel has ONLY vdd supply and vcc supply, names are taken
> > > > from there too.
> > >
> > > I'm more than happy to defer to DT people on this, but the general
> > > argument is that "device tree" is supposed to remain forever forward
> > > compatible. In other words, someone could have taken a snapshot of the
> > > "tegra114-tn7.dts" device tree at any point in time and then shipped
> > > it in some BIOS. Presumably the old "tegra114-tn7.dts" (for some
> > > reason) managed to init the panel properly in the past and the idea is
> > > that there should still be a way to init the panel with the old device
> > > tree now.
> > >
> > > Obviously, that's an ideal version of the world and sometimes
> > > hard/impossible to make a reality, but it's supposed to be what we
> > > strive for.
> > >
> > > >From a more practical standpoint, the dts changes and code changes
> > > will go through different trees and so making them mutually depend on
> > > each other can leave people broken if they happen to have one patch
> > > but not the other.
> > >
> > > I suppose one way to handle this (if DT people like it) is to keep the
> > > bindings the way you have it but then add some layer of backward
> > > compatibility in the driver. It will mean that anyone with the old DTS
> > > would officially not "validate" properly against the new bindings, but
> > > I think that could be OK as long as it was explicitly mentioned in the
> > > commit message. Obviously, though, DT bindings reviewers would have
> > > the last word there...
> >
> > That's fine, but then I prefer we keep 'power-supply' as deprecated.
> > Then if we ever validate that drivers only use documented properties,
> > it would pass. We already check drivers use documented compatible
> > strings, so that wouldn't be too hard to do.
> >
> 
> Sure, but ATM there is only one user of this compatible in the
> mainline Linux kernel, which is Nvidia tablet Tegra Note 7 and:
> 
> 1. Node used in its tree is addressed in the third commit of this patchset
> 2. Its panel is broken anyway since it cannot init properly if
> bootloader does not leave a pre-inited panel, it cannot suspend
> properly and it has a loose regulator which relies on always-on
> property rather then being hooked to the panel.

Then put all this justification in the commit message.

> I can assure you that besides me there seems to be no one interested
> in this tablet.

Okay, then it is on you if anyone does care.

Rob

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

end of thread, other threads:[~2025-10-08  1:38 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-29 14:24 [PATCH v1 0/8] Add support for panels found in various Tegra devices Svyatoslav Ryhel
2025-09-29 14:24 ` [PATCH v1 1/8] dt-bindings: display: panel: properly document LG LD070WX3 panel Svyatoslav Ryhel
2025-09-30  3:07   ` Doug Anderson
2025-09-30  5:02     ` Svyatoslav Ryhel
2025-10-02 21:35       ` Doug Anderson
2025-10-06 22:13         ` Rob Herring
2025-10-07  5:24           ` Svyatoslav Ryhel
2025-10-08  1:38             ` Rob Herring
2025-09-29 14:24 ` [PATCH v1 2/8] gpu/drm: panel: add support for LG LD070WX3-SL01 MIPI DSI panel Svyatoslav Ryhel
2025-09-30  3:14   ` Doug Anderson
2025-09-30  5:13     ` Svyatoslav Ryhel
2025-09-30 14:29       ` Doug Anderson
2025-09-30 14:47         ` Svyatoslav Ryhel
2025-09-30 14:59           ` Doug Anderson
2025-09-29 14:24 ` [PATCH v1 3/8] ARM: tn7: adjust panel node Svyatoslav Ryhel
2025-09-29 14:24 ` [PATCH v1 4/8] dt-bindings: display: panel: document Samsung LTL106AL01 simple panel Svyatoslav Ryhel
2025-10-06 22:14   ` Rob Herring (Arm)
2025-09-29 14:24 ` [PATCH v1 5/8] gpu/drm: panel: simple-panel: add Samsung LTL106AL01 LVDS panel support Svyatoslav Ryhel
2025-09-29 14:24 ` [PATCH v1 6/8] dt-bindings: display: panel: document Samsung LTL106HL02 MIPI DSI panel Svyatoslav Ryhel
2025-10-06 22:14   ` Rob Herring (Arm)
2025-09-29 14:24 ` [PATCH v1 7/8] gpu/drm: panel: add Samsung LTL106HL02 MIPI DSI panel driver Svyatoslav Ryhel
2025-09-30 19:35   ` Dmitry Baryshkov
2025-09-29 14:24 ` [PATCH v1 8/8] gpu/drm: panel-edp: add AUO B116XAN02.0 panel entry Svyatoslav Ryhel
2025-09-30  3:15   ` Doug Anderson
2025-10-02 21:25     ` Doug Anderson

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).