From patchwork Thu Feb 25 14:08:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 387214 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp342226jap; Thu, 25 Feb 2021 06:09:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNs5fv1yzxdez795DhgZFH37r38/iLSKGa19KsiT13WuQTZMyn/NuPirdmCZeNCafXAKrc X-Received: by 2002:ac8:4554:: with SMTP id z20mr2535115qtn.269.1614262183391; Thu, 25 Feb 2021 06:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614262183; cv=none; d=google.com; s=arc-20160816; b=sMSO7fGjQo3Qm1AR33acnzsqXl7xoxT1xS30a3Mn8qr26JR9dZF5Usxn1gImmCI8EK NVZC7U51d1ZjG9tDcnZc2oDTrXtT+FZGHnZQRlqV6lCd0tjIFKRrSIQXmEKj0RBXUarB 7625axlhmhfYOI40lEEjDavx/1ruVLi5ILZqRQkZPp6/jTvb8CW3wigWTFqSyLb8IED/ Z126vXsMEea0fj4SJw8vf7u3qzuKbqmQOq+6Ve8RBwUDX0UC2auLKeMxeT6+xvRh/VNB y9oo1GTh57uLlh7BpjGvurjVCY6WUDOZbuhdT0VDxELN54XEHn7LQvpr8eGiX1QCYmxw PTyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=kGA34IiC07gMaNpvWZ3SlVzmO+WkpIR6wst1MR+hnk0=; b=drN1GfnRehrDWtMdymqGm6SSqGhfTUBmMi5fYtkpgn/7DI8RcB/R3OHjIY1xnXOt7I vTZKb99gHYX+YxQddBoRMoK/63Q5s3JqB03J+AY9YgVSA4xA7wezxc2cucnk8jixMw7s cQDmEKOivcfWIBuSrqByTd7ggAx18IY5xMvJoLwxIB9/tJxaw+q7YBlJAAlfvT/53sHQ ph75qgKcctcMQCPkwyEDpq3MHVyAZm0pC8T78+fLMLAqK1OIlVo7NrDx5gCh/xuWyOZ7 DhJ9dZxIP1ngT5PUGzUHiQiOYCCKDW9g4cKxR3B5hFegeAjekP3cXY/+LPqCzHvcSn4G uDAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=QAAEAAIe; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QQq9Hyp6; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id e3si2712399qts.163.2021.02.25.06.09.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 06:09:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=QAAEAAIe; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QQq9Hyp6; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kGA34IiC07gMaNpvWZ3SlVzmO+WkpIR6wst1MR+hnk0=; b=QAAEAAIedW5rGepX/IAv7lMmY eS/W4i7cHu8cc0llb4srDDBKhQiqDHVXJz8HUmn9gpZU1cETe1Wx2JqK1L4ZjKigkdU+pfO73mvlj j/fnvEy/0O4p/eLomS25KUkBNX9mLIooJ4d9XI3JUyZ5xofAyxv2k8TMTpZwqQ2IH5vNQaYN0kIvA wNnenno0rYM2RLhL2zCkmqad7tpzqoUvsv/cm0tSAc+7BdmUw9OMEbpZpiSM0+yq621iRea/g9IZS dQI4+tNt9DksIOvs60dm3Vmffnvp78yjVGG+7l7hSKw7195NBcx84x/8GTFhLVW6a2rBCW15AdumO D29LXOelQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFHKX-0006zS-4j; Thu, 25 Feb 2021 14:09:25 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFHKU-0006yO-CO for linux-mtd@lists.infradead.org; Thu, 25 Feb 2021 14:09:23 +0000 Received: by mail-pg1-x530.google.com with SMTP id g4so3866042pgj.0 for ; Thu, 25 Feb 2021 06:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+/fZuaWYVZIMIkTfAOgxpNFqBTcFkZg8zMovp/of1IE=; b=QQq9Hyp6dQvfLQP4R5h1797glkzOuUgcY0k++QNnerFfLYh8aDNnUmh6CJDyZpKB7J wTIUaAnpolneUPzLvhoOY0e1qkVec2T1vTEf/iYQbSL5QUPB4rq747O500T6shcgcG7W ny4VVf3fnupgoSCjCksbtABCyhQ5uu6fYFpj0FCklS+ahdoV1PknvSzpvG49D7GJg+Xt iDvC4NIQxLG5CxKcdx8jHxar/Y98e1nDeGBDWfouLejDbCq/RgCkiK7Sof/aOem9cRVT bah8x4QnwbN2ulCCBygGmOUMpMVw0kSyrK0zruK/56IdTO/97MchfA0leEwnEjtrL6J6 nlNA== 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=+/fZuaWYVZIMIkTfAOgxpNFqBTcFkZg8zMovp/of1IE=; b=oduply9lFUSon0kWAZzMRLHIXjFwCv0IHYSgH4mqXVHl8v1hqVeLSQjW/YpaSIj/vh L7TxfinQHIgnqpHaLHOa+Z+jCRumFiJpj6eYWAIOzVZn2PbVQSLP+Q7/W/cNYe2SVCz5 Kx25K6yOJOVvTuKjYFzUC8mtdh2Ey1fe2WXqe6Elr0y662U+BNMJHmDg1W/cIWJiYWNg 8/24xlSUkaMC3/VKqvzQ6i4jTi4kP4xAoEz5E0MrRtcEUuHjG/HW6+T9fevockW4PseG awE4XHGN0rI14t9+Ke7D0k97kmSqOfRyRgDpKxTZduTIm1mcnLKVqMYWQ1gMHbxRSNM4 XPWA== X-Gm-Message-State: AOAM532X1K/RLQvDml0wYA2ue3WQ0yslaU+pJO0IokamuWhUqjnNvOM7 eptb50TtuHgI/IHFmGRQ966K X-Received: by 2002:a63:a512:: with SMTP id n18mr3051853pgf.329.1614262160060; Thu, 25 Feb 2021 06:09:20 -0800 (PST) Received: from localhost.localdomain ([103.66.79.45]) by smtp.gmail.com with ESMTPSA id f3sm6228918pfe.25.2021.02.25.06.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 06:09:19 -0800 (PST) From: Manivannan Sadhasivam To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org Subject: [PATCH v3 2/3] dt-bindings: mtd: Add a property to declare secure regions in NAND chips Date: Thu, 25 Feb 2021 19:38:41 +0530 Message-Id: <20210225140842.66927-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210225140842.66927-1-manivannan.sadhasivam@linaro.org> References: <20210225140842.66927-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_090922_478490_327CF57C X-CRM114-Status: GOOD ( 12.52 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [103.66.79.45 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:530 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniele.Palmas@telit.com, Manivannan Sadhasivam , linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, boris.brezillon@collabora.com, linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org On a typical end product, a vendor may choose to secure some regions in the NAND memory which are supposed to stay intact between FW upgrades. The access to those regions will be blocked by a secure element like Trustzone. So the normal world software like Linux kernel should not touch these regions (including reading). So let's add a property for declaring such secure regions so that the drivers can skip touching them. Signed-off-by: Manivannan Sadhasivam --- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml index d0e422f4b3e0..acc7dfd6ef28 100644 --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml @@ -143,6 +143,13 @@ patternProperties: Ready/Busy pins. Active state refers to the NAND ready state and should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted. + secure-regions: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Regions in the NAND chip which are protected using a secure element + like Trustzone. This property contains the start address and size of + the secure regions present. + required: - reg