devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel)
@ 2024-11-05  5:52 Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8 Hironori KIKUCHI
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

Fix support for panels used in the Anbernic RG35XX series.

We previously decided to use the integrated vendor and device name for the panel, but the recent revision of the RG35XX series has a different panel that is not compatible with the old panel.
Unfortunately, these two RG35XX models have the same name and cannot be distinguished without opening them, so the name `anbernic,rg35xx-plus-panel` is no longer suitable as a unique identifier.

This patch series fixes the situation by:
* Renaming rg35xx-plus-panel back to WL-355608-A8, but with a vendor-prefixed `anbernic,wl-355608-a8` for the older RG35XX series
* Adding new panel, YLM-LBV0345001H-V2 (`anbernic,ylm-lbv0345001h-v2`), for the newer RG35XX series
(Detecting the connected panel is another problem.)

Additionally, this patch series adds another panel, YLM-LBV0400001X-V1 (`anbernic,ylm-lbv0400001x-v1`), which is similar to YLM-LBV0345001H-V2, for the RG40XX series.

This patch series should be applied after:
[1]: https://lore.kernel.org/dri-devel/20241020083836.175733-1-ryan@testtoast.com/

Hironori KIKUCHI (7):
  dt-bindings: display: panel: Rename rg35xx-plus-panel back to
    WL-355608-A8
  drm: panel: nv3052c: Rename rg35xx-plus-panel back to WL-355608-A8
  drm: panel: nv3052c: Fix size of WL-355608-A8
  dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
  drm: panel: nv3052c: Add YLM-LBV0345001H-V2 panel
  dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel
  drm: panel: nv3052c: Add YLM-LBV0400001X-V1 panel

 ...-panel.yaml => anbernic,wl-355608-a8.yaml} |   9 +-
 .../panel/anbernic,ylm-lbv0345001h-v2.yaml    |  68 +++
 .../panel/anbernic,ylm-lbv0400001x-v1.yaml    |  65 +++
 .../gpu/drm/panel/panel-newvision-nv3052c.c   | 396 +++++++++++++++++-
 4 files changed, 530 insertions(+), 8 deletions(-)
 rename Documentation/devicetree/bindings/display/panel/{anbernic,rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} (83%)
 create mode 100644 Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml
 create mode 100644 Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml

-- 
2.47.0


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

