diff mbox series

[11/11] dt-bindings: display/msm: move common DPU properties to dpu-common.yaml

Message ID 20220625232513.522599-12-dmitry.baryshkov@linaro.org
State New
Headers show
Series dt-bindings: display/msm: rework MDSS and DPU bindings | expand

Commit Message

Dmitry Baryshkov June 25, 2022, 11:25 p.m. UTC
Move properties common to all DPU DT nodes to the dpu-common.yaml

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/display/msm/dpu-common.yaml      | 47 +++++++++++++++++++
 .../bindings/display/msm/dpu-msm8998.yaml     | 28 ++---------
 .../bindings/display/msm/dpu-qcm2290.yaml     | 29 ++----------
 .../bindings/display/msm/dpu-sc7180.yaml      | 32 ++-----------
 .../bindings/display/msm/dpu-sc7280.yaml      | 32 ++-----------
 .../bindings/display/msm/dpu-sdm845.yaml      | 32 ++-----------
 6 files changed, 67 insertions(+), 133 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/msm/dpu-common.yaml

Comments

Rob Herring June 30, 2022, 11:11 p.m. UTC | #1
On Sun, Jun 26, 2022 at 02:25:13AM +0300, Dmitry Baryshkov wrote:
> Move properties common to all DPU DT nodes to the dpu-common.yaml
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/display/msm/dpu-common.yaml      | 47 +++++++++++++++++++
>  .../bindings/display/msm/dpu-msm8998.yaml     | 28 ++---------
>  .../bindings/display/msm/dpu-qcm2290.yaml     | 29 ++----------
>  .../bindings/display/msm/dpu-sc7180.yaml      | 32 ++-----------
>  .../bindings/display/msm/dpu-sc7280.yaml      | 32 ++-----------
>  .../bindings/display/msm/dpu-sdm845.yaml      | 32 ++-----------
>  6 files changed, 67 insertions(+), 133 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/dpu-common.yaml b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> new file mode 100644
> index 000000000000..f3465ee3a4ab
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> @@ -0,0 +1,47 @@
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/msm/dpu-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Display DPU dt properties (common properties)
> +
> +maintainers:
> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> +  - Krishna Manikandan <quic_mkrishn@quicinc.com>
> +  - Rob Clark <robdclark@gmail.com>
> +
> +description: |
> +  Device tree bindings for the DPU display controller, common properties.

Common properties for QCom DPU display controller

> +
> +properties:
> +  interrupts:
> +    maxItems: 1
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  operating-points-v2: true
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports

Now this schema is applied twice.

> +    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. Each output port contains an endpoint that
> +      describes how it is connected to an external interface.

This description is marginally useful. Each port will say it is an 
output to X. So you could just remove.

> +
> +patternProperties:
> +  (mdp-)?opp-table:
> +    $ref: /schemas/opp/opp-v2.yaml#
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - interrupts
> +  - power-domains
> +  - operating-points-v2
> +  - ports
> +
> +additionalProperties: true
Dmitry Baryshkov July 8, 2022, 9:14 a.m. UTC | #2
On 01/07/2022 02:11, Rob Herring wrote:
> On Sun, Jun 26, 2022 at 02:25:13AM +0300, Dmitry Baryshkov wrote:
>> Move properties common to all DPU DT nodes to the dpu-common.yaml
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   .../bindings/display/msm/dpu-common.yaml      | 47 +++++++++++++++++++
>>   .../bindings/display/msm/dpu-msm8998.yaml     | 28 ++---------
>>   .../bindings/display/msm/dpu-qcm2290.yaml     | 29 ++----------
>>   .../bindings/display/msm/dpu-sc7180.yaml      | 32 ++-----------
>>   .../bindings/display/msm/dpu-sc7280.yaml      | 32 ++-----------
>>   .../bindings/display/msm/dpu-sdm845.yaml      | 32 ++-----------
>>   6 files changed, 67 insertions(+), 133 deletions(-)
>>   create mode 100644 Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/dpu-common.yaml b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>> new file mode 100644
>> index 000000000000..f3465ee3a4ab
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>> @@ -0,0 +1,47 @@
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/display/msm/dpu-common.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm Display DPU dt properties (common properties)
>> +
>> +maintainers:
>> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> +  - Krishna Manikandan <quic_mkrishn@quicinc.com>
>> +  - Rob Clark <robdclark@gmail.com>
>> +
>> +description: |
>> +  Device tree bindings for the DPU display controller, common properties.
> 
> Common properties for QCom DPU display controller
> 
>> +
>> +properties:
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  power-domains:
>> +    maxItems: 1
>> +
>> +  operating-points-v2: true
>> +
>> +  ports:
>> +    $ref: /schemas/graph.yaml#/properties/ports
> 
> Now this schema is applied twice.
> 
>> +    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. Each output port contains an endpoint that
>> +      describes how it is connected to an external interface.
> 
> This description is marginally useful. Each port will say it is an
> output to X. So you could just remove.

