[PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property

Ariel D'Alessandro posted 14 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property
Posted by Ariel D'Alessandro 1 month, 2 weeks ago
Current, the DT bindings for Mediatek UFOe (Unified Frame Optimization
engine) is missing the mediatek,gce-client-reg property. Add it and
update the example as well.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
 .../bindings/display/mediatek/mediatek,ufoe.yaml      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
index 61a5e22effbf2..ecb4c0359fec3 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
@@ -64,6 +64,14 @@ properties:
       - port@0
       - port@1
 
+  mediatek,gce-client-reg:
+    description: The register of client driver can be configured by gce with
+      4 arguments defined in this property, such as phandle of gce, subsys id,
+      register offset and size. Each GCE subsys id is mapping to a client
+      defined in the header include/dt-bindings/gce/<chip>-gce.h.
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -77,7 +85,9 @@ examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/mt8173-clk.h>
+    #include <dt-bindings/gce/mt8173-gce.h>
     #include <dt-bindings/power/mt8173-power.h>
+
     soc {
         #address-cells = <2>;
         #size-cells = <2>;
@@ -88,5 +98,6 @@ examples:
             interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_LOW>;
             power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
             clocks = <&mmsys CLK_MM_DISP_UFOE>;
+            mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xa000 0x1000>;
         };
     };
