From patchwork Thu Mar 11 09:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1451393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=K/WU7e11; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=oHvYAKs8; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxFfz3sPGz9rx6 for ; Fri, 12 Mar 2021 04:04:43 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=VR4LpCg7LR4Bt0d+Jc8kOFoMmf4d07glJya4Aqkc1N8=; b=K/WU7e11isMplL5+nQvSWxI79+ KUjBUCXqZyJBchBHZY78t2OCUSZNnVaYM12zIDFaTd+yxWSac2CBboK1/Xb4SPgL8gyEyvvlB2HLr 10wi38z0BGdkw83yMU9Qm9Sqfv2HWevf/yq3GQS22G0+XlHcwloM9gRbsn3w5e8LmI115NcTQLWQB yQThAY+hcXLpWJXAd/GdVY4pZ3t3klDf5sxRTQvYQL6MXhuWV9XcdOVr/kdiWHlpxT1FfCG9uUXUU w0XpmDT4AmF60ibwyhMtu/onauo4lCf1gwPh5E9SGzf9hKzgJXf3Q28yyRPm69xBgLNwbJBjkPPSB GnsLEq/A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKOiw-009e1r-M9; Thu, 11 Mar 2021 17:03:46 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKOir-009e19-Qc for linux-mtd@lists.infradead.org; Thu, 11 Mar 2021 17:03:43 +0000 Received: by mail-ed1-x532.google.com with SMTP id j3so3868928edp.11 for ; Thu, 11 Mar 2021 09:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AIJvF8THgvNIIJY7o0rd8q2CMHcgDSy7Mtu5dW42sFA=; b=oHvYAKs8vlQsGGeTCxnbGmFJRdubhK9l9eDvFETPrXX9cQ7MlU5fEAM0qMn1C7xchN YohhK3VVAFGYyqcR46GscrLSOwBqOC8DGU5uTlA+Vpc61R9ZoDyWxwVXvAqzNq2+eoNb VMsGujlugvf1G0oOs6vCypmtB9xIQqYp6W3J+kjg2Sayn6B9fqAMdNasJiN5TuCCSjM/ JB3nztXsccELBZkyeuy3Z3uH8hBl/ALzgqBPPilDUFOd5dmSxnP17KKDRcMG9jw5cMBF jb8CogOCyTD0cSSO1m+s/g4DzFYtm3m4su1yk3a6ZqdMIKH5pzI3Hfxle3x9ihR0Tajz enfA== 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:mime-version :content-transfer-encoding; bh=AIJvF8THgvNIIJY7o0rd8q2CMHcgDSy7Mtu5dW42sFA=; b=a38evE9Syfpy365GjVzgdnnWYPn/tOsHQqX9XfjGt9t8ooXJoZ0dHj977lszhDVg8Q cjptxRZGfa5vE+PyqViXnnwNyjXe2Qxs9DBzbcTOglpBHRj24RYclJ5NNLmI7szEST4t UF86EqRt4CovJF/bt9wab14dcY783Cafi3Xk5THCZzRaVEKBrnILQhtlvy4+WX2HtC4/ fzCBMBNghdU7kwY5roojXaKlE32XiqCpa0mOrjfh/nW/LCQaNcnB6AjSgMzb+Y4Spjui PdqCGUsKZd4MWBlZtFHqqmQA6FaR0WY6o1E/iDj/EH8GGkHPac7idf+EZN4Y5AOH4Iwy hTgw== X-Gm-Message-State: AOAM531J8Jbe1rK4kAoNDRY9sPi6OUsEBfqjsSVFG0iVxgL1Yjjz2b3j Lzt0/VSiBMcV+0Z/trvAd88= X-Google-Smtp-Source: ABdhPJwETXnVswKC4ZC4+FSyf5TAqqX9vnXmWFxa0O9LzcMWBXQwYxWCRSqufx1WJgXXxc52XIj3Aw== X-Received: by 2002:a05:6402:1004:: with SMTP id c4mr9610447edu.364.1615482220575; Thu, 11 Mar 2021 09:03:40 -0800 (PST) Received: from Ansuel-xps.localdomain (93-35-189-2.ip56.fastwebnet.it. [93.35.189.2]) by smtp.googlemail.com with ESMTPSA id b4sm1627205edh.40.2021.03.11.09.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 09:03:40 -0800 (PST) From: Ansuel Smith To: Rob Herring Cc: Ansuel Smith , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Srinivas Kandagatla , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells Date: Thu, 11 Mar 2021 10:56:58 +0100 Message-Id: <20210311095715.17048-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_170342_305363_DB9324BE X-CRM114-Status: GOOD ( 12.42 ) X-Spam-Score: 0.9 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Content analysis details: (0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:532 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 2d6423d89a17..ac1b4f176a17 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -531,6 +531,7 @@ static int mtd_nvmem_reg_read(void *priv, unsigned int offset, static int mtd_nvmem_add(struct mtd_info *mtd) { + struct device_node *node = mtd_get_of_node(mtd); struct nvmem_config config = {}; config.id = -1; @@ -543,7 +544,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd) config.stride = 1; config.read_only = true; config.root_only = true; - config.no_of_node = true; + config.no_of_node = !of_device_is_compatible(node, "nvmem-cells"); config.priv = mtd; mtd->nvmem = nvmem_register(&config); From patchwork Thu Mar 11 09:56:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1451397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=m2DnLlmi; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dRoK/5Y9; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxFgB28yCz9rx6 for ; Fri, 12 Mar 2021 04:04:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=Xpsal1SQkpMpB9BWtKq2ak4X9SZqhkKP5PyzydQJ2OY=; b=m2DnLlmiW3mcDkafZ7HCNt/4Q w3zehlm0ahKDAjbQKUPCATA9D1eRZnoinSG587piNL2sK7yyOVnuRYOSXSpos/QoxQg75w/rbGCSJ VhIi+WMbLwpUGlp863XHe+aHOr5uV+AU9D4hN1wDf7VSt1Yis18wDYmrCUpfRXYv0VpJ+7UdR2lEo U279d1PZheXlKqB5X1TbM6QU6lFX6feINHSQDuhFraRZQ99IvgGy1YRmtHNLrH9+k7HZowxp/jjhI tsKN4PCrCyuKErAy8pKQbRiOHGUNEltAv2EofH/zEIb/GEg4jqu16fITCXHjjXnXgn5hlUoCzhSfO WPH20HStQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKOj9-009e4o-1z; Thu, 11 Mar 2021 17:03:59 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKOiw-009e1s-RV for linux-mtd@lists.infradead.org; Thu, 11 Mar 2021 17:03:48 +0000 Received: by mail-ed1-x529.google.com with SMTP id e7so3868896edu.10 for ; Thu, 11 Mar 2021 09:03:46 -0800 (PST) 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=0SX53bYeJpoRn/Rj8EJYnn/yWlrMIeX4TZ6gWcrZofc=; b=dRoK/5Y9w7PG6auT6ZudfCM6FOG7DpqSmflGRRG4DKuffxACMDeG1P5mfGHpBl/SmO rkGL2d3HCT5kFv0KaZp5pCxoeGZbLyWifomOXRKzZrcQrMtbTz4FbhV74xbFdAPknJAW oGyVyrW0/zNg5bENsUQ/Tnl2DMzf9xJvXQfIiFC3MXBskpU8/MGx05dX5/2e3u+6KC3U GNXBjKaGpLr6PCfXgs9h94ie2OTL7TApL6IEDcEgiK28rp9DDJQ+JZwLCq52lhvTxUXh V5dz7YAh4hoPPGBvDkVPrVETr8zbZnBsKgiJ8WaQWsKEJXFtaXXoAoUKIBdOJ2kCPpWn ZodQ== 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=0SX53bYeJpoRn/Rj8EJYnn/yWlrMIeX4TZ6gWcrZofc=; b=r24IRRpWNgW7iTwwgPIxWMZIa6xEzz03mlQ558Yw0oYj8KLC1lE961/dHBW8RKoLsR cNOQtLTRzwH73f7m6voTPSjnF+dimMZejCgNFXjhja9rPUtD3P1zmoynfPZJGxKVXAH9 uACAc4HBEJYOHb0V+VGJJvPWrpd4khYiOGOuEZkUnS4btofvWv97CUrW/FvvmcHRiyfj ZZime1IyI4Rtjq8J6xniAedjTJi1HHRq4bt+Wfav7yosZe4Ka48xsLTXqKk19D6FsQY2 C7YIbFx5xQZ0zgLX7HNFlN/TrQjG81/GWL97ocLF4E0169EhBNurKnwLZNscaItNa7/N /5fw== X-Gm-Message-State: AOAM532vsP/vQAMANNFYYUpnOU14zNsT+gpv8c3aEiByYjAoyeuWGNDB ICC3yyk17ILfO0np7MLe0Ew= X-Google-Smtp-Source: ABdhPJzWjm/dVhAPjRJToEBbtc/5CZdeISlWchLsH+0sJdKagZmW8JyR4LY5IR8mK2hdQKi5DcKMSQ== X-Received: by 2002:a05:6402:704:: with SMTP id w4mr9933440edx.175.1615482225554; Thu, 11 Mar 2021 09:03:45 -0800 (PST) Received: from Ansuel-xps.localdomain (93-35-189-2.ip56.fastwebnet.it. [93.35.189.2]) by smtp.googlemail.com with ESMTPSA id b4sm1627205edh.40.2021.03.11.09.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 09:03:45 -0800 (PST) From: Ansuel Smith To: Rob Herring Cc: Ansuel Smith , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Srinivas Kandagatla , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/3] devicetree: nvmem: nvmem: drop $nodename restriction Date: Thu, 11 Mar 2021 10:56:59 +0100 Message-Id: <20210311095715.17048-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210311095715.17048-1-ansuelsmth@gmail.com> References: <20210311095715.17048-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_170347_157600_AF9AF731 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.9 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) Content analysis details: (0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:529 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/nvmem/nvmem.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml index 7481a9e48f19..b8dc3d2b6e92 100644 --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml @@ -20,9 +20,6 @@ description: | storage device. properties: - $nodename: - pattern: "^(eeprom|efuse|nvram)(@.*|-[0-9a-f])*$" - "#address-cells": const: 1 From patchwork Thu Mar 11 09:57:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1451396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=i0zMn7Dy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=q6FIKJwk; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxFg83MVGz9rx6 for ; Fri, 12 Mar 2021 04:04:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=PUGK27pkSRZltUTjkZlrcny6qjN+osWIzQzKsuCnkWY=; b=i0zMn7DybB08gdBdbJCyQwQ5M VMzcsl6VA17ZQxMpXnnV7IdvAgX/J9qt7rGt1REUVCNUFF4IAvEHNemd2FylgdJAo7OmSv55Og/ng zyc5sYurXL8djeN4W5TerhF6iMdMmNq7ilZMAmG7MrIIkiogvtac6x74kd/L7Es7eRAOmNP2mEgds BskjAGT7UOyfmAbB5cPjB6XFemZnhISRXALQTGTIQjE+zVWKuCCdmJoIPi5lg1crmiRgHUj+oH9Le 4aTsYju/ys3GkNU/qym6+HlQHBK81aY/BckTNuLsYNJV2JjXp+ygWtKEvyiBLI+/i3HDG9Ec2LVp6 mxChGc8Nw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKOjP-009e7g-JM; Thu, 11 Mar 2021 17:04:15 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKOj1-009e2o-UH for linux-mtd@lists.infradead.org; Thu, 11 Mar 2021 17:03:54 +0000 Received: by mail-ej1-x636.google.com with SMTP id c10so47615182ejx.9 for ; Thu, 11 Mar 2021 09:03:51 -0800 (PST) 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=n5Nl3CoPrKUbvXcQoRdyX4Oe5Nctcc661QmqCsoFZxk=; b=q6FIKJwkFQWBJ1OXleqfTG1T2TT3DkkLrAwZdQI3EH9fhKo5oEz9qft+OYmencIYQ4 jz7IDbNM3N5Nk8gEmiPbI17fjhnNGvcUS1PHGTeRBHyiIpbh0h+7uJ2owsdpeNpOPgV5 zNttiPoV+Ax6V699cZE2C/M2rvXwe8eoQtgEeG9rOzVeqX4mdbV/riILcIHXcQCsPPHQ uFah9LhZ2M8BXkll+vIYAI5iwpXX+OT4rlduJKeRDp1nyBhXJU0u3u+IrGPFZzl/KwJx PFHO4KJrRgWtJG1lHljMuHwL0vDKBmp2RLeNnbYE2yXzG26+11zwSGI4fhxKttWn48x4 spgg== 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=n5Nl3CoPrKUbvXcQoRdyX4Oe5Nctcc661QmqCsoFZxk=; b=IiscLo/9Wrh8uY7m+AP2ZQvL90SGN2RD39TMEVJB88r7c3pDfyqkNrL3vHl/cVwDKK nD0IYyzo4nuPOLezKT5vVqPbJkHeBRYk4hejjPlmKEzxc5phB8ATZ38Wr90shHukSBkc ikKKHLLViluW8pBpmbT/NP4nmL26Ysq/yYZrxqPqGc29xJuVnL2UlIK2tGARS/I3Q0BY WEQZaVu9AvdACsMPb4uIOlRzIhBZtBs8ceSkivuWw13rs1rZA4WjRZ1JCLQqyZHlbYZu m3K5oGsipvJAjUCbB0Lb9H+ku2AGkj3ZNGyr/hQpAFZgbacP1f7DjrBSNhW8GNx8+4LG 02Lw== X-Gm-Message-State: AOAM530nEQ0VBBOCyoz0Dkd4crsb7EMGY99hIJCsSiTDZDTxoSXMtY1W LMX0THF45cKDcs3bE0UtyOE= X-Google-Smtp-Source: ABdhPJzq/YatFckEfu+VF1H6Ea1sveBij0Xf3qb2wyQA4o1MhfevCcixqQxnAVUri761sfyZf4SLXw== X-Received: by 2002:a17:907:76bb:: with SMTP id jw27mr3981655ejc.366.1615482230637; Thu, 11 Mar 2021 09:03:50 -0800 (PST) Received: from Ansuel-xps.localdomain (93-35-189-2.ip56.fastwebnet.it. [93.35.189.2]) by smtp.googlemail.com with ESMTPSA id b4sm1627205edh.40.2021.03.11.09.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 09:03:50 -0800 (PST) From: Ansuel Smith To: Rob Herring Cc: Ansuel Smith , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Srinivas Kandagatla , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 3/3] dt-bindings: mtd: Document use of nvmem-cells compatible Date: Thu, 11 Mar 2021 10:57:00 +0100 Message-Id: <20210311095715.17048-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210311095715.17048-1-ansuelsmth@gmail.com> References: <20210311095715.17048-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_170352_797740_E42B6D3F X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: 0.9 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partit [...] Content analysis details: (0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:636 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring --- .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml b/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml new file mode 100644 index 000000000000..b53faf87d4e4 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/nvmem-cells.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nvmem cells + +description: | + Any partition containing the compatible "nvmem-cells" will register as a + nvmem provider. + Each direct subnodes represents a nvmem cell following the nvmem binding. + Nvmem binding to declare nvmem-cells can be found in: + Documentation/devicetree/bindings/nvmem/nvmem.yaml + +maintainers: + - Ansuel Smith + +allOf: + - $ref: "../../nvmem/nvmem.yaml#" + +properties: + compatible: + const: nvmem-cells + +required: + - compatible + +additionalProperties: true + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* ... */ + + }; + art: art@1200000 { + compatible = "nvmem-cells"; + reg = <0x1200000 0x0140000>; + label = "art"; + read-only; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_gmac1: macaddr_gmac1@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac2: macaddr_gmac2@6 { + reg = <0x6 0x6>; + }; + + pre_cal_24g: pre_cal_24g@1000 { + reg = <0x1000 0x2f20>; + }; + + pre_cal_5g: pre_cal_5g@5000{ + reg = <0x5000 0x2f20>; + }; + }; + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x000000 0x100000>; + read-only; + }; + + firmware@100000 { + compatible = "brcm,trx"; + label = "firmware"; + reg = <0x100000 0xe00000>; + }; + + calibration@f00000 { + compatible = "nvmem-cells"; + label = "calibration"; + reg = <0xf00000 0x100000>; + ranges = <0 0xf00000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + + wifi0@0 { + reg = <0x000000 0x080000>; + }; + + wifi1@80000 { + reg = <0x080000 0x080000>; + }; + }; + };