All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-06-30 20:02 ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-06-30 20:02 UTC (permalink / raw)
  To: devicetree, dri-devel
  Cc: linux-kernel, Sam Ravnborg, Laurent Pinchart, Maxime Ripard

Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
format.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2:
- Make Laurent maintainer
- Add missing port and compatible required
- Drop copy-n-paste 'type' from dvi-connector
- Use 4 space indent on examples
---
 .../display/connector/analog-tv-connector.txt | 31 --------
 .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
 .../display/connector/dvi-connector.txt       | 36 ----------
 .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
 .../display/connector/hdmi-connector.txt      | 31 --------
 .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
 .../display/connector/vga-connector.txt       | 36 ----------
 .../display/connector/vga-connector.yaml      | 46 ++++++++++++
 8 files changed, 232 insertions(+), 134 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml

diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
deleted file mode 100644
index 883bcb2604c7..000000000000
--- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Analog TV Connector
-===================
-
-Required properties:
-- compatible: "composite-video-connector" or "svideo-connector"
-
-Optional properties:
-- label: a symbolic name for the connector
-- sdtv-standards: limit the supported TV standards on a connector to the given
-                  ones. If not specified all TV standards are allowed.
-                  Possible TV standards are defined in
-                  include/dt-bindings/display/sdtv-standards.h.
-
-Required nodes:
-- Video port for TV input
-
-Example
--------
-#include <dt-bindings/display/sdtv-standards.h>
-
-tv: connector {
-	compatible = "composite-video-connector";
-	label = "tv";
-	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
-
-	port {
-		tv_connector_in: endpoint {
-			remote-endpoint = <&venc_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
new file mode 100644
index 000000000000..eebe88fed999
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog TV Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    enum:
+      - composite-video-connector
+      - svideo-connector
+
+  label: true
+
+  sdtv-standards:
+    description:
+      Limit the supported TV standards on a connector to the given ones. If
+      not specified all TV standards are allowed. Possible TV standards are
+      defined in include/dt-bindings/display/sdtv-standards.h.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  port:
+    description: Connection to controller providing analog TV signals
+
+required:
+  - compatible
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/display/sdtv-standards.h>
+
+    connector {
+        compatible = "composite-video-connector";
+        label = "tv";
+        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
+
+        port {
+            tv_connector_in: endpoint {
+                remote-endpoint = <&venc_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
deleted file mode 100644
index 207e42e9eba0..000000000000
--- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-DVI Connector
-==============
-
-Required properties:
-- compatible: "dvi-connector"
-
-Optional properties:
-- label: a symbolic name for the connector
-- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
-- analog: the connector has DVI analog pins
-- digital: the connector has DVI digital pins
-- dual-link: the connector has pins for DVI dual-link
-- hpd-gpios: HPD GPIO number
-
-Required nodes:
-- Video port for DVI input
-
-Note: One (or both) of 'analog' or 'digital' must be set.
-
-Example
--------
-
-dvi0: connector@0 {
-	compatible = "dvi-connector";
-	label = "dvi";
-
-	digital;
-
-	ddc-i2c-bus = <&i2c3>;
-
-	port {
-		dvi_connector_in: endpoint {
-			remote-endpoint = <&tfp410_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
new file mode 100644
index 000000000000..71cb9220fa59
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DVI Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: dvi-connector
+
+  label: true
+
+  hpd-gpios:
+    description: A GPIO line connected to HPD
+    maxItems: 1
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  analog:
+    type: boolean
+    description: the connector has DVI analog pins
+
+  digital:
+    type: boolean
+    description: the connector has DVI digital pins
+
+  dual-link:
+    type: boolean
+    description: the connector has pins for DVI dual-link
+
+  port:
+    description: Connection to controller providing DVI signals
+
+required:
+  - compatible
+  - port
+
+anyOf:
+  - required:
+      - analog
+  - required:
+      - digital
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "dvi-connector";
+        label = "dvi";
+
+        digital;
+
+        ddc-i2c-bus = <&i2c3>;
+
+        port {
+            dvi_connector_in: endpoint {
+                remote-endpoint = <&tfp410_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
deleted file mode 100644
index aeb07c4bd703..000000000000
--- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-HDMI Connector
-==============
-
-Required properties:
-- compatible: "hdmi-connector"
-- type: the HDMI connector type: "a", "b", "c", "d" or "e"
-
-Optional properties:
-- label: a symbolic name for the connector
-- hpd-gpios: HPD GPIO number
-- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
-- ddc-en-gpios: signal to enable DDC bus
-
-Required nodes:
-- Video port for HDMI input
-
-Example
--------
-
-hdmi0: connector@1 {
-	compatible = "hdmi-connector";
-	label = "hdmi";
-
-	type = "a";
-
-	port {
-		hdmi_connector_in: endpoint {
-			remote-endpoint = <&tpd12s015_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
new file mode 100644
index 000000000000..14d7128af592
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HDMI Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: hdmi-connector
+
+  type:
+    description: The HDMI connector type
+    enum:
+      - a   # Standard full size
+      - b   # Never deployed?
+      - c   # Mini
+      - d   # Micro
+      - e   # automotive
+
+  label: true
+
+  hpd-gpios:
+    description: A GPIO line connected to HPD
+    maxItems: 1
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  ddc-en-gpios:
+    description: GPIO signal to enable DDC bus
+    maxItems: 1
+
+  port:
+    description: Connection to controller providing HDMI signals
+
+required:
+  - compatible
+  - port
+  - type
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "hdmi-connector";
+        label = "hdmi";
+
+        type = "a";
+
+        port {
+            hdmi_connector_in: endpoint {
+                remote-endpoint = <&tpd12s015_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
deleted file mode 100644
index c727f298e7ad..000000000000
--- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-VGA Connector
-=============
-
-Required properties:
-
-- compatible: "vga-connector"
-
-Optional properties:
-
-- label: a symbolic name for the connector corresponding to a hardware label
-- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
-
-Required nodes:
-
-The VGA connector internal connections are modeled using the OF graph bindings
-specified in Documentation/devicetree/bindings/graph.txt.
-
-The VGA connector has a single port that must be connected to a video source
-port.
-
-
-Example
--------
-
-vga0: connector@0 {
-	compatible = "vga-connector";
-	label = "vga";
-
-	ddc-i2c-bus = <&i2c3>;
-
-	port {
-		vga_connector_in: endpoint {
-			remote-endpoint = <&adv7123_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
new file mode 100644
index 000000000000..5782c4bb3252
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VGA Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: vga-connector
+
+  label: true
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  port:
+    description: Connection to controller providing VGA signals
+
+required:
+  - compatible
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "vga-connector";
+        label = "vga";
+
+        ddc-i2c-bus = <&i2c3>;
+
+        port {
+            vga_connector_in: endpoint {
+                remote-endpoint = <&adv7123_out>;
+            };
+        };
+    };
+
+...
-- 
2.25.1


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

* [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-06-30 20:02 ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-06-30 20:02 UTC (permalink / raw)
  To: devicetree, dri-devel; +Cc: Sam Ravnborg, linux-kernel, Laurent Pinchart

Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
format.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
v2:
- Make Laurent maintainer
- Add missing port and compatible required
- Drop copy-n-paste 'type' from dvi-connector
- Use 4 space indent on examples
---
 .../display/connector/analog-tv-connector.txt | 31 --------
 .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
 .../display/connector/dvi-connector.txt       | 36 ----------
 .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
 .../display/connector/hdmi-connector.txt      | 31 --------
 .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
 .../display/connector/vga-connector.txt       | 36 ----------
 .../display/connector/vga-connector.yaml      | 46 ++++++++++++
 8 files changed, 232 insertions(+), 134 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
 create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml

diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
deleted file mode 100644
index 883bcb2604c7..000000000000
--- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Analog TV Connector
-===================
-
-Required properties:
-- compatible: "composite-video-connector" or "svideo-connector"
-
-Optional properties:
-- label: a symbolic name for the connector
-- sdtv-standards: limit the supported TV standards on a connector to the given
-                  ones. If not specified all TV standards are allowed.
-                  Possible TV standards are defined in
-                  include/dt-bindings/display/sdtv-standards.h.
-
-Required nodes:
-- Video port for TV input
-
-Example
--------
-#include <dt-bindings/display/sdtv-standards.h>
-
-tv: connector {
-	compatible = "composite-video-connector";
-	label = "tv";
-	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
-
-	port {
-		tv_connector_in: endpoint {
-			remote-endpoint = <&venc_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
new file mode 100644
index 000000000000..eebe88fed999
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog TV Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    enum:
+      - composite-video-connector
+      - svideo-connector
+
+  label: true
+
+  sdtv-standards:
+    description:
+      Limit the supported TV standards on a connector to the given ones. If
+      not specified all TV standards are allowed. Possible TV standards are
+      defined in include/dt-bindings/display/sdtv-standards.h.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  port:
+    description: Connection to controller providing analog TV signals
+
+required:
+  - compatible
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/display/sdtv-standards.h>
+
+    connector {
+        compatible = "composite-video-connector";
+        label = "tv";
+        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
+
+        port {
+            tv_connector_in: endpoint {
+                remote-endpoint = <&venc_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
deleted file mode 100644
index 207e42e9eba0..000000000000
--- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-DVI Connector
-==============
-
-Required properties:
-- compatible: "dvi-connector"
-
-Optional properties:
-- label: a symbolic name for the connector
-- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
-- analog: the connector has DVI analog pins
-- digital: the connector has DVI digital pins
-- dual-link: the connector has pins for DVI dual-link
-- hpd-gpios: HPD GPIO number
-
-Required nodes:
-- Video port for DVI input
-
-Note: One (or both) of 'analog' or 'digital' must be set.
-
-Example
--------
-
-dvi0: connector@0 {
-	compatible = "dvi-connector";
-	label = "dvi";
-
-	digital;
-
-	ddc-i2c-bus = <&i2c3>;
-
-	port {
-		dvi_connector_in: endpoint {
-			remote-endpoint = <&tfp410_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
new file mode 100644
index 000000000000..71cb9220fa59
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DVI Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: dvi-connector
+
+  label: true
+
+  hpd-gpios:
+    description: A GPIO line connected to HPD
+    maxItems: 1
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  analog:
+    type: boolean
+    description: the connector has DVI analog pins
+
+  digital:
+    type: boolean
+    description: the connector has DVI digital pins
+
+  dual-link:
+    type: boolean
+    description: the connector has pins for DVI dual-link
+
+  port:
+    description: Connection to controller providing DVI signals
+
+required:
+  - compatible
+  - port
+
+anyOf:
+  - required:
+      - analog
+  - required:
+      - digital
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "dvi-connector";
+        label = "dvi";
+
+        digital;
+
+        ddc-i2c-bus = <&i2c3>;
+
+        port {
+            dvi_connector_in: endpoint {
+                remote-endpoint = <&tfp410_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
deleted file mode 100644
index aeb07c4bd703..000000000000
--- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-HDMI Connector
-==============
-
-Required properties:
-- compatible: "hdmi-connector"
-- type: the HDMI connector type: "a", "b", "c", "d" or "e"
-
-Optional properties:
-- label: a symbolic name for the connector
-- hpd-gpios: HPD GPIO number
-- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
-- ddc-en-gpios: signal to enable DDC bus
-
-Required nodes:
-- Video port for HDMI input
-
-Example
--------
-
-hdmi0: connector@1 {
-	compatible = "hdmi-connector";
-	label = "hdmi";
-
-	type = "a";
-
-	port {
-		hdmi_connector_in: endpoint {
-			remote-endpoint = <&tpd12s015_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
new file mode 100644
index 000000000000..14d7128af592
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HDMI Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: hdmi-connector
+
+  type:
+    description: The HDMI connector type
+    enum:
+      - a   # Standard full size
+      - b   # Never deployed?
+      - c   # Mini
+      - d   # Micro
+      - e   # automotive
+
+  label: true
+
+  hpd-gpios:
+    description: A GPIO line connected to HPD
+    maxItems: 1
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  ddc-en-gpios:
+    description: GPIO signal to enable DDC bus
+    maxItems: 1
+
+  port:
+    description: Connection to controller providing HDMI signals
+
+required:
+  - compatible
+  - port
+  - type
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "hdmi-connector";
+        label = "hdmi";
+
+        type = "a";
+
+        port {
+            hdmi_connector_in: endpoint {
+                remote-endpoint = <&tpd12s015_out>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
deleted file mode 100644
index c727f298e7ad..000000000000
--- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-VGA Connector
-=============
-
-Required properties:
-
-- compatible: "vga-connector"
-
-Optional properties:
-
-- label: a symbolic name for the connector corresponding to a hardware label
-- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
-
-Required nodes:
-
-The VGA connector internal connections are modeled using the OF graph bindings
-specified in Documentation/devicetree/bindings/graph.txt.
-
-The VGA connector has a single port that must be connected to a video source
-port.
-
-
-Example
--------
-
-vga0: connector@0 {
-	compatible = "vga-connector";
-	label = "vga";
-
-	ddc-i2c-bus = <&i2c3>;
-
-	port {
-		vga_connector_in: endpoint {
-			remote-endpoint = <&adv7123_out>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
new file mode 100644
index 000000000000..5782c4bb3252
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VGA Connector
+
+maintainers:
+  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
+
+properties:
+  compatible:
+    const: vga-connector
+
+  label: true
+
+  ddc-i2c-bus:
+    description: phandle link to the I2C controller used for DDC EDID probing
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  port:
+    description: Connection to controller providing VGA signals
+
+required:
+  - compatible
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    connector {
+        compatible = "vga-connector";
+        label = "vga";
+
+        ddc-i2c-bus = <&i2c3>;
+
+        port {
+            vga_connector_in: endpoint {
+                remote-endpoint = <&adv7123_out>;
+            };
+        };
+    };
+
+...
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
  2020-06-30 20:02 ` Rob Herring
@ 2020-06-30 20:15   ` Sam Ravnborg
  -1 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2020-06-30 20:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, dri-devel, linux-kernel, Laurent Pinchart, Maxime Ripard

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.25.1

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-06-30 20:15   ` Sam Ravnborg
  0 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2020-06-30 20:15 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, dri-devel, Laurent Pinchart

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
  2020-06-30 20:02 ` Rob Herring
@ 2020-07-01  5:53   ` Laurent Pinchart
  -1 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2020-07-01  5:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, dri-devel, linux-kernel, Sam Ravnborg, Maxime Ripard

Hi Rob,

Thank you for the patch.

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-07-01  5:53   ` Laurent Pinchart
  0 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2020-07-01  5:53 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, Sam Ravnborg, linux-kernel, dri-devel

Hi Rob,

Thank you for the patch.

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
  2020-06-30 20:02 ` Rob Herring
@ 2020-07-01  6:51   ` Maxime Ripard
  -1 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-07-01  6:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, dri-devel, linux-kernel, Sam Ravnborg, Laurent Pinchart

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-07-01  6:51   ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-07-01  6:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Sam Ravnborg, linux-kernel, dri-devel, Laurent Pinchart


[-- Attachment #1.1: Type: text/plain, Size: 413 bytes --]

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
  2020-06-30 20:02 ` Rob Herring
@ 2020-07-01 17:35   ` Sam Ravnborg
  -1 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2020-07-01 17:35 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, dri-devel, linux-kernel, Laurent Pinchart, Maxime Ripard

Hi Rob

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
I assume you take this via the DT tree.

	Sam
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.25.1

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

* Re: [PATCH v2] dt-bindings: display: Convert connectors to DT schema
@ 2020-07-01 17:35   ` Sam Ravnborg
  0 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2020-07-01 17:35 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, dri-devel, Laurent Pinchart

Hi Rob

On Tue, Jun 30, 2020 at 02:02:16PM -0600, Rob Herring wrote:
> Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema
> format.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2:
> - Make Laurent maintainer
> - Add missing port and compatible required
> - Drop copy-n-paste 'type' from dvi-connector
> - Use 4 space indent on examples
I assume you take this via the DT tree.

	Sam
> ---
>  .../display/connector/analog-tv-connector.txt | 31 --------
>  .../connector/analog-tv-connector.yaml        | 52 ++++++++++++++
>  .../display/connector/dvi-connector.txt       | 36 ----------
>  .../display/connector/dvi-connector.yaml      | 70 +++++++++++++++++++
>  .../display/connector/hdmi-connector.txt      | 31 --------
>  .../display/connector/hdmi-connector.yaml     | 64 +++++++++++++++++
>  .../display/connector/vga-connector.txt       | 36 ----------
>  .../display/connector/vga-connector.yaml      | 46 ++++++++++++
>  8 files changed, 232 insertions(+), 134 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> deleted file mode 100644
> index 883bcb2604c7..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Analog TV Connector
> -===================
> -
> -Required properties:
> -- compatible: "composite-video-connector" or "svideo-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- sdtv-standards: limit the supported TV standards on a connector to the given
> -                  ones. If not specified all TV standards are allowed.
> -                  Possible TV standards are defined in
> -                  include/dt-bindings/display/sdtv-standards.h.
> -
> -Required nodes:
> -- Video port for TV input
> -
> -Example
> --------
> -#include <dt-bindings/display/sdtv-standards.h>
> -
> -tv: connector {
> -	compatible = "composite-video-connector";
> -	label = "tv";
> -	sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> -
> -	port {
> -		tv_connector_in: endpoint {
> -			remote-endpoint = <&venc_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> new file mode 100644
> index 000000000000..eebe88fed999
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/analog-tv-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog TV Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - composite-video-connector
> +      - svideo-connector
> +
> +  label: true
> +
> +  sdtv-standards:
> +    description:
> +      Limit the supported TV standards on a connector to the given ones. If
> +      not specified all TV standards are allowed. Possible TV standards are
> +      defined in include/dt-bindings/display/sdtv-standards.h.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  port:
> +    description: Connection to controller providing analog TV signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/sdtv-standards.h>
> +
> +    connector {
> +        compatible = "composite-video-connector";
> +        label = "tv";
> +        sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
> +
> +        port {
> +            tv_connector_in: endpoint {
> +                remote-endpoint = <&venc_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt b/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> deleted file mode 100644
> index 207e42e9eba0..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/dvi-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -DVI Connector
> -==============
> -
> -Required properties:
> -- compatible: "dvi-connector"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- ddc-i2c-bus: phandle to the i2c bus that is connected to DVI DDC
> -- analog: the connector has DVI analog pins
> -- digital: the connector has DVI digital pins
> -- dual-link: the connector has pins for DVI dual-link
> -- hpd-gpios: HPD GPIO number
> -
> -Required nodes:
> -- Video port for DVI input
> -
> -Note: One (or both) of 'analog' or 'digital' must be set.
> -
> -Example
> --------
> -
> -dvi0: connector@0 {
> -	compatible = "dvi-connector";
> -	label = "dvi";
> -
> -	digital;
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		dvi_connector_in: endpoint {
> -			remote-endpoint = <&tfp410_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> new file mode 100644
> index 000000000000..71cb9220fa59
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/dvi-connector.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/dvi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: DVI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: dvi-connector
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  analog:
> +    type: boolean
> +    description: the connector has DVI analog pins
> +
> +  digital:
> +    type: boolean
> +    description: the connector has DVI digital pins
> +
> +  dual-link:
> +    type: boolean
> +    description: the connector has pins for DVI dual-link
> +
> +  port:
> +    description: Connection to controller providing DVI signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +anyOf:
> +  - required:
> +      - analog
> +  - required:
> +      - digital
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "dvi-connector";
> +        label = "dvi";
> +
> +        digital;
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            dvi_connector_in: endpoint {
> +                remote-endpoint = <&tfp410_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt b/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> deleted file mode 100644
> index aeb07c4bd703..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/hdmi-connector.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -HDMI Connector
> -==============
> -
> -Required properties:
> -- compatible: "hdmi-connector"
> -- type: the HDMI connector type: "a", "b", "c", "d" or "e"
> -
> -Optional properties:
> -- label: a symbolic name for the connector
> -- hpd-gpios: HPD GPIO number
> -- ddc-i2c-bus: phandle link to the I2C controller used for DDC EDID probing
> -- ddc-en-gpios: signal to enable DDC bus
> -
> -Required nodes:
> -- Video port for HDMI input
> -
> -Example
> --------
> -
> -hdmi0: connector@1 {
> -	compatible = "hdmi-connector";
> -	label = "hdmi";
> -
> -	type = "a";
> -
> -	port {
> -		hdmi_connector_in: endpoint {
> -			remote-endpoint = <&tpd12s015_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> new file mode 100644
> index 000000000000..14d7128af592
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: hdmi-connector
> +
> +  type:
> +    description: The HDMI connector type
> +    enum:
> +      - a   # Standard full size
> +      - b   # Never deployed?
> +      - c   # Mini
> +      - d   # Micro
> +      - e   # automotive
> +
> +  label: true
> +
> +  hpd-gpios:
> +    description: A GPIO line connected to HPD
> +    maxItems: 1
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  ddc-en-gpios:
> +    description: GPIO signal to enable DDC bus
> +    maxItems: 1
> +
> +  port:
> +    description: Connection to controller providing HDMI signals
> +
> +required:
> +  - compatible
> +  - port
> +  - type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "hdmi-connector";
> +        label = "hdmi";
> +
> +        type = "a";
> +
> +        port {
> +            hdmi_connector_in: endpoint {
> +                remote-endpoint = <&tpd12s015_out>;
> +            };
> +        };
> +    };
> +
> +...
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.txt b/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> deleted file mode 100644
> index c727f298e7ad..000000000000
> --- a/Documentation/devicetree/bindings/display/connector/vga-connector.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -VGA Connector
> -=============
> -
> -Required properties:
> -
> -- compatible: "vga-connector"
> -
> -Optional properties:
> -
> -- label: a symbolic name for the connector corresponding to a hardware label
> -- ddc-i2c-bus: phandle to the I2C bus that is connected to VGA DDC
> -
> -Required nodes:
> -
> -The VGA connector internal connections are modeled using the OF graph bindings
> -specified in Documentation/devicetree/bindings/graph.txt.
> -
> -The VGA connector has a single port that must be connected to a video source
> -port.
> -
> -
> -Example
> --------
> -
> -vga0: connector@0 {
> -	compatible = "vga-connector";
> -	label = "vga";
> -
> -	ddc-i2c-bus = <&i2c3>;
> -
> -	port {
> -		vga_connector_in: endpoint {
> -			remote-endpoint = <&adv7123_out>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/connector/vga-connector.yaml b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> new file mode 100644
> index 000000000000..5782c4bb3252
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/connector/vga-connector.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/connector/vga-connector.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VGA Connector
> +
> +maintainers:
> +  - Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> +
> +properties:
> +  compatible:
> +    const: vga-connector
> +
> +  label: true
> +
> +  ddc-i2c-bus:
> +    description: phandle link to the I2C controller used for DDC EDID probing
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  port:
> +    description: Connection to controller providing VGA signals
> +
> +required:
> +  - compatible
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    connector {
> +        compatible = "vga-connector";
> +        label = "vga";
> +
> +        ddc-i2c-bus = <&i2c3>;
> +
> +        port {
> +            vga_connector_in: endpoint {
> +                remote-endpoint = <&adv7123_out>;
> +            };
> +        };
> +    };
> +
> +...
> -- 
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-07-01 17:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 20:02 [PATCH v2] dt-bindings: display: Convert connectors to DT schema Rob Herring
2020-06-30 20:02 ` Rob Herring
2020-06-30 20:15 ` Sam Ravnborg
2020-06-30 20:15   ` Sam Ravnborg
2020-07-01  5:53 ` Laurent Pinchart
2020-07-01  5:53   ` Laurent Pinchart
2020-07-01  6:51 ` Maxime Ripard
2020-07-01  6:51   ` Maxime Ripard
2020-07-01 17:35 ` Sam Ravnborg
2020-07-01 17:35   ` Sam Ravnborg

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.