From patchwork Fri Oct 28 23:59:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13024430 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CCD5C38A02 for ; Sat, 29 Oct 2022 00:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbiJ2AAO (ORCPT ); Fri, 28 Oct 2022 20:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230003AbiJ2AAG (ORCPT ); Fri, 28 Oct 2022 20:00:06 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 974F01900A; Fri, 28 Oct 2022 17:00:04 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1CCACFF80F; Fri, 28 Oct 2022 23:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667001598; 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=UEYlWh78STx8kM7HdfKAssnfJ9FCt1Mok1R8ei+AmNY=; b=e8517KkBQ6XkYOpU3YdF4RvgZDguqK03Sk4EcOEa4oQB84Sz7SHVwl1hcVckcNl9SOmSsJ REyjtbeLsnM11NWSWWFuYsVvA1exiAd4fFxu3gQeGW0lPZv90IHFQP9SjkLW6Z4ittLM8a 2ht+gWanmogiE2OchmVHiWFWwh8ERkRmomFoNdNK62EZiBAeiUyxppmLGEa7n+zep3yNY/ djNlr5WAnEk2krmDyFzE126JPtxljRbXlRetg0wFVxiJik3TaRlS0jnRh+lky/lpgnTHOI GTD8+QRLWo8vqBwK0ljvY0S1KcT8PA4Sffw8VccMU67eskMO17ehFh8uaNPzgg== 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 12/12] dt-bindings: mtd: Constrain the list of parsers Date: Sat, 29 Oct 2022 01:59:33 +0200 Message-Id: <20221028235933.934850-13-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028235933.934850-1-miquel.raynal@bootlin.com> References: <20221028235933.934850-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Parser compatibles cannot be used anywhere, and the list is limited. In order to constrain this list, enumerate them all under the top "partitions" subnode. New parsers will have to add their own compatible here as well. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/mtd/mtd.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml index bddb7bdf441b..29db0b5c115e 100644 --- a/Documentation/devicetree/bindings/mtd/mtd.yaml +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml @@ -27,13 +27,29 @@ properties: partitions: type: object properties: + compatible: + contains: + enum: + - fixed-partitions + - arm,arm-firmware-suite + - brcm,bcm4908-partitions + - brcm,bcm947xx-cfe-partitions + - nksys,ns-partitions + - nvmem-cells + - qcom,smem-part + - redboot-fis + '#address-cells': true + '#size-cells': true patternProperties: "partition@[0-9a-f]+": $ref: partitions/partition.yaml + required: + - compatible + patternProperties: "@[0-9a-f]+$": $ref: partitions/partition.yaml