* [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-05 14:19   ` Rob Herring
  2024-11-05  5:52 ` [PATCH 2/7] drm: panel: nv3052c: " Hironori KIKUCHI
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

A panel assembly is changed in the recent revision of Anbernic RG35XX
Plus, so the `anbernic,rg35xx-plus-panel` identifier is neither suitable
nor unique for the panel anymore.

Fortunately, the panel can be distinguished by a label printed on the
FPC cable, so use the label "WL-355608-A8" as an identifier instead.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 ...rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
 rename Documentation/devicetree/bindings/display/panel/{anbernic,rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} (83%)

diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
similarity index 83%
rename from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
rename to Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
index 1d67492ebd3..5e8afbea690 100644
--- a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
+++ b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/display/panel/anbernic,rg35xx-plus-panel.yaml#
+$id: http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Anbernic RG35XX series (WL-355608-A8) 3.5" 640x480 24-bit IPS LCD panel
@@ -16,13 +16,14 @@ allOf:
 properties:
   compatible:
     oneOf:
-      - const: anbernic,rg35xx-plus-panel
+      - const: anbernic,wl-355608-a8
       - items:
           - enum:
               - anbernic,rg35xx-2024-panel
               - anbernic,rg35xx-h-panel
               - anbernic,rg35xx-sp-panel
-          - const: anbernic,rg35xx-plus-panel
+              - anbernic,rg35xx-plus-panel
+          - const: anbernic,wl-355608-a8
 
   reg:
     maxItems: 1
@@ -47,7 +48,7 @@ examples:
         #size-cells = <0>;
 
         panel@0 {
-            compatible = "anbernic,rg35xx-plus-panel";
+            compatible = "anbernic,wl-355608-a8";
             reg = <0>;
 
             spi-3wire;
-- 
2.47.0


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

* [PATCH 2/7] drm: panel: nv3052c: Rename rg35xx-plus-panel back to WL-355608-A8
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8 Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 3/7] drm: panel: nv3052c: Fix size of WL-355608-A8 Hironori KIKUCHI
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

A panel assembly is changed in the recent revision of Anbernic RG35XX
Plus, so the `anbernic,rg35xx-plus-panel` identifier is neither suitable
nor unique for the panel anymore.

Fortunately, the panel can be distinguished by a label printed on the
FPC cable, so use the label "WL-355608-A8" as an identifier instead.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
index 06e16a7c14a..2da1e924177 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
@@ -917,7 +917,7 @@ static const struct nv3052c_panel_info wl_355608_a8_panel_info = {
 static const struct spi_device_id nv3052c_ids[] = {
 	{ "ltk035c5444t", },
 	{ "fs035vg158", },
-	{ "rg35xx-plus-panel", },
+	{ "wl-355608-a8", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(spi, nv3052c_ids);
@@ -925,7 +925,7 @@ MODULE_DEVICE_TABLE(spi, nv3052c_ids);
 static const struct of_device_id nv3052c_of_match[] = {
 	{ .compatible = "leadtek,ltk035c5444t", .data = &ltk035c5444t_panel_info },
 	{ .compatible = "fascontek,fs035vg158", .data = &fs035vg158_panel_info },
-	{ .compatible = "anbernic,rg35xx-plus-panel", .data = &wl_355608_a8_panel_info },
+	{ .compatible = "anbernic,wl-355608-a8", .data = &wl_355608_a8_panel_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, nv3052c_of_match);
-- 
2.47.0


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

* [PATCH 3/7] drm: panel: nv3052c: Fix size of WL-355608-A8
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8 Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 2/7] drm: panel: nv3052c: " Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel Hironori KIKUCHI
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

It is 3.45 inches in size (diagonally).

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
index 2da1e924177..2f3a8eaade4 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
@@ -906,8 +906,8 @@ static const struct nv3052c_panel_info fs035vg158_panel_info = {
 static const struct nv3052c_panel_info wl_355608_a8_panel_info = {
 	.display_modes = wl_355608_a8_mode,
 	.num_modes = ARRAY_SIZE(wl_355608_a8_mode),
-	.width_mm = 150,
-	.height_mm = 94,
+	.width_mm = 70,
+	.height_mm = 53,
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
 	.panel_regs = wl_355608_a8_panel_regs,
-- 
2.47.0


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

* [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
                   ` (2 preceding siblings ...)
  2024-11-05  5:52 ` [PATCH 3/7] drm: panel: nv3052c: Fix size of WL-355608-A8 Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-06  7:08   ` kernel test robot
  2024-11-05  5:52 ` [PATCH 5/7] drm: panel: nv3052c: " Hironori KIKUCHI
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

The YLM-LBV0345001H-V2 panel is a display panel used in the recent
revision of Anbernic RG35XX Plus, a handheld gaming device from Anbernic.
It is 3.45 inches in size (diagonally) with a resolution of 640x480.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 .../panel/anbernic,ylm-lbv0345001h-v2.yaml    | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml
new file mode 100644
index 00000000000..ae00096bf3d
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0345001h-v2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Anbernic RG35XX series (YLM-LBV0345001H-V2) 3.45" 640x480 24-bit IPS LCD panel
+
+maintainers:
+  - Hironori KIKUCHI <kikuchan98@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: anbernic,ylm-lbv0345001h-v2
+      - items:
+          - enum:
+              - anbernic,rg35xx-2024-panel
+              - anbernic,rg35xx-h-panel
+              - anbernic,rg35xx-sp-panel
+              - anbernic,rg35xx-plus-panel
+          - const: anbernic,ylm-lbv0345001h-v2
+
+  reg:
+    maxItems: 1
+
+  spi-3wire: true
+
+required:
+  - compatible
+  - reg
+  - port
+  - power-supply
+  - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "anbernic,ylm-lbv0345001h-v2";
+            reg = <0>;
+
+            spi-3wire;
+            spi-max-frequency = <3125000>;
+
+            reset-gpios = <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14
+
+            backlight = <&backlight>;
+            power-supply = <&reg_lcd>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&tcon_lcd0_out_lcd>;
+                };
+            };
+        };
+    };
-- 
2.47.0


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

* [PATCH 5/7] drm: panel: nv3052c: Add YLM-LBV0345001H-V2 panel
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
                   ` (3 preceding siblings ...)
  2024-11-05  5:52 ` [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 6/7] dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 7/7] drm: panel: nv3052c: " Hironori KIKUCHI
  6 siblings, 0 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

The YLM-LBV0345001H-V2 panel is a display panel used in the recent
revision of Anbernic RG35XX Plus, a handheld gaming device from Anbernic.
It is 3.45 inches in size (diagonally) with a resolution of 640x480.

It has the same interface (pins and connector) as WL-355608-A8, the panel
of the former revision of RG35XX Plus, but they differ on its
init-sequence. So add entry for the new panel.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 .../gpu/drm/panel/panel-newvision-nv3052c.c   | 177 ++++++++++++++++++
 1 file changed, 177 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
index 2f3a8eaade4..57f6d5b1288 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
@@ -629,6 +629,155 @@ static const struct nv3052c_reg wl_355608_a8_panel_regs[] = {
 	{ 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0
 };
 
+static const struct nv3052c_reg ylm_lbv0345001h_v2_panel_regs[] = {
+	// EXTC Command set enable, select page 1
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 },
+	// Mostly unknown registers
+	{ 0xe3, 0x00 },
+	{ 0x0a, 0x01 },
+	{ 0x23, 0xa0 },
+	{ 0x24, 0x10 },
+	{ 0x25, 0x09 },
+	{ 0x28, 0x47 },
+	{ 0x29, 0x01 },
+	{ 0x2a, 0xdf },
+	{ 0x38, 0x9c },
+	{ 0x39, 0xa7 },
+	{ 0x3a, 0x3f },
+	{ 0x91, 0x77 },
+	{ 0x92, 0x77 },
+	{ 0xa0, 0x55 },
+	{ 0xa1, 0x50 },
+	{ 0xa4, 0x9c },
+	{ 0xa7, 0x02 },
+	{ 0xa8, 0x01 },
+	{ 0xa9, 0x01 },
+	{ 0xaa, 0xfc },
+	{ 0xab, 0x28 },
+	{ 0xac, 0x06 },
+	{ 0xad, 0x06 },
+	{ 0xae, 0x06 },
+	{ 0xaf, 0x03 },
+	{ 0xb0, 0x08 },
+	{ 0xb1, 0x26 },
+	{ 0xb2, 0x28 },
+	{ 0xb3, 0x28 },
+	{ 0xb4, 0x03 },
+	{ 0xb5, 0x08 },
+	{ 0xb6, 0x26 },
+	{ 0xb7, 0x08 },
+	{ 0xb8, 0x26 },
+	// EXTC Command set enable, select page 2
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 },
+	// Set gray scale voltage to adjust gamma
+	{ 0xb0, 0x02 }, // PGAMVR0
+	{ 0xb1, 0x0f }, // PGAMVR1
+	{ 0xb2, 0x11 }, // PGAMVR2
+	{ 0xb3, 0x32 }, // PGAMVR3
+	{ 0xb4, 0x36 }, // PGAMVR4
+	{ 0xb5, 0x3c }, // PGAMVR5
+	{ 0xb6, 0x20 }, // PGAMPR0
+	{ 0xb7, 0x3e }, // PGAMPR1
+	{ 0xb8, 0x0e }, // PGAMPK0
+	{ 0xb9, 0x05 }, // PGAMPK1
+	{ 0xba, 0x11 }, // PGAMPK2
+	{ 0xbb, 0x11 }, // PGAMPK3
+	{ 0xbc, 0x13 }, // PGAMPK4
+	{ 0xbd, 0x14 }, // PGAMPK5
+	{ 0xbe, 0x16 }, // PGAMPK6
+	{ 0xbf, 0x0e }, // PGAMPK7
+	{ 0xc0, 0x17 }, // PGAMPK8
+	{ 0xc1, 0x07 }, // PGAMPK9
+	{ 0xd0, 0x02 }, // NGAMVR0
+	{ 0xd1, 0x10 }, // NGAMVR0
+	{ 0xd2, 0x12 }, // NGAMVR1
+	{ 0xd3, 0x33 }, // NGAMVR2
+	{ 0xd4, 0x36 }, // NGAMVR3
+	{ 0xd5, 0x3c }, // NGAMVR4
+	{ 0xd6, 0x20 }, // NGAMPR0
+	{ 0xd7, 0x3e }, // NGAMPR1
+	{ 0xd8, 0x0d }, // NGAMPK0
+	{ 0xd9, 0x05 }, // NGAMPK1
+	{ 0xda, 0x12 }, // NGAMPK2
+	{ 0xdb, 0x11 }, // NGAMPK3
+	{ 0xdc, 0x14 }, // NGAMPK4
+	{ 0xdd, 0x14 }, // NGAMPK5
+	{ 0xde, 0x18 }, // NGAMPK6
+	{ 0xdf, 0x0f }, // NGAMPK7
+	{ 0xe0, 0x17 }, // NGAMPK8
+	{ 0xe1, 0x08 }, // NGAMPK9
+	// EXTC Command set enable, select page 3
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 },
+	// Mostly unknown registers
+	{ 0x07, 0x03 },
+	{ 0x08, 0x00 },
+	{ 0x09, 0x01 },
+	{ 0x30, 0x00 },
+	{ 0x31, 0x00 },
+	{ 0x32, 0x00 },
+	{ 0x33, 0x00 },
+	{ 0x34, 0x61 },
+	{ 0x35, 0xd4 },
+	{ 0x36, 0x24 },
+	{ 0x37, 0x03 },
+	{ 0x40, 0x02 },
+	{ 0x41, 0x03 },
+	{ 0x42, 0x04 },
+	{ 0x43, 0x05 },
+	{ 0x44, 0x11 },
+	{ 0x45, 0xe6 },
+	{ 0x46, 0xe7 },
+	{ 0x47, 0x11 },
+	{ 0x48, 0xe8 },
+	{ 0x49, 0xe9 },
+	{ 0x50, 0x06 },
+	{ 0x51, 0x07 },
+	{ 0x52, 0x08 },
+	{ 0x53, 0x09 },
+	{ 0x54, 0x11 },
+	{ 0x55, 0xea },
+	{ 0x56, 0xeb },
+	{ 0x57, 0x11 },
+	{ 0x58, 0xec },
+	{ 0x59, 0xed },
+	{ 0x82, 0x00 },
+	{ 0x83, 0x00 },
+	{ 0x84, 0x02 },
+	{ 0x85, 0x00 },
+	{ 0x86, 0x1f },
+	{ 0x87, 0x00 },
+	{ 0x88, 0x1f },
+	{ 0x89, 0x0e },
+	{ 0x8a, 0x0e },
+	{ 0x8b, 0x10 },
+	{ 0x8c, 0x10 },
+	{ 0x8d, 0x0a },
+	{ 0x8e, 0x0a },
+	{ 0x8f, 0x0c },
+	{ 0x90, 0x0c },
+	{ 0x98, 0x00 },
+	{ 0x99, 0x00 },
+	{ 0x9a, 0x01 },
+	{ 0x9b, 0x00 },
+	{ 0x9c, 0x1f },
+	{ 0x9d, 0x00 },
+	{ 0x9e, 0x1f },
+	{ 0x9f, 0x0d },
+	{ 0xa0, 0x0d },
+	{ 0xa1, 0x0f },
+	{ 0xa2, 0x0f },
+	{ 0xa3, 0x09 },
+	{ 0xa4, 0x09 },
+	{ 0xa5, 0x0b },
+	{ 0xa6, 0x0b },
+	// EXTC Command set enable, select page 0
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 },
+	// Interface Pixel Format
+	{ 0x3a, 0x77 },
+	// Display Access Control
+	{ 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0
+};
+
 static inline struct nv3052c *to_nv3052c(struct drm_panel *panel)
 {
 	return container_of(panel, struct nv3052c, panel);
@@ -881,6 +1030,21 @@ static const struct drm_display_mode wl_355608_a8_mode[] = {
 	},
 };
 
