All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2021-11-16 14:35 ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-16 14:35 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, Maxime Ripard, dri-devel

The lvds.yaml file so far was both defining the generic LVDS properties
(such as data-mapping) that could be used for any LVDS sink, but also
the panel-lvds binding.

That last binding was to describe LVDS panels simple enough, and had a
number of other bindings using it as a base to specialise it further.

However, this situation makes it fairly hard to extend and reuse both
the generic parts, and the panel-lvds itself.

Let's remove the panel-lvds parts and leave only the generic LVDS
properties.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
 .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
 .../bindings/display/panel/lvds.yaml          | 29 +------------------
 .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
 .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
 .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
 6 files changed, 85 insertions(+), 33 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
index 93878c2cd370..f27cd2038636 100644
--- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
+++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: advantech,idk-1110wr
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: advantech,idk-1110wr
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-24
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
index a69681e724cb..6e06eecac14e 100644
--- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
+++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
@@ -11,15 +11,26 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: innolux,ee101ia-01d
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: innolux,ee101ia-01d
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   backlight: true
+  data-mapping: true
   enable-gpios: true
   power-supply: true
   width-mm: true
@@ -27,5 +38,13 @@ properties:
   panel-timing: true
   port: true
 
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
 additionalProperties: false
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
index 49460c9dceea..5281a75c8bb5 100644
--- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
+++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: LVDS Display Panel
+title: LVDS Display Common Properties
 
 maintainers:
   - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
@@ -26,18 +26,7 @@ description: |+
   Device compatible with those specifications have been marketed under the
   FPD-Link and FlatLink brands.
 
-allOf:
-  - $ref: panel-common.yaml#
-
 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.
-
   data-mapping:
     enum:
       - jeida-18
@@ -96,22 +85,6 @@ properties:
       If set, reverse the bit order described in the data mappings below on all
       data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
 
-  port: true
-  ports: true
-
-required:
-  - compatible
-  - data-mapping
-  - width-mm
-  - height-mm
-  - panel-timing
-
-oneOf:
-  - required:
-      - port
-  - required:
-      - ports
-
 additionalProperties: true
 
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
index b5e7ee230fa6..e684b9771532 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa104xd12
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: mitsubishi,aa104xd12
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
index 977c50a85b67..c0df6ee89c7a 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa121td01
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: mitsubishi,aa121td01
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
index e63a570ae59d..8bb85701e507 100644
--- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
+++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: sgd,gktw70sdae4se
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: sgd,gktw70sdae4se
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-18
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - port
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
 
 examples:
   - |+
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2021-11-16 14:35 ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-16 14:35 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, dri-devel, Maxime Ripard

The lvds.yaml file so far was both defining the generic LVDS properties
(such as data-mapping) that could be used for any LVDS sink, but also
the panel-lvds binding.

That last binding was to describe LVDS panels simple enough, and had a
number of other bindings using it as a base to specialise it further.

However, this situation makes it fairly hard to extend and reuse both
the generic parts, and the panel-lvds itself.

Let's remove the panel-lvds parts and leave only the generic LVDS
properties.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
 .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
 .../bindings/display/panel/lvds.yaml          | 29 +------------------
 .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
 .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
 .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
 6 files changed, 85 insertions(+), 33 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
index 93878c2cd370..f27cd2038636 100644
--- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
+++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: advantech,idk-1110wr
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: advantech,idk-1110wr
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-24
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
index a69681e724cb..6e06eecac14e 100644
--- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
+++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
@@ -11,15 +11,26 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: innolux,ee101ia-01d
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: innolux,ee101ia-01d
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   backlight: true
+  data-mapping: true
   enable-gpios: true
   power-supply: true
   width-mm: true
@@ -27,5 +38,13 @@ properties:
   panel-timing: true
   port: true
 
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
 additionalProperties: false
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
index 49460c9dceea..5281a75c8bb5 100644
--- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
+++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: LVDS Display Panel
+title: LVDS Display Common Properties
 
 maintainers:
   - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
@@ -26,18 +26,7 @@ description: |+
   Device compatible with those specifications have been marketed under the
   FPD-Link and FlatLink brands.
 
-allOf:
-  - $ref: panel-common.yaml#
-
 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.
-
   data-mapping:
     enum:
       - jeida-18
@@ -96,22 +85,6 @@ properties:
       If set, reverse the bit order described in the data mappings below on all
       data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
 
