Skip to contentSkip to conversation

drm/panel: Add NewVision NV3051D Panels

PATCH Superseded Chris Morgan 4 participants 8 messages Sep 6, 2022 – Sep 12, 2022

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover drm/panel: Add NewVision NV3051D Panels

From: Chris Morgan <[email protected]>

Add the NewVision NV3051D panel as found on the Anbernic RG353P and RG353V. The underlying LCD panel itself is unknown (the NV3051D is the controller), so the device name is used for the panel.

Chris Morgan (2):
dt-bindings: display: panel: Add NewVision NV3051D panel bindings drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel

 .../display/panel/newvision,nv3051d.yaml      |  48 ++
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 .../gpu/drm/panel/panel-newvision-nv3051d.c   | 478 ++++++++++++++++++
 4 files changed, 536 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-newvision-nv3051d.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 dt-bindings: display: panel: Add NewVision NV3051D panel bindings

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +48 -0
new file mode 100644
index 000000000000..016168d8d7b2
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/newvision,nv3051d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NewVision NV3051D based DSI panel driver
+
+maintainers:
+  - Chris Morgan <[email protected]>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - anbernic,rg353p-panel
+      - anbernic,rg353v-panel
+  reg: true
+  backlight: true
+  port: true
+  reset-gpios: true
+  vdd-supply:
+    description: regulator that supplies the vdd voltage
+
+required:
+  - compatible
+  - reg
+  - backlight
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        panel@0 {
+            compatible = "anbernic,rg353p-panel";
+            reg = <0>;
+            backlight = <&backlight>;
+            vdd-supply = <&vcc3v3_lcd>;
+        };
+    };
+
+...
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel: Add NewVision NV3051D panel bindings

Quoted 18 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +0 -0
new file mode 100644
index 000000000000..016168d8d7b2

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 4

Quoted 4 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +4 -0
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/newvision,nv3051d.yaml#

You need to document vendor prefix... but the filename does not match compatible.

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 7

Quoted 3 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +3 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NewVision NV3051D based DSI panel driver

This is confusing - compatibles say something else.

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 19

Quoted 12 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +12 -0
+
+maintainers:
+  - Chris Morgan <[email protected]>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - anbernic,rg353p-panel
+      - anbernic,rg353v-panel

Missing space, missing documentation for vendor prefix.

Strip "panel" suffix unless device is multifunctional.

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 21

Quoted 2 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +2 -0
+  reg: true
+  backlight: true

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel: Add NewVision NV3051D panel bindings

Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Quoted 13 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 4

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +4 -0
new file mode 100644
index 000000000000..016168d8d7b2
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fdisplay%2Fpanel%2Fnewvision%2Cnv3051d.yaml%23&amp;data=05%7C01%7C%7C69d30de15aea41517acb08da90d0079f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637981520397977782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=qfuvbrQYP3rKnp%2ByPmPmn%2BCJJOQkNkTGT49FkJmIics%3D&amp;reserved=0

You need to document vendor prefix... but the filename does not match compatible.

Okay, will do that. This is a tricky one because while I know the panel controller IC (a NewVision NV3051D) I don't actually know the LCD panel itself, the vendor is somewhat tight lipped. I do know the product it goes into, so that's why I did what I did with the compatible strings. If that's not correct I guess let me know. I did see for other drivers (such as the NewVision NV3052C) the driver was written for the IC and the panel name was listed differently, hence what I was going for here.

Quoted 7 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 7

Quoted 4 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +3 -0
+$schema: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=05%7C01%7C%7C69d30de15aea41517acb08da90d0079f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637981520397977782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=AYwypW%2BA9xWCN6YYwC7oI5UDW6QmiP7%2FmAoKlm7x3jM%3D&amp;reserved=0
+
+title: NewVision NV3051D based DSI panel driver

This is confusing - compatibles say something else.

Right. Driver IC is the NV3051D, LCD panel itself is... well... not sure...

Quoted 15 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 19

