From patchwork Wed Jan 1 17:50:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 11315167 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5ED121395 for ; Wed, 1 Jan 2020 17:50:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C755207E0 for ; Wed, 1 Jan 2020 17:50:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XJlQCYxU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="H3sNLMfJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C755207E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=CtuQ/NNMEt4HO1vHSqSGCR8ld4rDMRkbq16sKwRKgow=; b=XJl QCYxU2iwL+nxbfvqJYhhAw18Cf4oz1nnTa+jbd7JGorEbGJHeMqu16CK2axysr6RJuxxgkMnGARld sHfFJlVaf41Hb8lfEhzj8pLCb2SdC2CwRo3mewDInvG1P6d8NMltYtXiPPMYhKthHvkm1JnbAjYMK auNUpYX4IYo/8N7qx1DvVzF2Zublk/H1XpNNAIAP6VHU4Ryq03HuhcE8NmIcvUOLBoBUx781AkzFy yuUJIpp4BY1MxmeksC2vNZSHwNtZxA5BdDLIIU3yfYk21pnD0DU4RqJVFDwCXvI21GQy6BOClQvfF XmxQmui5oWfGkX/MkbZw/cP1wSHb2xQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1imi8U-0003Gr-HG; Wed, 01 Jan 2020 17:50:22 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1imi8Q-0003FN-V2 for linux-arm-kernel@lists.infradead.org; Wed, 01 Jan 2020 17:50:20 +0000 Received: by mail-wm1-x344.google.com with SMTP id d73so3908064wmd.1 for ; Wed, 01 Jan 2020 09:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=12nPZoYm5B9O7/gN39AnPaKov7Kvb+XDvIXAHahnWys=; b=H3sNLMfJYn4R9zMIiXkpZ3A7/6KfGkNQ70mnqEN648stOCgYDViADXf0NZu+KNUsIG qXNFEm8YZ1TL8C2VIdUsljDE//Fudcw63RR1r4UDapnpeHwRLUIlG519IueS5L1GOUtk lpxxIBJN8eQL+NigCBLgtSumUzQEpipSX9UuI= 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; bh=12nPZoYm5B9O7/gN39AnPaKov7Kvb+XDvIXAHahnWys=; b=uhfzaEBosSVyXT2F+00nOpIBU1pFP6ddoghexwcEgNzutkRfrdjWJqVdOgSpnCMC3F b0DsIvbh13tKiljfrU3VkRvwq56wdN9ayzyKR3D5juQJy3+i0AyGMo7EiTDQuyWCUK0U Jai8nrUo4tMf7QUxTh+vzjADopMLJSQwrlNkz6ay/biZiH7LtSsLnbQIbKLrOZRj7QEB K9B6Ar3AvqyHQnHTFNClZJvrYSx2LV5FwwLwSF5c7MS9atSjz06BWsFqc4bKs8bQN1ad 5Tr37ZGXeZVdUt1bx2Iyt/CGP5tb6Njibmw716L/9oloSgMAYIShP8mFpCZtsvfk2HYP ASbQ== X-Gm-Message-State: APjAAAXIFonHA2iIFPMGfpxmsK2LpwG9QZXRbVkGax0JoTVZakX0mr9d ETt5IDqduerRIrshdbQHooDEQQ== X-Google-Smtp-Source: APXvYqwcPN+/qIwHkLsDYh4D9zpy2hKTq1vCs5L7oZr5hU2Vk65Fa/hXgcdbiqJcMmVYFV4CyHk7OA== X-Received: by 2002:a05:600c:248:: with SMTP id 8mr10708929wmj.175.1577901012933; Wed, 01 Jan 2020 09:50:12 -0800 (PST) Received: from panicking.lan (93-46-124-24.ip107.fastwebnet.it. [93.46.124.24]) by smtp.gmail.com with ESMTPSA id r15sm6025085wmh.21.2020.01.01.09.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 09:50:12 -0800 (PST) From: Michael Trimarchi To: Shawn Guo Subject: [PATCH 1/2] arm64: dts: imx8mm: Add CAAM node Date: Wed, 1 Jan 2020 18:50:10 +0100 Message-Id: <20200101175011.1875-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200101_095019_314994_BCABB5B9 X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Aymen Sghaier , Herbert Xu , linux-amarula@amarulasolutions.com, Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add node for CAAM - Cryptographic Acceleration and Assurance Module. Signed-off-by: Michael Trimarchi --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 7360dc0685eb..428a8b43086e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -667,6 +667,37 @@ status = "disabled"; }; + crypto: crypto@30900000 { + compatible = "fsl,sec-v4.0"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x30900000 0x40000>; + ranges = <0 0x30900000 0x40000>; + interrupts = ; + clocks = <&clk IMX8MM_CLK_AHB>, + <&clk IMX8MM_CLK_IPG_ROOT>; + clock-names = "aclk", "ipg"; + status = "disabled"; + + sec_jr0: jr0@1000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x1000 0x1000>; + interrupts = ; + }; + + sec_jr1: jr1@2000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x2000 0x1000>; + interrupts = ; + }; + + sec_jr2: jr2@3000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x3000 0x1000>; + interrupts = ; + }; + }; + i2c1: i2c@30a20000 { compatible = "fsl,imx8mm-i2c", "fsl,imx21-i2c"; #address-cells = <1>; From patchwork Wed Jan 1 17:50:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 11315173 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CB1D138D for ; Wed, 1 Jan 2020 17:50:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9871207E0 for ; Wed, 1 Jan 2020 17:50:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oOdNNwBt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="NXurigMw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9871207E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=iLgIMDuecgwkpkbbwVkSrNokbclzvpJ/6Jbd4+I8bfc=; b=oOdNNwBtbxihoWBFR5fP6gDREQ 7CUgXCrOMB4Nv/4Yht8KGj7UFkdTfn3w/xi1bK9Xjarc8IZh3EHWbwmwGXRZx9YlGIU2uWSzLIlSg 1ePYWNBIL32nXCs7sQ83W7DfUVH1eBkAABjS92BhQFoLyb8W4FBzeyblAyHsPLBVeOAupWCK1y6rC ktPFYRYnsTaeBeGccjwrvhUt9SVXHf5sKJYvmOop9PYJdGsVMVLVJt61uAiPKgj2IruaZlNqvLqfE Ge49wdOI8NPf7sRJYw/8vJl1AG84ZXYS9AU41Ji1IrnI5FDu7+ss3kS9xAU0dubaIPUgvcf+3oBgB tW3tuHqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1imi8Y-0003LX-JB; Wed, 01 Jan 2020 17:50:26 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1imi8Q-0003FP-V9 for linux-arm-kernel@lists.infradead.org; Wed, 01 Jan 2020 17:50:20 +0000 Received: by mail-wr1-x443.google.com with SMTP id z7so37304536wrl.13 for ; Wed, 01 Jan 2020 09:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=No6+pF/29hbexfyxLIzSLoDPs3T39QBZzwsgULMLjzI=; b=NXurigMwYAQN2BXM6VE1oNj59pJfcDf/GmwRuLupHEIrV3Fb9IKI1Jibo7AC/IN0xt gLz5S7HZCZxFNpxkwx/W19965ayR3mAbUXbXkTC0QY5RjSM56QyQpbb2zXbRMf1BLE9h 7lOkj89n6yrb1g7sYGMj3hO6FhJt8SCllSEmk= 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; bh=No6+pF/29hbexfyxLIzSLoDPs3T39QBZzwsgULMLjzI=; b=V+IDN3udz0kM6XigGc5A4YcTEOOOqkdpzOq9LNL9cqwY3GhXx1RyMK3oYb2PX/P7mn u2RySFhIcfvhOOe3dAAahPb1okBK4yR+8kR6CffDAn0lyiAyRsNG0cwQWgy+MGM+2/G6 5T0QIBGW8sdpiuPhWj7cvn2oXV52/Io92P0hZhj2kI0sMDwW5JMUhP7ZWXKUG230N7XF AtyniD5QXaRhhkr0KbRirlfzA2IWxcs5VOdwKgkrwMoEt6fFZlVqEHbRNryWYLUuXCtU 329bVhlZdscqU7GjKk0hEK3LxIbYL/l5S+2Vamaf2+J5igsnAZ36WuuGKXzGNnfMTCQW Pflg== X-Gm-Message-State: APjAAAVp+GVUEivF4N0imKTBFpbIh8p1ssIj8kZqXLKH0A83DQQUDg3p aYtnCv7VwnHSXKjlGW1+SZRro3lA1uQ= X-Google-Smtp-Source: APXvYqyHk5wszacOXxFJy13iANAkqZjsEnRI8ddi99VniJ5LfU8EKyJIi6TsS/cwaTsfA3cedckmEw== X-Received: by 2002:a5d:480b:: with SMTP id l11mr36319687wrq.129.1577901014081; Wed, 01 Jan 2020 09:50:14 -0800 (PST) Received: from panicking.lan (93-46-124-24.ip107.fastwebnet.it. [93.46.124.24]) by smtp.gmail.com with ESMTPSA id r15sm6025085wmh.21.2020.01.01.09.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 09:50:13 -0800 (PST) From: Michael Trimarchi To: Shawn Guo Subject: [PATCH 2/2] crypto: caam - add clock entry for i.MX8MM Date: Wed, 1 Jan 2020 18:50:11 +0100 Message-Id: <20200101175011.1875-2-michael@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200101175011.1875-1-michael@amarulasolutions.com> References: <20200101175011.1875-1-michael@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200101_095019_316705_8616CB4E X-CRM114-Status: GOOD ( 14.94 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Aymen Sghaier , Herbert Xu , linux-amarula@amarulasolutions.com, Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add clock entry needed to support i.MX8MM. [ 1.040682] caam 30900000.crypto: Entropy delay = 3200 [ 1.045935] caam 30900000.crypto: Entropy delay = 3600 [ 1.118813] caam 30900000.crypto: Instantiated RNG4 SH0 [ 1.186476] caam 30900000.crypto: Instantiated RNG4 SH1 [ 1.191726] caam 30900000.crypto: device ID = 0x0a16040100000000 (Era 9) [ 1.198434] caam 30900000.crypto: job rings = 3, qi = 0 [ 1.222717] caam algorithms registered in /proc/crypto [ 1.231297] caam 30900000.crypto: caam pkc algorithms registered in /proc/crypto Signed-off-by: Michael Trimarchi --- drivers/crypto/caam/ctrl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index d7c3c3805693..ab8df3b550a7 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -99,10 +99,11 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc, if (ctrlpriv->virt_en == 1 || /* - * Apparently on i.MX8MQ it doesn't matter if virt_en == 1 + * Apparently on i.MX8MQ and i.MX8MM it doesn't matter if virt_en == 1 * and the following steps should be performed regardless */ - of_machine_is_compatible("fsl,imx8mq")) { + of_machine_is_compatible("fsl,imx8mq") || + of_machine_is_compatible("fsl,imx8mm")) { clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0); while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) && @@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = { { .soc_id = "i.MX6*", .data = &caam_imx6_data }, { .soc_id = "i.MX7*", .data = &caam_imx7_data }, { .soc_id = "i.MX8MQ", .data = &caam_imx7_data }, + { .soc_id = "i.MX8MM", .data = &caam_imx7_data }, { .family = "Freescale i.MX" }, { /* sentinel */ } };