From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FB69EB64DB for ; Thu, 15 Jun 2023 07:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fn43PuQff6xdT3aq3LESWlTSMIqIVjlZC32Qx1HwFTw=; b=g5H/hb0xrErjnV iMEgPq930Jcs68MMphCZCKtFWFwhCFZfU/yUsZMW7hfjG2E+LeHrg5sL1wzzxTKW5v3CmCSQb4Cug qepKyzawEBdW8x8W5QJc+t0+d5pHshGojzGu5WBD06oPY1ijLwnP3yrz4b+GGl6xH+YpYGyy3JPN9 XOeqKS4QsQdtgyKLo7HGnez4B0olH70jseus+y+pKVry2wl361spwnWnVJbYKYPa1sY8UmIocii+h lDVWJT2UUYtr6rFXuoUk04T2mNAULEqCZR7RPESmW7M3DiE72402kCnVU1x6095Q6/lNVMO4CQFat 3WnWihE28rOshzXm4l+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9hfe-00E3xv-1i; Thu, 15 Jun 2023 07:45:30 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9hfb-00E3wM-0a for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 07:45:28 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-51640b9ed95so12637838a12.2 for ; Thu, 15 Jun 2023 00:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686815122; x=1689407122; 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=GShQN3aNeb/7szyOAsiAwnXDqLh1QR1gf41/K50luCM=; b=SqSio0bSvHU9qKGsCc/ZYZRiw60stlxeWgphdgk06A11rBVv/rM5MDeiRuYtth2CV3 m2a01lcAf6P8y0X+eQ9pnNAjL8YtpHW3piO4T9dVixCuWuhO24pRvQIFtB7iJAHKwV7T d2gigFLi0nqg/m7CQ8hgquYF6FlsdEn37vButF3jwbnQE7Y2vW+MDmIazSdSKft1/kh6 nS5j/9YiimTsBX3hfgyy9rD0K8aJEjg6+BAzqqZpUo3KAaUMjaPPnrluLuhDgf/IoJaq DKY/fjwdv4lwvDdyRpCyUzlDys3OtUb/vRpuFfOLy7VxxZ07V95BOTsprxts/RQcE1lD rsqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686815122; x=1689407122; 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=GShQN3aNeb/7szyOAsiAwnXDqLh1QR1gf41/K50luCM=; b=H9CZ054Guj3Nm/FEwiptGNNPuEyMNP39/aEHWmbyZeYxZFp5Adr5G4R5hkKLHS1Pl3 SF4VIb6PtcKwj+Z545C5couddl90r338sd3uKz14O4LZ0bEUowALf9exnRt2Ko2mXbSC 8vK1PBLWIARMwIQdA7Tmc8UMgS5p4GpJZyV/Zij43aJ/8+s82j3oNl8a29G47AHh30t4 3+7JvuasowHeQEDz3Sy6k0UR4CKlEAoZegubQe43j4ebm/SwrIJAZeflkA8FdWdYg9AU gC8Y4HsRsLbU+cUSBc3C3vu6UCBSGhP5E/pENcnp4CbQ++r5WBUNGHYNZGg48umbe+tq 8XQw== X-Gm-Message-State: AC+VfDybLgG/B+pWJKYT2Dse2Bl0Xy5BByMESm+jhgt+RUHWXT2XK511 gtJDcx+mqcBxhlLKSbBcAWL7Ng== X-Google-Smtp-Source: ACHHUZ4pJSvwAenolK+mWB2JCajqR5hFQLSmeiE6Bf/3XMsDiYfnIdxnsdy4W2q12qVAnyu1p3SRDw== X-Received: by 2002:a17:906:7308:b0:968:1e8:a754 with SMTP id di8-20020a170906730800b0096801e8a754mr18444931ejc.72.1686815122438; Thu, 15 Jun 2023 00:45:22 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id bi9-20020a170906a24900b009745417ca38sm8967577ejb.21.2023.06.15.00.45.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jun 2023 00:45:22 -0700 (PDT) Message-ID: Date: Thu, 15 Jun 2023 09:45:20 +0200 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 v9 3/3] dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme Content-Language: en-US To: Chris Packham , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vadym Kochan References: <20230615040447.3484564-1-chris.packham@alliedtelesis.co.nz> <20230615040447.3484564-4-chris.packham@alliedtelesis.co.nz> From: Krzysztof Kozlowski In-Reply-To: <20230615040447.3484564-4-chris.packham@alliedtelesis.co.nz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230615_004527_264983_FB91083B X-CRM114-Status: GOOD ( 26.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15/06/2023 06:04, Chris Packham wrote: > From: Vadym Kochan > > Switch the DT binding to a YAML schema to enable the DT validation. > > The text binding didn't mention it as a requirement but existing usage > has > > compatible = "marvell,armada-8k-nand-controller", > "marvell,armada370-nand-controller"; > > so the YAML allows this in addition to the individual compatible values. > > There was also an incorrect reference to dma-names being "rxtx" where > the driver and existing device trees actually use dma-names = "data" so > this is corrected in the conversion. > > Signed-off-by: Vadym Kochan > Signed-off-by: Chris Packham > --- > > Notes: > Changes in v9: > - depend on series from Miquel > https://lore.kernel.org/linux-mtd/20230606175246.190465-1-miquel.raynal@bootlin.com/ > - enforce minimum/maximum for nand-rb > - move required: block for controller > - move unevaluatedProperties: for nand chip > - remove label, partitions and nand-on-flash-bbt which are covered by > generic schema > > Changes in v8: > - Mark deprecated compatible values as such > - Allow "marvell,armada-8k-nand-controller" without > "marvell,armada370-nand-controller" ??? > + > +properties: > + compatible: > + oneOf: > + - items: > + - const: marvell,armada-8k-nand-controller > + - const: marvell,armada370-nand-controller > + - enum: > + - marvell,armada-8k-nand-controller This is wrong. 8k cannot be both: compatible and not compatible with 370. It's not someone's cat to be in both states at the same time... > + - marvell,armada370-nand-controller > + - marvell,pxa3xx-nand-controller > + - description: legacy bindings > + deprecated: true > + enum: > + - marvell,armada-8k-nand > + - marvell,armada370-nand > + - marvell,pxa3xx-nand > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + description: > + Shall reference the NAND controller clocks, the second one is > + is only needed for the Armada 7K/8K SoCs > + minItems: 1 > + maxItems: 2 > + > + clock-names: > + minItems: 1 > + items: > + - const: core > + - const: reg > + > + dmas: > + maxItems: 1 > + > + dma-names: > + items: > + - const: data > + > + marvell,system-controller: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Syscon node that handles NAND controller related registers > + > +patternProperties: > + "^nand@[a-f0-9]$": > + type: object > + $ref: raw-nand-chip.yaml > + > + properties: > + reg: > + minimum: 0 > + maximum: 3 > + > + nand-rb: > + items: > + - minimum: 0 > + maximum: 1 > + > + nand-ecc-step-size: > + const: 512 > + > + nand-ecc-strength: > + enum: [1, 4, 8, 12, 16] > + > + nand-ecc-mode: > + const: hw > + > + marvell,nand-keep-config: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | Do not need '|' unless you need to preserve formatting. > + Orders the driver not to take the timings from the core and > + leaving them completely untouched. Bootloader timings will then > + be used. > + > + marvell,nand-enable-arbiter: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | Do not need '|' unless you need to preserve formatting. > + To enable the arbiter, all boards blindly used it, > + this bit was set by the bootloader for many boards and even if > + it is marked reserved in several datasheets, it might be needed to set > + it (otherwise it is harmless). > + deprecated: true > + > + required: > + - reg > + - nand-rb > + > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +allOf: > + - $ref: nand-controller.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + const: marvell,pxa3xx-nand-controller > + then: > + required: > + - dmas > + - dma-names > + > + - if: > + properties: > + compatible: > + contains: > + const: marvell,armada-8k-nand-controller > + then: > + properties: > + clocks: > + minItems: 2 > + > + clock-names: > + minItems: 2 > + > + required: > + - marvell,system-controller else: narrow clocks to 1? Or is the second clod also valid for other variants? Does not look like from your example. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel