Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8695398ybn; Tue, 1 Oct 2019 11:42:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxt1KoWgp6YWpztmfd2/KdDmi/VnqyeUskBsYtqJVPjR44CZscpE+b743T25vY9DvdXq5w+ X-Received: by 2002:a05:6402:13c2:: with SMTP id a2mr19635564edx.21.1569955362923; Tue, 01 Oct 2019 11:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569955362; cv=none; d=google.com; s=arc-20160816; b=Ljuu5/0WIcANfPIG13IVsjSAmEdIZAjPVRzh7V5rsdd9CteFubR4iXGFVNSaXUHVzE QVIQojWelEEHCMIncGDYXk/TtLbZhtLElP+7ixj878Ijjg/4m/3arG4qJDPmSmAP76Bl +lN9GbmRL6/bu8chF6Myedk1hSlAzdOVns3C7bb2/ruMHFfIaVvdEz/8xJFtd08ypUon +dGQdnKXhHeiYQY3UI7KmoZdNw+mu2/1/04x1n01dMjHEJ5epzfChUBx4S5jXVWc3r2s nNJVBiP4GaKpooZ/SXWREPnucaXabAsyhC3VVH474BPU+48xWgHnwAC7hAf0UhbCTXiY jd6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=STXkb4MVHhVAQzYyM+4y1Q3Kk/1cjA4qQtSJlwmzAqU=; b=Dca4WbSI86TlYn/bvn+A3XqQKo3i/J5MAFBza2LUViKOt1SnHRCeuZF9h+3TGUg3Mb FZTGE0cjzI49Ij70rNo7p0HG60XyGmHpzjOsfSOcHesdDppsX9s3W7J/FQAs/ToPHxur qzMLepPhw3o+PlCxfqVzo+Lf/GM4zd8K/vbQP1shXXLDK9UbnxX17QaawW2JQBB9sjw2 YXdGIKyNcDTQ1lk501WiXosFHoa4TuLdn6soAv8sTyaJx9DQ/OVpW38+OVyx+CiiJZal F19EGM9OzuQ5mi6j6v8ioQqeScz+4zdEYOjjrBKsU0OVW++JVDF3IsIllwX3ViHYlQ2G TnEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHyyBDtM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33si10009798eda.205.2019.10.01.11.42.18; Tue, 01 Oct 2019 11:42:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHyyBDtM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbfJASlt (ORCPT + 99 others); Tue, 1 Oct 2019 14:41:49 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50553 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfJASlt (ORCPT ); Tue, 1 Oct 2019 14:41:49 -0400 Received: by mail-wm1-f66.google.com with SMTP id 5so4524934wmg.0; Tue, 01 Oct 2019 11:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=STXkb4MVHhVAQzYyM+4y1Q3Kk/1cjA4qQtSJlwmzAqU=; b=BHyyBDtMzSMDoIq0VR0HKtZakAzC6Et0ZbNgrBJ2DhqJF/XyaG79V6/rotfG7EH1YV AbQjHWydZG28xB27MA3rFKI2K78Rmt1F4QkvkgI7bgrJksiwBIf1tXJDeVIGz96LHXRx smLUtt76R3MEJslNjAtnCjgIYKkE5vmdg0+KWQohRholKmOOog29mnqY2a5RsQ2LXgc4 4Jdm2D4VkM8DaKgpbejTPJZlTt3eztihy5aTD+m6lBsfgl+r82Nk+6++rHqQrgxg/tig AghUukU9sO43QsmVvEI2uGn2sPOgNfnqdlTWsU+MrlDrf9B2ncyx/pyuRkm/vvYVeL39 711Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=STXkb4MVHhVAQzYyM+4y1Q3Kk/1cjA4qQtSJlwmzAqU=; b=JiiPxpdDaYa99BJiDS2L50Yc7dGjtCtnH1b+uPqbLaKQeMr7prLYOcv/5Xe8g6dWtF Zk+1w2+fcUIffwwZ/yl8uq+CWTaNDnauVl89Ab/2RIcqsBwuVPW3dn+rRZhOoben+ia9 bownUIapvYOP6TB4whCKZ1wJdoKbBP0xR5eCudOpdsMBXKq2n2h9oFiOrJVe2FG5VMDX fpX26TPJ0eBf5L9EiYNrZAe0Vd6w3xntOyqXDJDFvfRK0sl2mxZFp/Xi1gUQbTzYqnZv ZvuWDy32a1Z5ACmJ7JAd9OKwrxzmMyQl20WUIjrqtfzLR2PBiHA9WnHs+4m9vOYzm8vf qa6Q== X-Gm-Message-State: APjAAAVSx/+5bxIm++2Vib1b8z7degXw0NXkkGNo5ZYvJ/Cz7cEQJ9Dn Qc4JntJjTQeMLdXRs2ijDl8= X-Received: by 2002:a1c:f416:: with SMTP id z22mr4873592wma.19.1569955305894; Tue, 01 Oct 2019 11:41:45 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id n8sm6788987wma.7.2019.10.01.11.41.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Oct 2019 11:41:44 -0700 (PDT) From: Corentin Labbe To: catalin.marinas@arm.com, davem@davemloft.net, herbert@gondor.apana.org.au, linux@armlinux.org.uk, mark.rutland@arm.com, mripard@kernel.org, robh+dt@kernel.org, wens@csie.org, will@kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v2 00/11] crypto: add sun8i-ce driver for Allwinner crypto engine Date: Tue, 1 Oct 2019 20:41:30 +0200 Message-Id: <20191001184141.27956-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello This patch serie adds support for the Allwinner crypto engine. The Crypto Engine is the third generation of Allwinner cryptogaphic offloader. The first generation is the Security System already handled by the sun4i-ss driver. The second is named also Security System and is present on A80 and A83T SoCs, originaly this driver supported it also, but supporting both IP bringing too much complexity and another driver (sun8i-ss) will came for it. For the moment, the driver support only DES3/AES in ECB/CBC mode. Patchs for CTR/CTS/XTS, RSA and RNGs will came later. This serie is tested with CRYPTO_MANAGER_EXTRA_TESTS and tested on: sun50i-a64-bananapi-m64 sun50i-a64-pine64-plus sun50i-h5-libretech-all-h3-cc sun50i-h6-pine-h64 sun8i-h2-plus-libretech-all-h3-cc sun8i-h2-plus-orangepi-r1 sun8i-h2-plus-orangepi-zero sun8i-h3-libretech-all-h3-cc sun8i-h3-orangepi-pc sun8i-r40-bananapi-m2-ultra Regards Changes since v1: - Add sun4i-ss to allwinner directory - Cleaned variant structure - Renamed clock name from ahb to bus (and mbus to ram) - Fixed DT bindings problem reported by mripard - Cleaned unneeded status = "" in R40 DT - Removed old unnecessary interrupt_names in A64 DT - Added arm64 defconfig - Added support for PM functions - Splitted probe functions - Reworked clock settings - made reset mandatory Corentin Labbe (11): crypto: Add allwinner subdirectory crypto: Add Allwinner sun8i-ce Crypto Engine dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine ARM: dts: sun8i: R40: add crypto engine node ARM: dts: sun8i: H3: Add Crypto Engine node ARM64: dts: allwinner: sun50i: Add Crypto Engine node on A64 ARM64: dts: allwinner: sun50i: Add crypto engine node on H5 ARM64: dts: allwinner: sun50i: Add Crypto Engine node on H6 sunxi_defconfig: add new Allwinner crypto options arm64: defconfig: add new Allwinner crypto options crypto: sun4i-ss: Move to Allwinner directory .../bindings/crypto/allwinner,sun8i-ce.yaml | 92 +++ MAINTAINERS | 4 +- arch/arm/boot/dts/sun8i-h3.dtsi | 11 + arch/arm/boot/dts/sun8i-r40.dtsi | 10 + arch/arm/configs/sunxi_defconfig | 2 + arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10 + arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 11 + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 + arch/arm64/configs/defconfig | 2 + drivers/crypto/Kconfig | 28 +- drivers/crypto/Makefile | 2 +- drivers/crypto/allwinner/Kconfig | 60 ++ drivers/crypto/allwinner/Makefile | 2 + .../{sunxi-ss => allwinner/sun4i-ss}/Makefile | 0 .../sun4i-ss}/sun4i-ss-cipher.c | 0 .../sun4i-ss}/sun4i-ss-core.c | 0 .../sun4i-ss}/sun4i-ss-hash.c | 0 .../sun4i-ss}/sun4i-ss-prng.c | 0 .../sun4i-ss}/sun4i-ss.h | 0 drivers/crypto/allwinner/sun8i-ce/Makefile | 2 + .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 410 +++++++++++ .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 666 ++++++++++++++++++ drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 259 +++++++ 23 files changed, 1552 insertions(+), 29 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml create mode 100644 drivers/crypto/allwinner/Kconfig create mode 100644 drivers/crypto/allwinner/Makefile rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/Makefile (100%) rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/sun4i-ss-cipher.c (100%) rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/sun4i-ss-core.c (100%) rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/sun4i-ss-hash.c (100%) rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/sun4i-ss-prng.c (100%) rename drivers/crypto/{sunxi-ss => allwinner/sun4i-ss}/sun4i-ss.h (100%) create mode 100644 drivers/crypto/allwinner/sun8i-ce/Makefile create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h -- 2.21.0