From patchwork Mon Oct 31 20:06:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jayesh Choudhary X-Patchwork-Id: 13026308 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1E9B4FA3741 for ; Mon, 31 Oct 2022 20:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=QgURhFquC0wsDC9twTuVWaMI7Cs1Q2Qn39pyxw3q4Yw=; b=okpx0t3tS666Wz bvLVwnMvuVF+rdcLtm35dUc9+DJFOVFXU1qCVbL/NRsSloJy5x9q2kXci7lXgpZD+MIXRGB/BFgeR YXOocpLOxsFptaYlyhymxUeOL+IcytyI809QzBM68nf/xoQvI9Quic+8psGc9czytfpHy36VgHiVd 9/ms3L/kffCZf8NvzZqBa0nkAkpctNz8B5FvNwleXYPvRCxYB2Ean/on/HFrpApHqRX1pvHfNjrJJ a7V+VMhNnKqUF2kS+b1mRUdeq7Id3Dr2AlSREcsinUU0mdNsfGgX/M61hAJEFK2CwyD/81sizPTd3 DypsdWnlrKRcX5z0H/nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opb3b-00F48k-Ul; Mon, 31 Oct 2022 20:06:52 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opb3Y-00F47j-8v for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 20:06:49 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29VK6aAg054756; Mon, 31 Oct 2022 15:06:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667246796; bh=e8QC9EQqOqeUI8BDYW1Gjrl96J62w1MR4bj6r4Ykpcs=; h=From:To:CC:Subject:Date; b=Yg/YRB4qey3u+029Ya8rHITuNVdsVIQIIlXVuyMLjfCtmunIgBwLyzCg3kWPg0Sru /n+6hS0yCmL/Irp4wyTSInr7dYhnZ6rFAd9+85aN8HhFdzE9xx6bdOha8uX3qx8zHN tZLp4cFg0u/+JwrW5msB3AmYowtDBZNEjyXOmMng= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29VK6asO028332 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Oct 2022 15:06:36 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Mon, 31 Oct 2022 15:06:35 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Mon, 31 Oct 2022 15:06:35 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29VK6Y5r086877; Mon, 31 Oct 2022 15:06:35 -0500 From: Jayesh Choudhary To: , CC: , , , , , , , Subject: [PATCH v3] arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator Date: Tue, 1 Nov 2022 01:36:33 +0530 Message-ID: <20221031200633.26997-1-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_130648_406361_A635835E X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the node for SA2UL for supporting hardware crypto algorithms, including SHA1, SHA256, SHA512, AES, 3DES and AEAD suites. Add rng node for hardware random number generator. Signed-off-by: Jayesh Choudhary Acked-by: Matt Ranostay Acked-by: Andrew Davis Reviewed-by: Manorit Chawdhry --- Changes have been tested on local j721s2-evm board. Tcrypt tests and crypto self-tests were passing. Changelog v2 -> v3: - remove the clock property from rng node () Changelog v1 -> v2: - change the TI_SCI flag from shared to exclusive as OP-TEE uses MCU domain SA2UL instance and not the main domain instance - remove the 'dma-coherent' property (Binding changes are merged) - add the rng node which can be used as well for hwrng along with optee-rng v2 patch: https://lore.kernel.org/all/20221031135416.350010-1-j-choudhary@ti.com/ Testing log: https://gist.github.com/Jayesh2000/26acf0e63f7edcd4b267122e4c73b9a8 arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi index d1ec26110376..2e0ba2262e77 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi @@ -72,6 +72,25 @@ main_pmx0: pinctrl@11c000 { pinctrl-single,function-mask = <0xffffffff>; }; + main_crypto: crypto@4e00000 { + compatible = "ti,j721e-sa2ul"; + reg = <0x00 0x4e00000 0x00 0x1200>; + power-domains = <&k3_pds 297 TI_SCI_PD_EXCLUSIVE>; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x00 0x04e00000 0x00 0x04e00000 0x00 0x30000>; + + dmas = <&main_udmap 0xca40>, <&main_udmap 0x4a40>, + <&main_udmap 0x4a41>; + dma-names = "tx", "rx1", "rx2"; + + rng: rng@4e10000 { + compatible = "inside-secure,safexcel-eip76"; + reg = <0x0 0x4e10000 0x0 0x7d>; + interrupts = ; + }; + }; + main_uart0: serial@2800000 { compatible = "ti,j721e-uart", "ti,am654-uart"; reg = <0x00 0x02800000 0x00 0x200>;