I think I will go the other way around. It is not really useful to 
describe individual ports, so I will leave just this piece, slightly 
rephrased and drop individual /ports, /ports/port@N from dpu-foo.yaml.

This will also remove the duplicate application of ports schema.

> 
>> +
>> +patternProperties:
>> +  (mdp-)?opp-table:
>> +    $ref: /schemas/opp/opp-v2.yaml#
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - clocks
>> +  - interrupts
>> +  - power-domains
>> +  - operating-points-v2
>> +  - ports
>> +
>> +additionalProperties: true
Rob Herring July 12, 2022, 8:47 p.m. UTC | #3
On Fri, Jul 08, 2022 at 12:14:45PM +0300, Dmitry Baryshkov wrote:
> On 01/07/2022 02:11, Rob Herring wrote:
> > On Sun, Jun 26, 2022 at 02:25:13AM +0300, Dmitry Baryshkov wrote:
> > > Move properties common to all DPU DT nodes to the dpu-common.yaml
> > > 
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > >   .../bindings/display/msm/dpu-common.yaml      | 47 +++++++++++++++++++
> > >   .../bindings/display/msm/dpu-msm8998.yaml     | 28 ++---------
> > >   .../bindings/display/msm/dpu-qcm2290.yaml     | 29 ++----------
> > >   .../bindings/display/msm/dpu-sc7180.yaml      | 32 ++-----------
> > >   .../bindings/display/msm/dpu-sc7280.yaml      | 32 ++-----------
> > >   .../bindings/display/msm/dpu-sdm845.yaml      | 32 ++-----------
> > >   6 files changed, 67 insertions(+), 133 deletions(-)
> > >   create mode 100644 Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/display/msm/dpu-common.yaml b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> > > new file mode 100644
> > > index 000000000000..f3465ee3a4ab
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
> > > @@ -0,0 +1,47 @@
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/display/msm/dpu-common.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Qualcomm Display DPU dt properties (common properties)
> > > +
> > > +maintainers:
> > > +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > +  - Krishna Manikandan <quic_mkrishn@quicinc.com>
> > > +  - Rob Clark <robdclark@gmail.com>
> > > +
> > > +description: |
> > > +  Device tree bindings for the DPU display controller, common properties.
> > 
> > Common properties for QCom DPU display controller
> > 
> > > +
> > > +properties:
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  power-domains:
> > > +    maxItems: 1
> > > +
> > > +  operating-points-v2: true
> > > +
> > > +  ports:
> > > +    $ref: /schemas/graph.yaml#/properties/ports
> > 
> > Now this schema is applied twice.
> > 
> > > +    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. Each output port contains an endpoint that
> > > +      describes how it is connected to an external interface.
> > 
> > This description is marginally useful. Each port will say it is an
> > output to X. So you could just remove.
> 
> I think I will go the other way around. It is not really useful to describe
> individual ports, so I will leave just this piece, slightly rephrased and
> drop individual /ports, /ports/port@N from dpu-foo.yaml.

