<pre>
On Thu, 2023-03-16 at 12:36 +0100, Krzysztof Kozlowski wrote:
> On 16/03/2023 10:53, AngeloGioacchino Del Regno wrote:
>
> > Hello Krzysztof, Nancy,
> >
> > Since this series has reached v29, can we please reach an agreement
> > on the bindings
> > to use here, so that we can get this finally upstreamed?
> >
> > I will put some examples to try to get this issue resolved.
> >
> > ### Example 1: Constrain the number of GCE entries to *seven* array
> > elements (7x4!)
> >
> > mediatek,gce-client-reg:
> > $ref: /schemas/types.yaml#/definitions/phandle-array
> > maxItems: 1
> > description: The register of display function block to be set
> > by gce.
> > There are 4 arguments in this property, gce node, subsys id,
> > offset and
> > register size. The subsys id is defined in the gce header of
> > each chips
> > include/dt-bindings/gce/<chip>-gce.h, mapping to the
> > register of display
> > function block.
> > items:
> > minItems: 28
> > maxItems: 28
> > items: <----- this block doesn't seem to
> > get checked :\
> > - description: phandle of GCE
> > - description: GCE subsys id
> > - description: register offset
> > - description: register size
>
> This is what we would like to have but it requires exception in
> dtschema. Thus:
>
> >
> >
> > ### Example 2: Don't care about constraining the number of
> > arguments
> >
> > mediatek,gce-client-reg:
> > $ref: /schemas/types.yaml#/definitions/phandle-array
> > maxItems: 1
> > description: The register of display function block to be set
> > by gce.
> > There are 4 arguments in this property, gce node, subsys id,
> > offset and
> > register size. The subsys id is defined in the gce header of
> > each chips
> > include/dt-bindings/gce/<chip>-gce.h, mapping to the
> > register of display
> > function block.
>
> use this.
>
> Best regards,
> Krzysztof


Hi Krzysztof, Angelo,

Thanks for the comment.
The Example 2 can pass dt_binding_check.

But the example in the binding has 7 items [1] and dts [2]. Does the
"maxItems: 1" affect any other schema or dts check?

[1]
+ mediatek,gce-client-reg = <&gce0 SUBSYS_1c11XXXX 0x4000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0x5000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0x7000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0x9000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0xa000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0xb000 0x1000>,
+ <&gce0 SUBSYS_1c11XXXX 0xc000 0x1000>;
>

[2] [v21,25/25] arm64: dts: mt8195: add display node for vdosys1

https://patchwork.kernel.org/project/linux-mediatek/patch/20220504091440.2052-26-nancy.lin@mediatek.com/

Regards,
Nancy

</pre><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->