From patchwork Mon Mar 21 20:07:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 12787663 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 B64A2C4167B for ; Mon, 21 Mar 2022 20:09:14 +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=XhO+N1j/sbpoag6monfQ4D6Y18CEABmWhEg+4O8UCWo=; b=4KHfDwcbX7nf0h mLyQmE9kpHAV4K85ETBzx7SM/l3UOxqMTGsqXZiiBJlImLmxy4WVDttYOw7rLusGnnUtJWOnFiLGi IZtEFJgZsMbMpjmcnkWr1esC5b42lHan+yCVFIRsIFE83zU8wIo/pA6KxIhKqEIV5Otyv/kSeenMs Ia6tQsUdctA87gf4cM7dmP7RJlI5lSkQ5oQFEIleNdxL3qvSwdGF8HuJAbGYKwe8yB7kkKm+OEV75 kM1Aq/F2U4yz87uKxFa13y0mt8be0teJ9LW1+07Dq91PD0RgEspBZEKNRTnANqjIPHGO2b1S6NnrE IGyjvqERq5st14/B1B6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWOJo-008tTD-Rp; Mon, 21 Mar 2022 20:07:57 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWOJj-008tPa-LJ for linux-arm-kernel@lists.infradead.org; Mon, 21 Mar 2022 20:07:53 +0000 Received: by mail-wm1-x32f.google.com with SMTP id v130-20020a1cac88000000b00389d0a5c511so212415wme.5 for ; Mon, 21 Mar 2022 13:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hpGd4BgFciLAC/AOKn8WnKSRlZJshCJsO8rO8N9T8Mg=; b=V7cv1Gp5aYUibydiPpyC1iMAPbfElb1ADdcdh2NllNmvAz5EkPjMAvKfhwkfbY1IAd OXbsHhDDuxNxPSB2aUioeFasHP5Wzsq9zehd1ydDT/K7KZFV7rbFVPOneG4k8Qz3JWfp dVaY4fquxKPKPWmNOS1S4d/1SjqX66IvzwHmTJF+xGEJNEKU/c0o6Vh5X0dxBa/UD7MI u5g9nUMIo1/XMBeU293pMbxYl9aRpHQ5iysFjutGUsI6ivPRv5ELA3IWx6F177v4iGye cC5C6BnkB1YpuYYbuaIHZJ0VJ6lU8zP+4KoQe2RG1J+ryBwrum+OKcot28iki2N9IFlw Rfaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hpGd4BgFciLAC/AOKn8WnKSRlZJshCJsO8rO8N9T8Mg=; b=LfSYKAgkMZSeXsqbeksaihOi6Ngn1AIsAq00nuuh7LW7TXKJ0S0DaLC6xNh6aO5Gk2 6Isirpa4v4V74PsGnoQNy3WoNbpPQTdYObZBy1jVg0VCXV6+SZNOSDqxU2Cecmh5kg6j qo85RhuM6wQB0JOnywile1VMmnmukhCzHVh1BVMw3LeQwKRaMz5hKOaD/3DuDhdCOvSh uAnjZ21SOxGeXj8Mb7jjvFlcBHWp8+/lnk6I16J5Yd5di5iJwIJtVYVVI1732+Alczvl hHsLOh23zcx1Gyplb3gwVJpL1jfb1SpcM8L0s3yICPzBp1uKTbrvvu14zX/hu4qX94Y1 fvtw== X-Gm-Message-State: AOAM53360WZBxW1XmdrZ0/M5C/UWZTljTu2qEHRSeoJvK73Rou1A0BHV yftlNat8bg7z1gV3Kf7A9NiKOg== X-Google-Smtp-Source: ABdhPJwZTaaNTA/qSdU39RAezvG8FUGCtvMy8rvdvR8ZMrlNQk+E0JLW8u50BBVObfgDdD/uXVdHNA== X-Received: by 2002:a05:600c:3c9d:b0:37f:a5c3:fccf with SMTP id bg29-20020a05600c3c9d00b0037fa5c3fccfmr669083wmb.13.1647893268904; Mon, 21 Mar 2022 13:07:48 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id i14-20020a0560001ace00b00203da1fa749sm24426988wry.72.2022.03.21.13.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 13:07:48 -0700 (PDT) From: Corentin Labbe To: heiko@sntech.de, herbert@gondor.apana.org.au, krzk+dt@kernel.org, mturquette@baylibre.com, robh+dt@kernel.org, sboyd@kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Corentin Labbe Subject: [PATCH v3 00/26] crypto: rockchip: permit to pass self-tests Date: Mon, 21 Mar 2022 20:07:13 +0000 Message-Id: <20220321200739.3572792-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220321_130751_736458_CD1E7C6F X-CRM114-Status: GOOD ( 14.52 ) 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 Hello The rockchip crypto driver is broken and do not pass self-tests. This serie's goal is to permit to become usable and pass self-tests. This whole serie is tested on a rk3328-rock64, rk3288-miqi with selftests (with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y) The serie is also tested on a rk3399 by Hugh Cole-Baker Regards Changes since v1: - select CRYPTO_ENGINE - forgot to free fallbacks TFMs - fixed kernel test robots warning - add the PM patch Changes since v2: - Added DMA clock back to 3288 since it dont work without it - fallback needed to select CBC and ECB configs - Added support for rk3399 - Added more patch (style, read_poll_timeout) Corentin Labbe (26): crypto: rockchip: use dev_err for error message about interrupt crypto: rockchip: do not use uninit variable crypto: rockchip: do not do custom power management crypto: rockchip: fix privete/private typo crypto: rockchip: do not store mode globally crypto: rockchip: add fallback for cipher crypto: rockchip: add fallback for ahash crypto: rockchip: better handle cipher key crypto: rockchip: remove non-aligned handling crypto: rockchip: rework by using crypto_engine crypto: rockchip: rewrite type crypto: rockchip: add debugfs crypto: rockchip: introduce PM crypto: rockchip: handle reset also in PM crypto: rockchip: use clk_bulk to simplify clock management crypto: rockchip: add support for r3399 clk: rk3399: use proper crypto0 name arm64: dts: rockchip: rk3399: add crypto node arm64: dts: rockchip: add rk3328 crypto node ARM: dts: rk3288: crypto does not need reset-names anymore dt-bindings: crypto: convert rockchip-crypto to yaml crypto: rockchip: add support for rk3328 crypto: rockchip: Check for maximum frequency of clocks crypto: rockchip: add myself as maintainer crypto: rockchip: fix style issue crypto: rockchip: use read_poll_timeout .../bindings/clock/qcom,gcc-other.yaml | 2 +- .../crypto/rockchip,rk3288-crypto.yaml | 84 +++ .../bindings/crypto/rockchip-crypto.txt | 28 - MAINTAINERS | 7 + arch/arm/boot/dts/rk3288.dtsi | 1 - arch/arm64/boot/dts/rockchip/rk3328.dtsi | 10 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 + drivers/crypto/Kconfig | 15 + drivers/crypto/rockchip/rk3288_crypto.c | 498 ++++++++---------- drivers/crypto/rockchip/rk3288_crypto.h | 109 ++-- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 274 ++++++---- .../crypto/rockchip/rk3288_crypto_skcipher.c | 480 ++++++++++------- include/dt-bindings/clock/rk3399-cru.h | 6 +- 13 files changed, 880 insertions(+), 646 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml delete mode 100644 Documentation/devicetree/bindings/crypto/rockchip-crypto.txt