From patchwork Wed Feb 8 18:37:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651850 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 9895DC64EC6 for ; Wed, 8 Feb 2023 18:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229559AbjBHSit (ORCPT ); Wed, 8 Feb 2023 13:38:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjBHSiW (ORCPT ); Wed, 8 Feb 2023 13:38:22 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82715D500 for ; Wed, 8 Feb 2023 10:38:13 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id v13so21672046eda.11 for ; Wed, 08 Feb 2023 10:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YfZc7P3L4wBNnQQQ85wu2I6wsnovvh4e+MgGEWnocfk=; b=ZBpTHLCOzMVFoTQz2Jv4TYznabdtVlf9SsXJ3IEnljIUSkls1CsSKMmmrVQAkzSPhg /EbaraW0GDrRpCzuBZ1XUU7R1ZNk6clJqwVjWcGTjWSGZPzPnCXEjdAX9u1/yl0PXxVU GlKnql0RJ+yH7icZuYdYWxhhiTQKWIjO2qqLTg0jFTckkMCwCwkiyKEh1GugzgZbRytI WqpVD0WWM46A3nN//MjpwMfjZdvwvx9+TPAnQ3ClO5PoFQ/4XHbUo+Smm1mxDidqYCOi w4PGWgwbh1RzMA0CBRtCu7l8AwLGgc03qvHrPSbG8vtUe9G5LdXIInRyr19bsD8ayOts HhmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YfZc7P3L4wBNnQQQ85wu2I6wsnovvh4e+MgGEWnocfk=; b=Bn/zUh0wkwo9SrPsgq9CiJzQz8iJhulfuyGl5y6BarQip1UUmmffDLa9KaPhNR22XW VQhO2tQnn3paUyZL8/SqjdeypTu6Z8OKGHsPo0JM36MFSiGmI2BXwcKHJEAfXHGPCikf RBAbjXmUKVtYe7AQ461p2UIZCtZpSQEgJJSR4T3Q28BGG9bHT+ng8IgQ5ARLxUnLIc0l k8o9sGetjHfgd2TNirAcfx041fBdCGWuUD8oU0XjdDxTHjtCKamu97xIlA0LFiw/n9U4 BEMQ4z/0sd+oTOdRspqGUQ8g+RHOH2NzmFM8tUJWHLgGOQpElRNZbFw5flplTv7CqzGU UuhA== X-Gm-Message-State: AO0yUKUIDqjtjr4wGUsQBLthJEsA/Z5jH5WBIM+n/kpyOXgUx6WYXQuM yWnD73kv4PTvV5WRM+Dv/UAMZQ== X-Google-Smtp-Source: AK7set+cagKM9BkXSwtVGVWAopVYKfpge2UcnWjcZKoOJhfslhwYQ0HE0OsSczF2Wqb0Odj7qMPg7Q== X-Received: by 2002:a05:6402:510f:b0:49d:fd2a:39cd with SMTP id m15-20020a056402510f00b0049dfd2a39cdmr10565597edd.1.1675881492090; Wed, 08 Feb 2023 10:38:12 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:11 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v9 02/14] MAINTAINERS: Add qcom-qce dt-binding file to QUALCOMM CRYPTO DRIVERS section Date: Wed, 8 Feb 2023 20:37:43 +0200 Message-Id: <20230208183755.2907771-3-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Add the entry for 'Documentation/devicetree/bindings/crypto/qcom-qce.yaml' to the appropriate section for 'QUALCOMM CRYPTO DRIVERS' in MAINTAINERS file. Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 94971603568b..864bf5b7520f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17199,6 +17199,7 @@ M: Thara Gopinath L: linux-crypto@vger.kernel.org L: linux-arm-msm@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/crypto/qcom-qce.yaml F: drivers/crypto/qce/ QUALCOMM EMAC GIGABIT ETHERNET DRIVER From patchwork Wed Feb 8 18:37:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651849 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 C99A4C636D3 for ; Wed, 8 Feb 2023 18:38:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjBHSiv (ORCPT ); Wed, 8 Feb 2023 13:38:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbjBHSiX (ORCPT ); Wed, 8 Feb 2023 13:38:23 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1107128217 for ; Wed, 8 Feb 2023 10:38:17 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id l12so12839895edb.0 for ; Wed, 08 Feb 2023 10:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+zPdqAVNJI8VFw+E8thVrlhFODN9g8GlhI24Q34QDNM=; b=HI4z87JqBld+gUs2a2PvNMpTJ/5MAeMGcTipkWGogzA/iJcJzDtU1obNS0NUQunzfu yd8UKzz8vkydQ6naOErd3IxVWPW/QSFPxiFvAD7N4OnKdpWAzFrElcDFSxB3HW94FqLH +Mw/9aLaJLy3ifUFj062rz8HoEWRKb8nfgOXeUBAhc+cPD7WCPugnRNjJ64PNDIfg4iE kztsvbSZhu2G3CSKQsjjhYb1U52K2vk27T/w2eBpie7hvN0uuei0Si4R2teRfSchLYgI rAKGapT6ha0aZLYxxYgjY4wS3C1uMoTzfz2Zz4MWaDuo6VfG5aQ6mQ2CF6bSrP9DIlIr M+5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+zPdqAVNJI8VFw+E8thVrlhFODN9g8GlhI24Q34QDNM=; b=gbbTH9RFykbQIt86B6s47Euo4HGCidNWqdnWek/CaNQgEbE6XP8UxZ7TowbrViPQKK nqZHQpUsgfbkxQES5KlW7kL8BfH0tRjgY/1170cmwJ7RRma33ScBqG+zfkcU4HM3CuEB IKe4OUbbk7iLpNxG7MHR1/2LlOXOPP7scf7Zum0QmTW1KR+k8u7sJ8WOk07TtnvHd7tu dxcN7dG3YE4nWe/iHT+CwTD06kedi3LndKftooVxXgJCJHkgrJCLySGSd0/JnetCfqfN 1cd2qCJTYYH+yZYFSvnomClb1sTTuVwJEUIDEetgeJqZJIfaNNBehx/zQf1lOW30FuMI WN/Q== X-Gm-Message-State: AO0yUKX6Zr+5PQUzZKgcgf3t6uIACnB/ImNUmVghYRV1wRh2vJ54gR6/ VT/u43bcPfX9XR17193reIaaHg== X-Google-Smtp-Source: AK7set9tBOEiCi89P2IOJBPO/W87zgEQ+HJNix4V7CJ0RB4CZTX8X6K9mQ0n1eahyZwrqWFbsc4xzw== X-Received: by 2002:a05:6402:51d2:b0:4a2:64d7:16bc with SMTP id r18-20020a05640251d200b004a264d716bcmr9494598edd.4.1675881495668; Wed, 08 Feb 2023 10:38:15 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:15 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Rob Herring , Jordan Crouse Subject: [PATCH v9 04/14] dt-bindings: qcom-qce: Add 'iommus' to optional properties Date: Wed, 8 Feb 2023 20:37:45 +0200 Message-Id: <20230208183755.2907771-5-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Bhupesh Sharma Add the missing optional property - 'iommus' to the device-tree binding documentation for qcom-qce crypto IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Bjorn Andersson Reviewed-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy --- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 94f96ebc5dac..4e00e7925fed 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -32,6 +32,12 @@ properties: - const: bus - const: core + iommus: + minItems: 1 + maxItems: 8 + description: + phandle to apps_smmu node with sid mask. + interconnects: maxItems: 1 description: @@ -72,4 +78,8 @@ examples: clock-names = "iface", "bus", "core"; dmas = <&cryptobam 2>, <&cryptobam 3>; dma-names = "rx", "tx"; + iommus = <&apps_smmu 0x584 0x0011>, + <&apps_smmu 0x586 0x0011>, + <&apps_smmu 0x594 0x0011>, + <&apps_smmu 0x596 0x0011>; }; From patchwork Wed Feb 8 18:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651848 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 2A9A2C636D6 for ; Wed, 8 Feb 2023 18:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbjBHSiw (ORCPT ); Wed, 8 Feb 2023 13:38:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231175AbjBHSiY (ORCPT ); Wed, 8 Feb 2023 13:38:24 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99FCF1BC0 for ; Wed, 8 Feb 2023 10:38:18 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id u21so21743976edv.3 for ; Wed, 08 Feb 2023 10:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=seDN7hLl5swt4J3XJglUIV2zzqtOSiYmNP6OJCG/0cc=; b=Vb5ztwSumtqb2AB0kziEEW5EbhUthUpiOANbKW6VF+Np5gKsFzuhYqYjxzZ3M398Q3 DGAayObtSCsTqCgKdKBec95E17hC16j/qqyWWIaUMJ9Zdy0v3L+Vz89mgOwnvMrNp8Tv icUlj9/ErrnolSiksCWHbKyB4I2VRRIMYJzjfVDleHSxOli6A6uwyLJE7upSTC+h7bnl ypD3IdhRp4A9rODPxSK7rNDKBM/6UcXcjw9oRKtA7Hi5vX4CWM90mRI16Y3ecTmBTQJo ufMO/Wb65MP/SnSIB+ctt4JSSiQr3QzAdBs9zU/bngEn85oUusQyl+B9wGX49OW+gBfu 2awg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=seDN7hLl5swt4J3XJglUIV2zzqtOSiYmNP6OJCG/0cc=; b=ukG40WGoF4JCMz8AOVj7zRcb3Soovhw0Ryg1MUmjxF2aey4NpAl3O/Ylg6YrQleNFg rWVp1H9NRXG/m6/Z8e1dQbkIT2p2Jdy9wkRDItndTp6xs1JBtgH+aLXMNWGUPMP6N1F5 YRaxbu3sHJ35AVbx+care16O/5C9wYb4pXrIp4bhV2BobnzI3tEby/U14GMk+OS7j19k SwhGHnRWRHlekZpC/bkRbmc5DqfGOWG4NaYJzG6Y01+jH0gKRxo61oPjOR/xixHZVVXy yTTXbxWd0bB9hkVqVWRyLyKM7S5n2TT61cNC9je7pYDe9wYKM1vOJtjkDD4hKrJBkPQV 8LEA== X-Gm-Message-State: AO0yUKX6BegF1bOEGXzgeMbjRsgHsVSVNDVSWfU38Nx1l5mGDWHqq7ep Z1w2qUpPmQu61HvRdSoMcVAs8Q== X-Google-Smtp-Source: AK7set+y4vkuO6iCpFVJRNS7wp74veH5JnO0RdabOe4YWDYh+5U6S4gBwdKJ8pFaGEI7pgC9E7iKLw== X-Received: by 2002:a05:6402:51d2:b0:4a2:64d7:16bc with SMTP id r18-20020a05640251d200b004a264d716bcmr9494711edd.4.1675881497254; Wed, 08 Feb 2023 10:38:17 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:16 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v9 05/14] dt-bindings: qcom-qce: Add new SoC compatible strings for qcom-qce Date: Wed, 8 Feb 2023 20:37:46 +0200 Message-Id: <20230208183755.2907771-6-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Change QCE IP version specific compatible to two QCE IP family compatibles based on SoC name and populate these two IP families with particular SoC specific IP compatible names, which are known at the moment. Keep the old compatible 'qcom,crypto-v5.1' for backward compatibility of DTB ABI, but mark it as deprecated. The change is based on the original one written by Bhupesh Sharma. Cc: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/crypto/qcom-qce.yaml | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml index 4e00e7925fed..f6f1759a2f6e 100644 --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml @@ -15,7 +15,27 @@ description: properties: compatible: - const: qcom,crypto-v5.1 + oneOf: + - const: qcom,crypto-v5.1 + deprecated: true + description: Kept only for ABI backward compatibility + - const: qcom,crypto-v5.4 + deprecated: true + description: Kept only for ABI backward compatibility + - items: + - enum: + - qcom,ipq6018-qce + - qcom,ipq8074-qce + - qcom,msm8996-qce + - qcom,sdm845-qce + - const: qcom,ipq4019-qce + - items: + - enum: + - qcom,sm8250-qce + - qcom,sm8350-qce + - qcom,sm8450-qce + - qcom,sm8550-qce + - const: qcom,sm8150-qce reg: maxItems: 1 @@ -70,7 +90,7 @@ examples: - | #include crypto-engine@fd45a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq6018-qce", "qcom,ipq4019-qce"; reg = <0xfd45a000 0x6000>; clocks = <&gcc GCC_CE2_AHB_CLK>, <&gcc GCC_CE2_AXI_CLK>, From patchwork Wed Feb 8 18:37:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651847 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 2DF20C64ED6 for ; Wed, 8 Feb 2023 18:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbjBHSiy (ORCPT ); Wed, 8 Feb 2023 13:38:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbjBHSiZ (ORCPT ); Wed, 8 Feb 2023 13:38:25 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0F842132 for ; Wed, 8 Feb 2023 10:38:21 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id l12so12840235edb.0 for ; Wed, 08 Feb 2023 10:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kbuCsaZiHtUTgOWZDPPWu8eIqChDJtTAhqjY0efOttk=; b=vguUz3jiIdB2R73Kp3HvwxlqAKmEGdrkEvgWB6XYdGVj6HJQY58L6k9lGiT57RkYfU 7ckzi3ZPcTr96wO34ptnTqRvVuYe4tKoFP8RUSRpHf6S/DxuF5fUgD6ampUEuqaXrsl6 +NE88NdS4yeIUvMmEMK73aWnqrCAwVWBJDXUeQRhURW5Jsb92Xxu5GWsPmv793SIhTjp dUenPPFBAu3x9NeON49jYAFtkSul4gMfiNkLypHQKzRMInDzGPMSNrs/ZD3eSF3A9zDI Hwo3w9GMhq8a8Lwyh6Z+XkFz3GDQSVnFi2neMRXW/fRzHv/z7t7tDw7O2wqmLgLzm426 hWUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kbuCsaZiHtUTgOWZDPPWu8eIqChDJtTAhqjY0efOttk=; b=RVbCT00vTvuUu8D223OA7PdCtjaE2yHwSLthuMFvVFxIbmhxksdXcYzlgZFujBwnPC WrDm9X6oB2tyt8t8qFm3t3s6gY3pvfG9hWXwYVSJem1qMW91bQUA2XTJmOKJLQROfsri eaDLLslsqG9NcMeDNkAA0KjaGGTDXMbqIMcRuT6UAdqJSrIPB+a6cdyUXpXmds6zArhs gi3+2gRNl7nF/+7NRfn8mPhq5vPDsbCVUGvSJ7EMuDVie/fSvUl4BTfeCsVYSQS+4FsY kOsnjVg87zPP41oLIAw5egzrH962xylaq+GeDprAJdFWiD8P1+q0hx5bDtgcUY0gP0u5 YFHg== X-Gm-Message-State: AO0yUKXg2TE1SWYFoCQlQH+04Q8IbhAWDHNmKbz8K9KqEYwEuvD3Q/Cm t/Rngw/Z8lCWKdr4Qw9zR6/Fvg== X-Google-Smtp-Source: AK7set9I5yLGkPPfqYDV0wpLjNDuJD6rrJGD9rHgKxNqFPz95yOhZ9oj5sdKmM7AdwpH1HV4/osDgw== X-Received: by 2002:a05:6402:278a:b0:4aa:b394:7b28 with SMTP id b10-20020a056402278a00b004aab3947b28mr10466401ede.3.1675881500257; Wed, 08 Feb 2023 10:38:20 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:19 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v9 07/14] arm: dts: qcom: ipq4019: update a compatible for QCE IP on IPQ4019 SoC Date: Wed, 8 Feb 2023 20:37:48 +0200 Message-Id: <20230208183755.2907771-8-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Change the old deprecated compatible name to a new one, which is specific to IPQ4019 SoC. Signed-off-by: Vladimir Zapolskiy --- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi index a73c3a17b6a4..c73098d7a4da 100644 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi @@ -314,7 +314,7 @@ cryptobam: dma-controller@8e04000 { }; crypto: crypto@8e3a000 { - compatible = "qcom,crypto-v5.1"; + compatible = "qcom,ipq4019-qce"; reg = <0x08e3a000 0x6000>; clocks = <&gcc GCC_CRYPTO_AHB_CLK>, <&gcc GCC_CRYPTO_AXI_CLK>, From patchwork Wed Feb 8 18:37:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651846 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 A3194C6FA9D for ; Wed, 8 Feb 2023 18:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjBHSi5 (ORCPT ); Wed, 8 Feb 2023 13:38:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbjBHSi1 (ORCPT ); Wed, 8 Feb 2023 13:38:27 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91E812725 for ; Wed, 8 Feb 2023 10:38:24 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id u22so8786891ejj.10 for ; Wed, 08 Feb 2023 10:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i6Xkj1uvomIqvV5vtczDqyKqzJQXhJ76whYXVbHQRUQ=; b=ffI3XCS4l92o9hwe5j/shy1u1L+qV168krZto2cXNR5wARnSRUoqEEqGuKyCcvKpc2 x6IKLWAhmUysj+bBkosvaHUkjAQsSm27KQCv0jxcnEJIYc5d5J8179v5rsOww7Skrx0Y 8ppUFoFDIjjNSiutNBDJNg+ucy0frepTp8P7zpxmSXsLH6vsa0dNmHaqOInYxVQaAzy2 0oBUn6f2SbnWH7Ws8za68ZIaWs2eBEze2LF1WtFEw76K8FFk7mmUVmNECpCIPxwlaJJ3 K581XZ5oRsWvUubQFoIEVIzdx0OHvce2A6eJcigRhd0LEygaVJzNXK/lhvleVjdOxyeD SUDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i6Xkj1uvomIqvV5vtczDqyKqzJQXhJ76whYXVbHQRUQ=; b=dmPsCB42Dx0uHzHCJAbxug6YCY3j8SkIaTt1dwp7zSr/kLxHWrSImq+Bb3qjD8tP8c DMoDTORXlDaVVs6XMzgKGAQTQvHLQDFfDs7U9p1BRtgsMZVUJeEPSv0uVuxl5OQB6q8c zYkuDBP4GiCwO1ZnCU5cz+/VhuQ1kmqRJ5BS6VE/ri2dELlkpOsqBFytwX0HiMA/pOSJ j6z5PKXYwd0aY1KdhtsJcEdQ4UfnOjlzXgnodhl9sKlw6+nBCY8DShpUOrFa0CYv8nft bUHP4uae673KWxXiRZ9ZezHrC11lPrhkVL/u9IpFzDUjo+gKUWfz0pw8dCPGnFR4PCo0 ITBQ== X-Gm-Message-State: AO0yUKXWuvinP7q8hDIJbhXiNPOVEy8oXpzEpfcndV1Ktz+fwXyBxW1T sp3LbQFvnNfoXPJdFV6VzzD39Q== X-Google-Smtp-Source: AK7set8mwOxLCl0RNGRM/7A9ghZt28JBV7F4PVrkuIM0uG9foafHtvMsHOIS892LYvJsV6GrS9A7pQ== X-Received: by 2002:a17:906:d6:b0:86e:2051:a514 with SMTP id 22-20020a17090600d600b0086e2051a514mr8339869eji.5.1675881503218; Wed, 08 Feb 2023 10:38:23 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:22 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v9 09/14] arm64: dts: qcom: sdm845: update QCE compatible according to a new scheme Date: Wed, 8 Feb 2023 20:37:50 +0200 Message-Id: <20230208183755.2907771-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Change the old deprecated compatible name of QCE IP on SDM845 to new ones based on SoC name. Signed-off-by: Vladimir Zapolskiy --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 9ffc0fe07c21..2cf19e4d211b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2632,7 +2632,7 @@ cryptobam: dma-controller@1dc4000 { }; crypto: crypto@1dfa000 { - compatible = "qcom,crypto-v5.4"; + compatible = "qcom,sdm845-qce", "qcom,ipq4019-qce"; reg = <0 0x01dfa000 0 0x6000>; clocks = <&gcc GCC_CE1_AHB_CLK>, <&gcc GCC_CE1_AXI_CLK>, From patchwork Wed Feb 8 18:37:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651845 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 43C54C6FD1C for ; Wed, 8 Feb 2023 18:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231442AbjBHSi6 (ORCPT ); Wed, 8 Feb 2023 13:38:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231466AbjBHSi2 (ORCPT ); Wed, 8 Feb 2023 13:38:28 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870B732507 for ; Wed, 8 Feb 2023 10:38:27 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id m2so53400373ejb.8 for ; Wed, 08 Feb 2023 10:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G3EO5siwdhGpkelYPYEIcK9+XxHqnaj+3eHiFrzR7l0=; b=WshMmb3W+09KjIoeUP1uAeVHbEeyyAIzdgDymmxrCu+bj0OobG7Sw6/TOt/EYF7L+w BVyW+1DPAlXCukjEqeUFdPbHOJ2R0KPIKpFuklmwzStCEPfUhPb160Gf8flLK4TxSfoU ae2/whHNQAkpJeXPKeng6lMaxu/VXGDLpuTRhU7HjTfYoc2ESAPhtB4nchgyINRH5UbP zaQZiKO9+URY8Ky4UMGoHt+Rk523jXav7k7AEJiL8+uG/DsIPErScpUmX3uNgkDiBvFA XUrlLHg1BZNTUclbsaqlwxRsp3Vxub0ImQV47s4y2MGXic2arPsSUQzZaLQLUCQx8vmA mMGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G3EO5siwdhGpkelYPYEIcK9+XxHqnaj+3eHiFrzR7l0=; b=PHFu+hklBR7LIRgfnJRPWAti+q9VpheS9Zt8cth2s/yTTB4OLLoe6ON5OoNahEchf1 kRdRLHfB5n9MvtTKiqhn5eaZgyZB4zO3Ie91jnBj30/f9jZ6g8OGFwloOFP1vZpZE2ry 9HlloemCbdJEInYyeypPaywmaZtaBXLbVEiK3eaU4hkF2xTkw3q1HLEV2HX9CYLfTBFe e/nfSJ04y2g1C++WRWbArJqvu7NQeP1ATsXSxd9Sq+tJGF9l7UcEa1YOlj/5k84VI6sv fwOEBIw7TUhQGRZwFyCWkJNvpR241vSWPMLrJAg4xUtO+EBVREJTH2voUagFwvSXZsRZ WA/Q== X-Gm-Message-State: AO0yUKWhK2iUf7QEGUKDGmFdfytU99rugJ+i6wjV2BD71+qMUeltW8Ju L13qSbkVUCvDE2xKnU9So9ACfw== X-Google-Smtp-Source: AK7set+MQnEt0EjwbBUXBv9Max2YvnT4UFCtu7Ky/NgIX32Bwh6SdCSEiaWBlQSub5VYHXJnMcETmw== X-Received: by 2002:a17:906:2098:b0:889:3d10:ae93 with SMTP id 24-20020a170906209800b008893d10ae93mr8112409ejq.6.1675881506124; Wed, 08 Feb 2023 10:38:26 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:25 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v9 11/14] arm64: dts: qcom: sm8250: add description of Qualcomm Crypto Engine IP Date: Wed, 8 Feb 2023 20:37:52 +0200 Message-Id: <20230208183755.2907771-12-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add description of QCE and its corresponding BAM DMA IPs on SM8250 SoC. Signed-off-by: Vladimir Zapolskiy --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index e59c16f74d17..d8698d18223e 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -2215,6 +2215,30 @@ ufs_mem_phy_lanes: phy@1d87400 { }; }; + cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0x0 0x01dc4000 0x0 0x24000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + qcom,controlled-remotely; + num-channels = <8>; + qcom,num-ees = <2>; + iommus = <&apps_smmu 0x586 0x11>, + <&apps_smmu 0x596 0x11>; + }; + + crypto: crypto@1dfa000 { + compatible = "qcom,sm8250-qce", "qcom,sm8150-qce"; + reg = <0x0 0x01dfa000 0x0 0x6000>; + dmas = <&cryptobam 6>, <&cryptobam 7>; + dma-names = "rx", "tx"; + interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>; + interconnect-names = "memory"; + iommus = <&apps_smmu 0x586 0x11>, + <&apps_smmu 0x596 0x11>; + }; + tcsr_mutex: hwlock@1f40000 { compatible = "qcom,tcsr-mutex"; reg = <0x0 0x01f40000 0x0 0x40000>; From patchwork Wed Feb 8 18:37:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 651844 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 706A4C6FD1E for ; Wed, 8 Feb 2023 18:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbjBHSi6 (ORCPT ); Wed, 8 Feb 2023 13:38:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231517AbjBHSi3 (ORCPT ); Wed, 8 Feb 2023 13:38:29 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003CBDBCD for ; Wed, 8 Feb 2023 10:38:27 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id l14so11820705eds.4 for ; Wed, 08 Feb 2023 10:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XdEBUNAoD9sIXnLheQjygvvxpux6AlFhul4Trb6QXj0=; b=ZPmV9+ZzTu7dwzQlIjfMjuMdz9NttX2whjyX0KvIggMvjSihmi/2ik9TI1tKRqCSKn sGvxdU9y+XSbXTb5QrdYXL+takaOpUD7oSkcH5YzuMmwsG78Ekl2DWhVaPDyujAY9YW8 6oEHN4ICh5k/jQKOllXq/LUa6ny//wRj8bHC0ayPww5uYrKVF2ok3c998Ohks8FFPw5O sZ4RqDqpxNJd2TgUaRccECqAJILOk293+4wujl+wlvwnMQAYRO0rjzwnke1SpWgBxW8P GUwLskhAbCGlienq/mJ/ysEUYH9LljMsuLyOFY2+/3G/xlmsP07cga0HZFnADkkOlhAX jTAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XdEBUNAoD9sIXnLheQjygvvxpux6AlFhul4Trb6QXj0=; b=qpNZZ/m59352yZGcr1FfpVZtzjd0tzFqMIlko0xKBxKx/+ii2OH8n6znlOoNgyFx4X 4gB21O+xTq+sTZSPWxkBqyHdSuzMvn7vJvlnrEQ/Sz8cjF6+Fc+yG1ZGMENai3ZGlIig FgFkQCHK8owA6slKBW4SI+s1lkyPTxxj/CFVPwEuuZgz401DlvoiEDjnYxjoGXCXimUQ vz5vMIdZM4lAx76h+JIGW0OuIpCquLqVMZUKD5obOqCMgJm3RaUUO0rBe6eBVtGcL5Hj pIaxT9GPOIJHxI6mX0v9jI8GPc/vux4SZVbmF9WkDIHw2m0wCldrmQW36ktpc5GaUxab envw== X-Gm-Message-State: AO0yUKW2A5ndPIhiuFna8Jes8k6ong7dzA3nD+nFFafVQHB0zFWyQvOd xQCXF3Y2WmAzOuOXNqAVyG/u/w== X-Google-Smtp-Source: AK7set/QnbQMryUDCGS23BXTqH0AGhzEIZ/yIpI9f0SBT/+TCmRY2rHiCtk6WuD/wSoIJUv5gRYJkw== X-Received: by 2002:a05:6402:34d5:b0:4ab:dde:dea0 with SMTP id w21-20020a05640234d500b004ab0ddedea0mr2583030edc.2.1675881507553; Wed, 08 Feb 2023 10:38:27 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id d22-20020a50cd56000000b004aaa8e65d0esm5179663edj.84.2023.02.08.10.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:38:27 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Jordan Crouse Subject: [PATCH v9 12/14] crypto: qce: core: Add support to initialize interconnect path Date: Wed, 8 Feb 2023 20:37:53 +0200 Message-Id: <20230208183755.2907771-13-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> References: <20230208183755.2907771-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Thara Gopinath Crypto engine on certain Snapdragon processors like sm8150, sm8250, sm8350 etc. requires interconnect path between the engine and memory to be explicitly enabled and bandwidth set prior to any operations. Add support in the qce core to enable the interconnect path appropriately. Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath [Bhupesh: Make header file inclusion alphabetical and use devm_of_icc_get()] Signed-off-by: Bhupesh Sharma [vladimir: moved icc bandwidth setup closer to its acquisition] Signed-off-by: Vladimir Zapolskiy --- drivers/crypto/qce/core.c | 16 +++++++++++++++- drivers/crypto/qce/core.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index d3780be44a76..336edba2513e 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #define QCE_MAJOR_VERSION5 0x05 #define QCE_QUEUE_LENGTH 1 +#define QCE_DEFAULT_MEM_BANDWIDTH 393600 + static const struct qce_algo_ops *qce_ops[] = { #ifdef CONFIG_CRYPTO_DEV_QCE_SKCIPHER &skcipher_ops, @@ -218,10 +221,18 @@ static int qce_crypto_probe(struct platform_device *pdev) if (IS_ERR(qce->bus)) return PTR_ERR(qce->bus); - ret = clk_prepare_enable(qce->core); + qce->mem_path = devm_of_icc_get(qce->dev, "memory"); + if (IS_ERR(qce->mem_path)) + return PTR_ERR(qce->mem_path); + + ret = icc_set_bw(qce->mem_path, QCE_DEFAULT_MEM_BANDWIDTH, QCE_DEFAULT_MEM_BANDWIDTH); if (ret) return ret; + ret = clk_prepare_enable(qce->core); + if (ret) + goto err_mem_path_disable; + ret = clk_prepare_enable(qce->iface); if (ret) goto err_clks_core; @@ -260,6 +271,9 @@ static int qce_crypto_probe(struct platform_device *pdev) clk_disable_unprepare(qce->iface); err_clks_core: clk_disable_unprepare(qce->core); +err_mem_path_disable: + icc_set_bw(qce->mem_path, 0, 0); + return ret; } diff --git a/drivers/crypto/qce/core.h b/drivers/crypto/qce/core.h index 085774cdf641..228fcd69ec51 100644 --- a/drivers/crypto/qce/core.h +++ b/drivers/crypto/qce/core.h @@ -35,6 +35,7 @@ struct qce_device { void __iomem *base; struct device *dev; struct clk *core, *iface, *bus; + struct icc_path *mem_path; struct qce_dma_data dma; int burst_size; unsigned int pipe_pair_id;