Skip to contentSkip to conversation

dt-bindings: display: dw_mipi_dsi.txt: convert to yaml

PATCH Superseded Adrian Ratiu 2 participants 3 messages Apr 22, 2020

Subsystems (4)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: display: dw_mipi_dsi.txt: convert to yaml

This converts the Synopsis MIPI DSI binding documentation to yaml and should be quite straightforward. I've added a missing ref clk and also added Philippe as maintainer b/c he's the original txt author following the algorithm provided in Message-ID [email protected].

---
Changes in v3:
- Added ports property and its children which are required (Laurent)
- Sorted required list alphabetically

Changes in v2:
- Removed unnecessary descriptions and maxItems (Rob)
- Changed maintainers entry / dropped Mark (Rob)
- Added dsi-controller.yaml ref (Rob)

---
 .../bindings/display/bridge/dw_mipi_dsi.txt   | 32 ---------
 .../display/bridge/snps,dw-mipi-dsi.yaml      | 72 +++++++++++++++++++
 2 files changed, 72 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt
 create mode 100644 Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml
Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt deleted +0 -32
deleted file mode 100644
index b13adf30b8d3b..0000000000000
@@ -1,32 +0,0 @@
-Synopsys DesignWare MIPI DSI host controller
-============================================
-
-This document defines device tree properties for the Synopsys DesignWare MIPI
-DSI host controller. It doesn't constitue a device tree binding specification
-by itself but is meant to be referenced by platform-specific device tree
-bindings.
-
-When referenced from platform device tree bindings the properties defined in
-this document are defined as follows. The platform device tree bindings are
-responsible for defining whether each optional property is used or not.
-
-- reg: Memory mapped base address and length of the DesignWare MIPI DSI
-  host controller registers. (mandatory)
-
-- clocks: References to all the clocks specified in the clock-names property
-  as specified in [1]. (mandatory)
-
-- clock-names:
-  - "pclk" is the peripheral clock for either AHB and APB. (mandatory)
-  - "px_clk" is the pixel clock for the DPI/RGB input. (optional)
-
-- resets: References to all the resets specified in the reset-names property
-  as specified in [2]. (optional)
-
-- reset-names: string reset name, must be "apb" if used. (optional)
-
-- panel or bridge node: see [3]. (mandatory)
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/reset/reset.txt
-[3] Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
2.26.0
#1 lore raw

PATCH v3 1/1 dt-bindings: display: dw_mipi_dsi.txt: convert to yaml

This converts the Synopsis MIPI DSI binding documentation to yaml and should be quite straightforward. I've added a missing ref clk and also added Philippe as maintainer b/c he's the original txt author following the algorithm provided in Message-ID [email protected].

---
Changes in v3:
- Added ports property and its children which are required (Laurent)
- Sorted required list alphabetically

Changes in v2:
- Removed unnecessary descriptions and maxItems (Rob)
- Changed maintainers entry / dropped Mark (Rob)
- Added dsi-controller.yaml ref (Rob)

---
 .../bindings/display/bridge/dw_mipi_dsi.txt   | 32 ---------
 .../display/bridge/snps,dw-mipi-dsi.yaml      | 72 +++++++++++++++++++
 2 files changed, 72 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt
 create mode 100644 Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml
Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt deleted +0 -32
deleted file mode 100644
index b13adf30b8d3b..0000000000000
@@ -1,32 +0,0 @@
-Synopsys DesignWare MIPI DSI host controller
-============================================
-
-This document defines device tree properties for the Synopsys DesignWare MIPI
-DSI host controller. It doesn't constitue a device tree binding specification
-by itself but is meant to be referenced by platform-specific device tree
-bindings.
-
-When referenced from platform device tree bindings the properties defined in
-this document are defined as follows. The platform device tree bindings are
-responsible for defining whether each optional property is used or not.
-
-- reg: Memory mapped base address and length of the DesignWare MIPI DSI
-  host controller registers. (mandatory)
-
-- clocks: References to all the clocks specified in the clock-names property
-  as specified in [1]. (mandatory)
-
-- clock-names:
-  - "pclk" is the peripheral clock for either AHB and APB. (mandatory)
-  - "px_clk" is the pixel clock for the DPI/RGB input. (optional)
-
-- resets: References to all the resets specified in the reset-names property
-  as specified in [2]. (optional)
-
-- reset-names: string reset name, must be "apb" if used. (optional)
-
-- panel or bridge node: see [3]. (mandatory)
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/reset/reset.txt
-[3] Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
2.26.0
maintainer Reviewed-by on v3 1/1
#2 lore raw
Quoted 126 lines · Adrian Ratiu

