From patchwork Thu Apr 1 15:19:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 413624 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp654618jai; Thu, 1 Apr 2021 08:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw63zotTZCIuiBSKoB5XvwQVcLgzDhE9UTJwKdfVA22PVqY/YBBtbjlt3vYimUqeTNENJS8 X-Received: by 2002:a1c:e4d4:: with SMTP id b203mr8209412wmh.105.1617290567462; Thu, 01 Apr 2021 08:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617290567; cv=none; d=google.com; s=arc-20160816; b=EILQgL8YGyeA+b5Xr9AxmkU66XtNAv0wlRif8jZh+rCRXWxSTkzyIAnVzymDzatkSr JN3aGU+brXJGMIVJsFQdid+avSHIRdwhE4qvnoqZf4huwJwn+T8qqD+1uAxqJ7dJQqm9 EPXZrPkD0drJ0RixW6vWYqdN+YlYeOi3hXEkXxVvFQu/t2+JRx/VIL/2hjAnrbmFWlel fy1C2tXN4eBrm3VsnhWVIuYPn4mRH7F34twghh6TpyGmYP/BnfaPv1Gb48xRxfFHwkYn jx0KZpO7nKk/bICPOMTwA5BAXPJ2oY6qxw/1TkaTuU3/+aQBDvRbaUr7mJmrDlwJzjQp szUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=stw9rSFLXZckxRRPJy6wVfHI9fWUUb7UjDqVnEnLFCU=; b=GMx2WVryCvwFwFzrJKEXqQ2/QJzTvGZF23nxIaySk7rnkB1MNmoP5DmxZ+bMuIyM8L LkVucQ+p2EhGokvSsWDl099Mu47cUmawVVnQNlVupHp5jBBVtpu6hxyJSAz2iLCKaesq SfhAtFEwQ4He23sI2VgwukefTnd63fQ8mBjYvernFOBuhUHwojd9P3vTGsUouwCCUKZ+ EI5YAcrBGq80Qevpb+N8iBsdxxtjsAamc5Ce4yARPyptv7n5rvF3cEEEsoVDB+mYwYrl 1Lxnhs1uaTJNx2qcj01x7eoXNkjrPKcfJfIQ/OV9ZDErWzJqkqJaXWR9gCLz95TWaeE+ CcKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=desiato.20200630 header.b=qHkoslHK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="qQ0v8/k4"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 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 desiato.infradead.org (desiato.infradead.org. [2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by mx.google.com with ESMTPS id f16si5635788wrp.330.2021.04.01.08.22.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:22:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 as permitted sender) client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=desiato.20200630 header.b=qHkoslHK; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="qQ0v8/k4"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 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=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=stw9rSFLXZckxRRPJy6wVfHI9fWUUb7UjDqVnEnLFCU=; b=qHkoslHKjpb596dvWft9zi8kp uwBu2U7UC1iTsXHSoTfQunG0+k/88JtW90qkqKKerD+GS+gogBaHL55RsfocvEid41qn8FclJspAZ kGv7SeT2ctlZWt0noi9Ui6htlDIZFt/q4ikTzMCCPIJiWhKMupyOVjHIrobNclN0a88lUc8kRIJEO Xvy5IdSyNFsCvh6GlhKoK5pUW8KbNUP5alY9p2kMQbz4f4ilPJPoCVfyv5GA9/VD3ganFxTYZoQHa rCxNE/5z/q9G7ZrfhTzKfLf14q/HFMaTujAZWZ+OajkoKeUV7Q4+QJ3yStGqCa2ujU0faayOK+/fC cqiSjyhyQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRz95-009zsu-EL; Thu, 01 Apr 2021 15:22:07 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRz7J-009zVh-HL for linux-mtd@lists.infradead.org; Thu, 01 Apr 2021 15:20:21 +0000 Received: by mail-pf1-x431.google.com with SMTP id q5so1690078pfh.10 for ; Thu, 01 Apr 2021 08:20:17 -0700 (PDT) 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=I0ki0lC8MA7ZU5srSBRCAeZerDP7DRSW7mDv/jEyzhw=; b=qQ0v8/k4NrH6jKqHmdH5VXybvg1m4144BVeYDTvfC96mDKCt11Vs81OC9ACNp+Zhp4 A5BoQrzj8lb2eWR43CMRD+1En5lcgIjRxX2LZan9wjifgdEP6YOd0eymSZskboVwCAnU WABpIPUI8bJsBNhKiDsOESSHZXui8Ye72eq0WPv/fZc1CeXA09dhGjV9r7FBkveB0zbu JTLDqxpnrdkuSa/+o5dTKcqYRN8G7UhDxWDSJtjm6hwKiZivqC/5+EsT1nkoFPjBdf/O uSH37NVre7DHl6MXpEl1f3AUJ0gZGSRSehux30GBHeXBAXjDVMRLaE9FpgQKlW/2yacY KkEQ== 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=I0ki0lC8MA7ZU5srSBRCAeZerDP7DRSW7mDv/jEyzhw=; b=EqK3E7sNuaA/wKdhD47dGPYqYEHqcKL2MWOaP+NCm1UqKm4Ldr0iao126jEF721AtR RcEXogSCfPUlo+Nn2WDtQLS11jXp0KXTFAB/nBSnqI1fE5XSiSM8/TRwGwPRWurOK2V8 OzHGR4PKy40wnoq3GpJuJ5R7UgKo9G3/VkVSOXKFi5u/7OwCE6G182taCahnRC34UyqF sNT4jnfBrF0bB24l5IT+JYTuj6PJW0nthymecy1OqAOeog1hCDLGw+GI9C9AFY3PV3/7 sLIvS3Fx1Q350H9HOyfIYyDD8CB/TDwVclH732+aE6OxTATcamgmjgFA1j9fmFe6UmmH eI6w== X-Gm-Message-State: AOAM532G2FnzuR0QuP/LZnzGk4aoYAuCYzflZQti35HuSCNGrCzMLzoH d9ZZwPBqMoZb7uxKzz0Cv/IHX4Fl6HW+ X-Received: by 2002:a63:be0f:: with SMTP id l15mr3536418pgf.39.1617290415914; Thu, 01 Apr 2021 08:20:15 -0700 (PDT) Received: from localhost.localdomain ([103.77.37.138]) by smtp.gmail.com with ESMTPSA id l22sm6500919pjl.14.2021.04.01.08.20.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:20:15 -0700 (PDT) From: Manivannan Sadhasivam To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, boris.brezillon@collabora.com, Daniele.Palmas@telit.com, bjorn.andersson@linaro.org, Manivannan Sadhasivam , Rob Herring Subject: [PATCH v10 2/4] dt-bindings: mtd: Add a property to declare secure regions in NAND chips Date: Thu, 1 Apr 2021 20:49:53 +0530 Message-Id: <20210401151955.143817-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210401151955.143817-1-manivannan.sadhasivam@linaro.org> References: <20210401151955.143817-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-20210401_162018_028911_A5B1C221 X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: 3.4 (+++) 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: 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 e [...] Content analysis details: (3.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:431 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [103.77.37.138 listed in zen.spamhaus.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_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 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+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. Reviewed-by: Rob Herring 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..678b39952502 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/uint64-matrix + 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