Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2512857pxb; Sun, 3 Apr 2022 09:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4L5bAduuZ35Ys9kGTxEW9zz2yhbMYGVdmsv2E/AkjPzGitATFZujl8xXcrkjREUG1UA8r X-Received: by 2002:a17:90b:4a46:b0:1c7:3b81:fc6 with SMTP id lb6-20020a17090b4a4600b001c73b810fc6mr21738070pjb.243.1649003368706; Sun, 03 Apr 2022 09:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649003368; cv=none; d=google.com; s=arc-20160816; b=iMcZhfIC9I+N/IJCG14KjSh1zO4lf+hsRs88yswG5EPkMGHNd0xsQUKstat0rvAvwS WyEUZMqvYeii3Zpo2dz2bpUt/2wCQQGXw7oUtcF1ysfv4J3ig0IljUtjSeq2OhSFaGQ4 Tz1nD1Bhuy9qvr8Y/kFUuINIcfUNDzaByuo+itKP333kzLIWwCNcvb7Wl/pyNXNgANT4 eFKueVH8aZ03fO6ud9MSmNVUw0GkVEzPwVEslR7gO4KtAblGoUcNqu0a4cOxZ8ySHwbt KDKVgM7uh1mPTuNMtam5vrwz1nDftCMTwc+pDsQeizVuOxFbYzYB1Kx8llyieev5QFic yaWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0Jj1n8NaBhzqatfaJy+kbX/a+Snz7j/FCRrNIUPpydA=; b=BJHov3cCtT7xjDPWjHoWYwlie7zukFgEMo6UDdJ6DNdb2vz6V6P50+pBR42qorg58w jDHrC70IOM+vd5Wfl+kG5o/vr0tamsuAj2fWHB+nNQLHdXGTfTDeZyPaWncjlNxJ/kHO I/0c56YdpibMk692m2paUCwvJqU6YxuvP4/RZkgFXWQCwY/Ts1+kjk1S8yLwBuB1YBYw JcX181ii1VOB3O7WydeA/nMBMtCIubF218TiMo/r361BHc6+VhPQBgtHXqY9Xpg2w6Yf s4nQ8almuI++AXFfIXltSAp8JGQhwX+NkV0G6LK34q9HYwqMprach3VTJA+Npj8gxoJF OfXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=6eVmaNrP; 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 z13-20020a63e10d000000b003822812b5f3si7513459pgh.568.2022.04.03.09.28.54; Sun, 03 Apr 2022 09:29:28 -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=6eVmaNrP; 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 S245313AbiDBUME (ORCPT + 99 others); Sat, 2 Apr 2022 16:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239268AbiDBUMD (ORCPT ); Sat, 2 Apr 2022 16:12:03 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C306C66F8D for ; Sat, 2 Apr 2022 13:10:07 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id v30so954165wra.8 for ; Sat, 02 Apr 2022 13:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=0Jj1n8NaBhzqatfaJy+kbX/a+Snz7j/FCRrNIUPpydA=; b=6eVmaNrP/P9vTibYEoyZ7MxfkgjcMxnzMdQ8BmvnLraLfWwOdC2tBfT6jI4JEa4D/Y tZ/DCrshzH656mbgpxuj1/6mvctqyQygLVXJ4MsfzunS3JiOmP9lOAXeC8Rc7FTMS5Yr oWjs02VJbgP20HULVaEhvnEejjjBJ/8a4LUAfwOp7AWLKWuXwwPvjqa2jXPOhSRFjHW6 DW/W6UGFVzfy6cwAKvTc/1Q2RkibpfWX7b3of7/ZyT1Q1hHwIntogescQ3/kTx0m3J+e FeTt8biuBSRkF5X7Q9i2l3NsuEcytcFd0Sfg1RJMiOOMo6C7VDT4+nVqpXqGtjfjnIgK fBGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=0Jj1n8NaBhzqatfaJy+kbX/a+Snz7j/FCRrNIUPpydA=; b=Q8xR3atnN+KKP4TtSr9c+cy14mOQ2Z9oX3ql7UQBoqPP/wJoqGZK/PKT3J9yt57dt2 Epk6Kd3Ku1E7PBCMsmX4op67o9cYK4f5/5XKrjV11MISO4Ppk5JnPOCFqnzq1ZbuAzSC WuY4fhm8kCupFG15RDnIh/u7p8bDkO8oNfDI0WI9i7OQ4I3sOIjus6WsuJKUMwNbaBma 0hiRMY7QwBx4TKJou9yzcwyU/rSVGXJAhwn8f/LOsJdxte647efcgwMZ+AhisgscZlOA IvQL5Hrwi+9s8SuT0jQxHHc4g9IB/u19nVzXD1Ci4di6L6ZReAU72WWiLmfewp1HUY10 VZgQ== X-Gm-Message-State: AOAM533HWVND8CrVo6kTRTowPjIuNnUr/Zw9TVm6djv5rRuvrS/yxaZy BPPMpeD61pWjBQbTfJ9BSIGHQA== X-Received: by 2002:a5d:58d9:0:b0:203:fc5c:ba87 with SMTP id o25-20020a5d58d9000000b00203fc5cba87mr11829086wrf.79.1648930206310; Sat, 02 Apr 2022 13:10:06 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id o6-20020a05600002c600b002057f1738fcsm5705371wry.110.2022.04.02.13.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 13:10:05 -0700 (PDT) Date: Sat, 2 Apr 2022 22:10:03 +0200 From: LABBE Corentin To: Krzysztof Kozlowski Cc: heiko@sntech.de, herbert@gondor.apana.org.au, krzk+dt@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v4 28/33] dt-bindings: crypto: rockchip: convert to new driver bindings Message-ID: References: <20220401201804.2867154-1-clabbe@baylibre.com> <20220401201804.2867154-29-clabbe@baylibre.com> <30305936-4b69-e1ce-44c2-0d1d113b460e@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30305936-4b69-e1ce-44c2-0d1d113b460e@linaro.org> 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 Le Sat, Apr 02, 2022 at 01:53:58PM +0200, Krzysztof Kozlowski a ?crit : > On 01/04/2022 22:17, Corentin Labbe wrote: > > The latest addition to the rockchip crypto driver need to update the > > driver bindings. > > > > Signed-off-by: Corentin Labbe > > --- > > .../crypto/rockchip,rk3288-crypto.yaml | 68 +++++++++++++++++-- > > 1 file changed, 63 insertions(+), 5 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml > > index 66db671118c3..e6c00bc8bebf 100644 > > --- a/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml > > +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml > > @@ -11,8 +11,18 @@ maintainers: > > > > properties: > > compatible: > > - enum: > > - - rockchip,rk3288-crypto > > + oneOf: > > + - description: crypto IP present on RK3288 SoCs > > + items: > > + - const: rockchip,rk3288-crypto > > + - description: crypto IP present on RK3328 SoCs > > These two comments are not helping, so this should be just enum. > > > + items: > > + - const: rockchip,rk3328-crypto > > + - description: crypto IPs present on RK3399. crypto0 is the first IP with > > + RSA support, crypto1 is the second IP without RSA. > > The second part of this comment is helpful, first not. You have chosen > enum in your first patch, so just extend it with comments. Additionally > indexing does not scale. What if next generation reverses it and crypto0 > does not have RSA and crypto1 has? > > Something like: > > properties: > compatible: > enum: > - rockchip,rk3288-crypto > - rockchip,rk3328-crypto > # With RSA > - rockchip,rk3399-crypto-rsa > # Without RSA > - rockchip,rk3399-crypto-norsa > Hello There will never be new SoCs with this crypto, rockchip seems to have dropped this IP for a different crypto v2 on their new SoCs. I will answer more on that on your second mail. > > + enum: > > + - rockchip,rk3399-crypto0 > > + - rockchip,rk3399-crypto1 > > > > reg: > > maxItems: 1 > > @@ -21,16 +31,65 @@ properties: > > maxItems: 1 > > > > clocks: > > + minItems: 3 > > maxItems: 4 > > > > clock-names: > > + minItems: 3 > > maxItems: 4 > > > > resets: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 3 > > > > reset-names: > > - maxItems: 1 > > + deprecated: true > > Why reset-names are being deprecated? Did we talk about this? > Since I use the devm_reset_control_array_get_exclusive, there is no need to have reset-names. > > + > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: rockchip,rk3288-crypto > > + then: > > + properties: > > + clock-names: > > + items: > > + - const: "aclk" > > + - const: "hclk" > > + - const: "sclk" > > + - const: "apb_pclk" > > + minItems: 4 > > minItems for clocks > max for resets and reset-names > > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: rockchip,rk3328-crypto > > + then: > > + properties: > > + clock-names: > > + items: > > + - const: "hclk_master" > > + - const: "hclk_slave" > > + - const: "sclk" > > + maxItems: 3 > > min/max for clocks > max for resets and reset-names > > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - rockchip,rk3399-crypto0 > > + - rockchip,rk3399-crypto1 > > + then: > > + properties: > > + clock-names: > > + items: > > + - const: "hclk_master" > > + - const: "hclk_slave" > > + - const: "sclk" > > + maxItems: 3 > > + resets: > > + minItems: 3 > > Similarly. > I will fix that in v5 Thanks.