-  port: true
-  ports: true
-
-required:
-  - compatible
-  - data-mapping
-  - width-mm
-  - height-mm
-  - panel-timing
-
-oneOf:
-  - required:
-      - port
-  - required:
-      - ports
-
 additionalProperties: true
 
 ...
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
index b5e7ee230fa6..e684b9771532 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa104xd12
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: mitsubishi,aa104xd12
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
index 977c50a85b67..c0df6ee89c7a 100644
--- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: mitsubishi,aa121td01
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: mitsubishi,aa121td01
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   vcc-supply:
     description: Reference to the regulator powering the panel VCC pins.
@@ -39,6 +49,11 @@ additionalProperties: false
 required:
   - compatible
   - vcc-supply
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
 
 examples:
   - |+
diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
index e63a570ae59d..8bb85701e507 100644
--- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
+++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
@@ -11,13 +11,23 @@ maintainers:
   - Thierry Reding <thierry.reding@gmail.com>
 
 allOf:
+  - $ref: panel-common.yaml#
   - $ref: lvds.yaml#
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: sgd,gktw70sdae4se
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
       - const: sgd,gktw70sdae4se
-      - {} # panel-lvds, but not listed here to avoid false select
+      - const: panel-lvds
 
   data-mapping:
     const: jeida-18
@@ -35,6 +45,11 @@ additionalProperties: false
 
 required:
   - compatible
+  - port
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
 
 examples:
   - |+
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2021-11-16 14:35 ` Maxime Ripard
@ 2021-11-16 14:35   ` Maxime Ripard
  -1 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-16 14:35 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, Maxime Ripard, dri-devel

Following the previous patch, let's introduce a generic panel-lvds
binding that documents the panels that don't have any particular
constraint documented.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
new file mode 100644
index 000000000000..f6ce8e29391e
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic LVDS Display Panel Device Tree Bindings
+
+maintainers:
+  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+  - Thierry Reding <thierry.reding@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+  - $ref: lvds.yaml#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: panel-lvds
+
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+              - advantech,idk-1110wr
+              - innolux,ee101ia-01d
+              - mitsubishi,aa104xd12
+              - mitsubishi,aa121td01
+              - sgd,gktw70sdae4se
+
+  required:
+    - compatible
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - auo,b101ew05
+          - tbs,a711-panel
+
+      - const: panel-lvds
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
+...
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
@ 2021-11-16 14:35   ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-16 14:35 UTC (permalink / raw)
  To: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Rob Herring, Frank Rowand
  Cc: devicetree, dri-devel, Maxime Ripard

Following the previous patch, let's introduce a generic panel-lvds
binding that documents the panels that don't have any particular
constraint documented.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
new file mode 100644
index 000000000000..f6ce8e29391e
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic LVDS Display Panel Device Tree Bindings
+
+maintainers:
+  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+  - Thierry Reding <thierry.reding@gmail.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+  - $ref: lvds.yaml#
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: panel-lvds
+
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+              - advantech,idk-1110wr
+              - innolux,ee101ia-01d
+              - mitsubishi,aa104xd12
+              - mitsubishi,aa121td01
+              - sgd,gktw70sdae4se
+
+  required:
+    - compatible
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - auo,b101ew05
+          - tbs,a711-panel
+
+      - const: panel-lvds
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - data-mapping
+  - width-mm
+  - height-mm
+  - panel-timing
+  - port
+
+...
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2021-11-16 14:35   ` Maxime Ripard
@ 2021-11-17  2:27     ` Rob Herring
  -1 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-17  2:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Daniel Vetter, devicetree, dri-devel,
	Thierry Reding, David Airlie, Laurent Pinchart, Frank Rowand,
	Sam Ravnborg

On Tue, 16 Nov 2021 15:35:03 +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/display/panel/panel-lvds.yaml:28:15: [warning] wrong indentation: expected 12 but found 14 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.example.dt.yaml: panel-lvds: compatible:0: 'advantech,idk-2121wr' is not one of ['auo,b101ew05', 'tbs,a711-panel']
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1555849

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
@ 2021-11-17  2:27     ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-17  2:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, Sam Ravnborg, dri-devel, Rob Herring,
	Thierry Reding, Laurent Pinchart, Daniel Vetter, Frank Rowand

