Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp768658pxk; Sun, 30 Aug 2020 23:35:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxQOKPCTVFh83PM84t6aJB80MkiMTz/UKT1AAA/P/sRP8SucuTul2GoSe3SVlAnlryTwON X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr10707030ejb.286.1598855746679; Sun, 30 Aug 2020 23:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598855746; cv=none; d=google.com; s=arc-20160816; b=CeQasEuv5CJs55OFaK3BQ+6NGeCOBJBjXbgfhYLkoIfl32YIKgc/DDVsSM/FzWP0c+ KRL/xq6x0+hUqdIQrthTB/m4sl9x2VlA0qXbhGELvlMs378gRLDO4b3Zj7nZ/JleRPbJ V34bOwD+jgvApqIP+2nmxux80mvok/Ox68UBxHPYSeb3+zW4LTdMI7XHGWil1Bwvo5PC W8xfNh3Uwd124xiDG/W8+c9Mg0Q+zTH4Hma6+K5VLDQmQWjD5opV1tidWE/krudPRdL5 XRADYBZxdaFOOb4+afxwLfrKhnEzPty5sv2kF6HuH1QNszybPXC74u7y1eaXGLiIMdRI zXIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZP1iGX70R6WBiUNO1tOXFyMcuHcjl1P18JgeTI2dD4c=; b=eHyodHhirsp87++YEmIrOs00dsHdQVSANliN7irHI4eHc7zrcJsRk41aB9q4ZY1aor 7TMs3YxqeueRb1AF0XlncKyxiL8iSNOJfRUd6EmJhvVY0mTjEUupt0RtRhyn81rULHss fAGlJ3FDonMWAcbl0+gyGqNxFrnuD68CrsFOSC4kivyNfsP76RP99ags8yIhhN7pGAJ0 W6YwGh9spb390BLl028u6+xDfippZmEMMus/RVPhLGKHYp0IP8pj+iPPfo8TZvfqsjlV EJNhE9W3eUmw0V+KdxRlvSg34Wo2R/LO2//duf2gW4w5iwDt32diLuV0ZvYOBFmqj2Se JpdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GJ8cF7PT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d8si4522229edu.63.2020.08.30.23.35.23; Sun, 30 Aug 2020 23:35:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GJ8cF7PT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726573AbgHaGeh (ORCPT + 99 others); Mon, 31 Aug 2020 02:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgHaGea (ORCPT ); Mon, 31 Aug 2020 02:34:30 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 822CAC061573; Sun, 30 Aug 2020 23:34:30 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id q9so4279963wmj.2; Sun, 30 Aug 2020 23:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZP1iGX70R6WBiUNO1tOXFyMcuHcjl1P18JgeTI2dD4c=; b=GJ8cF7PTYPGqReRtR4re5LgMZeUffjNB2POodeR5VWXtozhKn1QnVm9UGIGIV/YDGn ECBu6Ltxw/XVa/OG3q/hSDF/cr+L26H5usMZQW7NC4tHUeoVUH+X5a1csICElBJWDXWD xjJoW/3lKtyLLjDx/53+ZgW9pPYDJ2allVLRY4aWJTfTiE0VNdODR2Lh/Zbx5X+3RsxJ A7+Hlzv1lQfF/H3InZltg1ePkJcbEfF1a8y7DgL2xCLAzfhhuyA5Hr+C5cJQEjq6gaZb pIYQhjUPMmOKyYSlJMNT9+jSpvpgwLjjEgiBWOjhEQ9O04H1IVlg36iBUqoe83jl+ipQ stxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZP1iGX70R6WBiUNO1tOXFyMcuHcjl1P18JgeTI2dD4c=; b=jVTJk/xFmklqWLoqimhCS7bcDdCI4jDS89LAXA5q8v9lkDokOEaoogjOAOY8CxgAJB wqN5yQYZc0hDKbZK7e6wxKJfHX8U0M3taJHXVVZCjnyGYZT2benlJAYBgHtDl3hiDeop BiWrwxlAqnAhJBG+aqr57xLC48PaeENzzM5DWpFajXLl5ET5AMqBNminSeqVgQIDddg2 dqi//gaK5YWbqvGtMR6ALTwaUoxAzbDfAl+ETMxetnbbiXXDNtPeQuOY7KIil/ZxxeFX rISlSXYfDJ76uAV81FOzW9rFnoz46tJfH4AY5Q2waREmCzpH9bwfG9jYjONrJby88mpY M6vw== X-Gm-Message-State: AOAM530BwpQF6d4rx9epPvvxnast+hh088eiuBhDiLhuy2asZjZlnlNV gu8LhPwVzGgE1SfeMMXfvr5z94Q4fvE= X-Received: by 2002:a1c:4054:: with SMTP id n81mr269837wma.81.1598855668861; Sun, 30 Aug 2020 23:34:28 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id f6sm11682451wme.32.2020.08.30.23.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 23:34:28 -0700 (PDT) Date: Mon, 31 Aug 2020 08:34:26 +0200 From: Corentin Labbe To: Martin Cerveny Cc: davem@davemloft.net, herbert@gondor.apana.org.au, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: dts: sun8i: v3s: Enable crypto engine Message-ID: <20200831063426.GA18853@Red> References: <20200827180027.6254-1-m.cerveny@computer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827180027.6254-1-m.cerveny@computer.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 08:00:27PM +0200, Martin Cerveny wrote: > V3S contains crypto engine that is compatible with "sun4i-ss". > > Tested-by: Martin Cerveny > Signed-off-by: Martin Cerveny > --- > .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 ++++- > arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++++++++++ > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 +++++++ > 3 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml > index fc823572b..180efd13a 100644 > --- a/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml > @@ -25,6 +25,7 @@ properties: > - const: allwinner,sun4i-a10-crypto > - items: > - const: allwinner,sun8i-a33-crypto > + - const: allwinner,sun8i-v3s-crypto > > reg: > maxItems: 1 > @@ -59,7 +60,9 @@ if: > properties: > compatible: > contains: > - const: allwinner,sun6i-a31-crypto > + oneOf: > + - const: allwinner,sun6i-a31-crypto > + - const: allwinner,sun8i-v3s-crypto > > then: > required: > diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi > index e5312869c..4fec84c40 100644 > --- a/arch/arm/boot/dts/sun8i-v3s.dtsi > +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi > @@ -234,6 +234,16 @@ > #size-cells = <0>; > }; > > + crypto: crypto@1c15000 { > + compatible = "allwinner,sun8i-v3s-crypto"; > + reg = <0x01c15000 0x1000>; > + interrupts = ; > + clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>; > + clock-names = "ahb", "mod"; > + resets = <&ccu RST_BUS_CE>; > + reset-names = "ahb"; > + }; > + > usb_otg: usb@1c19000 { > compatible = "allwinner,sun8i-h3-musb"; > reg = <0x01c19000 0x0400>; > diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c > index a2b67f7f8..d24496cac 100644 > --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c > +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c > @@ -31,6 +31,10 @@ static const struct ss_variant ss_a33_variant = { > .sha1_in_be = true, > }; > > +static const struct ss_variant ss_v3s_variant = { > + .sha1_in_be = true, > +}; > + > static struct sun4i_ss_alg_template ss_algs[] = { > { .type = CRYPTO_ALG_TYPE_AHASH, > .mode = SS_OP_MD5, > @@ -505,6 +509,9 @@ static const struct of_device_id a20ss_crypto_of_match_table[] = { > { .compatible = "allwinner,sun8i-a33-crypto", > .data = &ss_a33_variant > }, > + { .compatible = "allwinner,sun8i-v3s-crypto", > + .data = &ss_v3s_variant > + }, > {} > }; > MODULE_DEVICE_TABLE(of, a20ss_crypto_of_match_table); > -- > 2.17.1 > You should split at least drivers/crypto and the dts part, as drivers/crypto patchs are merged via the cryptodev tree and dts/doc will be merged via the sunxi tree. And ideally split patch in 3, the doc, the dts and the crypto. See how I added the same for A33 in: https://lore.kernel.org/linux-arm-kernel/20191120152833.20443-1-clabbe.montjoie@gmail.com/ Anyway the content is good. Acked-by: Corentin Labbe Thanks