Quoted 12 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +12 -0
+
+maintainers:
+  - Chris Morgan <[email protected]>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - anbernic,rg353p-panel
+      - anbernic,rg353v-panel

Missing space, missing documentation for vendor prefix.

Quoted 2 lines

Strip "panel" suffix unless device is multifunctional.

The device name itself is Anbernic RG353P (and RG353V). The driver is not multifunctional but again I don't really know what the LCD itself is called so I'm trying to name it after the device. I only know the driver IC.

Quoted 6 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 21

Quoted 2 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +2 -0
+  reg: true
+  backlight: true

Best regards,
Krzysztof

Thank you once again for all your help, sorry to be such a bother in this. I'm honestly not sure the best way to name and document a panel when I only know one of the part numbers (the IC).

#4 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel: Add NewVision NV3051D panel bindings

Quoted 28 lines · Chris Morgan
Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Quoted 13 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 4

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +4 -0
new file mode 100644
index 000000000000..016168d8d7b2
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fdisplay%2Fpanel%2Fnewvision%2Cnv3051d.yaml%23&amp;data=05%7C01%7C%7C69d30de15aea41517acb08da90d0079f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637981520397977782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=qfuvbrQYP3rKnp%2ByPmPmn%2BCJJOQkNkTGT49FkJmIics%3D&amp;reserved=0

You need to document vendor prefix... but the filename does not match compatible.

Quoted 8 lines

Okay, will do that. This is a tricky one because while I know the panel controller IC (a NewVision NV3051D) I don't actually know the LCD panel itself, the vendor is somewhat tight lipped. I do know the product it goes into, so that's why I did what I did with the compatible strings. If that's not correct I guess let me know. I did see for other drivers (such as the NewVision NV3052C) the driver was written for the IC and the panel name was listed differently, hence what I was going for here.

If by "driver" you mean by "Linux driver", then it does not really matter. You describe here the hardware. The example of NV3052C follows this approach - proper compatible and file name matching hardware. Here your file name does not match hardware.

Quoted 11 lines
Quoted 8 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 7

Quoted 5 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +3 -0
+$schema: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=05%7C01%7C%7C69d30de15aea41517acb08da90d0079f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637981520397977782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=AYwypW%2BA9xWCN6YYwC7oI5UDW6QmiP7%2FmAoKlm7x3jM%3D&amp;reserved=0
+
+title: NewVision NV3051D based DSI panel driver

This is confusing - compatibles say something else.

Right. Driver IC is the NV3051D, LCD panel itself is... well... not sure...

I guess similarly to ltk035c5444t this should be documentation of panel?

Quoted 16 lines
Quoted 16 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 19

Quoted 13 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +12 -0
+
+maintainers:
+  - Chris Morgan <[email protected]>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - anbernic,rg353p-panel
+      - anbernic,rg353v-panel

Missing space, missing documentation for vendor prefix.

Quoted 7 lines
Quoted 2 lines

Strip "panel" suffix unless device is multifunctional.

The device name itself is Anbernic RG353P (and RG353V). The driver is not multifunctional but again I don't really know what the LCD itself is called so I'm trying to name it after the device. I only know the driver IC.

So skip panel.

Best regards,
Krzysztof

maintainer
#5 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel: Add NewVision NV3051D panel bindings

In reply to Chris Morgan
Quoted 28 lines · Chris Morgan
Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Quoted 13 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 4

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +4 -0
new file mode 100644
index 000000000000..016168d8d7b2
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fdisplay%2Fpanel%2Fnewvision%2Cnv3051d.yaml%23&amp;data=05%7C01%7C%7C69d30de15aea41517acb08da90d0079f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637981520397977782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=qfuvbrQYP3rKnp%2ByPmPmn%2BCJJOQkNkTGT49FkJmIics%3D&amp;reserved=0

You need to document vendor prefix... but the filename does not match compatible.

Quoted 8 lines