On Tue, 16 Nov 2021 15:35:03 +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/display/panel/panel-lvds.yaml:28:15: [warning] wrong indentation: expected 12 but found 14 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.example.dt.yaml: panel-lvds: compatible:0: 'advantech,idk-2121wr' is not one of ['auo,b101ew05', 'tbs,a711-panel']
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.example.dt.yaml: panel-lvds: 'port' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1555849

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
  2021-11-16 14:35 ` Maxime Ripard
@ 2021-11-18 22:49   ` Rob Herring
  -1 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-18 22:49 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Frank Rowand, devicetree, dri-devel

On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> The lvds.yaml file so far was both defining the generic LVDS properties
> (such as data-mapping) that could be used for any LVDS sink, but also
> the panel-lvds binding.
> 
> That last binding was to describe LVDS panels simple enough, and had a
> number of other bindings using it as a base to specialise it further.
> 
> However, this situation makes it fairly hard to extend and reuse both
> the generic parts, and the panel-lvds itself.
> 
> Let's remove the panel-lvds parts and leave only the generic LVDS
> properties.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
>  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
>  .../bindings/display/panel/lvds.yaml          | 29 +------------------
>  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
>  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
>  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
>  6 files changed, 85 insertions(+), 33 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> index 93878c2cd370..f27cd2038636 100644
> --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: advantech,idk-1110wr
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: advantech,idk-1110wr
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-24
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> index a69681e724cb..6e06eecac14e 100644
> --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> @@ -11,15 +11,26 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: innolux,ee101ia-01d
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: innolux,ee101ia-01d
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    backlight: true
> +  data-mapping: true
>    enable-gpios: true
>    power-supply: true
>    width-mm: true
> @@ -27,5 +38,13 @@ properties:
>    panel-timing: true
>    port: true
>  
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
>  additionalProperties: false
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> index 49460c9dceea..5281a75c8bb5 100644
> --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> @@ -4,7 +4,7 @@
>  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: LVDS Display Panel
> +title: LVDS Display Common Properties
>  
>  maintainers:
>    - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> @@ -26,18 +26,7 @@ description: |+
>    Device compatible with those specifications have been marketed under the
>    FPD-Link and FlatLink brands.
>  
> -allOf:
> -  - $ref: panel-common.yaml#
> -

I think you can leave this instead of adding everywhere you include 
lvds.yaml. Either way,

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2021-11-18 22:49   ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-18 22:49 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, Frank Rowand, dri-devel,
	Thierry Reding, Laurent Pinchart, Daniel Vetter, Sam Ravnborg

On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> The lvds.yaml file so far was both defining the generic LVDS properties
> (such as data-mapping) that could be used for any LVDS sink, but also
> the panel-lvds binding.
> 
> That last binding was to describe LVDS panels simple enough, and had a
> number of other bindings using it as a base to specialise it further.
> 
> However, this situation makes it fairly hard to extend and reuse both
> the generic parts, and the panel-lvds itself.
> 
> Let's remove the panel-lvds parts and leave only the generic LVDS
> properties.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
>  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
>  .../bindings/display/panel/lvds.yaml          | 29 +------------------
>  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
>  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
>  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
>  6 files changed, 85 insertions(+), 33 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> index 93878c2cd370..f27cd2038636 100644
> --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: advantech,idk-1110wr
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: advantech,idk-1110wr
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-24
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> index a69681e724cb..6e06eecac14e 100644
> --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> @@ -11,15 +11,26 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: innolux,ee101ia-01d
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: innolux,ee101ia-01d
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    backlight: true
> +  data-mapping: true
>    enable-gpios: true
>    power-supply: true
>    width-mm: true
> @@ -27,5 +38,13 @@ properties:
>    panel-timing: true
>    port: true
>  
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
>  additionalProperties: false
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> index 49460c9dceea..5281a75c8bb5 100644
> --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> @@ -4,7 +4,7 @@
>  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: LVDS Display Panel
> +title: LVDS Display Common Properties
>  
>  maintainers:
>    - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> @@ -26,18 +26,7 @@ description: |+
>    Device compatible with those specifications have been marketed under the
>    FPD-Link and FlatLink brands.
>  
> -allOf:
> -  - $ref: panel-common.yaml#
> -

I think you can leave this instead of adding everywhere you include 
lvds.yaml. Either way,

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2021-11-16 14:35   ` Maxime Ripard
@ 2021-11-18 22:56     ` Rob Herring
  -1 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-18 22:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Laurent Pinchart, Thierry Reding, Sam Ravnborg, Daniel Vetter,
	David Airlie, Frank Rowand, devicetree, dri-devel

