Message ID | 20221104164718.1290859-14-miquel.raynal@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp520092wru; Fri, 4 Nov 2022 09:52:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CwxBBfu+aCITnzGaBKvpE6ywY9EPpLn/qagR6+XlQX32EwpdLtCtyhAEZSU/THd6ncY/y X-Received: by 2002:a17:907:d93:b0:78d:fe7a:f1fe with SMTP id go19-20020a1709070d9300b0078dfe7af1femr36637181ejc.721.1667580742210; Fri, 04 Nov 2022 09:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667580742; cv=none; d=google.com; s=arc-20160816; b=h7wMEtsg3RVygK0JRxAjh8atB8UdP8V1XSB4NAv62BVTtyKLEz/1tbA+EnQOqCyxFK H9+onR+s+U2CQcJG+8gehgo2ZWLBUxx+a0hZz0cxXVRJkbkUd8WB0TZqOHCD9mjQNmNr Iaa9wWVJjllJ/cwKiOFR5mrJjBY8Daqd4v1zuQ6N7bZhcUGKMcl/oy9Ttn7H3tk0C+5B 2nLrzvceZMPWTAp4MNbV7QsalMDPaaZOviMmgPmxH10PxPxxOvbsNwYUdrmmdkNgJcBs 0RAXCsIXNITbg42fgWDVLjCbu7TwmPBoq6JHTkhTYSQtglnELwreof/mUCHRlaPfhBzF kQ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mfySvTw9F2sJ/4rPEiimBhliYhZWKXtJT7ol/a3yWK0=; b=M1gJUny6Uq6i5RWtmpczH32RaPQuoiCmZTvScfGIuhnNe/iQJllsVcO/e3i0WKbhgo FuG5W82TlEdnASBmtE92OIKcjXGIuaG/uuZ/F6dDbb7c09ZHjRSwa07HKVpTUnD/sPNs taTz7bOhHrMvwOHBcjjRJ7hLn/xFvVqJ5wb/pwXOc//RCVfkzroU1vbX1WAv4GVQvCuW fZRKUkCGgCOLJ65iDGyJPC2ZpdnrR+4WBGiCkJlFg7FOwuL7rxU9IjI2yALUwy4SIkdw crdKlctYKvxRRMXtM8CJ8QezCdv8mJpECR7ox1NPqea1OVIwWUr5S5jO2kKszwvdQHkX ywTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=BAwtPBJz; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a50d551000000b004588af9ea19si5479006edj.166.2022.11.04.09.51.58; Fri, 04 Nov 2022 09:52:22 -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=@bootlin.com header.s=gm1 header.b=BAwtPBJz; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231969AbiKDQst (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 12:48:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231944AbiKDQrq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 12:47:46 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 647BA40472; Fri, 4 Nov 2022 09:47:35 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9FFE84000E; Fri, 4 Nov 2022 16:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667580454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mfySvTw9F2sJ/4rPEiimBhliYhZWKXtJT7ol/a3yWK0=; b=BAwtPBJzb+XlqqpzqieVXHyZ3DejlH1PGnv/FsZyapr/V2YWOZGiYPcv+6xIEzpLbVjw/c fUyGzoqcJOQox8RZGEOSZ2zD3W51FvanYVppRulSmoXultO3xknnTd/N+GPCe60NEUl2gD yVMl+O6I/m5rWYz0DRHjv91tN67ZaaMgfReGqNYgeNnrhdF3ebkguBt3om0so6+f/E+6dW ig1moSkpc7vgCrgVbkJjfOxRwmwwKb8KuaTO4fG57mRlhpvkbIDA+ggpL8GbAKr/OM5wZF Tl5kiid47R8wu7G2EFkgyVjrU9Oc3JeAKIcjk6UynWKN/+DPVCmGfJmN94Zxkg== From: Miquel Raynal <miquel.raynal@bootlin.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, devicetree@vger.kernel.org Cc: Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Tudor Ambarus <Tudor.Ambarus@microchip.com>, Pratyush Yadav <p.yadav@ti.com>, Michael Walle <michael@walle.cc>, <linux-mtd@lists.infradead.org>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, <linux-kernel@vger.kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com> Subject: [PATCH v2 13/17] dt-bindings: mtd: nvmem-cells: Fix example Date: Fri, 4 Nov 2022 17:47:14 +0100 Message-Id: <20221104164718.1290859-14-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221104164718.1290859-1-miquel.raynal@bootlin.com> References: <20221104164718.1290859-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748585144637201999?= X-GMAIL-MSGID: =?utf-8?q?1748585144637201999?= |
Series |
Improve MTD bindings
|
|
Commit Message
Miquel Raynal
Nov. 4, 2022, 4:47 p.m. UTC
There is no such thing as a "ranges" property within an nvmem-cells
node. There is no use of it, it is anyway not pictured anywhere that
this is valid, so drop it from the example.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
.../devicetree/bindings/mtd/partitions/nvmem-cells.yaml | 1 -
1 file changed, 1 deletion(-)
Comments
On Fri, Nov 04, 2022 at 05:47:14PM +0100, Miquel Raynal wrote: > There is no such thing as a "ranges" property within an nvmem-cells > node. There is no use of it, it is anyway not pictured anywhere that > this is valid, so drop it from the example. For a memory mapped device such as parallel NOR flash. It would be perfectly fine to translate a nvmem cell 'reg' address to a CPU address. If the partitions are not memory mapped, then it's a gray area. Whether it makes sense to translate just to just the absolute offset of the flash device, maybe or maybe not. At a minimum, 'ranges' just means can translate to the parent address space. The Linux DT translate code only supports the full translation to CPU addresses, but then it mainly just supports creating resources. Rob
Hi Rob, robh@kernel.org wrote on Thu, 10 Nov 2022 10:59:06 -0600: > On Fri, Nov 04, 2022 at 05:47:14PM +0100, Miquel Raynal wrote: > > There is no such thing as a "ranges" property within an nvmem-cells > > node. There is no use of it, it is anyway not pictured anywhere that > > this is valid, so drop it from the example. > > For a memory mapped device such as parallel NOR flash. It would be > perfectly fine to translate a nvmem cell 'reg' address to a CPU address. > If the partitions are not memory mapped, then it's a gray area. Whether > it makes sense to translate just to just the absolute offset of the > flash device, maybe or maybe not. At a minimum, 'ranges' just means > can translate to the parent address space. The Linux DT translate code > only supports the full translation to CPU addresses, but then it mainly > just supports creating resources. Ah ok, I missed this possibility indeed, thanks for the explanation. So I agree the commit log is wrong, but I guess the change itself is fine because the property should be declared/authorized in the schema. So here we have two options: 1- Document the property 2- Drop the property from the example As we currently have no user upstream of this property I would argue we can keep dropping 'ranges' from the example, knowing of course that someone might come up some day and document it properly if it is needed. In this case I would update the commit message to: dt-bindings: mtd: nvmem-cells: Drop range property from example Memory mapped devices such as parallel NOR flash could make use of the 'ranges' property to translate a nvmem 'reg' cell address to a CPU address but in practice there is no upstream user nor any declaration of this property being valid in this case. In order to avoid warnings when constraining a bit more the schema, let's drop the property from the example, knowing that someone might actually properly define it some day. Would you agree with this change? Thanks, Miquèl
diff --git a/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml b/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml index 5cdd2efa9132..ca18892eacc7 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml @@ -84,7 +84,6 @@ examples: compatible = "nvmem-cells"; label = "calibration"; reg = <0xf00000 0x100000>; - ranges = <0 0xf00000 0x100000>; #address-cells = <1>; #size-cells = <1>;