-- 
2.50.1
Re: [PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On Wed, Aug 20, 2025 at 02:12:55PM -0300, Ariel D'Alessandro wrote:
> Current, the DT bindings for Mediatek UFOe (Unified Frame Optimization
> engine) is missing the mediatek,gce-client-reg property. Add it and

Why is it missing? If the binding is complete, it cannot be missing...

> update the example as well.
> 
> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> ---
>  .../bindings/display/mediatek/mediatek,ufoe.yaml      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> index 61a5e22effbf2..ecb4c0359fec3 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> @@ -64,6 +64,14 @@ properties:
>        - port@0
>        - port@1
>  
> +  mediatek,gce-client-reg:
> +    description: The register of client driver can be configured by gce with
> +      4 arguments defined in this property, such as phandle of gce, subsys id,
> +      register offset and size. Each GCE subsys id is mapping to a client

Don't explain what DT syntax is. We all know, so that's completely
redundant description. Explain the purpose. Explain Arguments with sechema - items.

Best regards,
Krzysztof
Re: [PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property
Posted by Ariel D'Alessandro 3 weeks, 2 days ago
Krzysztof,

On 8/21/25 3:50 AM, Krzysztof Kozlowski wrote:
> On Wed, Aug 20, 2025 at 02:12:55PM -0300, Ariel D'Alessandro wrote:
>> Current, the DT bindings for Mediatek UFOe (Unified Frame Optimization
>> engine) is missing the mediatek,gce-client-reg property. Add it and
> 
> Why is it missing? If the binding is complete, it cannot be missing...

Due to the following error:

$ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
   SCHEMA  Documentation/devicetree/bindings/processed-schema.json
   DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
[...]
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: ufoe@1401a000 
(mediatek,mt8173-disp-ufoe): 'mediatek,gce-client-reg' does not match 
any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: 
http://devicetree.org/schemas/display/mediatek/mediatek,ufoe.yaml#

> 
>> update the example as well.
>>
>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>> ---
>>   .../bindings/display/mediatek/mediatek,ufoe.yaml      | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>> index 61a5e22effbf2..ecb4c0359fec3 100644
>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>> @@ -64,6 +64,14 @@ properties:
>>         - port@0
>>         - port@1
>>   
>> +  mediatek,gce-client-reg:
>> +    description: The register of client driver can be configured by gce with
>> +      4 arguments defined in this property, such as phandle of gce, subsys id,
>> +      register offset and size. Each GCE subsys id is mapping to a client
> 
> Don't explain what DT syntax is. We all know, so that's completely
> redundant description. Explain the purpose. Explain Arguments with sechema - items.

Although I agree with your suggestions, this is exactly how the rest of 
the Mediatek DT bindings describe this node. This patch is based on the 
other +20 files, which describe the node in the same way.

Regards,

-- 
Ariel D'Alessandro
Software Engineer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK 
Registered in England & Wales, no. 5513718
Re: [PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property
Posted by Krzysztof Kozlowski 3 weeks, 2 days ago
On 10/09/2025 16:04, Ariel D'Alessandro wrote:
> Krzysztof,
> 
> On 8/21/25 3:50 AM, Krzysztof Kozlowski wrote:
>> On Wed, Aug 20, 2025 at 02:12:55PM -0300, Ariel D'Alessandro wrote:
>>> Current, the DT bindings for Mediatek UFOe (Unified Frame Optimization
>>> engine) is missing the mediatek,gce-client-reg property. Add it and
>>
>> Why is it missing? If the binding is complete, it cannot be missing...
> 
> Due to the following error:
> 
> $ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
>    SCHEMA  Documentation/devicetree/bindings/processed-schema.json
>    DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> [...]
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: ufoe@1401a000 
> (mediatek,mt8173-disp-ufoe): 'mediatek,gce-client-reg' does not match 
> any of the regexes: '^pinctrl-[0-9]+$'
> 	from schema $id: 
> http://devicetree.org/schemas/display/mediatek/mediatek,ufoe.yaml#

So there are users of it? Then please explain that.

> 
>>
>>> update the example as well.
>>>
>>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>>> ---
>>>   .../bindings/display/mediatek/mediatek,ufoe.yaml      | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>> index 61a5e22effbf2..ecb4c0359fec3 100644
>>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>> @@ -64,6 +64,14 @@ properties:
>>>         - port@0
>>>         - port@1
>>>   
>>> +  mediatek,gce-client-reg:
>>> +    description: The register of client driver can be configured by gce with
>>> +      4 arguments defined in this property, such as phandle of gce, subsys id,
>>> +      register offset and size. Each GCE subsys id is mapping to a client
>>
>> Don't explain what DT syntax is. We all know, so that's completely
>> redundant description. Explain the purpose. Explain Arguments with sechema - items.
> 
> Although I agree with your suggestions, this is exactly how the rest of 
> the Mediatek DT bindings describe this node. This patch is based on the 
> other +20 files, which describe the node in the same way.


Last time I tried to fix something for Mediatek display I got
condescending and useless review from Collabora, so I won't be bothering
with fixing these bindings to make your job easier. I don't care, you
can thank someone inside. Therefore other poor bindings are not a valid
excuse for this patch not being correct.

Best regards,
Krzysztof
Re: [PATCH v1 07/14] dt-bindings: display: mediatek,ufoe: Add mediatek,gce-client-reg property
Posted by Ariel D'Alessandro 3 weeks, 2 days ago
Krzysztof,

On 9/10/25 11:21 AM, Krzysztof Kozlowski wrote:
> On 10/09/2025 16:04, Ariel D'Alessandro wrote:
>> Krzysztof,
>>
>> On 8/21/25 3:50 AM, Krzysztof Kozlowski wrote:
>>> On Wed, Aug 20, 2025 at 02:12:55PM -0300, Ariel D'Alessandro wrote:
>>>> Current, the DT bindings for Mediatek UFOe (Unified Frame Optimization
>>>> engine) is missing the mediatek,gce-client-reg property. Add it and
>>>
>>> Why is it missing? If the binding is complete, it cannot be missing...
>>
>> Due to the following error:
>>
>> $ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
>>     SCHEMA  Documentation/devicetree/bindings/processed-schema.json
>>     DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
>> [...]
>> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: ufoe@1401a000
>> (mediatek,mt8173-disp-ufoe): 'mediatek,gce-client-reg' does not match
>> any of the regexes: '^pinctrl-[0-9]+$'
>> 	from schema $id:
>> http://devicetree.org/schemas/display/mediatek/mediatek,ufoe.yaml#
> 
> So there are users of it? Then please explain that.

Ack. Will fix in v2. Thanks.

> 
>>
>>>
>>>> update the example as well.
>>>>
>>>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>>>> ---
>>>>    .../bindings/display/mediatek/mediatek,ufoe.yaml      | 11 +++++++++++
>>>>    1 file changed, 11 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>>> index 61a5e22effbf2..ecb4c0359fec3 100644
>>>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
>>>> @@ -64,6 +64,14 @@ properties:
>>>>          - port@0
>>>>          - port@1
>>>>    
>>>> +  mediatek,gce-client-reg:
>>>> +    description: The register of client driver can be configured by gce with
>>>> +      4 arguments defined in this property, such as phandle of gce, subsys id,
>>>> +      register offset and size. Each GCE subsys id is mapping to a client
>>>
>>> Don't explain what DT syntax is. We all know, so that's completely
>>> redundant description. Explain the purpose. Explain Arguments with sechema - items.
>>
>> Although I agree with your suggestions, this is exactly how the rest of
>> the Mediatek DT bindings describe this node. This patch is based on the
>> other +20 files, which describe the node in the same way.
> 
> 
> Last time I tried to fix something for Mediatek display I got
> condescending and useless review from Collabora, so I won't be bothering
> with fixing these bindings to make your job easier. I don't care, you
> can thank someone inside. Therefore other poor bindings are not a valid
> excuse for this patch not being correct.

I see. Will rework this properly in v2.

Thanks,

-- 
Ariel D'Alessandro
Software Engineer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK 
Registered in England & Wales, no. 5513718