From patchwork Mon Jan 30 15:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JiaJie Ho X-Patchwork-Id: 4720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2250849wrn; Mon, 30 Jan 2023 07:47:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvX/WXEd1iXfoKOk+EktT984C1eA+WLLQMzDh34GcbjS4GUZ67algY90DmY5KhCg031yeHK X-Received: by 2002:a17:907:d049:b0:840:604:1da1 with SMTP id vb9-20020a170907d04900b0084006041da1mr60404227ejc.61.1675093626171; Mon, 30 Jan 2023 07:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675093626; cv=none; d=google.com; s=arc-20160816; b=t9jNUc+appT/2E5R5xSRwN0dhPznfO7bb3h45ZzAD3fAB+ew2U29F1br5VslxiFYxr Mpj04KFR+4mBs8YQv/j5PI0wzKSbTfAAxKEN9YLfoisfQn2CkY+ezFzH+8JspaUMFENH bMOaccmzBq6XkHv9nhdM3pLK/nwlURF7i/gYWr1W5y8YxollQ8JnqQ7RZqTN73B8UjzB Ks7UWSKLEDC6Ew/OFHPQz2R90aHTM4Mmj2tJn5D4rMSP1RdmMuzsnTZVXKcZwbsVGoOr g+8v7zOOMmszDN84aCCqL9Q8xwAblYUearPyeB3bakCmSlJ/W45jxeGuSXgMTNpQg045 IN1g== 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=02tYjyivEhQDUnLYKHNo/9hSykCKc32goV8JgZsi/MM=; b=CVxYAAhO6ApLdJN/GuoZVYT2ZDG396yFCpcbcmJBAiP/L6FhPq4xN3/Rxi98hfdDq+ MWGhfZEHh8UTOMyHK/utrNfceYaEnEWv0l3pcVyWmDbjmuT3djbG03YGUPqwSqPolPAz OKeUxCn4LnMRFrxKUDPmRpI9zB2UaF51035ZTFIJEWkWbKfQzrOjUN7k8JqkwiK6ATvw avCBmj1yJ27DADEgTC2HZiBOO42gaIZqB/zogBx/OIJ8nbTzmIGXaVWHGQ5WJy/oEDXA 5grXozFgaEeYkurOKX3KjYIeF4VTlh0QzKez5tTw2gV82pH0gSCWXZ0uMZDqSkD9XOdb VLPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 18-20020a170906011200b0087879f8c291si12978463eje.703.2023.01.30.07.46.42; Mon, 30 Jan 2023 07:47:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236884AbjA3Pou convert rfc822-to-8bit (ORCPT + 99 others); Mon, 30 Jan 2023 10:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbjA3Pot (ORCPT ); Mon, 30 Jan 2023 10:44:49 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB05E3EC74; Mon, 30 Jan 2023 07:44:44 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 7455F24E02F; Mon, 30 Jan 2023 23:44:35 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 30 Jan 2023 23:44:35 +0800 Received: from ubuntu.localdomain (202.190.105.77) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 30 Jan 2023 23:43:07 +0800 From: Jia Jie Ho To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley CC: , , , Subject: [PATCH v2 0/4] crypto: starfive - Add drivers for crypto engine Date: Mon, 30 Jan 2023 23:42:38 +0800 Message-ID: <20230130154242.112613-1-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [202.190.105.77] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756462974081035992?= X-GMAIL-MSGID: =?utf-8?q?1756462974081035992?= This patch series adds kernel driver support for StarFive JH7110 crypto engine. The first patch add Documentations for the device and Patch 2 adds device probe and DMA init for the module. Patch 3 adds crypto and DMA dts node for VisionFive 2 board. Patch 4 adds hash/hmac support to the module. Patch 3 needs to be applied on top of: https://patchwork.kernel.org/project/linux-riscv/patch/20221220011247.35560-7-hal.feng@starfivetech.com/ https://patchwork.kernel.org/project/linux-riscv/cover/20230120024445.244345-1-xingyu.wu@starfivetech.com/ Changes v1->v2: - Fixed yaml filename and format (Krzysztof) - Removed unnecessary property names in yaml (Krzysztof) - Moved of_device_id table close to usage (Krzysztof) - Use dev_err_probe for error returns (Krzysztof) - Dropped redundant readl and writel wrappers (Krzysztof) - Updated commit signed offs (Conor) - Dropped redundant node in dts, module set to on in dtsi (Conor) Jia Jie Ho (4): dt-bindings: crypto: Add StarFive crypto module crypto: starfive - Add crypto engine support riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 crypto: starfive - Add hash and HMAC support .../crypto/starfive,jh7110-crypto.yaml | 70 ++ MAINTAINERS | 7 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 27 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/starfive/Kconfig | 20 + drivers/crypto/starfive/Makefile | 4 + drivers/crypto/starfive/starfive-cryp.c | 238 ++++ drivers/crypto/starfive/starfive-hash.c | 1095 +++++++++++++++++ drivers/crypto/starfive/starfive-regs.h | 71 ++ drivers/crypto/starfive/starfive-str.h | 99 ++ 11 files changed, 1633 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/starfive,jh7110-crypto.yaml create mode 100644 drivers/crypto/starfive/Kconfig create mode 100644 drivers/crypto/starfive/Makefile 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-regs.h create mode 100644 drivers/crypto/starfive/starfive-str.h