This converts the Synopsis MIPI DSI binding documentation to yaml and should be quite straightforward. I've added a missing ref clk and also added Philippe as maintainer b/c he's the original txt author following the algorithm provided in Message-ID [email protected].

---
Changes in v3:
- Added ports property and its children which are required (Laurent)
- Sorted required list alphabetically

Changes in v2:
- Removed unnecessary descriptions and maxItems (Rob)
- Changed maintainers entry / dropped Mark (Rob)
- Added dsi-controller.yaml ref (Rob)

---
 .../bindings/display/bridge/dw_mipi_dsi.txt   | 32 ---------
 .../display/bridge/snps,dw-mipi-dsi.yaml      | 72 +++++++++++++++++++
 2 files changed, 72 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt
 create mode 100644 Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml
Documentation/devicetree/bindings/display/bridge/dw_mipi_dsi.txt deleted +0 -32
deleted file mode 100644
index b13adf30b8d3b..0000000000000
@@ -1,32 +0,0 @@
-Synopsys DesignWare MIPI DSI host controller
-============================================
-
-This document defines device tree properties for the Synopsys DesignWare MIPI
-DSI host controller. It doesn't constitue a device tree binding specification
-by itself but is meant to be referenced by platform-specific device tree
-bindings.
-
-When referenced from platform device tree bindings the properties defined in
-this document are defined as follows. The platform device tree bindings are
-responsible for defining whether each optional property is used or not.
-
-- reg: Memory mapped base address and length of the DesignWare MIPI DSI
-  host controller registers. (mandatory)
-
-- clocks: References to all the clocks specified in the clock-names property
-  as specified in [1]. (mandatory)
-
-- clock-names:
-  - "pclk" is the peripheral clock for either AHB and APB. (mandatory)
-  - "px_clk" is the pixel clock for the DPI/RGB input. (optional)
-
-- resets: References to all the resets specified in the reset-names property
-  as specified in [2]. (optional)
-
-- reset-names: string reset name, must be "apb" if used. (optional)
-
-- panel or bridge node: see [3]. (mandatory)
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/reset/reset.txt
-[3] Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml new file +55 -0
new file mode 100644
index 0000000000000..076567d8d8ec1
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/snps,dw-mipi-dsi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synopsys DesignWare MIPI DSI host controller
+
+maintainers:
+  - Philippe CORNU <[email protected]>
+
+description: |
+  This document defines device tree properties for the Synopsys DesignWare MIPI
+  DSI host controller. It doesn't constitue a device tree binding specification
+  by itself but is meant to be referenced by platform-specific device tree
+  bindings.
+
+  When referenced from platform device tree bindings the properties defined in
+  this document are defined as follows. The platform device tree bindings are
+  responsible for defining whether each property is required or optional.
+
+allOf:
+  - $ref: ../dsi-controller.yaml#
+
+properties:
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Module clock
+      - description: DSI bus clock for either AHB and APB
+      - description: Pixel clock for the DPI/RGB input
+    minItems: 2
+
+  clock-names:
+    items:
+      - const: ref
+      - const: pclk
+      - const: px_clk
+    minItems: 2
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: apb
+
+  ports:
+    type: object
+
+    properties:
+      port@0:
+        type: object
+        description: Input node to receive pixel data.

Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml line 65

Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml new file +10 -0
+      port@1:
+        type: object
+        description: DSI output node to panel.
+
+    required:
+      - port@0
+      - port@1
+
+patternProperties:
+  "^panel@[0-3]$":

It's not always a panel attached. dsi-controller.yaml covers child nodes anyways, so you can just drop this.

With that,

Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml new file +7 -1
+    type: object
+
+required:
+  - clock-names
+  - clocks
+  - ports
+  - reg
--

2.26.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel