Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1876119rwb; Tue, 29 Nov 2022 21:56:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf6LoP+tCYqIwB3purwdBOyCsFeyMMfaFvniu6BJB+yr6wpp7ZkwFwxwtCPk0fQRg/7X2CWA X-Received: by 2002:a17:903:2591:b0:179:e1f6:d24d with SMTP id jb17-20020a170903259100b00179e1f6d24dmr40703102plb.91.1669787810825; Tue, 29 Nov 2022 21:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669787810; cv=none; d=google.com; s=arc-20160816; b=Lfb8XrLER1ioxqFnrMSN47hilrqfK2b46VnQKKuQEt/FapHPenwUfbep/gFajIDzQA n9H3Nc1NzVParMyFtFAXkciDfDgcFDZACiGDpOPCB1Xnsu/Y9nhERLTr1vxEcnsj2moR wxhyrs4xDWdmiNW3lmijuL3mNCxkOQFmjpdFNfuFyKvLlQfXBjnqkEe9kaGode+WPw6o ohHqYbrSw++Mud55ofJ6kWkQpTRlSB8I3PDrjr5+bD0SLvt1yJUnRrcr/GYtRj46pVBP DVi7KvLID/Rqss7fRdgYvFQWkQWs4ON+6qVS8jy2l8x0PZ9r93osaIOnqpNmslh3Df7+ Ixdw== 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 :message-id:date:subject:cc:to:from; bh=fukM/aisIeIxcQ6sGkXBC2MHZiX+Gy0irgywCZL4km0=; b=wfuK/xX2ihP2KWWVLjSnyg/AIfHhcGv5OJ/UQ6PdPrbgOG258gGaPk8rfBmdYSUPAP vQN1MIU1Q+HYHlTA8GC/Bqftfk5/SxYglAcQS6z+CauKpuxrxndC8p0kJwLT9zJWlXNg 8ofp2wQuMFGbqTPJdEBS3DWUKYhCtYFxkIOq6AdlhH9cTV/Th11+yW2i5s311oZfFnKU g4OhVitpBqEcNfKo9qwYbk37NDhz16X2OwLWTN0rj6LOGxjfvI02tJ0dyko7SbXRg6IP PJCq5tkqyag3dCcaZvZx+/I0765uTY70RHHqc5v8CFwZwwORp5YnCLskbT2hwx5++RtA hx6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a056a001a8800b0054307ac90f1si830856pfv.319.2022.11.29.21.56.36; Tue, 29 Nov 2022 21:56:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233705AbiK3Fz3 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 30 Nov 2022 00:55:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233039AbiK3Fz2 (ORCPT ); Wed, 30 Nov 2022 00:55:28 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93AF9654D6; Tue, 29 Nov 2022 21:55:27 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 1CEE524E0AC; Wed, 30 Nov 2022 13:52:21 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:21 +0800 Received: from ubuntu.localdomain (202.188.176.82) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:17 +0800 From: Jia Jie Ho To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski CC: , , , , Jia Jie Ho Subject: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine Date: Wed, 30 Nov 2022 13:52:08 +0800 Message-ID: <20221130055214.2416888-1-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch series adds kernel driver support for Starfive crypto engine. The engine supports hardware acceleration for HMAC/hash functions, AES block cipher operations and RSA. The first patch adds basic driver for device probe and DMA init. The subsequent patches adds supported crypto primitives to the driver which include hash functions, AES and RSA. Patch 5 adds documentation to describe device tree bindings and the last patch adds device node to VisionFive 2 dts. The driver has been tested with crypto selftest and additional test. This patch series depends on the following patches: https://patchwork.kernel.org/project/linux-riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ https://patchwork.kernel.org/project/linux-riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ Jia Jie Ho (6): crypto: starfive - Add StarFive crypto engine support crypto: starfive - Add hash and HMAC support crypto: starfive - Add AES skcipher and aead support crypto: starfive - Add Public Key algo support dt-bindings: crypto: Add bindings for Starfive crypto driver riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 .../bindings/crypto/starfive-crypto.yaml | 109 ++ MAINTAINERS | 7 + .../jh7110-starfive-visionfive-v2.dts | 8 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/starfive/Kconfig | 20 + drivers/crypto/starfive/Makefile | 4 + drivers/crypto/starfive/starfive-aes.c | 1723 +++++++++++++++++ drivers/crypto/starfive/starfive-cryp.c | 324 ++++ drivers/crypto/starfive/starfive-hash.c | 1152 +++++++++++ drivers/crypto/starfive/starfive-pka.c | 683 +++++++ drivers/crypto/starfive/starfive-regs.h | 200 ++ drivers/crypto/starfive/starfive-str.h | 194 ++ 14 files changed, 4462 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/starfive-crypto.yaml create mode 100644 drivers/crypto/starfive/Kconfig create mode 100644 drivers/crypto/starfive/Makefile create mode 100644 drivers/crypto/starfive/starfive-aes.c create mode 100644 drivers/crypto/starfive/starfive-cryp.c create mode 100644 drivers/crypto/starfive/starfive-hash.c create mode 100644 drivers/crypto/starfive/starfive-pka.c create mode 100644 drivers/crypto/starfive/starfive-regs.h create mode 100644 drivers/crypto/starfive/starfive-str.h -- 2.25.1