From patchwork Wed Dec 13 15:47:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13491571 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 BA8B3C4332F for ; Wed, 13 Dec 2023 15:48:04 +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=2MtxPmfTDKINCy4HQHVcnzCcDlEl7EYu2WHV1z30MVM=; b=BOOMDeP6q6f9V9 sv/nPjbSeHqWOrAlUId1U72jlpZdtcl0NBWNlQy8xhUbnXN9czdrbzobM6+30rPEhlcGs3TsA4Aas XZTcsRUPl7bmaSzg5mrIIaI7yh6VP/QtI8a2nToQTFQCktk4qMBL4wGmD/V7Zsk507OjNdq/M9711 PAPfVTZNoWG5cW2AqDwoHfGTJRr7kxM5KlpHRzvX+VkraW0rxzeSZHtOjrQr4FaffU+pOzGfHWsaY DKUBpCf6wLi+o5cVI72onpL+yDPY9YKpRKusMNXnK2YqZxG2IbhKYvyDvZkhXQ8zlwjcockao9V2u PSUgvimrn0SJqsIru06w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDRSU-00FKUD-1V; Wed, 13 Dec 2023 15:47:38 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDRSR-00FKRz-0s for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 15:47:36 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50bf898c43cso6800543e87.1 for ; Wed, 13 Dec 2023 07:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702482451; x=1703087251; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xIWhGTiO6IreVCPqf6sdV9Yh0S4ilyzxwc53Fb/1j7o=; b=CLTf8V6OhKuh7i8xWSVm5UcFwJegO97YoYfp81P/QmVKGNfbz8Z07TZtFxSZ44ChvC AM15nu4PvDj+sWyFU1xeJ7F2PKxnLRH9XUUArxqHRADLFQ/xYtZLD5317XkeHP5u3NxW bN5vBCSr0LPRv6UhUg1XSSXbqXSZNZUMvhuOxTzWgrWvim9Y7ZJzLJlN250J3jBgxEOl 5T/MdtXYSyNf//585gB0HxrCQV5lt7LX5x6vhfVoiNIHEqk3wofvlpY4P8DFDzy7C/+P +C6eDC93madQuBsuBQs1UETlEvBeB2itbTy0roZKVVcGLldvMt1rYjGtadkThSlowQBT L29g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702482451; x=1703087251; 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=xIWhGTiO6IreVCPqf6sdV9Yh0S4ilyzxwc53Fb/1j7o=; b=ANhi8/IBijl4K62WvYW2n2iBEl6dPCnK7OLj3/asXVDEnp5P0LoVYYhnVLMc8woUM2 sZHn7p8leoY8ZVvDTRq5vb4V5kGmFODdMfg7MsXUO1GYN5N8lYBPKx7cuZ+UYTBDG5Cd YlemFN2SPC8rsLrzQdBsGaPE1MZ81w8AuSpY9gPDbzZ3J9t6BxRBv+cCkhdnlmY9YjEK NhdTEpytfm9w5wHCFBf1IIaPPyWSgcdt5EBlqQGuc4lzJGWWZy6eyD0ITAyudG1oMhhY vkHnYAcwymBmBArQVNQWO1bX4/1vpQ3T89dXfEIdsEBBTsp+2fipzAln7/pqhK5nC9Zb bGyg== X-Gm-Message-State: AOJu0Ywl3ZLCZGsOaYivLDJczfE3WNHkrwIdKGTQFJJPA68v9rsOh69Z GDz43sltlcLCkectONeK1XTgGWp2IwE= X-Google-Smtp-Source: AGHT+IFrMT+u8qQaDQTwx3+NlXxfeelFAxVsphLHBdElGrEIev2ru44NUGDr5dvFrt6ZhLh5ybjxdg== X-Received: by 2002:a05:6512:ea3:b0:50b:fc06:7a2b with SMTP id bi35-20020a0565120ea300b0050bfc067a2bmr2974785lfb.110.1702482450523; Wed, 13 Dec 2023 07:47:30 -0800 (PST) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id 28-20020a508e5c000000b0054b686e5b3bsm5972810edx.68.2023.12.13.07.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 07:47:30 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Christian Marangi Subject: [PATCH 1/2] dt-bindings: nvmem: add "data-size" property Date: Wed, 13 Dec 2023 16:47:20 +0100 Message-Id: <20231213154721.5037-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_074735_310613_710AD503 X-CRM114-Status: GOOD ( 11.27 ) 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 From: Rafał Miłecki Allow specifying NVMEM device content size in case it differs from device total size. Cc: Christian Marangi Signed-off-by: Rafał Miłecki --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml index 4fd015d402ce..095aed4250de 100644 --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml @@ -26,6 +26,13 @@ properties: "#size-cells": const: 1 + data-size: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + NVMEM device actual data (content) size. It may be need to be specified + if it differs by design from the total NVMEM device size and it's + impossible to determine it on runtime. + read-only: $ref: /schemas/types.yaml#/definitions/flag description: From patchwork Wed Dec 13 15:47:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13491572 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 506E4C4332F for ; Wed, 13 Dec 2023 15:48:07 +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:References:In-Reply-To: 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: List-Owner; bh=t87a+Y3kvn5muimqRZbFw4e2YKbejHQ6GvzS6TqDSMQ=; b=bVG4c1u8/kwMPP /IlF+u7zRVuQ1kpuhJg84Dmui+eUshT/1Y030widInAkNatTLMObntGHFio4d9e8j5b6QaTzTyNKh shJFVjY3vb/Gzv2b1YgegDABlU/18geVNqejzmSlRvvfANVRQIv+xCrDG2zu81qcV7oo3h/hCIZ8W 40iQkQaGcbGvcJshInLpTrA/6+JI3sOr0hAypVw7MrGqMHrAQbE4HcCqvbSyPmJgRBwykHmGy/XNi 94vdkjkJ/c9jXH4vMe0ns+DDGRKaL8YtJTDWMkV2WBnuAP8GL3BIf1gLWzasdNOzj7lr4qsiEWPPK tlRP6yeb4IqG7MAfCRYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDRSZ-00FKWo-2X; Wed, 13 Dec 2023 15:47:43 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDRSS-00FKSU-03 for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 15:47:37 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5522ba3f94aso773054a12.1 for ; Wed, 13 Dec 2023 07:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702482452; x=1703087252; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mc743gSKV5l8g3BJNGJgDTP6ynD6tEmGecWgB19Lq0s=; b=aUoZUI9b+D9qwunjiUifJkM0TnCycEhkjHvjUCBYf3l3M9eDfYCvIVLfu5ZIcNPHuS VAMlGDgdhfbAqMNzm4HDXQ9xzKtWWMxfAD9F7roMNz+BggNViaWUkBWcouwgjyiO0SCv f2NMAaBZgJBsIWT3YRBoRo15y9EkWEIBKq2OTyq1cWNM576g0q/ftPDmNZkN7B3GVgod zIxsOYeR4g/+L56NYuiNL7pAMI98QneNq2h/Leel8e95/vYH849UnCP1l13qkSKR6Npx b5s19xSHFi+YWT+DrZU6rssfYF8kiqjZfkGQEhfb48+RfM3Z2QqLlezhewZBxxNJLvsS 6WLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702482452; x=1703087252; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mc743gSKV5l8g3BJNGJgDTP6ynD6tEmGecWgB19Lq0s=; b=Yjgsor76fgLF3inhKBKdYAviAMPUcoWA3WS9ZDS+PqU4vdeth0Sum2ViXclS5MBCkv sVQkQuTkhnn+jjfw5LuGO6kCupHDFJDdodLkDihJTfPAFPz+bo6jd+wKqCXUov+p8+0B azc7+VY0OvctA7ocgzl/iSlDJ6X1ZK94FRpvMf39taq8S7qFmUrxkZ53BYvkcTnkwRl6 FxIj+FaVKCGHMGAVw92QrBiMAZchsE27ifmvtTVwgajqA//XxAo9bSstKh7JMJ1c/4kf zusXQQ823tRvZedPk3/LR/1dbnBioW9cwJvI1cAlSs7FaQfzUUgXBJOqgjPD4PVHDBrf HQNw== X-Gm-Message-State: AOJu0Yysn+lgINgTCV5IfdSCdYW1KVCixQe3upIemPsVxPST2ao2reLH WZ3VbSmLHFh7Q4oRBnk4gr6CFuNisrg= X-Google-Smtp-Source: AGHT+IGCU2djaB5uBgtYDAXhZ+c2JU0gc4uz8t34fOeLNj93VffqKG4unjLh88AT+nseKv3EtNdcng== X-Received: by 2002:a05:6402:f8d:b0:54c:4fec:f0 with SMTP id eh13-20020a0564020f8d00b0054c4fec00f0mr2308546edb.127.1702482452111; Wed, 13 Dec 2023 07:47:32 -0800 (PST) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id 28-20020a508e5c000000b0054b686e5b3bsm5972810edx.68.2023.12.13.07.47.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 07:47:31 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Christian Marangi Subject: [PATCH 2/2] dt-bindings: nvmem: u-boot,env: describe "data-size" property Date: Wed, 13 Dec 2023 16:47:21 +0100 Message-Id: <20231213154721.5037-2-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231213154721.5037-1-zajec5@gmail.com> References: <20231213154721.5037-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_074736_052974_8D7DA799 X-CRM114-Status: GOOD ( 12.05 ) 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 From: Rafał Miłecki Describe what "data-size" means in U-Boot env context and why it may be needed. It's a generic property but giving it some extra meaning in U-Boot context may be helpful. Cc: Christian Marangi Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/nvmem/u-boot,env.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml index 9c36afc7084b..0006f022d0af 100644 --- a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml +++ b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml @@ -44,6 +44,15 @@ properties: reg: maxItems: 1 + data-size: + description: + U-Boot environment data size is set and hardcoded during compilation using + CONFIG_ENV_SIZE. Knowing it is critical for CRC32 checksum calculation. + + This property allows specifying it in case it differs from NVMEM device + size. It may happen if device partitioning was designed with different + concepts in mind (like block alignment or future-proof size). + bootcmd: type: object description: Command to use for automatic booting @@ -76,6 +85,7 @@ examples: env: partition@40000 { compatible = "u-boot,env"; reg = <0x40000 0x10000>; + data-size = <0x4000>; mac: ethaddr { #nvmem-cell-cells = <1>;