All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-09  5:01 ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

This patch concludes the conversion of display/msm schema from txt files
to YAML format.

The per-SoC compat (new addition) is required to ease migrating platform
support between mdp5 and dpu drivers.

Changes since v4:
- Adjust qcom,mdss.yaml to follow the addition of per-SoC compatibles

Changes since v3:
- Drop MSM8998 completely, it conflicts with qcom,msm8998-dpu.yaml

Changes since v2:
- Fix MSM8998 compatible list: "qcom,msm8998-dpu", "msm,mdp5" to allow
  handling this device by either of the drivers.

Changes since v1:
- Renamed mdp@ to display-controller@ in the example (Krzysztof)
- Extended ports description to mention possible ports (Krzysztof)
- Fixed ports@ regexp to limit to just four ports (Krzysztof)
- Included patches adding per-SoC compat strings to the schema and to
  dtsi files.


Dmitry Baryshkov (4):
  dt-bindings: display/msm: convert MDP5 schema to YAML format
  dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
  ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
  arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes

 .../devicetree/bindings/display/msm/mdp5.txt  | 132 ---------------
 .../bindings/display/msm/qcom,mdp5.yaml       | 153 ++++++++++++++++++
 .../bindings/display/msm/qcom,mdss.yaml       |   6 +-
 arch/arm/boot/dts/qcom-msm8974.dtsi           |   2 +-
 arch/arm64/boot/dts/qcom/msm8916.dtsi         |   2 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi         |   2 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi          |   2 +-
 arch/arm64/boot/dts/qcom/sdm660.dtsi          |   2 +
 8 files changed, 164 insertions(+), 137 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml

-- 
2.39.0


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

