diff mbox series

[v2,10/52] dt-bindings: display: Move idk-1110wr to panel-lvds

Message ID 20210901091852.479202-11-maxime@cerno.tech (mailing list archive)
State New, archived
Headers show
Series ARM: dts: Last round of DT schema fixes | expand

Commit Message

Maxime Ripard Sept. 1, 2021, 9:18 a.m. UTC
The Advantech IDK-2121WR Device Tree binding doesn't really add any
useful content that is not already present in the panel-lvds binding
aside from a requirement on the data-mapping.

Let's move it to the generic panel-lvds binding

Cc: dri-devel@lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../display/panel/advantech,idk-1110wr.yaml   | 69 -------------------
 .../bindings/display/panel/lvds.yaml          | 22 ++++--
 2 files changed, 15 insertions(+), 76 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml

Comments

Rob Herring Sept. 3, 2021, 6:30 p.m. UTC | #1
On Wed, Sep 01, 2021 at 11:18:10AM +0200, Maxime Ripard wrote:
> The Advantech IDK-2121WR Device Tree binding doesn't really add any
> useful content that is not already present in the panel-lvds binding
> aside from a requirement on the data-mapping.
> 
> Let's move it to the generic panel-lvds binding

I'm concerned this change means we can only have LVDS panel schemas in 
lvds.yaml. Having another LVDS panel schema means 2 things. First, they 
can't have a 'panel-lvds' compatible. That's probably fine. Second, they 
will still need to define 'data-mapping' (unless implied) and will need 
to include it from somewhere. So we still need a common LVDS properties 
schema and panel schema(s).

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
deleted file mode 100644
index 93878c2cd370..000000000000
--- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
+++ /dev/null
@@ -1,69 +0,0 @@ 
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/display/panel/advantech,idk-1110wr.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Advantech IDK-1110WR 10.1" WSVGA LVDS Display Panel
-
-maintainers:
-  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
-  - Thierry Reding <thierry.reding@gmail.com>
-
-allOf:
-  - $ref: lvds.yaml#
-
-properties:
-  compatible:
-    items:
-      - const: advantech,idk-1110wr
-      - {} # panel-lvds, but not listed here to avoid false select
-
-  data-mapping:
-    const: jeida-24
-
-  width-mm:
-    const: 223
-
-  height-mm:
-    const: 125
-
-  panel-timing: true
-  port: true
-
-additionalProperties: false
-
-required:
-  - compatible
-
-examples:
-  - |+
-    panel {
-      compatible = "advantech,idk-1110wr", "panel-lvds";
-
-      width-mm = <223>;
-      height-mm = <125>;
-
-      data-mapping = "jeida-24";
-
-      panel-timing {
-        /* 1024x600 @60Hz */
-        clock-frequency = <51200000>;
-        hactive = <1024>;
-        vactive = <600>;
-        hsync-len = <240>;
-        hfront-porch = <40>;
-        hback-porch = <40>;
-        vsync-len = <10>;
-        vfront-porch = <15>;
-        vback-porch = <10>;
-      };
-
-      port {
-        panel_in: endpoint {
-          remote-endpoint = <&lvds_encoder>;
-        };
-      };
-    };
-
-...
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
index 49460c9dceea..e4e49e06f302 100644
--- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
+++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
@@ -28,15 +28,23 @@  description: |+
 
 allOf:
   - $ref: panel-common.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: advantech,idk-1110wr
+
+    then:
+      properties:
+        data-mapping:
+          const: jeida-24
 
 properties:
   compatible:
-    contains:
-      const: panel-lvds
-    description:
-      Shall contain "panel-lvds" in addition to a mandatory panel-specific
-      compatible string defined in individual panel bindings. The "panel-lvds"
-      value shall never be used on its own.
+    items:
+      - enum:
+          - advantech,idk-1110wr
+      - const: panel-lvds
 
   data-mapping:
     enum:
@@ -112,6 +120,6 @@  oneOf:
   - required:
       - ports
 
-additionalProperties: true
+unevaluatedProperties: false
 
 ...