From patchwork Mon Mar 8 05:44:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 395344 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1439066jai; Sun, 7 Mar 2021 21:46:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOmAkpTxgAL0pfRhCm590EcRJDSBzJRzU5tnWxvitStSkz4xuJDFJPhOR67SkR28laV0HV X-Received: by 2002:aa7:d44a:: with SMTP id q10mr20145437edr.278.1615182366398; Sun, 07 Mar 2021 21:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615182366; cv=none; d=google.com; s=arc-20160816; b=AW5MWcOtH7x8cFCCO8pa9h4jdjz5nff6qK0CJEClnIy7LOjNDEnBAqSNcrpghUKdEM 5XFGTitFlqd9nMf8OWXUlRS6AmOP6FiBg7y+fCgPil/M4xG0GzImh+heNxXJ4VvJgbJ0 b/S53lx3u88lKLECcZMwnSSq7elclrJT49Dw4Jy3kLmvw6mm0nuW9LqS/sVX/PSY6wm1 JCbAE+BDcwqen86/YhUcE6PvQSkfXHBs7Km0AXBe5ipAs8x5z9CIY80rpWR/pu2X8vno 3aAqodVMogutVRTUKnVtibc5jgiO+Qjw5d6j0EiuRDMx7WUoGQzW47FGrh5oimoka7Ie 2hAg== 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=0vZpb9y8MutMaka6YLswZQUFtbMSrJ0Y46Hxti/8tHM=; b=PRZOK8TB2YaeSbdOzk6iizTjKdGHiXAPNFk7acQRh4pVQ8+30OpXwV2apuZ2grNKBx aAXsj5RPQ5cMqJ3l95gCBEoYiFCUNb4Ox0NmijMrE7HZzzQHHpvzrsRRoppxhFR0NAfC HihBVeMNp0Qrnzl/uyIQFZUQNmTom7WNFHI0izvotW9BUKzV8/c6Qf6/AJyq375xY1YW pVhy8Kri0trLs5wKeGPPIyAJrGSzZiOvkwNcerw5Qk0VCg5Hyt9HFFQEYYyjEOOQSdnH TsEZ+q6Yr0pOaHRwpQ83hsdIzDmTLbcOjjRcfMEeEoTZivTy3w7xer3oPYFQX4DPrADS RLkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BJ/nj+3l"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si7131983edb.325.2021.03.07.21.46.06; Sun, 07 Mar 2021 21:46:06 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b="BJ/nj+3l"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234626AbhCHFp1 (ORCPT + 6 others); Mon, 8 Mar 2021 00:45:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234613AbhCHFpO (ORCPT ); Mon, 8 Mar 2021 00:45:14 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC3DC06174A for ; Sun, 7 Mar 2021 21:45:14 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id x7so3000663pfi.7 for ; Sun, 07 Mar 2021 21:45:14 -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=0vZpb9y8MutMaka6YLswZQUFtbMSrJ0Y46Hxti/8tHM=; b=BJ/nj+3l8mDnLcnBxLlfarOq64qe5GCTAGyv452RcjzDzQpB4tYWS6+XYTFp1wDjLg iekeoQ8giTKMDsFCXfSNVD0QgoGyu/K42d7mJXVvz2aZnWHm/gNU14zW/Y3R7m5YsN3h fd7WoXMP/NspTSfDlYrON5Hdlbrys7rnjkhYIunH2u2usjqGZ3LVdW0ymxcqrvobyp93 UvbWKUzzalTAkVeIqkca95kXND+bReJeQoPRoLuOgzOD2pqaupg7xO76WXBfkXBWfOsj LEIpVyb42vMZL1lLkvnY0ikFcr64g4HTqfIZseiRA1pZfYXuyiUcX6jbIpEDNbTM5rL6 NjSA== 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=0vZpb9y8MutMaka6YLswZQUFtbMSrJ0Y46Hxti/8tHM=; b=hIhPaoNuh0r3jHgitHuH8xWeT/O5Iq38f6zxWfvnFFbBcqod2wZVW93BaGeW6iquON m6X4R+y9zaOOCzrHmHWhoXv9wwXDLm90Htwapy5+fC7uYClt0W6KptVyR+xnv8Yx3ZWu +F4d0WdWQlJo9dogbc3mBozBV3Ud0LEBwDSbQqpmJS/QPTCmaUnrjKRj7eCdHpkwFkH2 0qpXGZ5guPLPmusHmYwQJNrkrYBM1J292Cu3o3UqYUAmuwelGIoA4GxMU2Y3UN4u5rkX lKKQfewjbUMpB5dS6JmRYHbKanjD5vxm/cl5vvMDICsEs4e4Jan44GHlY/fhV5Dn1nkr 0O4g== X-Gm-Message-State: AOAM533bdEghLEWHueEsGNPZseyfkguGc2OwN/0nmtYJz1bi/LtwmMrP 1iNSkLicTA+5xfHqeNqfVE+G X-Received: by 2002:a05:6a00:1493:b029:1ef:a5e:ae7 with SMTP id v19-20020a056a001493b02901ef0a5e0ae7mr20047950pfu.61.1615182313824; Sun, 07 Mar 2021 21:45:13 -0800 (PST) Received: from localhost.localdomain ([2409:4072:6e84:fef9:1070:d306:6d0e:bf6b]) by smtp.gmail.com with ESMTPSA id y29sm4331506pfp.206.2021.03.07.21.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Mar 2021 21:45:13 -0800 (PST) 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 v4 2/3] dt-bindings: mtd: Add a property to declare secure regions in NAND chips Date: Mon, 8 Mar 2021 11:14:46 +0530 Message-Id: <20210308054447.28418-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210308054447.28418-1-manivannan.sadhasivam@linaro.org> References: <20210308054447.28418-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml index d0e422f4b3e0..15a674bedca3 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-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