+static const struct drm_display_mode ylm_lbv0345001h_v2_mode[] = {
+	{
+		.clock = 24000,
+		.hdisplay = 640,
+		.hsync_start = 640 + 64,
+		.hsync_end = 640 + 64 + 20,
+		.htotal = 640 + 64 + 20 + 46,
+		.vdisplay = 480,
+		.vsync_start = 480 + 21,
+		.vsync_end = 480 + 21 + 4,
+		.vtotal = 480 + 21 + 4 + 15,
+		.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+	},
+};
+
 static const struct nv3052c_panel_info ltk035c5444t_panel_info = {
 	.display_modes = ltk035c5444t_modes,
 	.num_modes = ARRAY_SIZE(ltk035c5444t_modes),
@@ -914,10 +1078,22 @@ static const struct nv3052c_panel_info wl_355608_a8_panel_info = {
 	.panel_regs_len = ARRAY_SIZE(wl_355608_a8_panel_regs),
 };
 
+static const struct nv3052c_panel_info ylm_lbv0345001h_v2_panel_info = {
+	.display_modes = ylm_lbv0345001h_v2_mode,
+	.num_modes = ARRAY_SIZE(ylm_lbv0345001h_v2_mode),
+	.width_mm = 70,
+	.height_mm = 53,
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.panel_regs = ylm_lbv0345001h_v2_panel_regs,
+	.panel_regs_len = ARRAY_SIZE(ylm_lbv0345001h_v2_panel_regs),
+};
+
 static const struct spi_device_id nv3052c_ids[] = {
 	{ "ltk035c5444t", },
 	{ "fs035vg158", },
 	{ "wl-355608-a8", },
+	{ "ylm-lbv0345001h-v2", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(spi, nv3052c_ids);
@@ -926,6 +1102,7 @@ static const struct of_device_id nv3052c_of_match[] = {
 	{ .compatible = "leadtek,ltk035c5444t", .data = &ltk035c5444t_panel_info },
 	{ .compatible = "fascontek,fs035vg158", .data = &fs035vg158_panel_info },
 	{ .compatible = "anbernic,wl-355608-a8", .data = &wl_355608_a8_panel_info },
+	{ .compatible = "anbernic,ylm-lbv0345001h-v2", .data = &ylm_lbv0345001h_v2_panel_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, nv3052c_of_match);
-- 
2.47.0


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

* [PATCH 6/7] dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
                   ` (4 preceding siblings ...)
  2024-11-05  5:52 ` [PATCH 5/7] drm: panel: nv3052c: " Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  2024-11-05  5:52 ` [PATCH 7/7] drm: panel: nv3052c: " Hironori KIKUCHI
  6 siblings, 0 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

The YLM-LBV0400001X-V1 panel is a display panel used in the Anbernic
RG40XX series (H and V), a handheld gaming device from Anbernic. It is
4.00 inches in size (diagonally) with a resolution of 640x480.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 .../panel/anbernic,ylm-lbv0400001x-v1.yaml    | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml
new file mode 100644
index 00000000000..68e1a705469
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0400001x-v1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Anbernic RG40XX H/V (YLM-LBV0400001X-V1) 4.00" 640x480 24-bit IPS LCD panel
+
+maintainers:
+  - Hironori KIKUCHI <kikuchan98@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: anbernic,ylm-lbv0400001x-v1
+      - items:
+          - enum:
+              - anbernic,rg40xx-panel
+          - const: anbernic,ylm-lbv0400001x-v1
+
+  reg:
+    maxItems: 1
+
+  spi-3wire: true
+
+required:
+  - compatible
+  - reg
+  - port
+  - power-supply
+  - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "anbernic,ylm-lbv0400001x-v1";
+            reg = <0>;
+
+            spi-3wire;
+            spi-max-frequency = <3125000>;
+
+            reset-gpios = <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14
+
+            backlight = <&backlight>;
+            power-supply = <&reg_lcd>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&tcon_lcd0_out_lcd>;
+                };
+            };
+        };
+    };
-- 
2.47.0


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

* [PATCH 7/7] drm: panel: nv3052c: Add YLM-LBV0400001X-V1 panel
  2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
                   ` (5 preceding siblings ...)
  2024-11-05  5:52 ` [PATCH 6/7] dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel Hironori KIKUCHI
@ 2024-11-05  5:52 ` Hironori KIKUCHI
  6 siblings, 0 replies; 12+ messages in thread
From: Hironori KIKUCHI @ 2024-11-05  5:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hironori KIKUCHI, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

The YLM-LBV0400001X-V1 panel is a display panel used in the Anbernic
RG40XX series (H and V), a handheld gaming device from Anbernic. It is
4.00 inches in size (diagonally) with a resolution of 640x480.

It's similar to YLM-LBV0345001H-V2, but different in size and its
init-sequence. So add entry for the new panel.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
 .../gpu/drm/panel/panel-newvision-nv3052c.c   | 211 ++++++++++++++++++
 1 file changed, 211 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
index 57f6d5b1288..71f81d21465 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
@@ -778,6 +778,189 @@ static const struct nv3052c_reg ylm_lbv0345001h_v2_panel_regs[] = {
 	{ 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0
 };
 
+static const struct nv3052c_reg ylm_lbv0400001x_v1_panel_regs[] = {
+	// EXTC Command set enable, select page 1
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 },
+	// Mostly unknown registers
+	{ 0xe3, 0x00 },
+	{ 0x0a, 0x01 },
+	{ 0x23, 0xa0 },
+	{ 0x25, 0x14 },
+	{ 0x28, 0x47 },
+	{ 0x29, 0x01 },
+	{ 0x2a, 0xdf },
+	{ 0x38, 0x9c },
+	{ 0x39, 0xa7 },
+	{ 0x3a, 0x47 },
+	{ 0x91, 0x77 },
+	{ 0x92, 0x77 },
+	{ 0x99, 0x52 },
+	{ 0x9b, 0x5b },
+	{ 0xa0, 0x55 },
+	{ 0xa1, 0x50 },
+	{ 0xa4, 0x9c },
+	{ 0xa7, 0x02 },
+	{ 0xa8, 0x01 },
+	{ 0xa9, 0x01 },
+	{ 0xaa, 0xfc },
+	{ 0xab, 0x28 },
+	{ 0xac, 0x06 },
+	{ 0xad, 0x06 },
+	{ 0xae, 0x06 },
+	{ 0xaf, 0x03 },
+	{ 0xb0, 0x08 },
+	{ 0xb1, 0x26 },
+	{ 0xb2, 0x28 },
+	{ 0xb3, 0x28 },
+	{ 0xb4, 0x03 },
+	{ 0xb5, 0x08 },
+	{ 0xb6, 0x26 },
+	{ 0xb7, 0x08 },
+	{ 0xb8, 0x26 },
+	// EXTC Command set enable, select page 2
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 },
+	// Set gray scale voltage to adjust gamma
+	{ 0xb0, 0x05 }, // PGAMVR0
+	{ 0xb1, 0x12 }, // PGAMVR1
+	{ 0xb2, 0x13 }, // PGAMVR2
+	{ 0xb3, 0x2c }, // PGAMVR3
+	{ 0xb4, 0x2a }, // PGAMVR4
+	{ 0xb5, 0x37 }, // PGAMVR5
+	{ 0xb6, 0x27 }, // PGAMPR0
+	{ 0xb7, 0x42 }, // PGAMPR1
+	{ 0xb8, 0x0f }, // PGAMPK0
+	{ 0xb9, 0x06 }, // PGAMPK1
+	{ 0xba, 0x12 }, // PGAMPK2
+	{ 0xbb, 0x12 }, // PGAMPK3
+	{ 0xbc, 0x13 }, // PGAMPK4
+	{ 0xbd, 0x15 }, // PGAMPK5
+	{ 0xbe, 0x1b }, // PGAMPK6
+	{ 0xbf, 0x14 }, // PGAMPK7
+	{ 0xc0, 0x1d }, // PGAMPK8
+	{ 0xc1, 0x09 }, // PGAMPK9
+	{ 0xd0, 0x02 }, // NGAMVR0
+	{ 0xd1, 0x1c }, // NGAMVR0
+	{ 0xd2, 0x1d }, // NGAMVR1
+	{ 0xd3, 0x36 }, // NGAMVR2
+	{ 0xd4, 0x34 }, // NGAMVR3
+	{ 0xd5, 0x32 }, // NGAMVR4
+	{ 0xd6, 0x25 }, // NGAMPR0
+	{ 0xd7, 0x40 }, // NGAMPR1
+	{ 0xd8, 0x0d }, // NGAMPK0
+	{ 0xd9, 0x04 }, // NGAMPK1
+	{ 0xda, 0x12 }, // NGAMPK2
+	{ 0xdb, 0x12 }, // NGAMPK3
+	{ 0xdc, 0x13 }, // NGAMPK4
+	{ 0xdd, 0x15 }, // NGAMPK5
+	{ 0xde, 0x15 }, // NGAMPK6
+	{ 0xdf, 0x0c }, // NGAMPK7
+	{ 0xe0, 0x13 }, // NGAMPK8
+	{ 0xe1, 0x07 }, // NGAMPK9
+	// EXTC Command set enable, select page 3
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 },
+	// Mostly unknown registers
+	{ 0x08, 0x0a },
+	{ 0x09, 0x0b },
+	{ 0x30, 0x00 },
+	{ 0x31, 0x00 },
+	{ 0x32, 0x00 },
+	{ 0x33, 0x00 },
+	{ 0x34, 0x61 },
+	{ 0x35, 0xd4 },
+	{ 0x36, 0x24 },
+	{ 0x37, 0x03 },
+	{ 0x40, 0x0d },
+	{ 0x41, 0x0e },
+	{ 0x42, 0x0f },
+	{ 0x43, 0x10 },
+	{ 0x44, 0x11 },
+	{ 0x45, 0xf4 },
+	{ 0x46, 0xf5 },
+	{ 0x47, 0x11 },
+	{ 0x48, 0xf6 },
+	{ 0x49, 0xf7 },
+	{ 0x50, 0x11 },
+	{ 0x51, 0x12 },
+	{ 0x52, 0x13 },
+	{ 0x53, 0x14 },
+	{ 0x54, 0x11 },
+	{ 0x55, 0xf8 },
+	{ 0x56, 0xf9 },
+	{ 0x57, 0x11 },
+	{ 0x58, 0xfa },
+	{ 0x59, 0xfb },
+	{ 0x60, 0x05 },
+	{ 0x61, 0x05 },
+	{ 0x65, 0x0a },
+	{ 0x66, 0x0a },
+	{ 0x82, 0x1e },
+	{ 0x83, 0x1f },
+	{ 0x84, 0x11 },
+	{ 0x85, 0x02 },
+	{ 0x86, 0x1e },
+	{ 0x87, 0x1e },
+	{ 0x88, 0x1f },
+	{ 0x89, 0x0e },
+	{ 0x8a, 0x0e },
+	{ 0x8b, 0x10 },
+	{ 0x8c, 0x10 },
+	{ 0x8d, 0x0a },
+	{ 0x8e, 0x0a },
+	{ 0x8f, 0x0c },
+	{ 0x90, 0x0c },
+	{ 0x98, 0x1e },
+	{ 0x99, 0x1f },
+	{ 0x9a, 0x11 },
+	{ 0x9b, 0x01 },
+	{ 0x9c, 0x1e },
+	{ 0x9d, 0x1e },
+	{ 0x9e, 0x1f },
+	{ 0x9f, 0x0d },
+	{ 0xa0, 0x0d },
+	{ 0xa1, 0x0f },
+	{ 0xa2, 0x0f },
+	{ 0xa3, 0x09 },
+	{ 0xa4, 0x09 },
+	{ 0xa5, 0x0b },
+	{ 0xa6, 0x0b },
+	{ 0xb2, 0x1f },
+	{ 0xb3, 0x1e },
+	{ 0xb4, 0x11 },
+	{ 0xb5, 0x01 },
+	{ 0xb6, 0x1e },
+	{ 0xb7, 0x1e },
+	{ 0xb8, 0x1f },
+	{ 0xb9, 0x0b },
+	{ 0xba, 0x0b },
+	{ 0xbb, 0x09 },
+	{ 0xbc, 0x09 },
+	{ 0xbd, 0x0f },
+	{ 0xbe, 0x0f },
+	{ 0xbf, 0x0d },
+	{ 0xc0, 0x0d },
+	{ 0xc8, 0x1f },
+	{ 0xc9, 0x1e },
+	{ 0xca, 0x11 },
+	{ 0xcb, 0x02 },
+	{ 0xcc, 0x1e },
+	{ 0xcd, 0x1e },
+	{ 0xce, 0x1f },
+	{ 0xcf, 0x0c },
+	{ 0xd0, 0x0c },
+	{ 0xd1, 0x0a },
+	{ 0xd2, 0x0a },
+	{ 0xd3, 0x10 },
+	{ 0xd4, 0x10 },
+	{ 0xd5, 0x0e },
+	{ 0xd6, 0x0e },
+	// EXTC Command set enable, select page 0
+	{ 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 },
+	// Interface Pixel Format
+	{ 0x3a, 0x77 },
+	// Display Access Control
+	{ 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0
+};
+
 static inline struct nv3052c *to_nv3052c(struct drm_panel *panel)
 {
 	return container_of(panel, struct nv3052c, panel);
@@ -1045,6 +1228,21 @@ static const struct drm_display_mode ylm_lbv0345001h_v2_mode[] = {
 	},
 };
 
+static const struct drm_display_mode ylm_lbv0400001x_v1_mode[] = {
+	{
+		.clock = 24000,
+		.hdisplay = 640,
+		.hsync_start = 640 + 64,
+		.hsync_end = 640 + 64 + 20,
+		.htotal = 640 + 64 + 20 + 46,
+		.vdisplay = 480,
+		.vsync_start = 480 + 21,
+		.vsync_end = 480 + 21 + 4,
+		.vtotal = 480 + 21 + 4 + 15,
+		.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+	},
+};
+
 static const struct nv3052c_panel_info ltk035c5444t_panel_info = {
 	.display_modes = ltk035c5444t_modes,
 	.num_modes = ARRAY_SIZE(ltk035c5444t_modes),
@@ -1089,11 +1287,23 @@ static const struct nv3052c_panel_info ylm_lbv0345001h_v2_panel_info = {
 	.panel_regs_len = ARRAY_SIZE(ylm_lbv0345001h_v2_panel_regs),
 };
 
+static const struct nv3052c_panel_info ylm_lbv0400001x_v1_panel_info = {
+	.display_modes = ylm_lbv0400001x_v1_mode,
+	.num_modes = ARRAY_SIZE(ylm_lbv0400001x_v1_mode),
+	.width_mm = 81,
+	.height_mm = 61,
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.panel_regs = ylm_lbv0400001x_v1_panel_regs,
+	.panel_regs_len = ARRAY_SIZE(ylm_lbv0400001x_v1_panel_regs),
+};
+
 static const struct spi_device_id nv3052c_ids[] = {
 	{ "ltk035c5444t", },
 	{ "fs035vg158", },
 	{ "wl-355608-a8", },
 	{ "ylm-lbv0345001h-v2", },
+	{ "ylm-lbv0400001x-v1", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(spi, nv3052c_ids);
@@ -1103,6 +1313,7 @@ static const struct of_device_id nv3052c_of_match[] = {
 	{ .compatible = "fascontek,fs035vg158", .data = &fs035vg158_panel_info },
 	{ .compatible = "anbernic,wl-355608-a8", .data = &wl_355608_a8_panel_info },
 	{ .compatible = "anbernic,ylm-lbv0345001h-v2", .data = &ylm_lbv0345001h_v2_panel_info },
+	{ .compatible = "anbernic,ylm-lbv0400001x-v1", .data = &ylm_lbv0400001x_v1_panel_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, nv3052c_of_match);
-- 
2.47.0


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

* Re: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
  2024-11-05  5:52 ` [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8 Hironori KIKUCHI
@ 2024-11-05 14:19   ` Rob Herring
  2024-11-05 18:27     ` Conor Dooley
  0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2024-11-05 14:19 UTC (permalink / raw)
  To: Hironori KIKUCHI
  Cc: linux-kernel, Neil Armstrong, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

On Tue, Nov 05, 2024 at 02:52:29PM +0900, Hironori KIKUCHI wrote:
> A panel assembly is changed in the recent revision of Anbernic RG35XX
> Plus, so the `anbernic,rg35xx-plus-panel` identifier is neither suitable
> nor unique for the panel anymore.
> 
> Fortunately, the panel can be distinguished by a label printed on the
> FPC cable, so use the label "WL-355608-A8" as an identifier instead.
> 
> Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
> ---
>  ...rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>  rename Documentation/devicetree/bindings/display/panel/{anbernic,rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} (83%)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> similarity index 83%
> rename from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
> rename to Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> index 1d67492ebd3..5e8afbea690 100644
> --- a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>  %YAML 1.2
>  ---
> -$id: http://devicetree.org/schemas/display/panel/anbernic,rg35xx-plus-panel.yaml#
> +$id: http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
>  title: Anbernic RG35XX series (WL-355608-A8) 3.5" 640x480 24-bit IPS LCD panel
> @@ -16,13 +16,14 @@ allOf:
>  properties:
>    compatible:
>      oneOf:
> -      - const: anbernic,rg35xx-plus-panel
> +      - const: anbernic,wl-355608-a8
>        - items:
>            - enum:
>                - anbernic,rg35xx-2024-panel
>                - anbernic,rg35xx-h-panel
>                - anbernic,rg35xx-sp-panel
> -          - const: anbernic,rg35xx-plus-panel
> +              - anbernic,rg35xx-plus-panel
> +          - const: anbernic,wl-355608-a8
>  
>    reg:
>      maxItems: 1
> @@ -47,7 +48,7 @@ examples:
>          #size-cells = <0>;
>  
>          panel@0 {
> -            compatible = "anbernic,rg35xx-plus-panel";
> +            compatible = "anbernic,wl-355608-a8";

This is an ABI break. You can't just change compatibles.

The old panel should correspond to the existing compatible. Add a new 
compatible for the new panel. The names might not be ideal, but you are 
stuck with them.

There's exceptions if things are new and not yet in use, but you have to 
explain that in the commit msg.

Rob

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

* Re: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
  2024-11-05 14:19   ` Rob Herring
@ 2024-11-05 18:27     ` Conor Dooley
       [not found]       ` <CAG40kxGhaY_i9_zX_tM4MtCGwUUC2hwpJBAT7XF4Oe6STzA1hw@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2024-11-05 18:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: Hironori KIKUCHI, linux-kernel, Neil Armstrong, Jessica Zhang,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

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

On Tue, Nov 05, 2024 at 08:19:00AM -0600, Rob Herring wrote:
> On Tue, Nov 05, 2024 at 02:52:29PM +0900, Hironori KIKUCHI wrote:
> > A panel assembly is changed in the recent revision of Anbernic RG35XX
> > Plus, so the `anbernic,rg35xx-plus-panel` identifier is neither suitable
> > nor unique for the panel anymore.
> > 
> > Fortunately, the panel can be distinguished by a label printed on the
> > FPC cable, so use the label "WL-355608-A8" as an identifier instead.
> > 
> > Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
> > ---
> >  ...rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> >  rename Documentation/devicetree/bindings/display/panel/{anbernic,rg35xx-plus-panel.yaml => anbernic,wl-355608-a8.yaml} (83%)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> > similarity index 83%
> > rename from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
> > rename to Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> > index 1d67492ebd3..5e8afbea690 100644
> > --- a/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml
> > @@ -1,7 +1,7 @@
> >  # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >  %YAML 1.2
> >  ---
> > -$id: http://devicetree.org/schemas/display/panel/anbernic,rg35xx-plus-panel.yaml#
> > +$id: http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
> >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> >  
> >  title: Anbernic RG35XX series (WL-355608-A8) 3.5" 640x480 24-bit IPS LCD panel
> > @@ -16,13 +16,14 @@ allOf:
> >  properties:
> >    compatible:
> >      oneOf:
> > -      - const: anbernic,rg35xx-plus-panel
> > +      - const: anbernic,wl-355608-a8
> >        - items:
> >            - enum:
> >                - anbernic,rg35xx-2024-panel
> >                - anbernic,rg35xx-h-panel
> >                - anbernic,rg35xx-sp-panel
> > -          - const: anbernic,rg35xx-plus-panel
> > +              - anbernic,rg35xx-plus-panel
> > +          - const: anbernic,wl-355608-a8
> >  
> >    reg:
> >      maxItems: 1
> > @@ -47,7 +48,7 @@ examples:
> >          #size-cells = <0>;
> >  
> >          panel@0 {
> > -            compatible = "anbernic,rg35xx-plus-panel";
> > +            compatible = "anbernic,wl-355608-a8";
> 
> This is an ABI break. You can't just change compatibles.
> 
> The old panel should correspond to the existing compatible. Add a new 
> compatible for the new panel. The names might not be ideal, but you are 
> stuck with them.
> 
> There's exceptions if things are new and not yet in use, but you have to 
> explain that in the commit msg.

We already had one faff over renaming this panel a few months ago:
d682eef93ebf ("dt-bindings: display: panel: Rename WL-355608-A8 panel to rg35xx-*-panel")
I don't agree with renaming it again.

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

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

* Re: [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
  2024-11-05  5:52 ` [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel Hironori KIKUCHI
@ 2024-11-06  7:08   ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2024-11-06  7:08 UTC (permalink / raw)
  To: Hironori KIKUCHI, linux-kernel
  Cc: oe-kbuild-all, Hironori KIKUCHI, Neil Armstrong, Jessica Zhang,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

Hi Hironori,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20241104]
[also build test WARNING on v6.12-rc6]
[cannot apply to robh/for-next linus/master v6.12-rc6 v6.12-rc5 v6.12-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hironori-KIKUCHI/dt-bindings-display-panel-Rename-rg35xx-plus-panel-back-to-WL-355608-A8/20241105-135601
base:   next-20241104
patch link:    https://lore.kernel.org/r/20241105055239.1577275-5-kikuchan98%40gmail.com
patch subject: [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
config: csky-randconfig-051-20241106 (https://download.01.org/0day-ci/archive/20241106/202411061425.Qitk3g1Q-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
dtschema version: 2024.10.dev6+g12c3cd5
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241106/202411061425.Qitk3g1Q-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411061425.Qitk3g1Q-lkp@intel.com/

All warnings (new ones prefixed by >>):

   Documentation/devicetree/bindings/net/snps,dwmac.yaml: mac-mode: missing type definition
>> Warning: Duplicate compatible "anbernic,rg35xx-h-panel" found in schemas matching "$id":
   	http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
   	http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0345001h-v2.yaml#
>> Warning: Duplicate compatible "anbernic,rg35xx-sp-panel" found in schemas matching "$id":
   	http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
   	http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0345001h-v2.yaml#
>> Warning: Duplicate compatible "anbernic,rg35xx-plus-panel" found in schemas matching "$id":
   	http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
   	http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0345001h-v2.yaml#
>> Warning: Duplicate compatible "anbernic,rg35xx-2024-panel" found in schemas matching "$id":
   	http://devicetree.org/schemas/display/panel/anbernic,wl-355608-a8.yaml#
   	http://devicetree.org/schemas/display/panel/anbernic,ylm-lbv0345001h-v2.yaml#

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
       [not found]       ` <CAG40kxGhaY_i9_zX_tM4MtCGwUUC2hwpJBAT7XF4Oe6STzA1hw@mail.gmail.com>
@ 2024-11-06 14:29         ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2024-11-06 14:29 UTC (permalink / raw)
  To: Hironori KIKUCHI, Conor Dooley
  Cc: Rob Herring, linux-kernel, Jessica Zhang, David Airlie,
	Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Krzysztof Kozlowski, Conor Dooley,
	Ryan Walklin, dri-devel, devicetree

On 06/11/2024 05:56, Hironori KIKUCHI wrote:
> Ok, Thank you guys.
> 
> Could you help me how to name the new panel YLM-LBV0345001H-V2 for the recent RG35XX Plus please?
> - Use `anbernic,rg35xx-plus-panel-v2`
> - Use `anbernic,rg35xx-plus-panel-new`
> - Use `anbernic,ylm-lbv0345001h-v2`
> - Share `anbernic,rg35xx-plus-panel`

I guess you'll need to use the hw revision:
anbernic,rg35xx-plus-rev2-panel

Neil

> 
> For the last option, I need to use another GPIO to detecting a panel within a driver, but I it isn't robust (depends on the board and circuits).
> 
> Also, there is another panel YLM-LBV0400001X-V1 for RG40XX H/V:
> - `anbernic,rg40xx-panel`
> - `anbernic,ylm-lbv0400001x-v1`
> 
> Any suggestion?
> 
> Regards,
> kikuchan


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

end of thread, other threads:[~2024-11-06 14:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05  5:52 [PATCH 0/7] drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel) Hironori KIKUCHI
2024-11-05  5:52 ` [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8 Hironori KIKUCHI
2024-11-05 14:19   ` Rob Herring
2024-11-05 18:27     ` Conor Dooley
     [not found]       ` <CAG40kxGhaY_i9_zX_tM4MtCGwUUC2hwpJBAT7XF4Oe6STzA1hw@mail.gmail.com>
2024-11-06 14:29         ` Neil Armstrong
2024-11-05  5:52 ` [PATCH 2/7] drm: panel: nv3052c: " Hironori KIKUCHI
2024-11-05  5:52 ` [PATCH 3/7] drm: panel: nv3052c: Fix size of WL-355608-A8 Hironori KIKUCHI
2024-11-05  5:52 ` [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel Hironori KIKUCHI
2024-11-06  7:08   ` kernel test robot
2024-11-05  5:52 ` [PATCH 5/7] drm: panel: nv3052c: " Hironori KIKUCHI
2024-11-05  5:52 ` [PATCH 6/7] dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel Hironori KIKUCHI
2024-11-05  5:52 ` [PATCH 7/7] drm: panel: nv3052c: " Hironori KIKUCHI

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