From patchwork Mon May 30 18:09:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vabhav Sharma X-Patchwork-Id: 12864861 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49A25C433FE for ; Mon, 30 May 2022 18:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242357AbiE3SJ6 (ORCPT ); Mon, 30 May 2022 14:09:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242403AbiE3SJ4 (ORCPT ); Mon, 30 May 2022 14:09:56 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20062.outbound.protection.outlook.com [40.107.2.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64DD6A2073; Mon, 30 May 2022 11:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0ojoRHarobOC8kKmB23sQecF908sfjxI9dSaF38DtKnKdck2S5h9gU2EjMLi4NPDMTTe+1OhkADkdl/hl5kpG1lS4zPPyre5nH7IZgMCO49lHzsaKAGjBoRXXYC4Pw/T5d6HjV8mGvKiH1YnfJU5CUl+OYykdHD4mQETNW3bXy0B968oaxGXYKjkj5HW3jVi2ccGM5tpT1e9uAAQdUG+RHDVYB80MP8r0NqhMxKp8Jmpb8Y+MZUuSKYN5N0vh5UvgBmfBd60sMkv/jYcl24AQyN5CY3a3SF3iP5ZEUkeHVftkpK8Cb7uFJiIVLiN0RyGkjwNoLKqpdzTwAgNTiCpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4AdYb1+/KC9VIWXxGZKcoMU+hZqZ+SVXJGjcss9YtPo=; b=LUsPFjfk+mlVj93jVTvX35/luiUCUFfCaiCzhVeV1UaaKqSB0wRDUruaZkQO/PAdjYRs/drahbrGDcje8w9LbV4ff8bSHxyISgU+lBWC+MBlA3ois7sQqLFcZRyX/xLyilhnZhR3oFFx6UvBKhmGXeh8uq41OBIm5XrxiCrNW/+ghik2ucorWGhfRx9p1lnVDAz7g8dICKi3bkhCGhAqmncvxHlVITLxnYxTasL4mhCwW6TKSVv6IFTCFI+nYRtEo1KNhWT7kJCAAZ1yD9QMNmhWksQ14NaKJHMDqJ6mfQREn5yKBEOKyFCmsu7NLaH9msU6qHVJ62JjOqI00kYsIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4AdYb1+/KC9VIWXxGZKcoMU+hZqZ+SVXJGjcss9YtPo=; b=IhyQ0D0QtMT7qNuQKZgBBqogA4R1UKrb/9P/0edviSI05YyyEV5WPrd/8B98bNyeNpT/Zy5jzsiZAiHkPiar6Y4yHfPwtYgQK0bsSrdxNLnAW6Rk7QxsdZhzKihZ0xyAI7UGO4BiV/NHI4xbogkb0YrSHgZEEqoYmkcwEIM/tuI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) by VI1PR04MB4462.eurprd04.prod.outlook.com (2603:10a6:803:65::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Mon, 30 May 2022 18:09:53 +0000 Received: from AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d]) by AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d%9]) with mapi id 15.20.5293.019; Mon, 30 May 2022 18:09:53 +0000 From: Vabhav Sharma To: horia.geanta@nxp.com, gaurav.jain@nxp.com, pankaj.gupta@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, shawnguo@kernel.org, robh+dt@kernel.org Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, silvano.dininno@nxp.com, V.Sethi@nxp.com Subject: [PATCH 1/3] dt-bindings: crypto: fsl: add entropy delay property Date: Mon, 30 May 2022 23:39:22 +0530 Message-Id: <20220530180924.1792399-2-vabhav.sharma@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530180924.1792399-1-vabhav.sharma@nxp.com> References: <20220530180924.1792399-1-vabhav.sharma@nxp.com> X-ClientProxiedBy: SI2PR01CA0051.apcprd01.prod.exchangelabs.com (2603:1096:4:193::6) To AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 216f7356-f8fc-43c4-fbc2-08da426797c6 X-MS-TrafficTypeDiagnostic: VI1PR04MB4462:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nQZDBHJWzJRzNqWVGNUgIQ/Z7olnkmwwPe59iP6i/EM4XvqeA35wHysbOPwysHtIq2Ie+wT1WSnG6rWHxjAjEpNMm6MxnW+dDRVfoLnZOUDoC9yZH8OZn5oo7yZWUXnY3+VtFy/y/6DSpe6+WhqU1Ptuf8zUMb0FlJ5JOrKhz/sl5yxK4Jx9CNejHcPnoI6AVPMc6tYRcJcITLKsaLym1LlpztwuBU5GMpbynTZxndxZa/sb0SlE448Td0BVSLoGHs4wCeDwjB7KFj3sbIYx1S74NK+R2SETSJWP+VPncHHxQqYBAVm+J8pjv+1ZlJmlA+9Atd6B9SlDVwW3ODUuAhGhSl1eRe7+tKP42/FoV/CvjXgcySQ6naOAYTtK/MDJhsQDUauqqx7CyNo0GRoQ/Oj7lfe/YpPvt55wiqd2RJhp3EMVskS6BiBrkydl3QqtNmuYDM6kS7VBcXHZQORsDLuRDoTqEuDVmDYr0L3rDspCFU7WhdDa6d5rJvk+42aXNqQ7oVGhzKAFV/u7sGxUljYAVfC3dstTBtBYdpAmmn60f4WpZYp5IMfr8JeA1JMOOUlGPhRZIS0FATapxqb/T+X0J/nbGDCn3mScPjNMHPyBaedjh73mbBvB+N7mD9RfJgdVKziyTU419Mezn7++jzqbwri2XqgwohZG5TG3h+CaAJ6GXauRmgBQidZv/HqlsgvfksKGmo1iUV8EQO15dg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9358.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(316002)(38350700002)(8936002)(36756003)(6486002)(508600001)(44832011)(86362001)(4744005)(5660300002)(38100700002)(4326008)(66946007)(66556008)(66476007)(8676002)(6512007)(26005)(6506007)(6666004)(52116002)(2906002)(55236004)(186003)(2616005)(1076003)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /d/Ia1/dDMXnjzcumII/l/IZuzaUtBZsrsfsmEvXic5aW9vL3Wd+CKIwle/5ozxJDR5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pNlQycCB7lMKJEspIQ3c/oZDwUf77jL5idT2kWAjm7OFNBAzNbWA1u13zP1BTuiI3DoeNJFokMTaoxUp2UTfVThJwtWzukNrrDDj+uOY1x8FOyacVP6tYxQEsMeWr92m9w+xceOKrPEobxku8eC3pJSAJp/iydXwyAwDmw5pQjh3kKTnTJ0hDftUR6iF0TNyyxUQs61WYhjkhiQkW33E5HZ11bztwVLKsOzqeLzHNUZUASUyjyGXZss4OLlu7Wf9WEIz8dbmxC+ViJOpzyw1hidL3Q3j5HskqJi2EvZf1nIIckqf+G9r7eyh9TclJQxqyjwWITBZIsgXTPw7p64KGMl7EtAxTG110G3KZYen19adBygGA6RLeTHCll4e4oSZ9M9Tgg0uXR/tev31fLahnNj9k6SPpxck3hdazi3B/ezDWCDyH+7MwmiyGS5K95ZIfwhI0bg0Y8BwNv5h9IPkuDTXjpwGTIaSzhZ+QJKtkavGnf2vE+aBD1T07nb2Bdzid33qvKdZ3eaLaJ1iVOdq5DdZY4Z7gvYWmCMtm3vGAihcaYfyexMUlyOna7PYXUczmKFWdRAEgQJMxFaD0m/xiYVaybgqjNXqiCSW27JffAQiPLzy3yGpE= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 216f7356-f8fc-43c4-fbc2-08da426797c6 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9358.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2022 18:09:53.0562 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zTQxR2hKE52sSRj9XURw21rHfHhe9GVRB2Ch5ExE3mgD/CsVTgvvmYc4Ia1a6xI8eYH1YgZiT233KvP4z/nBvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4462 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add entropy delay property which defines the length (in system clocks) of each Entropy sample taken for TRNG configuration. Signed-off-by: Vabhav Sharma Reviewed-by: Horia Geanta Reviewed-by: Varun Sethi --- Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt index 8f359f473ada..1477294eda38 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt @@ -62,6 +62,12 @@ PROPERTIES Definition: A standard property. Define the 'ERA' of the SEC device. + - entropy-delay + Usage: optional + Value type: + Definition: A property which specifies the length (in system clocks) + of each Entropy sample taken. + - #address-cells Usage: required Value type: From patchwork Mon May 30 18:09:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vabhav Sharma X-Patchwork-Id: 12864862 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DE5CC433EF for ; Mon, 30 May 2022 18:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242385AbiE3SKF (ORCPT ); Mon, 30 May 2022 14:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242378AbiE3SKA (ORCPT ); Mon, 30 May 2022 14:10:00 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74AE8A2077; Mon, 30 May 2022 11:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lVAqU1WgR0iaRUgFuI5LPTJWHfaG/yeXUlWzKg1sYzGckeI3S8LUGI8sAFX0s6FLILPt+8391+TMcTbGFTM1U9BjsLqjRqYoT+7gH5QToWNWv3QMoRmm5C8EbuF+YNOTWzgO7oYCIRpmj9bCtMeCgkiKBS3/PTdfIpLynwfUQuYKgROj9eJw5xrS4VkfjlQJkIloaIYctlC1+uLR5gMGK+GGE73jQfuz2LEeTQVx/00GFfUyew/jqvxL4vzn83214mEmPUmkmadOCaia3dOvxS2kT4VTK950aC67sISHHSNNcjrzjU6qQxVP+pA4KH5qaw270IHOrEZ2rmvllLMlww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7Xr+sOpLspTWoW1hqbrnxjODG7nLw40H1+o7jtgPHss=; b=nYHoYYh+OMzrfivG5vih14MxleU79L7WBEqm6M1PAJRDs0X0LsU7QgMHMIx9QRWRvtwdP+21OVP3BXxtxTNXy4n+E7qrRMJgmS8IlV5Z2AVQ7XhMENdrmJ+VsNzTBaQE/pb00Xa+AHb0vGlHjNSP6VXiFSmgshcVJgp9IF3AeLBHSv5xhjhrWt412Tu0ZbDxjK5iBkgYP/xZx7w4MpOU2JWqJCpSY0JDnwKCsHJfbka1EhryQvt1U6w4NCbP2k7GtzNm4Hmx2qAkoSPjpcifZcxyrRhmOUtB1gf4xe4y9wWXxEQBeijB4kLZ0sY2p9z8vgPCB0wgDjkLXR4S78gW1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7Xr+sOpLspTWoW1hqbrnxjODG7nLw40H1+o7jtgPHss=; b=sasQZQUJ0PjkjtDZrRjVOHMlhBz7dB9esOdaMw1syTH3mMwdiojPSwbKHEemS5PD+8yDmCkQtzVqp678UMsKrA41yN9NCHcoIaQhmhK9MpqDWKOCNKIdmwj9NfXPLZUiwAN1kZ6SJIwpW/m1w83wrMJ9XD+/V9UDVIttPn+j+eI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) by VI1PR04MB4462.eurprd04.prod.outlook.com (2603:10a6:803:65::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Mon, 30 May 2022 18:09:57 +0000 Received: from AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d]) by AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d%9]) with mapi id 15.20.5293.019; Mon, 30 May 2022 18:09:57 +0000 From: Vabhav Sharma To: horia.geanta@nxp.com, gaurav.jain@nxp.com, pankaj.gupta@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, shawnguo@kernel.org, robh+dt@kernel.org Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, silvano.dininno@nxp.com, V.Sethi@nxp.com Subject: [PATCH 2/3] arm: dts: imx6sx: Add entropy delay property Date: Mon, 30 May 2022 23:39:23 +0530 Message-Id: <20220530180924.1792399-3-vabhav.sharma@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530180924.1792399-1-vabhav.sharma@nxp.com> References: <20220530180924.1792399-1-vabhav.sharma@nxp.com> X-ClientProxiedBy: SI2PR01CA0051.apcprd01.prod.exchangelabs.com (2603:1096:4:193::6) To AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 708be761-7d7f-48c3-eb60-08da42679a75 X-MS-TrafficTypeDiagnostic: VI1PR04MB4462:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: da40yT6iDy54u7lyXS2QOvqICygB9r78vvj2QI+9mInYRgwBAawkxALPJPcrAYGpFjEoCYdwiEr/6LGGuPTf1SzZwgeOGbDqP4n57Dxn3hYKei/nWp9WP8L6PklQ2V3TfqkGSeBO79Jhk1daJbIZo+P86G1THOOQ7upeIYFbbVYK6B7THnkYCwL430Hh8O5zUXDL/eneDQM3eL98yIEyWRw3rhBYVF7YWjr/deBCv6xRDEAoEsCzLh7dXBffT1ZxHqy26RxVeL/bK3JDkzuBsDirkcJfuHhavJJgUNdUrovQN2WKEJqHOsKEEcO72lLxYFV2gCD6Uc+LLUpTzjZsMJOjYNCT7fLM4r9gXB0IOboe0KGyXzoQifZUyS++VsY8vQ2gXWvlCXmHJf30jMLTqWbFGCs5/ny8H13pp2Ri0ZG8yWvk6nQn2K5kds7AhoAMDN0JP68q591LA7dadYocv7WRgksUtc3ILUCS7/RpCiISwIhWuV3O6/YzRaUAp2TrMWaIixK+z09+ugHfyw8KKt7Wd1AY9jSrF1cGE+kCyZC11mE7BlRZWhlwNsjDryBIz85RAXgTml5bTXs130xXZ0Osx9GlDN1ULRDM7oPljqgHOc8+07uvXba4bNzG3hmTFlxwJ0bFzk8zKx9gYaOJgzNXlDmsTrSK+EotZSju2RVeiN4X9kD0ra6dD2hgdbCJDfJsPFP7Ida127dcNZhrUXL/hiHXbVcXD/94tLX9Jwk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9358.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(316002)(38350700002)(8936002)(36756003)(6486002)(508600001)(44832011)(86362001)(4744005)(5660300002)(38100700002)(4326008)(66946007)(66556008)(66476007)(8676002)(6512007)(26005)(6506007)(6666004)(52116002)(2906002)(55236004)(186003)(2616005)(1076003)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kQuVTbUkYeQ57wauIgxUJcTnjTfG9RzfsWV2FdFJGQ45cPdOB/y00MtNkNcszaMC0EYd+JfI+PGauuQQHPuuaY5i1e6jUw09dRibHJUwkZB8kxCuNLbM1Ljf7j/GMcxBNSSzJ5zXeKqyrxTXJyW7Chg0fGZY76MK0NFGDGyd5VK+LX53etXCVt8SC11gOpMUBs6EV2sUm/q7d0N37xsFTfGCy1Ym7WCRVY3w0wi/mGeUc3V16mvFjPbSlZBKypIBm5oLgBhAl9985cV+NwG8gIvuE9Ox1WyvPSA14RateHW2HkeBbsNBupJ/xvVvqf9aQA8f/2plMHsTxNR1hhSXDuIgdn6oI7Q3x6rGu7wB+rBXXVNuS0zOWqzx/VvWUFR9Brg4iYc15MgviIEcpBFH3cpWg33aKJDxonS44N//kmfUCgRlVgPvw/9oLL4hjeWqetgtGLDOPL+u7QowBuMh6xaKRKwyxdUBXwBR1BaXr/kwnCnSC0PPHX2i8Ds4n2CjgeB/0TwiecSTbtNp8pNvWCkC0q9SoTCZaHKLSr4bU6nVEcuH3+KRsSX2M48/qIPM2lMLdhW0TTn3tlujKOULGE9C/uSBuQiLMd4jbnEMMmufhNm04ae6Es0AL7p3XtylEOEmr9RY833ljGWZVIupUDewrV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T7/MmLf569BKs= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 708be761-7d7f-48c3-eb60-08da42679a75 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9358.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2022 18:09:56.9966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: H1wbGY7lHB/naNrtwpzcyiHswNAJKHLGmZWLaxLhiIuFOodN5wfVl5fYSfsNp4HhbftvcvtDxjgQX1CaMD9jXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4462 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add imx6sx entropy-delay property. TRNG self test are run to determine the correct entropy delay. firmware test is executed with different voltage and temperature to identify the worst case value for entropy delay. after adding a margin value(1000),entropy delay should be at least 12000. Signed-off-by: Vabhav Sharma Reviewed-by: Horia Geanta Reviewed-by: Gaurav Jain --- arch/arm/boot/dts/imx6sx.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index fc6334336b3d..305fad35f5c4 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -864,6 +864,7 @@ aips2: bus@2100000 { crypto: crypto@2100000 { compatible = "fsl,sec-v4.0"; + entropy-delay = <12000>; #address-cells = <1>; #size-cells = <1>; reg = <0x2100000 0x10000>; From patchwork Mon May 30 18:09:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vabhav Sharma X-Patchwork-Id: 12864863 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30E92C433F5 for ; Mon, 30 May 2022 18:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242469AbiE3SKM (ORCPT ); Mon, 30 May 2022 14:10:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242457AbiE3SKF (ORCPT ); Mon, 30 May 2022 14:10:05 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60088.outbound.protection.outlook.com [40.107.6.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE09A3083; Mon, 30 May 2022 11:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6/911kj4Op7MpLJvhbQh7+glqJckd8mIDH9HiD1qfPJCrszJWohf4kPV1zUri95+9b9Ba20a5T9Du19akpL3/XjuwyYPcok/2H/wMJVYRv9a2vImfoxsIiJHIx7nZ17m9AqD22LHxDxZOJwU+Id6M8Q0BLR6kAGgnqlQ3Kayww+5x9d9ZfIIJ27sJxSqMtVYG6pZGhEjZrvPKmkImbMbmFmmcz/AtB/3zdTtPw3IdSC3PIIzG9XvXt0FJ1Ef73szL2s0akBm0xUfop+sA+aDKMziQ3iXoe6PckRatupOhB6u3BOXdz6rpAqY6LvqkA+ukTAzQ1RbTilTqPKOzBS7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=70S4952JfaHb0TDlKokLRnv6THolE13SPrXlx+nj8X4=; b=LEzzAcv0p10crYG4QuSxmHBa0QYLwSy3FYKg2qu0J8OG/6Pm1xr8AFmAoVfO8fSDX81o5lqTAzrSMorGTxCjMNBn4A8BD/eehBAfEXbo+t4p7jUT4ZlW0r9iJNXgA73If7w7WOS17PWjAyLtIoanTTrMWzDzCCKofqK7OmtpMETTbxSwWyu/+q+KWGA28rhM/C5pFibtE3+SB0GIZ1W2NnwMdADLDtCE1RQzbMvyHBxY6tXi8DSCHPDgLAJtCQKVERFfAI38NGrzatnSBn82H58Smz4Bwe8d9+PgLe+Fv6TVMWUcZNsUQT5xsvquTsiwbFOm6lmfkQJFwiHp26EXtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=70S4952JfaHb0TDlKokLRnv6THolE13SPrXlx+nj8X4=; b=fjeikNe5VskE06AHHvDrDLfNL6h0isG80XK+8FYYwkEeMLQoQ9ugP2vyDUC015NM5ED2ScO0g47g3TaD2Iq/Qkpa6sivB1j6L74y5GojO7kdLAF/iOrhbVe3J+yK73SXn8qjut5LbmMRrelkx8iz1QCmlGL7whvWn9ZfHWQCf/s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) by VI1PR04MB4462.eurprd04.prod.outlook.com (2603:10a6:803:65::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Mon, 30 May 2022 18:10:00 +0000 Received: from AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d]) by AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::1076:5516:ef4:7c6d%9]) with mapi id 15.20.5293.019; Mon, 30 May 2022 18:10:00 +0000 From: Vabhav Sharma To: horia.geanta@nxp.com, gaurav.jain@nxp.com, pankaj.gupta@nxp.com, herbert@gondor.apana.org.au, davem@davemloft.net, shawnguo@kernel.org, robh+dt@kernel.org Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, silvano.dininno@nxp.com, V.Sethi@nxp.com Subject: [PATCH 3/3] crypto: caam: read entropy delay from device tree Date: Mon, 30 May 2022 23:39:24 +0530 Message-Id: <20220530180924.1792399-4-vabhav.sharma@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530180924.1792399-1-vabhav.sharma@nxp.com> References: <20220530180924.1792399-1-vabhav.sharma@nxp.com> X-ClientProxiedBy: SI2PR01CA0051.apcprd01.prod.exchangelabs.com (2603:1096:4:193::6) To AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 465b5490-841b-4b19-fcdc-08da42679cd5 X-MS-TrafficTypeDiagnostic: VI1PR04MB4462:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xuRTS30J1OO1VqyP7aaReq5eX6NjekcvIQYwsxfk0Ib89gCGfD3ryCGe/fNsA+wgO3KgENSS9FxLOyrTtHO6ppv/Fq7Vk+CFr3BIrADKO6DL8QlYgTWo2xQNvw81D872X+gyDahnX2FhsCLt96YjY7MjQlYgOeDFNawF3lmdMMmp4aXlqLAX26D/xodfq4u+9MFYvUlNWXrajbTjGlTsiLIyMyd5QkGnpx5on48Wq2k8ZDwQrkW/zveppm6Zao9qMshycAlxxOAWEuMRHKHSnj5UvPx6mSMgo/qOxeBPx3s9OsClITRK7S9WOpcZCA39dlEtdz7Al/1F9tqOi54c5gIi8SeCeZpKQdhoiQ5A6WcPO7Qmm/3rrP7axe6S95CW6X5SXKF30D4nEClSnZYPiQrHpEMOq4/QSGPF3LdSNfunaa12EAJJs2XUU6vlLSgB4n9zGTUUMuTsQSLQcE8e/rfbvx8fipfMZqNOBp6AS16KbOaWOnnEe8TYOBOyY/aOcRgk6yHeAJhOSzlCWMF9a4TCUtr/B+xypU9pDO6LqoiO/eKLVpXiAoWiG7iCctMfyriTY+EvBI0G3lqM0AirH/iJadXa3te6xAQ8umnbNBIuyWkZc9ro+Ty6EuZ7MTOOHC3zVAT3lRShO/WIw7k6+REJvG1nc4D7Qd2VvTHpjc/QHbrybeDNB2G2uxTE/pOFG9bMy1FJOfag+QD7pWNixw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9358.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(316002)(38350700002)(8936002)(36756003)(6486002)(508600001)(44832011)(86362001)(5660300002)(38100700002)(4326008)(66946007)(66556008)(66476007)(8676002)(6512007)(26005)(6506007)(6666004)(52116002)(2906002)(55236004)(186003)(2616005)(1076003)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F+XTNmdbI40FoT3uP/w5f17REplrj4R12UxDeca3GamXQgMQgN3OaujvGkyBom/VCQDcaLBc1zUw80w0thDo6kiF8f3zp0tx2YPoW0briGlHpYCDFsKbzpThQXGtleW8b0+0zSMs+NsIojgyCzFafImPPIUT1Egs8c5YfEBfEMOu5XhKT+dGy9JZUe99o3Ps+dB3zBKMiQV0I68hAVk4KeCS9zg0VEdVnvukcjyY3eM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PZ2jLq0kZWncIv7Pmn5DurFp+nEmAn+1rLRNKgCDm51DZ2u6fHIw88YX31VKu6QRb3XQIfVHT8GC+NF5dxz5qxWtqSSSesvlhSWdPcIcztTqDeS2M0HquaObVhq8+037eBbUDX8/t5gOevhZk6yQCnic2zGyrnqYh6Eq9QOAlSHMJHoRx1/vjIj+Eup5ZfQHviy755EBddbz0YEEFNkzrNmRusirvlqb2d5W2l19EVmtLW2zGHvzDdB4cGtQ/pNY4fnKkEDimxsLJIqlK/KMI4Uuf1vVe0UBxxj5bsEkfdn1h1GrONgVEc6LT6WrpcltVNDEPxLU0V4g5t1snp1jAZgrEld26VUHlSWU1wdPHVs/RiTPr9W3l4A4Z42m4tQnppHWtBk8oiETNrmxFSsYOTL0I/JWpjsJh+Goo2D4MaKKJkIBU99RE= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 465b5490-841b-4b19-fcdc-08da42679cd5 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9358.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2022 18:10:00.8087 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iWXxdHCE1/xiowE/pg8pO2ltctPNKGuC0+UEfPPdr7I/mcEESrI2zPPc44ITaI/T64Q1samadIBIKKJgxIOx1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4462 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Read entropy-delay property from device tree for TRNG configuration. update the value if entry is missing in DT. Signed-off-by: Vabhav Sharma Reviewed-by: Gaurav Jain Reviewed-by: Horia Geanta --- drivers/crypto/caam/ctrl.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 32253a064d0f..5ffab99d831c 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -619,7 +619,7 @@ static bool needs_entropy_delay_adjustment(void) /* Probe routine for CAAM top (controller) level */ static int caam_probe(struct platform_device *pdev) { - int ret, ring, gen_sk, ent_delay = RTSDCTL_ENT_DLY_MIN; + int ret, ring, gen_sk; u64 caam_id; const struct soc_device_attribute *imx_soc_match; struct device *dev; @@ -627,7 +627,7 @@ static int caam_probe(struct platform_device *pdev) struct caam_ctrl __iomem *ctrl; struct caam_drv_private *ctrlpriv; struct dentry *dfs_root; - u32 scfgr, comp_params; + u32 scfgr, comp_params, ent_delay = RTSDCTL_ENT_DLY_MIN; u8 rng_vid; int pg_size; int BLOCK_OFFSET = 0; @@ -847,6 +847,16 @@ static int caam_probe(struct platform_device *pdev) (rd_reg32(&ctrl->vreg.aesa) & CHA_VER_MISC_AES_NUM_MASK); } + /* + * Read entropy-delay property from device tree. If property is not + * available or missing, update the entropy delay value only for imx6sx. + */ + if (device_property_read_u32(dev, "entropy-delay", &ent_delay)) { + dev_dbg(dev, "entropy-delay property missing in DT\n"); + if (needs_entropy_delay_adjustment()) + ent_delay = 12000; + } + /* * If SEC has RNG version >= 4 and RNG state handle has not been * already instantiated, do RNG instantiation @@ -875,8 +885,6 @@ static int caam_probe(struct platform_device *pdev) * Also, if a handle was instantiated, do not change * the TRNG parameters. */ - if (needs_entropy_delay_adjustment()) - ent_delay = 12000; if (!(ctrlpriv->rng4_sh_init || inst_handles)) { dev_info(dev, "Entropy delay = %u\n",