Skip to contentSkip to conversation

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

PATCH In review Fabio Estevam 2 participants 2 messages Nov 10

Subsystems (5)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

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

Some i.MX25 and i.MX27 devicetree display nodes contain fsl,pcr, but the property has no schema type. 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 as a uint32. The property belongs to the display node referenced by the display phandle and is not valid on the LCD controller node.

---
Changes since v1:
- Explicitly forbid fsl,pcr on the controller through allOf, addressing the Sashiko review, while retaining its uint32 type for decoding the property in legacy display nodes.

 .../devicetree/bindings/display/imx/fsl,imx-lcdc.yaml  | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +10 -0
index 84610b5690c4..450f95098c99 100644
@@ -65,7 +65,17 @@ 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:
+  # Define the type above for decoding, but forbid it on the controller.
+  - properties:
+      fsl,pcr: false
+
   - if:
       properties:
         compatible:
maintainer
#1 lore raw
Quoted 31 lines · Fabio Estevam

Some i.MX25 and i.MX27 devicetree display nodes contain fsl,pcr, but the property has no schema type. 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 as a uint32. The property belongs to the display node referenced by the display phandle and is not valid on the LCD controller node.

---
Changes since v1:
- Explicitly forbid fsl,pcr on the controller through allOf, addressing the Sashiko review, while retaining its uint32 type for decoding the property in legacy display nodes.

 .../devicetree/bindings/display/imx/fsl,imx-lcdc.yaml  | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +0 -0
index 84610b5690c4..450f95098c99 100644
@@ -65,7 +65,17 @@ properties:
     description:
       LCDC Sharp Configuration Register value.
 

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

Quoted 10 lines
Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml +9 -0
+  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:
+  # Define the type above for decoding, but forbid it on the controller.
+  - properties:
+      fsl,pcr: false

That does fix the warning, but still leaves display nodes unvalidated. This needs to go in a new schema. Since there's no compatible on these nodes, we need something like this to apply the schema:

select:
required:
- fsl,pcr

Then the schema is this property, model, bits-per-pixel and a $ref to panel-common.yaml.

Rob