Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3271882iob; Mon, 16 May 2022 17:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7Y0IugR/kc1ETwzoXldOfnxGP7S7FngCSsa/WY9FWx1gpn2MJo63om03Ds6wGiPLdBY3C X-Received: by 2002:a17:902:e80d:b0:15e:b27b:931c with SMTP id u13-20020a170902e80d00b0015eb27b931cmr20063858plg.5.1652748460345; Mon, 16 May 2022 17:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652748460; cv=none; d=google.com; s=arc-20160816; b=FwfHrI/z+qEo6m6uVrexFNtM7ZOw18zcnMJsrAouJdWGHFhPZC6y0Cj0XBVj/aiVps QGQovKz6dVQoSt9kyTrInop2mV8UqG5D0Hez6GINYpU9Wjm7MG5ymqCbtKqCbaRLDHP8 DBRtjVVKXATsc0Bd41jt2g5WTPaq8skNe6ycPww/P1ibYGSPrOaUbX5/WEfCTPUKXijY em14FGZsNlPDTO3294r/w5cPevrQjKMV3qmc+CGF0xKLbn/oXSTmHjsibaN40dXcVZXl X+Cszb9lmipUkUVFi8AeHmJmOjQ5OEQMrZGBx5R/WX6YEXEWtoBHmtmPfQVO3ugjuyXt cPMw== 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=Z+YkSbV6bjoznxMCuUfht3UUoaizx6Wbg5BycQIS6zs=; b=LSbFudihYxnqNZ3TFuuZK4y7TKUEhDfZrAkL6nAiV+dOAqPfuW+NdcTq3+ovPmVgqP XzxVqw2BQGWzhbD1NBA1ahvP3SKlUJ2G6tUsTKNOxrG76bHi4gCPPBjjJ4a2lfojH+NG MEskscXdfmj1xAm5bklJV66jbe1TXC425h1ZwEgnX7Ihxlv81XiUJ3JZejo0MxIszdYa 99g2YF63DcYE8pSTxW1c07BoiGiSeWZQC/ymOAHpSLZsHvUZiW1orTVGH0fCzMENsk8K peUQ0Ewht2+8EKtHYmqINHcCHLcr1ebZhLeZJ9/PtfeUU5kgZt9N3fSShu8a3yOxLwku f8ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cNS60end; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx9-20020a17090b4b0900b001decaeaf1easi1142541pjb.6.2022.05.16.17.47.28; Mon, 16 May 2022 17:47:40 -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=@gmail.com header.s=20210112 header.b=cNS60end; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245103AbiEPPRf (ORCPT + 99 others); Mon, 16 May 2022 11:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245105AbiEPPRc (ORCPT ); Mon, 16 May 2022 11:17:32 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CB6D3BBD8; Mon, 16 May 2022 08:17:30 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so11135760wmj.1; Mon, 16 May 2022 08:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z+YkSbV6bjoznxMCuUfht3UUoaizx6Wbg5BycQIS6zs=; b=cNS60endk/R5iL6M5AmmygvBoF4RQ00kAleLUrfXLdDd5yZxoxlxxDaazSLWmd+Wnx iZRdZ+rlAPvVyUJzAWqyuf4TzVuYvhu0QbLrB92lKjtKx5SDkApcFuqkrqTKuZDgcPob FiduQK2/BqrHunPLEEhaXEtmuzH89ia3B30/KtbqgDwdzL6xzoONO25koUCvIanLA7ll VrckBfjfbIScv+ei9Z+Uc0CQ9bAq8UDwvFekFDPlsce2w5xIqbbbVn2onVYGdm3yfkdB 5iBfs4hBPza9U/PJsmoLbT4DQ9omUc2rGQqS8UFpmleyw7+paT12mlPYz6WtQJB/2DZF F9/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z+YkSbV6bjoznxMCuUfht3UUoaizx6Wbg5BycQIS6zs=; b=k9LUY331KXHKz3UAdkA5/3+eHY2B/EJzGfnR+MSMs/9i1ktpbBVMFYRqyb5L6hcFA1 LQxWDUyhJXS6NE5G4QdrXHZpd3d/9oCVoCCylbzv0gO4I85zvIQ0oLYbC/VmzKE8mU9l zV0ugWF6SAs+rTcm1uMSp4UG5Fb+mi5rr+m754Coc5NMafoKEhwMlIwvgUsiNHfra1Vf DFgMY+kdlYuTfvQs5viBMPJEwbcpfKGt4CNLsW8jZlKke/igrgOrpkPs1NssyOzcQM81 J5fjrtqoerhG+ULalb96O5n851HruGJf2c/gNsaJ9nEX99RRwGmZWJ2hsrmIsnCyqxGb jQHA== X-Gm-Message-State: AOAM530r/ZAOjI8XZmK2zAADVSGoHrN+rQbUTzSMw7j+Uf1WmR4NBaHN PvoUxHC8tk8EtK97vld9sek= X-Received: by 2002:a05:600c:1986:b0:394:867f:984c with SMTP id t6-20020a05600c198600b00394867f984cmr27711295wmq.20.1652714248849; Mon, 16 May 2022 08:17:28 -0700 (PDT) Received: from vmu1804.lan ([2a06:a003:501a:a7ce::887]) by smtp.googlemail.com with ESMTPSA id r5-20020adfbb05000000b0020d00174eabsm6419984wrg.94.2022.05.16.08.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 08:17:28 -0700 (PDT) From: Mikhail Zhilkin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring Cc: Krzysztof Kozlowski , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Karim , M , Mikhail Zhilkin , Krzysztof Kozlowski Subject: [PATCH v5 2/3] dt-bindings: mtd: partitions: Extend fixed-partitions binding Date: Mon, 16 May 2022 15:17:25 +0000 Message-Id: <20220516151725.885427-1-csharper2005@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220516151228.885222-1-csharper2005@gmail.com> References: <20220516151228.885222-1-csharper2005@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Extend fixed-partitions binding for support of Sercomm partition parser (add "sercomm,sc-partitions" compatible). Signed-off-by: Mikhail Zhilkin Reviewed-by: Krzysztof Kozlowski --- .../mtd/partitions/fixed-partitions.yaml | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index ea4cace6a955..ad3ccd250802 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -19,7 +19,11 @@ maintainers: properties: compatible: - const: fixed-partitions + oneOf: + - const: fixed-partitions + - items: + - const: sercomm,sc-partitions + - const: fixed-partitions "#address-cells": true @@ -27,7 +31,24 @@ properties: patternProperties: "@[0-9a-f]+$": - $ref: "partition.yaml#" + allOf: + - $ref: "partition.yaml#" + - if: + properties: + compatible: + contains: + const: sercomm,sc-partitions + then: + properties: + sercomm,scpart-id: + description: Partition id in Sercomm partition map. Mtd + parser uses this id to find a record in the partition map + containing offset and size of the current partition. The + values from partition map overrides partition offset and + size defined in reg property of the dts. Frequently these + values are the same, but may differ if device has bad + eraseblocks on a flash. + $ref: /schemas/types.yaml#/definitions/uint32 required: - "#address-cells" @@ -52,6 +73,7 @@ examples: reg = <0x0100000 0x200000>; }; }; + - | partitions { compatible = "fixed-partitions"; @@ -64,6 +86,7 @@ examples: reg = <0x00000000 0x1 0x00000000>; }; }; + - | partitions { compatible = "fixed-partitions"; @@ -82,6 +105,7 @@ examples: reg = <0x2 0x00000000 0x1 0x00000000>; }; }; + - | partitions { compatible = "fixed-partitions"; @@ -119,3 +143,30 @@ examples: }; }; }; + + - | + partitions { + compatible = "sercomm,sc-partitions", "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x100000>; + sercomm,scpart-id = <0>; + read-only; + }; + + partition@100000 { + label = "dynamic partition map"; + reg = <0x100000 0x100000>; + sercomm,scpart-id = <1>; + }; + + partition@200000 { + label = "Factory"; + reg = <0x200000 0x100000>; + sercomm,scpart-id = <2>; + read-only; + }; + }; -- 2.25.1