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: 13024417 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 E4CE8FA3741 for ; Sat, 29 Oct 2022 00:01:32 +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: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=OfNDCghy6fUNnSIn7FdQHa7X6MJ8RvzUGJvYvIWznPE=; b=qMswmqQL5NJP2O 6C3JtvPY2qrPwUDs9QONC/hntjJSDsDu9eiHqI+k6pWVrjh7TTJ4pIWU9lUE0/T2jJ5Q/wKp3EfU0 QhbKIx+uKImlECUV0VeWjJJdNiEcx5Mc26qcmC4lEzk0ZgUaSRxmCoe0rVv+DJszENZVCngMuxRNy kiyYINcQd6F0KWX3HD+ciiT1ZP8bHdCsGR/9LCrmbX/zuNJai2ct8Q7QvpjFGpqTxoM7SqbpFdm44 aCf0Eyb7npnMgaK53L0QI9xzff/bIZJ9bWNtOI98z+jMa7CDetZ4EZs+rGoxD4sEHB+XEhHmMZFsE 4AqcZnNgnbT1q7TD+O0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooZGz-003Jw9-55; Sat, 29 Oct 2022 00:00:25 +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-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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.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