devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 0/2] Support Anbernic RG351V Panel
@ 2023-10-03 16:33 Chris Morgan
  2023-10-03 16:33 ` [PATCH V4 1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic 351V Chris Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Morgan @ 2023-10-03 16:33 UTC (permalink / raw)
  To: devicetree
  Cc: dri-devel, conor+dt, krzysztof.kozlowski+dt, robh+dt, daniel,
	airlied, sam, neil.armstrong, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Anbernic RG351V panel. This panel is mostly
identical to the one used in the 353 series, except it has a different
panel ID when queried (0x4000 for the 351V, 0x3052 for the 353 panel)
and will not work without the inclusion of the
MIPI_DSI_CLOCK_NON_CONTINUOUS flag.

Updates from V3:
 - Removed need for defined variable in probe function.

Updates from V2:
 - Modified the driver so that we only apply the
   MIPI_DSI_CLOCK_NON_CONTINUOUS flag when the compatible matches
   a panel (the 351v) that needs it.
 - Updated the binding documentation to be consistent with existing
   panels.

Updates from V1:
 - Revised text in devicetree documentation to remove references to
   specific hardware.


Chris Morgan (2):
  dt-bindings: display: newvision,nv3051d: Add Anbernic  351V
  drm/panel: nv3051d: Add Support for Anbernic 351V

 .../bindings/display/panel/newvision,nv3051d.yaml          | 5 ++---
 drivers/gpu/drm/panel/panel-newvision-nv3051d.c            | 7 +++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.34.1


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

* [PATCH V4 1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic  351V
  2023-10-03 16:33 [PATCH V4 0/2] Support Anbernic RG351V Panel Chris Morgan
@ 2023-10-03 16:33 ` Chris Morgan
  2023-10-03 16:33 ` [PATCH V4 2/2] drm/panel: nv3051d: Add Support for " Chris Morgan
  2023-10-05 15:53 ` [PATCH V4 0/2] Support Anbernic RG351V Panel Neil Armstrong
  2 siblings, 0 replies; 5+ messages in thread
From: Chris Morgan @ 2023-10-03 16:33 UTC (permalink / raw)
  To: devicetree
  Cc: dri-devel, conor+dt, krzysztof.kozlowski+dt, robh+dt, daniel,
	airlied, sam, neil.armstrong, Chris Morgan, Conor Dooley

From: Chris Morgan <macromorgan@hotmail.com>

Document the Anbernic RG351V panel, which is identical to the panel
used in their 353 series except for in inclusion of an additional DSI
format flag.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../devicetree/bindings/display/panel/newvision,nv3051d.yaml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
index 116c1b6030a2..cce775a87f87 100644
--- a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
+++ b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml
@@ -7,9 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: NewVision NV3051D based LCD panel
 
 description: |
-  The NewVision NV3051D is a driver chip used to drive DSI panels. For now,
-  this driver only supports the 640x480 panels found in the Anbernic RG353
-  based devices.
+  The NewVision NV3051D is a driver chip used to drive DSI panels.
 
 maintainers:
   - Chris Morgan <macromorgan@hotmail.com>
@@ -21,6 +19,7 @@ properties:
   compatible:
     items:
       - enum:
+          - anbernic,rg351v-panel
           - anbernic,rg353p-panel
           - anbernic,rg353v-panel
       - const: newvision,nv3051d
-- 
2.34.1


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

* [PATCH V4 2/2] drm/panel: nv3051d: Add Support for Anbernic 351V
  2023-10-03 16:33 [PATCH V4 0/2] Support Anbernic RG351V Panel Chris Morgan
  2023-10-03 16:33 ` [PATCH V4 1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic 351V Chris Morgan
@ 2023-10-03 16:33 ` Chris Morgan
  2023-10-03 20:45   ` Jessica Zhang
  2023-10-05 15:53 ` [PATCH V4 0/2] Support Anbernic RG351V Panel Neil Armstrong
  2 siblings, 1 reply; 5+ messages in thread
From: Chris Morgan @ 2023-10-03 16:33 UTC (permalink / raw)
  To: devicetree
  Cc: dri-devel, conor+dt, krzysztof.kozlowski+dt, robh+dt, daniel,
	airlied, sam, neil.armstrong, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Anbernic 351V. Just like the 353 series the