On Tue, Nov 16, 2021 at 03:35:03PM +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
@ 2021-11-18 22:56     ` Rob Herring
  0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2021-11-18 22:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, Frank Rowand, dri-devel,
	Thierry Reding, Laurent Pinchart, Daniel Vetter, Sam Ravnborg

On Tue, Nov 16, 2021 at 03:35:03PM +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
  2021-11-16 14:35 ` Maxime Ripard
@ 2021-11-19 22:46   ` Laurent Pinchart
  -1 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2021-11-19 22:46 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel

Hi Maxime,

Thank you for the patch.

On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> The lvds.yaml file so far was both defining the generic LVDS properties
> (such as data-mapping) that could be used for any LVDS sink, but also
> the panel-lvds binding.
> 
> That last binding was to describe LVDS panels simple enough, and had a
> number of other bindings using it as a base to specialise it further.
> 
> However, this situation makes it fairly hard to extend and reuse both
> the generic parts, and the panel-lvds itself.
> 
> Let's remove the panel-lvds parts and leave only the generic LVDS
> properties.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
>  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
>  .../bindings/display/panel/lvds.yaml          | 29 +------------------
>  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
>  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
>  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
>  6 files changed, 85 insertions(+), 33 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> index 93878c2cd370..f27cd2038636 100644
> --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: advantech,idk-1110wr
> +
> +  required:
> +    - compatible

I've never encountered this before, what does it do ?

> +
>  properties:
>    compatible:
>      items:
>        - const: advantech,idk-1110wr
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-24
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> index a69681e724cb..6e06eecac14e 100644
> --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> @@ -11,15 +11,26 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: innolux,ee101ia-01d
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: innolux,ee101ia-01d
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    backlight: true
> +  data-mapping: true
>    enable-gpios: true
>    power-supply: true
>    width-mm: true
> @@ -27,5 +38,13 @@ properties:
>    panel-timing: true
>    port: true
>  
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
>  additionalProperties: false
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> index 49460c9dceea..5281a75c8bb5 100644
> --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> @@ -4,7 +4,7 @@
>  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: LVDS Display Panel
> +title: LVDS Display Common Properties

Maybe

title: LVDS Display Panel Common Properties

or do you foresee this being useful for non-panel LBDS sinks too ? In
that case the title is fine, but the file could be moved in the parent
directory.

I'm also wondering what we should do with the data-mapping and
data-mirror properties. For an LVDS panel they're fine at the device
level, but for an LVDS sink, they may be better placed at the port or
endpoint level.

>  
>  maintainers:
>    - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> @@ -26,18 +26,7 @@ description: |+
>    Device compatible with those specifications have been marketed under the
>    FPD-Link and FlatLink brands.
>  
> -allOf:
> -  - $ref: panel-common.yaml#
> -
>  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.
> -
>    data-mapping:
>      enum:
>        - jeida-18
> @@ -96,22 +85,6 @@ properties:
>        If set, reverse the bit order described in the data mappings below on all
>        data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
>  
> -  port: true
> -  ports: true
> -
> -required:
> -  - compatible
> -  - data-mapping
> -  - width-mm
> -  - height-mm
> -  - panel-timing
> -
> -oneOf:
> -  - required:
> -      - port
> -  - required:
> -      - ports
> -
>  additionalProperties: true
>  
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> index b5e7ee230fa6..e684b9771532 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa104xd12
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa104xd12
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> index 977c50a85b67..c0df6ee89c7a 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa121td01
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa121td01
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> index e63a570ae59d..8bb85701e507 100644
> --- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: sgd,gktw70sdae4se
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: sgd,gktw70sdae4se
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-18
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - port
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
>  
>  examples:
>    - |+

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2021-11-19 22:46   ` Laurent Pinchart
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2021-11-19 22:46 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, Frank Rowand, Rob Herring,
	Thierry Reding, dri-devel, Daniel Vetter, Sam Ravnborg

Hi Maxime,

Thank you for the patch.

On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> The lvds.yaml file so far was both defining the generic LVDS properties
> (such as data-mapping) that could be used for any LVDS sink, but also
> the panel-lvds binding.
> 
> That last binding was to describe LVDS panels simple enough, and had a
> number of other bindings using it as a base to specialise it further.
> 
> However, this situation makes it fairly hard to extend and reuse both
> the generic parts, and the panel-lvds itself.
> 
> Let's remove the panel-lvds parts and leave only the generic LVDS
> properties.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
>  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
>  .../bindings/display/panel/lvds.yaml          | 29 +------------------
>  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
>  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
>  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
>  6 files changed, 85 insertions(+), 33 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> index 93878c2cd370..f27cd2038636 100644
> --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: advantech,idk-1110wr
> +
> +  required:
> +    - compatible

I've never encountered this before, what does it do ?

> +
>  properties:
>    compatible:
>      items:
>        - const: advantech,idk-1110wr
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-24
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> index a69681e724cb..6e06eecac14e 100644
> --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> @@ -11,15 +11,26 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: innolux,ee101ia-01d
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: innolux,ee101ia-01d
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    backlight: true
> +  data-mapping: true
>    enable-gpios: true
>    power-supply: true
>    width-mm: true
> @@ -27,5 +38,13 @@ properties:
>    panel-timing: true
>    port: true
>  
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
>  additionalProperties: false
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> index 49460c9dceea..5281a75c8bb5 100644
> --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> @@ -4,7 +4,7 @@
>  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: LVDS Display Panel
> +title: LVDS Display Common Properties

Maybe

title: LVDS Display Panel Common Properties

or do you foresee this being useful for non-panel LBDS sinks too ? In
that case the title is fine, but the file could be moved in the parent
directory.

I'm also wondering what we should do with the data-mapping and
data-mirror properties. For an LVDS panel they're fine at the device
level, but for an LVDS sink, they may be better placed at the port or
endpoint level.

>  
>  maintainers:
>    - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> @@ -26,18 +26,7 @@ description: |+
>    Device compatible with those specifications have been marketed under the
>    FPD-Link and FlatLink brands.
>  
> -allOf:
> -  - $ref: panel-common.yaml#
> -
>  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.
> -
>    data-mapping:
>      enum:
>        - jeida-18
> @@ -96,22 +85,6 @@ properties:
>        If set, reverse the bit order described in the data mappings below on all
>        data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
>  
> -  port: true
> -  ports: true
> -
> -required:
> -  - compatible
> -  - data-mapping
> -  - width-mm
> -  - height-mm
> -  - panel-timing
> -
> -oneOf:
> -  - required:
> -      - port
> -  - required:
> -      - ports
> -
>  additionalProperties: true
>  
>  ...
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> index b5e7ee230fa6..e684b9771532 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa104xd12
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa104xd12
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> index 977c50a85b67..c0df6ee89c7a 100644
> --- a/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: mitsubishi,aa121td01
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: mitsubishi,aa121td01
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    vcc-supply:
>      description: Reference to the regulator powering the panel VCC pins.
> @@ -39,6 +49,11 @@ additionalProperties: false
>  required:
>    - compatible
>    - vcc-supply
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
>  
>  examples:
>    - |+
> diff --git a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> index e63a570ae59d..8bb85701e507 100644
> --- a/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
> @@ -11,13 +11,23 @@ maintainers:
>    - Thierry Reding <thierry.reding@gmail.com>
>  
>  allOf:
> +  - $ref: panel-common.yaml#
>    - $ref: lvds.yaml#
>  
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: sgd,gktw70sdae4se
> +
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
>      items:
>        - const: sgd,gktw70sdae4se
> -      - {} # panel-lvds, but not listed here to avoid false select
> +      - const: panel-lvds
>  
>    data-mapping:
>      const: jeida-18
> @@ -35,6 +45,11 @@ additionalProperties: false
>  
>  required:
>    - compatible
> +  - port
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
>  
>  examples:
>    - |+

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
  2021-11-16 14:35   ` Maxime Ripard
@ 2021-11-19 22:48     ` Laurent Pinchart
  -1 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2021-11-19 22:48 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel

Hi Maxime,

Thank you for the patch.

On Tue, Nov 16, 2021 at 03:35:03PM +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> new file mode 100644
> index 000000000000..f6ce8e29391e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic LVDS Display Panel Device Tree Bindings
> +
> +maintainers:
> +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +  - Thierry Reding <thierry.reding@gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +  - $ref: lvds.yaml#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: panel-lvds
> +
> +  not:
> +    properties:
> +      compatible:
> +        contains:
> +          enum:
> +              - advantech,idk-1110wr
> +              - innolux,ee101ia-01d
> +              - mitsubishi,aa104xd12
> +              - mitsubishi,aa121td01
> +              - sgd,gktw70sdae4se