* [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-09  5:01 ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-msm, dri-devel, Stephen Boyd, freedreno

This patch concludes the conversion of display/msm schema from txt files
to YAML format.

The per-SoC compat (new addition) is required to ease migrating platform
support between mdp5 and dpu drivers.

Changes since v4:
- Adjust qcom,mdss.yaml to follow the addition of per-SoC compatibles

Changes since v3:
- Drop MSM8998 completely, it conflicts with qcom,msm8998-dpu.yaml

Changes since v2:
- Fix MSM8998 compatible list: "qcom,msm8998-dpu", "msm,mdp5" to allow
  handling this device by either of the drivers.

Changes since v1:
- Renamed mdp@ to display-controller@ in the example (Krzysztof)
- Extended ports description to mention possible ports (Krzysztof)
- Fixed ports@ regexp to limit to just four ports (Krzysztof)
- Included patches adding per-SoC compat strings to the schema and to
  dtsi files.


Dmitry Baryshkov (4):
  dt-bindings: display/msm: convert MDP5 schema to YAML format
  dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
  ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
  arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes

 .../devicetree/bindings/display/msm/mdp5.txt  | 132 ---------------
 .../bindings/display/msm/qcom,mdp5.yaml       | 153 ++++++++++++++++++
 .../bindings/display/msm/qcom,mdss.yaml       |   6 +-
 arch/arm/boot/dts/qcom-msm8974.dtsi           |   2 +-
 arch/arm64/boot/dts/qcom/msm8916.dtsi         |   2 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi         |   2 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi          |   2 +-
 arch/arm64/boot/dts/qcom/sdm660.dtsi          |   2 +
 8 files changed, 164 insertions(+), 137 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml

-- 
2.39.0


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

* [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-09  5:01 ` Dmitry Baryshkov
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
 - MSM8996 has additional "iommu" clock, define it separately
 - Add new properties used on some of platforms:
   - interconnects, interconnect-names
   - iommus
   - power-domains
   - operating-points-v2, opp-table

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
 .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
 2 files changed, 138 insertions(+), 132 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml

diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
deleted file mode 100644
index 65d03c58dee6..000000000000
--- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-Qualcomm adreno/snapdragon MDP5 display controller
-
-Description:
-
-This is the bindings documentation for the MDP5 display
-controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
-
-MDP5:
-Required properties:
-- compatible:
-  * "qcom,mdp5" - MDP5
-- reg: Physical base address and length of the controller's registers.
-- reg-names: The names of register regions. The following regions are required:
-  * "mdp_phys"
-- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
-- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
-- clock-names: the following clocks are required.
--   * "bus"
--   * "iface"
--   * "core"
--   * "vsync"
-- ports: contains the list of output ports from MDP. These connect to interfaces
-  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
-  special case since it is a part of the MDP block itself).
-
-  Each output port contains an endpoint that describes how it is connected to an
-  external interface. These are described by the standard properties documented
-  here:
-	Documentation/devicetree/bindings/graph.txt
-	Documentation/devicetree/bindings/media/video-interfaces.txt
-
-  The availability of output ports can vary across SoC revisions:
-
-  For MSM8974 and APQ8084:
-	 Port 0 -> MDP_INTF0 (eDP)
-	 Port 1 -> MDP_INTF1 (DSI1)
-	 Port 2 -> MDP_INTF2 (DSI2)
-	 Port 3 -> MDP_INTF3 (HDMI)
-
-  For MSM8916:
-	 Port 0 -> MDP_INTF1 (DSI1)
-
-  For MSM8994 and MSM8996:
-	 Port 0 -> MDP_INTF1 (DSI1)
-	 Port 1 -> MDP_INTF2 (DSI2)
-	 Port 2 -> MDP_INTF3 (HDMI)
-
-Optional properties:
-- clock-names: the following clocks are optional:
-  * "lut"
-  * "tbu"
-  * "tbu_rt"
-
-Example:
-
-/ {
-	...
-
-	mdss: mdss@1a00000 {
-		compatible = "qcom,mdss";
-		reg = <0x1a00000 0x1000>,
-		      <0x1ac8000 0x3000>;
-		reg-names = "mdss_phys", "vbif_phys";
-
-		power-domains = <&gcc MDSS_GDSC>;
-
-		clocks = <&gcc GCC_MDSS_AHB_CLK>,
-			 <&gcc GCC_MDSS_AXI_CLK>,
-			 <&gcc GCC_MDSS_VSYNC_CLK>;
-		clock-names = "iface",
-			      "bus",
-			      "vsync"
-
-		interrupts = <0 72 0>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		mdp: mdp@1a01000 {
-			compatible = "qcom,mdp5";
-			reg = <0x1a01000 0x90000>;
-			reg-names = "mdp_phys";
-
-			interrupt-parent = <&mdss>;
-			interrupts = <0 0>;
-
-			clocks = <&gcc GCC_MDSS_AHB_CLK>,
-				 <&gcc GCC_MDSS_AXI_CLK>,
-				 <&gcc GCC_MDSS_MDP_CLK>,
-				 <&gcc GCC_MDSS_VSYNC_CLK>;
-			clock-names = "iface",
-				      "bus",
-				      "core",
-				      "vsync";
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					mdp5_intf1_out: endpoint {
-						remote-endpoint = <&dsi0_in>;
-					};
-				};
-			};
-		};
-
-		dsi0: dsi@1a98000 {
-			...
-			ports {
-				...
-				port@0 {
-					reg = <0>;
-					dsi0_in: endpoint {
-						remote-endpoint = <&mdp5_intf1_out>;
-					};
-				};
-				...
-			};
-			...
-		};
-
-		dsi_phy0: dsi-phy@1a98300 {
-			...
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
new file mode 100644
index 000000000000..cbcbe8b47e9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
@@ -0,0 +1,138 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
+
+description: >
+  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
+  and MSM8996.
+
+maintainers:
+  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+  - Rob Clark <robdclark@gmail.com>
+
+properties:
+  compatible:
+    const: qcom,mdp5
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    items:
+      - const: mdp_phys
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 4
+    maxItems: 7
+
+  clock-names:
+    oneOf:
+      - minItems: 4
+        items:
+          - const: iface
+          - const: bus
+          - const: core
+          - const: vsync
+          - const: lut
+          - const: tbu
+          - const: tbu_rt
+        #MSM8996 has additional iommu clock
+      - items:
+          - const: iface
+          - const: bus
+          - const: core
+          - const: iommu
+          - const: vsync
+
+  interconnects:
+    minItems: 1
+    items:
+      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
+      - description: Interconnect path from mdp1 port to the data bus
+      - description: Interconnect path from rotator port to the data bus
+
+  interconnect-names:
+    minItems: 1
+    items:
+      - const: mdp0-mem
+      - const: mdp1-mem
+      - const: rotator-mem
+
+  iommus:
+    items:
+      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
+
+  power-domains:
+    maxItems: 1
+
+  operating-points-v2: true
+  opp-table:
+    type: object
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    description: |
+      Contains the list of output ports from DPU device. These ports
+      connect to interfaces that are external to the DPU hardware,
+      such as DSI, DP etc. MDP5 devices support up to 4 ports::
+      one or two DSI ports, HDMI and eDP.
+
+    patternProperties:
+      "^port@[0-3]+$":
+        $ref: /schemas/graph.yaml#/properties/port
+
+    # at least one port is required
+    required:
+      - port@0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    display-controller@1a01000 {
+        compatible = "qcom,mdp5";
+        reg = <0x1a01000 0x90000>;
+        reg-names = "mdp_phys";
+
+        interrupt-parent = <&mdss>;
+        interrupts = <0>;
+
+        clocks = <&gcc GCC_MDSS_AHB_CLK>,
+                 <&gcc GCC_MDSS_AXI_CLK>,
+                 <&gcc GCC_MDSS_MDP_CLK>,
+                 <&gcc GCC_MDSS_VSYNC_CLK>;
+        clock-names = "iface",
+                      "bus",
+                      "core",
+                      "vsync";
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+                endpoint {
+                    remote-endpoint = <&dsi0_in>;
+                };
+            };
+        };
+    };
+...
-- 
2.39.0


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

* [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-msm, dri-devel, Stephen Boyd, freedreno

Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
 - MSM8996 has additional "iommu" clock, define it separately
 - Add new properties used on some of platforms:
   - interconnects, interconnect-names
   - iommus
   - power-domains
   - operating-points-v2, opp-table

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
 .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
 2 files changed, 138 insertions(+), 132 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml

diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
deleted file mode 100644
index 65d03c58dee6..000000000000
--- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-Qualcomm adreno/snapdragon MDP5 display controller
-
-Description:
-
-This is the bindings documentation for the MDP5 display
-controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
-
-MDP5:
-Required properties:
-- compatible:
-  * "qcom,mdp5" - MDP5
-- reg: Physical base address and length of the controller's registers.
-- reg-names: The names of register regions. The following regions are required:
-  * "mdp_phys"
-- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
-- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
-- clock-names: the following clocks are required.
--   * "bus"
--   * "iface"
--   * "core"
--   * "vsync"
-- ports: contains the list of output ports from MDP. These connect to interfaces
-  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
-  special case since it is a part of the MDP block itself).
-
-  Each output port contains an endpoint that describes how it is connected to an
-  external interface. These are described by the standard properties documented
-  here:
-	Documentation/devicetree/bindings/graph.txt
-	Documentation/devicetree/bindings/media/video-interfaces.txt
-
-  The availability of output ports can vary across SoC revisions:
-
-  For MSM8974 and APQ8084:
-	 Port 0 -> MDP_INTF0 (eDP)
-	 Port 1 -> MDP_INTF1 (DSI1)
-	 Port 2 -> MDP_INTF2 (DSI2)
-	 Port 3 -> MDP_INTF3 (HDMI)
-
-  For MSM8916:
-	 Port 0 -> MDP_INTF1 (DSI1)
-
-  For MSM8994 and MSM8996:
-	 Port 0 -> MDP_INTF1 (DSI1)
-	 Port 1 -> MDP_INTF2 (DSI2)
-	 Port 2 -> MDP_INTF3 (HDMI)
-
-Optional properties:
-- clock-names: the following clocks are optional:
-  * "lut"
-  * "tbu"
-  * "tbu_rt"
-
-Example:
-
-/ {
-	...
-
-	mdss: mdss@1a00000 {
-		compatible = "qcom,mdss";
-		reg = <0x1a00000 0x1000>,
-		      <0x1ac8000 0x3000>;
-		reg-names = "mdss_phys", "vbif_phys";
-
-		power-domains = <&gcc MDSS_GDSC>;
-
-		clocks = <&gcc GCC_MDSS_AHB_CLK>,
-			 <&gcc GCC_MDSS_AXI_CLK>,
-			 <&gcc GCC_MDSS_VSYNC_CLK>;
-		clock-names = "iface",
-			      "bus",
-			      "vsync"
-
-		interrupts = <0 72 0>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		mdp: mdp@1a01000 {
-			compatible = "qcom,mdp5";
-			reg = <0x1a01000 0x90000>;
-			reg-names = "mdp_phys";
-
-			interrupt-parent = <&mdss>;
-			interrupts = <0 0>;
-
-			clocks = <&gcc GCC_MDSS_AHB_CLK>,
-				 <&gcc GCC_MDSS_AXI_CLK>,
-				 <&gcc GCC_MDSS_MDP_CLK>,
-				 <&gcc GCC_MDSS_VSYNC_CLK>;
-			clock-names = "iface",
-				      "bus",
-				      "core",
-				      "vsync";
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					mdp5_intf1_out: endpoint {
-						remote-endpoint = <&dsi0_in>;
-					};
-				};
-			};
-		};
-
-		dsi0: dsi@1a98000 {
-			...
-			ports {
-				...
-				port@0 {
-					reg = <0>;
-					dsi0_in: endpoint {
-						remote-endpoint = <&mdp5_intf1_out>;
-					};
-				};
-				...
-			};
-			...
-		};
-
-		dsi_phy0: dsi-phy@1a98300 {
-			...
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
new file mode 100644
index 000000000000..cbcbe8b47e9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
@@ -0,0 +1,138 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
+
+description: >
+  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
+  and MSM8996.
+
+maintainers:
+  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+  - Rob Clark <robdclark@gmail.com>
+
+properties:
+  compatible:
+    const: qcom,mdp5
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    items:
+      - const: mdp_phys
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 4
+    maxItems: 7
+
+  clock-names:
+    oneOf:
+      - minItems: 4
+        items:
+          - const: iface
+          - const: bus
+          - const: core
+          - const: vsync
+          - const: lut
+          - const: tbu
+          - const: tbu_rt
+        #MSM8996 has additional iommu clock
+      - items:
+          - const: iface
+          - const: bus
+          - const: core
+          - const: iommu
+          - const: vsync
+
+  interconnects:
+    minItems: 1
+    items:
+      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
+      - description: Interconnect path from mdp1 port to the data bus
+      - description: Interconnect path from rotator port to the data bus
+
+  interconnect-names:
+    minItems: 1
+    items:
+      - const: mdp0-mem
+      - const: mdp1-mem
+      - const: rotator-mem
+
+  iommus:
+    items:
+      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
+
+  power-domains:
+    maxItems: 1
+
+  operating-points-v2: true
+  opp-table:
+    type: object
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    description: |
+      Contains the list of output ports from DPU device. These ports
+      connect to interfaces that are external to the DPU hardware,
+      such as DSI, DP etc. MDP5 devices support up to 4 ports::
+      one or two DSI ports, HDMI and eDP.
+
+    patternProperties:
+      "^port@[0-3]+$":
+        $ref: /schemas/graph.yaml#/properties/port
+
+    # at least one port is required
+    required:
+      - port@0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    display-controller@1a01000 {
+        compatible = "qcom,mdp5";
+        reg = <0x1a01000 0x90000>;
+        reg-names = "mdp_phys";
+
+        interrupt-parent = <&mdss>;
+        interrupts = <0>;
+
+        clocks = <&gcc GCC_MDSS_AHB_CLK>,
+                 <&gcc GCC_MDSS_AXI_CLK>,
+                 <&gcc GCC_MDSS_MDP_CLK>,
+                 <&gcc GCC_MDSS_VSYNC_CLK>;
+        clock-names = "iface",
+                      "bus",
+                      "core",
+                      "vsync";
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+                endpoint {
+                    remote-endpoint = <&dsi0_in>;
+                };
+            };
+        };
+    };
+...
-- 
2.39.0


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

* [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
  2023-01-09  5:01 ` Dmitry Baryshkov
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
distinguishing between various platforms. For msm8998 list
qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
by either of the drivers.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
 .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
index cbcbe8b47e9b..681d6ac48d33 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
@@ -16,7 +16,22 @@ maintainers:
 
 properties:
   compatible:
-    const: qcom,mdp5
+    oneOf:
+      - const: qcom,mdp5
+        deprecated: true
+      - items:
+          - enum:
+              - qcom,apq8084-mdp5
+              - qcom,msm8916-mdp5
+              - qcom,msm8917-mdp5
+              - qcom,msm8953-mdp5
+              - qcom,msm8974-mdp5
+              - qcom,msm8976-mdp5
+              - qcom,msm8994-mdp5
+              - qcom,msm8996-mdp5
+              - qcom,sdm630-mdp5
+              - qcom,sdm660-mdp5
+          - const: qcom,mdp5
 
   reg:
     maxItems: 1
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index 7479cd96fdec..7a81a10c0a9b 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -88,7 +88,11 @@ patternProperties:
     type: object
     properties:
       compatible:
-        const: qcom,mdp5
+        oneOf:
+          - const: qcom,mdp5
+          - items:
+              - {}
+              - const: qcom,mdp5
 
   "^dsi@[1-9a-f][0-9a-f]*$":
     type: object
-- 
2.39.0


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

* [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom, mdp5.yaml
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-msm, dri-devel, Stephen Boyd, freedreno

Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
distinguishing between various platforms. For msm8998 list
qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
by either of the drivers.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
 .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
index cbcbe8b47e9b..681d6ac48d33 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
@@ -16,7 +16,22 @@ maintainers:
 
 properties:
   compatible:
-    const: qcom,mdp5
+    oneOf:
+      - const: qcom,mdp5
+        deprecated: true
+      - items:
+          - enum:
+              - qcom,apq8084-mdp5
+              - qcom,msm8916-mdp5
+              - qcom,msm8917-mdp5
+              - qcom,msm8953-mdp5
+              - qcom,msm8974-mdp5
+              - qcom,msm8976-mdp5
+              - qcom,msm8994-mdp5
+              - qcom,msm8996-mdp5
+              - qcom,sdm630-mdp5
+              - qcom,sdm660-mdp5
+          - const: qcom,mdp5
 
   reg:
     maxItems: 1
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index 7479cd96fdec..7a81a10c0a9b 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -88,7 +88,11 @@ patternProperties:
     type: object
     properties:
       compatible:
-        const: qcom,mdp5
+        oneOf:
+          - const: qcom,mdp5
+          - items:
+              - {}
+              - const: qcom,mdp5
 
   "^dsi@[1-9a-f][0-9a-f]*$":
     type: object
-- 
2.39.0


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

* [PATCH v5 3/4] ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
  2023-01-09  5:01 ` Dmitry Baryshkov
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

Add SoC-specific compat string to the MDP5 device node to ease
distinguishing between various platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 8d216a3c0851..0cd59088f9c7 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1549,7 +1549,7 @@ mdss: mdss@fd900000 {
 			ranges;
 
 			mdp: mdp@fd900000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8974-mdp5", "qcom,mdp5";
 				reg = <0xfd900100 0x22000>;
 				reg-names = "mdp_phys";
 
-- 
2.39.0


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

* [PATCH v5 3/4] ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-msm, dri-devel, Stephen Boyd, freedreno

Add SoC-specific compat string to the MDP5 device node to ease
distinguishing between various platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 8d216a3c0851..0cd59088f9c7 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1549,7 +1549,7 @@ mdss: mdss@fd900000 {
 			ranges;
 
 			mdp: mdp@fd900000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8974-mdp5", "qcom,mdp5";
 				reg = <0xfd900100 0x22000>;
 				reg-names = "mdp_phys";
 
-- 
2.39.0


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

* [PATCH v5 4/4] arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes
  2023-01-09  5:01 ` Dmitry Baryshkov
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

Add SoC-specific compat string to the MDP5 device nodes to ease
distinguishing between various platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi  | 2 +-
 arch/arm64/boot/dts/qcom/sdm660.dtsi  | 2 ++
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a..0a23fb6efae8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -989,7 +989,7 @@ mdss: mdss@1a00000 {
 			ranges;
 
 			mdp: mdp@1a01000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8916-mdp5", "qcom,mdp5";
 				reg = <0x01a01000 0x89000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index d31464204f69..b5cd1bcad5eb 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -931,7 +931,7 @@ mdss: mdss@900000 {
 			status = "disabled";
 
 			mdp: mdp@901000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8996-mdp5", "qcom,mdp5";
 				reg = <0x00901000 0x90000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 13e6a4fbba27..65addd4c672e 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1498,7 +1498,7 @@ mdss: mdss@c900000 {
 			status = "disabled";
 
 			mdp: mdp@c901000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,sdm630-mdp5", "qcom,mdp5";
 				reg = <0x0c901000 0x89000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index d52123cb5cd3..cdaa0d7a66f3 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -142,6 +142,8 @@ &gpucc {
 };
 
 &mdp {
+	compatible = "qcom,sdm660-mdp5", "qcom,mdp5";
+
 	ports {
 		port@1 {
 			reg = <1>;
-- 
2.39.0


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

* [PATCH v5 4/4] arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes
@ 2023-01-09  5:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-09  5:01 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski
  Cc: devicetree, linux-arm-msm, dri-devel, Stephen Boyd, freedreno

Add SoC-specific compat string to the MDP5 device nodes to ease
distinguishing between various platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi  | 2 +-
 arch/arm64/boot/dts/qcom/sdm660.dtsi  | 2 ++
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a..0a23fb6efae8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -989,7 +989,7 @@ mdss: mdss@1a00000 {
 			ranges;
 
 			mdp: mdp@1a01000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8916-mdp5", "qcom,mdp5";
 				reg = <0x01a01000 0x89000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index d31464204f69..b5cd1bcad5eb 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -931,7 +931,7 @@ mdss: mdss@900000 {
 			status = "disabled";
 
 			mdp: mdp@901000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,msm8996-mdp5", "qcom,mdp5";
 				reg = <0x00901000 0x90000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 13e6a4fbba27..65addd4c672e 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1498,7 +1498,7 @@ mdss: mdss@c900000 {
 			status = "disabled";
 
 			mdp: mdp@c901000 {
-				compatible = "qcom,mdp5";
+				compatible = "qcom,sdm630-mdp5", "qcom,mdp5";
 				reg = <0x0c901000 0x89000>;
 				reg-names = "mdp_phys";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index d52123cb5cd3..cdaa0d7a66f3 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -142,6 +142,8 @@ &gpucc {
 };
 
 &mdp {
+	compatible = "qcom,sdm660-mdp5", "qcom,mdp5";
+
 	ports {
 		port@1 {
 			reg = <1>;
-- 
2.39.0


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-09  5:01   ` Dmitry Baryshkov
@ 2023-01-09  7:49     ` Marijn Suijten
  -1 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-09  7:49 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski, Stephen Boyd,
	David Airlie, Daniel Vetter, linux-arm-msm, devicetree,
	dri-devel, freedreno

On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>  - MSM8996 has additional "iommu" clock, define it separately
>  - Add new properties used on some of platforms:
>    - interconnects, interconnect-names
>    - iommus
>    - power-domains
>    - operating-points-v2, opp-table
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>  .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>  2 files changed, 138 insertions(+), 132 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>  create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
> deleted file mode 100644
> index 65d03c58dee6..000000000000
> --- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
> +++ /dev/null
> @@ -1,132 +0,0 @@
> -Qualcomm adreno/snapdragon MDP5 display controller
> -
> -Description:
> -
> -This is the bindings documentation for the MDP5 display
> -controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
> -
> -MDP5:
> -Required properties:
> -- compatible:
> -  * "qcom,mdp5" - MDP5
> -- reg: Physical base address and length of the controller's registers.
> -- reg-names: The names of register regions. The following regions are required:
> -  * "mdp_phys"
> -- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
> -- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
> -- clock-names: the following clocks are required.
> --   * "bus"
> --   * "iface"
> --   * "core"
> --   * "vsync"
> -- ports: contains the list of output ports from MDP. These connect to interfaces
> -  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
> -  special case since it is a part of the MDP block itself).
> -
> -  Each output port contains an endpoint that describes how it is connected to an
> -  external interface. These are described by the standard properties documented
> -  here:
> -	Documentation/devicetree/bindings/graph.txt
> -	Documentation/devicetree/bindings/media/video-interfaces.txt
> -
> -  The availability of output ports can vary across SoC revisions:
> -
> -  For MSM8974 and APQ8084:
> -	 Port 0 -> MDP_INTF0 (eDP)
> -	 Port 1 -> MDP_INTF1 (DSI1)
> -	 Port 2 -> MDP_INTF2 (DSI2)
> -	 Port 3 -> MDP_INTF3 (HDMI)
> -
> -  For MSM8916:
> -	 Port 0 -> MDP_INTF1 (DSI1)
> -
> -  For MSM8994 and MSM8996:
> -	 Port 0 -> MDP_INTF1 (DSI1)
> -	 Port 1 -> MDP_INTF2 (DSI2)
> -	 Port 2 -> MDP_INTF3 (HDMI)
> -
> -Optional properties:
> -- clock-names: the following clocks are optional:
> -  * "lut"
> -  * "tbu"
> -  * "tbu_rt"
> -
> -Example:
> -
> -/ {
> -	...
> -
> -	mdss: mdss@1a00000 {
> -		compatible = "qcom,mdss";
> -		reg = <0x1a00000 0x1000>,
> -		      <0x1ac8000 0x3000>;
> -		reg-names = "mdss_phys", "vbif_phys";
> -
> -		power-domains = <&gcc MDSS_GDSC>;
> -
> -		clocks = <&gcc GCC_MDSS_AHB_CLK>,
> -			 <&gcc GCC_MDSS_AXI_CLK>,
> -			 <&gcc GCC_MDSS_VSYNC_CLK>;
> -		clock-names = "iface",
> -			      "bus",
> -			      "vsync"
> -
> -		interrupts = <0 72 0>;
> -
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		ranges;
> -
> -		mdp: mdp@1a01000 {
> -			compatible = "qcom,mdp5";
> -			reg = <0x1a01000 0x90000>;
> -			reg-names = "mdp_phys";
> -
> -			interrupt-parent = <&mdss>;
> -			interrupts = <0 0>;
> -
> -			clocks = <&gcc GCC_MDSS_AHB_CLK>,
> -				 <&gcc GCC_MDSS_AXI_CLK>,
> -				 <&gcc GCC_MDSS_MDP_CLK>,
> -				 <&gcc GCC_MDSS_VSYNC_CLK>;
> -			clock-names = "iface",
> -				      "bus",
> -				      "core",
> -				      "vsync";
> -
> -			ports {
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -
> -				port@0 {
> -					reg = <0>;
> -					mdp5_intf1_out: endpoint {
> -						remote-endpoint = <&dsi0_in>;
> -					};
> -				};
> -			};
> -		};
> -
> -		dsi0: dsi@1a98000 {
> -			...
> -			ports {
> -				...
> -				port@0 {
> -					reg = <0>;
> -					dsi0_in: endpoint {
> -						remote-endpoint = <&mdp5_intf1_out>;
> -					};
> -				};
> -				...
> -			};
> -			...
> -		};
> -
> -		dsi_phy0: dsi-phy@1a98300 {
> -			...
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> new file mode 100644
> index 000000000000..cbcbe8b47e9b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> @@ -0,0 +1,138 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
> +
> +description: >
> +  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
> +  and MSM8996.
> +
> +maintainers:
> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> +  - Rob Clark <robdclark@gmail.com>
> +
> +properties:
> +  compatible:
> +    const: qcom,mdp5
> +
> +  reg:
> +    maxItems: 1
> +
> +  reg-names:
> +    items:
> +      - const: mdp_phys
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 4
> +    maxItems: 7
> +
> +  clock-names:
> +    oneOf:
> +      - minItems: 4
> +        items:
> +          - const: iface
> +          - const: bus
> +          - const: core
> +          - const: vsync
> +          - const: lut
> +          - const: tbu
> +          - const: tbu_rt
> +        #MSM8996 has additional iommu clock
> +      - items:
> +          - const: iface
> +          - const: bus
> +          - const: core
> +          - const: iommu
> +          - const: vsync
> +
> +  interconnects:
> +    minItems: 1
> +    items:
> +      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
> +      - description: Interconnect path from mdp1 port to the data bus
> +      - description: Interconnect path from rotator port to the data bus
> +
> +  interconnect-names:
> +    minItems: 1
> +    items:
> +      - const: mdp0-mem
> +      - const: mdp1-mem
> +      - const: rotator-mem
> +
> +  iommus:
> +    items:
> +      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0

As Krzysztof has said many times, these documents describe the hardware,
not the DT format.  Drop the "phandle" part.

> +  power-domains:
> +    maxItems: 1
> +
> +  operating-points-v2: true
> +  opp-table:
> +    type: object
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description: |

Should multiline descriptions be treated as a oneline string with `>`?

> +      Contains the list of output ports from DPU device. These ports
> +      connect to interfaces that are external to the DPU hardware,
> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::

How do these double colons render?  Is this intentional?

- Marijn

> +      one or two DSI ports, HDMI and eDP.
> +
> +    patternProperties:
> +      "^port@[0-3]+$":
> +        $ref: /schemas/graph.yaml#/properties/port
> +
> +    # at least one port is required
> +    required:
> +      - port@0
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    display-controller@1a01000 {
> +        compatible = "qcom,mdp5";
> +        reg = <0x1a01000 0x90000>;
> +        reg-names = "mdp_phys";
> +
> +        interrupt-parent = <&mdss>;
> +        interrupts = <0>;
> +
> +        clocks = <&gcc GCC_MDSS_AHB_CLK>,
> +                 <&gcc GCC_MDSS_AXI_CLK>,
> +                 <&gcc GCC_MDSS_MDP_CLK>,
> +                 <&gcc GCC_MDSS_VSYNC_CLK>;
> +        clock-names = "iface",
> +                      "bus",
> +                      "core",
> +                      "vsync";
> +
> +        ports {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            port@0 {
> +                reg = <0>;
> +                endpoint {
> +                    remote-endpoint = <&dsi0_in>;
> +                };
> +            };
> +        };
> +    };
> +...
> -- 
> 2.39.0
> 

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-09  7:49     ` Marijn Suijten
  0 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-09  7:49 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, Rob Herring,
	Stephen Boyd, Konrad Dybcio, Andy Gross, dri-devel,
	Krzysztof Kozlowski, linux-arm-msm, freedreno, Sean Paul

On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>  - MSM8996 has additional "iommu" clock, define it separately
>  - Add new properties used on some of platforms:
>    - interconnects, interconnect-names
>    - iommus
>    - power-domains
>    - operating-points-v2, opp-table
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>  .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>  2 files changed, 138 insertions(+), 132 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>  create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
> deleted file mode 100644
> index 65d03c58dee6..000000000000
> --- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
> +++ /dev/null
> @@ -1,132 +0,0 @@
> -Qualcomm adreno/snapdragon MDP5 display controller
> -
> -Description:
> -
> -This is the bindings documentation for the MDP5 display
> -controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
> -
> -MDP5:
> -Required properties:
> -- compatible:
> -  * "qcom,mdp5" - MDP5
> -- reg: Physical base address and length of the controller's registers.
> -- reg-names: The names of register regions. The following regions are required:
> -  * "mdp_phys"
> -- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
> -- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
> -- clock-names: the following clocks are required.
> --   * "bus"
> --   * "iface"
> --   * "core"
> --   * "vsync"
> -- ports: contains the list of output ports from MDP. These connect to interfaces
> -  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
> -  special case since it is a part of the MDP block itself).
> -
> -  Each output port contains an endpoint that describes how it is connected to an
> -  external interface. These are described by the standard properties documented
> -  here:
> -	Documentation/devicetree/bindings/graph.txt
> -	Documentation/devicetree/bindings/media/video-interfaces.txt
> -
> -  The availability of output ports can vary across SoC revisions:
> -
> -  For MSM8974 and APQ8084:
> -	 Port 0 -> MDP_INTF0 (eDP)
> -	 Port 1 -> MDP_INTF1 (DSI1)
> -	 Port 2 -> MDP_INTF2 (DSI2)
> -	 Port 3 -> MDP_INTF3 (HDMI)
> -
> -  For MSM8916:
> -	 Port 0 -> MDP_INTF1 (DSI1)
> -
> -  For MSM8994 and MSM8996:
> -	 Port 0 -> MDP_INTF1 (DSI1)
> -	 Port 1 -> MDP_INTF2 (DSI2)
> -	 Port 2 -> MDP_INTF3 (HDMI)
> -
> -Optional properties:
> -- clock-names: the following clocks are optional:
> -  * "lut"
> -  * "tbu"
> -  * "tbu_rt"
> -
> -Example:
> -
> -/ {
> -	...
> -
> -	mdss: mdss@1a00000 {
> -		compatible = "qcom,mdss";
> -		reg = <0x1a00000 0x1000>,
> -		      <0x1ac8000 0x3000>;
> -		reg-names = "mdss_phys", "vbif_phys";
> -
> -		power-domains = <&gcc MDSS_GDSC>;
> -
> -		clocks = <&gcc GCC_MDSS_AHB_CLK>,
> -			 <&gcc GCC_MDSS_AXI_CLK>,
> -			 <&gcc GCC_MDSS_VSYNC_CLK>;
> -		clock-names = "iface",
> -			      "bus",
> -			      "vsync"
> -
> -		interrupts = <0 72 0>;
> -
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		ranges;
> -
> -		mdp: mdp@1a01000 {
> -			compatible = "qcom,mdp5";
> -			reg = <0x1a01000 0x90000>;
> -			reg-names = "mdp_phys";
> -
> -			interrupt-parent = <&mdss>;
> -			interrupts = <0 0>;
> -
> -			clocks = <&gcc GCC_MDSS_AHB_CLK>,
> -				 <&gcc GCC_MDSS_AXI_CLK>,
> -				 <&gcc GCC_MDSS_MDP_CLK>,
> -				 <&gcc GCC_MDSS_VSYNC_CLK>;
> -			clock-names = "iface",
> -				      "bus",
> -				      "core",
> -				      "vsync";
> -
> -			ports {
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -
> -				port@0 {
> -					reg = <0>;
> -					mdp5_intf1_out: endpoint {
> -						remote-endpoint = <&dsi0_in>;
> -					};
> -				};
> -			};
> -		};
> -
> -		dsi0: dsi@1a98000 {
> -			...
> -			ports {
> -				...
> -				port@0 {
> -					reg = <0>;
> -					dsi0_in: endpoint {
> -						remote-endpoint = <&mdp5_intf1_out>;
> -					};
> -				};
> -				...
> -			};
> -			...
> -		};
> -
> -		dsi_phy0: dsi-phy@1a98300 {
> -			...
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> new file mode 100644
> index 000000000000..cbcbe8b47e9b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> @@ -0,0 +1,138 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
> +
> +description: >
> +  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
> +  and MSM8996.
> +
> +maintainers:
> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> +  - Rob Clark <robdclark@gmail.com>
> +
> +properties:
> +  compatible:
> +    const: qcom,mdp5
> +
> +  reg:
> +    maxItems: 1
> +
> +  reg-names:
> +    items:
> +      - const: mdp_phys
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 4
> +    maxItems: 7
> +
> +  clock-names:
> +    oneOf:
> +      - minItems: 4
> +        items:
> +          - const: iface
> +          - const: bus
> +          - const: core
> +          - const: vsync
> +          - const: lut
> +          - const: tbu
> +          - const: tbu_rt
> +        #MSM8996 has additional iommu clock
> +      - items:
> +          - const: iface
> +          - const: bus
> +          - const: core
> +          - const: iommu
> +          - const: vsync
> +
> +  interconnects:
> +    minItems: 1
> +    items:
> +      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
> +      - description: Interconnect path from mdp1 port to the data bus
> +      - description: Interconnect path from rotator port to the data bus
> +
> +  interconnect-names:
> +    minItems: 1
> +    items:
> +      - const: mdp0-mem
> +      - const: mdp1-mem
> +      - const: rotator-mem
> +
> +  iommus:
> +    items:
> +      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0

As Krzysztof has said many times, these documents describe the hardware,
not the DT format.  Drop the "phandle" part.

> +  power-domains:
> +    maxItems: 1
> +
> +  operating-points-v2: true
> +  opp-table:
> +    type: object
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description: |

Should multiline descriptions be treated as a oneline string with `>`?

> +      Contains the list of output ports from DPU device. These ports
> +      connect to interfaces that are external to the DPU hardware,
> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::

How do these double colons render?  Is this intentional?

- Marijn

> +      one or two DSI ports, HDMI and eDP.
> +
> +    patternProperties:
> +      "^port@[0-3]+$":
> +        $ref: /schemas/graph.yaml#/properties/port
> +
> +    # at least one port is required
> +    required:
> +      - port@0
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    display-controller@1a01000 {
> +        compatible = "qcom,mdp5";
> +        reg = <0x1a01000 0x90000>;
> +        reg-names = "mdp_phys";
> +
> +        interrupt-parent = <&mdss>;
> +        interrupts = <0>;
> +
> +        clocks = <&gcc GCC_MDSS_AHB_CLK>,
> +                 <&gcc GCC_MDSS_AXI_CLK>,
> +                 <&gcc GCC_MDSS_MDP_CLK>,
> +                 <&gcc GCC_MDSS_VSYNC_CLK>;
> +        clock-names = "iface",
> +                      "bus",
> +                      "core",
> +                      "vsync";
> +
> +        ports {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            port@0 {
> +                reg = <0>;
> +                endpoint {
> +                    remote-endpoint = <&dsi0_in>;
> +                };
> +            };
> +        };
> +    };
> +...
> -- 
> 2.39.0
> 

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-09  5:01   ` Dmitry Baryshkov
@ 2023-01-09 14:30     ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-09 14:30 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Sean Paul, Abhinav Kumar, Konrad Dybcio, Andy Gross, Rob Herring,
	David Airlie, Daniel Vetter, linux-arm-msm, dri-devel,
	Bjorn Andersson, freedreno, devicetree, Krzysztof Kozlowski,
	Stephen Boyd, Rob Clark


On Mon, 09 Jan 2023 07:01:49 +0200, Dmitry Baryshkov wrote:
> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>  - MSM8996 has additional "iommu" clock, define it separately
>  - Add new properties used on some of platforms:
>    - interconnects, interconnect-names
>    - iommus
>    - power-domains
>    - operating-points-v2, opp-table
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>  .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>  2 files changed, 138 insertions(+), 132 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>  create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230109050152.316606-2-dmitry.baryshkov@linaro.org


mdp@1a01000: compatible:0: 'qcom,mdp5' was expected
	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb

mdp@1a01000: compatible: ['qcom,msm8953-mdp5', 'qcom,mdp5'] is too long
	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-09 14:30     ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-09 14:30 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Krzysztof Kozlowski, devicetree, Sean Paul,
	Bjorn Andersson, Abhinav Kumar, Rob Herring, Stephen Boyd,
	Konrad Dybcio, Andy Gross, dri-devel, linux-arm-msm


On Mon, 09 Jan 2023 07:01:49 +0200, Dmitry Baryshkov wrote:
> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>  - MSM8996 has additional "iommu" clock, define it separately
>  - Add new properties used on some of platforms:
>    - interconnects, interconnect-names
>    - iommus
>    - power-domains
>    - operating-points-v2, opp-table
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>  .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>  2 files changed, 138 insertions(+), 132 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>  create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230109050152.316606-2-dmitry.baryshkov@linaro.org


mdp@1a01000: compatible:0: 'qcom,mdp5' was expected
	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb

mdp@1a01000: compatible: ['qcom,msm8953-mdp5', 'qcom,mdp5'] is too long
	arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dtb


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-09  7:49     ` Marijn Suijten
@ 2023-01-10  4:40       ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-10  4:40 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski, Stephen Boyd,
	David Airlie, Daniel Vetter, linux-arm-msm, devicetree,
	dri-devel, freedreno

On 09/01/2023 09:49, Marijn Suijten wrote:
> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
>> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>>   - MSM8996 has additional "iommu" clock, define it separately
>>   - Add new properties used on some of platforms:
>>     - interconnects, interconnect-names
>>     - iommus
>>     - power-domains
>>     - operating-points-v2, opp-table
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>>   .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>>   2 files changed, 138 insertions(+), 132 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>>   create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
>> deleted file mode 100644
>> index 65d03c58dee6..000000000000
>> --- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
>> +++ /dev/null
>> @@ -1,132 +0,0 @@
>> -Qualcomm adreno/snapdragon MDP5 display controller
>> -
>> -Description:
>> -
>> -This is the bindings documentation for the MDP5 display
>> -controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
>> -
>> -MDP5:
>> -Required properties:
>> -- compatible:
>> -  * "qcom,mdp5" - MDP5
>> -- reg: Physical base address and length of the controller's registers.
>> -- reg-names: The names of register regions. The following regions are required:
>> -  * "mdp_phys"
>> -- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
>> -- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
>> -- clock-names: the following clocks are required.
>> --   * "bus"
>> --   * "iface"
>> --   * "core"
>> --   * "vsync"
>> -- ports: contains the list of output ports from MDP. These connect to interfaces
>> -  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
>> -  special case since it is a part of the MDP block itself).
>> -
>> -  Each output port contains an endpoint that describes how it is connected to an
>> -  external interface. These are described by the standard properties documented
>> -  here:
>> -	Documentation/devicetree/bindings/graph.txt
>> -	Documentation/devicetree/bindings/media/video-interfaces.txt
>> -
>> -  The availability of output ports can vary across SoC revisions:
>> -
>> -  For MSM8974 and APQ8084:
>> -	 Port 0 -> MDP_INTF0 (eDP)
>> -	 Port 1 -> MDP_INTF1 (DSI1)
>> -	 Port 2 -> MDP_INTF2 (DSI2)
>> -	 Port 3 -> MDP_INTF3 (HDMI)
>> -
>> -  For MSM8916:
>> -	 Port 0 -> MDP_INTF1 (DSI1)
>> -
>> -  For MSM8994 and MSM8996:
>> -	 Port 0 -> MDP_INTF1 (DSI1)
>> -	 Port 1 -> MDP_INTF2 (DSI2)
>> -	 Port 2 -> MDP_INTF3 (HDMI)
>> -
>> -Optional properties:
>> -- clock-names: the following clocks are optional:
>> -  * "lut"
>> -  * "tbu"
>> -  * "tbu_rt"
>> -
>> -Example:
>> -
>> -/ {
>> -	...
>> -
>> -	mdss: mdss@1a00000 {
>> -		compatible = "qcom,mdss";
>> -		reg = <0x1a00000 0x1000>,
>> -		      <0x1ac8000 0x3000>;
>> -		reg-names = "mdss_phys", "vbif_phys";
>> -
>> -		power-domains = <&gcc MDSS_GDSC>;
>> -
>> -		clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> -			 <&gcc GCC_MDSS_AXI_CLK>,
>> -			 <&gcc GCC_MDSS_VSYNC_CLK>;
>> -		clock-names = "iface",
>> -			      "bus",
>> -			      "vsync"
>> -
>> -		interrupts = <0 72 0>;
>> -
>> -		interrupt-controller;
>> -		#interrupt-cells = <1>;
>> -
>> -		#address-cells = <1>;
>> -		#size-cells = <1>;
>> -		ranges;
>> -
>> -		mdp: mdp@1a01000 {
>> -			compatible = "qcom,mdp5";
>> -			reg = <0x1a01000 0x90000>;
>> -			reg-names = "mdp_phys";
>> -
>> -			interrupt-parent = <&mdss>;
>> -			interrupts = <0 0>;
>> -
>> -			clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> -				 <&gcc GCC_MDSS_AXI_CLK>,
>> -				 <&gcc GCC_MDSS_MDP_CLK>,
>> -				 <&gcc GCC_MDSS_VSYNC_CLK>;
>> -			clock-names = "iface",
>> -				      "bus",
>> -				      "core",
>> -				      "vsync";
>> -
>> -			ports {
>> -				#address-cells = <1>;
>> -				#size-cells = <0>;
>> -
>> -				port@0 {
>> -					reg = <0>;
>> -					mdp5_intf1_out: endpoint {
>> -						remote-endpoint = <&dsi0_in>;
>> -					};
>> -				};
>> -			};
>> -		};
>> -
>> -		dsi0: dsi@1a98000 {
>> -			...
>> -			ports {
>> -				...
>> -				port@0 {
>> -					reg = <0>;
>> -					dsi0_in: endpoint {
>> -						remote-endpoint = <&mdp5_intf1_out>;
>> -					};
>> -				};
>> -				...
>> -			};
>> -			...
>> -		};
>> -
>> -		dsi_phy0: dsi-phy@1a98300 {
>> -			...
>> -		};
>> -	};
>> -};
>> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>> new file mode 100644
>> index 000000000000..cbcbe8b47e9b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>> @@ -0,0 +1,138 @@
>> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
>> +
>> +description: >
>> +  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
>> +  and MSM8996.
>> +
>> +maintainers:
>> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> +  - Rob Clark <robdclark@gmail.com>
>> +
>> +properties:
>> +  compatible:
>> +    const: qcom,mdp5
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  reg-names:
>> +    items:
>> +      - const: mdp_phys
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    minItems: 4
>> +    maxItems: 7
>> +
>> +  clock-names:
>> +    oneOf:
>> +      - minItems: 4
>> +        items:
>> +          - const: iface
>> +          - const: bus
>> +          - const: core
>> +          - const: vsync
>> +          - const: lut
>> +          - const: tbu
>> +          - const: tbu_rt
>> +        #MSM8996 has additional iommu clock
>> +      - items:
>> +          - const: iface
>> +          - const: bus
>> +          - const: core
>> +          - const: iommu
>> +          - const: vsync
>> +
>> +  interconnects:
>> +    minItems: 1
>> +    items:
>> +      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
>> +      - description: Interconnect path from mdp1 port to the data bus
>> +      - description: Interconnect path from rotator port to the data bus
>> +
>> +  interconnect-names:
>> +    minItems: 1
>> +    items:
>> +      - const: mdp0-mem
>> +      - const: mdp1-mem
>> +      - const: rotator-mem
>> +
>> +  iommus:
>> +    items:
>> +      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
> 
> As Krzysztof has said many times, these documents describe the hardware,
> not the DT format.  Drop the "phandle" part.

Ack

> 
>> +  power-domains:
>> +    maxItems: 1
>> +
>> +  operating-points-v2: true
>> +  opp-table:
>> +    type: object
>> +
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
>> +    description: |
> 
> Should multiline descriptions be treated as a oneline string with `>`?

Ack, I'm fine with either of them, let's use the >

> 
>> +      Contains the list of output ports from DPU device. These ports
>> +      connect to interfaces that are external to the DPU hardware,
>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> 
> How do these double colons render?  Is this intentional?

double colons is an escape for a single colon if I remember correcly.

BTW: how to render the DT schema?

> 
> - Marijn
> 
>> +      one or two DSI ports, HDMI and eDP.
>> +
>> +    patternProperties:
>> +      "^port@[0-3]+$":
>> +        $ref: /schemas/graph.yaml#/properties/port
>> +
>> +    # at least one port is required
>> +    required:
>> +      - port@0
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - clocks
>> +  - clock-names
>> +  - ports
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    display-controller@1a01000 {
>> +        compatible = "qcom,mdp5";
>> +        reg = <0x1a01000 0x90000>;
>> +        reg-names = "mdp_phys";
>> +
>> +        interrupt-parent = <&mdss>;
>> +        interrupts = <0>;
>> +
>> +        clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> +                 <&gcc GCC_MDSS_AXI_CLK>,
>> +                 <&gcc GCC_MDSS_MDP_CLK>,
>> +                 <&gcc GCC_MDSS_VSYNC_CLK>;
>> +        clock-names = "iface",
>> +                      "bus",
>> +                      "core",
>> +                      "vsync";
>> +
>> +        ports {
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +
>> +            port@0 {
>> +                reg = <0>;
>> +                endpoint {
>> +                    remote-endpoint = <&dsi0_in>;
>> +                };
>> +            };
>> +        };
>> +    };
>> +...
>> -- 
>> 2.39.0
>>

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-10  4:40       ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-10  4:40 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, Rob Herring,
	Stephen Boyd, Konrad Dybcio, Andy Gross, dri-devel,
	Krzysztof Kozlowski, linux-arm-msm, freedreno, Sean Paul

On 09/01/2023 09:49, Marijn Suijten wrote:
> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
>> Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema:
>>   - MSM8996 has additional "iommu" clock, define it separately
>>   - Add new properties used on some of platforms:
>>     - interconnects, interconnect-names
>>     - iommus
>>     - power-domains
>>     - operating-points-v2, opp-table
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../devicetree/bindings/display/msm/mdp5.txt  | 132 -----------------
>>   .../bindings/display/msm/qcom,mdp5.yaml       | 138 ++++++++++++++++++
>>   2 files changed, 138 insertions(+), 132 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
>>   create mode 100644 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/mdp5.txt b/Documentation/devicetree/bindings/display/msm/mdp5.txt
>> deleted file mode 100644
>> index 65d03c58dee6..000000000000
>> --- a/Documentation/devicetree/bindings/display/msm/mdp5.txt
>> +++ /dev/null
>> @@ -1,132 +0,0 @@
>> -Qualcomm adreno/snapdragon MDP5 display controller
>> -
>> -Description:
>> -
>> -This is the bindings documentation for the MDP5 display
>> -controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996.
>> -
>> -MDP5:
>> -Required properties:
>> -- compatible:
>> -  * "qcom,mdp5" - MDP5
>> -- reg: Physical base address and length of the controller's registers.
>> -- reg-names: The names of register regions. The following regions are required:
>> -  * "mdp_phys"
>> -- interrupts: Interrupt line from MDP5 to MDSS interrupt controller.
>> -- clocks: device clocks. See ../clocks/clock-bindings.txt for details.
>> -- clock-names: the following clocks are required.
>> --   * "bus"
>> --   * "iface"
>> --   * "core"
>> --   * "vsync"
>> -- ports: contains the list of output ports from MDP. These connect to interfaces
>> -  that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a
>> -  special case since it is a part of the MDP block itself).
>> -
>> -  Each output port contains an endpoint that describes how it is connected to an
>> -  external interface. These are described by the standard properties documented
>> -  here:
>> -	Documentation/devicetree/bindings/graph.txt
>> -	Documentation/devicetree/bindings/media/video-interfaces.txt
>> -
>> -  The availability of output ports can vary across SoC revisions:
>> -
>> -  For MSM8974 and APQ8084:
>> -	 Port 0 -> MDP_INTF0 (eDP)
>> -	 Port 1 -> MDP_INTF1 (DSI1)
>> -	 Port 2 -> MDP_INTF2 (DSI2)
>> -	 Port 3 -> MDP_INTF3 (HDMI)
>> -
>> -  For MSM8916:
>> -	 Port 0 -> MDP_INTF1 (DSI1)
>> -
>> -  For MSM8994 and MSM8996:
>> -	 Port 0 -> MDP_INTF1 (DSI1)
>> -	 Port 1 -> MDP_INTF2 (DSI2)
>> -	 Port 2 -> MDP_INTF3 (HDMI)
>> -
>> -Optional properties:
>> -- clock-names: the following clocks are optional:
>> -  * "lut"
>> -  * "tbu"
>> -  * "tbu_rt"
>> -
>> -Example:
>> -
>> -/ {
>> -	...
>> -
>> -	mdss: mdss@1a00000 {
>> -		compatible = "qcom,mdss";
>> -		reg = <0x1a00000 0x1000>,
>> -		      <0x1ac8000 0x3000>;
>> -		reg-names = "mdss_phys", "vbif_phys";
>> -
>> -		power-domains = <&gcc MDSS_GDSC>;
>> -
>> -		clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> -			 <&gcc GCC_MDSS_AXI_CLK>,
>> -			 <&gcc GCC_MDSS_VSYNC_CLK>;
>> -		clock-names = "iface",
>> -			      "bus",
>> -			      "vsync"
>> -
>> -		interrupts = <0 72 0>;
>> -
>> -		interrupt-controller;
>> -		#interrupt-cells = <1>;
>> -
>> -		#address-cells = <1>;
>> -		#size-cells = <1>;
>> -		ranges;
>> -
>> -		mdp: mdp@1a01000 {
>> -			compatible = "qcom,mdp5";
>> -			reg = <0x1a01000 0x90000>;
>> -			reg-names = "mdp_phys";
>> -
>> -			interrupt-parent = <&mdss>;
>> -			interrupts = <0 0>;
>> -
>> -			clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> -				 <&gcc GCC_MDSS_AXI_CLK>,
>> -				 <&gcc GCC_MDSS_MDP_CLK>,
>> -				 <&gcc GCC_MDSS_VSYNC_CLK>;
>> -			clock-names = "iface",
>> -				      "bus",
>> -				      "core",
>> -				      "vsync";
>> -
>> -			ports {
>> -				#address-cells = <1>;
>> -				#size-cells = <0>;
>> -
>> -				port@0 {
>> -					reg = <0>;
>> -					mdp5_intf1_out: endpoint {
>> -						remote-endpoint = <&dsi0_in>;
>> -					};
>> -				};
>> -			};
>> -		};
>> -
>> -		dsi0: dsi@1a98000 {
>> -			...
>> -			ports {
>> -				...
>> -				port@0 {
>> -					reg = <0>;
>> -					dsi0_in: endpoint {
>> -						remote-endpoint = <&mdp5_intf1_out>;
>> -					};
>> -				};
>> -				...
>> -			};
>> -			...
>> -		};
>> -
>> -		dsi_phy0: dsi-phy@1a98300 {
>> -			...
>> -		};
>> -	};
>> -};
>> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>> new file mode 100644
>> index 000000000000..cbcbe8b47e9b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
>> @@ -0,0 +1,138 @@
>> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5)
>> +
>> +description: >
>> +  MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994
>> +  and MSM8996.
>> +
>> +maintainers:
>> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> +  - Rob Clark <robdclark@gmail.com>
>> +
>> +properties:
>> +  compatible:
>> +    const: qcom,mdp5
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  reg-names:
>> +    items:
>> +      - const: mdp_phys
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    minItems: 4
>> +    maxItems: 7
>> +
>> +  clock-names:
>> +    oneOf:
>> +      - minItems: 4
>> +        items:
>> +          - const: iface
>> +          - const: bus
>> +          - const: core
>> +          - const: vsync
>> +          - const: lut
>> +          - const: tbu
>> +          - const: tbu_rt
>> +        #MSM8996 has additional iommu clock
>> +      - items:
>> +          - const: iface
>> +          - const: bus
>> +          - const: core
>> +          - const: iommu
>> +          - const: vsync
>> +
>> +  interconnects:
>> +    minItems: 1
>> +    items:
>> +      - description: Interconnect path from mdp0 (or a single mdp) port to the data bus
>> +      - description: Interconnect path from mdp1 port to the data bus
>> +      - description: Interconnect path from rotator port to the data bus
>> +
>> +  interconnect-names:
>> +    minItems: 1
>> +    items:
>> +      - const: mdp0-mem
>> +      - const: mdp1-mem
>> +      - const: rotator-mem
>> +
>> +  iommus:
>> +    items:
>> +      - description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
> 
> As Krzysztof has said many times, these documents describe the hardware,
> not the DT format.  Drop the "phandle" part.

Ack

> 
>> +  power-domains:
>> +    maxItems: 1
>> +
>> +  operating-points-v2: true
>> +  opp-table:
>> +    type: object
>> +
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
>> +    description: |
> 
> Should multiline descriptions be treated as a oneline string with `>`?

Ack, I'm fine with either of them, let's use the >

> 
>> +      Contains the list of output ports from DPU device. These ports
>> +      connect to interfaces that are external to the DPU hardware,
>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> 
> How do these double colons render?  Is this intentional?

double colons is an escape for a single colon if I remember correcly.

BTW: how to render the DT schema?

> 
> - Marijn
> 
>> +      one or two DSI ports, HDMI and eDP.
>> +
>> +    patternProperties:
>> +      "^port@[0-3]+$":
>> +        $ref: /schemas/graph.yaml#/properties/port
>> +
>> +    # at least one port is required
>> +    required:
>> +      - port@0
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - clocks
>> +  - clock-names
>> +  - ports
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    display-controller@1a01000 {
>> +        compatible = "qcom,mdp5";
>> +        reg = <0x1a01000 0x90000>;
>> +        reg-names = "mdp_phys";
>> +
>> +        interrupt-parent = <&mdss>;
>> +        interrupts = <0>;
>> +
>> +        clocks = <&gcc GCC_MDSS_AHB_CLK>,
>> +                 <&gcc GCC_MDSS_AXI_CLK>,
>> +                 <&gcc GCC_MDSS_MDP_CLK>,
>> +                 <&gcc GCC_MDSS_VSYNC_CLK>;
>> +        clock-names = "iface",
>> +                      "bus",
>> +                      "core",
>> +                      "vsync";
>> +
>> +        ports {
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +
>> +            port@0 {
>> +                reg = <0>;
>> +                endpoint {
>> +                    remote-endpoint = <&dsi0_in>;
>> +                };
>> +            };
>> +        };
>> +    };
>> +...
>> -- 
>> 2.39.0
>>

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-10  4:40       ` Dmitry Baryshkov
@ 2023-01-11 22:29         ` Marijn Suijten
  -1 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-11 22:29 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski, Stephen Boyd,
	David Airlie, Daniel Vetter, linux-arm-msm, devicetree,
	dri-devel, freedreno

On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> On 09/01/2023 09:49, Marijn Suijten wrote:
> > On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
<snip>
> >> +    description: |
> > 
> > Should multiline descriptions be treated as a oneline string with `>`?
> 
> Ack, I'm fine with either of them, let's use the >
> 
> > 
> >> +      Contains the list of output ports from DPU device. These ports
> >> +      connect to interfaces that are external to the DPU hardware,
> >> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > 
> > How do these double colons render?  Is this intentional?
> 
> double colons is an escape for a single colon if I remember correcly.

I thought no escaping was necessary here, especially since this is
already a value - it is a multiline string.

> BTW: how to render the DT schema?

I'm not sure if there's currently any rendering tool to view these docs
in a "friendly" manner, e.g. an html page, or whether they're only used
as specifications for DT validation.

- Marijn

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-11 22:29         ` Marijn Suijten
  0 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-11 22:29 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, Rob Herring,
	Stephen Boyd, Konrad Dybcio, Andy Gross, dri-devel,
	Krzysztof Kozlowski, linux-arm-msm, freedreno, Sean Paul

On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> On 09/01/2023 09:49, Marijn Suijten wrote:
> > On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
<snip>
> >> +    description: |
> > 
> > Should multiline descriptions be treated as a oneline string with `>`?
> 
> Ack, I'm fine with either of them, let's use the >
> 
> > 
> >> +      Contains the list of output ports from DPU device. These ports
> >> +      connect to interfaces that are external to the DPU hardware,
> >> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > 
> > How do these double colons render?  Is this intentional?
> 
> double colons is an escape for a single colon if I remember correcly.

I thought no escaping was necessary here, especially since this is
already a value - it is a multiline string.

> BTW: how to render the DT schema?

I'm not sure if there's currently any rendering tool to view these docs
in a "friendly" manner, e.g. an html page, or whether they're only used
as specifications for DT validation.

- Marijn

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-11 22:29         ` Marijn Suijten
@ 2023-01-11 22:31           ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-11 22:31 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski, Stephen Boyd,
	David Airlie, Daniel Vetter, linux-arm-msm, devicetree,
	dri-devel, freedreno

On 12/01/2023 00:29, Marijn Suijten wrote:
> On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
>> On 09/01/2023 09:49, Marijn Suijten wrote:
>>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> <snip>
>>>> +    description: |
>>>
>>> Should multiline descriptions be treated as a oneline string with `>`?
>>
>> Ack, I'm fine with either of them, let's use the >
>>
>>>
>>>> +      Contains the list of output ports from DPU device. These ports
>>>> +      connect to interfaces that are external to the DPU hardware,
>>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
>>>
>>> How do these double colons render?  Is this intentional?
>>
>> double colons is an escape for a single colon if I remember correcly.
> 
> I thought no escaping was necessary here, especially since this is
> already a value - it is a multiline string.

I was mostly following examples, grep :: through the dt-bindings.

> 
>> BTW: how to render the DT schema?
> 
> I'm not sure if there's currently any rendering tool to view these docs
> in a "friendly" manner, e.g. an html page, or whether they're only used
> as specifications for DT validation.

Probably there will be one at some point. It might make good addition to 
devicetree.org.

> 
> - Marijn

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-11 22:31           ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-11 22:31 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, Rob Herring,
	Stephen Boyd, Konrad Dybcio, Andy Gross, dri-devel,
	Krzysztof Kozlowski, linux-arm-msm, freedreno, Sean Paul

On 12/01/2023 00:29, Marijn Suijten wrote:
> On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
>> On 09/01/2023 09:49, Marijn Suijten wrote:
>>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> <snip>
>>>> +    description: |
>>>
>>> Should multiline descriptions be treated as a oneline string with `>`?
>>
>> Ack, I'm fine with either of them, let's use the >
>>
>>>
>>>> +      Contains the list of output ports from DPU device. These ports
>>>> +      connect to interfaces that are external to the DPU hardware,
>>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
>>>
>>> How do these double colons render?  Is this intentional?
>>
>> double colons is an escape for a single colon if I remember correcly.
> 
> I thought no escaping was necessary here, especially since this is
> already a value - it is a multiline string.

I was mostly following examples, grep :: through the dt-bindings.

> 
>> BTW: how to render the DT schema?
> 
> I'm not sure if there's currently any rendering tool to view these docs
> in a "friendly" manner, e.g. an html page, or whether they're only used
> as specifications for DT validation.

Probably there will be one at some point. It might make good addition to 
devicetree.org.

> 
> - Marijn

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-11 22:31           ` Dmitry Baryshkov
@ 2023-01-11 22:35             ` Marijn Suijten
  -1 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-11 22:35 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Rob Herring, Krzysztof Kozlowski, Stephen Boyd,
	David Airlie, Daniel Vetter, linux-arm-msm, devicetree,
	dri-devel, freedreno

On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> On 12/01/2023 00:29, Marijn Suijten wrote:
> > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> >> On 09/01/2023 09:49, Marijn Suijten wrote:
> >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > <snip>
> >>>> +    description: |
> >>>
> >>> Should multiline descriptions be treated as a oneline string with `>`?
> >>
> >> Ack, I'm fine with either of them, let's use the >
> >>
> >>>
> >>>> +      Contains the list of output ports from DPU device. These ports
> >>>> +      connect to interfaces that are external to the DPU hardware,
> >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> >>>
> >>> How do these double colons render?  Is this intentional?
> >>
> >> double colons is an escape for a single colon if I remember correcly.
> > 
> > I thought no escaping was necessary here, especially since this is
> > already a value - it is a multiline string.
> 
> I was mostly following examples, grep :: through the dt-bindings.

Saw that, maybe these "freeform" description strings are intended to be
RST to support more elaborate rendering if/when that happens?

> >> BTW: how to render the DT schema?
> > 
> > I'm not sure if there's currently any rendering tool to view these docs
> > in a "friendly" manner, e.g. an html page, or whether they're only used
> > as specifications for DT validation.
> 
> Probably there will be one at some point. It might make good addition to 
> devicetree.org.

Would be super cool to have some "interactive" / properly
rendered/colored docs up there for DT :)

- Marijn

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-11 22:35             ` Marijn Suijten
  0 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-11 22:35 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, Rob Herring,
	Stephen Boyd, Konrad Dybcio, Andy Gross, dri-devel,
	Krzysztof Kozlowski, linux-arm-msm, freedreno, Sean Paul

On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> On 12/01/2023 00:29, Marijn Suijten wrote:
> > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> >> On 09/01/2023 09:49, Marijn Suijten wrote:
> >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > <snip>
> >>>> +    description: |
> >>>
> >>> Should multiline descriptions be treated as a oneline string with `>`?
> >>
> >> Ack, I'm fine with either of them, let's use the >
> >>
> >>>
> >>>> +      Contains the list of output ports from DPU device. These ports
> >>>> +      connect to interfaces that are external to the DPU hardware,
> >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> >>>
> >>> How do these double colons render?  Is this intentional?
> >>
> >> double colons is an escape for a single colon if I remember correcly.
> > 
> > I thought no escaping was necessary here, especially since this is
> > already a value - it is a multiline string.
> 
> I was mostly following examples, grep :: through the dt-bindings.

Saw that, maybe these "freeform" description strings are intended to be
RST to support more elaborate rendering if/when that happens?

> >> BTW: how to render the DT schema?
> > 
> > I'm not sure if there's currently any rendering tool to view these docs
> > in a "friendly" manner, e.g. an html page, or whether they're only used
> > as specifications for DT validation.
> 
> Probably there will be one at some point. It might make good addition to 
> devicetree.org.

Would be super cool to have some "interactive" / properly
rendered/colored docs up there for DT :)

- Marijn

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-11 22:35             ` Marijn Suijten
@ 2023-01-12 21:50               ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-12 21:50 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, dri-devel,
	Stephen Boyd, Konrad Dybcio, Andy Gross, Krzysztof Kozlowski,
	linux-arm-msm, Dmitry Baryshkov, freedreno, Sean Paul

On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
> On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> > On 12/01/2023 00:29, Marijn Suijten wrote:
> > > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> > >> On 09/01/2023 09:49, Marijn Suijten wrote:
> > >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > > <snip>
> > >>>> +    description: |
> > >>>
> > >>> Should multiline descriptions be treated as a oneline string with `>`?

Depends if you want to keep paragraphs. Generally, we use '|' or 
nothing. If just a colon (or ???), then I think you want '>'.

I get tired of saying to drop unnecessary '|' in reviews. It would be 
nice to analyze the text to check what's needed automatically.


> > >> Ack, I'm fine with either of them, let's use the >
> > >>
> > >>>
> > >>>> +      Contains the list of output ports from DPU device. These ports
> > >>>> +      connect to interfaces that are external to the DPU hardware,
> > >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > >>>
> > >>> How do these double colons render?  Is this intentional?
> > >>
> > >> double colons is an escape for a single colon if I remember correcly.
> > > 
> > > I thought no escaping was necessary here, especially since this is
> > > already a value - it is a multiline string.
> > 
> > I was mostly following examples, grep :: through the dt-bindings.
> 
> Saw that, maybe these "freeform" description strings are intended to be
> RST to support more elaborate rendering if/when that happens?

No, though some experiments have been done in that regard. It seemed to 
work.

> > >> BTW: how to render the DT schema?
> > > 
> > > I'm not sure if there's currently any rendering tool to view these docs
> > > in a "friendly" manner, e.g. an html page, or whether they're only used
> > > as specifications for DT validation.
> > 
> > Probably there will be one at some point. It might make good addition to 
> > devicetree.org.
> 
> Would be super cool to have some "interactive" / properly
> rendered/colored docs up there for DT :)

One of the original goals was to transform the DT spec to schema docs 
and then generate the spec from the schemas.

There's tools that do json-schema to docs already. They may just work. I 
haven't looked at them though as that's not really my itch and I simply 
don't have time. Maybe if we stop reviewing schemas for a while.

Rob

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-12 21:50               ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-12 21:50 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Clark, Sean Paul, Abhinav Kumar, Krzysztof Kozlowski,
	Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
> On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> > On 12/01/2023 00:29, Marijn Suijten wrote:
> > > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> > >> On 09/01/2023 09:49, Marijn Suijten wrote:
> > >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > > <snip>
> > >>>> +    description: |
> > >>>
> > >>> Should multiline descriptions be treated as a oneline string with `>`?

Depends if you want to keep paragraphs. Generally, we use '|' or 
nothing. If just a colon (or ???), then I think you want '>'.

I get tired of saying to drop unnecessary '|' in reviews. It would be 
nice to analyze the text to check what's needed automatically.


> > >> Ack, I'm fine with either of them, let's use the >
> > >>
> > >>>
> > >>>> +      Contains the list of output ports from DPU device. These ports
> > >>>> +      connect to interfaces that are external to the DPU hardware,
> > >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > >>>
> > >>> How do these double colons render?  Is this intentional?
> > >>
> > >> double colons is an escape for a single colon if I remember correcly.
> > > 
> > > I thought no escaping was necessary here, especially since this is
> > > already a value - it is a multiline string.
> > 
> > I was mostly following examples, grep :: through the dt-bindings.
> 
> Saw that, maybe these "freeform" description strings are intended to be
> RST to support more elaborate rendering if/when that happens?

No, though some experiments have been done in that regard. It seemed to 
work.

> > >> BTW: how to render the DT schema?
> > > 
> > > I'm not sure if there's currently any rendering tool to view these docs
> > > in a "friendly" manner, e.g. an html page, or whether they're only used
> > > as specifications for DT validation.
> > 
> > Probably there will be one at some point. It might make good addition to 
> > devicetree.org.
> 
> Would be super cool to have some "interactive" / properly
> rendered/colored docs up there for DT :)

One of the original goals was to transform the DT spec to schema docs 
and then generate the spec from the schemas.

There's tools that do json-schema to docs already. They may just work. I 
haven't looked at them though as that's not really my itch and I simply 
don't have time. Maybe if we stop reviewing schemas for a while.

Rob

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

* Re: [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
  2023-01-09  5:01   ` [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom, mdp5.yaml Dmitry Baryshkov
@ 2023-01-12 21:52     ` Rob Herring
  -1 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-12 21:52 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, dri-devel,
	Stephen Boyd, Konrad Dybcio, Andy Gross, Krzysztof Kozlowski,
	linux-arm-msm, freedreno, Sean Paul

On Mon, Jan 09, 2023 at 07:01:50AM +0200, Dmitry Baryshkov wrote:
> Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
> distinguishing between various platforms. For msm8998 list
> qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
> by either of the drivers.

8998 is where?

> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
>  .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
>  2 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> index cbcbe8b47e9b..681d6ac48d33 100644
> --- a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> @@ -16,7 +16,22 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: qcom,mdp5
> +    oneOf:
> +      - const: qcom,mdp5
> +        deprecated: true
> +      - items:
> +          - enum:
> +              - qcom,apq8084-mdp5
> +              - qcom,msm8916-mdp5
> +              - qcom,msm8917-mdp5
> +              - qcom,msm8953-mdp5
> +              - qcom,msm8974-mdp5
> +              - qcom,msm8976-mdp5
> +              - qcom,msm8994-mdp5
> +              - qcom,msm8996-mdp5
> +              - qcom,sdm630-mdp5
> +              - qcom,sdm660-mdp5
> +          - const: qcom,mdp5
>  
>    reg:
>      maxItems: 1
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> index 7479cd96fdec..7a81a10c0a9b 100644
> --- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> @@ -88,7 +88,11 @@ patternProperties:
>      type: object
>      properties:
>        compatible:
> -        const: qcom,mdp5
> +        oneOf:
> +          - const: qcom,mdp5
> +          - items:
> +              - {}
> +              - const: qcom,mdp5
>  
>    "^dsi@[1-9a-f][0-9a-f]*$":
>      type: object
> -- 
> 2.39.0
> 

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

* Re: [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
@ 2023-01-12 21:52     ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2023-01-12 21:52 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Krzysztof Kozlowski, Stephen Boyd, David Airlie,
	Daniel Vetter, linux-arm-msm, devicetree, dri-devel, freedreno

On Mon, Jan 09, 2023 at 07:01:50AM +0200, Dmitry Baryshkov wrote:
> Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
> distinguishing between various platforms. For msm8998 list
> qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
> by either of the drivers.

8998 is where?

> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
>  .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
>  2 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> index cbcbe8b47e9b..681d6ac48d33 100644
> --- a/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
> @@ -16,7 +16,22 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: qcom,mdp5
> +    oneOf:
> +      - const: qcom,mdp5
> +        deprecated: true
> +      - items:
> +          - enum:
> +              - qcom,apq8084-mdp5
> +              - qcom,msm8916-mdp5
> +              - qcom,msm8917-mdp5
> +              - qcom,msm8953-mdp5
> +              - qcom,msm8974-mdp5
> +              - qcom,msm8976-mdp5
> +              - qcom,msm8994-mdp5
> +              - qcom,msm8996-mdp5
> +              - qcom,sdm630-mdp5
> +              - qcom,sdm660-mdp5
> +          - const: qcom,mdp5
>  
>    reg:
>      maxItems: 1
> diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> index 7479cd96fdec..7a81a10c0a9b 100644
> --- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
> @@ -88,7 +88,11 @@ patternProperties:
>      type: object
>      properties:
>        compatible:
> -        const: qcom,mdp5
> +        oneOf:
> +          - const: qcom,mdp5
> +          - items:
> +              - {}
> +              - const: qcom,mdp5
>  
>    "^dsi@[1-9a-f][0-9a-f]*$":
>      type: object
> -- 
> 2.39.0
> 

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

* Re: [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
  2023-01-12 21:52     ` Rob Herring
@ 2023-01-13  7:54       ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-13  7:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Krzysztof Kozlowski, Stephen Boyd, David Airlie,
	Daniel Vetter, linux-arm-msm, devicetree, dri-devel, freedreno

On 12/01/2023 23:52, Rob Herring wrote:
> On Mon, Jan 09, 2023 at 07:01:50AM +0200, Dmitry Baryshkov wrote:
>> Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
>> distinguishing between various platforms. For msm8998 list
>> qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
>> by either of the drivers.
> 
> 8998 is where?

Ugh, I dropped it from the patch (because of the existing 
qcom,msm8998-mdss and qcom,msm8998-dpu). I'll fix the message for the 
next iteration.

> 
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
>>   .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
>>   2 files changed, 21 insertions(+), 2 deletions(-)

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml
@ 2023-01-13  7:54       ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-13  7:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, dri-devel,
	Stephen Boyd, Konrad Dybcio, Andy Gross, Krzysztof Kozlowski,
	linux-arm-msm, freedreno, Sean Paul

On 12/01/2023 23:52, Rob Herring wrote:
> On Mon, Jan 09, 2023 at 07:01:50AM +0200, Dmitry Baryshkov wrote:
>> Add platform-specific compatible entries to the qcom,mdp5.yaml to allow
>> distinguishing between various platforms. For msm8998 list
>> qcom,msm8998-dpu rather than -mdp5 to allow this binding to be handled
>> by either of the drivers.
> 
> 8998 is where?

Ugh, I dropped it from the patch (because of the existing 
qcom,msm8998-mdss and qcom,msm8998-dpu). I'll fix the message for the 
next iteration.

> 
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../bindings/display/msm/qcom,mdp5.yaml         | 17 ++++++++++++++++-
>>   .../bindings/display/msm/qcom,mdss.yaml         |  6 +++++-
>>   2 files changed, 21 insertions(+), 2 deletions(-)

-- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-12 21:50               ` Rob Herring
@ 2023-01-13  8:36                 ` Dmitry Baryshkov
  -1 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-13  8:36 UTC (permalink / raw)
  To: Rob Herring, Marijn Suijten
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Clark, Sean Paul,
	Abhinav Kumar, Krzysztof Kozlowski, Stephen Boyd, David Airlie,
	Daniel Vetter, linux-arm-msm, devicetree, dri-devel, freedreno

On 12/01/2023 23:50, Rob Herring wrote:
> On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
>> On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
>>> On 12/01/2023 00:29, Marijn Suijten wrote:
>>>> On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
>>>>> On 09/01/2023 09:49, Marijn Suijten wrote:
>>>>>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
>>>> <snip>
>>>>>>> +    description: |
>>>>>>
>>>>>> Should multiline descriptions be treated as a oneline string with `>`?
> 
> Depends if you want to keep paragraphs. Generally, we use '|' or
> nothing. If just a colon (or ???), then I think you want '>'.

Ack, thanks for the explanation. I'll fix this for v6.

> 
> I get tired of saying to drop unnecessary '|' in reviews. It would be
> nice to analyze the text to check what's needed automatically.
> 
> -- 
With best wishes
Dmitry


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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-13  8:36                 ` Dmitry Baryshkov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2023-01-13  8:36 UTC (permalink / raw)
  To: Rob Herring, Marijn Suijten
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, dri-devel,
	Stephen Boyd, Konrad Dybcio, Andy Gross, Krzysztof Kozlowski,
	linux-arm-msm, freedreno, Sean Paul

On 12/01/2023 23:50, Rob Herring wrote:
> On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
>> On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
>>> On 12/01/2023 00:29, Marijn Suijten wrote:
>>>> On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
>>>>> On 09/01/2023 09:49, Marijn Suijten wrote:
>>>>>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
>>>> <snip>
>>>>>>> +    description: |
>>>>>>
>>>>>> Should multiline descriptions be treated as a oneline string with `>`?
> 
> Depends if you want to keep paragraphs. Generally, we use '|' or
> nothing. If just a colon (or ???), then I think you want '>'.

Ack, thanks for the explanation. I'll fix this for v6.

> 
> I get tired of saying to drop unnecessary '|' in reviews. It would be
> nice to analyze the text to check what's needed automatically.
> 
> -- 
With best wishes
Dmitry


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

* Re: (subset) [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-09  5:01 ` Dmitry Baryshkov
@ 2023-01-19  2:16   ` Bjorn Andersson
  -1 siblings, 0 replies; 34+ messages in thread
From: Bjorn Andersson @ 2023-01-19  2:16 UTC (permalink / raw)
  To: dmitry.baryshkov, Andy Gross, konrad.dybcio, quic_abhinavk,
	Rob Herring, Krzysztof Kozlowski, sean, robdclark
  Cc: linux-arm-msm, daniel, airlied, devicetree, swboyd, freedreno, dri-devel

On Mon, 9 Jan 2023 07:01:48 +0200, Dmitry Baryshkov wrote:
> This patch concludes the conversion of display/msm schema from txt files
> to YAML format.
> 
> The per-SoC compat (new addition) is required to ease migrating platform
> support between mdp5 and dpu drivers.
> 
> Changes since v4:
> - Adjust qcom,mdss.yaml to follow the addition of per-SoC compatibles
> 
> [...]

Applied, thanks!

[3/4] ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
      commit: 11691dab82e135c9a13cda49234ff3e76bba48d3

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: (subset) [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-19  2:16   ` Bjorn Andersson
  0 siblings, 0 replies; 34+ messages in thread
From: Bjorn Andersson @ 2023-01-19  2:16 UTC (permalink / raw)
  To: dmitry.baryshkov, Andy Gross, konrad.dybcio, quic_abhinavk,
	Rob Herring, Krzysztof Kozlowski, sean, robdclark
  Cc: devicetree, linux-arm-msm, dri-devel, swboyd, freedreno

On Mon, 9 Jan 2023 07:01:48 +0200, Dmitry Baryshkov wrote:
> This patch concludes the conversion of display/msm schema from txt files
> to YAML format.
> 
> The per-SoC compat (new addition) is required to ease migrating platform
> support between mdp5 and dpu drivers.
> 
> Changes since v4:
> - Adjust qcom,mdss.yaml to follow the addition of per-SoC compatibles
> 
> [...]

Applied, thanks!

[3/4] ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node
      commit: 11691dab82e135c9a13cda49234ff3e76bba48d3

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
  2023-01-12 21:50               ` Rob Herring
@ 2023-01-24 11:20                 ` Marijn Suijten
  -1 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-24 11:20 UTC (permalink / raw)
  To: Rob Herring
  Cc: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Clark, Sean Paul, Abhinav Kumar, Krzysztof Kozlowski,
	Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	devicetree, dri-devel, freedreno

On 2023-01-12 15:50:15, Rob Herring wrote:
> On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
> > On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> > > On 12/01/2023 00:29, Marijn Suijten wrote:
> > > > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> > > >> On 09/01/2023 09:49, Marijn Suijten wrote:
> > > >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > > > <snip>
> > > >>>> +    description: |
> > > >>>
> > > >>> Should multiline descriptions be treated as a oneline string with `>`?
> 
> Depends if you want to keep paragraphs. Generally, we use '|' or 
> nothing. If just a colon (or ???), then I think you want '>'.

But doesn't that also affect how lines within paragraphs are flowed?
Arguably it's only GitHub that doesn't "ignore" manual single newlines,
the Markdown (and maybe also RST?) spec AFAIK state that multiline
blocks will be turned into a single paragraph (automatically reflowing
to width).

> I get tired of saying to drop unnecessary '|' in reviews. It would be 
> nice to analyze the text to check what's needed automatically.

And that's just one of the many things...

> > > >> Ack, I'm fine with either of them, let's use the >
> > > >>
> > > >>>
> > > >>>> +      Contains the list of output ports from DPU device. These ports
> > > >>>> +      connect to interfaces that are external to the DPU hardware,
> > > >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > > >>>
> > > >>> How do these double colons render?  Is this intentional?
> > > >>
> > > >> double colons is an escape for a single colon if I remember correcly.
> > > > 
> > > > I thought no escaping was necessary here, especially since this is
> > > > already a value - it is a multiline string.
> > > 
> > > I was mostly following examples, grep :: through the dt-bindings.
> > 
> > Saw that, maybe these "freeform" description strings are intended to be
> > RST to support more elaborate rendering if/when that happens?
> 
> No, though some experiments have been done in that regard. It seemed to 
> work.

Hmm, the question is what format description blocks should adhere to,
and if a double colon here makes sense and/or is required?

> > > >> BTW: how to render the DT schema?
> > > > 
> > > > I'm not sure if there's currently any rendering tool to view these docs
> > > > in a "friendly" manner, e.g. an html page, or whether they're only used
> > > > as specifications for DT validation.
> > > 
> > > Probably there will be one at some point. It might make good addition to 
> > > devicetree.org.
> > 
> > Would be super cool to have some "interactive" / properly
> > rendered/colored docs up there for DT :)
> 
> One of the original goals was to transform the DT spec to schema docs 
> and then generate the spec from the schemas.
> 
> There's tools that do json-schema to docs already. They may just work. I 
> haven't looked at them though as that's not really my itch and I simply 
> don't have time. Maybe if we stop reviewing schemas for a while.

Sure, as above we shoudn't have to render anything now nor any time
soon, but it would be helpful to know what kind of format to adhere to
in description blocks.

- Marijn

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

* Re: [PATCH v5 1/4] dt-bindings: display/msm: convert MDP5 schema to YAML format
@ 2023-01-24 11:20                 ` Marijn Suijten
  0 siblings, 0 replies; 34+ messages in thread
From: Marijn Suijten @ 2023-01-24 11:20 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, Bjorn Andersson, Abhinav Kumar, dri-devel,
	Stephen Boyd, Konrad Dybcio, Andy Gross, Krzysztof Kozlowski,
	linux-arm-msm, Dmitry Baryshkov, freedreno, Sean Paul

On 2023-01-12 15:50:15, Rob Herring wrote:
> On Wed, Jan 11, 2023 at 11:35:53PM +0100, Marijn Suijten wrote:
> > On 2023-01-12 00:31:33, Dmitry Baryshkov wrote:
> > > On 12/01/2023 00:29, Marijn Suijten wrote:
> > > > On 2023-01-10 06:40:27, Dmitry Baryshkov wrote:
> > > >> On 09/01/2023 09:49, Marijn Suijten wrote:
> > > >>> On 2023-01-09 07:01:49, Dmitry Baryshkov wrote:
> > > > <snip>
> > > >>>> +    description: |
> > > >>>
> > > >>> Should multiline descriptions be treated as a oneline string with `>`?
> 
> Depends if you want to keep paragraphs. Generally, we use '|' or 
> nothing. If just a colon (or ???), then I think you want '>'.

But doesn't that also affect how lines within paragraphs are flowed?
Arguably it's only GitHub that doesn't "ignore" manual single newlines,
the Markdown (and maybe also RST?) spec AFAIK state that multiline
blocks will be turned into a single paragraph (automatically reflowing
to width).

> I get tired of saying to drop unnecessary '|' in reviews. It would be 
> nice to analyze the text to check what's needed automatically.

And that's just one of the many things...

> > > >> Ack, I'm fine with either of them, let's use the >
> > > >>
> > > >>>
> > > >>>> +      Contains the list of output ports from DPU device. These ports
> > > >>>> +      connect to interfaces that are external to the DPU hardware,
> > > >>>> +      such as DSI, DP etc. MDP5 devices support up to 4 ports::
> > > >>>
> > > >>> How do these double colons render?  Is this intentional?
> > > >>
> > > >> double colons is an escape for a single colon if I remember correcly.
> > > > 
> > > > I thought no escaping was necessary here, especially since this is
> > > > already a value - it is a multiline string.
> > > 
> > > I was mostly following examples, grep :: through the dt-bindings.
> > 
> > Saw that, maybe these "freeform" description strings are intended to be
> > RST to support more elaborate rendering if/when that happens?
> 
> No, though some experiments have been done in that regard. It seemed to 
> work.

Hmm, the question is what format description blocks should adhere to,
and if a double colon here makes sense and/or is required?

> > > >> BTW: how to render the DT schema?
> > > > 
> > > > I'm not sure if there's currently any rendering tool to view these docs
> > > > in a "friendly" manner, e.g. an html page, or whether they're only used
> > > > as specifications for DT validation.
> > > 
> > > Probably there will be one at some point. It might make good addition to 
> > > devicetree.org.
> > 
> > Would be super cool to have some "interactive" / properly
> > rendered/colored docs up there for DT :)
> 
> One of the original goals was to transform the DT spec to schema docs 
> and then generate the spec from the schemas.
> 
> There's tools that do json-schema to docs already. They may just work. I 
> haven't looked at them though as that's not really my itch and I simply 
> don't have time. Maybe if we stop reviewing schemas for a while.

Sure, as above we shoudn't have to render anything now nor any time
soon, but it would be helpful to know what kind of format to adhere to
in description blocks.

- Marijn

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

end of thread, other threads:[~2023-01-24 11:20 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09  5:01 [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format Dmitry Baryshkov
2023-01-09  5:01 ` Dmitry Baryshkov
2023-01-09  5:01 ` [PATCH v5 1/4] " Dmitry Baryshkov
2023-01-09  5:01   ` Dmitry Baryshkov
2023-01-09  7:49   ` Marijn Suijten
2023-01-09  7:49     ` Marijn Suijten
2023-01-10  4:40     ` Dmitry Baryshkov
2023-01-10  4:40       ` Dmitry Baryshkov
2023-01-11 22:29       ` Marijn Suijten
2023-01-11 22:29         ` Marijn Suijten
2023-01-11 22:31         ` Dmitry Baryshkov
2023-01-11 22:31           ` Dmitry Baryshkov
2023-01-11 22:35           ` Marijn Suijten
2023-01-11 22:35             ` Marijn Suijten
2023-01-12 21:50             ` Rob Herring
2023-01-12 21:50               ` Rob Herring
2023-01-13  8:36               ` Dmitry Baryshkov
2023-01-13  8:36                 ` Dmitry Baryshkov
2023-01-24 11:20               ` Marijn Suijten
2023-01-24 11:20                 ` Marijn Suijten
2023-01-09 14:30   ` Rob Herring
2023-01-09 14:30     ` Rob Herring
2023-01-09  5:01 ` [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml Dmitry Baryshkov
2023-01-09  5:01   ` [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom, mdp5.yaml Dmitry Baryshkov
2023-01-12 21:52   ` [PATCH v5 2/4] dt-bindings: display/msm: add SoC-specific compats to qcom,mdp5.yaml Rob Herring
2023-01-12 21:52     ` Rob Herring
2023-01-13  7:54     ` Dmitry Baryshkov
2023-01-13  7:54       ` Dmitry Baryshkov
2023-01-09  5:01 ` [PATCH v5 3/4] ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node Dmitry Baryshkov
2023-01-09  5:01   ` Dmitry Baryshkov
2023-01-09  5:01 ` [PATCH v5 4/4] arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes Dmitry Baryshkov
2023-01-09  5:01   ` Dmitry Baryshkov
2023-01-19  2:16 ` (subset) [PATCH v5 0/4] dt-bindings: display/msm: convert MDP5 schema to YAML format Bjorn Andersson
2023-01-19  2:16   ` Bjorn Andersson

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.