Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7486927rwi; Mon, 24 Oct 2022 15:37:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74usMDEVma+KXEtT/2LcXe5O1J8mIzAJm7fsLgCw/wCQPingxtR9A4VEAVWueZjH/BSbD1 X-Received: by 2002:a17:906:5dda:b0:78d:e7d2:7499 with SMTP id p26-20020a1709065dda00b0078de7d27499mr30018520ejv.588.1666651045005; Mon, 24 Oct 2022 15:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666651044; cv=none; d=google.com; s=arc-20160816; b=qG6CpYRr0OLn5ItJjVc9mqwZchNd+Pbk3JJYG3Rrdu/KSKDoeXOwA6ZN4tgpAByx1T sPy/u037RYEiz+4sOXiWk5U/nXHJ0dcUIwnRx5LVp+m8pxivuxrmzjNM0GHC2RIm+6CW 7w63pb6JlU6Rzenc6hOtaokTjbSBJmWheQQ47QITUG2Ctudz2AH+Y3cgeeOjQDB+iuMa lWYev3h08aQi2BgO2rlJPdSiCsXLQWWF6YGKPPQNhH5KNYMLL0auMRZp4eVcVV0iVw1x YqNDaRW9d5NkPDNM6hA0Gqbb9fHHwPFIv609sF6O1pXm1czHk3shvoeHRHxzEwS+bwG+ pjZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tqFLMg6uRhRQRmXJ9QneA5/Qult4cQee1Mbf8jF2WyE=; b=jfmjklGGjTi/NlA+dZfQhAACzW4kJ4Vog9AhPkDM2GsSUWQUaBucfy+6c0LHz9BCfe 6jfUSSZDnUZ6PIYtL1XXJaGVYbT02Lp/nZMhFff4kj3wRL07igks/ZOi0bbxao+pDz5m FknCj6nZr5+rWCnMiMP7q71NaBo2C2kSFZ602CvTZi63ryH7O/4/0lBwTRfQvwb6Jah3 fDWSpOt9J5iAsb7PtKAdQHOHJwr4JUaWFhxXSra6pdoykrXJLGjztkR6EYZ1rHcgQR3C XmQnNJI2/Qr6WJMSfc147lNwR8nPEylmk0Q4u3KMoMdlcpTICEvwk4e+uC5ICQ5AH4Pr /otA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AdkZFHvu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170906700a00b00781e568f39bsi806511ejj.308.2022.10.24.15.37.00; Mon, 24 Oct 2022 15:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AdkZFHvu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231516AbiJXWbI (ORCPT + 99 others); Mon, 24 Oct 2022 18:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbiJXWad (ORCPT ); Mon, 24 Oct 2022 18:30:33 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A7ED157F4A for ; Mon, 24 Oct 2022 13:53:22 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id mx8so7269771qvb.8 for ; Mon, 24 Oct 2022 13:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=tqFLMg6uRhRQRmXJ9QneA5/Qult4cQee1Mbf8jF2WyE=; b=AdkZFHvuiAP4xkerquOcpqZB3+k+FtH0/4XwqqQpZmxk6GgrLYTmb8gzshooljZSE6 jdakcuD8Alctrf4B+M4qnhgUAmiADrcwssfH9wNCEX70M2rzC1PUY7a5dVzkdK05jPGn WgFiZsHIuvVuH4NXBSxghwPD5G9/lUsqL08n6/5t+tDTFdOICOi5Ri+B/aDy1f2kfqRl q5iDubrjWedxmj6aMtR7hhuABT5Cr9oCqwbguV+mDbs1fsBlBIdDWDSx1p5Gon6qWv+F qzRw2bzab9nF8uGnUqezDODBMBl8chfdELzmvA5uPBYJ0RJ62Ps/eIe13CO5ufgQG1nK p1/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=tqFLMg6uRhRQRmXJ9QneA5/Qult4cQee1Mbf8jF2WyE=; b=Xgthxy88fuKQCdIZu0d8lBlUG1si4E52DVso6DZsDlOCY2ELvrCX1TxKVDUMydNbla ErKZVaAG17ah+j894Z29DWqeNCti3f0/WzIs8BATlUXutoUaTYG/ZRFJiclRZiX6wV5E 02//fft0Z8FfifplXO2iuEDB8qeLL1s6hl9xJJNdSbaVlBWbrKEBVBRvrGZDBUpliuJ/ r9y03WhpJNc4AcBPe9AMYugegjMtMjKOcXAPzIvVHPer9uupQMO6+wOTqtQbUHy7Hay0 RBCdlXUiyoMPYVqLkcOu9ncG51hm7D4veiogL73ApOUqYldSnyF0kxIGO2IaOiHhOHdj Ek8g== X-Gm-Message-State: ACrzQf1H+FEs0huZs6uyK4jnPU9XNVSpunr1RbFrfbTdpUHCV/dt8PMk aaSskgiiJnddsbuZYslcjP13lw== X-Received: by 2002:a05:6214:e62:b0:4b3:ff39:7aef with SMTP id jz2-20020a0562140e6200b004b3ff397aefmr29749239qvb.31.1666644677366; Mon, 24 Oct 2022 13:51:17 -0700 (PDT) Received: from [192.168.1.8] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id l11-20020a37f90b000000b006ee79bb1f8asm622386qkj.68.2022.10.24.13.51.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 13:51:16 -0700 (PDT) Message-ID: <8cc7a8b6-0ca9-bc61-77e3-abf24cfbc909@linaro.org> Date: Mon, 24 Oct 2022 16:51:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 1/2] dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme Content-Language: en-US To: Vadym Kochan , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Elad Nachman References: <20221021194552.683-1-vadym.kochan@plvision.eu> <20221021194552.683-2-vadym.kochan@plvision.eu> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/10/2022 15:48, Vadym Kochan wrote: > Hi Krzysztof, > > On Sat, 22 Oct 2022 12:18:49 -0400, Krzysztof Kozlowski wrote: >> On 21/10/2022 15:45, Vadym Kochan wrote: >>> Switch the DT binding to a YAML schema to enable the DT validation. >>> >>> Dropped deprecated compatibles and properties described in txt file. >>> >>> Signed-off-by: Vadym Kochan >>> --- >>> .../bindings/mtd/marvell,nand-controller.yaml | 199 ++++++++++++++++++ >>> .../devicetree/bindings/mtd/marvell-nand.txt | 126 ----------- >>> 2 files changed, 199 insertions(+), 126 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml >>> delete mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt >>> >>> diff --git a/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml >>> new file mode 100644 >>> index 000000000000..535b7f8903c8 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml >>> @@ -0,0 +1,199 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Marvell NAND Flash Controller (NFC) >>> + >>> +maintainers: >>> + - Miquel Raynal >> >> This should be someone responsible for hardware, not subsystem >> maintainer. Unless by coincidence Miquel matches both. :) >> >>> + >>> +properties: >>> + >>> + compatible: >>> + oneOf: >>> + - items: >>> + - const: marvell,armada-8k-nand-controller >>> + - const: marvell,armada370-nand-controller >> >> Does not look like you tested the bindings. Please run `make >> dt_binding_check` (see >> Documentation/devicetree/bindings/writing-schema.rst for instructions). > > Yes, on v1 I did not use yamllint, but installed after Rob pointed > on some lint warnings. I did not say about yamllint. > >> >>> + - const: marvell,armada370-nand-controller >>> + - const: marvell,pxa3xx-nand-controller >> >> These two are just enum. >> > > OK. > >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + "#address-cells": >>> + const: 1 >> >> Drop, comes with nand-controller.yaml >> > > OK. > >>> + >>> + "#size-cells": >>> + const: 0 >> >> Ditto >> > > OK. > >>> + >>> + interrupts: >>> + maxItems: 1 >>> + >>> + clocks: >>> + minItems: 1 >>> + maxItems: 2 >>> + description: | >> >> No need for | >> >>> + Shall reference the NAND controller clocks, the second one is >>> + is only needed for the Armada 7K/8K SoCs >> >> You need allOf:if:then restricting it further per variant. >> > > OK, added. > >>> + >>> + clock-names: >>> + items: >>> + - const: core >>> + - const: reg >>> + description: | >>> + Mandatory if there is a second clock, in this case there >>> + should be one clock named "core" and another one named "reg" >> >> The message is confusing. What is mandatory if there is a second clock? >> Plus, the binding requires two clocks. >> >> Drop entire description. >> >> minItems: 1 >> > > OK, droped (I used from the txt version). > Added minItems. > >> >>> + >>> + dmas: >>> + maxItems: 1 >>> + description: rxtx DMA channel >> >> Drop description. >> > > OK. > >>> + >>> + dma-names: >>> + items: >>> + - const: rxtx >>> + >>> + marvell,system-controller: >>> + $ref: /schemas/types.yaml#/definitions/phandle >>> + description: Syscon node that handles NAND controller related registers >>> + >>> +patternProperties: >>> + "^nand@[0-3]$": >>> + type: object >>> + properties: >>> + >> >> Drop blank line. >> > > OK. > >>> + reg: >>> + minimum: 0 >>> + maximum: 3 >>> + >>> + nand-rb: >>> + minimum: 0 >>> + maximum: 1 >>> + >>> + nand-ecc-strength: >>> + enum: [1, 4, 8] >>> + >>> + nand-on-flash-bbt: true >>> + >>> + nand-ecc-mode: true >>> + >>> + nand-ecc-algo: >>> + description: | >>> + This property is essentially useful when not using hardware ECC. >>> + Howerver, it may be added when using hardware ECC for clarification >>> + but will be ignored by the driver because ECC mode is chosen depending >>> + on the page size and the strength required by the NAND chip. >>> + This value may be overwritten with nand-ecc-strength property. >>> + >>> + nand-ecc-step-size: >>> + const: 512 >> >> Why this is const? >> > > Removed const. > >>> + description: | >>> + Marvell's NAND flash controller does use fixed strength >>> + (1-bit for Hamming, 16-bit for BCH), so the actual step size >>> + will shrink or grow in order to fit the required strength. >>> + Step sizes are not completely random for all and follow certain >>> + patterns described in AN-379, "Marvell SoC NFC ECC". >>> + >>> + label: >>> + $ref: /schemas/types.yaml#/definitions/string >>> + >>> + partitions: >>> + type: object >>> + $ref: "/schemas/mtd/partitions/partition.yaml" >> >> Drop quotes >> > > OK. > >> unevalautedProperties: false >> >> and then you will see errors, because you referenced schema for one >> partition. >> > > Hm, I did not see errors with partitions with- or without "unevaluatedProperties". As pointed before and here - I am not sure if you tested the bindings, so of course then will be no warnings... Best regards, Krzysztof