This will be annoying to maintain, I'm pretty sure authors will forget
to update this file when adding bindings for other panels. Is there any
way we could select this binding with a positive rule instead of a
negative rule ?

> +
> +  required:
> +    - compatible
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - auo,b101ew05
> +          - tbs,a711-panel
> +
> +      - const: panel-lvds
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
> +...

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding
@ 2021-11-19 22:48     ` Laurent Pinchart
  0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2021-11-19 22:48 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, David Airlie, Frank Rowand, Rob Herring,
	Thierry Reding, dri-devel, Daniel Vetter, Sam Ravnborg

Hi Maxime,

Thank you for the patch.

On Tue, Nov 16, 2021 at 03:35:03PM +0100, Maxime Ripard wrote:
> Following the previous patch, let's introduce a generic panel-lvds
> binding that documents the panels that don't have any particular
> constraint documented.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/panel/panel-lvds.yaml    | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> new file mode 100644
> index 000000000000..f6ce8e29391e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic LVDS Display Panel Device Tree Bindings
> +
> +maintainers:
> +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +  - Thierry Reding <thierry.reding@gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +  - $ref: lvds.yaml#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: panel-lvds
> +
> +  not:
> +    properties:
> +      compatible:
> +        contains:
> +          enum:
> +              - advantech,idk-1110wr
> +              - innolux,ee101ia-01d
> +              - mitsubishi,aa104xd12
> +              - mitsubishi,aa121td01
> +              - sgd,gktw70sdae4se

This will be annoying to maintain, I'm pretty sure authors will forget
to update this file when adding bindings for other panels. Is there any
way we could select this binding with a positive rule instead of a
negative rule ?

> +
> +  required:
> +    - compatible
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - auo,b101ew05
> +          - tbs,a711-panel
> +
> +      - const: panel-lvds
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - data-mapping
> +  - width-mm
> +  - height-mm
> +  - panel-timing
> +  - port
> +
> +...

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
  2021-11-19 22:46   ` Laurent Pinchart
@ 2021-11-22 14:53     ` Maxime Ripard
  -1 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-22 14:53 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thierry Reding, Sam Ravnborg, Daniel Vetter, David Airlie,
	Rob Herring, Frank Rowand, devicetree, dri-devel

Hi,

On Sat, Nov 20, 2021 at 12:46:33AM +0200, Laurent Pinchart wrote:
> On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> > The lvds.yaml file so far was both defining the generic LVDS properties
> > (such as data-mapping) that could be used for any LVDS sink, but also
> > the panel-lvds binding.
> > 
> > That last binding was to describe LVDS panels simple enough, and had a
> > number of other bindings using it as a base to specialise it further.
> > 
> > However, this situation makes it fairly hard to extend and reuse both
> > the generic parts, and the panel-lvds itself.
> > 
> > Let's remove the panel-lvds parts and leave only the generic LVDS
> > properties.
> > 
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> >  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
> >  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
> >  .../bindings/display/panel/lvds.yaml          | 29 +------------------
> >  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
> >  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
> >  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
> >  6 files changed, 85 insertions(+), 33 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > index 93878c2cd370..f27cd2038636 100644
> > --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > @@ -11,13 +11,23 @@ maintainers:
> >    - Thierry Reding <thierry.reding@gmail.com>
> >  
> >  allOf:
> > +  - $ref: panel-common.yaml#
> >    - $ref: lvds.yaml#
> >  
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: advantech,idk-1110wr
> > +
> > +  required:
> > +    - compatible
> 
> I've never encountered this before, what does it do ?

select dictates if the schema is applied to a node or not.

It takes a schema, and if this schema is valid, the rest of the schema
will be applied to the current node.

It's mostly unused in the kernel because the dt-validate tool will add a
select clause from the compatible list in most case that would expand in
this case to:

select:
  properties:
    contains:
      enum:
        - advantech,idk-1110wr
	- panel-lvds

  required:
    - compatible

ie, it tries to validate with this schema any node that has either the
panel compatible or the generic compatible.

That means we would have that schema applied to all the nodes that have
panel-lvds, including the ones with a different compatible than the
advantech one.

With this clause, we make sure that we ignore the other panels, while
ensuring that the compatible list for the advantech compatible is
correct.

> > +
> >  properties:
> >    compatible:
> >      items:
> >        - const: advantech,idk-1110wr
> > -      - {} # panel-lvds, but not listed here to avoid false select
> > +      - const: panel-lvds
> >  
> >    data-mapping:
> >      const: jeida-24
> > @@ -35,6 +45,11 @@ additionalProperties: false
> >  
> >  required:
> >    - compatible
> > +  - data-mapping
> > +  - width-mm
> > +  - height-mm
> > +  - panel-timing
> > +  - port
> >  
> >  examples:
> >    - |+
> > diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > index a69681e724cb..6e06eecac14e 100644
> > --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > @@ -11,15 +11,26 @@ maintainers:
> >    - Thierry Reding <thierry.reding@gmail.com>
> >  
> >  allOf:
> > +  - $ref: panel-common.yaml#
> >    - $ref: lvds.yaml#
> >  
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: innolux,ee101ia-01d
> > +
> > +  required:
> > +    - compatible
> > +
> >  properties:
> >    compatible:
> >      items:
> >        - const: innolux,ee101ia-01d
> > -      - {} # panel-lvds, but not listed here to avoid false select
> > +      - const: panel-lvds
> >  
> >    backlight: true
> > +  data-mapping: true
> >    enable-gpios: true
> >    power-supply: true
> >    width-mm: true
> > @@ -27,5 +38,13 @@ properties:
> >    panel-timing: true
> >    port: true
> >  
> > +required:
> > +  - compatible
> > +  - data-mapping
> > +  - width-mm
> > +  - height-mm
> > +  - panel-timing
> > +  - port
> > +
> >  additionalProperties: false
> >  ...
> > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > index 49460c9dceea..5281a75c8bb5 100644
> > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > @@ -4,7 +4,7 @@
> >  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
> >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> >  
> > -title: LVDS Display Panel
> > +title: LVDS Display Common Properties
> 
> Maybe
> 
> title: LVDS Display Panel Common Properties
> 
> or do you foresee this being useful for non-panel LBDS sinks too ? In
> that case the title is fine, but the file could be moved in the parent
> directory.
> 
> I'm also wondering what we should do with the data-mapping and
> data-mirror properties. For an LVDS panel they're fine at the device
> level, but for an LVDS sink, they may be better placed at the port or
> endpoint level.

That was my intent, but it might not be relevant indeed. Honestly at
this point I just want to have the tbs,a711-panel compatible documented
somewhere :)

Maxime

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema
@ 2021-11-22 14:53     ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2021-11-22 14:53 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: devicetree, David Airlie, Frank Rowand, Rob Herring,
	Thierry Reding, dri-devel, Daniel Vetter, Sam Ravnborg

Hi,

On Sat, Nov 20, 2021 at 12:46:33AM +0200, Laurent Pinchart wrote:
> On Tue, Nov 16, 2021 at 03:35:02PM +0100, Maxime Ripard wrote:
> > The lvds.yaml file so far was both defining the generic LVDS properties
> > (such as data-mapping) that could be used for any LVDS sink, but also
> > the panel-lvds binding.
> > 
> > That last binding was to describe LVDS panels simple enough, and had a
> > number of other bindings using it as a base to specialise it further.
> > 
> > However, this situation makes it fairly hard to extend and reuse both
> > the generic parts, and the panel-lvds itself.
> > 
> > Let's remove the panel-lvds parts and leave only the generic LVDS
> > properties.
> > 
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> >  .../display/panel/advantech,idk-1110wr.yaml   | 17 ++++++++++-
> >  .../display/panel/innolux,ee101ia-01d.yaml    | 21 +++++++++++++-
> >  .../bindings/display/panel/lvds.yaml          | 29 +------------------
> >  .../display/panel/mitsubishi,aa104xd12.yaml   | 17 ++++++++++-
> >  .../display/panel/mitsubishi,aa121td01.yaml   | 17 ++++++++++-
> >  .../display/panel/sgd,gktw70sdae4se.yaml      | 17 ++++++++++-
> >  6 files changed, 85 insertions(+), 33 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > index 93878c2cd370..f27cd2038636 100644
> > --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> > @@ -11,13 +11,23 @@ maintainers:
> >    - Thierry Reding <thierry.reding@gmail.com>
> >  
> >  allOf:
> > +  - $ref: panel-common.yaml#
> >    - $ref: lvds.yaml#
> >  
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: advantech,idk-1110wr
> > +
> > +  required:
> > +    - compatible
> 
> I've never encountered this before, what does it do ?

select dictates if the schema is applied to a node or not.

It takes a schema, and if this schema is valid, the rest of the schema
will be applied to the current node.

It's mostly unused in the kernel because the dt-validate tool will add a
select clause from the compatible list in most case that would expand in
this case to:

select:
  properties:
    contains:
      enum:
        - advantech,idk-1110wr
	- panel-lvds

  required:
    - compatible

ie, it tries to validate with this schema any node that has either the
panel compatible or the generic compatible.

That means we would have that schema applied to all the nodes that have
panel-lvds, including the ones with a different compatible than the
advantech one.

With this clause, we make sure that we ignore the other panels, while
ensuring that the compatible list for the advantech compatible is
correct.

> > +
> >  properties:
> >    compatible:
> >      items:
> >        - const: advantech,idk-1110wr
> > -      - {} # panel-lvds, but not listed here to avoid false select
> > +      - const: panel-lvds
> >  
> >    data-mapping:
> >      const: jeida-24
> > @@ -35,6 +45,11 @@ additionalProperties: false
> >  
> >  required:
> >    - compatible
> > +  - data-mapping
> > +  - width-mm
> > +  - height-mm
> > +  - panel-timing
> > +  - port
> >  
> >  examples:
> >    - |+
> > diff --git a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > index a69681e724cb..6e06eecac14e 100644
> > --- a/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
> > @@ -11,15 +11,26 @@ maintainers:
> >    - Thierry Reding <thierry.reding@gmail.com>
> >  
> >  allOf:
> > +  - $ref: panel-common.yaml#
> >    - $ref: lvds.yaml#
> >  
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: innolux,ee101ia-01d
> > +
> > +  required:
> > +    - compatible
> > +
> >  properties:
> >    compatible:
> >      items:
> >        - const: innolux,ee101ia-01d
> > -      - {} # panel-lvds, but not listed here to avoid false select
> > +      - const: panel-lvds
> >  
> >    backlight: true
> > +  data-mapping: true
> >    enable-gpios: true
> >    power-supply: true
> >    width-mm: true
> > @@ -27,5 +38,13 @@ properties:
> >    panel-timing: true
> >    port: true
> >  
> > +required:
> > +  - compatible
> > +  - data-mapping
> > +  - width-mm
> > +  - height-mm
> > +  - panel-timing
> > +  - port
> > +
> >  additionalProperties: false
> >  ...
> > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.yaml b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > index 49460c9dceea..5281a75c8bb5 100644
> > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml
> > @@ -4,7 +4,7 @@
> >  $id: http://devicetree.org/schemas/display/panel/lvds.yaml#
> >  $schema: http://devicetree.org/meta-schemas/core.yaml#
> >  
> > -title: LVDS Display Panel
> > +title: LVDS Display Common Properties
> 
> Maybe
> 
> title: LVDS Display Panel Common Properties
> 
> or do you foresee this being useful for non-panel LBDS sinks too ? In
> that case the title is fine, but the file could be moved in the parent
> directory.
> 
> I'm also wondering what we should do with the data-mapping and
> data-mirror properties. For an LVDS panel they're fine at the device
> level, but for an LVDS sink, they may be better placed at the port or
> endpoint level.

That was my intent, but it might not be relevant indeed. Honestly at
this point I just want to have the tbs,a711-panel compatible documented
somewhere :)

Maxime

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-11-22 14:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 14:35 [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Maxime Ripard
2021-11-16 14:35 ` Maxime Ripard
2021-11-16 14:35 ` [PATCH 2/2] dt-bindings: panel: Introduce a panel-lvds binding Maxime Ripard
2021-11-16 14:35   ` Maxime Ripard
2021-11-17  2:27   ` Rob Herring
2021-11-17  2:27     ` Rob Herring
2021-11-18 22:56   ` Rob Herring
2021-11-18 22:56     ` Rob Herring
2021-11-19 22:48   ` Laurent Pinchart
2021-11-19 22:48     ` Laurent Pinchart
2021-11-18 22:49 ` [PATCH 1/2] dt-bindings: display: Turn lvds.yaml into a generic schema Rob Herring
2021-11-18 22:49   ` Rob Herring
2021-11-19 22:46 ` Laurent Pinchart
2021-11-19 22:46   ` Laurent Pinchart
2021-11-22 14:53   ` Maxime Ripard
2021-11-22 14:53     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.