Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2219718imw; Wed, 6 Jul 2022 02:06:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s6rV8Ian4m2YUWtHV2fkSaxAVEyo9syheK2NQaDf+UhD8S0rvzVEamg8ybeDcqTJe6Fs4Z X-Received: by 2002:a17:907:761c:b0:6d6:e553:7bd1 with SMTP id jx28-20020a170907761c00b006d6e5537bd1mr39070949ejc.5.1657098410248; Wed, 06 Jul 2022 02:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657098410; cv=none; d=google.com; s=arc-20160816; b=RlZUClxJhOhz9q63p7yyiK185RyG/rhOjJhhDfJOETG+aahSWNjuyGRL0YNgsNFuKx pXL5Q3NTzjiwc+WRkSUzo/5Q65M1lHFI6e3Sq63HI7NegzG60koCOULgwbL3HdHJUrFD UUUU42ROuZuMcgyFFgXNomMRHVLc3FqCQjq3gTJGzio7ETY4KtdhqtLRYg3gajmHnHlZ M5WtAlfEqHWicoEE5rwweteMS3DOpPjEc0zhDvwNbeg1TDJyPWPLXqjjFwq0P0n1bpG5 Smkbt7vDaXwKQ8GJ3qVBG/ADWWhWDisFoBvA0/nt3lJKOFQD+iqp4HML4P7vx1xeNGbN UYwA== 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:dkim-signature; bh=vTfn5kYTl3DZc1w6nMvn5z7ndGSpnwpZR54pnipxf4Q=; b=TGtWCwp14hHwC03PP/dyeh96vrY/nGg8z5mZ3HlCvYcWeylpFa0fOKK0lTyELq+fd3 uyZCpNHagpB1oxC2jMZouq6xCg7ZKpvw5ARZdjg6Jzuaz5pue2gLprUIPdMo8q59mQy5 eyFjAf+ZXuIszQtLkSHPjz4sGPPZ7NpRbn7RyITRAYVk4GWKEoohLuiTKFamegaH5CMG 3lYUTVDHEKl8r4OZyUY8Nb4ySciis1edJK2tIo4m5uDOVfCJBUwQK/HybGDuvQ4+YvEI J4+oD/Xssq90P9b3faYQ09l/PHCXUPAKx0bXt92AWdjon9msjPWfAAd+3svOJ5xTCGki OcDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="Jjg/2mnh"; 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 sh13-20020a1709076e8d00b0071114e6de39si13909800ejc.679.2022.07.06.02.06.25; Wed, 06 Jul 2022 02:06:50 -0700 (PDT) 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; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="Jjg/2mnh"; 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 S231991AbiGFJEi (ORCPT + 99 others); Wed, 6 Jul 2022 05:04:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231921AbiGFJEg (ORCPT ); Wed, 6 Jul 2022 05:04:36 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 983BC193D4 for ; Wed, 6 Jul 2022 02:04:34 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id cl1so21069278wrb.4 for ; Wed, 06 Jul 2022 02:04:34 -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=vTfn5kYTl3DZc1w6nMvn5z7ndGSpnwpZR54pnipxf4Q=; b=Jjg/2mnh6qjGyd5qZ24zbDEHD9i6Q0JFDZ1rSazDilSD76foKz0Sl5ZHUDvhdgMIdg NRtjoq58CVh3OoMenOr6Px3/4lT8tsXoa0ZALt4L0BPHg2WQcjqU9S/AAVqWnld0CDzk +0M3kfKvJsh7i7mGT6DCs8kxCVOdh+Kyp1VNS6qAnkuMWG9IQm1oOJ0BmmtMrcBjROOy HTPi4xo9HorrY5sq6Z3WV+qXww4xLr18bm4EhIy/LuQZpbtD3to4RsrFrzsOAxMZlAzq 3iCX+wcv0JwX37fzuarB8Ck5bHxe/KcXwkXQ29Vx+ghUOAqcVAlc/s+A9x1daKy0YCVr Ti/A== 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=vTfn5kYTl3DZc1w6nMvn5z7ndGSpnwpZR54pnipxf4Q=; b=XNMcPeaLZ4RU7+T6sBGz+3y+DdKERQj4XSMqShjRUO/ETC8giVXWJYWR5mv34lfsvz 8LPzpp+NiX3eD8F+0bE1MNL+Ol2OCc+VwledgfyLRt2kOaHFZsRfby+AVWS/Hp970iSM qgJMN9VE9HUFbo6t0Rg2oibwcJ7EKt2m9xT4lyIsMt5MX8ePcKh6PdY3dKZ7LTPD4jHn AWMsHAh1dHpwO4g27LLQHIZOWjEeNRf9FIJrLETUQKNd4MCOfycZ4DQgpWehUQBu1HGc Gpy7kp7tQ+Um/lFKMRehyEbqbC/5ExVIkTbVU8GbtaU8Gpj1gBh5BHj7IFHgHHoTb0D7 4uAg== X-Gm-Message-State: AJIora9cGI60PFVab1K+cZ/GRJaBCQpamroZg9BPQEwA6WZRIqBifbqi 0cRq2rrxefGpF7w8TS6qzlE1rw== X-Received: by 2002:adf:dc09:0:b0:218:5f6a:f5db with SMTP id t9-20020adfdc09000000b002185f6af5dbmr36466505wri.480.1657098273109; Wed, 06 Jul 2022 02:04:33 -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 v11-20020adfe28b000000b0021d6ef34b2asm5230223wri.51.2022.07.06.02.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 02:04:32 -0700 (PDT) From: Corentin Labbe To: heiko@sntech.de, herbert@gondor.apana.org.au, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, p.zabel@pengutronix.de, robh+dt@kernel.org, sboyd@kernel.org Cc: linux-rockchip@lists.infradead.org, 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, john@metanate.com, didi.debian@cknow.org, Corentin Labbe Subject: [PATCH v8 00/33] crypto: rockchip: permit to pass self-tests Date: Wed, 6 Jul 2022 09:03:39 +0000 Message-Id: <20220706090412.806101-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 and rk3399-khadas-edge-v with selftests (with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y) 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) Changes since v3: - full rewrite of support for RK3399 - splited dt-binding patch in two Changes since v4: - Another full rewrite of support for RK3399 - Fixed dt-binding from Krzysztof Kozlowski's comments - Use readl_poll_timeout() instead of read_poll_timeout() - Rewrite the fallback SG tests Changes since v5: - fixed errors in DT binding patch Change since v6: - remove quotes around const values in dt-bindings Changes since v7: - added lot of reviewed/tested by - In patch 14: keep initial reset pulse. Corentin Labbe (33): crypto: rockchip: use dev_err for error message about interrupt crypto: rockchip: do not use uninitialized 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 myself as maintainer crypto: rockchip: use read_poll_timeout crypto: rockchip: fix style issue crypto: rockchip: add support for rk3328 crypto: rockchip: rename ablk functions to cipher crypto: rockchip: rework rk_handle_req function crypto: rockchip: use a rk_crypto_info variable instead of lot of indirection crypto: rockchip: use the rk_crypto_info given as parameter dt-bindings: crypto: convert rockchip-crypto to YAML dt-bindings: crypto: rockchip: convert to new driver bindings clk: rk3399: use proper crypto0 name arm64: dts: rockchip: add rk3328 crypto node arm64: dts: rockchip: rk3399: add crypto node crypto: rockchip: store crypto_info in request context crypto: rockchip: Check for clocks numbers and their frequencies crypto: rockchip: rk_ahash_reg_init use crypto_info from parameter crypto: rockchip: permit to have more than one reset crypto: rockchip: Add support for RK3399 .../crypto/rockchip,rk3288-crypto.yaml | 133 +++++ .../bindings/crypto/rockchip-crypto.txt | 28 - MAINTAINERS | 7 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 11 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 20 + drivers/crypto/Kconfig | 15 + drivers/crypto/rockchip/rk3288_crypto.c | 506 ++++++++-------- drivers/crypto/rockchip/rk3288_crypto.h | 107 ++-- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 267 +++++---- .../crypto/rockchip/rk3288_crypto_skcipher.c | 543 ++++++++++-------- include/dt-bindings/clock/rk3399-cru.h | 6 +- 11 files changed, 955 insertions(+), 688 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml delete mode 100644 Documentation/devicetree/bindings/crypto/rockchip-crypto.txt -- 2.35.1