From patchwork Wed Sep 27 18:05:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 145603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2909289vqu; Wed, 27 Sep 2023 14:27:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRNOspCTXoHUbWoCdhwdYZwt+ZJQq27lj5HftG8o/UwF9Q5ebBsSk/6vlcdX7JFPHq/yzu X-Received: by 2002:a05:6a20:8414:b0:153:78c1:c40f with SMTP id c20-20020a056a20841400b0015378c1c40fmr3627142pzd.15.1695850069475; Wed, 27 Sep 2023 14:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695850069; cv=none; d=google.com; s=arc-20160816; b=nE3h8C/12/Y4M8bIg+SDWUnrxYIQnCVRonQhQ9MGfqHJw85pXHUQ4LtZqIytToYKKz HMobsT6dNzgZ6COX6B3l5stQTO4aDwZFOboOWUQY3DYG0zlYzb43o29OMHNhe1wzyNnK ODl6boetVBbla+rkfo7+Jh9qtxEQXQ8Qw/jmOojFxBOPyYDdoZNGxlH36JA2M0vx+r49 WIXbhQ+8rU32Dp+O6w5WdZrb0yXJII9o8dE8e/xafixNC+zA87C/1cFTatbwYyvP1v2S quv8Phexko/ojsN3ALagNkloiIX8JpvFkkTJ6ZaJyeRpFYaSoTpLDCBv0T7CbdFc6RQn swAg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4GrqlkQ0I1JKG3CG9kC5zFGUFrlkl3FrQ5k9bmVUJsY=; fh=HAUQ2hx2eYDeCB83ey44SZJqFaYeyoODDJn+HG7U1y0=; b=sEeIM0GFWIlGx4m+azwyiNrAZnLkJOdnmPJLPun7x65elpv9uTc9J/BPILfxMcGMzP wxqlSllMtB+p7LpxCGGF+skRoJjxyPc9zAb2iUe42z0mzwktWwpiEdwz2Ww/VpjlZPOO ixr4mLNx8obnFf7YF5wBWy180VjjlUfRnCYQkQD2fh3uFBwIJqjHh9afXuASq7zJT/WE gB3H9xTLr0/yuN84vlwvAwulVPN9H/hcIFbyyQXMAoUJ6ioJOXXf8NeJqcVwaPz6najT 1klG7G2jQW+vYk1CE/AHDdamP+EWJVZuU74VfdCQzKBD4AnZitBIGaUm67ZQdfCmVFfv FfNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oVDssoQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y15-20020a17090322cf00b001c470c25409si17605302plg.327.2023.09.27.14.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 14:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oVDssoQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6DCA7807C5C5; Wed, 27 Sep 2023 11:06:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbjI0SFx (ORCPT + 20 others); Wed, 27 Sep 2023 14:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbjI0SFv (ORCPT ); Wed, 27 Sep 2023 14:05:51 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A870EB4 for ; Wed, 27 Sep 2023 11:05:50 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-79fb78e297bso297212139f.0 for ; Wed, 27 Sep 2023 11:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695837950; x=1696442750; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4GrqlkQ0I1JKG3CG9kC5zFGUFrlkl3FrQ5k9bmVUJsY=; b=oVDssoQ5a1rtKJP1wYRKaDYWc3hUy/RinUJk/QOka5colyjpnBw8E7phouZJFHZQuf jwjQE1Fw7biAuxWaMUshJe1YfjOjxSVW5cI3OMaenArtj8hgMrggkkOIitFmhmmWrqwR Kyi2gpDZSTzWwiiAITxDaY4e+9C322X/+LYvM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695837950; x=1696442750; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4GrqlkQ0I1JKG3CG9kC5zFGUFrlkl3FrQ5k9bmVUJsY=; b=iEsSA50gYh/WM3OnvWF7JKlMJ6HIj7oORpq/Tw0WqHZ4CDdUx6iTeTJ6bbZ8K7TBfS v+/0hJNqqvTUApX0ObEF9vD+kJDR71KxP5ZU8RImuy+1wLWE8XibR2aUzPc/Q6pmAT5p wjfSQ1wRTU24JaFeNPn+lquj8PW+u9D8I8DSGBHWl3Ko5kbQ/5+7sGU2ZunOjccca/gV BcdgBIYj9oQUM5jb6aa0MsGR+ZsTKxu2z8639tIA82zNkKAIQF/0YwmprHgA+bpxxoO2 aI/S1WZPPxvw2CWQR69Agqhg0JJHk5VtuZwtb1gTeEcvabJ3h1qeTO7IdfyUAHE3I/2W 3JKQ== X-Gm-Message-State: AOJu0YzZvXXlK/BFovCpktz+qib0RiDH9DCjwYJWCVNp602heNzLY0yd 9642A2vjo58sHpoD0U+G1FWMBg== X-Received: by 2002:a6b:ea10:0:b0:795:13ea:477a with SMTP id m16-20020a6bea10000000b0079513ea477amr2843824ioc.8.1695837950050; Wed, 27 Sep 2023 11:05:50 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:5d4f:fe51:5575:6f76]) by smtp.gmail.com with ESMTPSA id b17-20020a05663801b100b00439fa6ff6a9sm4032583jaq.70.2023.09.27.11.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 11:05:49 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, U-Boot Mailing List , Rob Herring , Tom Rini , Simon Glass , Conor Dooley , Krzysztof Kozlowski , Miquel Raynal , Nick Terrell , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v4] dt-bindings: mtd: fixed-partitions: Add compression property Date: Wed, 27 Sep 2023 12:05:43 -0600 Message-ID: <20230927180545.3522628-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 11:06:09 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778225909474315710 X-GMAIL-MSGID: 1778227682014814977 Sometimes the contents of a partition are compressed. Add a property to express this and define the algorithm used. Signed-off-by: Simon Glass Reviewed-by: Rob Herring --- Changes in v4: - Add an example Changes in v3: - Just add a compression property for now Changes in v2: - Use "binman" for compatible instead of "u-boot,binman" - Significantly rework the patch - Use make dt_binding_check DT_SCHEMA_FILES=Documentation/../partitions .../mtd/partitions/fixed-partitions.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index 331e564f29dc..058253d6d889 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -29,6 +29,24 @@ properties: "#size-cells": true + compression: + $ref: /schemas/types.yaml#/definitions/string + description: | + Compression algorithm used to store the data in this partition, chosen + from a list of well-known algorithms. + + The contents are compressed using this algorithm. + + enum: + - none + - bzip2 + - gzip + - lzop + - lz4 + - lzma + - xz + - zstd + patternProperties: "@[0-9a-f]+$": $ref: partition.yaml# @@ -64,6 +82,7 @@ examples: uimage@100000 { reg = <0x0100000 0x200000>; + compress = "lzma"; }; };