From patchwork Thu Apr 1 15:15:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 413619 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp649797jai; Thu, 1 Apr 2021 08:16:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg8HJRqXF1kTc7Y1wLTaXlkE+PuLW6PtxOHSCGaF01i/h7wA/9C4ZvnTFdjYpZhwui+GdL X-Received: by 2002:a5d:4743:: with SMTP id o3mr10484090wrs.108.1617290217595; Thu, 01 Apr 2021 08:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617290217; cv=none; d=google.com; s=arc-20160816; b=Mmja8lpINUHMC4CrexPHsu4n7v78V2GPcdrCWLgy67BZRpNfGAxw1kIlQFJC6G15sI pKhZloiTr6CU3NxachG6QWGgq6xrnBHz5dTZuDqdQnZZHUM3HMTlWP2K3awcFoG9EK2x 2ixtRx7kgA2na5/57uqVlCQjDL6tPFgwxyDWKoIqQiQi4vclUXbOk+V+bM62YhOZBuIa l1GWSbis43BzQ8z+Ws30xvmOJsa1VrCVwTrl5xCEB+7tmpimup+O/skhms5JHm6fFqIo lZVVtNL/4YcQj3jwRVdEcH7gBA+slWQMl18eE7R4cZa9hhn3YwXdZL4gV8amcc6uE9yR 04gA== 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=9ZK+CSjiE8fqWAW8g1nmaTSxT87T1XZIo0Umfwkoekk=; b=fSJhFFeGovBIkOnjSTdhGM9ib+ycvtUV7CJCq3BdQPc79/2DzvtjnFT/Xtls050hT9 W38OUjJfRsSTARs1v4CMVtxfKrrO7ArCH2Q/PWueB1NDeNGIcyrQr5SrqLOOZGmbr6vt aye77r9hhNpLUba9u1u3UT3G5epk+5kLMJe9WDLKeej8+MKZ8G3uerHs6rytc4QOFIQu x2YXZ4XZGy4bijND2L+SAFb75UwvC0HLck+rDQovF/k6dp+OLQtrcdLUtUQ08Br/umpK ia/Zk+hphRUUqd6ntw4dgREOS+A5Xuc6q1hWB6lnFAHs2rbcm1s2DghIdM16PSoG+ko0 ZkWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=desiato.20200630 header.b=IyvIlyk7; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=p8Vu5ZvL; 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 w17si6032254wmc.150.2021.04.01.08.16.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:16:57 -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=IyvIlyk7; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=p8Vu5ZvL; 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=9ZK+CSjiE8fqWAW8g1nmaTSxT87T1XZIo0Umfwkoekk=; b=IyvIlyk7+2wypwC6n+A7gJraf jBegMqzEYjP0BLfmlp16KRQObiGDTahdKqDQw1Aj9LPHex6meAhvkO+2rqq1YmyyHoxsko1HwAWPQ uPKmcZMh/02uJV5itQjPS1x6th16a/afo4LQfGs0+ctWbCDKzwsyMO5q3jzTVrt/v7nLS6E1+WQjr 8wCOf7PgAqwmBUGgE1Y4NSDykEeRLEnqNRQrG+tsyS2wz91MOtQVWgkpREg2mZTqBAvcgi9vaP+RH cyLRjYvMwzZnpd5ik0Rjn2S5421GUK4pLgCH59tSCL0gC4MzrAT5NbbI7yPg7ROFyT/LLfLY+F6tD n7L0K78mg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRz2z-009ycq-NU; Thu, 01 Apr 2021 15:15:49 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRz2i-009yYU-7V for linux-mtd@lists.infradead.org; Thu, 01 Apr 2021 15:15:34 +0000 Received: by mail-pg1-x534.google.com with SMTP id f3so1760752pgv.0 for ; Thu, 01 Apr 2021 08:15:31 -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=cGzmTTjWe1AbEuSBzNDXhCdxGNlI9I7Ym5rhNfsOEPE=; b=p8Vu5ZvLUSLepbw2MVmx2WeN8I+Zxz5MU2S6/VR8IzPIHsXrQtI4YtTw5Ithnwu2Sr 34QwLJU5Ujb/2ElBq3VO13OHtVIsZ3iqJjNeChtJXsKzXUVTN9oQOiS+Rh3NyEY0sH7m oHsIQgF1noCVG0hBMXQThunqlM5C9iF7Vgpm/axnPEW7lGzW772zMv98DTkS3tyHiICN bmQkdGmL7Ff2mnAz2meAtZtrrhKnPLFJjiaBx4sWn386lnanoXLuKjGFC/aUSblE1gnx 7y83EYuPkbobFshrGX6+nic5asRx3GLqrWnOE+F3ZH+huVDcOHvHb4FDGRY7U2iVkNtT ugiA== 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=cGzmTTjWe1AbEuSBzNDXhCdxGNlI9I7Ym5rhNfsOEPE=; b=N18XyqbZeNecGbM4DQJ2TvEEZWEDBEO7BsYtgBPdps7FqqX2yNcP36DlD3ZU1mnqs+ FClKeoxzN6QXklFMTmBXEnLDSRFeeiTM0LiseOXkzBwhmht9E43vt3UYkxQnQFbOifYI dGYDwOiQH6qUAMo0ayissJ63zNPB3/mvcqZT4pG4e1O0HV2sb6qV1DyxKcSbWHHxb1uz r9DEfCdpzySyScApfCP+fOLlFJBdSDsIbDh83fX4EgAD5Hno57Vh416JobO0J+SuEHqD QrGP5Fbc2ivzfKjjwtU8+fsfzYY0ePSgQ+3f5dd/1I8q262A70dEsr0nr3FoWe9rZxtK MQ0g== X-Gm-Message-State: AOAM531+KszczUZV03XRIQpaGph0Nk0YPgsr3WOMLfNoWiHpNeJ1diN4 KpQrl9gqXK77XVUZjYJ6WivD X-Received: by 2002:aa7:8b0f:0:b029:20d:1b60:e823 with SMTP id f15-20020aa78b0f0000b029020d1b60e823mr8022613pfd.16.1617290130298; Thu, 01 Apr 2021 08:15:30 -0700 (PDT) Received: from localhost.localdomain ([103.77.37.138]) by smtp.gmail.com with ESMTPSA id 35sm5652769pgr.14.2021.04.01.08.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:15:29 -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 Subject: [PATCH v9 2/4] dt-bindings: mtd: Add a property to declare secure regions in NAND chips Date: Thu, 1 Apr 2021 20:45:06 +0530 Message-Id: <20210401151508.143075-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210401151508.143075-1-manivannan.sadhasivam@linaro.org> References: <20210401151508.143075-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_161532_362595_EABE6A5B X-CRM114-Status: GOOD ( 11.49 ) 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 ---- ---------------------- -------------------------------------------------- 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 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:534 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_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. 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