Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2409332pxk; Sun, 20 Sep 2020 02:59:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziKMvS1fcjWCTS33UxLiQw1UC60vkGuSEjC8zBJUjso2zcjpJGyPLgCYOKG6+TsP59mn3o X-Received: by 2002:aa7:d785:: with SMTP id s5mr46088749edq.154.1600595983536; Sun, 20 Sep 2020 02:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600595983; cv=none; d=google.com; s=arc-20160816; b=cvrXfW3Urg65lUu0Uv4yekx+TK5550Bi3TNLNvMZ2oDa5NidS79PGEiQgSOXWZwk/d WhdlF4ptxuYVgD+ddYORHOsX19sImWT9jizCK5eoNbP7wXTxY+AJaDtt2oUMsUHNzbyL Xv4raTv9uZCdZql8XTjKnCpQ/1fPL8CXaM0dYDd4omanv7PvV5WzMEoQL0rZ/5b+XIiH N+HL8oJEzClG9ZtOx4My64uTa+ueXwMix3tQVP2aA+fo7Oc8T/DrPHbIKKGLBMUyJpp0 Jq1Ow054TVpMQyJZOje3CeWlaDZXDIST3ScqaS4ejmDB/d3M3Ygq4o4ksYk4QrfxmmQn Xv3w== 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=64xYu3WDX6vWiceRdxZMl2E+VlBih2IULY9GL5lmn0U=; b=Fsh37RnG7oxGLe8fjwD1ShJk6acIL97VZu0xeYWnv3tyoMa0siHhFUvAkzZtDY2Aks 5pmwt++lBP4tEBx5SuEwQPzJj+8LuCAZaNefb+RrOdtuKFuVEheAH6mhQCLeRaR5l+jv TRRtF8AeIEu/3XbWOhGI/LG1+TSzlMeCKjUjRqPOPFi/N/wuNyqE/14IIk661+/X8E5P 4de77F73p87aPS2tqDRVZ4tqHizU2aEaiH5r05Ex9H7ZAxHiovUICnwn1lBxNKIxaWyi v3EDSP+ZQEsbhTY5EvBlxL5176jXH77U75u7LnxBv7ZvSdK/hnjhWVaH2JRNIby0yl45 Cz9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p+WGbfqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr25si6002727ejb.42.2020.09.20.02.59.06; Sun, 20 Sep 2020 02:59:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p+WGbfqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726382AbgITJ5v (ORCPT + 99 others); Sun, 20 Sep 2020 05:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbgITJ5t (ORCPT ); Sun, 20 Sep 2020 05:57:49 -0400 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 670BEC061755; Sun, 20 Sep 2020 02:57:49 -0700 (PDT) Received: by mail-qv1-xf43.google.com with SMTP id z18so5754263qvp.6; Sun, 20 Sep 2020 02:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=64xYu3WDX6vWiceRdxZMl2E+VlBih2IULY9GL5lmn0U=; b=p+WGbfqwHH1OXV5tEzCASV8LZW0RECh7wC89nEJa+Jgn3lNUwPM42+c6NpDjnvUJko dzcxyFmqFi9GPNCuazz0U77Hw21k14/X2EtZbyjbdifztLrlQwEyG9YUAFya6uJaxv6G Lz7sHNHBujFbHP08PRzbi9Uru/TwB6DsS4feb9FdukmPSc5kR/d8jAzQZo+8p606icDv aZldmNlaaV2zhlAqqbD/mKeyUS4BEGnq4REiXhFsuFE0ekVv+4hUL3KKml9tdnHuXPqv SW7MdT268hCNfXw5ff/y9GOVVzKHW/pGLJ5SdXdCwCYeGHGbDhk9RCCIRAjOzwrcVn7F eK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=64xYu3WDX6vWiceRdxZMl2E+VlBih2IULY9GL5lmn0U=; b=clWsszOPrHZjOH3X7JZTuNBQBoQj985WdZaoKOI3Chnl8DI4P7kNstD582IdM07Uf4 5BvdxVUTD7MtS4u5CuJYSdV8HnPvCDSZD12CAYYqxietsmQlBNw+Cx8sBtnCVHTQZhY1 0CsKMrrF/7gEEsOqJM+EH4d5HJz/1+CCtljnCMpS5iOYu+R+v97pFdOCabeYGoH9ZfS5 ExHCZ9tb1504Tqq5D+aDmBS2EXUH5OcrlhnWfSmNoaDpyyZLK2xtGuk3zpaEIZrcl2oI 0Gf/2SKJQRkM8C3+vk5qUCryfLziuK/HL1Okis0ckI2RAqOiAYVGCo6KYfF010fJcd+U rS5A== X-Gm-Message-State: AOAM5327thhZxXkw5MLLPjOh5BBFSI/WM9FiBgfyv45T0OjpBp7UdWis Mg3xLsNkw7z8rpbChkkvGzc= X-Received: by 2002:ad4:52e3:: with SMTP id p3mr24148392qvu.42.1600595868538; Sun, 20 Sep 2020 02:57:48 -0700 (PDT) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id w6sm6968323qti.63.2020.09.20.02.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 02:57:47 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal Cc: Ansuel Smith , Richard Weinberger , Vignesh Raghavendra , Rob Herring , "David S. Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Russell King , Frank Rowand , Boris Brezillon , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v3 2/4] dt-bindings: mtd: partition: Document use of nvmem-provider Date: Sun, 20 Sep 2020 11:57:20 +0200 Message-Id: <20200920095724.8251-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200920095724.8251-1-ansuelsmth@gmail.com> References: <20200920095724.8251-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document the use of this 2 new bindings, nvmem-provider and nvmem-cell, used to describe the nvmem cell that the subpartition provide to the nvmem api and the system. Nvmem cell are direct subnode of the subpartition and are skipped by the 'fixed-partitions' parser if they contain the 'nvmem-cell' tag. The subpartition must have the 'nvmem-provider' tag or the subpartition will not register the cell to the nvmem api. Signed-off-by: Ansuel Smith --- .../devicetree/bindings/mtd/partition.txt | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt index 4a39698221a2..66d3a3f0a021 100644 --- a/Documentation/devicetree/bindings/mtd/partition.txt +++ b/Documentation/devicetree/bindings/mtd/partition.txt @@ -64,6 +64,16 @@ Optional properties: - slc-mode: This parameter, if present, allows one to emulate SLC mode on a partition attached to an MLC NAND thus making this partition immune to paired-pages corruptions +- nvmem-provider : Optionally a subpartition can be set as a nvmem-provider. This can + be very useful if some data like the mac-address is stored in a special partition + at a specific offset. Subpartition that describe nvmem-cell must have set the + 'nvmem-cell' of they will be treated as a subpartition and not skipped and registred + as nvmem cells. In this specific case '#address-cells' and '#size-cells' must be + provided. +- nvmem-cell : A direct subnode of a subpartition can be described as a nvmem-cell and + skipped by the fixed-partition parser and registred as a nvmem-cell of the registred + nvmem subpartition IF it does contain the 'nvmem-provider tag. If the subpartition + lacks of such tag the subnode will be skipped and the nvmem api won't register them. Examples: @@ -158,3 +168,52 @@ flash@3 { }; }; }; + +flash@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + art: art@1200000 { + label = "art"; + reg = <0x1200000 0x0140000>; + read-only; + nvmem-provider; + + #address-cells = <1>; + #size-cells = <1>; + + macaddr_gmac1: macaddr_gmac1@0 { + nvmem-cell; + reg = <0x0 0x6>; + }; + + macaddr_gmac2: macaddr_gmac2@6 { + nvmem-cell; + reg = <0x6 0x6>; + }; + + macaddr_wifi: macaddr_wifi@6 { + nvmem-cell; + reg = <0x6 0x6>; + }; + + pre_cal_24g: pre_cal_24g@1000 { + nvmem-cell; + reg = <0x1000 0x2f20>; + }; + + pre_cal_5g: pre_cal_5g@5000{ + nvmem-cell; + reg = <0x5000 0x2f20>; + }; + }; + }; +}; \ No newline at end of file -- 2.27.0