How is describing individual port not useful? You must define what each 
port is. Input or output. Type of data. Are they all the same?

Rob
Dmitry Baryshkov July 12, 2022, 9:41 p.m. UTC | #4
On 12/07/2022 23:47, Rob Herring wrote:
> On Fri, Jul 08, 2022 at 12:14:45PM +0300, Dmitry Baryshkov wrote:
>> On 01/07/2022 02:11, Rob Herring wrote:
>>> On Sun, Jun 26, 2022 at 02:25:13AM +0300, Dmitry Baryshkov wrote:
>>>> Move properties common to all DPU DT nodes to the dpu-common.yaml
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>> ---
>>>>    .../bindings/display/msm/dpu-common.yaml      | 47 +++++++++++++++++++
>>>>    .../bindings/display/msm/dpu-msm8998.yaml     | 28 ++---------
>>>>    .../bindings/display/msm/dpu-qcm2290.yaml     | 29 ++----------
>>>>    .../bindings/display/msm/dpu-sc7180.yaml      | 32 ++-----------
>>>>    .../bindings/display/msm/dpu-sc7280.yaml      | 32 ++-----------
>>>>    .../bindings/display/msm/dpu-sdm845.yaml      | 32 ++-----------
>>>>    6 files changed, 67 insertions(+), 133 deletions(-)
>>>>    create mode 100644 Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/display/msm/dpu-common.yaml b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>>>> new file mode 100644
>>>> index 000000000000..f3465ee3a4ab
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
>>>> @@ -0,0 +1,47 @@
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/display/msm/dpu-common.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Qualcomm Display DPU dt properties (common properties)
>>>> +
>>>> +maintainers:
>>>> +  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>> +  - Krishna Manikandan <quic_mkrishn@quicinc.com>
>>>> +  - Rob Clark <robdclark@gmail.com>
>>>> +
>>>> +description: |
>>>> +  Device tree bindings for the DPU display controller, common properties.
>>>
>>> Common properties for QCom DPU display controller
>>>
>>>> +
>>>> +properties:
>>>> +  interrupts:
>>>> +    maxItems: 1
>>>> +
>>>> +  power-domains:
>>>> +    maxItems: 1
>>>> +
>>>> +  operating-points-v2: true
>>>> +
>>>> +  ports:
>>>> +    $ref: /schemas/graph.yaml#/properties/ports
>>>
>>> Now this schema is applied twice.
>>>
>>>> +    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. Each output port contains an endpoint that
>>>> +      describes how it is connected to an external interface.
>>>
>>> This description is marginally useful. Each port will say it is an
>>> output to X. So you could just remove.
>>
>> I think I will go the other way around. It is not really useful to describe
>> individual ports, so I will leave just this piece, slightly rephrased and
>> drop individual /ports, /ports/port@N from dpu-foo.yaml.
> 
> How is describing individual port not useful? You must define what each
> port is. Input or output. Type of data. Are they all the same?

In case of MDSS all ports are output, they are connected to the external 
interfaces (DSI, DP, HDMI, etc). The driver uses them to bind available 
interfaces (using components framework). The reg property of the port is 
completely ignored.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/msm/dpu-common.yaml b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
new file mode 100644
index 000000000000..f3465ee3a4ab
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/msm/dpu-common.yaml
@@ -0,0 +1,47 @@ 
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/dpu-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Display DPU dt properties (common properties)
+
+maintainers:
+  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+  - Krishna Manikandan <quic_mkrishn@quicinc.com>
+  - Rob Clark <robdclark@gmail.com>
+
+description: |
+  Device tree bindings for the DPU display controller, common properties.
+
+properties:
+  interrupts:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  operating-points-v2: true
+
+  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. Each output port contains an endpoint that
+      describes how it is connected to an external interface.
+
+patternProperties:
+  (mdp-)?opp-table:
+    $ref: /schemas/opp/opp-v2.yaml#
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - interrupts
+  - power-domains
+  - operating-points-v2
+  - ports
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml b/Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml
index 5caf46a1dd88..2207601c83df 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml
@@ -47,21 +47,8 @@  properties:
       - const: core
       - const: vsync
 
