Skip to contentSkip to conversation

dt-bindings: display: imx: Document fsl,pcr

PATCH Superseded Fabio Estevam 3 participants 3 messages Nov 3 – Nov 4

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 dt-bindings: display: imx: Document fsl,pcr

Some i.MX25 and i.MX27 devicetree display nodes contain fsl,pcr, but this property is not documented. As a result, dt-core.yaml reports its raw bytes as an invalid property:

imx27-phytec-phycard-s-rdk.dtb: display: fsl,pcr: b'\xf0\xc8\x80\x80' is not of type 'object', 'integer', 'array', 'boolean', 'null'

Document fsl,pcr.

---
With this change applied, imx_v4_v5_defconfig builds with zero dt-schema warnings.

 .../devicetree/bindings/display/imx/fsl,imx-lcdc.yaml       | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +6 -0
index 84610b5690c4..f1931436a4d8 100644
@@ -65,6 +65,12 @@ properties:
     description:
       LCDC Sharp Configuration Register value.
 
+  fsl,pcr:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      LCDC Panel Configuration Register value used in the display node
+      referenced by the display property.
+
 allOf:
   - if:
       properties:
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dt-bindings: display: imx: fsl,pcr documented on controller node --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: display: imx: fsl,pcr documented on controller node
--

commit 135b52931f21eeadf62c2f0174408c4c3faaf98d
Author: Fabio Estevam <[email protected]>

dt-bindings: display: imx: Document fsl,pcr

This commit documents the fsl,pcr property in fsl,imx-lcdc.yaml to address dt-core.yaml validation warnings on i.MX25 and i.MX27 device trees.

Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml properties: · line 72

Quoted 13 lines
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +5 -0
index 84610b5690c49..f1931436a4d81 100644
@@ -65,6 +65,12 @@ properties:
     description:
       LCDC Sharp Configuration Register value.
 
+  fsl,pcr:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      LCDC Panel Configuration Register value used in the display node
+      referenced by the display property.

[Severity: Low]
Should fsl,pcr be defined here under the top-level properties of fsl,imx-lcdc.yaml?

In drivers/video/fbdev/imxfb.c, controller properties such as fsl,lpccr, fsl,lscr1, and fsl,dmacr are read from the LCD controller node in imxfb_init_fbinfo(), whereas imxfb_probe() resolves the display phandle and passes that separate node to imxfb_of_read_mode():

drivers/video/fbdev/imxfb.c:imxfb_of_read_mode() {
	...
	ret = of_property_read_u32(np, "bits-per-pixel", &bpp);
	ret |= of_property_read_u32(np, "fsl,pcr", &pcr);
	...
}

As the description notes and as shown in the second example of fsl,imx-lcdc.yaml (display0), fsl,pcr is placed in the separate display node referenced by the display phandle rather than in the LCD controller node itself.

Defining fsl,pcr in the top-level properties of fsl,imx-lcdc.yaml silences the dt-core.yaml type warning globally, but it also permits fsl,pcr on the LCD controller node where the driver never reads it. In addition, the allOf conditional for fsl,imx1-lcdc and fsl,imx21-lcdc disables display, fsl,dmacr, fsl,lpccr, and fsl,lscr1, but does not set fsl,pcr: false.

Would it be more accurate to document the display node schema separately (or disallow fsl,pcr on the controller node itself)?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to Fabio Estevam
Quoted 22 lines · Fabio Estevam

Some i.MX25 and i.MX27 devicetree display nodes contain fsl,pcr, but this property is not documented. As a result, dt-core.yaml reports its raw bytes as an invalid property:

imx27-phytec-phycard-s-rdk.dtb: display: fsl,pcr: b'\xf0\xc8\x80\x80' is not of type 'object', 'integer', 'array', 'boolean', 'null'

Document fsl,pcr.

---
With this change applied, imx_v4_v5_defconfig builds with zero dt-schema warnings.

 .../devicetree/bindings/display/imx/fsl,imx-lcdc.yaml       | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +0 -0
index 84610b5690c4..f1931436a4d8 100644

Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml properties: · line 73

Quoted 9 lines
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +6 -0
@@ -65,6 +65,12 @@ properties:
     description:
       LCDC Sharp Configuration Register value.
 
+  fsl,pcr:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      LCDC Panel Configuration Register value used in the display node
+      referenced by the display property.
+

Can you restict only allow for imx25 and imx27?

Frank

Quoted 7 lines
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +0 -1
 allOf:
   - if:
       properties:
--

2.43.0