From patchwork Fri Oct 28 23:59:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1696539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FTmct/jq; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=R2AMi4l+; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mzfjh46Mpz23lB for ; Sat, 29 Oct 2022 11:02:16 +1100 (AEDT) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=K+MLSQU5FJfR8V9Y/hp8FZcAfjiU7GB3AwGFujutWQQ=; b=FTmct/jqqR+ngV hN6vEVhD9Q3U+3rrPJaExWCSI3qMkr/rtYbztuhzjOkWgXLpfpp5YcMCBoONqACGXL2VnqO8OLJe2 +6cP1DCcwSg/famPSk0y5YoB67le2ToE1eXGQhBbkpDV3TPyn2qhKoWsc79gIs773q6OHHygQa8oF XFmJaUmWhBdl1rjtMRXqmWaEz5XnurVv71HeT0oZrRysEOJiW0HiYh8vZQdbRR/qZaokHNeEjvEGv RLyzE9DK+9QPa25Z7EhC0L4wXWgApZeKn3hGVfLgt88fSBQzed1JGiDIc7gUU6VHvYpKfyjIlHXfH TCrWsod9B/c+a5GULcSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooZIC-003KVP-NC; Sat, 29 Oct 2022 00:01:40 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooZGM-003JhM-0H; Fri, 28 Oct 2022 23:59:49 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id BBAFCFF802; Fri, 28 Oct 2022 23:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667001576; 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; bh=zC82iFrlIYbSsP6fbExDAPio+9uwFvsxm72+V19fmUQ=; b=R2AMi4l+N69yWcGSR7WvtK5yF4dZv9jT7XFuGPsfTZl22MAuEiTIBoq5ZcYVpqLHufCBMH e2IofCj9i7rtK3BGWV0yZZnqn//kfOwsYzyqgqd16lV9dEZ6ypbVyJN4B0a5iSxt0JzUcq A+5tFYsb4c7LVz1GM1LHFyesQiWAevQh+zUhv8AVIKcg2EcqtU6zjGlgf0w9pR0/7fjwyk kO8qv+n9lGxo6+o9nGZMcXBaptnZf7N86lEOR3mxhGGloq7BsVnScVuWWo2G69SdHBrMXY Eyrb+XiexTTSaOXf7XXa2/8X7p+t1hEdyrhcGWSMacC4LFRokRqXEpXPOEVnNg== From: Miquel Raynal To: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Chen-Yu Tsai , Naga Sureshkumar Relli , Linus Walleij , Manivannan Sadhasivam , Maxime Ripard , Sureshkumar Relli , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-msm@vger.kernel.org, Thomas Petazzoni , Miquel Raynal Subject: [PATCH 00/12] Improve MTD bindings Date: Sat, 29 Oct 2022 01:59:21 +0200 Message-Id: <20221028235933.934850-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_165946_347504_8C2629DA X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, During a yaml conversion review, Krzysztof opened the discussion about the links and references made between the different files in the mtd bindings. I figured out some minimal changes might be needed [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.199 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.199 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello, During a yaml conversion review, Krzysztof opened the discussion about the links and references made between the different files in the mtd bindings. I figured out some minimal changes might be needed to properly reference everything correctly and ensure we constrain as much as possible the existing bindings. That is what I tried to do here. The idea is: * partition.yaml defines one MTD partition * parsers/*.yaml define partition parsers (mainly compatibles) * mtd.yaml contains the generic definition of any mtd device (nand, spi-nand, spi-nor, nor, sram, etc), in particular, it defines the various partition formats (legacy and current) and references partition.yaml as well as a list of all the possible parsers within a "partitions" node. * nand-chip.yaml, jedec,spi-nor, mtd-physmap.yaml all describe real instances of mtd device, each of them with a different underlying technology, they reference mtd.yaml * nand-controller.yaml has subnodes which reference nand-chip.yaml. * Specific NAND controller bindings reference nand-controller.yaml. I've tested with the following command and it worked okay: $ make dt_binding_check -j10 DT_CHECKER_FLAG=-m DT_SCHEMA_FILES=mtd/ Comments welcome of course :-) Cheers, Miquèl Miquel Raynal (12): dt-bindings: mtd: Clarify all partition subnodes dt-bindings: mtd: Mention basic properties dt-bindings: mtd: Remove useless file about partitions dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated dt-bindings: mtd: onenand: Mention the expected node name dt-bindings: mtd: nand-chip: Reference mtd.yaml dt-bindings: mtd: Drop common properties from NAND controllers dt-bindings: mtd: spi-nor: Drop common properties dt-bindings: mtd: phymap: Reuse the generic definitions dt-bindings: mtd: Drop object types when referencing other files dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true dt-bindings: mtd: Constrain the list of parsers .../mtd/allwinner,sun4i-a10-nand.yaml | 3 -- .../bindings/mtd/arasan,nand-controller.yaml | 3 -- .../devicetree/bindings/mtd/ingenic,nand.yaml | 13 +----- .../bindings/mtd/intel,lgm-ebunand.yaml | 10 +---- .../bindings/mtd/jedec,spi-nor.yaml | 14 ------- .../devicetree/bindings/mtd/mtd-physmap.yaml | 7 ++-- .../devicetree/bindings/mtd/mtd.yaml | 41 ++++++++++++++++++- .../devicetree/bindings/mtd/nand-chip.yaml | 4 ++ .../bindings/mtd/nand-controller.yaml | 1 - .../devicetree/bindings/mtd/partition.txt | 33 --------------- .../bindings/mtd/partitions/partition.yaml | 1 + .../devicetree/bindings/mtd/qcom,nandc.yaml | 3 -- .../bindings/mtd/ti,gpmc-onenand.yaml | 3 ++ 13 files changed, 52 insertions(+), 84 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mtd/partition.txt