Okay, will do that. This is a tricky one because while I know the panel controller IC (a NewVision NV3051D) I don't actually know the LCD panel itself, the vendor is somewhat tight lipped. I do know the product it goes into, so that's why I did what I did with the compatible strings. If that's not correct I guess let me know. I did see for other drivers (such as the NewVision NV3052C) the driver was written for the IC and the panel name was listed differently, hence what I was going for here.

I think most cases like this targeting a specific LCD driver IC, there's a driver IC compatible as a fallback.

(TBC, 'driver' here is not Linux driver, but the h/w chip.)

Rob

#6 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel: Add NewVision NV3051D panel bindings

Quoted 38 lines · Rob Herring
Quoted 28 lines · Chris Morgan
Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown.

---
 .../display/panel/newvision,nv3051d.yaml      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
Quoted 13 lines

Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml line 4

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml new file +4 -0
new file mode 100644
index 000000000000..016168d8d7b2
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fdisplay%2Fpanel%2Fnewvision%2Cnv3051d.yaml%23&amp;data=05%7C01%7C%7Cab7f68ce677846b1638508da920493a4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637982845610791935%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=6XxrzD1zkl8SYQqV9nkH1WzKfdcy6doNfzan8r228W0%3D&amp;reserved=0

You need to document vendor prefix... but the filename does not match compatible.

Quoted 8 lines

Okay, will do that. This is a tricky one because while I know the panel controller IC (a NewVision NV3051D) I don't actually know the LCD panel itself, the vendor is somewhat tight lipped. I do know the product it goes into, so that's why I did what I did with the compatible strings. If that's not correct I guess let me know. I did see for other drivers (such as the NewVision NV3052C) the driver was written for the IC and the panel name was listed differently, hence what I was going for here.

Quoted 6 lines

I think most cases like this targeting a specific LCD driver IC, there's a driver IC compatible as a fallback.

(TBC, 'driver' here is not Linux driver, but the h/w chip.)

Rob

So in this case would my compatible string in the devicetree need to be something like "anbernic,rg353-panel", "newvision,nv3051d" then? And the module itself have the compatible string of "newvision,nv3051d"?

My fear is that I write this as a newvision,nv3051d kernel module and then later on there comes a new panel using the nv3051d that wants to use this too. Again keeping things confusing I have no LCD panel part number from the manufacturer for this, and I cannot see anything on the panel itself denoting what LCD it is.

Thank you for your help. Just wrapping up getting some of my favorite devices supported in mainline. :-)

#7 lore raw

PATCH 2/2 drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel

In reply to Chris Morgan

From: Chris Morgan <[email protected]>

Support NewVision NV3051D panels as found on the Anbernic RG353P and RG353V. The underlying panel part number for the RG353x devices is unknown, so the device name is used instead.

---
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 .../gpu/drm/panel/panel-newvision-nv3051d.c   | 478 ++++++++++++++++++
 3 files changed, 488 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-newvision-nv3051d.c
drivers/gpu/drm/panel/Kconfig +9 -0
index a9043eacce97..7258d28dda2f 100644
@@ -296,6 +296,15 @@ config DRM_PANEL_NEC_NL8048HL11
 	  panel (found on the Zoom2/3/3630 SDP boards). To compile this driver
 	  as a module, choose M here.
 
+config DRM_PANEL_NEWVISION_NV3051D
+	tristate "NewVision NV3051D DSI panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  This driver supports the NV3051D based panel found on the Anbernic
+	  RG353P and RG353V.
+
 config DRM_PANEL_NEWVISION_NV3052C
 	tristate "NewVision NV3052C RGB/SPI panel"
 	depends on OF && SPI
drivers/gpu/drm/panel/Makefile +1 -0
index 34e717382dbb..cb03b3a82738 100644
@@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o
 obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o
 obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
 obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o
+obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o
 obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) += panel-newvision-nv3052c.o
 obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o
 obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o
drivers/gpu/drm/panel/panel-newvision-nv3051d.c new file +478 -0

478 lines not on this page · raw message

Signature · 1 line
2.25.1