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: 12787643 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EBA1C433F5 for ; Mon, 21 Mar 2022 20:07:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352902AbiCUUJT (ORCPT ); Mon, 21 Mar 2022 16:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232223AbiCUUJT (ORCPT ); Mon, 21 Mar 2022 16:09:19 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E7A3700F for ; Mon, 21 Mar 2022 13:07:50 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so217955wmb.4 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=qxh+efkGRl0xIyZe+XNkViQfSxVr6whTVFqs+NpXEuoqOjnZ1VNP2LxSkyZsfyHeHY a28Pq+6JdmhuNmApeZDtXYz3S1xFfxyZTMKGw0F5DzcmVy62Pw1windJASns2NSOSkRq 1AGMV+WWcIKG4dwcZGGZO393eTDprhnbw9wi1ocwpLHnz0k5bPMgDHAsCJDiLJe1AZqh P6XsCC250lgfKl9KPmiiuPl2uvQMizwr9Kvwkh3A9wkNV5DDpKdJlOD5czBphg9RkzhS l8kQX30BUe6BMSnQce7I2UBTKErA3T1ORERHSmA2apQdYKp5sBlUXCdLP7kC2yD8LscW fO5A== X-Gm-Message-State: AOAM530caBjtxr8IYYYV3bqdCCxgZJz+UDaBwAApCKI3onxr4qXP3X2g 2zvdfNl6JmJCdThmS9TeD1vo3w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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