underlying vendor is unknown/unmarked (at least not visible in a
non-destructive manner). The panel had slightly different init
sequences and timings in the BSP kernel, but works fine with the
same ones used in the existing driver. The panel will not work without
the inclusion of the MIPI_DSI_CLOCK_NON_CONTINUOUS flag, and this flag
prevents the 353 series from working correctly, so a new compatible
string is added.

Tested colors and timings using modetest and all seem to work identical
to the 353 otherwise.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
index ad98dd9322b4..79de6c886292 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
@@ -388,6 +388,13 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi)
 	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
 			  MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
 
+	/*
+	 * The panel in the RG351V is identical to the 353P, except it
+	 * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly.
+	 */
+	if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel"))
+		dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
+
 	drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs,
 		       DRM_MODE_CONNECTOR_DSI);
 
-- 
2.34.1


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

* Re: [PATCH V4 2/2] drm/panel: nv3051d: Add Support for Anbernic 351V
  2023-10-03 16:33 ` [PATCH V4 2/2] drm/panel: nv3051d: Add Support for " Chris Morgan
@ 2023-10-03 20:45   ` Jessica Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Jessica Zhang @ 2023-10-03 20:45 UTC (permalink / raw)
  To: Chris Morgan
  Cc: neil.armstrong, conor+dt, krzysztof.kozlowski+dt, sam,
	Chris Morgan, dri-devel, robh+dt, devicetree



On 10/3/2023 9:33 AM, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Anbernic 351V. Just like the 353 series the
> underlying vendor is unknown/unmarked (at least not visible in a
> non-destructive manner). The panel had slightly different init
> sequences and timings in the BSP kernel, but works fine with the
> same ones used in the existing driver. The panel will not work without
> the inclusion of the MIPI_DSI_CLOCK_NON_CONTINUOUS flag, and this flag
> prevents the 353 series from working correctly, so a new compatible
> string is added.
> 
> Tested colors and timings using modetest and all seem to work identical
> to the 353 otherwise.

Hi Chris,

LGTM, thanks!

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>

BR,

Jessica Zhang

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>   drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
> index ad98dd9322b4..79de6c886292 100644
> --- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
> +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
> @@ -388,6 +388,13 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi)
>   	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
>   			  MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
>   
> +	/*
> +	 * The panel in the RG351V is identical to the 353P, except it
> +	 * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly.
> +	 */
> +	if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel"))
> +		dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
> +
>   	drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs,
>   		       DRM_MODE_CONNECTOR_DSI);
>   
> -- 
> 2.34.1
> 

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

* Re: [PATCH V4 0/2] Support Anbernic RG351V Panel
  2023-10-03 16:33 [PATCH V4 0/2] Support Anbernic RG351V Panel Chris Morgan
  2023-10-03 16:33 ` [PATCH V4 1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic 351V Chris Morgan
  2023-10-03 16:33 ` [PATCH V4 2/2] drm/panel: nv3051d: Add Support for " Chris Morgan
@ 2023-10-05 15:53 ` Neil Armstrong
  2 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2023-10-05 15:53 UTC (permalink / raw)
  To: devicetree, Chris Morgan
  Cc: dri-devel, conor+dt, krzysztof.kozlowski+dt, robh+dt, daniel,
	airlied, sam, Chris Morgan

Hi,

On Tue, 03 Oct 2023 11:33:53 -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Anbernic RG351V panel. This panel is mostly
> identical to the one used in the 353 series, except it has a different
> panel ID when queried (0x4000 for the 351V, 0x3052 for the 353 panel)
> and will not work without the inclusion of the
> MIPI_DSI_CLOCK_NON_CONTINUOUS flag.
> 
> [...]

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

[1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic 351V
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1b063368ee71f252c5a7f86e100b3b67271608ae
[2/2] drm/panel: nv3051d: Add Support for Anbernic 351V
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=eba90a7aa2258cae4caeaa8f748506c315c30bd1

-- 
Neil


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

end of thread, other threads:[~2023-10-05 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 16:33 [PATCH V4 0/2] Support Anbernic RG351V Panel Chris Morgan
2023-10-03 16:33 ` [PATCH V4 1/2] dt-bindings: display: newvision,nv3051d: Add Anbernic 351V Chris Morgan
2023-10-03 16:33 ` [PATCH V4 2/2] drm/panel: nv3051d: Add Support for " Chris Morgan
2023-10-03 20:45   ` Jessica Zhang
2023-10-05 15:53 ` [PATCH V4 0/2] Support Anbernic RG351V Panel Neil Armstrong

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