[PATCH v2 11/52] dt-bindings: display: Move idk-2121wr to panel-lvds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Advantech IDK-2121WR Device Tree binding uses most of the panel-lvds
binding, aside from a requirement on the data-mapping and the
definition of the dual link binding.

The LVDS dual link binding applies to any panel with a dual-link setup,
and thus could be made generic, and we can move the data-mapping
requirement to a conditional.

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

Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
---
 .../display/panel/advantech,idk-2121wr.yaml   | 121 ------------------
 .../bindings/display/panel/lvds.yaml          |  88 ++++++++++++-
 2 files changed, 87 insertions(+), 122 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml
deleted file mode 100644
index 67682fe77f10..000000000000
--- a/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml
+++ /dev/null
@@ -1,121 +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-2121wr.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Advantech IDK-2121WR 21.5" Full-HD dual-LVDS panel
-
-maintainers:
-  - Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
-  - Thierry Reding <thierry.reding@xxxxxxxxx>
-
-description: |
-  The IDK-2121WR from Advantech is a Full-HD dual-LVDS panel.
-  A dual-LVDS interface is a dual-link connection with even pixels traveling
-  on one link, and with odd pixels traveling on the other link.
-
-  The panel expects odd pixels on the first port, and even pixels on the
-  second port, therefore the ports must be marked accordingly (with either
-  dual-lvds-odd-pixels or dual-lvds-even-pixels).
-
-properties:
-  compatible:
-    items:
-      - const: advantech,idk-2121wr
-      - {} # panel-lvds, but not listed here to avoid false select
-
-  width-mm:
-    const: 476
-
-  height-mm:
-    const: 268
-
-  data-mapping:
-    const: vesa-24
-
-  panel-timing: true
-
-  ports:
-    $ref: /schemas/graph.yaml#/properties/ports
-
-    properties:
-      port@0:
-        $ref: /schemas/graph.yaml#/$defs/port-base
-        unevaluatedProperties: false
-        description: The sink for odd pixels.
-        properties:
-          dual-lvds-odd-pixels: true
-
-        required:
-          - dual-lvds-odd-pixels
-
-      port@1:
-        $ref: /schemas/graph.yaml#/$defs/port-base
-        unevaluatedProperties: false
-        description: The sink for even pixels.
-        properties:
-          dual-lvds-even-pixels: true
-
-        required:
-          - dual-lvds-even-pixels
-
-    required:
-      - port@0
-      - port@1
-
-additionalProperties: false
-
-required:
-  - compatible
-  - width-mm
-  - height-mm
-  - data-mapping
-  - panel-timing
-  - ports
-
-examples:
-  - |+
-    panel-lvds {
-      compatible = "advantech,idk-2121wr", "panel-lvds";
-
-      width-mm = <476>;
-      height-mm = <268>;
-
-      data-mapping = "vesa-24";
-
-      panel-timing {
-        clock-frequency = <148500000>;
-        hactive = <1920>;
-        vactive = <1080>;
-        hsync-len = <44>;
-        hfront-porch = <88>;
-        hback-porch = <148>;
-        vfront-porch = <4>;
-        vback-porch = <36>;
-        vsync-len = <5>;
-      };
-
-      ports {
-        #address-cells = <1>;
-        #size-cells = <0>;
-
-        port@0 {
-          reg = <0>;
-          dual-lvds-odd-pixels;
-          panel_in0: endpoint {
-            remote-endpoint = <&lvds0_out>;
-          };
-        };
-
-        port@1 {
-          reg = <1>;
-          dual-lvds-even-pixels;
-          panel_in1: endpoint {
-            remote-endpoint = <&lvds1_out>;
-          };
-        };
-      };
-    };
-
-...
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
index e4e49e06f302..9b3b329e4e67 100644
--- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
+++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
@@ -39,11 +39,26 @@ allOf:
         data-mapping:
           const: jeida-24
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: advantech,idk-2121wr
+
+    then:
+      properties:
+        data-mapping:
+          const: vesa-24
+
+      required:
+        - ports
+
 properties:
   compatible:
     items:
       - enum:
           - advantech,idk-1110wr
+          - advantech,idk-2121wr
       - const: panel-lvds
 
   data-mapping:
@@ -105,7 +120,34 @@ properties:
       data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
 
   port: true
-  ports: true
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: The sink for odd pixels.
+        properties:
+          dual-lvds-odd-pixels: true
+
+        required:
+          - dual-lvds-odd-pixels
+
+      port@1:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: The sink for even pixels.
+        properties:
+          dual-lvds-even-pixels: true
+
+        required:
+          - dual-lvds-even-pixels
+
+    required:
+      - port@0
+      - port@1
 
 required:
   - compatible
@@ -122,4 +164,48 @@ oneOf:
 
 unevaluatedProperties: false
 
+examples:
+  - |+
+    panel-lvds {
+      compatible = "advantech,idk-2121wr", "panel-lvds";
+
+      width-mm = <476>;
+      height-mm = <268>;
+
+      data-mapping = "vesa-24";
+
+      panel-timing {
+        clock-frequency = <148500000>;
+        hactive = <1920>;
+        vactive = <1080>;
+        hsync-len = <44>;
+        hfront-porch = <88>;
+        hback-porch = <148>;
+        vfront-porch = <4>;
+        vback-porch = <36>;
+        vsync-len = <5>;
+      };
+
+      ports {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        port@0 {
+          reg = <0>;
+          dual-lvds-odd-pixels;
+          panel_in0: endpoint {
+            remote-endpoint = <&lvds0_out>;
+          };
+        };
+
+        port@1 {
+          reg = <1>;
+          dual-lvds-even-pixels;
+          panel_in1: endpoint {
+            remote-endpoint = <&lvds1_out>;
+          };
+        };
+      };
+    };
+
 ...
-- 
2.31.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux