Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C4EAC74A5B for ; Tue, 21 Mar 2023 09:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbjCUJzP (ORCPT ); Tue, 21 Mar 2023 05:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjCUJzJ (ORCPT ); Tue, 21 Mar 2023 05:55:09 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800C642BD1; Tue, 21 Mar 2023 02:54:57 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 35C4F66030DA; Tue, 21 Mar 2023 09:54:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679392495; bh=1JltmLgRNV4IHmYEsNUnZUzP3ExsG4axYz1jkhP27SY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Owh7RWhB7Db/pjY5RqGj1SkTPYKhoygsU7DooP1X/gCOchYEMhLFV/Uf88sVaShzh leEbyY5ujLEw9bBnOrQ2DGZvSI9bnX0JDvQFCb3AfqKBO7xzJZUSU1anJsD3YRTHdI in2uy0sTPQEjMPv9OyT030GpbpkQESfRo4zjqOuTDzYIQrQ0USzlrY3XQeFisjCKq7 AYWUu68nxWsP44n2mIPqXfmMaHBCDtlJW2UmDNITmMRth6N9D+K7g0VM2v7sBniZJP TCuWeTQinerSBuHT2+PKepMLfAYmmo9N7W9nm/pCV1SSJq56wqhp6ZR7GkuuPM/5VN tlJiaAiAXHSgQ== Message-ID: Date: Tue, 21 Mar 2023 10:54:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v29 1/7] dt-bindings: mediatek: add ethdr definition for mt8195 Content-Language: en-US To: =?UTF-8?B?TmFuY3kgTGluICjmnpfmrKPonqIp?= , "p.zabel@pengutronix.de" , "matthias.bgg@gmail.com" , "krzysztof.kozlowski@linaro.org" , "chunkuang.hu@kernel.org" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , =?UTF-8?B?U2luZ28gQ2hhbmcgKOW8teiIiOWciyk=?= , "nathan@kernel.org" , "devicetree@vger.kernel.org" , "daniel@ffwll.ch" , =?UTF-8?B?Q0sgSHUgKOiDoeS/iuWFiSk=?= , "dri-devel@lists.freedesktop.org" , Project_Global_Chrome_Upstream_Group , "linux-arm-kernel@lists.infradead.org" , "clang-built-linux@googlegroups.com" , "ndesaulniers@google.com" References: <20221227081011.6426-1-nancy.lin@mediatek.com> <20221227081011.6426-2-nancy.lin@mediatek.com> <4aff6a7a3b606f26ec793192d9c75774276935e0.camel@mediatek.com> <2700bd6c-f00d-fa99-b730-2fcdf89089fa@linaro.org> <1d65e8b2de708db18b5f7a0faaa53834e1002d9f.camel@mediatek.com> <0ebf187d-972e-4228-d8a0-8c0ce02f642d@linaro.org> <72cf6344a1c5942bff0872d05dce82b787b49b76.camel@mediatek.com> <4027714e-b4e8-953b-68e2-f74f7a7f0e8e@linaro.org> <5695b8e5ab8339764c646ee581529cb6cee04346.camel@mediatek.com> <34c758c0-cbbb-da11-6263-e7b084040ed6@collabora.com> <74dca3fa90d5cd78286281e2ced45842bee21f91.camel@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <74dca3fa90d5cd78286281e2ced45842bee21f91.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 21/03/23 06:33, Nancy Lin (林欣螢) ha scritto: > Dear Angelo, > > Sorry for late reply. > > On Fri, 2023-03-17 at 10:58 +0100, AngeloGioacchino Del Regno wrote: >> Il 17/03/23 10:52, Nancy Lin (林欣螢) ha scritto: >>> On Fri, 2023-03-17 at 10:37 +0100, AngeloGioacchino Del Regno >>> wrote: >>>> Il 17/03/23 10:03, Krzysztof Kozlowski ha scritto: >>>>> On 17/03/2023 08:55, Nancy Lin (林欣螢) wrote: >>>>>> 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/-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/-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? >>>>> >>>>> Ah, then it should be maxItems: 7, not 1. >>>>> >>>> >>>> Keep in mind for your v30: >>>> >>>> maxItems: 7 will pass - but only if minItems is *not* 7 :-) >>>> >>>> -> (so, do not declare minItems, as default is 1) <- >>>> >>>> Regards, >>>> Angelo >>>> >>> >>> Hi Angelo, >>> >>> I still have one message [1] when runing dt_binding_check for >>> "example >>> 2 + maxItems: 7" [2]. >>> >>> [1] >>> /proj/mtk19347/cros/src/third_party/kernel/v5.10/Documentation/devi >>> cetr >>> ee/bindings/display/mediatek/mediatek,ethdr.example.dtb: >>> hdr-engine@1c114000: mediatek,gce-client-reg: [[4294967295, 7, >>> 16384, >>> 4096, 4294967295, 7, 20480, 4096, 4294967295, 7, 28672, 4096, >>> 4294967295, 7, 36864, 4096, 4294967295, 7, 40960, 4096, 4294967295, >>> 7, >>> 45056, 4096, 4294967295, 7, 49152, 4096]] is too short >>> >>> >>> [2] >>> mediatek,gce-client-reg: >>> $ref: /schemas/types.yaml#/definitions/phandle-array >>> maxItems: 7 >>> 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/-gce.h, mapping to the >>> register of >>> display >>> function block. >>> >> >> Maybe I'm wrong about the "do not declare minItems"... try with >> >> minItems: 1 >> maxItems: 7 >> >> >> ...does it work now? >> > > Yes, It works well with "example2 + minItems:1 + maxItems: 7" [1] > > [1] > mediatek,gce-client-reg: > $ref: /schemas/types.yaml#/definitions/phandle-array > minItems: 1 > maxItems: 7 > 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/-gce.h, mapping to the register of > display > function block. > Please send a v30 with that solution ASAP then, so that we may perhaps *finally* get it in for v6.4. Regards, Angelo