-  interrupts:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  operating-points-v2: true
   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. Each output port contains an endpoint that
-      describes how it is connected to an external interface.
-
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/properties/port
@@ -75,17 +62,10 @@  properties:
       - port@0
       - port@1
 
-required:
-  - compatible
-  - reg
-  - reg-names
-  - clocks
-  - interrupts
-  - power-domains
-  - operating-points-v2
-  - ports
-
-additionalProperties: false
+allOf:
+  - $ref: "/schemas/display/msm/dpu-common.yaml#"
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml b/Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml
index 8027319b1aad..8a0d6eda6e7c 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml
@@ -43,22 +43,8 @@  properties:
       - const: lut
       - const: vsync
 
-  interrupts:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  operating-points-v2: true
-
   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. Each output port contains an endpoint that
-      describes how it is connected to an external interface.
-
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/properties/port
@@ -67,17 +53,10 @@  properties:
     required:
       - port@0
 
-required:
-  - compatible
-  - reg
-  - reg-names
-  - clocks
-  - interrupts
-  - power-domains
-  - operating-points-v2
-  - ports
-
-additionalProperties: false
+allOf:
+  - $ref: "/schemas/display/msm/dpu-common.yaml#"
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml b/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
index 42921f25baa4..1047192b5b36 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
@@ -45,25 +45,8 @@  properties:
       - const: core
       - const: vsync
 
-  interrupts:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  operating-points-v2: true
-
-  mdp-opp-table:
-    $ref: /schemas/opp/opp-v2.yaml#
-
   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. Each output port contains an endpoint that
-      describes how it is connected to an external interface.
-
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/properties/port
@@ -76,17 +59,10 @@  properties:
     required:
       - port@0
 
-required:
-  - compatible
-  - reg
-  - reg-names
-  - clocks
-  - interrupts
-  - power-domains
-  - operating-points-v2
-  - ports
-
-additionalProperties: false
+allOf:
+  - $ref: "/schemas/display/msm/dpu-common.yaml#"
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml b/Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml
index 49c4a055d20f..543d90a84853 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml
@@ -44,25 +44,8 @@  properties:
       - const: core
       - const: vsync
 
-  interrupts:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  operating-points-v2: true
-
-  opp-table:
-    $ref: /schemas/opp/opp-v2.yaml#
-
   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. Each output port contains an endpoint that
-      describes how it is connected to an external interface.
-
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/properties/port
@@ -75,17 +58,10 @@  properties:
     required:
       - port@0
 
-required:
-  - compatible
-  - reg
-  - reg-names
-  - clocks
-  - interrupts
-  - power-domains
-  - operating-points-v2
-  - ports
-
-additionalProperties: false
+allOf:
+  - $ref: "/schemas/display/msm/dpu-common.yaml#"
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml b/Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml
index cc95adcf8f11..796c13d73ea3 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml
@@ -43,25 +43,8 @@  properties:
       - const: core
       - const: vsync
 
-  interrupts:
-    maxItems: 1
-
-  power-domains:
-    maxItems: 1
-
-  operating-points-v2: true
-
-  mdp-opp-table:
-    $ref: /schemas/opp/opp-v2.yaml#
-
   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. Each output port contains an endpoint that
-      describes how it is connected to an external interface.
-
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/properties/port
@@ -75,17 +58,10 @@  properties:
       - port@0
       - port@1
 
-required:
-  - compatible
-  - reg
-  - reg-names
-  - clocks
-  - interrupts
-  - power-domains
-  - operating-points-v2
-  - ports
-
-additionalProperties: false
+allOf:
+  - $ref: "/schemas/display/msm/dpu-common.yaml#"
+
+unevaluatedProperties: false
 
 examples:
   - |