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: 178143 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7868424dys; Wed, 13 Dec 2023 07:47:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJcn5TivEpVg6ZFHOfMYkT4Tl8HKwG5iQhoSjsZQ5SyKhwkk30GfvUyOOeRJa1ZPirdDJM X-Received: by 2002:a05:6a00:6708:b0:6ce:f633:26eb with SMTP id hm8-20020a056a00670800b006cef63326ebmr6407521pfb.63.1702482473840; Wed, 13 Dec 2023 07:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702482473; cv=none; d=google.com; s=arc-20160816; b=Q14hmJZ9sibirH+0f5lNDH5gpu+GmeEN/HDlE7vP185xWmgX26edspyDDH7ikYgQLz 8Hetf23lXaiZc5PyfZoKmJaEO/+H4ZtcZrEjjd/ZEtRfxlVCctV+jL+s2rAIOyb78PlI bvnAiBnexXrOTQraS15UH3iUwMPhWKBR/qBECdpw3faK655kjyCj31+AeJMgSpVeMwOQ QYUmcR3mXhvWHseBrOEqgm/2BRIlL8tuWZKhc8sQ5Ps+QurFK/6DVL73Z3H/Nhufv/6X d1eWuQWgogLiQR3P9zddJlMutcsOnL+3c92PonuWkhBaAPxMhpWkOu+z1J48tndtRA35 vcIw== 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=xIWhGTiO6IreVCPqf6sdV9Yh0S4ilyzxwc53Fb/1j7o=; fh=G+EBSTHLIFnvJI1jW7Kxsqisze+XPOTlw8FB0jv6DWQ=; b=V+2gM36S9Yj53BJmqiZGfnys47duK5whTUXViOEZNQTq5jKCr5QfU8V1FtL5xDRZv0 AoYtuKIx23wLcVOopCmRVyH0DO/rYrj7VPRisJOJaTMMUAzaeXdWlYDCT/TxFgjORD1i dp/NXQdPQZV2q4kEDHfCHdpyrWByfrHdSwQhECon8t4Vwb5lldASw8lFi0i89f4lgfU/ QDLWsZpduO8nAslX8nb8gDQOU9E0Lhiwq+w/QunaAPDt5CXkN6nqlkzBZY4I+OJsMfDI NsgXFLFRZ5Lpo2E3UAUi2yEj5lfghgCh0vbqmXH/cTQO98YP8IlE6/jQzNkhyXeDDc5S THRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FMCToy1l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ca8-20020a056a02068800b005ca186afff0si5040046pgb.378.2023.12.13.07.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 07:47:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FMCToy1l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F137C802B164; Wed, 13 Dec 2023 07:47:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442348AbjLMPrh (ORCPT + 99 others); Wed, 13 Dec 2023 10:47:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235439AbjLMPr0 (ORCPT ); Wed, 13 Dec 2023 10:47:26 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06DB110; Wed, 13 Dec 2023 07:47:32 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50bf26b677dso6803007e87.2; 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=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=xIWhGTiO6IreVCPqf6sdV9Yh0S4ilyzxwc53Fb/1j7o=; b=FMCToy1l3eYm8kJEgewCav4UsOch2bhO1sPZnDTF0Xhs/zODL894bQIXrd9h4+Ti3B NuDKPyzrjRP9gxFpoBlhdcMMMEEyK6bh63OZRwfF/KN83CX2fscZDEWaVfh6AOft3eMI 2Vc+byFcr6p38P3jOd/4hUXzJcY9snCK9GXnD/qTQdCzJ24eQ80rRaJCe1Q9945NnZm4 FeTCbADxbm2l3+0X1DlXVlkhCFrt0N1DEXsmRhvrUcwvS5emW0r2wURe5z3Amzms2E2q Zd4gpDkCe9HnTK9Xz6F6EtSpq0mfyvLDDcxrz93F/s7rrrtsJSlvAK5SzZJeeDLl0ml6 ZB2w== 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=b0viB8b4Yfg72ShhRzHei08uxRqz1Lf0RurXnf4nPdvI70G9/YrOFJJtjtQbk1LiWi DiGe0KaT6lx1LN7tiroefUVNKNN1NKRdnGhRSBcL3iPQ6mIOevY/TjAqzOfTRM6cGlDR pKlPbwp03X562nJm/hGmlb9Gn93vya574D+z/QvYFSbAUUE0Bp6cKvoRXqkMGr27MVUt Q8/XJC8oG/0xRa4CwTlKzwJds1BGrydCjN+Rc3IBY3hGtuY/mxOnTJgII5c4NKMENELR sFMqFcEOeiCbvbfehv8G5mdRrghFxO4kdZH3UoT+FT/w53HO9e6fRmc516+Oq0dKOGqV k7mg== X-Gm-Message-State: AOJu0YzLS2viuzYZoGoDsZ+1H7u7/8sCaYbpEsLgVn4DUOzqvzW14i9g JJeleUQkSE3I5xvhgtvkIiY= 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-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 13 Dec 2023 07:47:50 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785182262423428990 X-GMAIL-MSGID: 1785182262423428990 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: 178144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7868593dys; Wed, 13 Dec 2023 07:48:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdd4DZsQrqZFbFdAb49u6GA1nXKTaBoMeu7Ji0ryhApAxfxwa668P3dBfsdBWozDmgGylk X-Received: by 2002:a05:6358:2919:b0:170:547a:306f with SMTP id y25-20020a056358291900b00170547a306fmr11682657rwb.49.1702482490034; Wed, 13 Dec 2023 07:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702482489; cv=none; d=google.com; s=arc-20160816; b=wocD2IY+4J+QCFT/gRRXMsNh2Fa5SeY43e5bPT/sQGKnju65cqHfKUgQbqRx5KLQ1Y B1usr68wQCWVsDK6J0RsmTHe9hbSgPkB4Hy5+6WbBpRlzH9wZ4nbJ4oAyzE0e/7psSbC uBY1ZKmi9+5lVq901hvWYRnxoA8bpGhMFOrx9PaKl3fUIQtqzeEo6Mh1GGEHO3HHg6mi Ge/FIOIE2MhHGft96jvKnFZ4gYSjvJLIwHOE5f5PQvep3Aq9IJYpVTtsxuJtNJLsNnWD W315/meaCUWcznJHy2qhfFLOqjhQwPrZvzqZBIrpiIqDn9R/oFwHWQHwDnT3eXuE8w6h 503A== 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=mc743gSKV5l8g3BJNGJgDTP6ynD6tEmGecWgB19Lq0s=; fh=G+EBSTHLIFnvJI1jW7Kxsqisze+XPOTlw8FB0jv6DWQ=; b=WcLm/r8YY7XLWxAtw39VgOxEOiRe1bNj865H3/bqZQKZSHi9QPvB/fb5wSWZxObXJ/ PIOUUEJIVQp63an3h/RvHqL8SPx0A5JYyvoJp6zZ6fRA/AQj7p3YlhnblTJOCLF3wo3r uI5kmUwRDJr7XTs9aUhxtuAoYa3oisi+qrZPubTxV91GV2m2+vggixEfLwZe6wBPzSNt r+D6CJwvBqFsJiCGfajIo1tthKfb4bl1Mjx6R1JbjOltOiFBfch748lwBGWU8Opv0Bc1 6LLtMXpMo0gPg7vy5y/1vNIagmi+4ki9D30l4FdLfLoRE1loNuwdaov95oNAv5Ct7vQd IQvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F+crtb+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t14-20020a63eb0e000000b0056959099f46si9431266pgh.856.2023.12.13.07.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 07:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F+crtb+i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7A37F826E5B2; Wed, 13 Dec 2023 07:48:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235440AbjLMPrk (ORCPT + 99 others); Wed, 13 Dec 2023 10:47:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235379AbjLMPr2 (ORCPT ); Wed, 13 Dec 2023 10:47:28 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A346A6; Wed, 13 Dec 2023 07:47:33 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-54c9116d05fso9449034a12.3; 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=vger.kernel.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=F+crtb+i2KKmaSikNfYtr/pepS/WwPWLNEQSWp37cFSfxoB2GBVNHz085ioM8flzjG BG9KdJ+mJDVzh+J+3GBgWXlLDAPQpReO/IwbXoztpXApk2yPcZqNpJEJ2QU+YNM9/9nj YKTuzhYauoRiEM1fVzLJwLQEUMQ6v1yVMN0oVIhSt7HYvGxH87LBTvspWLXvpyh8jd2r CfyXfcpOqh9XJ2X2N2KEXeNNlC15Wu8XkHAQNIp7rLENOSPVHZ+ApBNYRKcAihDVgb/U H4UNMObkn34gQJU+syjXCxDwL+/K5yhpm6nGr84pOMzB9jwtPXDf4r9HBVjcovs7L7QU gB8g== 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=TFh7GjiKBGJd+sSJ2dd87liSUiWgWvL2JHQtL/h6LNwrox+nDgcSWCIAYESVH0sWmS VOdUrTrqWtgEz/KetrxXrGMdSiBYieUICe99lmrGyZ2tGly7Ixw0e4Ex2cR/rcOvsq/u XwdvcEye9IwvtOIcRZxzLXov8vUTlSlcttasvykXBPwUwcCRlWuRmjn1RUDrdmLZ79u7 ogkxw6kYzaX8g6MkcPmlT8PP2fHsmprURtgJVm9UWSUGTLtmzK2aCWQ5fFvC3a6+9Oe/ 312zOc6qoPU8pzSoyzzW4X1PxlqPJm8LJ8fpIUIR4IyVePHoSLeM7r7a/mVHow+ZMIlf ltFw== X-Gm-Message-State: AOJu0YwSknoAUgQlTAuSoifIHrygtqKHsRMz6UFBusyFDB1O7nVtLpKq UAmTdU7J4KP7wCAKjs/yEjU= 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-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 07:48:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785182279472713905 X-GMAIL-MSGID: 1785182279472713905 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>;