Support Anbernic RG351V Panel
Subsystems (4)
v4 cover Support Anbernic RG351V Panel
From: Chris Morgan <[email protected]>
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(-)
Signature · 1 line
2.34.1
PATCH v4 1/2 dt-bindings: display: newvision, nv3051d: Add Anbernic 351V
From: Chris Morgan <[email protected]>
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.
--- .../devicetree/bindings/display/panel/newvision,nv3051d.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml +2 -3
@@ -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 <[email protected]>
@@ -21,6 +19,7 @@ properties: compatible: items: - enum: + - anbernic,rg351v-panel - anbernic,rg353p-panel - anbernic,rg353v-panel - const: newvision,nv3051d
Signature · 1 line
2.34.1
PATCH v4 2/2 drm/panel: nv3051d: Add Support for Anbernic 351V
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
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.
--- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/panel/panel-newvision-nv3051d.c +7 -0
@@ -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 );
Signature · 1 line
2.34.1
Re: [PATCH V4 2/2] drm/panel: nv3051d: Add Support for Anbernic 351V
Quoted 11 lines · Chris Morgan
From: Chris Morgan <[email protected]>
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_CONTINUOUSflag, and this flag prevents the 353 series from working correctly, so a new compatible string is added.
Quoted 2 lines
Tested colors and timings using modetest and all seem to work identical to the 353 otherwise.
Hi Chris,
LGTM, thanks!
BR,
Jessica Zhang
Quoted 27 lines
Signed-off-by Chris Morgan <[email protected]>--- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/panel/panel-newvision-nv3051d.c +7
-0@@ -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 );Signature · 1 line
2.34.1
Hi,
Quoted 9 lines · Chris Morgan
From: Chris Morgan <[email protected]>
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 (
0x4000for the 351V,0x3052for the 353 panel) and will not work without the inclusion of theMIPI_DSI_CLOCK_NON_CONTINUOUSflag.[...]
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
Signature · 1 line
Neil