devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema
@ 2024-03-25 10:36 Krzysztof Kozlowski
  2024-03-25 10:36 ` [RESEND PATCH v4 2/3] dt-bindings: display: novatek,nt35950: define ports Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-25 10:36 UTC (permalink / raw)
  To: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jianhua Lu,
	Del Regno, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Laurent Pinchart, Rob Herring

Add schema with common properties shared among dual-link panel ICs.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---

Changes since v3:
1. Re-phrase description of binding and ports (Laurent)
v3: https://lore.kernel.org/all/20230823081500.84005-1-krzysztof.kozlowski@linaro.org/

Changes since v2:
1. New Patch
v2: https://lore.kernel.org/all/20230502120036.47165-1-krzysztof.kozlowski@linaro.org/
v1: https://lore.kernel.org/all/20230416153929.356330-1-krzysztof.kozlowski@linaro.org/
---
 .../display/panel/panel-common-dual.yaml      | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common-dual.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/panel-common-dual.yaml b/Documentation/devicetree/bindings/display/panel/panel-common-dual.yaml
new file mode 100644
index 000000000000..cc7ea3c35c77
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-common-dual.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-common-dual.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common Properties for Dual-Link Display Panels
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
+
+description:
+  Properties common for Panel IC supporting dual link panels.  Devices might
+  support also single link.
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    additionalProperties: false
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: First link
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: Second link
+
+      "#address-cells": true
+      "#size-cells": true
+
+    required:
+      - port@0
+
+# Single-panel setups are still allowed.
+oneOf:
+  - required:
+      - ports
+  - required:
+      - port
+
+additionalProperties: true
-- 
2.34.1


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

* [RESEND PATCH v4 2/3] dt-bindings: display: novatek,nt35950: define ports
  2024-03-25 10:36 [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Krzysztof Kozlowski
@ 2024-03-25 10:36 ` Krzysztof Kozlowski
  2024-03-25 10:36 ` [RESEND PATCH v4 3/3] dt-bindings: display: novatek,nt36523: " Krzysztof Kozlowski
  2024-03-25 10:55 ` [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Neil Armstrong
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-25 10:36 UTC (permalink / raw)
  To: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jianhua Lu,
	Del Regno, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Rob Herring

The panel-common schema does not define what "ports" property is, so
bring the definition by referencing the panel-common-dual.yaml. Panels
can be single- or dual-link, thus require only one port@0.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>

---

Changes since v3:
1. Rb tag

Changes since v2:
1. Use panel-common-dual

Changes since v1:
1. Rework to add ports to device schema, not to panel-common.
---
 .../devicetree/bindings/display/panel/novatek,nt35950.yaml     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt35950.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt35950.yaml
index 377a05d48a02..7cac93b20944 100644
--- a/Documentation/devicetree/bindings/display/panel/novatek,nt35950.yaml
+++ b/Documentation/devicetree/bindings/display/panel/novatek,nt35950.yaml
@@ -19,7 +19,7 @@ description: |
   either bilinear interpolation or pixel duplication.
 
 allOf:
-  - $ref: panel-common.yaml#
+  - $ref: panel-common-dual.yaml#
 
 properties:
   compatible:
@@ -59,6 +59,7 @@ required:
   - avee-supply
   - dvdd-supply
   - vddio-supply
+  - ports
 
 additionalProperties: false
 
-- 
2.34.1


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

* [RESEND PATCH v4 3/3] dt-bindings: display: novatek,nt36523: define ports
  2024-03-25 10:36 [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Krzysztof Kozlowski
  2024-03-25 10:36 ` [RESEND PATCH v4 2/3] dt-bindings: display: novatek,nt35950: define ports Krzysztof Kozlowski
@ 2024-03-25 10:36 ` Krzysztof Kozlowski
  2024-03-25 10:55 ` [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Neil Armstrong
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-25 10:36 UTC (permalink / raw)
  To: Neil Armstrong, Sam Ravnborg, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jianhua Lu,
	Del Regno, Thierry Reding, Laurent Pinchart, dri-devel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Rob Herring

The panel-common schema does not define what "ports" property is, so
bring the definition by referencing the panel-common-dual.yaml. Panels
can be single- or dual-link, depending on the compatible, thus add
if:then:else: block narrowing ports per variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>

---

Changes since v3:
1. Rb tag

Changes since v2:
1. Use panel-common-dual.
2. Add if:then:else:

Changes since v1:
1. Rework to add ports to device schema, not to panel-common.
---
 .../display/panel/novatek,nt36523.yaml        | 25 +++++++++++++++----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml
index 5f7e4c486094..bbeea8cfa5fb 100644
--- a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml
+++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml
@@ -14,9 +14,6 @@ description: |
   panels. Support video mode panels from China Star Optoelectronics
   Technology (CSOT) and BOE Technology.
 
-allOf:
-  - $ref: panel-common.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -38,7 +35,6 @@ properties:
     description: regulator that supplies the I/O voltage
 
   reg: true
-  ports: true
   rotation: true
   backlight: true
 
@@ -47,7 +43,26 @@ required:
   - reg
   - vddio-supply
   - reset-gpios
-  - ports
+
+allOf:
+  - $ref: panel-common-dual.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - novatek,nt36523w
+    then:
+      properties:
+        ports:
+          properties:
+            port@1: false
+    else:
+      properties:
+        port: false
+        ports:
+          required:
+            - port@1
 
 unevaluatedProperties: false
 
-- 
2.34.1


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

* Re: [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema
  2024-03-25 10:36 [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Krzysztof Kozlowski
  2024-03-25 10:36 ` [RESEND PATCH v4 2/3] dt-bindings: display: novatek,nt35950: define ports Krzysztof Kozlowski
  2024-03-25 10:36 ` [RESEND PATCH v4 3/3] dt-bindings: display: novatek,nt36523: " Krzysztof Kozlowski
@ 2024-03-25 10:55 ` Neil Armstrong
  2 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2024-03-25 10:55 UTC (permalink / raw)
  To: Sam Ravnborg, David Airlie, Daniel Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jianhua Lu, Del Regno,
	Thierry Reding, Laurent Pinchart, dri-devel, devicetree,
	linux-kernel, Krzysztof Kozlowski
  Cc: Laurent Pinchart, Rob Herring

Hi,

On Mon, 25 Mar 2024 11:36:09 +0100, Krzysztof Kozlowski wrote:
> Add schema with common properties shared among dual-link panel ICs.
> 
> 

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/3] dt-bindings: display: panel: add common dual-link schema
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/48a516363e294a4098622dd77a5ecd4ee924121f
[2/3] dt-bindings: display: novatek, nt35950: define ports
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/1f6612e6852ecb053ce1e342d833ed7f395f7186
[3/3] dt-bindings: display: novatek, nt36523: define ports
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/90ed42ceda7667f5596d5e98530dd4119d786234

-- 
Neil


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

end of thread, other threads:[~2024-03-25 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 10:36 [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Krzysztof Kozlowski
2024-03-25 10:36 ` [RESEND PATCH v4 2/3] dt-bindings: display: novatek,nt35950: define ports Krzysztof Kozlowski
2024-03-25 10:36 ` [RESEND PATCH v4 3/3] dt-bindings: display: novatek,nt36523: " Krzysztof Kozlowski
2024-03-25 10:55 ` [RESEND PATCH v4 1/3] dt-bindings: display: panel: add common dual-link schema Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).