drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel)
Subsystems (4)
cover drm/panel: nv3052c: Fix Anbernic RG35XX panel support (and add RG40XX panel)
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/[email protected]/
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.yamlSignature · 1 line
2.47.0
PATCH 1/7 dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
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.
---
...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%)Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml renamed from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml +5 -4
@@ -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;
Signature · 1 line
2.47.0
Rob Herring
maintainerRe: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
Quoted 47 lines · Hironori KIKUCHI
A panel assembly is changed in the recent revision of Anbernic RG35XX Plus, so the
anbernic,rg35xx-plus-panelidentifier 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 <[email protected]>--- ...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%)Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml renamed from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml +4
-3@@ -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
Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml examples: · line 51
Quoted 5 lines
Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml renamed from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml +1
-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
Re: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
Quoted 56 lines · Rob Herring
Quoted 47 lines · Hironori KIKUCHI
A panel assembly is changed in the recent revision of Anbernic RG35XX Plus, so the
anbernic,rg35xx-plus-panelidentifier 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 <[email protected]>--- ...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%)Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml renamed from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml +4
-3@@ -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: 1Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml examples: · line 51
Quoted 5 lines
Documentation/devicetree/bindings/display/panel/anbernic,wl-355608-a8.yaml renamed from Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-panel.yaml +1
-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.
Quoted 6 lines
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.
Re: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
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
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
Neil Armstrong
maintainerRe: [PATCH 1/7] dt-bindings: display: panel: Rename rg35xx-plus-panel back to WL-355608-A8
Quoted 7 lines · Hironori KIKUCHI
Ok, Thank you guys.
Could you help me how to name the new panel YLM-LBV0345001H-V2 for the recent RG35XX Plus please?
- Useanbernic,rg35xx-plus-panel-v2
- Useanbernic,rg35xx-plus-panel-new
- Useanbernic,ylm-lbv0345001h-v2
- Shareanbernic,rg35xx-plus-panel
I guess you'll need to use the hw revision:
anbernic,rg35xx-plus-rev2-panel
Neil
Quoted 11 lines
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-v1Any suggestion?
Regards,
kikuchan
PATCH 2/7 drm: panel: nv3052c: Rename rg35xx-plus-panel back to WL-355608-A8
In reply to Hironori KIKUCHIA 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.
--- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-newvision-nv3052c.c +2 -2
@@ -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 = <k035c5444t_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);
Signature · 1 line
2.47.0
PATCH 3/7 drm: panel: nv3052c: Fix size of WL-355608-A8
In reply to Hironori KIKUCHIIt is 3.45 inches in size (diagonally).
--- drivers/gpu/drm/panel/panel-newvision-nv3052c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-newvision-nv3052c.c +2 -2
@@ -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,
Signature · 1 line
2.47.0
PATCH 4/7 dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
In reply to Hironori KIKUCHIThe 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.
--- .../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
Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0345001h-v2.yaml new file +68 -0
@@ -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 <[email protected]> + +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 = <®_lcd>; + + port { + endpoint { + remote-endpoint = <&tcon_lcd0_out_lcd>; + }; + }; + }; + };
Signature · 1 line
2.47.0
kernel test robot
build botRe: [PATCH 4/7] dt-bindings: display: panel: Add YLM-LBV0345001H-V2 panel
kernel test robot noticed the following build warnings:
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/[email protected]/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/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
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#
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 5/7 drm: panel: nv3052c: Add YLM-LBV0345001H-V2 panel
In reply to Hironori KIKUCHIThe 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.
--- .../gpu/drm/panel/panel-newvision-nv3052c.c | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+)
drivers/gpu/drm/panel/panel-newvision-nv3052c.c +177 -0
@@ -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 = <k035c5444t_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);
Signature · 1 line
2.47.0
PATCH 6/7 dt-bindings: display: panel: Add YLM-LBV0400001X-V1 panel
In reply to Hironori KIKUCHIThe 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.
--- .../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
Documentation/devicetree/bindings/display/panel/anbernic,ylm-lbv0400001x-v1.yaml new file +65 -0
@@ -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 <[email protected]> + +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 = <®_lcd>; + + port { + endpoint { + remote-endpoint = <&tcon_lcd0_out_lcd>; + }; + }; + }; + };
Signature · 1 line
2.47.0
PATCH 7/7 drm: panel: nv3052c: Add YLM-LBV0400001X-V1 panel
In reply to Hironori KIKUCHIThe 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.
--- .../gpu/drm/panel/panel-newvision-nv3052c.c | 211 ++++++++++++++++++ 1 file changed, 211 insertions(+)
drivers/gpu/drm/panel/panel-newvision-nv3052c.c +211 -0
@@ -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);
Signature · 1 line
2.47.0