From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABF687F for ; Wed, 14 Jun 2023 06:39:45 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4f642a24568so8007292e87.2 for ; Tue, 13 Jun 2023 23:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686724783; x=1689316783; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7Q8Ite1Y2wooAZNS/2RrLNMbn3Ax42VQdzwJmVMSBFY=; b=lfk7ZaXsqgxVJ2Go/4Vk4ajvcbFYZlHMDvkZO9hw8UNxtHawnH/CViSGFam+265v6T Pwohy158+Dy8W8vDlkz8lRfR+fqkdu9dr9ZscDNbySYAumEffLLsVI3fd9AptFOFCERV fF/7tDTj83x+tlIm6318ki75AFwjLEW2E+Lic14eQfk7im2xaPgzW41CONpN+enlPNj8 Yt3t2GaNBYhqyusLRyyCcslZks6C89BQIZjfpSnc7120bAhElHMIcsFA87VAR3bH8ZV1 He6cEe+gtHU+IpyIJHb/9nSGtsUmU1dKbOmTbrnlI5m9YbEs3Kz7GhkNZxUpmxsdSJcR ZP8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686724783; x=1689316783; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7Q8Ite1Y2wooAZNS/2RrLNMbn3Ax42VQdzwJmVMSBFY=; b=VxYgGZx+6mE+9aBtAgVz+dhUv/jwUGEQYwE3y5f35inaQUlQq2ejBcYlj8dG7PpdWP 2/XCiifot46wYmb4kXtucQnsOtVueF8/lWPAC5RTEaXRHao8mHnsTikvP6/J1SQYwh2y dql4p+xwPi3l6VWL2jp+h/yxZP5qFwINXURUMUtzB8WPVqxFmdvQq5tHOsSY/hcRr+SE Wax95xOp2ozaaTUTMXfU+yh5t+5HIK38z4Hgzkrhbk/5YRL/IALTXHJA+g7yeGfZjdBc QxI4HoHWRQZvs4v+NUjHh0ES8EHJiqfBE1CjrIqw1A9jAY2cawI82CoIcJUiBk1038TJ ibfw== X-Gm-Message-State: AC+VfDyob6isXiD1jMcisPlQJot/C58vohwGudJY66Ryhu1jEQXGkcB4 qTI02+KnA+d+0sAl7Bjd0qC9Mg== X-Google-Smtp-Source: ACHHUZ6OLlLpfxP5/b76GWeAGDJQ++2yHCREYPo2cXWux82fNIjP/1qeMBe9cGMnVm76aZG3s1I8MA== X-Received: by 2002:a19:da12:0:b0:4f7:4098:9905 with SMTP id r18-20020a19da12000000b004f740989905mr5251736lfg.65.1686724783462; Tue, 13 Jun 2023 23:39:43 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id m12-20020a50ef0c000000b0051891fc318dsm387145eds.23.2023.06.13.23.39.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 23:39:42 -0700 (PDT) Message-ID: <95bd381d-0851-dca7-031d-0da5060237fe@linaro.org> Date: Wed, 14 Jun 2023 08:39:40 +0200 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v5 12/12] dt-bindings: fsl-dma: fsl-edma: add edma3 compatible string Content-Language: en-US To: Frank Li Cc: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev References: <20230613213149.2076358-1-Frank.Li@nxp.com> <20230613213149.2076358-13-Frank.Li@nxp.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 14/06/2023 00:01, Frank Li wrote: > On Tue, Jun 13, 2023 at 11:43:31PM +0200, Krzysztof Kozlowski wrote: >> On 13/06/2023 23:31, Frank Li wrote: >>> Extend Freescale eDMA driver bindings to support eDMA3 IP blocks in >>> i.MX8QM and i.MX8QXP SoCs. In i.MX93, both eDMA3 and eDMA4 are now. >>> >>> Signed-off-by: Frank Li >>> --- >>> .../devicetree/bindings/dma/fsl,edma.yaml | 118 +++++++++++++++--- >>> 1 file changed, 100 insertions(+), 18 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml >>> index 5fd8fc604261..2f79492fb332 100644 >>> --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml >>> +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml >>> @@ -21,32 +21,20 @@ properties: >>> - enum: >>> - fsl,vf610-edma >>> - fsl,imx7ulp-edma >>> + - fsl,imx8qm-adma >>> + - fsl,imx8qm-edma >>> + - fsl,imx93-edma3 >>> + - fsl,imx93-edma4 >>> - items: >>> - const: fsl,ls1028a-edma >>> - const: fsl,vf610-edma >>> >>> - reg: >>> - minItems: 2 >>> - maxItems: 3 >>> - >>> - interrupts: >>> - minItems: 2 >>> - maxItems: 17 >> >> What is happening here? > > I found dt_check always check this part firstly, then check allOf. > >> >>> - >>> - interrupt-names: >>> - minItems: 2 >>> - maxItems: 17 >>> - >>> - "#dma-cells": >>> - const: 2 >>> - >>> - dma-channels: >>> - const: 32 >> >> No, why all these are being removed? > > I move common part ahead of if-then-else branch to read early. > >> >>> - >>> clocks: >>> + minItems: 1 >>> maxItems: 2 >>> >>> clock-names: >>> + minItems: 1 >>> maxItems: 2 >>> >>> big-endian: >>> @@ -55,6 +43,43 @@ properties: >>> eDMA are implemented in big endian mode, otherwise in little mode. >>> type: boolean >>> >>> +if: >> >> This should not be outside of your allOf. This patch looks entirely >> different than your v4 and I don't really understand why. >> > > allOf looks like addtional constraints addition to previous define. > for example: > if previous interrupts is 17, I can't overwrite to bigger value 64 > in this sesson. Yes, because the top-level had wrong constraint. Fix top-level, don't remove it. > > previous version: dts check report two error, > first: interrupt is too long. (look like check top one) > then: interrupt is too short. (look like check allOf part) > >> >>> + properties: >>> + compatible: >>> + contains: >>> + enum: >>> + - fsl,imx8qm-adma >>> + - fsl,imx8qm-edma >>> + - fsl,imx93-edma3 >>> + - fsl,imx93-edma4 >>> +then: >>> + properties: >>> + reg: >>> + maxItems: 1 >>> + interrupts: >>> + minItems: 1 >>> + maxItems: 64 >> >> What's more, you don't have these properties defined in top-level. >> Sorry, they should not be moved. I did not ask for this. > > It is there. > if-then-else before "required" It's in if, not in top-level properties. Best regards, Krzysztof