From patchwork Tue May 10 16:23:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Zhilkin X-Patchwork-Id: 571354 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 2C666C433F5 for ; Tue, 10 May 2022 16:23:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243981AbiEJQ1Z (ORCPT ); Tue, 10 May 2022 12:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237625AbiEJQ1X (ORCPT ); Tue, 10 May 2022 12:27:23 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E2C2A0BFC; Tue, 10 May 2022 09:23:23 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id j4so30243869lfh.8; Tue, 10 May 2022 09:23:23 -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=lE9M1LT3yKC1XMSzyFOtlSmz+JiIYT6pQw3EYMoZJec=; b=UHgfWbsTrNXXX6mF1ThS2P4I3clamg5/10H18jPoQOT8ICcwCcR2ohxK4nQBIv1lmN PX2uPGYkEabwoJ4clEomc62ZzxHhv+n7Q1sB/pl1yJqzpgQoNbAGwxfsB+G1aGLtsHHC hi3MNnhRMcIHD7h0eRxAWUbwd1VH91Nfq2zf86XZ8IHKAjc/YPsiL/yPV+im9nYg9wQ7 U4FuD5PnDqnnNTtWWm5XPGM9bpndelYfMlcOqXHaLC4vjTHbwLhRT6b6Pb8vjQ7Y90o+ nAMP5zRsVS0zsAVI9uKgzQEpuZegbm3RT2qIg9SkHWUlFX9tM+ZD6XjXH+ZB9a72V7Fh /kHA== 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=lE9M1LT3yKC1XMSzyFOtlSmz+JiIYT6pQw3EYMoZJec=; b=IrtudqCezAcRTDC9NeeXXP5Z0KCupJuKm0Z+woKS8+6Hr7bh+ZsV6LVB+Ab/zy2U2J JC6beqc1tVf8mlbxQRjPFkshk4bdEaXE8spDwH6H/DFM2P9FwvWEwtOrgezLpEHyIQ0h nAzKTAOMixqBvm6aPdcFc5pfvImjVSWFCusYz49bwUFlRI+omx+kf20uc9UO0QRDYqeP D6vRq3+ohfgM1imgrN8ROOmR91SVsMlC8Aw88PdJoZAp1giSmq/5ox0cB5Dxb5maAfWg wPeOSlfFlXOFA5WyF8g5UyFEc6Oed3DH7/9YMbt0Z4Ot8sKByoi2j4KDMLQCWYLvM0af ELgg== X-Gm-Message-State: AOAM530F8noeFhryBAL2bgSKWOcE2tQRtVJ4uyEe6JchM3LCwONh4bh7 A8e+LGl3bbynr8aOEy7DcPc= X-Google-Smtp-Source: ABdhPJwfQ0dQeA8YbZQyqC6JBjPo56fJ0/mD8aAtBAuEVrVNRrN152j/YvTuQrWeK3ZE6QkDtxHmmw== X-Received: by 2002:a19:f706:0:b0:473:9e36:79de with SMTP id z6-20020a19f706000000b004739e3679demr17272138lfe.35.1652199801284; Tue, 10 May 2022 09:23:21 -0700 (PDT) Received: from vmu1804.lan ([2a06:a003:501a:a7ce::887]) by smtp.googlemail.com with ESMTPSA id k19-20020a2eb753000000b0024f501aa770sm2217089ljo.134.2022.05.10.09.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 09:23:20 -0700 (PDT) From: Mikhail Zhilkin To: Rob Herring , Krzysztof Kozlowski Cc: Miquel Raynal , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Karim , M , Mikhail Zhilkin Subject: [PATCH v4 1/3] dt-bindings: Add Sercomm (Suzhou) Corporation vendor prefix Date: Tue, 10 May 2022 16:23:14 +0000 Message-Id: <20220510162314.20810-1-csharper2005@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510161641.20655-1-csharper2005@gmail.com> References: <20220510161641.20655-1-csharper2005@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add "sercomm" vendor prefix for "Sercomm (Suzhou) Corporation". Company website: Link: https://www.sercomm.com/ Signed-off-by: Mikhail Zhilkin --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 01430973ecec..65ff22364fb3 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1082,6 +1082,8 @@ patternProperties: description: Sensirion AG "^sensortek,.*": description: Sensortek Technology Corporation + "^sercomm,.*": + description: Sercomm (Suzhou) Corporation "^sff,.*": description: Small Form Factor Committee "^sgd,.*": From patchwork Tue May 10 16:24:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Zhilkin X-Patchwork-Id: 571353 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 544ECC433EF for ; Tue, 10 May 2022 16:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234224AbiEJQ2T (ORCPT ); Tue, 10 May 2022 12:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345070AbiEJQ2P (ORCPT ); Tue, 10 May 2022 12:28:15 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F9F132A03; Tue, 10 May 2022 09:24:17 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id s27so21491950ljd.2; Tue, 10 May 2022 09:24:17 -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=A05ZxnXVAWmmDDGxBx9E47mbX7S0Lb5kx3BXIz0LE4ucreSY1X5yTdw7uft1fPn42/ aSTUlBrV3mgtTEgdylYx+nll563rrNB3yLv3YfpwcocKTTB2nJlHQuPPZGDOFo9FkApv /nt7jSKjA7VUx7/6XV8T/FD/6BPbfx5kbcMXuaFE9qU1KY5ooZyFiGQsQQjAxe8SV26L n4CchBQ/O/UQcRId+lmCaDgNha4pS/0skcAe5ggQpZbwwC2dvFNIifmWQZeGdp+Mn/9X 3IfuPe7QNMlHO9mJiWu7xumyVo9xH3sYL1B7a3UvEOfhiosc9MogVya8LuVtSls1mevH u79A== 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=Htqzv5IVAxLwP1XzYTQ6YO2Lsz6FFFGZ6B5mDH7uj/4KEoBSh6TLd1ic4zdA67r1aW fjeNXvS1y0G4SW8YvUqJZWny+4IKVa2rggdPsA766U8/d7eYUBbb4O/ttdU4tGp8wBgI Aic0r1e1yGoy3gOupr0bfMG25iZ5vcLf3nDqR7z4+FofFDcn5S0vbHJ2e8uonGR1fYdR 6DQibOtNdpb9FtTPFVO/6c4RDFb7m7PVb4MHNnGkWGIVn6d5YIw7xGKm5wZbq89S4h+r 7v1jPo839tvsf6RCeBcutfDjKubUN8EAHufbuLjxZ5e+oRdrASgznW32enJLTZD93Mv+ cY6A== X-Gm-Message-State: AOAM531mrVl8ApK1hwInPPCtECZeZoz+7w8unnyh0vjHEuJJ4v6+pnh/ v7V6JtNJDo1a8jdK+yPNWw4= X-Google-Smtp-Source: ABdhPJyJMk2lXCJXghy02HIfIaweFY01KpQ6Pmd5e5ocPKNv1uom8v6aOVxqjQNPks87LU5Q4KIkog== X-Received: by 2002:a2e:a30a:0:b0:24f:cf6:11ab with SMTP id l10-20020a2ea30a000000b0024f0cf611abmr14027237lje.461.1652199855528; Tue, 10 May 2022 09:24:15 -0700 (PDT) Received: from vmu1804.lan ([2a06:a003:501a:a7ce::887]) by smtp.googlemail.com with ESMTPSA id r12-20020a19ac4c000000b0047255d2111fsm2338420lfc.78.2022.05.10.09.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 09:24:15 -0700 (PDT) From: Mikhail Zhilkin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring Cc: Krzysztof Kozlowski , =?utf-8?b?UmFm?= =?utf-8?b?YcWCIE1pxYJlY2tp?= , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Karim , M , Mikhail Zhilkin , Krzysztof Kozlowski Subject: [PATCH v4 2/3] dt-bindings: mtd: partitions: Extend fixed-partitions binding Date: Tue, 10 May 2022 16:24:03 +0000 Message-Id: <20220510162403.20861-1-csharper2005@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510161641.20655-1-csharper2005@gmail.com> References: <20220510161641.20655-1-csharper2005@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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; + }; + };